@sentio/sdk
    Preparing search index...

    Class IotaContext

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • moduleName: string
      • network: SuiChainId
      • address: string
      • timestamp: Date
      • checkpoint: bigint
      • transaction: IotaTransactionBlockResponse
      • eventIndex: number
      • baseLabels: undefined | Labels

      Returns IotaContext

    Properties

    address: string
    baseLabels: Labels
    checkpoint: bigint
    coder: MoveCoder
    eventIndex: number
    eventLogger: EventLoggerBinding
    meter: Meter
    moduleName: string
    network: SuiChainId
    timestamp: Date
    transaction: IotaTransactionBlockResponse

    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