agentleFS
canddao1-dotcomcanddao1-dotcom/flare-agent-skills/skills/fassets/SKILL.md

fassets

Skill7 starsChanged 9 months agoMITView on GitHub

FAssets mint and redeem on Flare. Mint FXRP by sending XRP to an agent, redeem FXRP back to XRP on XRPL. Full programmatic pipeline — no dApp needed. Triggers on "/fassets", "mint fxrp", "redeem fxrp", "fassets redeem", "fassets mint".

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All operations are in lots (1 lot = 10 FXRP = 10 XRP)

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

FAssets Skill

Full mint and redeem pipeline for FAssets (FXRP) on Flare Network. FAssets are trustless, over-collateralized wrapped tokens backed by real XRP on the XRPL.

Full Pipeline

MINT:  XRP (XRPL) ──→ Reserve collateral (Flare) ──→ Send XRP to agent (XRPL) ──→ FDC verifies ──→ FXRP minted (Flare)
REDEEM: FXRP (Flare) ──→ Burn FXRP (Flare) ──→ Agent sends XRP (XRPL) ──→ XRP received

Prerequisites

npm install ethers xrpl

You need:

  • Flare wallet (encrypted keystore) with FLR for gas + collateral reservation fee
  • XRPL wallet (created with create-xrpl-wallet.js) with XRP for minting

Commands

# Show parameters (lot size, fees)
node skills/fassets/scripts/fassets.js info

# List available minting agents
node skills/fassets/scripts/fassets.js agents

# Mint FXRP (full pipeline: reserve → send XRP → wait for mint)
node skills/fassets/scripts/fassets.js mint --lots 1

# Redeem FXRP → XRP
node skills/fassets/scripts/fassets.js redeem --lots 1 --xrpl-address rXXX...

# Check XRPL balance and recent transactions
node skills/fassets/scripts/fassets.js status --xrpl-address rXXX...

# Create XRPL wallet (prerequisite for minting)
node skills/wallet/scripts/create-xrpl-wallet.js --save ~/.secrets/xrpl-wallet.json

Contracts

ContractAddressPurpose
FXRP Token0xAd552A648C74D49E10027AB8a618A3ad4901c5bEERC-20 FAsset token (6 decimals)
AssetManager0x2a3Fe068cD92178554cabcf7c95ADf49B4B0B6A8Mint/redeem controller
AssetManagerController0x097B93eEBe9b76f2611e1E7D9665a9d7Ff5280B3System controller

Key Parameters

ParameterValue
Lot Size10 FXRP (= 10 XRP)
Decimals6
Reservation Fee~0.15 FLR per lot
Minting Fee~0.1% (paid in XRP, added to lot)
Redemption Fee~0.2% (deducted from XRP received)
Minting Time5-20 minutes (FDC verification)
Redemption TimeUsually < 5 minutes

Minting Flow (Detailed)

  1. Reserve Collateral — Call reserveCollateral() on AssetManager with FLR fee
    • Returns: agent's XRPL address, amount to send, payment reference, deadline
  2. Send XRP — Send exact amount to agent's XRPL address with payment reference in memo
    • XRPL account needs 10 XRP reserve + minting amount + agent fee
  3. FDC Verification — Flare Data Connector verifies the XRPL payment (automatic, 5-20 min)
  4. Minting Execution — Agent/executor calls executeMinting() with FDC proof
    • FXRP is minted to the original minter's Flare address

Redemption Flow

  1. Approve FXRP spending to AssetManager (one-time)
  2. Call redeem(lots, xrplAddress, executor) — burns FXRP
  3. Wait — Agent sends XRP to your XRPL address (usually < 5 min)
  4. Receive XRP minus redemption fee

Important Notes

  • All operations are in lots (1 lot = 10 FXRP = 10 XRP)
  • XRPL addresses don't need to be pre-activated — incoming ≥10 XRP activates them
  • The payment reference (memo) is critical — without it the agent can't match the payment
  • The executor parameter can be address(0) — the agent's own executor typically handles it
  • First reservation that goes unpaid will time out and release collateral (CRF is lost)

Example: Full Round Trip

# 1. Create XRPL wallet
node skills/wallet/scripts/create-xrpl-wallet.js --save ~/.secrets/xrpl-wallet.json

# 2. Fund XRPL wallet with XRP (need ≥20 XRP: 10 reserve + 10 to mint)

# 3. Mint 1 lot (10 FXRP)
node skills/fassets/scripts/fassets.js mint --lots 1
# → Reserves collateral, sends XRP, waits for FXRP to arrive

# 4. Use FXRP in DeFi (swap, LP, etc.)

# 5. Redeem back to XRP
node skills/fassets/scripts/fassets.js redeem --lots 1 --xrpl-address rXXX...
# → Burns FXRP, agent sends XRP within minutes

Dependencies

npm install ethers xrpl

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.