@wharfkit/contract - v4.0.2
    Preparing search index...

    Class TableScopeCursor

    Hierarchy

    • TableCursor
      • TableScopeCursor
    Index
    • Create a new TableCursor instance.

      Parameters

      • args: TableCursorArgs
        • abi

          The ABI for the contract.

        • client

          The APIClient instance to use for API requests.

        • params

          The parameters to use for the table query.

        • maxRows

          The maximum number of rows to fetch.

      Returns TableScopeCursor

      A new TableCursor instance.

    abi: ABI

    The ABI for the contract this table belongs to

    client: APIClient

    The APIClient instance to use for API requests

    params: TableRowParamsTypes

    The parameters used for the v1/chain/get_table_rows call

    type: string

    The type of the table, as defined in the ABI

    • get nextkey(): string | TableIndexType | undefined

      Get the current next key value to use for the lower_bounds parameter in the next API request.

      Returns string | TableIndexType | undefined

    • Implements the async iterator protocol for the cursor.

      Returns AsyncGenerator<any, void, unknown>

      An iterator for all rows in the table.

    • Fetch all rows from the cursor by recursively calling next() until the end is reached.

      Returns Promise<any[]>

      A promise containing all rows for the cursor.

    • Build the query for the get_table_rows API endpoint.

      Parameters

      • rowsPerAPIRequest: number = Number.MAX_SAFE_INTEGER

      Returns any

    • Fetch the next batch of rows from the cursor.

      Parameters

      • rowsPerAPIRequest: number = Number.MAX_SAFE_INTEGER

        The number of rows to fetch per API request.

      Returns Promise<GetTableByScopeResponseRow[]>

      A promise containing the next batch of rows.

    • Reset the internal state of the cursor

      Returns Promise<void>