Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Assets

Index

Type aliases

AccountAssetDataType: { balance: string; extra: any; isFrozen: boolean; reason: any }

Type declaration

  • balance: string
  • extra: any
  • isFrozen: boolean
  • reason: any

Functions

  • name

    assetTransfer

    summary

    Transfers some balance to another account.

    Parameters

    • id: number

      ID of the Asset

    • to: string

      Public address of the account to transfer the amount to.

    • amount: number | BN

      Token amount to transfer.

    • keyring: IKeyringPair

      Account that will sign the transaction.

    • waitUntil: TernoaConstants.WaitUntil

      Execution trigger that can be set either to BlockInclusion or BlockFinalization.

    Returns Promise<TernoaEvents.AssetTransferredEvent>

    AssetTransferredEvent Blockchain event.

  • assetTransferTx(id: number, to: string, amount: number | BN): Promise<`0x${string}`>
  • name

    assetTransferTx

    summary

    Creates an unsigned unsubmitted Assets-Transfert Transaction Hash.

    Parameters

    • id: number

      ID of the Asset

    • to: string

      Public address of the account to transfer the amount to.

    • amount: number | BN

      Token amount to transfer.

    Returns Promise<`0x${string}`>

    Unsigned unsubmitted Assets-Transfert Transaction Hash. The Hash is only valid for 5 minutes.

  • getAccountAssetBalance(assetId: number, address: string): Promise<null | BN>
  • name

    getAssetBalance

    summary

    Get the balance of an account for a specific asset.

    Parameters

    • assetId: number

      The ID of the asset.

    • address: string

      Public address of the account to get balance.

    Returns Promise<null | BN>

    The balance of the account.

  • name

    getTotalAssetBalance

    summary

    The holdings of a specific account for a specific asset.

    Parameters

    • assetId: number

      The ID of the asset.

    • address: string

      Public address of the account to get balances.

    Returns Promise<null | Assets.AccountAssetDataType>

    The holdings/balance information of the account : balance, isFrozen: boolean, reason, extra

Generated using TypeDoc