Options
All
  • Public
  • Public/Protected
  • All
Menu

User wallet provides methods for transfer and exchange of fiat and cryptocurrency funds. Sending a transaction or making an exchange is a two step process. First a transaction or exchange has to be composed via one of the compose methods, then ComposedTransaction or ComposedExchange can be submitted.

User wallet instance can be obtained by creating, unlocking or recovering user wallet.

See User.

Hierarchy

  • Wallet

Index

Methods

composeBtcTransaction

  • composeBtcTransaction(fromAccountId: string, changeAccountId: string, destinationAddress: string, amount: Decimal | null, feeRate: Decimal, sendMax?: boolean): Promise<ComposedTransaction>
  • Compose Bitcoin transaction asynchronously. Refer to Send Transactions guide for usage details.

    Parameters

    • fromAccountId: string

      Account identifier

    • changeAccountId: string

      change Account identifier, which can be the same as fromAccountId

    • destinationAddress: string

      destination wallet address

    • amount: Decimal | null

      amount in BTC

    • feeRate: Decimal

      fee rate in satoshis/byte

    • Default value sendMax: boolean = false

      send maximum possible funds to destination

    Returns Promise<ComposedTransaction>

composeEthTransaction

  • composeEthTransaction(fromAccountId: string, gasPrice: Decimal, gasLimit: number, destinationAddress: string, amount: Decimal | null, data: string | null, nonce: number, sendMax?: boolean): Promise<ComposedTransaction>
  • Compose Ethereum transaction asynchronously. Refer to Send Transactions guide for usage details.

    Parameters

    • fromAccountId: string

      Account identifier

    • gasPrice: Decimal

      gas price in gwei

    • gasLimit: number

      gas limit

    • destinationAddress: string

      destination wallet address

    • amount: Decimal | null

      amount in ETH

    • data: string | null

      data in string format or null

    • nonce: number

      next transaction nonce or null

    • Default value sendMax: boolean = false

      send maximum possible funds to destination

    Returns Promise<ComposedTransaction>

composeExchange

  • Compose exchange asynchronously. Refer to Make Exchanges guide for usage details.

    Parameters

    • fromAccountId: string

      Account identifier

    • toAccountId: string

      Account identifier

    • exchangeRate: ExchangeRate

      Zumo exchange rate obtained from ZumoKit state

    • exchangeSettings: ExchangeSettings

      Zumo exchange settings obtained from ZumoKit state

    • amount: Decimal | null

      amount in deposit account currency

    • Default value sendMax: boolean = false

      exchange maximum possible funds

    Returns Promise<ComposedExchange>

composeInternalFiatTransaction

  • composeInternalFiatTransaction(fromAccountId: string, toAccountId: string, amount: Decimal | null, sendMax?: boolean): Promise<ComposedTransaction>
  • Compose fiat transaction between users in Zumo ecosystem asynchronously. Refer to Send Transactions guide for usage details.

    Parameters

    • fromAccountId: string

      Account identifier

    • toAccountId: string

      Account identifier

    • amount: Decimal | null

      amount in source account currency

    • Default value sendMax: boolean = false

      send maximum possible funds to destination

    Returns Promise<ComposedTransaction>

composeTransactionToNominatedAccount

  • composeTransactionToNominatedAccount(fromAccountId: string, amount: Decimal | null, sendMax?: boolean): Promise<ComposedTransaction>
  • Compose transaction to nominated account asynchronously. Refer to Send Transactions guide for usage details.

    Parameters

    • fromAccountId: string

      Account identifier

    • amount: Decimal | null

      amount in source account currency

    • Default value sendMax: boolean = false

      send maximum possible funds to destination

    Returns Promise<ComposedTransaction>

submitExchange

submitTransaction

Legend

  • Property
  • Method
  • Private property
  • Private method
  • Property
  • Inherited property
  • Static property

Generated using TypeDoc