Skip to content

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

randomSalt(): bigint

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

A cryptographically random 128-bit salt — what CreateEntityParameters.salt defaults to.

The salt exists for unpredictability, not uniqueness: the per-owner nonce already guarantees distinct keys. Random bits mean only the creator can predict the key of an entity they are about to create, so nobody else can reference or squat it in advance.

bigint

If the runtime has no crypto.getRandomValues.