Skip to content

Support NFTs as NFT minter and assigned-owner identities #434

Description

@Rigidity

Motivation

The action system currently treats a non-XCH NFT mint parent and a non-empty NFT current_owner as a DID:

  • MintNftAction resolves parent_id only from Spends::dids.
  • TransferNftById resolves its assigned identity only from Spends::dids and builds the concurrent assignment announcements from that DID spend.

XCHandles NFTs are useful on-chain identities in their own right. Wallets should be able to use an owned NFT launcher as the minter of a new NFT or as another NFT's assigned owner without reimplementing action-system spend composition.

Scope

  • Generalize the identity input used by NFT mint and transfer actions so it can resolve a spendable DID or NFT.
  • Allow an NFT spend to:
    • parent a newly launched NFT, making the parent NFT launcher the assigned minter;
    • emit/assert the required concurrent announcements when its launcher is assigned as another NFT's current_owner.
  • Preserve the existing DID-oriented helpers and behavior for source compatibility.
  • Add explicit generic/NFT helpers or typed identity selection so callers do not rely on ambiguous lookup order.
  • Reject unsupported singleton kinds and attempts to use missing or already-spent identities with a clear driver error.

Acceptance criteria

  • An NFT can mint a child NFT through the high-level action system.
  • An NFT can be assigned as another NFT's current_owner through the high-level action system.
  • Existing DID mint/assignment APIs and tests remain compatible.
  • Simulator tests cover ordinary NFTs and XCHandles-compatible NFT metadata.
  • Tests cover chained NFT ownership, missing identity assets, and concurrent spend announcements.
  • Public API docs explain that the stored identity is a singleton launcher ID, despite the historical DID-oriented naming.

Downstream

This unblocks generic NFT identity support in Sage while allowing Sage's initial UI to limit choices to active, verified XCHandles NFTs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions