Returns all entity keys stored in Arkiv.
A promise that resolves to an array of entity keys (Hex[]).
Retrieves all entity keys owned by a specific Ethereum address.
The address whose owned entities should be returned.
A promise that resolves to an array of entity keys owned by the address.
Finds all entities that are scheduled to expire at a specific block.
The block number to check against.
A promise that resolves to an array of entity keys expiring at the given block.
Returns the total number of entities stored in Arkiv.
A promise that resolves to the total count of entities.
Retrieves metadata for a given entity key.
The key to retrieve metadata for.
An EntityMetaData object with structured information about the entity.
Returns the raw internal client used under the hood. The internal client which exposes low-level methods and also gives access to the raw viem.sh ethereum clients, which allows to call low-level ethereum methods directly
This includes low-level Ethereum client access (via viem.sh). This is considered an advanced feature. Use with caution if you need to make low-level Ethereum calls directly.
The internal client object used by the SDK.
Returns the raw base64-encoded storage value associated with a given entity key.
The entity key to fetch the data for.
A Uint8Array containing the base64 encoded value stored in the entity.
Queries entities in Arkiv using annotations or metadata filters.
A query string in the Arkiv filter syntax.
A promise that resolves to an array of matching entity keys.
Install callbacks that will be invoked for every Arkiv transaction
The starting block, events trigger the callbacks starting from this block
A callback that's invoked whenever entities are created
A callback that's invoked whenever entities are deleted
Optional
onError?: (error: Error) => voidA callback that's invoked whenever there is an error during the processing
A callback that's invoked whenever entities have their BTL extended
A callback that's invoked whenever entitier are updated
Optional
pollingInterval?: numberIn that case of HTTP transport, the polling interval in milliseconds. Defaults to the default polling interval of viem
Optional
transport?: "http" | "websocket"The transport to use, either HTTP or WebSocket (the default)
a callback to cancel the subscription and stop receiving notifications
Read-only client interface for Arkiv providing access to query operations without the ability to modify data on the blockchain.
Use this client when you only need to read data from Arkiv and don't require transaction capabilities.
Example