home / skills / openclaw / skills / sage-nft

This skill helps you manage Sage NFT operations by listing, minting, transferring, and updating URIs and visibility across collections.

npx playbooks add skill openclaw/skills --skill sage-nft

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.4 KB
---
name: sage-nft
description: Sage NFT operations. List NFTs and collections, mint NFTs, transfer, add URIs, assign to DIDs, manage visibility.
---

# Sage NFTs

NFT operations for Chia NFT1 standard.

## Endpoints

### Query NFTs

| Endpoint | Payload | Description |
|----------|---------|-------------|
| `get_nfts` | See below | List NFTs with filters |
| `get_nft` | `{"nft_id": "nft1..."}` | Get NFT details |
| `get_nft_icon` | `{"nft_id": "nft1..."}` | Get icon (base64) |
| `get_nft_thumbnail` | `{"nft_id": "nft1..."}` | Get thumbnail (base64) |
| `get_nft_data` | `{"nft_id": "nft1..."}` | Get raw data |

#### get_nfts Payload

```json
{
  "collection_id": null,
  "minter_did_id": null,
  "owner_did_id": null,
  "name": null,
  "offset": 0,
  "limit": 50,
  "sort_mode": "recent",
  "include_hidden": false
}
```

Sort modes: `"name"`, `"recent"`

### Collections

| Endpoint | Payload | Description |
|----------|---------|-------------|
| `get_nft_collections` | `{"offset": 0, "limit": 50, "include_hidden": false}` | List collections |
| `get_nft_collection` | `{"collection_id": "col1..."}` | Get collection |
| `update_nft_collection` | `{"collection_id": "col1...", "visible": true}` | Update visibility |

### Mint NFTs

```json
{
  "mints": [
    {
      "address": null,
      "edition_number": 1,
      "edition_total": 100,
      "data_hash": "0x...",
      "data_uris": ["https://..."],
      "metadata_hash": "0x...",
      "metadata_uris": ["https://..."],
      "license_hash": null,
      "license_uris": [],
      "royalty_address": "xch1...",
      "royalty_ten_thousandths": 300
    }
  ],
  "did_id": "did:chia:...",
  "fee": "100000000",
  "auto_submit": true
}
```

Response includes `nft_ids` array.

### Transfer & Manage

| Endpoint | Payload | Description |
|----------|---------|-------------|
| `transfer_nfts` | `{"nft_ids": [...], "address": "xch1...", "fee": "...", "auto_submit": true}` | Transfer |
| `add_nft_uri` | `{"nft_id": "...", "uri": "https://...", "kind": "data", "fee": "..."}` | Add URI |
| `assign_nfts_to_did` | `{"nft_ids": [...], "did_id": "did:chia:...", "fee": "..."}` | Assign to DID |
| `update_nft` | `{"nft_id": "...", "visible": true}` | Update visibility |
| `redownload_nft` | `{"nft_id": "..."}` | Re-fetch data |

URI kinds: `"data"`, `"metadata"`, `"license"`

## NFT Record Structure

```json
{
  "nft_id": "nft1...",
  "launcher_id": "0x...",
  "collection_id": "col1...",
  "owner_did_id": "did:chia:...",
  "minter_did_id": "did:chia:...",
  "name": "My NFT",
  "description": "...",
  "data_uris": ["https://..."],
  "metadata_uris": ["https://..."],
  "royalty_address": "xch1...",
  "royalty_ten_thousandths": 300,
  "visible": true
}
```

## Examples

```bash
# List NFTs
sage_rpc get_nfts '{"limit": 20, "sort_mode": "recent"}'

# Mint NFT
sage_rpc bulk_mint_nfts '{
  "mints": [{
    "data_uris": ["ipfs://Qm..."],
    "data_hash": "0xabc...",
    "metadata_uris": ["ipfs://Qm..."],
    "metadata_hash": "0xdef...",
    "royalty_ten_thousandths": 500
  }],
  "did_id": "did:chia:1abc...",
  "fee": "100000000",
  "auto_submit": true
}'

# Transfer NFT
sage_rpc transfer_nfts '{
  "nft_ids": ["nft1abc..."],
  "address": "xch1recipient...",
  "fee": "100000000",
  "auto_submit": true
}'
```

## Notes

- Royalty is in ten-thousandths: 300 = 3%, 500 = 5%
- `did_id: null` in `assign_nfts_to_did` unassigns from DID
- Minting requires a DID for provenance

Overview

This skill provides a complete set of Sage NFT operations for the Chia NFT1 standard. It lets you list and inspect NFTs and collections, mint new NFTs in bulk, transfer tokens, add URIs, assign or unassign NFTs to DIDs, and manage visibility. The skill returns structured NFT records and supports image retrieval (icon/thumbnail) as base64.

How this skill works

The skill exposes RPC endpoints to query NFTs and collections with filters and pagination, perform bulk minting with provenance via DIDs, and submit transactions for transfers and URI updates. Minting and transfer endpoints accept fee and auto_submit flags so you can preview or broadcast transactions. NFT records include launcher, collection, owner/minter DIDs, URIs, royalty settings, and visibility state.

When to use it

  • When you need to list or filter NFTs and collections with pagination and sort modes.
  • When minting multiple NFTs with metadata, data URIs, and royalty settings tied to a DID.
  • When transferring NFTs to another address or reassigning ownership to a DID.
  • When adding or updating data, metadata, or license URIs after minting.
  • When toggling visibility of NFTs or collections for catalog management.

Best practices

  • Always include a valid DID when minting to ensure provenance and traceability.
  • Set royalty_ten_thousandths correctly (e.g., 300 = 3%) and verify royalty_address before minting.
  • Use auto_submit=false to build and review transactions before broadcasting in production flows.
  • Paginate queries with offset/limit to avoid large result sets and reduce latency.
  • Store returned nft_ids from mint responses for follow-up operations like transfers or URI additions.

Example use cases

  • Bulk mint a collection: create editions with data_uris and metadata_uris, set edition totals and royalties, and mint tied to a collection DID.
  • Catalog management: list collections, update collection visibility, and hide obsolete NFTs from public listings.
  • Post-mint content updates: add additional data or license URIs to an existing NFT record after rehosting assets.
  • Ownership changes: transfer multiple NFTs to a recipient address with a configurable fee and auto_submit option.
  • DID management: assign or unassign NFTs to/from a DID to reflect provenance or custodial changes.

FAQ

How are royalties specified?

Royalties use ten-thousandths; 300 equals 3%. Provide royalty_address and royalty_ten_thousandths in the mint payload.

Can I remove a DID assignment?

Yes. Use assign_nfts_to_did with did_id set to null to unassign NFTs from a DID.