@sentio/sdk
    Preparing search index...

    Class AptosContext

    Hierarchy

    • AptosTransactionContext<UserTransactionResponse>
      • AptosContext
    Index

    Constructors

    • Parameters

      • moduleName: string
      • network: AptosChainId
      • address: string
      • version: bigint
      • transaction: null | UserTransactionResponse
      • eventIndex: number
      • baseLabels: undefined | Labels

      Returns AptosContext

    Properties

    address: string
    baseLabels: Labels
    coder: MoveCoder
    eventIndex: number
    eventLogger: EventLoggerBinding
    meter: Meter
    moduleName: string
    network: AptosChainId
    transaction: UserTransactionResponse
    version: bigint

    Accessors

    • get cache(): MemoryCache

      Access the in-memory key-value cache.

      The cache allows storing and retrieving JSON-serializable values that persist across handler invocations. Useful for caching computed results, tracking cumulative state, or storing intermediate processing data.

      Returns MemoryCache

      The MemoryCache instance, or undefined if cache is not available

      // Store and retrieve values
      await ctx.cache.set('totalVolume', volume)
      const cached = await ctx.cache.get<number>('totalVolume')

      // Block-scoped values (isolated per block)
      await ctx.cache.setInBlock('blockCount', count)

      MemoryCache for full API documentation

    Methods