Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • NftApi

Index

Constructors

constructor

  • Parameters

    Returns NftApi

Properties

Private api

Methods

countAll

  • countAll(): Promise<number>
  • Count all NFTs

    Returns Promise<number>

    count of NFT definitions

countAllData

  • countAllData(): Promise<number>
  • Count all NFT data instances

    Returns Promise<number>

    count of NFT data instances

create

  • Create NFT

    Parameters

    • credentials: Credentials

      account credentials issuing the NFT

    • symbol: string

      NFT symbol

    • maxSupply: number

      NFT max supply

    • fixedMaxSupply: boolean

      NFT max supply is fixed and cannot be changed with update

    • description: string

      text description

    • definitions: NftDataType[]

      NFT model data definitions

    • transferable: boolean

      allow transfer of NFT data instances to other accounts

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<TransactionConfirmation>

    a transaction confirmation

createIssueOperation

  • Create NFT issue operation. Creates a NFT data instance.

    Type parameters

    Parameters

    • issuer: ChainObject

      NFT issuer

    • nft: NftRef

      NFT object id or symbol

    • to: ChainObject

      account object id receiving the NFT data instance

    • data: T

      data model with values

    • Optional memo: Memo

      optional message

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<NftIssueOperation>

    nft issue operation

createNftCreateOperation

  • Create NFT create operation

    Parameters

    • symbol: string

      NFT symbol

    • options: NftOptions

      NFT options

    • definitions: NftDataType[]

      NFT model data definitions

    • transferable: boolean

      allow transfer of NFT data instances to other accounts

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<NftCreateOperation>

    nft create operation

createTransferOperation

  • Create NFT data instance transfer operation

    Parameters

    • from: ChainObject

      NFT data instance owner account object id

    • to: ChainObject

      receiver account object id

    • id: ChainObject

      NFT data instance object id

    • Optional memo: Memo

      optional message

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<NftTransferOperation>

    nft transfer operation

createUpdateDataOperation

  • Create NFT data instance update operation

    Type parameters

    Parameters

    • modifier: ChainObject

      NFT data instance owner account object id, updatable values are set in [NftUpdateDataOperation.data] map

    • data: NftData<T>

      nft object model with data

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<NftUpdateDataOperation>

    nft update data operation

createUpdateDataOperationRaw

  • Create NFT data instance update operation

    Parameters

    • modifier: ChainObject

      NFT data instance owner account object id, updatable values are set in [NftUpdateDataOperation.data] map

    • id: ChainObject

      NFT data instance object id

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<NftUpdateDataOperation>

    nft update data operation

createUpdateOperation

  • Create NFT update operation. Fills model with actual values.

    Parameters

    • nft: NftRef

      NFT object id or symbol

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<NftUpdateOperation>

    nft update operation

get

  • Get NFT by id or symbol

    Parameters

    • nft: NftRef

      NFT object id or symbol

    Returns Promise<Nft>

    NFT object, or ObjectNotFoundError if none found

getAll

  • Get NFTs by id

    Parameters

    Returns Promise<Nft[]>

    NFT objects, or ObjectNotFoundError if none found

getAllBySymbol

  • getAllBySymbol(symbols: string[]): Promise<Nft[]>
  • Get NFTs by symbol

    Parameters

    • symbols: string[]

      NFT symbols

    Returns Promise<Nft[]>

    NFT objects, or ObjectNotFoundError if none found

getAllData

  • Get NFT data instances with registered model, use [DCoreApi.registerNft] to register nft model by object id, if the model is not registered, [RawNft] will be used

    Type parameters

    • T

    Parameters

    Returns Promise<Array<NftData<T>>>

    NFT data objects, or ObjectNotFoundError if none found

  • Get NFT data instances with registered model, use [DCoreApi.registerNft] to register nft model by object id, if the model is not registered, [RawNft] will be used

    Type parameters

    • T

    Parameters

    Returns Promise<Array<NftData<T>>>

    NFT data objects, or ObjectNotFoundError if none found

  • Type parameters

    • T

    Parameters

    Returns Promise<Array<NftData<T>>>

getAllDataRaw

  • Get NFT data instances with raw model

    Parameters

    Returns Promise<Array<NftData<RawNft>>>

    NFT data objects, or ObjectNotFoundError if none found

