dash-platform-sdk
    Preparing search index...

    Class TokensController

    Tokens controller for requesting information about tokens and tokens holders

    Index

    Methods

    • Creates a Token Base Transition that contains base information about token transition

      Parameters

      • tokenId: IdentifierLike

        {IdentifierLike} - token identifier

      • ownerId: IdentifierLike

        {IdentifierLike} - identity identifier of sender of the transaction

      Returns Promise<TokenBaseTransitionWASM>

    • Helper function for creation of a token state transition to be broadcasted in the network

      You have to pass token base transition acquired from .createBaseTransition() method together with token transition type and its params

      Parameters

      • base: TokenBaseTransitionWASM

        {TokenBaseTransitionWASM} - token Base transition

      • ownerId: IdentifierLike

        {IdentifierLike} - identity identifier of the owner of the transaction

      • type: TokenTransitionType

        {TokenTransitionType} - token transition type as string (f.e. 'transfer')

      • params: TokenTransitionParams

        {TokenTransitionParams} - params required for a token transition

      Returns StateTransitionWASM

    • Retrieves a token balances for identities

      Parameters

      • identifiers: IdentifierLike[]

        {IdentifierLike[]} - list of identifiers which balance we need to get

      • tokenIdentifier: IdentifierLike

        {IdentifierLike} - token identifier

      Returns Promise<IdentitiesTokenBalances[]>

    • Retrieves a tokens balances for identity

      Parameters

      • identifier: IdentifierLike

        {IdentifierLike} - identifier which balance we need to get

      • tokenIdentifiers: IdentifierLike[]

        {IdentifierLike[]} - list of tokens ids which used in request

      Returns Promise<IdentityTokenBalances[]>

    • Retrieves a tokens contract info by id

      Parameters

      • tokenIdentifier: IdentifierLike

        {IdentifierLike} - token id which contract info we need

      Returns Promise<TokenContractInfo>

    • Retrieves a token total supply

      Parameters

      • tokenIdentifier: IdentifierLike

        {IdentifierLike} - token id which total supply we need

      Returns Promise<TokenTotalSupply>