Trait orml_traits::nft::NFT[][src]

pub trait NFT<AccountId> {
    type ClassId: Default + Copy;
    type TokenId: Default + Copy;
    type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default;
    fn balance(who: &AccountId) -> Self::Balance;
fn owner(token: (Self::ClassId, Self::TokenId)) -> Option<AccountId>;
fn transfer(
        from: &AccountId,
        to: &AccountId,
        token: (Self::ClassId, Self::TokenId)
    ) -> DispatchResult; }
Expand description

Abstraction over a non-fungible token system.

Associated Types

The NFT class identifier.

The NFT token identifier.

The balance of account.

Required methods

The number of NFTs assigned to who.

The owner of the given token ID. Returns None if the token does not exist.

Transfer the given token ID from one account to another.

Implementors