IotaObjectContext
Class in @sentio/sdk/iota
Defined in @sentio/sdk/iota
Extends
Constructors
Constructor
new IotaObjectContext(
network: SuiChainId,
objectId: string,
objectVersion: bigint,
checkpoint: bigint,
timestamp: Date,
baseLabels: Labels | undefined
): IotaObjectContext;Parameters
| Parameter | Type |
|---|---|
network | SuiChainId |
objectId | string |
objectVersion | bigint |
checkpoint | bigint |
timestamp | Date |
baseLabels | Labels | undefined |
Returns
IotaObjectContext
Overrides
IotaAddressContext.constructor
Properties
| Property | Type | Default value | Overrides | Inherited from |
|---|---|---|---|---|
address | string | undefined | - | IotaAddressContext.address |
baseLabels | Labels | undefined | - | IotaAddressContext.baseLabels |
checkpoint | bigint | undefined | - | IotaAddressContext.checkpoint |
coder | MoveCoder | undefined | - | IotaAddressContext.coder |
contractName | string | 'object' | IotaAddressContext.contractName | - |
eventLogger | EventLoggerBinding | undefined | - | IotaAddressContext.eventLogger |
meter | Meter | undefined | - | IotaAddressContext.meter |
network | SuiChainId | undefined | - | IotaAddressContext.network |
objectId | string | undefined | - | - |
objectVersion | bigint | undefined | - | - |
timestamp | Date | undefined | - | IotaAddressContext.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(): IotaClient;Returns
IotaClient
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
IotaAddressContext.getMetaData
getMetaDataInternal()
getMetaDataInternal(name: string, labels: Labels): RecordMetaData;Parameters
| Parameter | Type |
|---|---|
name | string |
labels | Labels |
Returns
Inherited from
IotaAddressContext.getMetaDataInternal
getTimestamp()
getTimestamp(): number;Returns
number
Inherited from
IotaAddressContext.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
IotaAddressContext.sendTemplateInstance
stopAndGetResult()
stopAndGetResult(): ProcessResult;Returns
Inherited from
IotaAddressContext.stopAndGetResult
update()
update(res: MessageInit<ProcessResult>): void;Parameters
| Parameter | Type |
|---|---|
res | MessageInit<ProcessResult> |
Returns
void