/** * Types for Internet Computer (IC) canister interactions. * @remarks * - Announcements are encrypted payloads stored in the storage canister. * - Many canister methods return Result-like unions (`Ok/Err` or `ok/err`). */ export interface AnnouncementInput { /** IBE-encrypted session key (canister stores bytes as-is). */ ibeCiphertext: Uint8Array; /** Ciphertext of the announcement payload (AES-GCM). */ ciphertext: Uint8Array; /** AES-GCM nonce used for `ciphertext`. */ nonce: Uint8Array; /** Optional storage tag for routing/partitioning. */ tag?: string; } /** * Stored announcement as returned by the storage canister. */ export interface Announcement { id: bigint; ibeCiphertext: Uint8Array; ciphertext: Uint8Array; nonce: Uint8Array; /** Created timestamp in nanoseconds (IC time). */ createdAtNs: bigint; tag: string; } /** * Cursor-based page of announcements (id-based cursor). */ export interface AnnouncementPage { announcements: Announcement[]; /** Cursor to pass as `startAfter` in the next request, or null if no more pages. */ nextId: bigint | null; } /** * Cursor-based page of announcements (time-based cursor). */ export interface AnnouncementPageByTime { announcements: Announcement[]; /** Cursor to pass as `startAfterTs` in the next request, or null if no more pages. */ nextTs: bigint | null; } /** * Invoice submission payload stored in the storage canister. */ export interface InvoiceSubmission { /** Invoice id (bytes). */ invoiceId: Uint8Array; /** Signature over invoice message (bytes). */ signature: Uint8Array; /** Optional storage tag for routing/partitioning. */ tag?: string; } /** * Decrypted announcement payload returned by the SDK decryption helpers. */ export interface DecryptedAnnouncement { id: bigint; plaintext: Uint8Array; createdAtNs: bigint; } /** * Request payload for vetKD encrypted view key derivation. * @remarks The caller is responsible for producing a valid signature over an authorization message. */ export interface EncryptedViewKeyRequest { address: Uint8Array; transportPublicKey: Uint8Array; expiryNs: bigint; nonce: bigint; signature: Uint8Array; } /** * Response payload for vetKD encrypted view key derivation. */ export interface EncryptedViewKeyResponse { encryptedKey: Uint8Array; viewPublicKey: Uint8Array; } /** * Result union returned by IC canister methods. * @remarks Some canisters use `Ok/Err` while others use `ok/err`. */ export type CanisterResult = { Ok: T; } | { Err: string; } | { ok: T; } | { err: string; }; export interface VetKdConfig { /** Domain separator passed to the key manager when deriving keys */ context: Uint8Array; /** VetKD key name (e.g. `key_1`, `test_key_1`, `dfx_test_key`). */ keyIdName: string; } export interface StealthClientOptions { storageCanisterIdText: string; keyManagerCanisterIdText: string; } export interface EncryptOptions { identity?: Uint8Array; rng?: () => Uint8Array; } export interface EncryptionArtifacts { announcement: AnnouncementInput; sessionKey: Uint8Array; } //# sourceMappingURL=types.d.ts.map