Options
All
  • Public
  • Public/Protected
  • All
Menu

User wallet interface describes 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

composeEthTransaction

  • composeEthTransaction(fromAccountId: string, gasPrice: Decimal, gasLimit: number, destinationAddress: string | null, amount: Decimal | null, data?: string | null, nonce?: number | null, 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 | null

      destination wallet address

    • amount: Decimal | null

      amount in ETH

    • Default value data: string | null = null

      data in string format or null (defaults to null)

    • Default value nonce: number | null = null

      next transaction nonce or null (defaults to null)

    • Default value sendMax: boolean = false

      send maximum possible funds to destination (defaults to false)

    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

    • exchangeSetting: ExchangeSetting

      Zumo exchange setting obtained from ZumoKit state

    • amount: Decimal | null

      amount in deposit account currency

    • Default value sendMax: boolean = false

      exchange maximum possible funds (defaults to false)

    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 (defaults to false)

    Returns Promise<ComposedTransaction>

composeTransaction

  • composeTransaction(fromAccountId: string, changeAccountId: string, destinationAddress: string, amount: Decimal | null, feeRate: Decimal, sendMax?: boolean): Promise<ComposedTransaction>
  • Compose BTC or BSV 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 or BSV

    • feeRate: Decimal

      fee rate in satoshis/byte

    • Default value sendMax: boolean = false

      send maximum possible funds to destination (defaults to false)

    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 (defaults to false)

    Returns Promise<ComposedTransaction>

submitExchange

submitTransaction

Legend

  • Property
  • Method
  • Inherited property
  • Static property

Generated using TypeDoc