The ClientCache class is mainly designed for chained transactions. Consumed & Created cells are "marked" so they can be correctly handled when composing transactions. It also act as cache for rpc requests to reduce cost, but this is optional.

Hierarchy (view full)

Constructors

Methods

  • Record known cells Implement this method to enable cells query caching

    Parameters

    Returns Promise<void>

  • Get a known cell by out point Implement this method to enable cells query caching

    Parameters

    Returns Promise<undefined | Cell>

  • Checks if a block header is considered confirmed. The default implementation compares the header's timestamp against the current time and a configured confirmation time. Override this method for custom confirmation logic.

    Parameters

    Returns boolean