Skip to content

predictEntityKey

predictEntityKey(__namedParameters): `0x${string}`

Defined in: src/entity/key.ts:64

The key an entity will be created with, derived exactly as the engine derives it: keccak256(domain ++ owner ++ nonce ++ salt).

Deriving it client-side is what lets a batch compose: predict the key of a create, then have a later operation in the same transaction reference it, or store it as a key attribute on a sibling entity.

number

The chain the entity is being created on — half of the derivation domain.

bigint

The owner’s entity-nonce at creation time. Each create in a batch consumes one, so the nth create in a batch uses nonce + n.

`0x${string}`

The account creating the entity.

SaltInput

The salt the create will carry, or NO_SALT if it carries none.

`0x${string}`