Options
All
  • Public
  • Public/Protected
  • All
Menu

User wallet interface describes methods for transfer and exchange of fiat and cryptocurrency funds.

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

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.

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>

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>

Legend

  • Property
  • Method
  • Inherited property
  • Static property

Generated using TypeDoc