Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vaulkyrie.xyz/llms.txt

Use this file to discover all available pages before exploring further.

The on-chain program is implemented under programs/vaulkyrie-core/src/. This page describes the existing code and avoids proposing instruction layout changes.

Account model

AccountSource structPurpose
Vault RegistryVaultRegistry in state.rsStores wallet public key, authority hash, threshold, participant count, status, sequence, and bump.
Quantum AuthorityQuantumAuthorityState in state.rsStores current post-quantum authority hash/root, sequence, and bump.
Authority ProofAuthorityProofState in state.rsStages large authority proofs in chunks before final authority rotation.
Spend OrchestrationSpendOrchestrationState in state.rsTracks a spend action hash, signer commitments, signing package hash, transaction binding, expiry, and status.
Recovery StateRecoveryState in state.rsTracks recovery commitment, target threshold/participant count, expiry, and status.
PQC WalletPqcWalletState in state.rsStores a stable wallet id, current Winternitz root, sequence, and bump.

Instruction groups

The instruction parser is in programs/vaulkyrie-core/src/instruction.rs. The Rust SDK builder names map directly to these instruction groups.
GroupInstructions
HealthPing
Vault lifecycleInitVault, SetVaultStatus
AuthorityInitAuthority, RotateAuthority, InitAuthorityProof, WriteAuthorityProofChunk, RotateAuthorityStaged, AdvanceWinterAuthority, MigrateAuthority
Quantum vaultInitQuantumVault, SplitQuantumVault, CloseQuantumVault
PQC walletInitPqcWallet, AdvancePqcWallet
Spend orchestrationInitSpendOrchestration, CommitSpendOrchestration, CompleteSpendOrchestration, FailSpendOrchestration
RecoveryInitRecovery, CompleteRecovery

State transitions

programs/vaulkyrie-core/src/transition.rs holds pure transition logic. The processor handlers in processor.rs deserialize instruction data, verify PDAs and signers, then call transition helpers. Spend orchestration is separate from vault status:

PDA seeds

The PDA helpers are mirrored in programs/vaulkyrie-core/src/pda.rs, crates/vaulkyrie-sdk/src/pda.rs, and src/sdk/pda.ts.
PDASeed shape
Vault Registryvault_registry, wallet pubkey
Quantum Authorityquantum_authority, vault id
Authority Proofauthority_proof, vault id, statement digest
Quantum Vaultquantum_vault, hash
PQC Walletpqc_wallet, wallet id
Spend Orchestrationspend_orch, vault id, action hash

Why staged proofs exist

Authority rotation proofs can exceed a comfortable single-instruction payload. The program has an AuthorityProofState plus chunk-writing instructions so the client can stage proof bytes, bind them to a statement digest and commitment, then complete rotation from staged data. This is reflected in:
  • InitAuthorityProof
  • WriteAuthorityProofChunk
  • RotateAuthorityStaged
  • AUTHORITY_PROOF_CHUNK_MAX_BYTES in crates/vaulkyrie-protocol/src/lib.rs