0.1.0-pre.004

This commit is contained in:
2026-07-23 18:25:10 +02:00
parent 0da75c1311
commit 149d4c6ef6
85 changed files with 25696 additions and 227 deletions

View File

@@ -0,0 +1,252 @@
// file: kb-program-ids/src/constants.rs
// version: 1
//! Canonical Solana program and well-known account identifiers.
/// Address Lookup Table program identifier.
pub const ADDRESS_LOOKUP_TABLE_PROGRAM_ID: &str = "AddressLookupTab1e1111111111111111111111111";
/// Deprecated BPF Loader program identifier.
pub const BPF_LOADER_DEPRECATED_PROGRAM_ID: &str = "BPFLoader1111111111111111111111111111111111";
/// BPF Loader version 2 program identifier.
pub const BPF_LOADER_PROGRAM_ID: &str = "BPFLoader2111111111111111111111111111111111";
/// Upgradeable BPF Loader program identifier.
pub const BPF_LOADER_UPGRADEABLE_PROGRAM_ID: &str = "BPFLoaderUpgradeab1e11111111111111111111111";
/// Compute Budget program identifier.
pub const COMPUTE_BUDGET_PROGRAM_ID: &str = "ComputeBudget111111111111111111111111111111";
/// Config program identifier.
pub const CONFIG_PROGRAM_ID: &str = "Config1111111111111111111111111111111111111";
/// Ed25519 precompile program identifier.
pub const ED25519_PROGRAM_ID: &str = "Ed25519SigVerify111111111111111111111111111";
/// Feature program identifier.
pub const FEATURE_PROGRAM_ID: &str = "Feature111111111111111111111111111111111111";
/// Incinerator well-known account identifier.
pub const INCINERATOR_PROGRAM_ID: &str = "1nc1nerator11111111111111111111111111111111";
/// Loader version 4 program identifier.
pub const LOADER_V4_PROGRAM_ID: &str = "LoaderV411111111111111111111111111111111111";
/// Native Loader program identifier.
pub const NATIVE_LOADER_PROGRAM_ID: &str = "NativeLoader1111111111111111111111111111111";
/// Secp256k1 precompile program identifier.
pub const SECP256K1_PROGRAM_ID: &str = "KeccakSecp256k11111111111111111111111111111";
/// Secp256r1 precompile program identifier.
pub const SECP256R1_PROGRAM_ID: &str = "Secp256r1SigVerify1111111111111111111111111";
/// Enshrined stateless Slashing program identifier.
pub const SLASHING_PROGRAM_ID: &str = "S1ashing11111111111111111111111111111111111";
/// Classic SPL Token program identifier.
pub const SPL_TOKEN_PROGRAM_ID: &str = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
/// Historical Stake configuration account identifier.
pub const STAKE_CONFIG_ACCOUNT_ID: &str = "StakeConfig11111111111111111111111111111111";
/// Compatibility alias for the historical Stake configuration account identifier.
pub const STAKE_CONFIG_PROGRAM_ID: &str = crate::STAKE_CONFIG_ACCOUNT_ID;
/// Stake program identifier.
pub const STAKE_PROGRAM_ID: &str = "Stake11111111111111111111111111111111111111";
/// System program identifier.
pub const SYSTEM_PROGRAM_ID: &str = "11111111111111111111111111111111";
/// Clock sysvar account identifier.
pub const SYSVAR_CLOCK_PROGRAM_ID: &str = "SysvarC1ock11111111111111111111111111111111";
/// Instructions sysvar account identifier.
pub const SYSVAR_INSTRUCTIONS_PROGRAM_ID: &str = "Sysvar1nstructions1111111111111111111111111";
/// Rent sysvar account identifier.
pub const SYSVAR_RENT_PROGRAM_ID: &str = "SysvarRent111111111111111111111111111111111";
/// Slot Hashes sysvar account identifier.
pub const SYSVAR_SLOT_HASHES_PROGRAM_ID: &str = "SysvarS1otHashes111111111111111111111111111";
/// Stake History sysvar account identifier.
pub const SYSVAR_STAKE_HISTORY_PROGRAM_ID: &str = "SysvarStakeHistory1111111111111111111111111";
/// Vote program identifier.
pub const VOTE_PROGRAM_ID: &str = "Vote111111111111111111111111111111111111111";
/// ZK ElGamal Proof program identifier.
pub const ZK_ELGAMAL_PROOF_PROGRAM_ID: &str = "ZkE1Gama1Proof11111111111111111111111111111";
/// ZK Token Proof program identifier.
pub const ZK_TOKEN_PROOF_PROGRAM_ID: &str = "ZkTokenProof1111111111111111111111111111111";
pub(crate) const NATIVE_PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[
crate::ProgramIdEntry {
name: "address_lookup_table",
address: crate::ADDRESS_LOOKUP_TABLE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "bpf_loader_deprecated",
address: crate::BPF_LOADER_DEPRECATED_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "bpf_loader",
address: crate::BPF_LOADER_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "bpf_loader_upgradeable",
address: crate::BPF_LOADER_UPGRADEABLE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "compute_budget",
address: crate::COMPUTE_BUDGET_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "config",
address: crate::CONFIG_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "ed25519",
address: crate::ED25519_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "feature",
address: crate::FEATURE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "loader_v4",
address: crate::LOADER_V4_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "native_loader",
address: crate::NATIVE_LOADER_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "secp256k1",
address: crate::SECP256K1_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "secp256r1",
address: crate::SECP256R1_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "slashing",
address: crate::SLASHING_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "stake",
address: crate::STAKE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "system",
address: crate::SYSTEM_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "vote",
address: crate::VOTE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "zk_elgamal_proof",
address: crate::ZK_ELGAMAL_PROOF_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "zk_token_proof",
address: crate::ZK_TOKEN_PROOF_PROGRAM_ID,
},
];
pub(crate) const NATIVE_WELL_KNOWN_ACCOUNT_ID_ENTRIES: &[crate::ProgramIdEntry] = &[
crate::ProgramIdEntry {
name: "incinerator",
address: crate::INCINERATOR_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "stake_config",
address: crate::STAKE_CONFIG_ACCOUNT_ID,
},
];
pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[
crate::ProgramIdEntry {
name: "address_lookup_table",
address: crate::ADDRESS_LOOKUP_TABLE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "bpf_loader_deprecated",
address: crate::BPF_LOADER_DEPRECATED_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "bpf_loader",
address: crate::BPF_LOADER_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "bpf_loader_upgradeable",
address: crate::BPF_LOADER_UPGRADEABLE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "compute_budget",
address: crate::COMPUTE_BUDGET_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "config",
address: crate::CONFIG_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "ed25519",
address: crate::ED25519_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "feature",
address: crate::FEATURE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "incinerator",
address: crate::INCINERATOR_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "loader_v4",
address: crate::LOADER_V4_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "native_loader",
address: crate::NATIVE_LOADER_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "secp256k1",
address: crate::SECP256K1_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "secp256r1",
address: crate::SECP256R1_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "slashing",
address: crate::SLASHING_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "spl_token",
address: crate::SPL_TOKEN_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "stake_config",
address: crate::STAKE_CONFIG_ACCOUNT_ID,
},
crate::ProgramIdEntry {
name: "stake",
address: crate::STAKE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "system",
address: crate::SYSTEM_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "sysvar_clock",
address: crate::SYSVAR_CLOCK_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "sysvar_instructions",
address: crate::SYSVAR_INSTRUCTIONS_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "sysvar_rent",
address: crate::SYSVAR_RENT_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "sysvar_slot_hashes",
address: crate::SYSVAR_SLOT_HASHES_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "sysvar_stake_history",
address: crate::SYSVAR_STAKE_HISTORY_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "vote",
address: crate::VOTE_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "zk_elgamal_proof",
address: crate::ZK_ELGAMAL_PROOF_PROGRAM_ID,
},
crate::ProgramIdEntry {
name: "zk_token_proof",
address: crate::ZK_TOKEN_PROOF_PROGRAM_ID,
},
];