Class TransactionAPI

TransactionAPI is a class extending the BaseAPI class, providing methods for interacting with transactions and vault transactions. It includes methods for getting a single transaction or vault transaction and for getting multiple transactions or vault transactions with optional parameters for more specific queries.

Hierarchy

  • BaseAPI
    • TransactionAPI

Constructors

Properties

premia: Premia

Methods

  • Get a single transaction given its hash.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • hash: string

      The hash of the transaction to retrieve.

    Returns Promise<Transaction>

    A promise that resolves to the requested transaction.

  • Get a list of transactions with optional filter, search, order, and pagination parameters.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • filter: string

      The filter for the transaction search. (all, add, remove)

    • search: string

      The search query.

    • Optional orderBy: string = 'timestamp'

      The attribute by which to order the transactions.

    • Optional order: string = 'asc'

      The order in which to return the transactions (asc, desc).

    • Optional first: number = 100

      The maximum number of transactions to return.

    • Optional skip: number = 0

      The number of transactions to skip.

    • Optional type: string

      The type of transactions to return. (token, vault)

    • Optional poolAddress: string
    • Optional account: string

      The account associated with the transactions to return.

    • Optional startTime: number

      The start time for the transactions to return.

    • Optional endTime: number

      The end time for the transactions to return.

    • Optional searchInput: string

      An additional search input.

    Returns Promise<Transaction[]>

    A promise that resolves to a list of transactions.

  • Get a single vault transaction given its hash.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • hash: string

      The hash of the vault transaction to retrieve.

    Returns Promise<VaultTransaction>

    A promise that resolves to the requested vault transaction.

  • Get a list of vault transactions with optional filter, search, order, and pagination parameters.

    Remark

    Uses caching with a one-minute time-to-live.

    Parameters

    • filter: string

      The filter for the vault transaction search. (all, add, remove)

    • search: string

      The search query.

    • Optional orderBy: string = 'timestamp'

      The attribute by which to order the vault transactions.

    • Optional order: string = 'asc'

      The order in which to return the vault transactions (asc, desc).

    • Optional first: number = 100

      The maximum number of vault transactions to return.

    • Optional skip: number = 0

      The number of vault transactions to skip.

    • Optional type: string

      The type of vault transactions to return.

    • Optional vaultAddress: string

      The address of the vault associated with the vault transactions to return.

    • Optional account: string

      The account associated with the vault transactions to return.

    • Optional startTime: number

      The start time for the vault transactions to return.

    • Optional endTime: number

      The end time for the vault transactions to return.

    • Optional searchInput: string

      An additional search input.

    Returns Promise<VaultTransaction[]>

    A promise that resolves to a list of vault transactions.

Generated using TypeDoc