/** * Compute budget and transaction size constants for the shield path. * * These numbers are empirical and load-bearing. They are constants rather than * inline literals so a future program change that invalidates them has one * place to be fixed and one place to be read. */ /** * Compute unit limit reserved for a shield. * * Measured usage for a deposit is ~377k CU; 700k leaves roughly 2× headroom * while staying low enough that Phantom's Lighthouse guard still fits its own * instructions alongside ours. * * Do NOT raise this to 1.4M (what the stale `client.ts` `deposit()` reserves). * An oversized CU reservation is one of the signals that makes Phantom render * the transaction with a malicious-dApp warning. * * Ported from veilo-dapp/features/transactions/handleDeposit.ts:673-681. */ export declare const SHIELD_COMPUTE_UNIT_LIMIT = 700000; /** Typical measured usage. If real usage approaches the limit above, revisit both. */ export declare const SHIELD_COMPUTE_UNITS_MEASURED_TYPICAL = 377000; /** Default priority fee. Set to 0 to omit the instruction entirely (saves ~40 bytes). */ export declare const SHIELD_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS = 50000; /** Solana's hard cap on a serialized transaction, signatures included. */ export declare const MAX_TRANSACTION_BYTES = 1232; /** One ed25519 signature: 64 bytes plus the compact-array length prefix. */ export declare const SIGNATURE_BYTES = 65; /** * `NullifierMarker::LEN` (privacy-program .../lib.rs:415). Two markers are * created per transact and paid for by the signer — see the note on sponsorship * in the module docs of `shield.ts`. */ export declare const NULLIFIER_MARKER_ACCOUNT_BYTES = 10; /** Markers created per `transact` — one per circuit input. */ export declare const NULLIFIER_MARKERS_PER_TRANSACT = 2; /** Default validity window for the on-chain `deadline` argument. */ export declare const DEFAULT_DEADLINE_SECONDS = 3600; /** * Serialized size of the `transact` instruction data, for reference: * * 8 discriminator * 32 root * 2 input_tree_id * 2 output_tree_id * 8 public_amount * 32 ext_data_hash * 32 mint_address * 128 2 nullifiers + 2 commitments * 8 deadline * 112 ExtData (recipient, relayer, fee, refund, claimant) * 256 Groth16 proof (a:64, b:128, c:64) * 227 Option (1 tag + 226) * --- * 847 * * With 16 accounts this cannot fit in a legacy transaction (~1500 bytes), which * is why the shield path is v0-with-ALT and not optional. */ export declare const TRANSACT_INSTRUCTION_DATA_BYTES = 847;