getData

  • Get NFT data instance with registered model, use [DCoreApi.registerNft] to register nft model by object id, if the model is not registered, [RawNft] will be used

    Type parameters

    • T

    Parameters

    Returns Promise<NftData<T>>

    NFT data objects, or ObjectNotFoundError if none found

  • Get NFT data instances with parsed model

    Type parameters

    • T

    Parameters

    Returns Promise<NftData<T>>

    NFT data objects, or ObjectNotFoundError if none found

  • Type parameters

    • T

    Parameters

    Returns Promise<NftData<T>>

getDataRaw

getNftBalances

  • Get NFT balances per account with registered model, use [DCoreApi.registerNfts] to register nft model by object id, if the model is not registered, [RawNft] will be used

    Type parameters

    • T

    Parameters

    • account: ChainObject

      account object id

    • Optional nftIds: ChainObject[]

      NFT object ids to filter, or empty list to fetch all

    Returns Promise<Array<NftData<T>>>

    NFT data instances

  • Get NFT balances per account with parsed model

    Type parameters

    • T

    Parameters

    • account: ChainObject

      account object id

    • Optional nftIds: ChainObject[]

      NFT object ids to filter, or empty list to fetch all

    • Optional model: Newable<T>

      NFT data object model

    Returns Promise<Array<NftData<T>>>

    NFT data instances

getNftBalancesRaw

  • Get NFT balances per account with raw model

    Parameters

    • account: ChainObject

      account object id

    • Default value nftIds: ChainObject[] = []

      NFT object ids to filter, or empty list to fetch all

    Returns Promise<Array<NftData<RawNft>>>

    NFT data instances with raw model

issue

  • Issue NFT. Creates a NFT data instance.

    Type parameters

    Parameters

    • credentials: Credentials

      NFT issuer credentials

    • nft: NftRef

      NFT object id or symbol

    • to: ChainObject

      account object id receiving the NFT data instance

    • data: T

      data model with values

    • Optional memo: Memo

      optional message

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<TransactionConfirmation>

    a transaction confirmation

listAllRelative

  • listAllRelative(lowerBound?: string, limit?: number): Promise<Nft[]>
  • Get NFTs alphabetically by symbol name

    Parameters

    • Default value lowerBound: string = ""

      lower bound of symbol names to retrieve

    • Default value limit: number = 100

      maximum number of NFTs to fetch (must not exceed 100)

    Returns Promise<Nft[]>

    the NFTs found

listDataByNft

  • Get NFT data instances with registered model, use [DCoreApi.registerNfts] to register nft model by object id, if the model is not registered, [RawNft] will be used

    Type parameters

    • T

    Parameters

    Returns Promise<Array<NftData<T>>>

    NFT data objects

  • Get NFT data instances with parsed model

    Type parameters

    • T

    Parameters

    Returns Promise<Array<NftData<T>>>

    NFT data objects

  • Type parameters

    • T

    Parameters

    Returns Promise<Array<NftData<T>>>

listDataByNftRaw

  • Get NFT data instances with raw model

    Parameters

    Returns Promise<Array<NftData<RawNft>>>

    NFT data objects

transfer

  • Transfer NFT data instance

    Parameters

    • credentials: Credentials

      NFT data instance owner credentials

    • to: ChainObject

      receiver account object id

    • id: ChainObject

      NFT data instance object id

    • Optional memo: Memo

      optional message

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<TransactionConfirmation>

    a transaction confirmation

update

  • Update NFT

    Parameters

    • credentials: Credentials

      issuer account credentials

    • nft: NftRef

      NFT object id or symbol

    • Optional maxSupply: undefined | number

      update max supply

    • Optional fixedMaxSupply: undefined | false | true

      update max supply is fixed

    • Optional description: undefined | string

      update text description

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<TransactionConfirmation>

    a transaction confirmation

updateData

  • Update NFT data instance

    Type parameters

    Parameters

    • credentials: Credentials

      NFT data instance credentials

    • data: NftData<T>

      nft data object with values to update

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<TransactionConfirmation>

    a transaction confirmation

updateDataRaw

  • Update NFT data instance

    Parameters

    • credentials: Credentials

      NFT data instance credentials

    • id: ChainObject

      NFT data instance object id

    • values: Map<string, any>

      map of field name to value which should be updated

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Promise<TransactionConfirmation>

    a transaction confirmation

Generated using TypeDoc