A representation of a Fund Operation.

Constructors

Properties

asset: null | Asset = null
Status: {
    TERMINAL_STATES: Set<string>;
} = ...

Fund Operation status constants.

Type declaration

  • Readonly TERMINAL_STATES: Set<string>

Methods

  • Check if the operation is in a terminal state.

    Returns boolean

    True if the operation is in a terminal state, false otherwise

  • Wait for the fund operation to complete.

    Parameters

    • options: {
          intervalSeconds: undefined | number;
          timeoutSeconds: undefined | number;
      } = {}

      Options for waiting

      • intervalSeconds: undefined | number

        The interval between checks in seconds

      • timeoutSeconds: undefined | number

        The timeout in seconds

    Returns Promise<FundOperation>

    The completed fund operation

    Throws

    If the operation takes too long

  • Create a new Fund Operation.

    Parameters

    • walletId: string

      The Wallet ID

    • addressId: string

      The Address ID

    • amount: Decimal

      The amount of the Asset

    • assetId: string

      The Asset ID

    • networkId: string

      The Network ID

    • Optional quote: FundQuote

      Optional Fund Quote

    Returns Promise<FundOperation>

    The new FundOperation object