Class for managing transaction stages.

Constructors

Properties

chainAttributes: Record<string, ChainAttributes>
thorchainCache: ThorchainCache

Methods

  • Returns the current block height of an asset's native chain.

    Parameters

    • asset: Asset

      Asset for which block height is needed.

    Returns Promise<number>

    Block height.

  • Converts block height to date.

    Parameters

    • chain: string

      Input chain.

    • txData: TxSignersResponse

      Transaction response data.

    • Optional outboundBlock: number

    Returns Promise<Date>

    Date object.

  • Checks the progress of an add liquidity pool transaction.

    Parameters

    • txData: TxSignersResponse

      Transaction details response.

    • progress: TXProgress

      Transaction progress object.

    Returns Promise<void>

  • Checks the progress of a withdraw liquidity pool transaction.

    Parameters

    • txData: TxSignersResponse

      Transaction details response.

    • progress: TXProgress

      Transaction progress object.

    Returns Promise<void>

  • Checks the progress of a withdraw saver transaction.

    Parameters

    • txData: TxSignersResponse

      Transaction details response.

    • progress: TXProgress

      Transaction progress object.

    Returns Promise<void>

  • Retrieves a CryptoAmount object.

    Parameters

    • baseAmt: string

      Base amount.

    • asset: Asset

      Asset object.

    Returns Promise<CryptoAmount>

    Promise - CryptoAmount object.

  • Parses the memo of an add liquidity pool transaction.

    Parameters

    • memo: string

      Memo string of the transaction.

    Returns {
        action: string;
        affiliateAddress: undefined | string;
        affiliateFee: undefined | string;
        asset: string;
        pairedAddress: undefined | string;
    }

    Parsed memo fields.

    • action: string
    • affiliateAddress: undefined | string
    • affiliateFee: undefined | string
    • asset: string
    • pairedAddress: undefined | string
  • Parses swap memo to extract relevant fields.

    Parameters

    • memo: string

      Transaction memo.

    Returns {
        action: string;
        affiliateAddress: undefined | string;
        affiliateFee: undefined | string;
        asset: string;
        destAddress: string;
        limit: undefined | string;
    }

    Parsed swap memo fields.

    • action: string
    • affiliateAddress: undefined | string
    • affiliateFee: undefined | string
    • asset: string
    • destAddress: string
    • limit: undefined | string
  • Parses the memo of a withdraw liquidity pool transaction.

    Parameters

    • memo: string

      Memo string of the transaction.

    Returns {
        action: string;
        affiliateAddress: undefined | string;
        affiliateFee: undefined | string;
        asset: string;
        pairedAddress: undefined | string;
    }

    Parsed memo fields.

    • action: string
    • affiliateAddress: undefined | string
    • affiliateFee: undefined | string
    • asset: string
    • pairedAddress: undefined | string

Generated using TypeDoc