dash-platform-sdk
    Preparing search index...

    Class PlatformAddressesController

    Index

    Constructors

    Methods

    • Helper function for creating {StateTransitionWASM} for Platform Address transitions

      Unlike identity transitions (which are signed after construction), address transitions carry their signature material as constructor input (the inputWitness param, and a signature setter on the asset-lock variant), so this builder is pure and only assembles the transition from already-built params - producing witnesses stays the caller's responsibility.

      Please refer to PlatformAddress.spec.ts or README for example commands

      Type Parameters

      • K extends keyof PlatformAddressTransitionParamsMap

      Parameters

      • type: K

        {string} type of transition, must be a one of ('identityCreditTransferToAddresses' | 'identityCreateFromAddresses' | 'identityTopUpFromAddresses' | 'addressFundsTransfer' | 'addressFundingFromAssetLock' | 'addressCreditWithdrawal')

      • params: PlatformAddressTransitionParamsMap[K]

        {PlatformAddressTransitionParamsMap[K]} params required by that transition type

      Returns StateTransitionWASM

    • Makes a query for a branch chunk of the address funds tree at the given key and depth, anchored to the checkpoint height returned by the trunk state query

      The branch proof carries no root hash of its own - it is verified against expectedRootHash, the hash the parent trunk (or branch) reported for this key via its leaf info

      Parameters

      • key: Uint8Array

        {Uint8Array} key that was navigated to in the tree

      • depth: number

        {number} depth of the branch to return

      • checkpointHeight: bigint

        {bigint} block height from the trunk response metadata

      • expectedRootHash: Uint8Array

        {Uint8Array} hash reported for this key by the parent trunk or branch

      Returns Promise<VerifiedAddressesBranchState>

    • Makes a query for platform addresses infos, returns array with an object with address, balance and nonce

      Parameters

      • addresses: PlatformAddressLike[]

        {PlatformAddressLike[]}

      Returns Promise<PlatformAddressInfo[]>

    • Makes a query for the trunk chunk of the address funds tree, used as the entry point for client-side sync of the address funds state

      Returns the verified trunk state (elements, leaf keys and helpers for descending into branches) along with the response metadata, whose height is the checkpoint height for subsequent branch queries

      Returns Promise<PlatformAddressesTrunkState>

    • Makes a query for platform address info, returns an object with address, balance and nonce

      Parameters

      • address: PlatformAddressLike

        {PlatformAddressLike}

      Returns Promise<PlatformAddressInfo>

    • Makes a query for recent address balance changes starting from the given block height, returns an array of per-block change sets

      Parameters

      • startHeight: bigint

        {bigint} block height to start from

      • startHeightExclusive: boolean = false

        {boolean} [startHeightExclusive=false] use exclusive start (RangeAfter) instead of inclusive (RangeFrom)

      Returns Promise<BlockAddressBalanceChanges[]>

    • Makes a query for recent compacted address balance changes starting from the given block height, returns an array of compacted (block range) change sets

      Parameters

      • startBlockHeight: bigint

        {bigint} block height to start from

      Returns Promise<CompactedBlockAddressBalanceChanges[]>