AttestedSigner.getBinding
Computes the binding an attestation document commits to, so that the Attested Key Registry registers the program key only for this chain, registry, policy, slot, and requested lifetime: keccak256("tempo:attested-key" ‖ uint256 chainId ‖ registry ‖ policyId ‖ uint8 slot ‖ x ‖ y ‖ uint64 lifetime).
Imports
Named
import { AttestedSigner } from 'ox/tempo'Examples
import { P256 } from 'ox'
import { AttestedSigner } from 'ox/tempo'
const { publicKey } = P256.createKeyPair()
const binding = AttestedSigner.getBinding({
chainId: 1337,
lifetime: 3600,
policyId: `0x${'aa'.repeat(32)}`,
programKey: publicKey,
slot: 0
})Definition
function getBinding(
options: getBinding.Options,
): Hex.HexSource: src/tempo/AttestedSigner.ts
Parameters
options
- Type:
getBinding.Options
The binding fields.
options.chainId
- Type:
number | bigint
Chain ID the registration is for.
options.lifetime
- Type:
number | bigint
Lifetime in seconds that registerKey requests, capped by the policy's
maxKeyLifetime. 0 requests the cap.
options.policyId
- Type:
0x${string}
Attested Key Registry policy ID.
options.programKey
- Type:
{ prefix: number; x: bigint; y: bigint; }
Uncompressed P256 program key to register.
options.registry
- Type:
Address.Address | undefined - Optional
Registry address.
options.slot
- Type:
number
Key slot to register into, below AttestedSigner.keySlots.
Return Type
The binding.
Hex.Hex

