D00R

API reference

Program id xk7UkNkjzd9axDvF1eLrUqoVbyjaEaVJwj8siR3mXhK, Anchor 0.31.1.

Instructions

InstructionArgumentsSignerNotes
open_treasurynoneanyoneOnce per accepted mint. Creates the books and both vaults.
init_configname_price: u64upgrade authorityOnce. Pins the D00R mint, burn pools and name price.
open_inboxmint: Pubkey, bond: u64, window: i64, encryption_key: [u8; 32]ownerBond and window limits below.
update_inboxmint, bond, window, encryption_key, accepting: boolownerNew terms for future knocks.
send_knockbond: u64, window: i64, reply_key: [u8; 32], message: Vec<u8>senderMust repeat the inbox's current terms.
replymessage: Vec<u8>recipient0 to 560 bytes, kept in transaction data only.
mark_spamnonerecipientBefore expires_at.
expirenoneanyoneAt or after expires_at.
crank_burnamount: u64anyoneBurns D00R bought with spam fees.
claim_namename: Stringinbox ownerBurns name_price D00R.
release_namenoneinbox ownerFrees the name.

Constants

ConstantValue
MIN_BOND1,000,000 (1 USDC), 10,000,000 lamports (0.01 SOL)
MIN_WINDOW_SECS86,400 (1 day)
MAX_WINDOW_SECS2,592,000 (30 days)
MAX_MESSAGE_LEN560 bytes
SPAM_FEE_BPS500 (5%)
BURN_MAX_RESERVE_BPS10 (0.1% of the pool's input reserve per call)
BURN_MIN_OUT_BPS9,800 (98% of the TWAP price)
BURN_TWAP_SECS1,800
Name length3 to 20 characters

Account layouts

Inbox, after the 8-byte discriminator:

FieldTypeOffset
ownerPubkey8
mintPubkey40
bondu6472
windowi6480
encryption_key[u8; 32]88
acceptingbool120
receivedu64121
repliedu64129
keptu64137
expiredu64145
kept_amount[u64; 2]153
created_ati64169
nameString177

Knock: recipient (8), sender (40), mint (72), bond (104), knocked_at (112), expires_at (120), reply_key (128), bump (160), message (161, length-prefixed).

Config: knock_mint (8), burn_pools (40), name_price (104), burned_by_fees (112), burned_by_names (120).

Treasury: mint (8), outstanding (40), fees_collected (48), fees_spent (56).

Events

EventFields
Knockedrecipient, sender, mint, bond, expires_at
Repliedrecipient, sender, bond_returned
Keptrecipient, sender, to_recipient, fee
Expiredrecipient, sender, bond_returned
Burnedfee_mint, fee_spent, knock_burned
NameClaimedowner, name, knock_burned