@cloak.dev/sdk 0.2.6-staging.f92dd96 → 0.2.6
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/CHANGELOG.md +33 -3
- package/README.md +102 -4
- package/dist/index.cjs +144 -75
- package/dist/index.d.cts +85 -5
- package/dist/index.d.ts +85 -5
- package/dist/index.js +144 -75
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5232,6 +5232,28 @@ interface NoteIndexPage {
|
|
|
5232
5232
|
rawItems: Uint8Array[];
|
|
5233
5233
|
/** Items of unknown kinds, skipped by `body_len`. */
|
|
5234
5234
|
skippedUnknown: number;
|
|
5235
|
+
/**
|
|
5236
|
+
* Position in the page (0-based, unknown and malformed kinds counted) of each entry of `items`,
|
|
5237
|
+
* so `page * NOTE_INDEX_PAGE_SIZE + itemPositions[i]` is the item's real sequence number.
|
|
5238
|
+
*/
|
|
5239
|
+
itemPositions: number[];
|
|
5240
|
+
/**
|
|
5241
|
+
* Known-kind items whose body failed that kind's checks and were skipped by `body_len`. Always 0
|
|
5242
|
+
* unless {@link ParseNoteIndexPageOptions.skipMalformedItems} is set (otherwise they throw).
|
|
5243
|
+
*/
|
|
5244
|
+
skippedMalformed: number;
|
|
5245
|
+
}
|
|
5246
|
+
/** Options of {@link parseNoteIndexPage}. */
|
|
5247
|
+
interface ParseNoteIndexPageOptions {
|
|
5248
|
+
/**
|
|
5249
|
+
* Skip (and count in `skippedMalformed`) a known-kind item whose body fails that kind's checks,
|
|
5250
|
+
* instead of refusing the whole page. Only the BODY is forgiven: the page header, the item
|
|
5251
|
+
* framing (`kind | body_len` inside the page, no truncation, no trailing bytes) and the hash
|
|
5252
|
+
* chain stay strict, so a skipped item is exactly a hidden item, which an untrusted relay can
|
|
5253
|
+
* already do. `recoverNotesFromIndex` sets it, so that one bad entry cannot abort every
|
|
5254
|
+
* wallet's restore.
|
|
5255
|
+
*/
|
|
5256
|
+
skipMalformedItems?: boolean;
|
|
5235
5257
|
}
|
|
5236
5258
|
/** Input to {@link encodeNoteIndexPage}. */
|
|
5237
5259
|
interface EncodeNoteIndexPageParams {
|
|
@@ -5249,11 +5271,15 @@ interface EncodeNoteIndexPageParams {
|
|
|
5249
5271
|
* other than `expect`, an item whose body_len differs from the exact length of its kind, a note
|
|
5250
5272
|
* whose version disagrees with its length, an out-of-range ix_tag / note_source, a refund whose mint
|
|
5251
5273
|
* is not WSOL, an unknown kind longer than 1024 bytes, a truncated item, or trailing bytes.
|
|
5274
|
+
*
|
|
5275
|
+
* With `options.skipMalformedItems`, an item whose body alone is at fault (its framing inside the
|
|
5276
|
+
* page is intact) is skipped and counted in `skippedMalformed` instead; everything else above
|
|
5277
|
+
* still throws.
|
|
5252
5278
|
*/
|
|
5253
5279
|
declare function parseNoteIndexPage(bytes: Uint8Array, expect?: {
|
|
5254
5280
|
epoch: bigint;
|
|
5255
5281
|
page: number;
|
|
5256
|
-
}): NoteIndexPage;
|
|
5282
|
+
}, options?: ParseNoteIndexPageOptions): NoteIndexPage;
|
|
5257
5283
|
/**
|
|
5258
5284
|
* Parse ONE raw item (`kind | body_len | body`), as kept in `NoteIndexPage.rawItems` and in a
|
|
5259
5285
|
* persisted cursor. Same strictness as the page parser; unknown kinds are an error here.
|
|
@@ -5302,6 +5328,25 @@ declare function encodeNoteIndexPage(params: EncodeNoteIndexPageParams): Uint8Ar
|
|
|
5302
5328
|
* A HIDDEN nullifier makes a spent note look unspent; the spend-time `preflightNullifiers` in every
|
|
5303
5329
|
* spend entry point is what catches that, and it stays mandatory.
|
|
5304
5330
|
*
|
|
5331
|
+
* What is NOT checked: the proof-bound `chainNoteHash`. An index item does not carry it (nor the
|
|
5332
|
+
* `extDataHash` its preimage needs), and fetching either per transaction would break the one-RPC
|
|
5333
|
+
* budget. It is not needed for (a) to (c): the chain note is AES-GCM under a key HKDF'd from nk
|
|
5334
|
+
* with the item's own `comm0` as salt (`comm1` for a v2 note), so a note written for one
|
|
5335
|
+
* transaction never opens when the relay attaches it to another (a mispaired CLK1 carrier), for its
|
|
5336
|
+
* real owner or anyone else, and whatever does open (a note crafted for the transaction it sits
|
|
5337
|
+
* on, say under a public legacy key) is still held to (b) and (c). The item's other public fields (`publicAmount`,
|
|
5338
|
+
* the nullifiers) feed only derivations whose result must reproduce a published commitment, so a
|
|
5339
|
+
* wrong value there can only make a note fail to match. The cost of a mispairing is therefore
|
|
5340
|
+
* hidden notes (the memo's real owner's, and the paired source's own), never a wrong note, and no
|
|
5341
|
+
* client-side check can recover them: only the relay can pair correctly.
|
|
5342
|
+
*
|
|
5343
|
+
* ── One bad entry never aborts a run ──────────────────────────────────────────────────────────
|
|
5344
|
+
* The index carries what anyone can put on chain, and a legacy viewing key may be public, so a
|
|
5345
|
+
* stranger can write a note that opens for a wallet. An item whose body is malformed (framing
|
|
5346
|
+
* intact), or whose opened contents make a matcher throw, is skipped and counted in
|
|
5347
|
+
* `stats.skipped`, exactly as if it were not this wallet's. Only page-level faults (header,
|
|
5348
|
+
* framing, hash chain, head) still fail the run, since they are not one entry's.
|
|
5349
|
+
*
|
|
5305
5350
|
* ── The cursor never depends on what the wallet owns (contract property 1) ────────────────────
|
|
5306
5351
|
* Every run downloads from the persisted cursor page, so that page must be a function of public
|
|
5307
5352
|
* data only. It is always `floor(complete_pages / 8) * 8` of the head this run saw (or the previous
|
|
@@ -5320,6 +5365,16 @@ declare function encodeNoteIndexPage(params: EncodeNoteIndexPageParams): Uint8Ar
|
|
|
5320
5365
|
* returned in `atRisk`, never in `notes`, so an app can migrate them without counting them as
|
|
5321
5366
|
* balance.
|
|
5322
5367
|
*
|
|
5368
|
+
* Some older clients also encrypted their chain notes under a viewing key that is not the wallet's
|
|
5369
|
+
* canonical nk (mobile used SHA-512 of the public wallet address, or the embedded wallet's nsk).
|
|
5370
|
+
* Pass those as `legacyViewingKeyNks` to find such notes in the same download, at no extra request:
|
|
5371
|
+
* every item is trial-opened under the canonical nk first, then under each legacy key. A legacy key
|
|
5372
|
+
* only ever FINDS notes. Everything that opened only under one is returned in `atRisk`, whatever
|
|
5373
|
+
* its owner key (a legacy key may be public, so the relay and anyone else can read those notes), it
|
|
5374
|
+
* never opens a recipient delivery (the delivery rail never used one), and nothing a legacy key opens
|
|
5375
|
+
* can enter `notes`. A note of this wallet's that spends a legacy note and is encrypted under the
|
|
5376
|
+
* canonical nk (a migration) is matched normally and lands in `notes`.
|
|
5377
|
+
*
|
|
5323
5378
|
* ── Refund leaves ─────────────────────────────────────────────────────────────────────────────
|
|
5324
5379
|
* CloseSwapState appends R_fb to the WSOL MAIN tree (`["merkle_tree", WSOL]`; the separate refund
|
|
5325
5380
|
* tree belonged to the retired ClaimRefund design and the program rejects it). So SWAP_REFUND
|
|
@@ -5338,7 +5393,10 @@ interface IndexedRecoveredNote {
|
|
|
5338
5393
|
utxo: Utxo;
|
|
5339
5394
|
/** Base58 signature the relay attached. Metadata only, NOT proof of payment. */
|
|
5340
5395
|
signature: string;
|
|
5341
|
-
/**
|
|
5396
|
+
/**
|
|
5397
|
+
* `true` for every `atRisk` note (owner key derivable from nk, or found through a legacy viewing
|
|
5398
|
+
* key), `false` for `notes`.
|
|
5399
|
+
*/
|
|
5342
5400
|
legacyExposed: boolean;
|
|
5343
5401
|
}
|
|
5344
5402
|
/**
|
|
@@ -5405,6 +5463,13 @@ interface RecoverNotesFromIndexParams {
|
|
|
5405
5463
|
poolMints: Address[];
|
|
5406
5464
|
/** The wallet's 32-byte viewing base. */
|
|
5407
5465
|
viewingKeyNk: Uint8Array;
|
|
5466
|
+
/**
|
|
5467
|
+
* Other 32-byte viewing keys older clients of this wallet encrypted chain notes under (at most
|
|
5468
|
+
* 8). Scan only: every note found through one is returned in `atRisk`, never in `notes`, and a
|
|
5469
|
+
* legacy key never opens a recipient delivery. Costs local trial decryptions, no extra request.
|
|
5470
|
+
* Entries equal to `viewingKeyNk` are ignored.
|
|
5471
|
+
*/
|
|
5472
|
+
legacyViewingKeyNks?: Uint8Array[];
|
|
5408
5473
|
/** The wallet's long-lived UTXO keypair, with its real private key. */
|
|
5409
5474
|
ownerUtxoKeypair: UtxoKeypair;
|
|
5410
5475
|
/** The `cursor` of the previous run. Omit for a full sync. */
|
|
@@ -5447,13 +5512,28 @@ interface NoteIndexRecoveryStats {
|
|
|
5447
5512
|
conflicts: number;
|
|
5448
5513
|
/** Pending candidates over the carry limit, not carried to the next run. */
|
|
5449
5514
|
pendingDropped: number;
|
|
5515
|
+
/**
|
|
5516
|
+
* Index entries skipped instead of failing the run (each one is treated as not this wallet's):
|
|
5517
|
+
* an item whose body fails its kind's format checks while its framing in the page is intact, and
|
|
5518
|
+
* an item that opened under this wallet's keys but whose contents no derivation accepts (a chain
|
|
5519
|
+
* note salt of 0 or over 96 bits, or anything else that throws while it is matched). Anyone who
|
|
5520
|
+
* can read a legacy viewing key can write such a note, so none of this may abort a restore.
|
|
5521
|
+
*/
|
|
5522
|
+
skipped: number;
|
|
5450
5523
|
}
|
|
5451
5524
|
interface RecoverNotesFromIndexResult {
|
|
5452
5525
|
/** Verified, unspent, owned by `ownerUtxoKeypair`; deduped by (mint, leaf). */
|
|
5453
5526
|
notes: IndexedRecoveredNote[];
|
|
5454
|
-
/**
|
|
5527
|
+
/**
|
|
5528
|
+
* Verified, unspent, and either owned by an nk-derived legacy key (spendable by nk holders) or
|
|
5529
|
+
* found only through a `legacyViewingKeyNks` entry (readable by whoever holds that key). Migrate.
|
|
5530
|
+
*/
|
|
5455
5531
|
atRisk: IndexedRecoveredNote[];
|
|
5456
|
-
/**
|
|
5532
|
+
/**
|
|
5533
|
+
* Candidates not verifiable yet (tree or root not caught up). Carried in the cursor. It depends on
|
|
5534
|
+
* what this wallet owns (a relay can make it non-zero for the owner of one item), so never let it
|
|
5535
|
+
* decide whether or what to download: gate polls on the public head (epoch, watermark) alone.
|
|
5536
|
+
*/
|
|
5457
5537
|
pending: number;
|
|
5458
5538
|
/** Persist and pass back as `cursor`. */
|
|
5459
5539
|
cursor: NoteIndexCursor;
|
|
@@ -6339,4 +6419,4 @@ declare const VERSION = "0.2.6";
|
|
|
6339
6419
|
/** True when scanner supports TransactSwap (tag 1). Check this to verify the correct SDK bundle is loaded. */
|
|
6340
6420
|
declare const SCANNER_SUPPORTS_TRANSACT_SWAP = true;
|
|
6341
6421
|
|
|
6342
|
-
export { BRIDGE_ESCROW_LABEL, BRIDGE_ESCROW_LABEL_V2, BUILD_ALLOWS_LOCAL_ENDPOINTS, type BridgeDeliveryState, type BridgeDeposit, type BridgeDepositState, type BridgeQuoteAssessment, type BridgeQuoteInput, type BridgeRail, type BridgeRailAttestation, type BridgeRailProblem, type BridgeRailQuoteOption, type BridgeRailQuoteRequest, type BridgeRailQuoteResponse, type BridgeRailStatusResult, type BuildRecipientDeliveryNotesParams, CHAIN_NOTE_SALT_BITS, CLEANUP_FEE_BUDGET, CLOAK_PRODUCTION_RELAY_URL, CLOAK_PROGRAM_ID, type ChainNoteTxType, type CircuitVerificationResult, type CleanupResult, type CloakConfig, CloakError, type CloakKeyPair, type CloakNote, type CloakRpc, type CommitmentEntry, type CommitmentsResponse, type CompactChainNote, type ComplianceReport, type ComplianceTxType, type ConfirmSettlementParams, type CreateRecoverableDepositUtxoParams, DEFAULT_CIRCUITS_URL, DEFAULT_TRANSACTION_CIRCUITS_URL, DELIVERY_MEMO_TAG, DELIVERY_REGISTRY_SEED, type DeliveredNote, DepositError, type DepositInstructionParams, type DepositNoteSecrets, type DepositOptions, type DepositOutcome, type DepositRef, type DepositResult, type DepositStatus, type DiscoverOptions, type DiscoverSwapRefundsOptions, type DiscoveredSwapRefund, DoNotRetry, ECONOMIC_MINIMUM, EXPECTED_CIRCUIT_HASHES, type EncodeNoteIndexPageParams, type EncryptedMetadataBundle, type EncryptedNote$1 as EncryptedNote, type ErrorCategory, type ExpandedSpendKey, type ExternalFeePayerAdapter, FEE_BUDGET, FIXED_FEE_LAMPORTS, type FundingPlan, type Groth16Proof, type IndexedRecoveredNote, type IndexedRecoveredNoteKind, InsecureRandomnessError, LAMPORTS_PER_SOL, type LegacyWalletAdapter, type WalletSigner as LegacyWalletSigner, LocalStorageAdapter, type LogLevel, type Logger, type LookupTable, MAINNET_RENT_0, MAINNET_RENT_1, MAX_RECEIVER_INDEX, MERKLE_TREE_HEIGHT, MIN_DEPOSIT_LAMPORTS, MIN_DEPOSIT_SPL_BASE_UNITS, type MasterKey, type MatchChangeNoteParams, type MatchDepositNoteParams, type MatchSwapRefundLeafParams, type MaxLengthArray, MemoryStorageAdapter, type MerkleProof, type MerkleRootResponse, MerkleTree, type MessageSigner, NATIVE_SOL_MINT, NOTE_INDEX_NO_LEAF, NOTE_INDEX_PAGE_SIZE, type Network, type NoteData, type NoteIndexCursor, type NoteIndexDeliveryItem, type NoteIndexFetchOptions, NoteIndexFormatError, type NoteIndexHead, NoteIndexHeadBehindError, type NoteIndexItem, type NoteIndexPage, type NoteIndexRecoveryStats, type NoteIndexSwapRefundItem, type NoteIndexTxItem, ONECLICK_PUBKEY_B58, type OnchainMerkleProof, type ParsedDeliveryCarrier, type PaymasterTopUpExpectation, type PaymasterTopUpResult, type PendingDeposit, type PendingWithdrawal, type PostFailureVerdict, RECIPIENT_DELIVERY_CIPHERTEXT_LEN, RECIPIENT_DELIVERY_EPHEMERAL_PK_LEN, RECIPIENT_DELIVERY_NONCE_LEN, RECIPIENT_DELIVERY_NOTE_BYTES, RECIPIENT_DELIVERY_PLAINTEXT_LEN, RECIPIENT_DELIVERY_TAG_LEN, RELAY_BATCH_AUTH_MAX_ITEMS, RELAY_ORIGIN_ALLOWLIST, REQUEST_AUTH_BATCH_DOMAIN, REQUEST_AUTH_BATCH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_FUTURE_SKEW_SECONDS, type RecipientDeliveryNote, type RecoverNotesFromIndexParams, type RecoverNotesFromIndexResult, type RecoveredChangeNote, type RecoveredChangeNoteRecord, type RecoveredDepositNote, type RecoveredDepositNoteRecord, type RecoveredSwapRefund, type RelayAuthMode, type RelayAuthPreimage, type RelayAuthSigner, RelayBatchAuthCoordinator, type RelayBatchAuthCoordinatorOptions, type RelayBatchAuthEnvelope, type RelayBatchAuthFields, type RelayBatchAuthItemHandle, RelayInternalError, RelayService, type RelaySubmissionResult, type RentRates, type RetryHooks, type RiskQuoteInstructionResponse, RootNotFoundError, SCANNER_SUPPORTS_TRANSACT_SWAP, SIGN_IN_MESSAGE, SanctionsQuoteError, type ScanOptions, type ScanRecipientDeliveryOptions, type ScanResult, type ScanSummary, type ScannedTransaction, type SettlementConnection, type SettlementContext, type SettlementStatus, type SettlementVerdict, SettlementVerificationError, ShieldPoolErrors, type ShieldPoolPDAs, SimpleWallet, type SpendKey, type SpendOptions, type StorageAdapter, type SubmitTransactToRelayArgs, type SwapOptions, type SwapParams, type SwapRefundAuthorization, type SwapResult, TERMINAL_FAILURE, TRANSACTION_CIRCUITS_VERSION, TRANSACT_AUTH_FIELDS, TRANSACT_SWAP_AUTH_FIELDS, type TransactBatchItem, type TransactBatchItemOutcome, type TransactBatchOptions, type TransactBatchResult, type TransactOptions, type TransactParams, type TransactRequestBodyParams, type TransactResult, TransactionConfirmationError, type TransactionMetadata, type Transfer, type TransferOptions, type TransferResult, type TxStatus, type UserFriendlyError, type Utxo, UtxoAlreadySpentError, type EncryptedNote as UtxoEncryptedNote, type UtxoKeypair, type UtxoSwapParams, type UtxoSwapResult, UtxoWallet, VARIABLE_FEE_DENOMINATOR, VARIABLE_FEE_NUMERATOR, VARIABLE_FEE_RATE, VERSION, type VerifyUtxosResult, type ViewKey, type ViewingKeyPair, WITHDRAW_FEE_BPS, WITHDRAW_FIXED_FEE, type WalletAdapterBridgeOptions, type WalletSigner$1 as WalletSigner, type WalletUtxo, type Web3Module, type WithdrawOptions, type WithdrawSubmissionResult, accountMeta, addressBytes, addressFromBytes, addressFromPublicKey, assertDirectSubmissionLanded, assertInputMints, assertTransactionCircuitIntegrity, assessBridgeQuote, bigintToBytes32$1 as bigintToBytes32, bigintToHex, buildAuthTransactionMessage, buildMerkleTree, buildMerkleTreeFromChain, buildMerkleTreeFromRelay, buildRecipientDeliveryNotes, buildRelayAuthPreimage, buildRelayBatchAuthMessage, buildTransactRequestBody, buildTransactionMessage, bytesToHex, calculateFee, calculateFeeBigint, calculateRelayFee, canRebuildMerkleTreeFromChain, canonicalJson, canonicalPayloadString, chainNoteFromBase64, chainNoteToBase64, classifyPostFailure, classifyRelayError, cleanupReceivingAddress, cleanupStalePendingOperations, clearPendingDeposits, clearPendingWithdrawals, cloakBridgeRail, computeChainNoteHash, computeExtDataHash, computeMerkleRoot, computeNoteIndexChain, computeProofForLatestDeposit, computeProofFromChain, computeSignature, computeSwapRefundCommitment, computeCommitment as computeUtxoCommitment, computeNullifier as computeUtxoNullifier, confirmSignature, confirmTransactSettlement, copyNoteToClipboard, createCloakError, createCloakRpc, createDepositInstruction, createLogger, createRecoverableChangeUtxo, createRecoverableDepositUtxo, createRelayBatchAuthCoordinator, createUtxo, createZeroUtxo, decryptCompactChainNote, decryptComplianceMetadataWithMasterKey, decryptTransactionMetadata, depositFromDerivedKey, deriveBridgeReceiver, deriveChangeNoteBlinding, deriveDepositNoteBlinding, deriveDiversifiedViewingKey, deriveDiversifier, deriveFundingTargets, deriveInputNullifierPdas, deriveLegacyBridgeReceiver, deriveLegacyDepositNoteSecrets, deriveLegacySwapRefundAuthorization, derivePublicKey, deriveSpendKey, deriveSwapRefundAuthorization, deriveSwapRefundBlinding, deriveUserCompliancePublicKey, deriveUserComplianceScalar, deriveUtxoKeypairFromSpendKey, deriveViewKey, deriveViewingKeyFromNk, deriveViewingKeyFromSpendKey, deriveViewingKeyFromUtxoPrivateKey, deserializeUtxo, detectNetworkFromRpcUrl, discoverSwapRefunds, downloadNote, encodeDeliveryCarrierMemo, encodeNoteIndexItem, encodeNoteIndexPage, encodeNoteSimple, encodeRecipientDeliveryNote, encryptCompactChainNote, encryptNoteForRecipient, encryptTransactionMetadata, encryptTransactionMetadataBundle, expandSpendKey, explainRelayAuthRejection, exportKeys, exportNote, exportWalletKeys, fetchAccountBytes, fetchCommitments, fetchLatestBlockhash, fetchLookupTables, fetchNoteIndexHead, fetchNoteIndexPage, fetchRiskQuoteInstruction, fetchRiskQuoteIx, fetchSignaturesForAddress, filterNotesByNetwork, filterWithdrawableNotes, findNoteByCommitment, findProgramAddress, formatAmount, formatComplianceCsv, formatErrorForLogging, formatSol, fullWithdraw, fundReceiverViaPaymaster, generateCloakKeys, generateCommitmentAsync, generateMasterSeed, generateNoteFromWallet, generateUtxoKeypair, generateViewingKeyPair, getAddressExplorerUrl, getChainNoteRegistryPDA, getCircuitsPath, getDeliveryRegistryPDA, getDistributableAmount, getExplorerUrl, getNkFromUtxoPrivateKey, getNullifierPDA, getPendingOperationsSummary, getPoolAuthorityConfigPDA, getPublicKey, getPublicViewKey, getRecipientAmount, getRpcUrlForNetwork, getShieldPoolPDAs, getSwapStatePDA, getViewKey, hasPendingOperations, hexToBigint$1 as hexToBigint, hexToBytes, importKeys, importWalletKeys, isBrowser, isBrowserLike, isDebugEnabled, isMessageSigner, isPlausibleSignature, isReactNative, isRootNotFoundError, isSubmissionOutcomeUnknownResponse, isTerminalFailure, isValidHex, isValidRpcUrl, isValidSolanaAddress, isWithdrawAmountSufficient, isWithdrawable, listBridgeDeposits, loadPendingDeposits, loadPendingWithdrawals, loadVerifiedCircuitArtifacts, matchChangeNote, matchDepositNote, matchSwapRefundLeaf, mayRetry, messageSignerFromCallback, openRecipientDeliveryNote, parseAmount, parseDeliveryCarrierMemo, parseError, parseNote, parseNoteIndexItem, parseNoteIndexPage, parseRelayErrorResponse, parseRelayErrorSignature, parseTransactionError, partialWithdraw, partiallySignTransaction, poseidonHash, preflightCheck, preflightNullifiers, prepareEncryptedOutput, prepareEncryptedOutputForRecipient, programInstruction, proofToBytes, pubkeyToFieldElement, pubkeyToLimbs, randomBytes, randomChangeNoteSalt, randomDepositNoteSalt, randomFieldElement, readMerkleTreeState, readRent, recipientDeliveryNoteToBase64, recoverNotesFromIndex, registerViewingKey, relayRequestDigestHex, removePendingDeposit, removePendingWithdrawal, renderAssessment, resolveCircuitsBase, retryDelayMs, savePendingDeposit, savePendingWithdrawal, scanNotesForWallet, scanRecipientDeliveryNotes, scanTransactions, sdkLogger, selectUtxos, sendInstructions, sendRawTransaction, sendTransaction, serializeAuthTransactionMessage, serializeNote, serializeUtxo, setCircuitsPath, setDebugMode, signCompiledTransaction, signMessageBytes, signRelayAuthPayload, signTransaction, signerFromKeypair, signerFromSecretKey, signerFromWalletAdapter, splitTo2Limbs, submitTransactToRelay, sumUtxoAmounts, swapUtxo, swapWithChange, toAddress, toComplianceReport, transact, transactBatch, transactionBase64, transactionBytes, transactionFromBytes, transactionWireSize, transfer, truncate, tryDecryptNote, updateNoteWithDeposit, updatePendingDeposit, updatePendingWithdrawal, bigintToBytes32 as utxoBigintToBytes32, utxoEquals, hexToBigint as utxoHexToBigint, validateDepositParams, validateNote, validateOutputsSum, validatePaymasterTopUpTransaction, validateRoot, validateTransfers, validateWalletConnected, validateWithdrawableNote, verifyAllCircuits, verifyCircuitIntegrity, verifyQuoteSignature, verifyUtxos, waitForRoot, withShieldRetries, withTiming, withdrawFeeFor };
|
|
6422
|
+
export { BRIDGE_ESCROW_LABEL, BRIDGE_ESCROW_LABEL_V2, BUILD_ALLOWS_LOCAL_ENDPOINTS, type BridgeDeliveryState, type BridgeDeposit, type BridgeDepositState, type BridgeQuoteAssessment, type BridgeQuoteInput, type BridgeRail, type BridgeRailAttestation, type BridgeRailProblem, type BridgeRailQuoteOption, type BridgeRailQuoteRequest, type BridgeRailQuoteResponse, type BridgeRailStatusResult, type BuildRecipientDeliveryNotesParams, CHAIN_NOTE_SALT_BITS, CLEANUP_FEE_BUDGET, CLOAK_PRODUCTION_RELAY_URL, CLOAK_PROGRAM_ID, type ChainNoteTxType, type CircuitVerificationResult, type CleanupResult, type CloakConfig, CloakError, type CloakKeyPair, type CloakNote, type CloakRpc, type CommitmentEntry, type CommitmentsResponse, type CompactChainNote, type ComplianceReport, type ComplianceTxType, type ConfirmSettlementParams, type CreateRecoverableDepositUtxoParams, DEFAULT_CIRCUITS_URL, DEFAULT_TRANSACTION_CIRCUITS_URL, DELIVERY_MEMO_TAG, DELIVERY_REGISTRY_SEED, type DeliveredNote, DepositError, type DepositInstructionParams, type DepositNoteSecrets, type DepositOptions, type DepositOutcome, type DepositRef, type DepositResult, type DepositStatus, type DiscoverOptions, type DiscoverSwapRefundsOptions, type DiscoveredSwapRefund, DoNotRetry, ECONOMIC_MINIMUM, EXPECTED_CIRCUIT_HASHES, type EncodeNoteIndexPageParams, type EncryptedMetadataBundle, type EncryptedNote$1 as EncryptedNote, type ErrorCategory, type ExpandedSpendKey, type ExternalFeePayerAdapter, FEE_BUDGET, FIXED_FEE_LAMPORTS, type FundingPlan, type Groth16Proof, type IndexedRecoveredNote, type IndexedRecoveredNoteKind, InsecureRandomnessError, LAMPORTS_PER_SOL, type LegacyWalletAdapter, type WalletSigner as LegacyWalletSigner, LocalStorageAdapter, type LogLevel, type Logger, type LookupTable, MAINNET_RENT_0, MAINNET_RENT_1, MAX_RECEIVER_INDEX, MERKLE_TREE_HEIGHT, MIN_DEPOSIT_LAMPORTS, MIN_DEPOSIT_SPL_BASE_UNITS, type MasterKey, type MatchChangeNoteParams, type MatchDepositNoteParams, type MatchSwapRefundLeafParams, type MaxLengthArray, MemoryStorageAdapter, type MerkleProof, type MerkleRootResponse, MerkleTree, type MessageSigner, NATIVE_SOL_MINT, NOTE_INDEX_NO_LEAF, NOTE_INDEX_PAGE_SIZE, type Network, type NoteData, type NoteIndexCursor, type NoteIndexDeliveryItem, type NoteIndexFetchOptions, NoteIndexFormatError, type NoteIndexHead, NoteIndexHeadBehindError, type NoteIndexItem, type NoteIndexPage, type NoteIndexRecoveryStats, type NoteIndexSwapRefundItem, type NoteIndexTxItem, ONECLICK_PUBKEY_B58, type OnchainMerkleProof, type ParseNoteIndexPageOptions, type ParsedDeliveryCarrier, type PaymasterTopUpExpectation, type PaymasterTopUpResult, type PendingDeposit, type PendingWithdrawal, type PostFailureVerdict, RECIPIENT_DELIVERY_CIPHERTEXT_LEN, RECIPIENT_DELIVERY_EPHEMERAL_PK_LEN, RECIPIENT_DELIVERY_NONCE_LEN, RECIPIENT_DELIVERY_NOTE_BYTES, RECIPIENT_DELIVERY_PLAINTEXT_LEN, RECIPIENT_DELIVERY_TAG_LEN, RELAY_BATCH_AUTH_MAX_ITEMS, RELAY_ORIGIN_ALLOWLIST, REQUEST_AUTH_BATCH_DOMAIN, REQUEST_AUTH_BATCH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_FUTURE_SKEW_SECONDS, type RecipientDeliveryNote, type RecoverNotesFromIndexParams, type RecoverNotesFromIndexResult, type RecoveredChangeNote, type RecoveredChangeNoteRecord, type RecoveredDepositNote, type RecoveredDepositNoteRecord, type RecoveredSwapRefund, type RelayAuthMode, type RelayAuthPreimage, type RelayAuthSigner, RelayBatchAuthCoordinator, type RelayBatchAuthCoordinatorOptions, type RelayBatchAuthEnvelope, type RelayBatchAuthFields, type RelayBatchAuthItemHandle, RelayInternalError, RelayService, type RelaySubmissionResult, type RentRates, type RetryHooks, type RiskQuoteInstructionResponse, RootNotFoundError, SCANNER_SUPPORTS_TRANSACT_SWAP, SIGN_IN_MESSAGE, SanctionsQuoteError, type ScanOptions, type ScanRecipientDeliveryOptions, type ScanResult, type ScanSummary, type ScannedTransaction, type SettlementConnection, type SettlementContext, type SettlementStatus, type SettlementVerdict, SettlementVerificationError, ShieldPoolErrors, type ShieldPoolPDAs, SimpleWallet, type SpendKey, type SpendOptions, type StorageAdapter, type SubmitTransactToRelayArgs, type SwapOptions, type SwapParams, type SwapRefundAuthorization, type SwapResult, TERMINAL_FAILURE, TRANSACTION_CIRCUITS_VERSION, TRANSACT_AUTH_FIELDS, TRANSACT_SWAP_AUTH_FIELDS, type TransactBatchItem, type TransactBatchItemOutcome, type TransactBatchOptions, type TransactBatchResult, type TransactOptions, type TransactParams, type TransactRequestBodyParams, type TransactResult, TransactionConfirmationError, type TransactionMetadata, type Transfer, type TransferOptions, type TransferResult, type TxStatus, type UserFriendlyError, type Utxo, UtxoAlreadySpentError, type EncryptedNote as UtxoEncryptedNote, type UtxoKeypair, type UtxoSwapParams, type UtxoSwapResult, UtxoWallet, VARIABLE_FEE_DENOMINATOR, VARIABLE_FEE_NUMERATOR, VARIABLE_FEE_RATE, VERSION, type VerifyUtxosResult, type ViewKey, type ViewingKeyPair, WITHDRAW_FEE_BPS, WITHDRAW_FIXED_FEE, type WalletAdapterBridgeOptions, type WalletSigner$1 as WalletSigner, type WalletUtxo, type Web3Module, type WithdrawOptions, type WithdrawSubmissionResult, accountMeta, addressBytes, addressFromBytes, addressFromPublicKey, assertDirectSubmissionLanded, assertInputMints, assertTransactionCircuitIntegrity, assessBridgeQuote, bigintToBytes32$1 as bigintToBytes32, bigintToHex, buildAuthTransactionMessage, buildMerkleTree, buildMerkleTreeFromChain, buildMerkleTreeFromRelay, buildRecipientDeliveryNotes, buildRelayAuthPreimage, buildRelayBatchAuthMessage, buildTransactRequestBody, buildTransactionMessage, bytesToHex, calculateFee, calculateFeeBigint, calculateRelayFee, canRebuildMerkleTreeFromChain, canonicalJson, canonicalPayloadString, chainNoteFromBase64, chainNoteToBase64, classifyPostFailure, classifyRelayError, cleanupReceivingAddress, cleanupStalePendingOperations, clearPendingDeposits, clearPendingWithdrawals, cloakBridgeRail, computeChainNoteHash, computeExtDataHash, computeMerkleRoot, computeNoteIndexChain, computeProofForLatestDeposit, computeProofFromChain, computeSignature, computeSwapRefundCommitment, computeCommitment as computeUtxoCommitment, computeNullifier as computeUtxoNullifier, confirmSignature, confirmTransactSettlement, copyNoteToClipboard, createCloakError, createCloakRpc, createDepositInstruction, createLogger, createRecoverableChangeUtxo, createRecoverableDepositUtxo, createRelayBatchAuthCoordinator, createUtxo, createZeroUtxo, decryptCompactChainNote, decryptComplianceMetadataWithMasterKey, decryptTransactionMetadata, depositFromDerivedKey, deriveBridgeReceiver, deriveChangeNoteBlinding, deriveDepositNoteBlinding, deriveDiversifiedViewingKey, deriveDiversifier, deriveFundingTargets, deriveInputNullifierPdas, deriveLegacyBridgeReceiver, deriveLegacyDepositNoteSecrets, deriveLegacySwapRefundAuthorization, derivePublicKey, deriveSpendKey, deriveSwapRefundAuthorization, deriveSwapRefundBlinding, deriveUserCompliancePublicKey, deriveUserComplianceScalar, deriveUtxoKeypairFromSpendKey, deriveViewKey, deriveViewingKeyFromNk, deriveViewingKeyFromSpendKey, deriveViewingKeyFromUtxoPrivateKey, deserializeUtxo, detectNetworkFromRpcUrl, discoverSwapRefunds, downloadNote, encodeDeliveryCarrierMemo, encodeNoteIndexItem, encodeNoteIndexPage, encodeNoteSimple, encodeRecipientDeliveryNote, encryptCompactChainNote, encryptNoteForRecipient, encryptTransactionMetadata, encryptTransactionMetadataBundle, expandSpendKey, explainRelayAuthRejection, exportKeys, exportNote, exportWalletKeys, fetchAccountBytes, fetchCommitments, fetchLatestBlockhash, fetchLookupTables, fetchNoteIndexHead, fetchNoteIndexPage, fetchRiskQuoteInstruction, fetchRiskQuoteIx, fetchSignaturesForAddress, filterNotesByNetwork, filterWithdrawableNotes, findNoteByCommitment, findProgramAddress, formatAmount, formatComplianceCsv, formatErrorForLogging, formatSol, fullWithdraw, fundReceiverViaPaymaster, generateCloakKeys, generateCommitmentAsync, generateMasterSeed, generateNoteFromWallet, generateUtxoKeypair, generateViewingKeyPair, getAddressExplorerUrl, getChainNoteRegistryPDA, getCircuitsPath, getDeliveryRegistryPDA, getDistributableAmount, getExplorerUrl, getNkFromUtxoPrivateKey, getNullifierPDA, getPendingOperationsSummary, getPoolAuthorityConfigPDA, getPublicKey, getPublicViewKey, getRecipientAmount, getRpcUrlForNetwork, getShieldPoolPDAs, getSwapStatePDA, getViewKey, hasPendingOperations, hexToBigint$1 as hexToBigint, hexToBytes, importKeys, importWalletKeys, isBrowser, isBrowserLike, isDebugEnabled, isMessageSigner, isPlausibleSignature, isReactNative, isRootNotFoundError, isSubmissionOutcomeUnknownResponse, isTerminalFailure, isValidHex, isValidRpcUrl, isValidSolanaAddress, isWithdrawAmountSufficient, isWithdrawable, listBridgeDeposits, loadPendingDeposits, loadPendingWithdrawals, loadVerifiedCircuitArtifacts, matchChangeNote, matchDepositNote, matchSwapRefundLeaf, mayRetry, messageSignerFromCallback, openRecipientDeliveryNote, parseAmount, parseDeliveryCarrierMemo, parseError, parseNote, parseNoteIndexItem, parseNoteIndexPage, parseRelayErrorResponse, parseRelayErrorSignature, parseTransactionError, partialWithdraw, partiallySignTransaction, poseidonHash, preflightCheck, preflightNullifiers, prepareEncryptedOutput, prepareEncryptedOutputForRecipient, programInstruction, proofToBytes, pubkeyToFieldElement, pubkeyToLimbs, randomBytes, randomChangeNoteSalt, randomDepositNoteSalt, randomFieldElement, readMerkleTreeState, readRent, recipientDeliveryNoteToBase64, recoverNotesFromIndex, registerViewingKey, relayRequestDigestHex, removePendingDeposit, removePendingWithdrawal, renderAssessment, resolveCircuitsBase, retryDelayMs, savePendingDeposit, savePendingWithdrawal, scanNotesForWallet, scanRecipientDeliveryNotes, scanTransactions, sdkLogger, selectUtxos, sendInstructions, sendRawTransaction, sendTransaction, serializeAuthTransactionMessage, serializeNote, serializeUtxo, setCircuitsPath, setDebugMode, signCompiledTransaction, signMessageBytes, signRelayAuthPayload, signTransaction, signerFromKeypair, signerFromSecretKey, signerFromWalletAdapter, splitTo2Limbs, submitTransactToRelay, sumUtxoAmounts, swapUtxo, swapWithChange, toAddress, toComplianceReport, transact, transactBatch, transactionBase64, transactionBytes, transactionFromBytes, transactionWireSize, transfer, truncate, tryDecryptNote, updateNoteWithDeposit, updatePendingDeposit, updatePendingWithdrawal, bigintToBytes32 as utxoBigintToBytes32, utxoEquals, hexToBigint as utxoHexToBigint, validateDepositParams, validateNote, validateOutputsSum, validatePaymasterTopUpTransaction, validateRoot, validateTransfers, validateWalletConnected, validateWithdrawableNote, verifyAllCircuits, verifyCircuitIntegrity, verifyQuoteSignature, verifyUtxos, waitForRoot, withShieldRetries, withTiming, withdrawFeeFor };
|
package/dist/index.d.ts
CHANGED
|
@@ -5232,6 +5232,28 @@ interface NoteIndexPage {
|
|
|
5232
5232
|
rawItems: Uint8Array[];
|
|
5233
5233
|
/** Items of unknown kinds, skipped by `body_len`. */
|
|
5234
5234
|
skippedUnknown: number;
|
|
5235
|
+
/**
|
|
5236
|
+
* Position in the page (0-based, unknown and malformed kinds counted) of each entry of `items`,
|
|
5237
|
+
* so `page * NOTE_INDEX_PAGE_SIZE + itemPositions[i]` is the item's real sequence number.
|
|
5238
|
+
*/
|
|
5239
|
+
itemPositions: number[];
|
|
5240
|
+
/**
|
|
5241
|
+
* Known-kind items whose body failed that kind's checks and were skipped by `body_len`. Always 0
|
|
5242
|
+
* unless {@link ParseNoteIndexPageOptions.skipMalformedItems} is set (otherwise they throw).
|
|
5243
|
+
*/
|
|
5244
|
+
skippedMalformed: number;
|
|
5245
|
+
}
|
|
5246
|
+
/** Options of {@link parseNoteIndexPage}. */
|
|
5247
|
+
interface ParseNoteIndexPageOptions {
|
|
5248
|
+
/**
|
|
5249
|
+
* Skip (and count in `skippedMalformed`) a known-kind item whose body fails that kind's checks,
|
|
5250
|
+
* instead of refusing the whole page. Only the BODY is forgiven: the page header, the item
|
|
5251
|
+
* framing (`kind | body_len` inside the page, no truncation, no trailing bytes) and the hash
|
|
5252
|
+
* chain stay strict, so a skipped item is exactly a hidden item, which an untrusted relay can
|
|
5253
|
+
* already do. `recoverNotesFromIndex` sets it, so that one bad entry cannot abort every
|
|
5254
|
+
* wallet's restore.
|
|
5255
|
+
*/
|
|
5256
|
+
skipMalformedItems?: boolean;
|
|
5235
5257
|
}
|
|
5236
5258
|
/** Input to {@link encodeNoteIndexPage}. */
|
|
5237
5259
|
interface EncodeNoteIndexPageParams {
|
|
@@ -5249,11 +5271,15 @@ interface EncodeNoteIndexPageParams {
|
|
|
5249
5271
|
* other than `expect`, an item whose body_len differs from the exact length of its kind, a note
|
|
5250
5272
|
* whose version disagrees with its length, an out-of-range ix_tag / note_source, a refund whose mint
|
|
5251
5273
|
* is not WSOL, an unknown kind longer than 1024 bytes, a truncated item, or trailing bytes.
|
|
5274
|
+
*
|
|
5275
|
+
* With `options.skipMalformedItems`, an item whose body alone is at fault (its framing inside the
|
|
5276
|
+
* page is intact) is skipped and counted in `skippedMalformed` instead; everything else above
|
|
5277
|
+
* still throws.
|
|
5252
5278
|
*/
|
|
5253
5279
|
declare function parseNoteIndexPage(bytes: Uint8Array, expect?: {
|
|
5254
5280
|
epoch: bigint;
|
|
5255
5281
|
page: number;
|
|
5256
|
-
}): NoteIndexPage;
|
|
5282
|
+
}, options?: ParseNoteIndexPageOptions): NoteIndexPage;
|
|
5257
5283
|
/**
|
|
5258
5284
|
* Parse ONE raw item (`kind | body_len | body`), as kept in `NoteIndexPage.rawItems` and in a
|
|
5259
5285
|
* persisted cursor. Same strictness as the page parser; unknown kinds are an error here.
|
|
@@ -5302,6 +5328,25 @@ declare function encodeNoteIndexPage(params: EncodeNoteIndexPageParams): Uint8Ar
|
|
|
5302
5328
|
* A HIDDEN nullifier makes a spent note look unspent; the spend-time `preflightNullifiers` in every
|
|
5303
5329
|
* spend entry point is what catches that, and it stays mandatory.
|
|
5304
5330
|
*
|
|
5331
|
+
* What is NOT checked: the proof-bound `chainNoteHash`. An index item does not carry it (nor the
|
|
5332
|
+
* `extDataHash` its preimage needs), and fetching either per transaction would break the one-RPC
|
|
5333
|
+
* budget. It is not needed for (a) to (c): the chain note is AES-GCM under a key HKDF'd from nk
|
|
5334
|
+
* with the item's own `comm0` as salt (`comm1` for a v2 note), so a note written for one
|
|
5335
|
+
* transaction never opens when the relay attaches it to another (a mispaired CLK1 carrier), for its
|
|
5336
|
+
* real owner or anyone else, and whatever does open (a note crafted for the transaction it sits
|
|
5337
|
+
* on, say under a public legacy key) is still held to (b) and (c). The item's other public fields (`publicAmount`,
|
|
5338
|
+
* the nullifiers) feed only derivations whose result must reproduce a published commitment, so a
|
|
5339
|
+
* wrong value there can only make a note fail to match. The cost of a mispairing is therefore
|
|
5340
|
+
* hidden notes (the memo's real owner's, and the paired source's own), never a wrong note, and no
|
|
5341
|
+
* client-side check can recover them: only the relay can pair correctly.
|
|
5342
|
+
*
|
|
5343
|
+
* ── One bad entry never aborts a run ──────────────────────────────────────────────────────────
|
|
5344
|
+
* The index carries what anyone can put on chain, and a legacy viewing key may be public, so a
|
|
5345
|
+
* stranger can write a note that opens for a wallet. An item whose body is malformed (framing
|
|
5346
|
+
* intact), or whose opened contents make a matcher throw, is skipped and counted in
|
|
5347
|
+
* `stats.skipped`, exactly as if it were not this wallet's. Only page-level faults (header,
|
|
5348
|
+
* framing, hash chain, head) still fail the run, since they are not one entry's.
|
|
5349
|
+
*
|
|
5305
5350
|
* ── The cursor never depends on what the wallet owns (contract property 1) ────────────────────
|
|
5306
5351
|
* Every run downloads from the persisted cursor page, so that page must be a function of public
|
|
5307
5352
|
* data only. It is always `floor(complete_pages / 8) * 8` of the head this run saw (or the previous
|
|
@@ -5320,6 +5365,16 @@ declare function encodeNoteIndexPage(params: EncodeNoteIndexPageParams): Uint8Ar
|
|
|
5320
5365
|
* returned in `atRisk`, never in `notes`, so an app can migrate them without counting them as
|
|
5321
5366
|
* balance.
|
|
5322
5367
|
*
|
|
5368
|
+
* Some older clients also encrypted their chain notes under a viewing key that is not the wallet's
|
|
5369
|
+
* canonical nk (mobile used SHA-512 of the public wallet address, or the embedded wallet's nsk).
|
|
5370
|
+
* Pass those as `legacyViewingKeyNks` to find such notes in the same download, at no extra request:
|
|
5371
|
+
* every item is trial-opened under the canonical nk first, then under each legacy key. A legacy key
|
|
5372
|
+
* only ever FINDS notes. Everything that opened only under one is returned in `atRisk`, whatever
|
|
5373
|
+
* its owner key (a legacy key may be public, so the relay and anyone else can read those notes), it
|
|
5374
|
+
* never opens a recipient delivery (the delivery rail never used one), and nothing a legacy key opens
|
|
5375
|
+
* can enter `notes`. A note of this wallet's that spends a legacy note and is encrypted under the
|
|
5376
|
+
* canonical nk (a migration) is matched normally and lands in `notes`.
|
|
5377
|
+
*
|
|
5323
5378
|
* ── Refund leaves ─────────────────────────────────────────────────────────────────────────────
|
|
5324
5379
|
* CloseSwapState appends R_fb to the WSOL MAIN tree (`["merkle_tree", WSOL]`; the separate refund
|
|
5325
5380
|
* tree belonged to the retired ClaimRefund design and the program rejects it). So SWAP_REFUND
|
|
@@ -5338,7 +5393,10 @@ interface IndexedRecoveredNote {
|
|
|
5338
5393
|
utxo: Utxo;
|
|
5339
5394
|
/** Base58 signature the relay attached. Metadata only, NOT proof of payment. */
|
|
5340
5395
|
signature: string;
|
|
5341
|
-
/**
|
|
5396
|
+
/**
|
|
5397
|
+
* `true` for every `atRisk` note (owner key derivable from nk, or found through a legacy viewing
|
|
5398
|
+
* key), `false` for `notes`.
|
|
5399
|
+
*/
|
|
5342
5400
|
legacyExposed: boolean;
|
|
5343
5401
|
}
|
|
5344
5402
|
/**
|
|
@@ -5405,6 +5463,13 @@ interface RecoverNotesFromIndexParams {
|
|
|
5405
5463
|
poolMints: Address[];
|
|
5406
5464
|
/** The wallet's 32-byte viewing base. */
|
|
5407
5465
|
viewingKeyNk: Uint8Array;
|
|
5466
|
+
/**
|
|
5467
|
+
* Other 32-byte viewing keys older clients of this wallet encrypted chain notes under (at most
|
|
5468
|
+
* 8). Scan only: every note found through one is returned in `atRisk`, never in `notes`, and a
|
|
5469
|
+
* legacy key never opens a recipient delivery. Costs local trial decryptions, no extra request.
|
|
5470
|
+
* Entries equal to `viewingKeyNk` are ignored.
|
|
5471
|
+
*/
|
|
5472
|
+
legacyViewingKeyNks?: Uint8Array[];
|
|
5408
5473
|
/** The wallet's long-lived UTXO keypair, with its real private key. */
|
|
5409
5474
|
ownerUtxoKeypair: UtxoKeypair;
|
|
5410
5475
|
/** The `cursor` of the previous run. Omit for a full sync. */
|
|
@@ -5447,13 +5512,28 @@ interface NoteIndexRecoveryStats {
|
|
|
5447
5512
|
conflicts: number;
|
|
5448
5513
|
/** Pending candidates over the carry limit, not carried to the next run. */
|
|
5449
5514
|
pendingDropped: number;
|
|
5515
|
+
/**
|
|
5516
|
+
* Index entries skipped instead of failing the run (each one is treated as not this wallet's):
|
|
5517
|
+
* an item whose body fails its kind's format checks while its framing in the page is intact, and
|
|
5518
|
+
* an item that opened under this wallet's keys but whose contents no derivation accepts (a chain
|
|
5519
|
+
* note salt of 0 or over 96 bits, or anything else that throws while it is matched). Anyone who
|
|
5520
|
+
* can read a legacy viewing key can write such a note, so none of this may abort a restore.
|
|
5521
|
+
*/
|
|
5522
|
+
skipped: number;
|
|
5450
5523
|
}
|
|
5451
5524
|
interface RecoverNotesFromIndexResult {
|
|
5452
5525
|
/** Verified, unspent, owned by `ownerUtxoKeypair`; deduped by (mint, leaf). */
|
|
5453
5526
|
notes: IndexedRecoveredNote[];
|
|
5454
|
-
/**
|
|
5527
|
+
/**
|
|
5528
|
+
* Verified, unspent, and either owned by an nk-derived legacy key (spendable by nk holders) or
|
|
5529
|
+
* found only through a `legacyViewingKeyNks` entry (readable by whoever holds that key). Migrate.
|
|
5530
|
+
*/
|
|
5455
5531
|
atRisk: IndexedRecoveredNote[];
|
|
5456
|
-
/**
|
|
5532
|
+
/**
|
|
5533
|
+
* Candidates not verifiable yet (tree or root not caught up). Carried in the cursor. It depends on
|
|
5534
|
+
* what this wallet owns (a relay can make it non-zero for the owner of one item), so never let it
|
|
5535
|
+
* decide whether or what to download: gate polls on the public head (epoch, watermark) alone.
|
|
5536
|
+
*/
|
|
5457
5537
|
pending: number;
|
|
5458
5538
|
/** Persist and pass back as `cursor`. */
|
|
5459
5539
|
cursor: NoteIndexCursor;
|
|
@@ -6339,4 +6419,4 @@ declare const VERSION = "0.2.6";
|
|
|
6339
6419
|
/** True when scanner supports TransactSwap (tag 1). Check this to verify the correct SDK bundle is loaded. */
|
|
6340
6420
|
declare const SCANNER_SUPPORTS_TRANSACT_SWAP = true;
|
|
6341
6421
|
|
|
6342
|
-
export { BRIDGE_ESCROW_LABEL, BRIDGE_ESCROW_LABEL_V2, BUILD_ALLOWS_LOCAL_ENDPOINTS, type BridgeDeliveryState, type BridgeDeposit, type BridgeDepositState, type BridgeQuoteAssessment, type BridgeQuoteInput, type BridgeRail, type BridgeRailAttestation, type BridgeRailProblem, type BridgeRailQuoteOption, type BridgeRailQuoteRequest, type BridgeRailQuoteResponse, type BridgeRailStatusResult, type BuildRecipientDeliveryNotesParams, CHAIN_NOTE_SALT_BITS, CLEANUP_FEE_BUDGET, CLOAK_PRODUCTION_RELAY_URL, CLOAK_PROGRAM_ID, type ChainNoteTxType, type CircuitVerificationResult, type CleanupResult, type CloakConfig, CloakError, type CloakKeyPair, type CloakNote, type CloakRpc, type CommitmentEntry, type CommitmentsResponse, type CompactChainNote, type ComplianceReport, type ComplianceTxType, type ConfirmSettlementParams, type CreateRecoverableDepositUtxoParams, DEFAULT_CIRCUITS_URL, DEFAULT_TRANSACTION_CIRCUITS_URL, DELIVERY_MEMO_TAG, DELIVERY_REGISTRY_SEED, type DeliveredNote, DepositError, type DepositInstructionParams, type DepositNoteSecrets, type DepositOptions, type DepositOutcome, type DepositRef, type DepositResult, type DepositStatus, type DiscoverOptions, type DiscoverSwapRefundsOptions, type DiscoveredSwapRefund, DoNotRetry, ECONOMIC_MINIMUM, EXPECTED_CIRCUIT_HASHES, type EncodeNoteIndexPageParams, type EncryptedMetadataBundle, type EncryptedNote$1 as EncryptedNote, type ErrorCategory, type ExpandedSpendKey, type ExternalFeePayerAdapter, FEE_BUDGET, FIXED_FEE_LAMPORTS, type FundingPlan, type Groth16Proof, type IndexedRecoveredNote, type IndexedRecoveredNoteKind, InsecureRandomnessError, LAMPORTS_PER_SOL, type LegacyWalletAdapter, type WalletSigner as LegacyWalletSigner, LocalStorageAdapter, type LogLevel, type Logger, type LookupTable, MAINNET_RENT_0, MAINNET_RENT_1, MAX_RECEIVER_INDEX, MERKLE_TREE_HEIGHT, MIN_DEPOSIT_LAMPORTS, MIN_DEPOSIT_SPL_BASE_UNITS, type MasterKey, type MatchChangeNoteParams, type MatchDepositNoteParams, type MatchSwapRefundLeafParams, type MaxLengthArray, MemoryStorageAdapter, type MerkleProof, type MerkleRootResponse, MerkleTree, type MessageSigner, NATIVE_SOL_MINT, NOTE_INDEX_NO_LEAF, NOTE_INDEX_PAGE_SIZE, type Network, type NoteData, type NoteIndexCursor, type NoteIndexDeliveryItem, type NoteIndexFetchOptions, NoteIndexFormatError, type NoteIndexHead, NoteIndexHeadBehindError, type NoteIndexItem, type NoteIndexPage, type NoteIndexRecoveryStats, type NoteIndexSwapRefundItem, type NoteIndexTxItem, ONECLICK_PUBKEY_B58, type OnchainMerkleProof, type ParsedDeliveryCarrier, type PaymasterTopUpExpectation, type PaymasterTopUpResult, type PendingDeposit, type PendingWithdrawal, type PostFailureVerdict, RECIPIENT_DELIVERY_CIPHERTEXT_LEN, RECIPIENT_DELIVERY_EPHEMERAL_PK_LEN, RECIPIENT_DELIVERY_NONCE_LEN, RECIPIENT_DELIVERY_NOTE_BYTES, RECIPIENT_DELIVERY_PLAINTEXT_LEN, RECIPIENT_DELIVERY_TAG_LEN, RELAY_BATCH_AUTH_MAX_ITEMS, RELAY_ORIGIN_ALLOWLIST, REQUEST_AUTH_BATCH_DOMAIN, REQUEST_AUTH_BATCH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_FUTURE_SKEW_SECONDS, type RecipientDeliveryNote, type RecoverNotesFromIndexParams, type RecoverNotesFromIndexResult, type RecoveredChangeNote, type RecoveredChangeNoteRecord, type RecoveredDepositNote, type RecoveredDepositNoteRecord, type RecoveredSwapRefund, type RelayAuthMode, type RelayAuthPreimage, type RelayAuthSigner, RelayBatchAuthCoordinator, type RelayBatchAuthCoordinatorOptions, type RelayBatchAuthEnvelope, type RelayBatchAuthFields, type RelayBatchAuthItemHandle, RelayInternalError, RelayService, type RelaySubmissionResult, type RentRates, type RetryHooks, type RiskQuoteInstructionResponse, RootNotFoundError, SCANNER_SUPPORTS_TRANSACT_SWAP, SIGN_IN_MESSAGE, SanctionsQuoteError, type ScanOptions, type ScanRecipientDeliveryOptions, type ScanResult, type ScanSummary, type ScannedTransaction, type SettlementConnection, type SettlementContext, type SettlementStatus, type SettlementVerdict, SettlementVerificationError, ShieldPoolErrors, type ShieldPoolPDAs, SimpleWallet, type SpendKey, type SpendOptions, type StorageAdapter, type SubmitTransactToRelayArgs, type SwapOptions, type SwapParams, type SwapRefundAuthorization, type SwapResult, TERMINAL_FAILURE, TRANSACTION_CIRCUITS_VERSION, TRANSACT_AUTH_FIELDS, TRANSACT_SWAP_AUTH_FIELDS, type TransactBatchItem, type TransactBatchItemOutcome, type TransactBatchOptions, type TransactBatchResult, type TransactOptions, type TransactParams, type TransactRequestBodyParams, type TransactResult, TransactionConfirmationError, type TransactionMetadata, type Transfer, type TransferOptions, type TransferResult, type TxStatus, type UserFriendlyError, type Utxo, UtxoAlreadySpentError, type EncryptedNote as UtxoEncryptedNote, type UtxoKeypair, type UtxoSwapParams, type UtxoSwapResult, UtxoWallet, VARIABLE_FEE_DENOMINATOR, VARIABLE_FEE_NUMERATOR, VARIABLE_FEE_RATE, VERSION, type VerifyUtxosResult, type ViewKey, type ViewingKeyPair, WITHDRAW_FEE_BPS, WITHDRAW_FIXED_FEE, type WalletAdapterBridgeOptions, type WalletSigner$1 as WalletSigner, type WalletUtxo, type Web3Module, type WithdrawOptions, type WithdrawSubmissionResult, accountMeta, addressBytes, addressFromBytes, addressFromPublicKey, assertDirectSubmissionLanded, assertInputMints, assertTransactionCircuitIntegrity, assessBridgeQuote, bigintToBytes32$1 as bigintToBytes32, bigintToHex, buildAuthTransactionMessage, buildMerkleTree, buildMerkleTreeFromChain, buildMerkleTreeFromRelay, buildRecipientDeliveryNotes, buildRelayAuthPreimage, buildRelayBatchAuthMessage, buildTransactRequestBody, buildTransactionMessage, bytesToHex, calculateFee, calculateFeeBigint, calculateRelayFee, canRebuildMerkleTreeFromChain, canonicalJson, canonicalPayloadString, chainNoteFromBase64, chainNoteToBase64, classifyPostFailure, classifyRelayError, cleanupReceivingAddress, cleanupStalePendingOperations, clearPendingDeposits, clearPendingWithdrawals, cloakBridgeRail, computeChainNoteHash, computeExtDataHash, computeMerkleRoot, computeNoteIndexChain, computeProofForLatestDeposit, computeProofFromChain, computeSignature, computeSwapRefundCommitment, computeCommitment as computeUtxoCommitment, computeNullifier as computeUtxoNullifier, confirmSignature, confirmTransactSettlement, copyNoteToClipboard, createCloakError, createCloakRpc, createDepositInstruction, createLogger, createRecoverableChangeUtxo, createRecoverableDepositUtxo, createRelayBatchAuthCoordinator, createUtxo, createZeroUtxo, decryptCompactChainNote, decryptComplianceMetadataWithMasterKey, decryptTransactionMetadata, depositFromDerivedKey, deriveBridgeReceiver, deriveChangeNoteBlinding, deriveDepositNoteBlinding, deriveDiversifiedViewingKey, deriveDiversifier, deriveFundingTargets, deriveInputNullifierPdas, deriveLegacyBridgeReceiver, deriveLegacyDepositNoteSecrets, deriveLegacySwapRefundAuthorization, derivePublicKey, deriveSpendKey, deriveSwapRefundAuthorization, deriveSwapRefundBlinding, deriveUserCompliancePublicKey, deriveUserComplianceScalar, deriveUtxoKeypairFromSpendKey, deriveViewKey, deriveViewingKeyFromNk, deriveViewingKeyFromSpendKey, deriveViewingKeyFromUtxoPrivateKey, deserializeUtxo, detectNetworkFromRpcUrl, discoverSwapRefunds, downloadNote, encodeDeliveryCarrierMemo, encodeNoteIndexItem, encodeNoteIndexPage, encodeNoteSimple, encodeRecipientDeliveryNote, encryptCompactChainNote, encryptNoteForRecipient, encryptTransactionMetadata, encryptTransactionMetadataBundle, expandSpendKey, explainRelayAuthRejection, exportKeys, exportNote, exportWalletKeys, fetchAccountBytes, fetchCommitments, fetchLatestBlockhash, fetchLookupTables, fetchNoteIndexHead, fetchNoteIndexPage, fetchRiskQuoteInstruction, fetchRiskQuoteIx, fetchSignaturesForAddress, filterNotesByNetwork, filterWithdrawableNotes, findNoteByCommitment, findProgramAddress, formatAmount, formatComplianceCsv, formatErrorForLogging, formatSol, fullWithdraw, fundReceiverViaPaymaster, generateCloakKeys, generateCommitmentAsync, generateMasterSeed, generateNoteFromWallet, generateUtxoKeypair, generateViewingKeyPair, getAddressExplorerUrl, getChainNoteRegistryPDA, getCircuitsPath, getDeliveryRegistryPDA, getDistributableAmount, getExplorerUrl, getNkFromUtxoPrivateKey, getNullifierPDA, getPendingOperationsSummary, getPoolAuthorityConfigPDA, getPublicKey, getPublicViewKey, getRecipientAmount, getRpcUrlForNetwork, getShieldPoolPDAs, getSwapStatePDA, getViewKey, hasPendingOperations, hexToBigint$1 as hexToBigint, hexToBytes, importKeys, importWalletKeys, isBrowser, isBrowserLike, isDebugEnabled, isMessageSigner, isPlausibleSignature, isReactNative, isRootNotFoundError, isSubmissionOutcomeUnknownResponse, isTerminalFailure, isValidHex, isValidRpcUrl, isValidSolanaAddress, isWithdrawAmountSufficient, isWithdrawable, listBridgeDeposits, loadPendingDeposits, loadPendingWithdrawals, loadVerifiedCircuitArtifacts, matchChangeNote, matchDepositNote, matchSwapRefundLeaf, mayRetry, messageSignerFromCallback, openRecipientDeliveryNote, parseAmount, parseDeliveryCarrierMemo, parseError, parseNote, parseNoteIndexItem, parseNoteIndexPage, parseRelayErrorResponse, parseRelayErrorSignature, parseTransactionError, partialWithdraw, partiallySignTransaction, poseidonHash, preflightCheck, preflightNullifiers, prepareEncryptedOutput, prepareEncryptedOutputForRecipient, programInstruction, proofToBytes, pubkeyToFieldElement, pubkeyToLimbs, randomBytes, randomChangeNoteSalt, randomDepositNoteSalt, randomFieldElement, readMerkleTreeState, readRent, recipientDeliveryNoteToBase64, recoverNotesFromIndex, registerViewingKey, relayRequestDigestHex, removePendingDeposit, removePendingWithdrawal, renderAssessment, resolveCircuitsBase, retryDelayMs, savePendingDeposit, savePendingWithdrawal, scanNotesForWallet, scanRecipientDeliveryNotes, scanTransactions, sdkLogger, selectUtxos, sendInstructions, sendRawTransaction, sendTransaction, serializeAuthTransactionMessage, serializeNote, serializeUtxo, setCircuitsPath, setDebugMode, signCompiledTransaction, signMessageBytes, signRelayAuthPayload, signTransaction, signerFromKeypair, signerFromSecretKey, signerFromWalletAdapter, splitTo2Limbs, submitTransactToRelay, sumUtxoAmounts, swapUtxo, swapWithChange, toAddress, toComplianceReport, transact, transactBatch, transactionBase64, transactionBytes, transactionFromBytes, transactionWireSize, transfer, truncate, tryDecryptNote, updateNoteWithDeposit, updatePendingDeposit, updatePendingWithdrawal, bigintToBytes32 as utxoBigintToBytes32, utxoEquals, hexToBigint as utxoHexToBigint, validateDepositParams, validateNote, validateOutputsSum, validatePaymasterTopUpTransaction, validateRoot, validateTransfers, validateWalletConnected, validateWithdrawableNote, verifyAllCircuits, verifyCircuitIntegrity, verifyQuoteSignature, verifyUtxos, waitForRoot, withShieldRetries, withTiming, withdrawFeeFor };
|
|
6422
|
+
export { BRIDGE_ESCROW_LABEL, BRIDGE_ESCROW_LABEL_V2, BUILD_ALLOWS_LOCAL_ENDPOINTS, type BridgeDeliveryState, type BridgeDeposit, type BridgeDepositState, type BridgeQuoteAssessment, type BridgeQuoteInput, type BridgeRail, type BridgeRailAttestation, type BridgeRailProblem, type BridgeRailQuoteOption, type BridgeRailQuoteRequest, type BridgeRailQuoteResponse, type BridgeRailStatusResult, type BuildRecipientDeliveryNotesParams, CHAIN_NOTE_SALT_BITS, CLEANUP_FEE_BUDGET, CLOAK_PRODUCTION_RELAY_URL, CLOAK_PROGRAM_ID, type ChainNoteTxType, type CircuitVerificationResult, type CleanupResult, type CloakConfig, CloakError, type CloakKeyPair, type CloakNote, type CloakRpc, type CommitmentEntry, type CommitmentsResponse, type CompactChainNote, type ComplianceReport, type ComplianceTxType, type ConfirmSettlementParams, type CreateRecoverableDepositUtxoParams, DEFAULT_CIRCUITS_URL, DEFAULT_TRANSACTION_CIRCUITS_URL, DELIVERY_MEMO_TAG, DELIVERY_REGISTRY_SEED, type DeliveredNote, DepositError, type DepositInstructionParams, type DepositNoteSecrets, type DepositOptions, type DepositOutcome, type DepositRef, type DepositResult, type DepositStatus, type DiscoverOptions, type DiscoverSwapRefundsOptions, type DiscoveredSwapRefund, DoNotRetry, ECONOMIC_MINIMUM, EXPECTED_CIRCUIT_HASHES, type EncodeNoteIndexPageParams, type EncryptedMetadataBundle, type EncryptedNote$1 as EncryptedNote, type ErrorCategory, type ExpandedSpendKey, type ExternalFeePayerAdapter, FEE_BUDGET, FIXED_FEE_LAMPORTS, type FundingPlan, type Groth16Proof, type IndexedRecoveredNote, type IndexedRecoveredNoteKind, InsecureRandomnessError, LAMPORTS_PER_SOL, type LegacyWalletAdapter, type WalletSigner as LegacyWalletSigner, LocalStorageAdapter, type LogLevel, type Logger, type LookupTable, MAINNET_RENT_0, MAINNET_RENT_1, MAX_RECEIVER_INDEX, MERKLE_TREE_HEIGHT, MIN_DEPOSIT_LAMPORTS, MIN_DEPOSIT_SPL_BASE_UNITS, type MasterKey, type MatchChangeNoteParams, type MatchDepositNoteParams, type MatchSwapRefundLeafParams, type MaxLengthArray, MemoryStorageAdapter, type MerkleProof, type MerkleRootResponse, MerkleTree, type MessageSigner, NATIVE_SOL_MINT, NOTE_INDEX_NO_LEAF, NOTE_INDEX_PAGE_SIZE, type Network, type NoteData, type NoteIndexCursor, type NoteIndexDeliveryItem, type NoteIndexFetchOptions, NoteIndexFormatError, type NoteIndexHead, NoteIndexHeadBehindError, type NoteIndexItem, type NoteIndexPage, type NoteIndexRecoveryStats, type NoteIndexSwapRefundItem, type NoteIndexTxItem, ONECLICK_PUBKEY_B58, type OnchainMerkleProof, type ParseNoteIndexPageOptions, type ParsedDeliveryCarrier, type PaymasterTopUpExpectation, type PaymasterTopUpResult, type PendingDeposit, type PendingWithdrawal, type PostFailureVerdict, RECIPIENT_DELIVERY_CIPHERTEXT_LEN, RECIPIENT_DELIVERY_EPHEMERAL_PK_LEN, RECIPIENT_DELIVERY_NONCE_LEN, RECIPIENT_DELIVERY_NOTE_BYTES, RECIPIENT_DELIVERY_PLAINTEXT_LEN, RECIPIENT_DELIVERY_TAG_LEN, RELAY_BATCH_AUTH_MAX_ITEMS, RELAY_ORIGIN_ALLOWLIST, REQUEST_AUTH_BATCH_DOMAIN, REQUEST_AUTH_BATCH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_AGE_SECONDS, REQUEST_AUTH_MAX_FUTURE_SKEW_SECONDS, type RecipientDeliveryNote, type RecoverNotesFromIndexParams, type RecoverNotesFromIndexResult, type RecoveredChangeNote, type RecoveredChangeNoteRecord, type RecoveredDepositNote, type RecoveredDepositNoteRecord, type RecoveredSwapRefund, type RelayAuthMode, type RelayAuthPreimage, type RelayAuthSigner, RelayBatchAuthCoordinator, type RelayBatchAuthCoordinatorOptions, type RelayBatchAuthEnvelope, type RelayBatchAuthFields, type RelayBatchAuthItemHandle, RelayInternalError, RelayService, type RelaySubmissionResult, type RentRates, type RetryHooks, type RiskQuoteInstructionResponse, RootNotFoundError, SCANNER_SUPPORTS_TRANSACT_SWAP, SIGN_IN_MESSAGE, SanctionsQuoteError, type ScanOptions, type ScanRecipientDeliveryOptions, type ScanResult, type ScanSummary, type ScannedTransaction, type SettlementConnection, type SettlementContext, type SettlementStatus, type SettlementVerdict, SettlementVerificationError, ShieldPoolErrors, type ShieldPoolPDAs, SimpleWallet, type SpendKey, type SpendOptions, type StorageAdapter, type SubmitTransactToRelayArgs, type SwapOptions, type SwapParams, type SwapRefundAuthorization, type SwapResult, TERMINAL_FAILURE, TRANSACTION_CIRCUITS_VERSION, TRANSACT_AUTH_FIELDS, TRANSACT_SWAP_AUTH_FIELDS, type TransactBatchItem, type TransactBatchItemOutcome, type TransactBatchOptions, type TransactBatchResult, type TransactOptions, type TransactParams, type TransactRequestBodyParams, type TransactResult, TransactionConfirmationError, type TransactionMetadata, type Transfer, type TransferOptions, type TransferResult, type TxStatus, type UserFriendlyError, type Utxo, UtxoAlreadySpentError, type EncryptedNote as UtxoEncryptedNote, type UtxoKeypair, type UtxoSwapParams, type UtxoSwapResult, UtxoWallet, VARIABLE_FEE_DENOMINATOR, VARIABLE_FEE_NUMERATOR, VARIABLE_FEE_RATE, VERSION, type VerifyUtxosResult, type ViewKey, type ViewingKeyPair, WITHDRAW_FEE_BPS, WITHDRAW_FIXED_FEE, type WalletAdapterBridgeOptions, type WalletSigner$1 as WalletSigner, type WalletUtxo, type Web3Module, type WithdrawOptions, type WithdrawSubmissionResult, accountMeta, addressBytes, addressFromBytes, addressFromPublicKey, assertDirectSubmissionLanded, assertInputMints, assertTransactionCircuitIntegrity, assessBridgeQuote, bigintToBytes32$1 as bigintToBytes32, bigintToHex, buildAuthTransactionMessage, buildMerkleTree, buildMerkleTreeFromChain, buildMerkleTreeFromRelay, buildRecipientDeliveryNotes, buildRelayAuthPreimage, buildRelayBatchAuthMessage, buildTransactRequestBody, buildTransactionMessage, bytesToHex, calculateFee, calculateFeeBigint, calculateRelayFee, canRebuildMerkleTreeFromChain, canonicalJson, canonicalPayloadString, chainNoteFromBase64, chainNoteToBase64, classifyPostFailure, classifyRelayError, cleanupReceivingAddress, cleanupStalePendingOperations, clearPendingDeposits, clearPendingWithdrawals, cloakBridgeRail, computeChainNoteHash, computeExtDataHash, computeMerkleRoot, computeNoteIndexChain, computeProofForLatestDeposit, computeProofFromChain, computeSignature, computeSwapRefundCommitment, computeCommitment as computeUtxoCommitment, computeNullifier as computeUtxoNullifier, confirmSignature, confirmTransactSettlement, copyNoteToClipboard, createCloakError, createCloakRpc, createDepositInstruction, createLogger, createRecoverableChangeUtxo, createRecoverableDepositUtxo, createRelayBatchAuthCoordinator, createUtxo, createZeroUtxo, decryptCompactChainNote, decryptComplianceMetadataWithMasterKey, decryptTransactionMetadata, depositFromDerivedKey, deriveBridgeReceiver, deriveChangeNoteBlinding, deriveDepositNoteBlinding, deriveDiversifiedViewingKey, deriveDiversifier, deriveFundingTargets, deriveInputNullifierPdas, deriveLegacyBridgeReceiver, deriveLegacyDepositNoteSecrets, deriveLegacySwapRefundAuthorization, derivePublicKey, deriveSpendKey, deriveSwapRefundAuthorization, deriveSwapRefundBlinding, deriveUserCompliancePublicKey, deriveUserComplianceScalar, deriveUtxoKeypairFromSpendKey, deriveViewKey, deriveViewingKeyFromNk, deriveViewingKeyFromSpendKey, deriveViewingKeyFromUtxoPrivateKey, deserializeUtxo, detectNetworkFromRpcUrl, discoverSwapRefunds, downloadNote, encodeDeliveryCarrierMemo, encodeNoteIndexItem, encodeNoteIndexPage, encodeNoteSimple, encodeRecipientDeliveryNote, encryptCompactChainNote, encryptNoteForRecipient, encryptTransactionMetadata, encryptTransactionMetadataBundle, expandSpendKey, explainRelayAuthRejection, exportKeys, exportNote, exportWalletKeys, fetchAccountBytes, fetchCommitments, fetchLatestBlockhash, fetchLookupTables, fetchNoteIndexHead, fetchNoteIndexPage, fetchRiskQuoteInstruction, fetchRiskQuoteIx, fetchSignaturesForAddress, filterNotesByNetwork, filterWithdrawableNotes, findNoteByCommitment, findProgramAddress, formatAmount, formatComplianceCsv, formatErrorForLogging, formatSol, fullWithdraw, fundReceiverViaPaymaster, generateCloakKeys, generateCommitmentAsync, generateMasterSeed, generateNoteFromWallet, generateUtxoKeypair, generateViewingKeyPair, getAddressExplorerUrl, getChainNoteRegistryPDA, getCircuitsPath, getDeliveryRegistryPDA, getDistributableAmount, getExplorerUrl, getNkFromUtxoPrivateKey, getNullifierPDA, getPendingOperationsSummary, getPoolAuthorityConfigPDA, getPublicKey, getPublicViewKey, getRecipientAmount, getRpcUrlForNetwork, getShieldPoolPDAs, getSwapStatePDA, getViewKey, hasPendingOperations, hexToBigint$1 as hexToBigint, hexToBytes, importKeys, importWalletKeys, isBrowser, isBrowserLike, isDebugEnabled, isMessageSigner, isPlausibleSignature, isReactNative, isRootNotFoundError, isSubmissionOutcomeUnknownResponse, isTerminalFailure, isValidHex, isValidRpcUrl, isValidSolanaAddress, isWithdrawAmountSufficient, isWithdrawable, listBridgeDeposits, loadPendingDeposits, loadPendingWithdrawals, loadVerifiedCircuitArtifacts, matchChangeNote, matchDepositNote, matchSwapRefundLeaf, mayRetry, messageSignerFromCallback, openRecipientDeliveryNote, parseAmount, parseDeliveryCarrierMemo, parseError, parseNote, parseNoteIndexItem, parseNoteIndexPage, parseRelayErrorResponse, parseRelayErrorSignature, parseTransactionError, partialWithdraw, partiallySignTransaction, poseidonHash, preflightCheck, preflightNullifiers, prepareEncryptedOutput, prepareEncryptedOutputForRecipient, programInstruction, proofToBytes, pubkeyToFieldElement, pubkeyToLimbs, randomBytes, randomChangeNoteSalt, randomDepositNoteSalt, randomFieldElement, readMerkleTreeState, readRent, recipientDeliveryNoteToBase64, recoverNotesFromIndex, registerViewingKey, relayRequestDigestHex, removePendingDeposit, removePendingWithdrawal, renderAssessment, resolveCircuitsBase, retryDelayMs, savePendingDeposit, savePendingWithdrawal, scanNotesForWallet, scanRecipientDeliveryNotes, scanTransactions, sdkLogger, selectUtxos, sendInstructions, sendRawTransaction, sendTransaction, serializeAuthTransactionMessage, serializeNote, serializeUtxo, setCircuitsPath, setDebugMode, signCompiledTransaction, signMessageBytes, signRelayAuthPayload, signTransaction, signerFromKeypair, signerFromSecretKey, signerFromWalletAdapter, splitTo2Limbs, submitTransactToRelay, sumUtxoAmounts, swapUtxo, swapWithChange, toAddress, toComplianceReport, transact, transactBatch, transactionBase64, transactionBytes, transactionFromBytes, transactionWireSize, transfer, truncate, tryDecryptNote, updateNoteWithDeposit, updatePendingDeposit, updatePendingWithdrawal, bigintToBytes32 as utxoBigintToBytes32, utxoEquals, hexToBigint as utxoHexToBigint, validateDepositParams, validateNote, validateOutputsSum, validatePaymasterTopUpTransaction, validateRoot, validateTransfers, validateWalletConnected, validateWithdrawableNote, verifyAllCircuits, verifyCircuitIntegrity, verifyQuoteSignature, verifyUtxos, waitForRoot, withShieldRetries, withTiming, withdrawFeeFor };
|