@orbinum/sdk 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as ZkNote, D as DecryptedMemo, N as NoteInput, S as ScanCommitment, a as DecryptPool, b as ScanKeys } from './index-JYVjYJtf.mjs';
2
- export { C as CURRENT_CIRCUIT_VERSION, c as DECRYPT_YIELD_EVERY, d as DecryptBatchResult, e as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, f as KnownEphWindow, M as MAX_WORKERS, g as MatchSource, h as MerkleTreeInfo, P as PAIRWISE_EPH_WINDOW, i as SELF_EPH_WINDOW, W as WORKER_CRASHED, j as WorkerFactory, k as WorkerLike, l as WorkerMessage, m as clearKnownEphWindow, n as createDecryptPool, o as createMainThreadPool, p as createWorkerPool, q as decryptHintBatch, r as getKnownEphWindow } from './index-JYVjYJtf.mjs';
1
+ import { Z as ZkNote, D as DecryptedMemo, N as NoteInput, S as ScanCommitment, O as OutgoingNoteRecord, a as DecryptPool, b as ScanKeys } from './index-V5Z9igEN.mjs';
2
+ export { C as CURRENT_CIRCUIT_VERSION, c as DECRYPT_YIELD_EVERY, d as DecryptBatchResult, e as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, f as KnownEphWindow, M as MAX_WORKERS, g as MatchSource, h as MerkleTreeInfo, P as PAIRWISE_EPH_WINDOW, i as SELF_EPH_WINDOW, W as WORKER_CRASHED, j as WorkerFactory, k as WorkerLike, l as WorkerMessage, m as clearKnownEphWindow, n as createDecryptPool, o as createMainThreadPool, p as createWorkerPool, q as decryptHintBatch, r as getKnownEphWindow } from './index-V5Z9igEN.mjs';
3
3
  import { ArtifactProvider, ProofResult, CircuitType } from '@orbinum/proof-generator';
4
4
  export { ArtifactProvider, CircuitType, ProofResult, WebArtifactProvider, shouldProveSingleThreaded } from '@orbinum/proof-generator';
5
5
  import * as polkadot_api from 'polkadot-api';
@@ -1107,6 +1107,115 @@ declare function serializeMemo(value: bigint, ownerPk: Uint8Array, blinding: Uin
1107
1107
  */
1108
1108
  declare function deriveViewTag(sharedSecret: Uint8Array): number;
1109
1109
 
1110
+ /**
1111
+ * OutgoingBlob — the OVK "wrap-the-key" primitive.
1112
+ *
1113
+ * When a wallet sends a private_transfer, the recipient's memo is encrypted ECDH
1114
+ * toward the RECIPIENT's ivk; the sender cannot reopen it, so a cold restore
1115
+ * loses the outgoing history (who/how much). This blob fixes that: it wraps the
1116
+ * memo's 32-byte `sharedSecret` under a key derived from the SENDER's ovk. On
1117
+ * restore the sender unwraps the sharedSecret and feeds it to the SAME memo
1118
+ * decryption path the recipient uses — one decryption routine in the whole
1119
+ * system (OVK plan requirement #7).
1120
+ *
1121
+ * This is Zcash Sapling's `outCiphertext` / Penumbra's `OvkWrappedKey`, adapted
1122
+ * to a shared secret that is a field element (32 bytes), not a group point — so
1123
+ * the blob contains no group element to decode, sidestepping Zcash's canonical-
1124
+ * encoding class of bugs.
1125
+ *
1126
+ * Layout (56 bytes): nonce_suffix(8) || ciphertext(32) || MAC(16).
1127
+ * Cipher: ChaCha20-Poly1305 (IETF), same primitive as EncryptedMemo.
1128
+ *
1129
+ * The outgoing cipher key binds every unique-per-output public value:
1130
+ * ock = HKDF(ikm=ovk, salt=commitment_bytes||ephPk_bytes, info=OCK_DOMAIN)
1131
+ * so each ock encrypts exactly one message. Uniqueness comes from the COMMITMENT
1132
+ * (Poseidon4 with random blinding, consensus rejects duplicates); the ephPk adds
1133
+ * the on-chain binding, not the uniqueness — two self-notes can share an ephPk
1134
+ * but never a commitment, so their ock still differs.
1135
+ *
1136
+ * SALT IS RAW ON-CHAIN BYTES. `commitment_bytes` and `ephPk_bytes` must be the
1137
+ * exact bytes that are/go on chain, never a re-serialization of a decoded point:
1138
+ * two encodings of "the same point" produce different ock and the AEAD fails —
1139
+ * no ambiguity to exploit.
1140
+ */
1141
+ /** Total on-chain blob size: nonce_suffix(8) || ciphertext(32) || MAC(16). */
1142
+ declare const OVK_BLOB_SIZE: number;
1143
+ /**
1144
+ * Derive the 32-byte outgoing cipher key.
1145
+ * ock = HKDF-SHA256(ikm=ovk, salt=commitmentBytes||ephPkBytes, info=OCK_DOMAIN)
1146
+ *
1147
+ * Both salt parts must be the raw 32-byte on-chain values (see file header).
1148
+ * Throws if either is not exactly 32 bytes — a wrong length here would silently
1149
+ * change the key and make recovery fail far from the cause.
1150
+ */
1151
+ declare function deriveOutgoingCipherKey(ovk: Uint8Array, commitmentBytes: Uint8Array, ephPkBytes: Uint8Array): Uint8Array;
1152
+ /**
1153
+ * Seal a sharedSecret into a 56-byte outgoing blob under the sender's ovk.
1154
+ *
1155
+ * @param ovk sender's 32-byte outgoing viewing key
1156
+ * @param sharedSecret the memo's 32-byte ECDH shared secret (what we wrap)
1157
+ * @param commitmentBytes raw 32-byte on-chain commitment of the recipient output
1158
+ * @param ephPkBytes raw 32-byte ephemeral public key (from the memo, not recomputed)
1159
+ * @returns 56 bytes: nonce_suffix(8) || ciphertext(32) || MAC(16)
1160
+ */
1161
+ declare function sealOutgoingBlob(ovk: Uint8Array, sharedSecret: Uint8Array, commitmentBytes: Uint8Array, ephPkBytes: Uint8Array): Uint8Array;
1162
+ /**
1163
+ * Open an outgoing blob, returning the wrapped sharedSecret or null.
1164
+ *
1165
+ * Never throws — this runs in recovery loops over hints that may be foreign,
1166
+ * pre-OVK, or ovk=⊥ random. A wrong ovk, wrong commitment, wrong ephPk, or any
1167
+ * corrupted byte fails the MAC and returns null.
1168
+ */
1169
+ declare function openOutgoingBlob(ovk: Uint8Array, blob: Uint8Array, commitmentBytes: Uint8Array, ephPkBytes: Uint8Array): Uint8Array | null;
1170
+ /**
1171
+ * A 56-byte random blob for the ovk=⊥ case (sender opts out of recoverability).
1172
+ *
1173
+ * Indistinguishable on-chain from a real blob: a real one is a random 8-byte
1174
+ * suffix plus ChaCha20/Poly1305 output, both uniform without the key. This is
1175
+ * the ONLY path for ⊥ — never zeros (distinguishable), never omission (a length
1176
+ * or SCALE-tag difference is a permanent, retroactive privacy label).
1177
+ */
1178
+ declare function randomOutgoingBlob(): Uint8Array;
1179
+
1180
+ /** The fields a payment slip carries — all public on-chain. */
1181
+ interface PaymentSlipFields {
1182
+ /** 0x-prefixed 32-byte LE commitment hex of the recipient output. */
1183
+ commitmentHex: string;
1184
+ /** 0x-prefixed encrypted memo hex (180 bytes) of the recipient output. */
1185
+ encryptedMemo: string;
1186
+ /** Merkle leaf index, when known. Informational — spends re-fetch the proof. */
1187
+ leafIndex?: number;
1188
+ /** Transaction hash of the transfer, when known. Informational — a reference
1189
+ * the recipient can show as proof of the payment; not needed to reconstruct. */
1190
+ txHash?: string;
1191
+ }
1192
+ /**
1193
+ * Seal slip fields toward a recipient.
1194
+ *
1195
+ * A fresh ephemeral keypair is generated; `sharedSecret = [ephSk]·recipientIvk`
1196
+ * is the ECDH secret only the recipient can reproduce (with their `ivsk`). The
1197
+ * ephemeral public key travels in the clear so the recipient can run ECDH.
1198
+ *
1199
+ * @param recipientIvkPacked 32-byte LE packed BJJ viewing public key of the recipient
1200
+ * @param fields the slip fields to seal
1201
+ * @returns envelope: ephPk(32) || nonce_suffix(8) || ciphertext || MAC(16)
1202
+ */
1203
+ declare function sealPaymentSlip(recipientIvkPacked: Uint8Array, fields: PaymentSlipFields): Uint8Array;
1204
+ /**
1205
+ * Open a payment slip with the recipient's viewing secret key. Returns the fields
1206
+ * or null (not ours / corrupt). Never throws — safe in import loops.
1207
+ */
1208
+ declare function openPaymentSlip(recipientIvsk: Uint8Array, envelope: Uint8Array): PaymentSlipFields | null;
1209
+ /** URI scheme prefix. The version is in the name, so a v2 reader can refuse a v1. */
1210
+ declare const PAYMENT_SLIP_SCHEME = "orbslip1:";
1211
+ /** Encode a sealed slip envelope into a shareable `orbslip1:` string. */
1212
+ declare function encodePaymentSlip(envelope: Uint8Array): string;
1213
+ /**
1214
+ * Decode an `orbslip1:` string back into the sealed envelope, or null. A wrong
1215
+ * scheme, a bad checksum (mistyped/truncated), or malformed payload returns null.
1216
+ */
1217
+ declare function decodePaymentSlip(text: string): Uint8Array | null;
1218
+
1110
1219
  /**
1111
1220
  * Derive the deterministic 32-byte ephemeral secret for self-note `index`.
1112
1221
  * Feed it to EncryptedMemo.encrypt / NoteBuilder.build as `ephSkOverride`.
@@ -1308,6 +1417,41 @@ declare function tryDecryptNoteVerbose(commitment: ScanCommitment, viewingSecret
1308
1417
  note: ZkNote | null;
1309
1418
  reason?: string;
1310
1419
  };
1420
+ /** A scan hint plus the per-transaction OVK blob the indexer serves alongside it. */
1421
+ type OutgoingHint = ScanCommitment & {
1422
+ ovkBlob?: string | null;
1423
+ };
1424
+ /**
1425
+ * Recover a note the caller SENT, using their outgoing viewing key (ovk).
1426
+ *
1427
+ * The sender's memo was encrypted toward the RECIPIENT, so they cannot reopen it
1428
+ * directly. Instead the ovk blob wraps the memo's shared secret; unwrapping it
1429
+ * gives the same secret the recipient gets via ECDH, and feeding it to the shared
1430
+ * decrypt-and-verify step rebuilds the sent note's public facts.
1431
+ *
1432
+ * Returns an OutgoingNoteRecord (value, recipient stealth pk, counterparty,
1433
+ * circuit version) — NEVER a spendable note: no spendingKey, no nullifier. The
1434
+ * sender does not own this note. Never throws (runs in recovery loops).
1435
+ *
1436
+ * Security (OVK plan §3.4), in three non-algebraic but sound layers:
1437
+ * 1. The blob MAC (openOutgoingBlob) proves whoever wrote it knew the ovk, and
1438
+ * the ock binds it to THIS (commitment, ephPk) — blobs are not transplantable.
1439
+ * 2. The memo MAC (inside decryptAndVerifyPlaintext) proves this shared secret
1440
+ * is the one that encrypted this memo — the same secret the recipient derives.
1441
+ * 3. The commitment check ties the recovered fields to the note in the tree.
1442
+ * Not verifiable by the sender: that `sharedSecret` corresponds to `ephPk` — that
1443
+ * needs the recipient's ivsk. Residual: a leaked ovk lets an attacker fabricate a
1444
+ * self-consistent (commitment, memo, blob) and plant false outgoing history. It
1445
+ * moves no funds; Zcash accepts the same residual. Mitigated in the app by only
1446
+ * running this over commitments from extrinsics that spent our own nullifiers.
1447
+ *
1448
+ * @param hint scan hint with commitmentHex, encryptedMemo, and ovkBlob.
1449
+ * @param ovk the sender's 32-byte outgoing viewing key.
1450
+ * @param opts viewTagActivationLeaf gates the view-tag check for legacy memos.
1451
+ */
1452
+ declare function tryRecoverOutgoing(hint: OutgoingHint, ovk: Uint8Array, opts?: {
1453
+ viewTagActivationLeaf?: number;
1454
+ }): OutgoingNoteRecord | null;
1311
1455
 
1312
1456
  /**
1313
1457
  * Proving what ONE note holds, without granting any power to spend it.
@@ -1732,6 +1876,20 @@ declare function deriveViewingPublicKey(ivsk: Uint8Array): Uint8Array;
1732
1876
  * Returns 0n if BabyJubJub computation fails (e.g. invalid scalar).
1733
1877
  */
1734
1878
  declare function deriveOwnerPk(spendingKey: bigint): bigint;
1879
+ /**
1880
+ * Derive the 32-byte outgoing viewing key (ovk) from master bytes.
1881
+ * ovk = HKDF-SHA256(ikm=masterBytes, info="orbinum-ovk-v1")
1882
+ *
1883
+ * Mirror of the vault-key derivation: rooted at masterBytes, not the spendingKey
1884
+ * scalar (see the derivation chain above for why). The ovk lets the SENDER of a
1885
+ * private transfer recover what they sent — it wraps the memo's shared secret so
1886
+ * a cold restore rebuilds the outgoing history. Sibling of the ivsk, delegable
1887
+ * independently.
1888
+ *
1889
+ * SECRET. Never embed it in a shareable address — it stays out of
1890
+ * encodePrivacyAddress by construction (there is no public component to derive).
1891
+ */
1892
+ declare function deriveOutgoingViewingKey(masterBytes: Uint8Array): Uint8Array;
1735
1893
 
1736
1894
  /**
1737
1895
  * PrivacyKeyManager
@@ -1791,6 +1949,11 @@ declare class PrivacyKeyManager {
1791
1949
  getViewingPublicKeyPacked(): Uint8Array;
1792
1950
  /** Returns the BabyJubJub owner public key (x-coordinate). Throws if not loaded. */
1793
1951
  getOwnerPk(): bigint;
1952
+ /**
1953
+ * Returns the 32-byte outgoing viewing key (ovk). Throws if not loaded.
1954
+ * Used to seal/open the outgoing blob that lets the sender recover a transfer.
1955
+ */
1956
+ getOutgoingViewingKey(): Uint8Array;
1794
1957
  /** Returns the spending key as a 32-byte little-endian Uint8Array. Throws if not loaded. */
1795
1958
  getSpendingKeyBytes(): Uint8Array;
1796
1959
  /**
@@ -4819,6 +4982,15 @@ interface NoteBackupEntry {
4819
4982
  encryptedMemo: string;
4820
4983
  /** Merkle leaf index, when known. Informational — spends re-fetch the proof. */
4821
4984
  leafIndex?: number;
4985
+ /**
4986
+ * Whether the note was already spent when exported. A local status flag (not
4987
+ * a key or secret), carried so a restored vault separates available from spent
4988
+ * without a chain round-trip. A host may still reconcile against the chain
4989
+ * afterward — this is a fast, possibly-stale hint, not the source of truth.
4990
+ */
4991
+ spent?: boolean;
4992
+ /** Local timestamp the note was marked spent, when known. */
4993
+ spentAt?: number | null;
4822
4994
  }
