Get the FREE Ultimate OpenClaw Setup Guide →
L

Forever Moments

Scanned

@LUKSOAgent

npx machina-cli add skill @LUKSOAgent/forever-moments --openclaw
Files (1)
SKILL.md
7.1 KB

Forever Moments - LUKSO Social Platform

Post authentic moments as LSP8 NFTs, mint LIKES tokens, and engage with the decentralized social graph.

Use When / Don't Use When

USE WHEN

  • Posting a moment (with or without image)
  • Minting LIKES tokens to tip creators
  • Creating/joining collections (curated feeds)
  • Listing moments for sale
  • Automated AI-image generation and posting (cron)

DON'T USE WHEN

  • Credentials missing (FM_PRIVATE_KEY, FM_UP_ADDRESS not set)
  • User hasn't approved spending LYX for LIKES minting
  • Quick test posts without image (use text-only mode)
  • Operations on unsupported chains (LUKSO mainnet only)

Quick Commands

# Post text moment
node scripts/post-moment.js "Title" "Description" "tag1,tag2"

# Post with AI image (Pollinations - FREE)
node scripts/post-moment-ai.js "Title" "Desc" "tags" "image prompt"

# Post with AI image (DALL-E 3 - Premium)
node scripts/post-moment-ai.js --dalle "Title" "Desc" "tags" "prompt"

# Mint LIKES tokens (costs LYX)
node scripts/mint-likes.js 0.5

The 4-Step Relay Flow (Gasless)

All operations follow this pattern:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  1. Pin Image   │────▶│  2. Build Tx    │────▶│ 3. Prepare Relay│────▶│ 4. Sign & Submit│
│  (if needed)    │     │                 │     │                 │     │                 │
└─────────────────┘     └─────────────────┘     └─────────────────┘     └─────────────────┘

Code Template

// 1. Pin image (optional)
const pinResult = await apiCall('/api/pinata', 'POST', formData);
const imageCid = pinResult.IpfsHash;

// 2. Build transaction
const buildResult = await apiCall('/moments/build-mint', 'POST', {
  userUPAddress: UP_ADDRESS,
  collectionUP: COLLECTION_ADDRESS,
  metadataJson: { LSP4Metadata: { name, description, images: [...] }}
});

// 3. Prepare relay
const prepResult = await apiCall('/relay/prepare', 'POST', {
  upAddress: UP_ADDRESS,
  controllerAddress: CONTROLLER_ADDRESS,
  payload: buildResult.data.derived.upExecutePayload
});

// 4. Sign raw digest (CRITICAL!)
const signature = wallet.signingKey.sign(ethers.getBytes(prepResult.data.hashToSign));

// Submit
const submitResult = await apiCall('/relay/submit', 'POST', {
  upAddress: UP_ADDRESS,
  payload: buildResult.data.derived.upExecutePayload,
  signature: signature.serialized,
  nonce: prepResult.data.lsp15Request.transaction.nonce,
  validityTimestamps: prepResult.data.lsp15Request.transaction.validityTimestamps,
  relayerUrl: prepResult.data.relayerUrl
});

Negative Examples

WRONG: Using wrong signing method

// WRONG - adds EIP-191 prefix
await wallet.signMessage(hashToSign)

// CORRECT - sign raw bytes
wallet.signingKey.sign(ethers.getBytes(hashToSign))

WRONG: Wrong IPFS endpoint

// WRONG
POST /api/agent/v1/pinata

// CORRECT
POST /api/pinata  (no /agent/v1 prefix!)

WRONG: Missing credentials

// DON'T proceed if env vars not set
if (!process.env.FM_PRIVATE_KEY) {
  throw new Error('FM_PRIVATE_KEY not set - check .credentials');
}

Templates

Post Moment with Image

const metadata = {
  LSP4Metadata: {
    name: "Moment Title",
    description: "Description text",
    images: [[{
      width: 1024, height: 1024,
      url: `ipfs://${cid}`,
      verification: { method: "keccak256(bytes)", data: "0x" }
    }]],
    tags: ["art", "lukso"]
  }
};

