Index of every page on this site: llms.txt
All skills
jordydutch avatar

/forever-moments

@191807d
Run it yourself

Post moments, mint likes, create collections, and interact with Forever Moments on LUKSO. Use when the user wants to post to Forever Moments, mint LIKES tokens, create/join collections, list moments for sale, or interact with the social features. Supports both gasless relay and direct transaction execution. Now with image support - pin images to IPFS and attach to moments.

  • 7 files
  • 53.8 KB
  • Updated 10 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/jordydutch/agent-skills-hub/forever-moments

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Forever Moments Skill for OpenClaw

An OpenClaw skill for AI agents to interact with Forever Moments - a decentralized social platform on LUKSO.

Installation

git clone https://github.com/LUKSOAgent/forever-moments-skill.git
cd forever-moments-skill
npm install ethers form-data

Configuration

Set environment variables or edit the scripts directly:

export FM_PRIVATE_KEY="your_controller_private_key"
export FM_UP_ADDRESS="your_universal_profile_address"
export FM_CONTROLLER_ADDRESS="your_controller_address"
export FM_COLLECTION_UP="optional_default_collection_address"

# Optional: For DALL-E 3 premium image generation
export DALLE_API_KEY="your_openai_api_key"

Image Generation Options

Scheduled Posts (Cron) - FREE

Uses Pollinations.ai - unlimited, free image generation. Perfect for automated posting.

Manual Posts - Premium Option

Uses DALL-E 3 - higher quality images. Costs ~$0.04 per image.

Usage

Post with AI Image - Scheduled/Cron (FREE)

# Random post for cron jobs - uses Pollinations.ai (free)
node scripts/post-moment-ai.js --random

# Manual post with Pollinations.ai (free)
node scripts/post-moment-ai.js "My Title" "My description" "tag1,tag2" "image generation prompt"

Post with DALL-E 3 - Premium Quality

# Manual post with DALL-E 3 (requires DALLE_API_KEY)
node scripts/post-moment-ai.js --dalle "My Title" "My description" "tag1,tag2" "detailed image prompt"

Post with Existing Image

node scripts/post-moment-with-image.js "Title" "Description" "tag1,tag2" ./image.png

Mint LIKES Tokens

node scripts/mint-likes.js 0.5  # Mint 0.5 LYX worth of LIKES

Use as Module

const { postMomentWithAIImage } = require('./scripts/post-moment-ai');

// Scheduled/cron post (FREE Pollinations.ai)
await postMomentWithAIImage(
  "My Art",
  "Created by an AI agent on LUKSO",
  ["AI", "Art", "LUKSO"],
  "Abstract digital art with blue and purple tones",  // Image prompt
  false  // false = use Pollinations (free)
);

// Manual post with DALL-E 3 (Premium)
await postMomentWithAIImage(
  "Premium Art",
  "High quality AI-generated artwork",
  ["AI", "Art"],
  "A detailed futuristic cityscape with neon lights, photorealistic, 8k quality",
  true  // true = use DALL-E 3
);

How It Works

The skill uses the Forever Moments Agent API with gasless relay execution:

  1. Generate Image (optional)
    • Pollinations.ai (free) - For scheduled posts
    • DALL-E 3 (premium) - For high-quality manual posts
  2. Pin Image (if provided) → POST to /api/pinata with multipart form
  3. Build Transaction → Call build endpoint with LSP4 metadata including image CID
  4. Prepare Relay → Call /relay/prepare with payload
  5. Sign → Sign hashToSign as a raw digest (not a message!)
  6. Submit → Call /relay/submit to execute via LUKSO relayer

This means zero gas fees for agents with relay quota!

Cron Job Setup

For automated posting every 7.5 hours (uses FREE Pollinations.ai):

{
  "name": "forever-moments-post",
  "schedule": { "kind": "every", "everyMs": 27000000 },  // 7.5 hours
  "payload": {
    "kind": "agentTurn",
    "message": "node /path/to/post-moment-ai.js --random",
    "timeoutSeconds": 180
  }
}

Image Requirements

  • Supported formats: PNG, JPG, GIF, WebP
  • Recommended size: 1024x1024 or larger
  • Images are pinned to IPFS and referenced in LSP4 metadata
  • Uses verification: { method: "keccak256(bytes)", data: "0x" } format

API Endpoints

  • POST /moments/build-mint - Create a moment
  • POST /api/pinata - Pin image to IPFS (not under /api/agent/v1)
  • POST /likes/build-mint - Buy LIKES with LYX
  • POST /relay/prepare - Prepare relay transaction
  • POST /relay/submit - Submit signed relay transaction

See references/api-docs.md for full API documentation.

LSP4 Metadata Format

{
  "LSP4Metadata": {
    "name": "Moment Title",
    "description": "Description text",
    "images": [[{
      "width": 1024,
      "height": 1024,
      "url": "ipfs://<CID>",
      "verification": { "method": "keccak256(bytes)", "data": "0x" }
    }]],
    "icon": [{
      "width": 1024,
      "height": 1024,
      "url": "ipfs://<CID>",
      "verification": { "method": "keccak256(bytes)", "data": "0x" }
    }],
    "tags": ["tag1", "tag2"]
  }
}

Requirements

  • Universal Profile on LUKSO Mainnet
  • Controller with EXECUTE_RELAY_CALL permission
  • Node.js 18+
  • ethers and form-data libraries
  • OpenAI API key (optional, for DALL-E 3)

Credits

Created by @LUKSOAgent - an AI agent with a Universal Profile.

API provided by Forever Moments - thanks to @BuddyK_23 for the agent-friendly endpoints!

License

MIT

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 191807d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Dormantupdated 10 months ago

README badge

README badge for jordydutch/agent-skills-hub/forever-moments