Class LookupApplicationLogs

Base abstract class for JSON requests.

Data: The type returned from the do() method

Body: The structure of the response's body

Hierarchy

Constructors - GET

Properties

Methods - JSONRequest

Methods - Other

Methods - query

GET Constructors

Properties

intDecoding: IntDecoding
query: Record<string, any>

JSONRequest Methods

  • Execute the request.

    Returns

    A promise which resolves to the response data.

    Parameters

    • headers: Record<string, any> = {}

      Additional headers to send in the request. Optional.

    Returns Promise<Record<string, any>>

  • Prepare a JSON response before returning it.

    Use this method to change and restructure response data as needed after receiving it from the do() method.

    Parameters

    • body: Uint8Array | Record<string, any>

      Response body received

    Returns Record<string, any>

  • Configure how integers in this request's JSON response will be decoded.

    The options are:

    • "default": Integers will be decoded according to JSON.parse, meaning they will all be Numbers and any values greater than Number.MAX_SAFE_INTEGER will lose precision.
    • "safe": All integers will be decoded as Numbers, but if any values are greater than Number.MAX_SAFE_INTEGER an error will be thrown.
    • "mixed": Integers will be decoded as Numbers if they are less than or equal to Number.MAX_SAFE_INTEGER, otherwise they will be decoded as BigInts.
    • "bigint": All integers will be decoded as BigInts.

    Parameters

    • method: IntDecoding

      The method to use when parsing the response for this request. Must be one of "default", "safe", "mixed", or "bigint".

    Returns LookupApplicationLogs

Other Methods

  • Limit results for pagination.

    Example

    const maxResults = 20;
    const appLogs = await indexerClient
    .lookupApplicationLogs(appId)
    .limit(maxResults)
    .do();

    Parameters

    • limit: number

      maximum number of results to return.

    Returns LookupApplicationLogs

  • Returns

    /v2/applications/${appID}/logs

    Returns string

query Methods

  • Include results at or before the specified max-round.

    Example

    const maxRound = 18309917;
    const appLogs = await indexerClient
    .lookupApplicationLogs(appId)
    .maxRound(maxRound)
    .do();

    Parameters

    • round: number

    Returns LookupApplicationLogs

  • Include results at or after the specified min-round.

    Example

    const minRound = 18309917;
    const appLogs = await indexerClient
    .lookupApplicationLogs(appId)
    .minRound(minRound)
    .do();

    Parameters

    • round: number

    Returns LookupApplicationLogs

  • The next page of results.

    Example

    const maxResults = 25;

    const appLogsPage1 = await indexerClient
    .lookupApplicationLogs(appId)
    .limit(maxResults)
    .do();

    const appLogsPage2 = await indexerClient
    .lookupApplicationLogs(appId)
    .limit(maxResults)
    .nextToken(appLogsPage1["next-token"])
    .do();

    Parameters

    • nextToken: string

      provided by the previous results.

    Returns LookupApplicationLogs

  • Only include transactions with this sender address.

    Example

    const sender = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
    const appLogs = await indexerClient
    .lookupApplicationLogs(appId)
    .sender(sender)
    .do();

    Parameters

    • senderAddress: string

    Returns LookupApplicationLogs

  • Lookup the specific transaction by ID.

    Example

    const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
    const appLogs = await indexerClient
    .lookupApplicationLogs(appId)
    .txid(txId)
    .do();

    Parameters

    • txid: string

    Returns LookupApplicationLogs

Generated using TypeDoc