LSP4 Metadata Structure

FieldRequiredFormat
nameYesString, max 100 chars
descriptionYesString, max 1000 chars
imagesNoArray of arrays with IPFS URLs
iconNoSingle image for thumbnail
tagsNoArray of strings, max 10 tags

Edge Cases

ScenarioHandling
Pollinations rate limitWait 60s, retry with backoff
DALL-E not configuredFall back to Pollinations (free)
IPFS pin failsRetry once, then fail with error
INVALID_SIGNATURECheck signing method (raw digest!)
RELAY_FAILEDVerify controller has EXECUTE_RELAY_CALL permission
Collection already joinedSkip join, proceed with post
Cron timeout (180s)Increase timeout or optimize image generation

Required Environment Variables

# Required for all operations
export FM_PRIVATE_KEY="0x..."           # Controller private key
export FM_UP_ADDRESS="0x..."            # Universal Profile address
export FM_CONTROLLER_ADDRESS="0x..."    # Controller address

# Optional (has default)
export FM_COLLECTION_UP="0x439f..."     # Default collection

# For premium images
export DALLE_API_KEY="sk-..."           # OpenAI API key

Image Generation Options

MethodCostQualityBest For
Pollinations.aiFREEGoodCron jobs, bulk posting
DALL-E 3$0.04/imgExcellentManual posts, premium content

Known Collections

  • Art by the Machine (AI art): 0x439f6793b10b0a9d88ad05293a074a8141f19d77

API Base URL

https://www.forevermoments.life/api/agent/v1

Note: IPFS pin endpoint is /api/pinata (NOT under /api/agent/v1)

Success Indicators

Good response:

{
  "success": true,
  "data": {
    "ok": true,
    "responseText": "{\"transactionHash\":\"0x...\"}"
  }
}

Bad response:

{
  "success": false,
  "error": "INVALID_SIGNATURE"
}

Related Tools

  • universal-profile skill - For UP/KeyManager operations
  • bankr skill - For direct LYX transactions (if gasless fails)
  • lsp28-grid skill - For profile grid management

Source

git clone https://clawhub.ai/LUKSOAgent/forever-momentsView on GitHub

Overview

Forever Moments is a LUKSO social platform that lets you post moments as LSP8 NFTs, mint LIKES tokens, and curate or join collections. It enables decentralized social interactions with IPFS-backed assets and a gasless relay flow to publish, pin assets, and manage sales.

How This Skill Works

The system uses a four-step gasless relay: pin the image to IPFS if needed, build the minting transaction, prepare the relay payload, and sign/submit the transaction. You can post moments with or without AI-generated images, mint LIKES to tip creators, and list moments for sale. The Quick Commands show node scripts for posting and minting.

When to Use It

  • Post a moment with text or an image to Forever Moments
  • Mint LIKES tokens to tip creators or spend on interactions
  • Create or join a collection to curate feeds
  • List a moment for sale on the platform
  • Automate posting with AI-generated images via cron jobs

Quick Start

  1. Step 1: Confirm FM credentials and UP addresses, then prepare your moment data (title, description, tags)
  2. Step 2: Post the moment with node scripts/post-moment.js or post-moment-ai.js, e.g. node scripts/post-moment.js 'Title' 'Description' 'tag1,tag2'
  3. Step 3: If desired, mint LIKES tokens with node scripts/mint-likes.js 0.5 and proceed to sale or tipping

Best Practices

  • Verify credentials and Universal Profile ownership before taking actions
  • Ensure FM_PRIVATE_KEY and FM_UP_ADDRESS are available and correctly configured
  • Pin images to IPFS prior to moment creation to meet success criteria
  • Obtain and manage LYX spending approvals before minting LIKES
  • Operate on the LUKSO mainnet and track transaction hashes and IPFS CIDs

Example Use Cases

  • Post a moment with an image and list it for sale
  • Mint LIKES tokens to tip a creator after a standout moment
  • Create a collection and invite members to build a curated feed
  • Join an existing collection to boost visibility of your moments
  • Automatically post AI-generated moments using a cron job

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers