import { PublicKey } from "@solana/web3.js"; import type { ShieldOwner } from "./types.js"; /** * Resolve a shield recipient into the pair of keys that must belong to the same * account. * * This is the only mechanism that makes the owner invariant safe. A note's * *spend* authority is a Poseidon field element and its *detection* authority is * an Ed25519 wallet key; nothing on-chain relates them, and if an integrator * sources them separately and gets them wrong, the note is spendable but * permanently invisible — the funds are gone from the owner's view with no error * raised anywhere in the stack. * * `GET /auth/veiloPublicKey` returns both halves in a single response, so * routing through this function makes the pairing structural rather than a * convention integrators are asked to remember. * * Prefer this over hand-building a {@link ShieldOwner} in all cases. */ export declare function resolveShieldOwner(target: { username: string; } | { publicKey: string | PublicKey; }): Promise; /** * Build a {@link ShieldOwner} from keys the caller already holds. * * Only correct when both keys provably belong to the same account. The explicit * flag is not ceremony — it is the last checkpoint before a class of bug whose * only symptom is a user's money quietly disappearing from their balance. */ export declare function unsafeShieldOwner(params: { veiloPublicKey: bigint; noteViewingKey: PublicKey; viewPublicKey?: Uint8Array; cipherVersion?: "wallet-v1" | "view-v2"; acknowledgeOwnerInvariant: true; }): ShieldOwner;