4823
4995
  interface NoteBackup {
4824
4996
  v: typeof NOTE_BACKUP_VERSION;
@@ -4854,9 +5026,45 @@ declare function decodeNoteBackup(json: string | object): NoteBackupEntry[];
4854
5026
  * Ownership is proven by decryption — an entry whose memo does not open under
4855
5027
  * these keys is silently skipped (it is not this user's note). No chain access:
4856
5028
  * only the backup's own memos are tried.
5029
+ *
5030
+ * The decrypted note is reconstructed as unspent; the entry's `spent`/`spentAt`
5031
+ * flags are then applied so a restored vault separates available from spent. A
5032
+ * host may reconcile against the chain afterward if the backup could be stale.
4857
5033
  */
4858
5034
  declare function importNotesFromBackup(entries: NoteBackupEntry[], keys: BackupImportKeys): ZkNote[];
4859
5035
 
5036
+ /**
5037
+ * Reconstruct a note from a payment slip.
5038
+ *
5039
+ * The recipient of a private transfer receives an `orbslip1:` string (or the raw
5040
+ * envelope) that the sender produced. Opening it yields the note's public
5041
+ * locators — commitment, encrypted memo, leaf index — which are fed to the SAME
5042
+ * decryption path a scan uses (`tryDecryptNote`): it decrypts the memo with the
5043
+ * recipient's viewing key, derives the stealth spending key, and verifies the
5044
+ * commitment. The result is a fully spendable `ZkNote`, obtained without scanning
5045
+ * the pool.
5046
+ */
5047
+
5048
+ /** Keys the recipient needs to open a slip and reconstruct the note. */
5049
+ interface SlipImportKeys {
5050
+ /** 32-byte viewing secret key (ivsk) — opens the slip envelope AND the memo. */
5051
+ viewingSecretKey: Uint8Array;
5052
+ /** Spending key scalar — derives the note's nullifier / stealth key. */
5053
+ spendingKey: bigint;
5054
+ /** The recipient's global owner pk (Ax), for stealth detection. */
5055
+ ownerPk: bigint;
5056
+ }
5057
+ /**
5058
+ * Open a slip and reconstruct its note, or null.
5059
+ *
5060
+ * Accepts an `orbslip1:` string or a raw envelope. Returns null when the slip is
5061
+ * not this recipient's (envelope does not decrypt), or when the memo does not
5062
+ * belong to them, or when the recomputed commitment does not match — the last
5063
+ * check (inside `tryDecryptNote`) is what stops a forged slip from planting a
5064
+ * phantom note. Never throws.
5065
+ */
5066
+ declare function importPaymentSlip(slip: string | Uint8Array, keys: SlipImportKeys): ZkNote | null;
5067
+
4860
5068
  /**
4861
5069
  * The steps every spend shares, in the order a spend performs them.
4862
5070
  *
@@ -4976,7 +5184,15 @@ interface TransferParams {
4976
5184
  senderPk?: bigint | undefined;
4977
5185
  fee?: bigint | undefined;
4978
5186
  }
4979
- declare function transferNotes(deps: TransferDeps, params: TransferParams, onProgress?: (step: TransferStep) => void): Promise<TxResult>;
5187
+ /**
5188
+ * A transfer result, plus — for a transfer to another user — a `paymentSlip`:
5189
+ * the `orbslip1:` string the sender can hand the recipient so they rebuild their
5190
+ * note without scanning. Absent for self-transfers and change-only transfers.
5191
+ */
5192
+ type TransferResult = TxResult & {
5193
+ paymentSlip?: string;
5194
+ };
5195
+ declare function transferNotes(deps: TransferDeps, params: TransferParams, onProgress?: (step: TransferStep) => void): Promise<TransferResult>;
4980
5196
 
4981
5197
  type UnshieldStep = 'fetching-proof' | 'checking-nullifier' | 'generating-zk' | 'submitting';
4982
5198
  /** The extrinsic arguments, marshalled and ready for whatever transport submits them. */
@@ -5464,4 +5680,4 @@ declare class OrbinumWallet {
5464
5680
  private requireKey;
5465
5681
  }
5466
5682
 
5467
- export { type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BackupImportKeys, type BlockInfo, type BuildNoteDeps, type BuildNoteParams, type Bytes32, CachedNullifier, type ChainInfo, ChainModule, type ChunkInfo, CircuitId, CircuitVersionResolver, type ClaimShieldedFeesParams, type ClientProviderConfig, type CoinSelection, type CollectScanEntriesParams, type CommitmentsInsertedEvent, type ConnectionStatus, type CryptoKey$1 as CryptoKey, CryptoPrecompiles, type DecodedPrecompile, DecryptPool, DecryptedMemo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, EncryptedNoteRecord, EncryptedTxRecord, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFacts, type ExtrinsicRecord, type FeeClaimDeps, type FeeClaimParams, type FeeClaimProofInputs, type FeeClaimProofOutput, type FeeClaimStep, type FormatOptions, KNOWN_PALLET_ERRORS, KNOWN_PRECOMPILES, type KnownPrecompileInfo, LEAVES_PER_TREE, MIN_GASLESS_FEE, MIN_SIGNATURE_BYTES, MemoryVaultStorage, type MerkleRootUpdatedEvent, type MutableWalletSession, NATIVE_ASSET_ID, NOTE_BACKUP_VERSION, NOTE_BIGINT_FIELDS, NOTE_TRANSFER_URI_SCHEME, type NoteBackup, type NoteBackupEntry, type NoteBuildKeys, NoteBuilder, type NoteDisclosure, NoteInput, NoteStatusUpdate, NoteStorage, type NoteTransferEntry, type NoteTransferPayload, type NoteWithMeta, type NotesCache, NullifierCache, type NullifierChunkBody, type NullifierManifest, type NullifierSource, NullifierSyncMeta, type NullifierTail, type NullifiersSpentEvent, type ObservableNotesCache, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, OrbinumWallet, type OrbinumWalletConfig, PAGE_SIZE, PRECOMPILE_ADDR, type PairwiseEphWindowEntry, type PalletErrorKind, type PersistParams, type PrecompileMethod, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type ProofOptions, type ProviderFactory, QR_PAGE_MAX_CHARS, RECOVERED_TX_RESULT, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type ReconstructDeps, type ReconstructedTxRecord, type RegisterAssetArgs, type RelayerInfo, RelayerStatusModule, type ResolveSpentSetParams, type ResolvedProverVersion, type ResolvedSpendVersion, type RpcV2MerkleProof, RpcV2Module, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, type RunScanParams, SPENDING_KEY_CANONICAL_ORIGIN, SPENDING_KEY_VERIFYING_CONTRACT, SPENDING_KEY_WARNING, type ScanChunkManifest, ScanCommitment, type ScanHint, type ScanHintPage, type ScanHintSource, ScanKeys, type ScanOptions, type ScanOutcome, type ScanProgress, type ScanResult, SecretStore, type SelfEphWindowEntry, type SelfStealthKeys, type SessionCacheDeps, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedEvent, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, SpendDetails, type SpendPlanProblem, type SpendPrivacyReads, type SpendVault, type SpendableInputsCheck, type SpendingKeyTypedData, type StatusChangeEvent, type StatusListener, SubstrateClient, type SystemHealth, TRANSFER_INPUTS, TRANSFER_OUTPUTS, type TokenInfo, type TokenTransfer, type TransferDeps, type TransferFactsRow, type TransferFactsSource, type TransferInputNote, type TransferOutputNote, type TransferParams, type TransferPlan, type TransferStep, type TransferSubmitRequest, type TxFactsSource, TxHistoryStore, type TxKind, type TxLandingPollOptions, type TxResult, type UnsafeTxOptions, type UnshieldArgs, type UnshieldDeps, type UnshieldNoteParams, type UnshieldParams, type UnshieldPlan, type UnshieldProofInputs, type UnshieldProofResult, type UnshieldStep, type UnshieldSubmitRequest, type UnshieldedEvent, type UnverifyAssetArgs, VAULT_SCHEMA_VERSION, VaultConfigRecord, VaultLockedError, VaultStorage, VaultStore, type VaultStoreDeps, type VaultUnlockOptions, type VerifyAssetArgs, type VersionedArtifactProvider, type WalletScanKeys, type WalletSession, ZkNote, type ZkVerifierCircuitVersionInfo, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, addressToFieldElement, applyBatch, applyNoteStatus, assembleNoteTransfer, base64UrlDecode, base64UrlEncode, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildConfig, buildDummyTransferInput, buildShieldBatchOperations, buildShieldParams, buildZkNote, bytesToBigintLE, bytesToBjjScalar, cacheSession, canPairWith, canonicalAccountId, chainActiveCircuitVersion, checkSpendableInputs, claimFees, classifyChainError, clearSession, collectNullifiersToQuery, collectScanEntries, commitmentHexOf, computeNoteCommitment, computeNullifier, computePathIndices, connectInjectedExtension, createNoteDisclosureKey, createNotesCache, createWalletSession, decodeNoteBackup, decodeNoteDisclosureKey, decodeNoteTransferPage, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, derivePairwiseEphSk, derivePairwiseSharedSecret, deriveSelfEphSk, deriveSpendingKeyFromMaster, deriveSpendingKeyFromSignature, deriveSpendingKeyMessageV2, deriveSpendingKeyTypedData, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewTag, deriveViewingPublicKey, deriveViewingSecretKey, detectCommitmentMismatch, encodeNoteBackup, encodeNoteTransferPages, encryptJson, encryptNote, ensureCreatedAt, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, extractPalletError, failed, fastMulBase, fastMulPoint, fetchExtrinsicFacts, formatAmountPlain, formatBalance, formatORB, fromBase64, fromHex, gapMargin, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getInjectedExtensions, getPrecompileLabel, hasCachedSession, hasInjectedExtensions, hexToBigint, hexToNumber, implicitSubstrateToEvm, importNotesFromBackup, isAbortError, isAlreadySpentError, isConnectionLossError, isEvmAddress, isGhostNoteError, isImplicitEvmAccount, isNativeAsset, isNoteSelfConsistent, isSpendable, isSs58, isSubstrateAddress, isUnifiedAddress, isValidLeafIndex, leHexToBigint, mapExtrinsicArgs, mapZkEventData, markInputsSpent, normalizeChainFingerprint, normalizeEvmAddress, normalizeNote, normalizeNotes, noteBlindTag, noteCreatedAt, noteCreatedTxHash, noteMatchesCommitment, noteOrigin, noteSpentTxHash, noteToTransferEntry, noteTxKind, pairwiseEphWindow, palletErrorKind, parseAmount, parseEvmAddress, persistCursor, persistScanResults, planTransfer, planUnshield, randomBlinding, reconstructOutgoingTxRecords, recoverOwnerPkPoint, recoverSelfStealthNote, refuseIfAlreadySpent, removeByCommitment, requireSessionKeys, reservePairwiseIndex, reserveSelfEphIndex, resolveSelfEphCeiling, resolveSpentSet, resolveSpentStatus, restoreSession, runScan, scalarToHex, scanAbortError, selectGhosts, selectNotes, selfEphWindow, serializeMemo, sessionCacheKey, shortHash, signAndSubmitTx, spendableBalance, stampCreatedAt, stampCreatedTxHash, stampSpentTxHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, transferNotes, treeIdOf, treeOf, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, txLandedAfterError, unshieldNote, upsertNote, vaultReplacer, vaultReviver, vaultStorageName, windowSizeForCounter };
5683
+ export { type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BackupImportKeys, type BlockInfo, type BuildNoteDeps, type BuildNoteParams, type Bytes32, CachedNullifier, type ChainInfo, ChainModule, type ChunkInfo, CircuitId, CircuitVersionResolver, type ClaimShieldedFeesParams, type ClientProviderConfig, type CoinSelection, type CollectScanEntriesParams, type CommitmentsInsertedEvent, type ConnectionStatus, type CryptoKey$1 as CryptoKey, CryptoPrecompiles, type DecodedPrecompile, DecryptPool, DecryptedMemo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, EncryptedNoteRecord, EncryptedTxRecord, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFacts, type ExtrinsicRecord, type FeeClaimDeps, type FeeClaimParams, type FeeClaimProofInputs, type FeeClaimProofOutput, type FeeClaimStep, type FormatOptions, KNOWN_PALLET_ERRORS, KNOWN_PRECOMPILES, type KnownPrecompileInfo, LEAVES_PER_TREE, MIN_GASLESS_FEE, MIN_SIGNATURE_BYTES, MemoryVaultStorage, type MerkleRootUpdatedEvent, type MutableWalletSession, NATIVE_ASSET_ID, NOTE_BACKUP_VERSION, NOTE_BIGINT_FIELDS, NOTE_TRANSFER_URI_SCHEME, type NoteBackup, type NoteBackupEntry, type NoteBuildKeys, NoteBuilder, type NoteDisclosure, NoteInput, NoteStatusUpdate, NoteStorage, type NoteTransferEntry, type NoteTransferPayload, type NoteWithMeta, type NotesCache, NullifierCache, type NullifierChunkBody, type NullifierManifest, type NullifierSource, NullifierSyncMeta, type NullifierTail, type NullifiersSpentEvent, OVK_BLOB_SIZE, type ObservableNotesCache, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, OrbinumWallet, type OrbinumWalletConfig, type OutgoingHint, OutgoingNoteRecord, PAGE_SIZE, PAYMENT_SLIP_SCHEME, PRECOMPILE_ADDR, type PairwiseEphWindowEntry, type PalletErrorKind, type PaymentSlipFields, type PersistParams, type PrecompileMethod, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type ProofOptions, type ProviderFactory, QR_PAGE_MAX_CHARS, RECOVERED_TX_RESULT, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type ReconstructDeps, type ReconstructedTxRecord, type RegisterAssetArgs, type RelayerInfo, RelayerStatusModule, type ResolveSpentSetParams, type ResolvedProverVersion, type ResolvedSpendVersion, type RpcV2MerkleProof, RpcV2Module, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, type RunScanParams, SPENDING_KEY_CANONICAL_ORIGIN, SPENDING_KEY_VERIFYING_CONTRACT, SPENDING_KEY_WARNING, type ScanChunkManifest, ScanCommitment, type ScanHint, type ScanHintPage, type ScanHintSource, ScanKeys, type ScanOptions, type ScanOutcome, type ScanProgress, type ScanResult, SecretStore, type SelfEphWindowEntry, type SelfStealthKeys, type SessionCacheDeps, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedEvent, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, type SlipImportKeys, SpendDetails, type SpendPlanProblem, type SpendPrivacyReads, type SpendVault, type SpendableInputsCheck, type SpendingKeyTypedData, type StatusChangeEvent, type StatusListener, SubstrateClient, type SystemHealth, TRANSFER_INPUTS, TRANSFER_OUTPUTS, type TokenInfo, type TokenTransfer, type TransferDeps, type TransferFactsRow, type TransferFactsSource, type TransferInputNote, type TransferOutputNote, type TransferParams, type TransferPlan, type TransferResult, type TransferStep, type TransferSubmitRequest, type TxFactsSource, TxHistoryStore, type TxKind, type TxLandingPollOptions, type TxResult, type UnsafeTxOptions, type UnshieldArgs, type UnshieldDeps, type UnshieldNoteParams, type UnshieldParams, type UnshieldPlan, type UnshieldProofInputs, type UnshieldProofResult, type UnshieldStep, type UnshieldSubmitRequest, type UnshieldedEvent, type UnverifyAssetArgs, VAULT_SCHEMA_VERSION, VaultConfigRecord, VaultLockedError, VaultStorage, VaultStore, type VaultStoreDeps, type VaultUnlockOptions, type VerifyAssetArgs, type VersionedArtifactProvider, type WalletScanKeys, type WalletSession, ZkNote, type ZkVerifierCircuitVersionInfo, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, addressToFieldElement, applyBatch, applyNoteStatus, assembleNoteTransfer, base64UrlDecode, base64UrlEncode, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildConfig, buildDummyTransferInput, buildShieldBatchOperations, buildShieldParams, buildZkNote, bytesToBigintLE, bytesToBjjScalar, cacheSession, canPairWith, canonicalAccountId, chainActiveCircuitVersion, checkSpendableInputs, claimFees, classifyChainError, clearSession, collectNullifiersToQuery, collectScanEntries, commitmentHexOf, computeNoteCommitment, computeNullifier, computePathIndices, connectInjectedExtension, createNoteDisclosureKey, createNotesCache, createWalletSession, decodeNoteBackup, decodeNoteDisclosureKey, decodeNoteTransferPage, decodePaymentSlip, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOutgoingCipherKey, deriveOutgoingViewingKey, deriveOwnerPk, derivePairwiseEphSk, derivePairwiseSharedSecret, deriveSelfEphSk, deriveSpendingKeyFromMaster, deriveSpendingKeyFromSignature, deriveSpendingKeyMessageV2, deriveSpendingKeyTypedData, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewTag, deriveViewingPublicKey, deriveViewingSecretKey, detectCommitmentMismatch, encodeNoteBackup, encodeNoteTransferPages, encodePaymentSlip, encryptJson, encryptNote, ensureCreatedAt, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, extractPalletError, failed, fastMulBase, fastMulPoint, fetchExtrinsicFacts, formatAmountPlain, formatBalance, formatORB, fromBase64, fromHex, gapMargin, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getInjectedExtensions, getPrecompileLabel, hasCachedSession, hasInjectedExtensions, hexToBigint, hexToNumber, implicitSubstrateToEvm, importNotesFromBackup, importPaymentSlip, isAbortError, isAlreadySpentError, isConnectionLossError, isEvmAddress, isGhostNoteError, isImplicitEvmAccount, isNativeAsset, isNoteSelfConsistent, isSpendable, isSs58, isSubstrateAddress, isUnifiedAddress, isValidLeafIndex, leHexToBigint, mapExtrinsicArgs, mapZkEventData, markInputsSpent, normalizeChainFingerprint, normalizeEvmAddress, normalizeNote, normalizeNotes, noteBlindTag, noteCreatedAt, noteCreatedTxHash, noteMatchesCommitment, noteOrigin, noteSpentTxHash, noteToTransferEntry, noteTxKind, openOutgoingBlob, openPaymentSlip, pairwiseEphWindow, palletErrorKind, parseAmount, parseEvmAddress, persistCursor, persistScanResults, planTransfer, planUnshield, randomBlinding, randomOutgoingBlob, reconstructOutgoingTxRecords, recoverOwnerPkPoint, recoverSelfStealthNote, refuseIfAlreadySpent, removeByCommitment, requireSessionKeys, reservePairwiseIndex, reserveSelfEphIndex, resolveSelfEphCeiling, resolveSpentSet, resolveSpentStatus, restoreSession, runScan, scalarToHex, scanAbortError, sealOutgoingBlob, sealPaymentSlip, selectGhosts, selectNotes, selfEphWindow, serializeMemo, sessionCacheKey, shortHash, signAndSubmitTx, spendableBalance, stampCreatedAt, stampCreatedTxHash, stampSpentTxHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, transferNotes, treeIdOf, treeOf, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, tryRecoverOutgoing, txLandedAfterError, unshieldNote, upsertNote, vaultReplacer, vaultReviver, vaultStorageName, windowSizeForCounter };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as ZkNote, D as DecryptedMemo, N as NoteInput, S as ScanCommitment, a as DecryptPool, b as ScanKeys } from './index-JYVjYJtf.js';
2
- export { C as CURRENT_CIRCUIT_VERSION, c as DECRYPT_YIELD_EVERY, d as DecryptBatchResult, e as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, f as KnownEphWindow, M as MAX_WORKERS, g as MatchSource, h as MerkleTreeInfo, P as PAIRWISE_EPH_WINDOW, i as SELF_EPH_WINDOW, W as WORKER_CRASHED, j as WorkerFactory, k as WorkerLike, l as WorkerMessage, m as clearKnownEphWindow, n as createDecryptPool, o as createMainThreadPool, p as createWorkerPool, q as decryptHintBatch, r as getKnownEphWindow } from './index-JYVjYJtf.js';
1
+ import { Z as ZkNote, D as DecryptedMemo, N as NoteInput, S as ScanCommitment, O as OutgoingNoteRecord, a as DecryptPool, b as ScanKeys } from './index-V5Z9igEN.js';
2
+ export { C as CURRENT_CIRCUIT_VERSION, c as DECRYPT_YIELD_EVERY, d as DecryptBatchResult, e as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, f as KnownEphWindow, M as MAX_WORKERS, g as MatchSource, h as MerkleTreeInfo, P as PAIRWISE_EPH_WINDOW, i as SELF_EPH_WINDOW, W as WORKER_CRASHED, j as WorkerFactory, k as WorkerLike, l as WorkerMessage, m as clearKnownEphWindow, n as createDecryptPool, o as createMainThreadPool, p as createWorkerPool, q as decryptHintBatch, r as getKnownEphWindow } from './index-V5Z9igEN.js';
3
3
  import { ArtifactProvider, ProofResult, CircuitType } from '@orbinum/proof-generator';
4
4
  export { ArtifactProvider, CircuitType, ProofResult, WebArtifactProvider, shouldProveSingleThreaded } from '@orbinum/proof-generator';
5
5
  import * as polkadot_api from 'polkadot-api';
@@ -1107,6 +1107,115 @@ declare function serializeMemo(value: bigint, ownerPk: Uint8Array, blinding: Uin
1107
1107
  */
1108
1108
  declare function deriveViewTag(sharedSecret: Uint8Array): number;
1109
1109
 
1110
+ /**
1111
+ * OutgoingBlob — the OVK "wrap-the-key" primitive.
1112
+ *
1113
+ * When a wallet sends a private_transfer, the recipient's memo is encrypted ECDH
1114
+ * toward the RECIPIENT's ivk; the sender cannot reopen it, so a cold restore
1115
+ * loses the outgoing history (who/how much). This blob fixes that: it wraps the
1116
+ * memo's 32-byte `sharedSecret` under a key derived from the SENDER's ovk. On
1117
+ * restore the sender unwraps the sharedSecret and feeds it to the SAME memo
1118
+ * decryption path the recipient uses — one decryption routine in the whole
1119
+ * system (OVK plan requirement #7).
1120
+ *
1121
+ * This is Zcash Sapling's `outCiphertext` / Penumbra's `OvkWrappedKey`, adapted
1122
+ * to a shared secret that is a field element (32 bytes), not a group point — so
1123
+ * the blob contains no group element to decode, sidestepping Zcash's canonical-
1124
+ * encoding class of bugs.
1125
+ *
1126
+ * Layout (56 bytes): nonce_suffix(8) || ciphertext(32) || MAC(16).
1127
+ * Cipher: ChaCha20-Poly1305 (IETF), same primitive as EncryptedMemo.
1128
+ *
1129
+ * The outgoing cipher key binds every unique-per-output public value:
1130
+ * ock = HKDF(ikm=ovk, salt=commitment_bytes||ephPk_bytes, info=OCK_DOMAIN)
1131
+ * so each ock encrypts exactly one message. Uniqueness comes from the COMMITMENT
1132
+ * (Poseidon4 with random blinding, consensus rejects duplicates); the ephPk adds
1133
+ * the on-chain binding, not the uniqueness — two self-notes can share an ephPk
1134
+ * but never a commitment, so their ock still differs.
1135
+ *
1136
+ * SALT IS RAW ON-CHAIN BYTES. `commitment_bytes` and `ephPk_bytes` must be the
1137
+ * exact bytes that are/go on chain, never a re-serialization of a decoded point:
1138
+ * two encodings of "the same point" produce different ock and the AEAD fails —
1139
+ * no ambiguity to exploit.
1140
+ */
1141
+ /** Total on-chain blob size: nonce_suffix(8) || ciphertext(32) || MAC(16). */
1142
+ declare const OVK_BLOB_SIZE: number;
1143
+ /**
1144
+ * Derive the 32-byte outgoing cipher key.
1145
+ * ock = HKDF-SHA256(ikm=ovk, salt=commitmentBytes||ephPkBytes, info=OCK_DOMAIN)
1146
+ *
1147
+ * Both salt parts must be the raw 32-byte on-chain values (see file header).
1148
+ * Throws if either is not exactly 32 bytes — a wrong length here would silently
1149
+ * change the key and make recovery fail far from the cause.
1150
+ */
1151
+ declare function deriveOutgoingCipherKey(ovk: Uint8Array, commitmentBytes: Uint8Array, ephPkBytes: Uint8Array): Uint8Array;
1152
+ /**
1153
+ * Seal a sharedSecret into a 56-byte outgoing blob under the sender's ovk.
1154
+ *
1155
+ * @param ovk sender's 32-byte outgoing viewing key
1156
+ * @param sharedSecret the memo's 32-byte ECDH shared secret (what we wrap)
1157
+ * @param commitmentBytes raw 32-byte on-chain commitment of the recipient output
1158
+ * @param ephPkBytes raw 32-byte ephemeral public key (from the memo, not recomputed)
1159
+ * @returns 56 bytes: nonce_suffix(8) || ciphertext(32) || MAC(16)
1160
+ */
1161
+ declare function sealOutgoingBlob(ovk: Uint8Array, sharedSecret: Uint8Array, commitmentBytes: Uint8Array, ephPkBytes: Uint8Array): Uint8Array;
1162
+ /**
1163
+ * Open an outgoing blob, returning the wrapped sharedSecret or null.
1164
+ *
1165
+ * Never throws — this runs in recovery loops over hints that may be foreign,
1166
+ * pre-OVK, or ovk=⊥ random. A wrong ovk, wrong commitment, wrong ephPk, or any
1167
+ * corrupted byte fails the MAC and returns null.
1168
+ */
1169
+ declare function openOutgoingBlob(ovk: Uint8Array, blob: Uint8Array, commitmentBytes: Uint8Array, ephPkBytes: Uint8Array): Uint8Array | null;
1170
+ /**
1171
+ * A 56-byte random blob for the ovk=⊥ case (sender opts out of recoverability).
1172
+ *
1173
+ * Indistinguishable on-chain from a real blob: a real one is a random 8-byte
1174
+ * suffix plus ChaCha20/Poly1305 output, both uniform without the key. This is
1175
+ * the ONLY path for ⊥ — never zeros (distinguishable), never omission (a length
1176
+ * or SCALE-tag difference is a permanent, retroactive privacy label).
1177
+ */
1178
+ declare function randomOutgoingBlob(): Uint8Array;
1179
+
1180
+ /** The fields a payment slip carries — all public on-chain. */
1181
+ interface PaymentSlipFields {
1182
+ /** 0x-prefixed 32-byte LE commitment hex of the recipient output. */
1183
+ commitmentHex: string;
1184
+ /** 0x-prefixed encrypted memo hex (180 bytes) of the recipient output. */
1185
+ encryptedMemo: string;
1186
+ /** Merkle leaf index, when known. Informational — spends re-fetch the proof. */
1187
+ leafIndex?: number;
1188
+ /** Transaction hash of the transfer, when known. Informational — a reference
1189
+ * the recipient can show as proof of the payment; not needed to reconstruct. */
1190
+ txHash?: string;
1191
+ }
1192
+ /**
1193
+ * Seal slip fields toward a recipient.
1194
+ *
1195
+ * A fresh ephemeral keypair is generated; `sharedSecret = [ephSk]·recipientIvk`
1196
+ * is the ECDH secret only the recipient can reproduce (with their `ivsk`). The
1197
+ * ephemeral public key travels in the clear so the recipient can run ECDH.
1198
+ *
1199
+ * @param recipientIvkPacked 32-byte LE packed BJJ viewing public key of the recipient
1200
+ * @param fields the slip fields to seal
1201
+ * @returns envelope: ephPk(32) || nonce_suffix(8) || ciphertext || MAC(16)
1202
+ */
1203
+ declare function sealPaymentSlip(recipientIvkPacked: Uint8Array, fields: PaymentSlipFields): Uint8Array;
1204
+ /**
1205
+ * Open a payment slip with the recipient's viewing secret key. Returns the fields
1206
+ * or null (not ours / corrupt). Never throws — safe in import loops.
1207
+ */
1208
+ declare function openPaymentSlip(recipientIvsk: Uint8Array, envelope: Uint8Array): PaymentSlipFields | null;
1209
+ /** URI scheme prefix. The version is in the name, so a v2 reader can refuse a v1. */
1210
+ declare const PAYMENT_SLIP_SCHEME = "orbslip1:";
1211
+ /** Encode a sealed slip envelope into a shareable `orbslip1:` string. */
1212
+ declare function encodePaymentSlip(envelope: Uint8Array): string;
1213
+ /**
1214
+ * Decode an `orbslip1:` string back into the sealed envelope, or null. A wrong
1215
+ * scheme, a bad checksum (mistyped/truncated), or malformed payload returns null.
1216
+ */
1217
+ declare function decodePaymentSlip(text: string): Uint8Array | null;
1218
+
1110
1219
  /**
1111
1220
  * Derive the deterministic 32-byte ephemeral secret for self-note `index`.
1112
1221
  * Feed it to EncryptedMemo.encrypt / NoteBuilder.build as `ephSkOverride`.
@@ -1308,6 +1417,41 @@ declare function tryDecryptNoteVerbose(commitment: ScanCommitment, viewingSecret
1308
1417
  note: ZkNote | null;
1309
1418
  reason?: string;
1310
1419
  };
1420
+ /** A scan hint plus the per-transaction OVK blob the indexer serves alongside it. */
1421
+ type OutgoingHint = ScanCommitment & {
1422
+ ovkBlob?: string | null;
1423
+ };
1424
+ /**
1425
+ * Recover a note the caller SENT, using their outgoing viewing key (ovk).
1426
+ *
1427
+ * The sender's memo was encrypted toward the RECIPIENT, so they cannot reopen it
1428
+ * directly. Instead the ovk blob wraps the memo's shared secret; unwrapping it
1429
+ * gives the same secret the recipient gets via ECDH, and feeding it to the shared
1430
+ * decrypt-and-verify step rebuilds the sent note's public facts.
1431
+ *
1432
+ * Returns an OutgoingNoteRecord (value, recipient stealth pk, counterparty,
1433
+ * circuit version) — NEVER a spendable note: no spendingKey, no nullifier. The
1434
+ * sender does not own this note. Never throws (runs in recovery loops).
1435
+ *
1436
+ * Security (OVK plan §3.4), in three non-algebraic but sound layers:
1437
+ * 1. The blob MAC (openOutgoingBlob) proves whoever wrote it knew the ovk, and
1438
+ * the ock binds it to THIS (commitment, ephPk) — blobs are not transplantable.
1439
+ * 2. The memo MAC (inside decryptAndVerifyPlaintext) proves this shared secret
1440
+ * is the one that encrypted this memo — the same secret the recipient derives.
1441
+ * 3. The commitment check ties the recovered fields to the note in the tree.
1442
+ * Not verifiable by the sender: that `sharedSecret` corresponds to `ephPk` — that
1443
+ * needs the recipient's ivsk. Residual: a leaked ovk lets an attacker fabricate a
1444
+ * self-consistent (commitment, memo, blob) and plant false outgoing history. It
1445
+ * moves no funds; Zcash accepts the same residual. Mitigated in the app by only
1446
+ * running this over commitments from extrinsics that spent our own nullifiers.
1447
+ *
1448
+ * @param hint scan hint with commitmentHex, encryptedMemo, and ovkBlob.
1449
+ * @param ovk the sender's 32-byte outgoing viewing key.
1450
+ * @param opts viewTagActivationLeaf gates the view-tag check for legacy memos.
1451
+ */
1452
+ declare function tryRecoverOutgoing(hint: OutgoingHint, ovk: Uint8Array, opts?: {
1453
+ viewTagActivationLeaf?: number;
1454
+ }): OutgoingNoteRecord | null;
1311
1455
 
1312
1456
  /**
1313
1457
  * Proving what ONE note holds, without granting any power to spend it.
@@ -1732,6 +1876,20 @@ declare function deriveViewingPublicKey(ivsk: Uint8Array): Uint8Array;
1732
1876
  * Returns 0n if BabyJubJub computation fails (e.g. invalid scalar).
1733
1877
  */
1734
1878
  declare function deriveOwnerPk(spendingKey: bigint): bigint;
1879
+ /**
1880
+ * Derive the 32-byte outgoing viewing key (ovk) from master bytes.
1881
+ * ovk = HKDF-SHA256(ikm=masterBytes, info="orbinum-ovk-v1")
1882
+ *
1883
+ * Mirror of the vault-key derivation: rooted at masterBytes, not the spendingKey
1884
+ * scalar (see the derivation chain above for why). The ovk lets the SENDER of a
1885
+ * private transfer recover what they sent — it wraps the memo's shared secret so
1886
+ * a cold restore rebuilds the outgoing history. Sibling of the ivsk, delegable
1887
+ * independently.
1888
+ *
1889
+ * SECRET. Never embed it in a shareable address — it stays out of
1890
+ * encodePrivacyAddress by construction (there is no public component to derive).
1891
+ */
1892
+ declare function deriveOutgoingViewingKey(masterBytes: Uint8Array): Uint8Array;
1735
1893
 
1736
1894
  /**
1737
1895
  * PrivacyKeyManager
@@ -1791,6 +1949,11 @@ declare class PrivacyKeyManager {
1791
1949
  getViewingPublicKeyPacked(): Uint8Array;
1792
1950
  /** Returns the BabyJubJub owner public key (x-coordinate). Throws if not loaded. */
1793
1951
  getOwnerPk(): bigint;
1952
+ /**
1953
+ * Returns the 32-byte outgoing viewing key (ovk). Throws if not loaded.
1954
+ * Used to seal/open the outgoing blob that lets the sender recover a transfer.
1955
+ */
1956
+ getOutgoingViewingKey(): Uint8Array;
1794
1957
  /** Returns the spending key as a 32-byte little-endian Uint8Array. Throws if not loaded. */
1795
1958
  getSpendingKeyBytes(): Uint8Array;
1796
1959
  /**
@@ -4819,6 +4982,15 @@ interface NoteBackupEntry {
4819
4982
  encryptedMemo: string;
4820
4983
  /** Merkle leaf index, when known. Informational — spends re-fetch the proof. */
4821
4984
  leafIndex?: number;
4985
+ /**
4986
+ * Whether the note was already spent when exported. A local status flag (not
4987
+ * a key or secret), carried so a restored vault separates available from spent
4988
+ * without a chain round-trip. A host may still reconcile against the chain
4989
+ * afterward — this is a fast, possibly-stale hint, not the source of truth.
4990
+ */
4991
+ spent?: boolean;
4992
+ /** Local timestamp the note was marked spent, when known. */
4993
+ spentAt?: number | null;
4822
4994
  }
4823
4995
  interface NoteBackup {
4824
4996
  v: typeof NOTE_BACKUP_VERSION;
@@ -4854,9 +5026,45 @@ declare function decodeNoteBackup(json: string | object): NoteBackupEntry[];
4854
5026
  * Ownership is proven by decryption — an entry whose memo does not open under
4855
5027
  * these keys is silently skipped (it is not this user's note). No chain access:
4856
5028
  * only the backup's own memos are tried.
5029
+ *
5030
+ * The decrypted note is reconstructed as unspent; the entry's `spent`/`spentAt`
5031
+ * flags are then applied so a restored vault separates available from spent. A
5032
+ * host may reconcile against the chain afterward if the backup could be stale.
4857
5033
  */
4858
5034
  declare function importNotesFromBackup(entries: NoteBackupEntry[], keys: BackupImportKeys): ZkNote[];
4859
5035
 
5036
+ /**
5037
+ * Reconstruct a note from a payment slip.
5038
+ *
5039
+ * The recipient of a private transfer receives an `orbslip1:` string (or the raw
5040
+ * envelope) that the sender produced. Opening it yields the note's public
5041
+ * locators — commitment, encrypted memo, leaf index — which are fed to the SAME
5042
+ * decryption path a scan uses (`tryDecryptNote`): it decrypts the memo with the
5043
+ * recipient's viewing key, derives the stealth spending key, and verifies the
5044
+ * commitment. The result is a fully spendable `ZkNote`, obtained without scanning
5045
+ * the pool.
5046
+ */
5047
+
5048
+ /** Keys the recipient needs to open a slip and reconstruct the note. */
5049
+ interface SlipImportKeys {
5050
+ /** 32-byte viewing secret key (ivsk) — opens the slip envelope AND the memo. */
5051
+ viewingSecretKey: Uint8Array;
5052
+ /** Spending key scalar — derives the note's nullifier / stealth key. */
5053
+ spendingKey: bigint;
5054
+ /** The recipient's global owner pk (Ax), for stealth detection. */
5055
+ ownerPk: bigint;
5056
+ }
5057
+ /**
5058
+ * Open a slip and reconstruct its note, or null.
5059
+ *
5060
+ * Accepts an `orbslip1:` string or a raw envelope. Returns null when the slip is
5061
+ * not this recipient's (envelope does not decrypt), or when the memo does not
5062
+ * belong to them, or when the recomputed commitment does not match — the last
5063
+ * check (inside `tryDecryptNote`) is what stops a forged slip from planting a
5064
+ * phantom note. Never throws.
5065
+ */
5066
+ declare function importPaymentSlip(slip: string | Uint8Array, keys: SlipImportKeys): ZkNote | null;
5067
+
4860
5068
  /**
4861
5069
  * The steps every spend shares, in the order a spend performs them.
4862
5070
  *
@@ -4976,7 +5184,15 @@ interface TransferParams {
4976
5184
  senderPk?: bigint | undefined;
4977
5185
  fee?: bigint | undefined;
4978
5186
  }
4979
- declare function transferNotes(deps: TransferDeps, params: TransferParams, onProgress?: (step: TransferStep) => void): Promise<TxResult>;
5187
+ /**
5188
+ * A transfer result, plus — for a transfer to another user — a `paymentSlip`:
5189
+ * the `orbslip1:` string the sender can hand the recipient so they rebuild their
5190
+ * note without scanning. Absent for self-transfers and change-only transfers.
5191
+ */
5192
+ type TransferResult = TxResult & {
5193
+ paymentSlip?: string;
5194
+ };
5195
+ declare function transferNotes(deps: TransferDeps, params: TransferParams, onProgress?: (step: TransferStep) => void): Promise<TransferResult>;
4980
5196
 
4981
5197
  type UnshieldStep = 'fetching-proof' | 'checking-nullifier' | 'generating-zk' | 'submitting';
4982
5198
  /** The extrinsic arguments, marshalled and ready for whatever transport submits them. */
@@ -5464,4 +5680,4 @@ declare class OrbinumWallet {
5464
5680
  private requireKey;
5465
5681
  }
5466
5682
 
5467
- export { type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BackupImportKeys, type BlockInfo, type BuildNoteDeps, type BuildNoteParams, type Bytes32, CachedNullifier, type ChainInfo, ChainModule, type ChunkInfo, CircuitId, CircuitVersionResolver, type ClaimShieldedFeesParams, type ClientProviderConfig, type CoinSelection, type CollectScanEntriesParams, type CommitmentsInsertedEvent, type ConnectionStatus, type CryptoKey$1 as CryptoKey, CryptoPrecompiles, type DecodedPrecompile, DecryptPool, DecryptedMemo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, EncryptedNoteRecord, EncryptedTxRecord, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFacts, type ExtrinsicRecord, type FeeClaimDeps, type FeeClaimParams, type FeeClaimProofInputs, type FeeClaimProofOutput, type FeeClaimStep, type FormatOptions, KNOWN_PALLET_ERRORS, KNOWN_PRECOMPILES, type KnownPrecompileInfo, LEAVES_PER_TREE, MIN_GASLESS_FEE, MIN_SIGNATURE_BYTES, MemoryVaultStorage, type MerkleRootUpdatedEvent, type MutableWalletSession, NATIVE_ASSET_ID, NOTE_BACKUP_VERSION, NOTE_BIGINT_FIELDS, NOTE_TRANSFER_URI_SCHEME, type NoteBackup, type NoteBackupEntry, type NoteBuildKeys, NoteBuilder, type NoteDisclosure, NoteInput, NoteStatusUpdate, NoteStorage, type NoteTransferEntry, type NoteTransferPayload, type NoteWithMeta, type NotesCache, NullifierCache, type NullifierChunkBody, type NullifierManifest, type NullifierSource, NullifierSyncMeta, type NullifierTail, type NullifiersSpentEvent, type ObservableNotesCache, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, OrbinumWallet, type OrbinumWalletConfig, PAGE_SIZE, PRECOMPILE_ADDR, type PairwiseEphWindowEntry, type PalletErrorKind, type PersistParams, type PrecompileMethod, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type ProofOptions, type ProviderFactory, QR_PAGE_MAX_CHARS, RECOVERED_TX_RESULT, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type ReconstructDeps, type ReconstructedTxRecord, type RegisterAssetArgs, type RelayerInfo, RelayerStatusModule, type ResolveSpentSetParams, type ResolvedProverVersion, type ResolvedSpendVersion, type RpcV2MerkleProof, RpcV2Module, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, type RunScanParams, SPENDING_KEY_CANONICAL_ORIGIN, SPENDING_KEY_VERIFYING_CONTRACT, SPENDING_KEY_WARNING, type ScanChunkManifest, ScanCommitment, type ScanHint, type ScanHintPage, type ScanHintSource, ScanKeys, type ScanOptions, type ScanOutcome, type ScanProgress, type ScanResult, SecretStore, type SelfEphWindowEntry, type SelfStealthKeys, type SessionCacheDeps, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedEvent, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, SpendDetails, type SpendPlanProblem, type SpendPrivacyReads, type SpendVault, type SpendableInputsCheck, type SpendingKeyTypedData, type StatusChangeEvent, type StatusListener, SubstrateClient, type SystemHealth, TRANSFER_INPUTS, TRANSFER_OUTPUTS, type TokenInfo, type TokenTransfer, type TransferDeps, type TransferFactsRow, type TransferFactsSource, type TransferInputNote, type TransferOutputNote, type TransferParams, type TransferPlan, type TransferStep, type TransferSubmitRequest, type TxFactsSource, TxHistoryStore, type TxKind, type TxLandingPollOptions, type TxResult, type UnsafeTxOptions, type UnshieldArgs, type UnshieldDeps, type UnshieldNoteParams, type UnshieldParams, type UnshieldPlan, type UnshieldProofInputs, type UnshieldProofResult, type UnshieldStep, type UnshieldSubmitRequest, type UnshieldedEvent, type UnverifyAssetArgs, VAULT_SCHEMA_VERSION, VaultConfigRecord, VaultLockedError, VaultStorage, VaultStore, type VaultStoreDeps, type VaultUnlockOptions, type VerifyAssetArgs, type VersionedArtifactProvider, type WalletScanKeys, type WalletSession, ZkNote, type ZkVerifierCircuitVersionInfo, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, addressToFieldElement, applyBatch, applyNoteStatus, assembleNoteTransfer, base64UrlDecode, base64UrlEncode, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildConfig, buildDummyTransferInput, buildShieldBatchOperations, buildShieldParams, buildZkNote, bytesToBigintLE, bytesToBjjScalar, cacheSession, canPairWith, canonicalAccountId, chainActiveCircuitVersion, checkSpendableInputs, claimFees, classifyChainError, clearSession, collectNullifiersToQuery, collectScanEntries, commitmentHexOf, computeNoteCommitment, computeNullifier, computePathIndices, connectInjectedExtension, createNoteDisclosureKey, createNotesCache, createWalletSession, decodeNoteBackup, decodeNoteDisclosureKey, decodeNoteTransferPage, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOwnerPk, derivePairwiseEphSk, derivePairwiseSharedSecret, deriveSelfEphSk, deriveSpendingKeyFromMaster, deriveSpendingKeyFromSignature, deriveSpendingKeyMessageV2, deriveSpendingKeyTypedData, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewTag, deriveViewingPublicKey, deriveViewingSecretKey, detectCommitmentMismatch, encodeNoteBackup, encodeNoteTransferPages, encryptJson, encryptNote, ensureCreatedAt, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, extractPalletError, failed, fastMulBase, fastMulPoint, fetchExtrinsicFacts, formatAmountPlain, formatBalance, formatORB, fromBase64, fromHex, gapMargin, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getInjectedExtensions, getPrecompileLabel, hasCachedSession, hasInjectedExtensions, hexToBigint, hexToNumber, implicitSubstrateToEvm, importNotesFromBackup, isAbortError, isAlreadySpentError, isConnectionLossError, isEvmAddress, isGhostNoteError, isImplicitEvmAccount, isNativeAsset, isNoteSelfConsistent, isSpendable, isSs58, isSubstrateAddress, isUnifiedAddress, isValidLeafIndex, leHexToBigint, mapExtrinsicArgs, mapZkEventData, markInputsSpent, normalizeChainFingerprint, normalizeEvmAddress, normalizeNote, normalizeNotes, noteBlindTag, noteCreatedAt, noteCreatedTxHash, noteMatchesCommitment, noteOrigin, noteSpentTxHash, noteToTransferEntry, noteTxKind, pairwiseEphWindow, palletErrorKind, parseAmount, parseEvmAddress, persistCursor, persistScanResults, planTransfer, planUnshield, randomBlinding, reconstructOutgoingTxRecords, recoverOwnerPkPoint, recoverSelfStealthNote, refuseIfAlreadySpent, removeByCommitment, requireSessionKeys, reservePairwiseIndex, reserveSelfEphIndex, resolveSelfEphCeiling, resolveSpentSet, resolveSpentStatus, restoreSession, runScan, scalarToHex, scanAbortError, selectGhosts, selectNotes, selfEphWindow, serializeMemo, sessionCacheKey, shortHash, signAndSubmitTx, spendableBalance, stampCreatedAt, stampCreatedTxHash, stampSpentTxHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, transferNotes, treeIdOf, treeOf, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, txLandedAfterError, unshieldNote, upsertNote, vaultReplacer, vaultReviver, vaultStorageName, windowSizeForCounter };
5683
+ export { type AssetRegisteredEvent, type AssetUnverifiedEvent, type AssetVerifiedEvent, BABYJUB_SUBORDER, BN254_R, type BackupImportKeys, type BlockInfo, type BuildNoteDeps, type BuildNoteParams, type Bytes32, CachedNullifier, type ChainInfo, ChainModule, type ChunkInfo, CircuitId, CircuitVersionResolver, type ClaimShieldedFeesParams, type ClientProviderConfig, type CoinSelection, type CollectScanEntriesParams, type CommitmentsInsertedEvent, type ConnectionStatus, type CryptoKey$1 as CryptoKey, CryptoPrecompiles, type DecodedPrecompile, DecryptPool, DecryptedMemo, type DynamicBuilder, ENCRYPTED_MEMO_SIZE, EncryptedMemo, EncryptedNoteRecord, EncryptedTxRecord, type EventData, type EventPhase, type EventRecord, type EvmAddressInfo, type EvmBlock, EvmClient, EvmExplorer, type EvmLog, type EvmSigner, type EvmTransaction, type EvmTxRequest, type EvmTxSummary, type ExtrinsicDecoder, type ExtrinsicFacts, type ExtrinsicRecord, type FeeClaimDeps, type FeeClaimParams, type FeeClaimProofInputs, type FeeClaimProofOutput, type FeeClaimStep, type FormatOptions, KNOWN_PALLET_ERRORS, KNOWN_PRECOMPILES, type KnownPrecompileInfo, LEAVES_PER_TREE, MIN_GASLESS_FEE, MIN_SIGNATURE_BYTES, MemoryVaultStorage, type MerkleRootUpdatedEvent, type MutableWalletSession, NATIVE_ASSET_ID, NOTE_BACKUP_VERSION, NOTE_BIGINT_FIELDS, NOTE_TRANSFER_URI_SCHEME, type NoteBackup, type NoteBackupEntry, type NoteBuildKeys, NoteBuilder, type NoteDisclosure, NoteInput, NoteStatusUpdate, NoteStorage, type NoteTransferEntry, type NoteTransferPayload, type NoteWithMeta, type NotesCache, NullifierCache, type NullifierChunkBody, type NullifierManifest, type NullifierSource, NullifierSyncMeta, type NullifierTail, type NullifiersSpentEvent, OVK_BLOB_SIZE, type ObservableNotesCache, OrbinumClient, type OrbinumClientConfig, OrbinumClientProvider, OrbinumWallet, type OrbinumWalletConfig, type OutgoingHint, OutgoingNoteRecord, PAGE_SIZE, PAYMENT_SLIP_SCHEME, PRECOMPILE_ADDR, type PairwiseEphWindowEntry, type PalletErrorKind, type PaymentSlipFields, type PersistParams, type PrecompileMethod, PrivacyKeyManager, type PrivacyMerkleProof, PrivacyModule, type PrivateTransferArgs, type PrivateTransferInput, type PrivateTransferOutput, type PrivateTransferParams, type PrivateTransferProofInputs, type ProofOptions, type ProviderFactory, QR_PAGE_MAX_CHARS, RECOVERED_TX_RESULT, type RawBlock, type RawBlockHeader, type RawTransferInput, type RawTransferOutput, type ReconstructDeps, type ReconstructedTxRecord, type RegisterAssetArgs, type RelayerInfo, RelayerStatusModule, type ResolveSpentSetParams, type ResolvedProverVersion, type ResolvedSpendVersion, type RpcV2MerkleProof, RpcV2Module, type RpcV2NullifierStatus, type RpcV2PoolAssetBalance, type RpcV2PoolStats, type RunScanParams, SPENDING_KEY_CANONICAL_ORIGIN, SPENDING_KEY_VERIFYING_CONTRACT, SPENDING_KEY_WARNING, type ScanChunkManifest, ScanCommitment, type ScanHint, type ScanHintPage, type ScanHintSource, ScanKeys, type ScanOptions, type ScanOutcome, type ScanProgress, type ScanResult, SecretStore, type SelfEphWindowEntry, type SelfStealthKeys, type SessionCacheDeps, type ShieldArgs, type ShieldBatchArgs, type ShieldBatchItem, type ShieldBatchParams, type ShieldOperation, type ShieldParams, type ShieldedEvent, type ShieldedPoolCall, type ShieldedPoolEvent, ShieldedPoolModule, ShieldedPoolPrecompile, type SlipImportKeys, SpendDetails, type SpendPlanProblem, type SpendPrivacyReads, type SpendVault, type SpendableInputsCheck, type SpendingKeyTypedData, type StatusChangeEvent, type StatusListener, SubstrateClient, type SystemHealth, TRANSFER_INPUTS, TRANSFER_OUTPUTS, type TokenInfo, type TokenTransfer, type TransferDeps, type TransferFactsRow, type TransferFactsSource, type TransferInputNote, type TransferOutputNote, type TransferParams, type TransferPlan, type TransferResult, type TransferStep, type TransferSubmitRequest, type TxFactsSource, TxHistoryStore, type TxKind, type TxLandingPollOptions, type TxResult, type UnsafeTxOptions, type UnshieldArgs, type UnshieldDeps, type UnshieldNoteParams, type UnshieldParams, type UnshieldPlan, type UnshieldProofInputs, type UnshieldProofResult, type UnshieldStep, type UnshieldSubmitRequest, type UnshieldedEvent, type UnverifyAssetArgs, VAULT_SCHEMA_VERSION, VaultConfigRecord, VaultLockedError, VaultStorage, VaultStore, type VaultStoreDeps, type VaultUnlockOptions, type VerifyAssetArgs, type VersionedArtifactProvider, type WalletScanKeys, type WalletSession, ZkNote, type ZkVerifierCircuitVersionInfo, type ZkVerifierHistoricalVersion, ZkVerifierModule, type ZkVerifierVersionStats, type ZkVerifierVkHash, accountIdHexToSs58, addressToAccountIdHex, addressToFieldElement, applyBatch, applyNoteStatus, assembleNoteTransfer, base64UrlDecode, base64UrlEncode, bigintTo32Be, bigintTo32Le, bigintTo32LeArr, blindTag, buildConfig, buildDummyTransferInput, buildShieldBatchOperations, buildShieldParams, buildZkNote, bytesToBigintLE, bytesToBjjScalar, cacheSession, canPairWith, canonicalAccountId, chainActiveCircuitVersion, checkSpendableInputs, claimFees, classifyChainError, clearSession, collectNullifiersToQuery, collectScanEntries, commitmentHexOf, computeNoteCommitment, computeNullifier, computePathIndices, connectInjectedExtension, createNoteDisclosureKey, createNotesCache, createWalletSession, decodeNoteBackup, decodeNoteDisclosureKey, decodeNoteTransferPage, decodePaymentSlip, decodePrecompileCalldata, decryptJson, decryptNoteRecord, deriveMasterKeyBytes, deriveOutgoingCipherKey, deriveOutgoingViewingKey, deriveOwnerPk, derivePairwiseEphSk, derivePairwiseSharedSecret, deriveSelfEphSk, deriveSpendingKeyFromMaster, deriveSpendingKeyFromSignature, deriveSpendingKeyMessageV2, deriveSpendingKeyTypedData, deriveStealthOwnerPk, deriveStealthSk, deriveVaultBlindKey, deriveVaultKey, deriveViewTag, deriveViewingPublicKey, deriveViewingSecretKey, detectCommitmentMismatch, encodeNoteBackup, encodeNoteTransferPages, encodePaymentSlip, encryptJson, encryptNote, ensureCreatedAt, ensureHexPrefix, evmAddressToAccountId, evmToImplicitSubstrate, evmToMappedAccountHex, evmToSubstrate, extractPalletError, failed, fastMulBase, fastMulPoint, fetchExtrinsicFacts, formatAmountPlain, formatBalance, formatORB, fromBase64, fromHex, gapMargin, generateFeeClaimProof, generateTransferProof, generateUnshieldProof, getInjectedExtensions, getPrecompileLabel, hasCachedSession, hasInjectedExtensions, hexToBigint, hexToNumber, implicitSubstrateToEvm, importNotesFromBackup, importPaymentSlip, isAbortError, isAlreadySpentError, isConnectionLossError, isEvmAddress, isGhostNoteError, isImplicitEvmAccount, isNativeAsset, isNoteSelfConsistent, isSpendable, isSs58, isSubstrateAddress, isUnifiedAddress, isValidLeafIndex, leHexToBigint, mapExtrinsicArgs, mapZkEventData, markInputsSpent, normalizeChainFingerprint, normalizeEvmAddress, normalizeNote, normalizeNotes, noteBlindTag, noteCreatedAt, noteCreatedTxHash, noteMatchesCommitment, noteOrigin, noteSpentTxHash, noteToTransferEntry, noteTxKind, openOutgoingBlob, openPaymentSlip, pairwiseEphWindow, palletErrorKind, parseAmount, parseEvmAddress, persistCursor, persistScanResults, planTransfer, planUnshield, randomBlinding, randomOutgoingBlob, reconstructOutgoingTxRecords, recoverOwnerPkPoint, recoverSelfStealthNote, refuseIfAlreadySpent, removeByCommitment, requireSessionKeys, reservePairwiseIndex, reserveSelfEphIndex, resolveSelfEphCeiling, resolveSpentSet, resolveSpentStatus, restoreSession, runScan, scalarToHex, scanAbortError, sealOutgoingBlob, sealPaymentSlip, selectGhosts, selectNotes, selfEphWindow, serializeMemo, sessionCacheKey, shortHash, signAndSubmitTx, spendableBalance, stampCreatedAt, stampCreatedTxHash, stampSpentTxHash, substrateSs58ToAccountIdHex, substrateToEvm, toBase64, toHex, toTxResult, transferNotes, treeIdOf, treeOf, truncateMiddle, tryDecryptNote, tryDecryptNoteVerbose, tryRecoverOutgoing, txLandedAfterError, unshieldNote, upsertNote, vaultReplacer, vaultReviver, vaultStorageName, windowSizeForCounter };