golem-base-sdk
    Preparing search index...

    Type Alias GolemBaseActions

    Type definition for GolemBase read-only actions that can be performed through the JSON-RPC interface. These methods provide query capabilities for retrieving entity data and metadata.

    type GolemBaseActions = {
        getAllEntityKeys(): Promise<`0x${string}`[]>;
        getEntitiesOfOwner(args: `0x${string}`): Promise<`0x${string}`[]>;
        getEntitiesToExpireAtBlock(blockNumber: bigint): Promise<`0x${string}`[]>;
        getEntityCount(): Promise<number>;
        getEntityMetaData(args: `0x${string}`): Promise<EntityMetaData>;
        getStorageValue(args: `0x${string}`): Promise<Uint8Array<ArrayBufferLike>>;
        queryEntities(args: string): Promise<{ key: Hex; value: Uint8Array }[]>;
    }
    Index

    Methods

    • Retrieve all entity keys currently stored in GolemBase

      Returns Promise<`0x${string}`[]>

    • Get all entity keys owned by a specific Ethereum address

      Parameters

      • args: `0x${string}`

      Returns Promise<`0x${string}`[]>

    • Get all entity keys for entities that will expire at the given block number. Useful for monitoring entities approaching their TTL expiration.

      Parameters

      • blockNumber: bigint

      Returns Promise<`0x${string}`[]>

    • Get the total count of entities currently stored in GolemBase

      Returns Promise<number>

    • Retrieve the raw storage value (data) for a specific entity

      Parameters

      • args: `0x${string}`

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Query entities based on annotation criteria, returning matching keys and values

      Parameters

      • args: string

      Returns Promise<{ key: Hex; value: Uint8Array }[]>