principal_policy_bundle_references Client SQLite table
Exact policy states mapped to every retained bundle chain that contains them.
Declared in packages/client-sdk/src/data/sqlite/schema/principalPolicySchema.ts
Columns
principal_typetext- not null
Managed principal kind:
groupororganization.principal_idtext- not null
Managed principal id.
versioninteger- not null
Policy version of the referenced state.
state_hashtext- not null
Hex SHA-256 state hash of the referenced state.
key_epochinteger- not null
key_fingerprinttext- not null
Hex SHA-256 fingerprint of the principal key at that state.
bundle_versioninteger- not null
Version of the head of the retained bundle that contains the state.
bundle_state_hashtext- not null
State hash of that bundle head. A state indexed under two different heads at one bundle version is rejected as equivocation.
Keys and constraints
- Primary key
(principal_type, principal_id, version, state_hash, key_epoch, key_fingerprint, bundle_state_hash)
DDL
The statements the client runs to create this table and its indexes.
CREATE TABLE IF NOT EXISTS "principal_policy_bundle_references" (
"principal_type" TEXT NOT NULL,
"principal_id" TEXT NOT NULL,
"version" INTEGER NOT NULL,
"state_hash" TEXT NOT NULL,
"key_epoch" INTEGER NOT NULL,
"key_fingerprint" TEXT NOT NULL,
"bundle_version" INTEGER NOT NULL,
"bundle_state_hash" TEXT NOT NULL,
PRIMARY KEY ("principal_type", "principal_id", "version", "state_hash", "key_epoch", "key_fingerprint", "bundle_state_hash")
);