Skip to content

Braga has been retired. The next public testnet is coming in September 2026. Read the announcement →

predictEntityKey

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

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

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.

bigint

The salt the create will carry.

`0x${string}`