Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Balance

Index

Functions

  • name

    balancesTransfer

    summary

    Transfers some liquid free balance to another account.

    Parameters

    • 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.BalancesTransferEvent>

    BalancesTransferEvent Blockchain event.

  • name

    balancesTransferAll

    summary

    Transfers the entire transferable balance from the caller account.

    Parameters

    • to: string

      Public address of the account to transfer the amount to.

    • keepAlive: boolean = true

      Ensure that the transfer does not kill the account, it retains the Existential Deposit.

    • 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.BalancesTransferEvent>

    BalancesTransferEvent Blockchain event.

  • balancesTransferAllTx(to: string, keepAlive?: boolean): Promise<`0x${string}`>
  • name

    balancesTransferAllTx

    summary

    Creates an unsigned unsubmitted Balance-TransfertAll Transaction Hash.

    Parameters

    • to: string

      Public address of the account to transfer the amount to.

    • keepAlive: boolean = true

      Ensure that the transfer does not kill the account, it retains the Existential Deposit.

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

    Unsigned unsubmitted Balance-TransfertAll Transaction Hash. The Hash is only valid for 5 minutes.

  • name

    balancesTransferKeepAlive

    summary

    Transfers some liquid free balance to another account with a check that the transfer will not kill the origin account.

    Parameters

    • 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.BalancesTransferEvent>

    BalancesTransferEvent Blockchain event.

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

    balancesTransferKeepAliveTx

    summary

    Creates an unsigned unsubmitted Balance-TransfertKeepAlive Transaction Hash.

    Parameters

    • 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 Balance-TransfertKeepAlive Transaction Hash. The Hash is only valid for 5 minutes.

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

    balancesTransferTx

    summary

    Creates an unsigned unsubmitted Balance-Transfert Transaction Hash.

    Parameters

    • 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 Balance-Transfert Transaction Hash. The Hash is only valid for 5 minutes.

  • checkBalanceForTransfer(address: string, value: number | BN): Promise<boolean>
  • name

    checkBalanceForTransfer

    summary

    Check if an account as enough funds to ensure a transfer.

    Parameters

    • address: string

      Public address of the account to check balance for transfer.

    • value: number | BN

      Token amount to check before transfer.

    Returns Promise<boolean>

  • getBalances(address: string): Promise<{ feeFrozen: BN; free: BN; miscFrozen: BN; reserved: BN }>
  • name

    getBalances

    summary

    Get the balances of an account including free, reserved, miscFrozen and feeFrozen balances as well as the total.

    Parameters

    • address: string

      Public address of the account to get balances.

    Returns Promise<{ feeFrozen: BN; free: BN; miscFrozen: BN; reserved: BN }>

    The balances of the account.

  • getTotalBalance(address: string): Promise<BN>
  • name

    getTotalBalance

    summary

    Get the total balance of an account (free & reserve balances)

    Parameters

    • address: string

      Public address of the account to get total balance for.

    Returns Promise<BN>

    The total balance of an account (free & reserve balances)

  • getTransferrableBalance(address: string): Promise<BN>
  • name

    getTransferrableBalance

    summary

    Get the transferrable balance of an account.

    Parameters

    • address: string

      Public address of the account to get transferrable balance for.

    Returns Promise<BN>

    The transferrable balance of an account.

Generated using TypeDoc