Reference
Programs
crepus_registry, crepus_announcer and crepus_pay: accounts and instructions.
Program IDs at launch
The programs are being deployed to mainnet-beta. Their IDs will be published here and on the website when they go live; until then, treat any address claiming to be Crepus as unofficial.
Three Anchor programs, each small and single-purpose. After deploy their upgrade authority is revoked: no owner, no pause, no admin instructions. The protocol fee is set at deploy and capped at 1% in code.
crepus_registry
Maps a wallet (and optionally a .sol name) to a stealth meta-address.
| Instruction | What it does | Signer |
|---|---|---|
register | Creates the PDA holding the spending and viewing public keys | Owner (a relayer may pay the fee) |
update_keys | Replaces the keys, for example after a key rotation | Owner |
link_name | Links a .sol name the owner controls | Owner |
Meta-address account
#[account]
pub struct MetaAddress {
pub owner: Pubkey, // the registering wallet
pub spending_key: [u8; 32], // K = k·G
pub viewing_key: [u8; 32], // V = v·G
pub name: Option<Pubkey>, // linked .sol name account
pub bump: u8,
}
// PDA seeds: ["meta", owner]crepus_announcer
Emits the announcements scanners read. It stores nothing and holds nothing; other programs call it by CPI.
Announcement event
#[event]
pub struct Announcement {
pub scheme_id: u8, // 1 = ed25519 stealth, sha512 shared secret
pub stealth: Pubkey, // the one-time address P
pub ephemeral_pubkey: [u8; 32], // R = r·G
pub view_tag: u8, // first byte of H(r·V)
pub mint: Pubkey, // Pubkey::default() for SOL
pub amount: u64,
}crepus_pay
Pays a one-time address and announces it in the same instruction.
Instructions
| Instruction | Moves | Notes |
|---|---|---|
send_sol | Lamports | Fee taken in lamports; announcement emitted by CPI |
send_token | SPL / Token-2022 | Creates the one-time address's token account if needed |
send_token_with_gas | Tokens + a little SOL | Forwards the SOL untouched, for the recipient's fees |
The program never keeps a balance between instructions: the payment goes to the one-time address and the fee to the treasury inside one call.