SuiObjectContext
Class in @sentio/sdk/sui
Defined in @sentio/sdk/sui
Extends
Constructors
Constructor
new SuiObjectContext(
network: SuiChainId,
objectId: string,
objectVersion: bigint,
checkpoint: bigint,
timestamp: Date,
baseLabels: Labels | undefined
): SuiObjectContext;Parameters
| Parameter | Type |
|---|---|
network | SuiChainId |
objectId | string |
objectVersion | bigint |
checkpoint | bigint |
timestamp | Date |
baseLabels | Labels | undefined |
Returns
SuiObjectContext
Overrides
Properties
| Property | Type | Default value | Overrides | Inherited from |
|---|---|---|---|---|
address | string | undefined | - | SuiAddressContext.address |
baseLabels | Labels | undefined | - | SuiAddressContext.baseLabels |
checkpoint | bigint | undefined | - | SuiAddressContext.checkpoint |
coder | MoveCoder | undefined | - | SuiAddressContext.coder |
contractName | string | 'object' | SuiAddressContext.contractName | - |
eventLogger | EventLoggerBinding | undefined | - | SuiAddressContext.eventLogger |
meter | Meter | undefined | - | SuiAddressContext.meter |
network | SuiChainId | undefined | - | SuiAddressContext.network |
objectId | string | undefined | - | - |
objectVersion | bigint | undefined | - | - |
timestamp | Date | undefined | - | SuiAddressContext.timestamp |
Accessors
cache
Get Signature
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.
Example
// 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)See
MemoryCache for full API documentation
Returns
MemoryCache
The MemoryCache instance, or undefined if cache is not available
Inherited from
client
Get Signature
get client(): SuiGrpcClient;Returns
SuiGrpcClient
Inherited from
store
Get Signature
get store(): Store;Returns
Store
Inherited from
Methods
getChainId()
getChainId(): SuiChainId;Returns
SuiChainId
Inherited from
getMetaData()
getMetaData(name: string, labels: Labels): RecordMetaData;Parameters
| Parameter | Type |
|---|---|
name | string |
labels | Labels |
Returns
Inherited from
getMetaDataInternal()
getMetaDataInternal(name: string, labels: Labels): RecordMetaData;Parameters
| Parameter | Type |
|---|---|
name | string |
labels | Labels |
Returns
Inherited from
SuiAddressContext.getMetaDataInternal
getTimestamp()
getTimestamp(): number;Returns
number
Inherited from
SuiAddressContext.getTimestamp
initStore()
initStore(): void;Returns
void
Inherited from
sendTemplateInstance()
sendTemplateInstance(instance: TemplateInstance, unbind?: boolean): void;Parameters
| Parameter | Type | Default value |
|---|---|---|
instance | TemplateInstance | undefined |
unbind | boolean | false |
Returns
void
Inherited from
SuiAddressContext.sendTemplateInstance
stopAndGetResult()
stopAndGetResult(): ProcessResult;Returns
Inherited from
SuiAddressContext.stopAndGetResult
update()
update(res: MessageInit<ProcessResult>): void;Parameters
| Parameter | Type |
|---|---|
res | MessageInit<ProcessResult> |
Returns
void