/** * Transactional action_ref lifecycle (non-normative substrate extension). * * For actions that traverse multiple state transitions * (authorisation -> settlement -> refund; issuance -> execution -> * revocation; admission -> review -> close), the action_ref four-field * preimage is the STABLE identity anchor across the full lifecycle, and * per-transition lifecycle metadata sits OUTSIDE the action_ref preimage. * * Invariants: * * 1. action_ref is byte-stable across every transition of the same action. * 2. transition_hash is byte-stable for identical preimage tuples. * 3. transition_hash differs per state for the same action_ref + timestamps. * 4. action_ref and any transition_hash are byte-distinct. * 5. All timestamp fields MUST be epoch-millisecond integers per * Substrate Rule 2. RFC 3339 string forms are rejected. * * State value is a non-empty string with no closed enum at the * canonicalisation layer, consistent with the scope-field treatment. */ export declare class TransactionalError extends Error { constructor(message: string); } export interface TransitionPreimage { action_ref: string; state: string; transition_timestamp_ms: number; authority_verified_at_ms: number; revocation_check_at_ms: number; } export interface TransitionInput { state: string; transition_timestamp_ms: number; authority_verified_at_ms: number; revocation_check_at_ms: number; } export interface TransitionRecord extends TransitionInput { transition_hash: string; } export interface TransactionalChain { action_ref: string; transitions: TransitionRecord[]; } export interface TransactionalChainInput { agent_id: string; action_type: string; scope: string; timestamp_ms: number; transitions: TransitionInput[]; } /** * Return the validated preimage object for a single transition. * * The five-field shape is fixed at the substrate layer; the action_ref * field cryptographically binds the transition to its action identity. */ export declare function transitionPreimage(input: { action_ref: string; state: string; transition_timestamp_ms: number; authority_verified_at_ms: number; revocation_check_at_ms: number; }): TransitionPreimage; /** * Return the lowercase hex SHA-256 transition_hash. * * transition_hash = SHA-256(JCS({action_ref, state, * transition_timestamp_ms, * authority_verified_at_ms, * revocation_check_at_ms})) */ export declare function transitionHash(input: { action_ref: string; state: string; transition_timestamp_ms: number; authority_verified_at_ms: number; revocation_check_at_ms: number; }): string; /** * Build a transactional action chain. * * Returns the chain shape: * { * action_ref: "", * transitions: [ * { * state, transition_timestamp_ms, * authority_verified_at_ms, revocation_check_at_ms, * transition_hash * }, * ... * ] * } * * The action_ref is computed once and is byte-stable across every * transition. Each transition_hash is bound to the action_ref by * including it in the transition preimage. Transitions are processed * in the order supplied; the substrate verifies determinism, not * lifecycle semantics. */ export declare function buildTransactionalActionChain(input: TransactionalChainInput): TransactionalChain; //# sourceMappingURL=transactional.d.ts.map