sigil-node · executor_nft
Source declarations, signatures and documentation for executor_nft.
Source: sigil/node/sigil-node/src/executor_nft.rs. SHA-256: 0eea42880ceed5cb3cb02a03c3cfa94acaaf939614091de60ac280e79d772da3.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
executor_nft::execute_create_nft_collection
Create a new NFT collection on-chain.
The sender_did must match data.issuer_did (collections may only be
created by the issuer). Duplicate collection_ids are rejected.
pub fn execute_create_nft_collection(
sender_did: &str,
data: &CreateNftCollectionData,
fee: u64,
block_height: u64,
state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;Source line: 135.
executor_nft::execute_mint_nft
Mint a new NFT token into a collection.
Rules enforced:
- Collection must exist.
- Token id must not already exist in the collection (duplicate prevention).
- For identity collections:
identitybinding must be provided. - For identity collections: only one identity token per (subject_did, collection) is allowed.
max_supplyis respected if set on the collection policy.- Identity NFTs are always soulbound regardless of policy.
- Sender must be the collection issuer (or hold a mint-policy permission — simple issuer check used here; policy delegation is a future extension).
pub fn execute_mint_nft(
sender_did: &str,
data: &MintNftData,
fee: u64,
block_height: u64,
tx_hash: &SigilHash,
state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;Source line: 230.
executor_nft::execute_transfer_nft
Transfer an NFT from one owner to another.
Rules enforced (ERC-5192 / identity semantics):
- Token must exist.
- Current owner must match
data.from_didand sender must be the current owner. - Token must not be locked (
token.locked == false). - HMR / MHR / ENR identity tokens are always rejected, regardless of lock state.
- Agent identity tokens respect
token.locked.
pub fn execute_transfer_nft(
sender_did: &str,
data: &TransferNftData,
fee: u64,
block_height: u64,
tx_hash: &SigilHash,
state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;Source line: 437.
executor_nft::execute_burn_nft
Burn (destroy) an NFT.
ERC-5484 burn authorisation is enforced:
IssuerOnly:authorized_bymust be the collection'sissuer_did.OwnerOnly:authorized_bymust betoken.owner_did.Both: either issuer or owner.Neither: always rejected.
pub fn execute_burn_nft(
sender_did: &str,
data: &BurnNftData,
fee: u64,
block_height: u64,
tx_hash: &SigilHash,
state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;Source line: 587.
executor_nft::execute_set_nft_metadata
Update per-token metadata URI and/or hash (ERC-4906).
allow_metadata_updates must be true on the collection policy.
Only the collection controller may update metadata.
Emits a MetadataUpdate event with old and new URI/hash values.
pub fn execute_set_nft_metadata(
sender_did: &str,
data: &SetNftMetadataData,
fee: u64,
block_height: u64,
tx_hash: &SigilHash,
state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;Source line: 718.
executor_nft::execute_verify_identity_nft
Advance the verification level on an identity NFT.
Rules:
- Token must be in an identity collection.
new_verification_levelmust be strictly greater than the current level (monotonically increasing — cannot decrease).- Only the collection issuer may call this (the issuer is the authorised attester for v1; multi-party attestation is a future extension).
pub fn execute_verify_identity_nft(
sender_did: &str,
data: &VerifyIdentityNftData,
fee: u64,
block_height: u64,
tx_hash: &SigilHash,
state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;Source line: 854.