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.

InstructionWhat it doesSigner
registerCreates the PDA holding the spending and viewing public keysOwner (a relayer may pay the fee)
update_keysReplaces the keys, for example after a key rotationOwner
link_nameLinks a .sol name the owner controlsOwner
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

InstructionMovesNotes
send_solLamportsFee taken in lamports; announcement emitted by CPI
send_tokenSPL / Token-2022Creates the one-time address's token account if needed
send_token_with_gasTokens + a little SOLForwards 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.