@sip-protocol/sdk 0.11.0 → 0.12.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.
Files changed (39) hide show
  1. package/dist/{TransportWebUSB-2KITI5HD.mjs → TransportWebUSB-TXDZJBGS.mjs} +12 -12
  2. package/dist/browser.d.mts +1 -1
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.js +868 -545
  5. package/dist/browser.mjs +17 -3
  6. package/dist/{chunk-L4RKPNIJ.mjs → chunk-4EHEBTKP.mjs} +132 -87
  7. package/dist/{chunk-7IUKXWDN.mjs → chunk-MKTCJPFH.mjs} +331 -94
  8. package/dist/{chunk-IBZVA5Y7.mjs → chunk-NMC5RNMV.mjs} +2 -2
  9. package/dist/{chunk-XGB3TDIC.mjs → chunk-S3F4CPQ5.mjs} +5 -1
  10. package/dist/{constants-DCJYTIU3.mjs → constants-NCGOQF7S.mjs} +1 -1
  11. package/dist/{dist-PYEXZNFD.mjs → dist-4KSUM2PU.mjs} +2 -2
  12. package/dist/{dist-IFHPYLDX.mjs → dist-4O5YILSN.mjs} +2 -2
  13. package/dist/{fulfillment_proof-ANHVPKTB.mjs → fulfillment_proof-WCEE5GGO.mjs} +1 -1
  14. package/dist/{funding_proof-ICFZ5LHY.mjs → funding_proof-X5IP4SG5.mjs} +1 -1
  15. package/dist/{index-Cwo3WhxX.d.mts → index-B_fGN4Fk.d.mts} +806 -597
  16. package/dist/{index-X8qPQdp6.d.ts → index-rqQpCeVM.d.ts} +806 -597
  17. package/dist/index.d.mts +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +868 -545
  20. package/dist/index.mjs +17 -3
  21. package/dist/proofs/halo2.mjs +1 -1
  22. package/dist/proofs/kimchi.mjs +1 -1
  23. package/dist/proofs/noir.mjs +1 -1
  24. package/dist/{solana-7QOA3HBZ.mjs → solana-VKZI66MK.mjs} +12 -2
  25. package/dist/{validity_proof-3POXLPNY.mjs → validity_proof-2GVV6GA6.mjs} +1 -1
  26. package/package.json +6 -5
  27. package/src/chains/solana/gasless-cashout.ts +331 -0
  28. package/src/chains/solana/index.ts +16 -0
  29. package/src/chains/solana/privacy-adapter.ts +1 -0
  30. package/src/chains/solana/providers/webhook.ts +1 -0
  31. package/src/chains/solana/relayer-fee.ts +39 -0
  32. package/src/chains/solana/scan.ts +11 -70
  33. package/src/chains/solana/stealth-scanner.ts +8 -0
  34. package/src/chains/solana/stealth-signer.ts +145 -0
  35. package/src/chains/solana/types.ts +2 -0
  36. package/src/index.ts +16 -0
  37. package/src/proofs/parallel/concurrency.ts +2 -2
  38. package/src/solana/jito-relayer.ts +40 -8
  39. package/src/wallet/solana/privacy-adapter.ts +29 -66
@@ -1,5 +1,5 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
- import { Connection, PublicKey, Transaction, VersionedTransaction, TransactionInstruction, Keypair } from '@solana/web3.js';
2
+ import { Connection, PublicKey, Transaction, VersionedTransaction, Keypair, TransactionInstruction } from '@solana/web3.js';
3
3
  import * as _sip_protocol_types from '@sip-protocol/types';
4
4
  import { ZKProof, ViewingKey, SingleProof, ComposedProof, ProofSystem, HexString, CompositionEventListener, VerificationResult as VerificationResult$1, IndividualVerificationResult, ProofAggregationStrategy, ProofCompositionConfig, CompositionResult, PrivacyLevel, ShieldedIntent, CreateIntentParams, TrackedIntent, OneClickConfig, OneClickToken, OneClickQuoteRequest, OneClickQuoteResponse, OneClickDepositSubmit, OneClickStatusResponse, OneClickWithdrawal, StealthAddress, StealthAddressRecovery, StealthMetaAddress, ChainId as ChainId$1, DefuseAssetId, Asset, OneClickSwapStatus, Quote as Quote$1, FulfillmentResult, EncryptedTransaction, Commitment, Hash, IntentInput, IntentOutput, SIPSolver, Solver, SolverCapabilities, SolverVisibleIntent, SolverQuote, FulfillmentStatus, ZcashConfig, ZcashAddressInfo, ZcashNewAccount, ZcashReceiverType, ZcashAccountAddress, ZcashAccountBalance, ZcashUnspentNote, ZcashShieldedSendParams, ZcashOperation, ZcashBlockHeader, ZcashBlock, ZcashBlockchainInfo, ZcashNetworkInfo, StablecoinSymbol, PaymentPurpose, ShieldedPayment, CreatePaymentParams, TrackedPayment, CreateTreasuryParams, TreasuryConfig as TreasuryConfig$1, TreasuryMember, CreatePaymentProposalParams, TreasuryProposal, CreateBatchProposalParams, AuditorViewingKey, TreasuryBalance, CreateComplianceConfigParams, ComplianceConfig, RegisterAuditorParams, AuditorRegistration, AuditScope, DisclosedTransaction, DisclosureRequest, GenerateReportParams, ComplianceReport, ComplianceMetrics, AuditLogEntry as AuditLogEntry$1, WinnerResult, WinnerProof, WinnerVerification, CreatePrivateOwnershipParams, PrivateNFTOwnership, ProveOwnershipParams, OwnershipProof, OwnershipVerification, TransferPrivatelyParams, TransferResult, NFTTransfer, OwnedNFT, WalletAdapter as WalletAdapter$1, WalletConnectionState, WalletEventType, WalletEventHandler, WalletEvent, Signature, UnsignedTransaction, SignedTransaction, TransactionReceipt, WalletErrorCodeType, PrivateWalletAdapter, WalletAdapterFactory, WalletRegistryEntry, WalletInfo, ChainType } from '@sip-protocol/types';
5
5
  import { d as ProofProvider, b as ProofFramework, F as FundingProofParams, P as ProofResult, V as ValidityProofParams, a as FulfillmentProofParams } from './noir-CwPIyBLj.js';
@@ -15224,6 +15224,16 @@ declare const MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
15224
15224
  * Format: SIP:1:<ephemeral_pubkey_base58>:<view_tag_hex>
15225
15225
  */
15226
15226
  declare const SIP_MEMO_PREFIX = "SIP:1:";
15227
+ /**
15228
+ * Canonical EIP-5564 (SIP:2) announcement memo prefix — emitted by new sends.
15229
+ * Format: SIP:2:<ephemeral_pubkey_base58>:<view_tag_hex>[:<stealth_address_base58>]
15230
+ */
15231
+ declare const SIP_MEMO_PREFIX_V2 = "SIP:2:";
15232
+ /**
15233
+ * Version-agnostic prefix for filtering announcement logs during scanning.
15234
+ * Matches both SIP:1 (legacy) and SIP:2 (canonical) announcements.
15235
+ */
15236
+ declare const SIP_MEMO_PREFIX_ANY = "SIP:";
15227
15237
  /**
15228
15238
  * Get explorer URL for a transaction
15229
15239
  */
@@ -15589,6 +15599,8 @@ interface SolanaScanResult {
15589
15599
  stealthAddress: string;
15590
15600
  /** Ephemeral public key from the sender (base58) */
15591
15601
  ephemeralPublicKey: string;
15602
+ /** Announcement scheme version ('1' legacy | '2' canonical) — pass to claim */
15603
+ version: '1' | '2';
15592
15604
  /** Amount received (in token's smallest unit) */
15593
15605
  amount: bigint;
15594
15606
  /** Token mint address */
@@ -17154,765 +17166,962 @@ declare function createNetworkPrivacyClient(config?: NetworkPrivacyConfig): Prom
17154
17166
  }>;
17155
17167
 
17156
17168
  /**
17157
- * Solana Noir Verifier Types
17169
+ * Relayer fee model for gasless cash-out.
17158
17170
  *
17159
- * Type definitions for verifying Noir ZK proofs on Solana.
17171
+ * The relayer fronts the SOL transaction fee on behalf of a stealth recipient
17172
+ * and recovers its cost from the SPL tokens being cashed out (fee-from-claim).
17173
+ * The fee is `max(flatFloor, amount * bps / 10_000)`: the floor guarantees the
17174
+ * fixed SOL gas cost is covered even on tiny claims; bps scales on large ones.
17175
+ * No price oracle in v1 — the floor is set in the token's base units.
17176
+ */
17177
+ /** Relayer fee configuration (per token mint). */
17178
+ interface RelayerFeeConfig {
17179
+ /** Flat floor fee in the token's base units. Guarantees gas coverage on small claims. */
17180
+ flatFloor: bigint;
17181
+ /** Basis points of the claim amount (1 bps = 0.01%). e.g. 10 = 0.1%. */
17182
+ bps: number;
17183
+ }
17184
+ /**
17185
+ * Compute the relayer fee for a claim.
17186
+ *
17187
+ * @param amount - Gross amount available in the stealth token account (base units)
17188
+ * @param config - Fee model
17189
+ * @returns Fee in the token's base units (always >= flatFloor)
17190
+ * @throws If `bps` is negative or non-integer, or if `amount` is negative, or if flatFloor is negative
17191
+ */
17192
+ declare function computeRelayerFee(amount: bigint, config: RelayerFeeConfig): bigint;
17193
+
17194
+ /**
17195
+ * Jito Relayer for SIP Protocol
17196
+ *
17197
+ * Enables gas abstraction for Solana shielded transactions using Jito's MEV infrastructure.
17198
+ * The relayer submits transaction bundles on behalf of users, paying gas fees and breaking
17199
+ * the direct link between the user's wallet and the privacy transaction.
17200
+ *
17201
+ * ## Why Jito?
17202
+ *
17203
+ * 1. **Native Solana**: Jito is battle-tested MEV infrastructure on Solana
17204
+ * 2. **No Dedicated Server**: Uses Jito's network, no VPS maintenance needed
17205
+ * 3. **Bundle Guarantees**: Atomic execution, no partial failures
17206
+ * 4. **Lower Regulatory Risk**: Relayer only handles gas, not asset movement
17160
17207
  *
17161
17208
  * ## Architecture
17162
17209
  *
17163
17210
  * ```
17164
- * ┌─────────────────────────────────────────────────────────────┐
17165
- * │ NOIR PROOF FLOW ON SOLANA
17166
- * │
17167
- * │ 1. Generate proof (BrowserNoirProvider / NoirProofProvider)
17168
- * │ 2. Serialize for Solana (SolanaNoirVerifier)
17169
- * │ 3. Submit to Solana program (verify instruction)
17170
- * │ 4. On-chain verification (ZK Token Proof / Custom)
17171
- * └─────────────────────────────────────────────────────────────┘
17211
+ * ┌─────────────────────────────────────────────────────────────────────────────┐
17212
+ * │ GAS ABSTRACTION FLOW
17213
+ * │
17214
+ * │ ┌─────────┐ ┌───────────────┐ ┌───────────┐ ┌──────────┐
17215
+ * │ │ User │ ──▶ │ Sign TX │ ──▶ Jito │ ──▶ │ Solana │ │
17216
+ * │ │ Wallet │ │ (no SOL fee) │ │ Relayer │ │ Network
17217
+ * │ └─────────┘ └───────────────┘ └───────────┘ └──────────┘
17218
+ * │ │ │
17219
+ * │ ▼ │
17220
+ * │ Relayer pays │
17221
+ * │ gas from tip │
17222
+ * └─────────────────────────────────────────────────────────────────────────────┘
17172
17223
  * ```
17173
17224
  *
17174
- * @module solana/noir-verifier-types
17225
+ * ## Fee Model
17226
+ *
17227
+ * The relayer takes a small tip from the transaction (configurable, typically 0.1-0.5%)
17228
+ * to cover gas costs and operational overhead.
17229
+ *
17230
+ * @see https://jito-foundation.gitbook.io/mev/
17231
+ * @see https://jito-labs.github.io/jito-ts/
17175
17232
  */
17176
17233
 
17177
17234
  /**
17178
- * Supported Noir circuit types for Solana verification
17235
+ * Jito Block Engine endpoints
17236
+ * @see https://jito-foundation.gitbook.io/mev/searcher-resources/block-engine
17179
17237
  */
17180
- type NoirCircuitType = 'funding' | 'validity' | 'fulfillment';
17238
+ declare const JITO_BLOCK_ENGINES: {
17239
+ readonly mainnet: {
17240
+ readonly amsterdam: "https://amsterdam.mainnet.block-engine.jito.wtf/api/v1";
17241
+ readonly frankfurt: "https://frankfurt.mainnet.block-engine.jito.wtf/api/v1";
17242
+ readonly ny: "https://ny.mainnet.block-engine.jito.wtf/api/v1";
17243
+ readonly tokyo: "https://tokyo.mainnet.block-engine.jito.wtf/api/v1";
17244
+ };
17245
+ };
17181
17246
  /**
17182
- * Circuit metadata for verification key generation
17247
+ * Jito tip accounts (one must receive the tip)
17248
+ * @see https://jito-foundation.gitbook.io/mev/searcher-resources/tip-accounts
17183
17249
  */
17184
- interface CircuitMetadata {
17185
- /** Circuit type identifier */
17186
- type: NoirCircuitType;
17187
- /** Number of public inputs */
17188
- publicInputCount: number;
17189
- /** Approximate constraint count */
17190
- constraintCount: number;
17191
- /** Circuit version hash */
17192
- versionHash: string;
17193
- }
17250
+ declare const JITO_TIP_ACCOUNTS: readonly ["96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", "HFqU5x63VTqvQss8hp11i4bVmkekGTo46ibhvdrPnSVX", "Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY", "ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49", "DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh", "ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt", "DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL", "3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"];
17194
17251
  /**
17195
- * Circuit metadata for all supported circuits
17252
+ * Default configuration values
17196
17253
  */
17197
- declare const CIRCUIT_METADATA: Record<NoirCircuitType, CircuitMetadata>;
17254
+ declare const JITO_DEFAULTS: {
17255
+ /** Default tip in lamports (0.001 SOL) */
17256
+ readonly tipLamports: 1000000;
17257
+ /** Maximum bundle size */
17258
+ readonly maxBundleSize: 5;
17259
+ /** Bundle submission timeout (ms) */
17260
+ readonly submissionTimeout: 30000;
17261
+ /** Confirmation timeout (ms) */
17262
+ readonly confirmationTimeout: 60000;
17263
+ /** Default retry attempts */
17264
+ readonly maxRetries: 3;
17265
+ };
17198
17266
  /**
17199
- * Verification key for Solana on-chain verification
17200
- *
17201
- * Contains the cryptographic parameters needed to verify proofs on-chain.
17267
+ * Jito relayer configuration
17202
17268
  */
17203
- interface SolanaVerificationKey {
17204
- /** Circuit type this key is for */
17205
- circuitType: NoirCircuitType;
17206
- /** Serialized verification key bytes */
17207
- keyBytes: Uint8Array;
17208
- /** Key hash for integrity check */
17209
- keyHash: string;
17210
- /** Number of public inputs expected */
17211
- publicInputCount: number;
17212
- /** Solana account address where key is stored (if deployed) */
17213
- accountAddress?: string;
17269
+ interface JitoRelayerConfig {
17270
+ /** Jito block engine endpoint */
17271
+ blockEngineUrl?: string;
17272
+ /** Solana RPC URL */
17273
+ rpcUrl?: string;
17274
+ /** Default tip amount in lamports */
17275
+ defaultTipLamports?: number;
17276
+ /** Enable debug logging */
17277
+ debug?: boolean;
17278
+ /** Maximum retries for bundle submission */
17279
+ maxRetries?: number;
17280
+ /** Submission timeout in ms */
17281
+ submissionTimeout?: number;
17214
17282
  }
17215
17283
  /**
17216
- * Solana-serialized proof ready for on-chain verification
17284
+ * Bundle submission request
17217
17285
  */
17218
- interface SolanaSerializedProof {
17219
- /** Original proof type */
17220
- circuitType: NoirCircuitType;
17221
- /** Proof bytes in Solana-compatible format */
17222
- proofBytes: Uint8Array;
17223
- /** Public inputs as Field elements (32 bytes each) */
17224
- publicInputs: Uint8Array[];
17225
- /** Total serialized size in bytes */
17226
- totalSize: number;
17286
+ interface JitoBundleRequest {
17287
+ /** Transactions to include in bundle */
17288
+ transactions: (Transaction | VersionedTransaction)[];
17289
+ /** Tip amount in lamports */
17290
+ tipLamports?: number;
17291
+ /** Tip payer keypair */
17292
+ tipPayer: Keypair;
17293
+ /** Whether to wait for confirmation */
17294
+ waitForConfirmation?: boolean;
17227
17295
  }
17228
17296
  /**
17229
- * Proof verification result from Solana
17297
+ * Bundle submission result
17230
17298
  */
17231
- interface SolanaVerificationResult {
17232
- /** Whether the proof is valid */
17233
- valid: boolean;
17234
- /** Transaction signature if submitted on-chain */
17235
- signature?: string;
17236
- /** Slot number of verification */
17299
+ interface JitoBundleResult {
17300
+ /** Bundle UUID */
17301
+ bundleId: string;
17302
+ /** Transaction signatures in bundle */
17303
+ signatures: string[];
17304
+ /** Submission status */
17305
+ status: 'submitted' | 'landed' | 'failed' | 'timeout';
17306
+ /** Slot where bundle landed (if confirmed) */
17237
17307
  slot?: number;
17238
- /** Compute units used */
17239
- computeUnits?: number;
17240
- /** Error message if verification failed */
17308
+ /** Error message if failed */
17241
17309
  error?: string;
17310
+ /** Actual tip paid in lamports */
17311
+ tipPaid: number;
17242
17312
  }
17243
17313
  /**
17244
- * Solana instruction for proof verification
17314
+ * Relayed transaction request
17245
17315
  */
17246
- interface SolanaVerifyInstruction {
17247
- /** Program ID to call */
17248
- programId: string;
17249
- /** Instruction data */
17250
- data: Uint8Array;
17251
- /** Account keys required */
17252
- keys: SolanaAccountMeta[];
17316
+ interface RelayedTransactionRequest {
17317
+ /** Signed transaction to relay */
17318
+ transaction: Transaction | VersionedTransaction;
17319
+ /** Tip amount in lamports (paid by relayer, recovered from user) */
17320
+ tipLamports?: number;
17321
+ /** Keypair that pays the Jito tip. Required for the Jito-bundle path to land. */
17322
+ tipPayer?: Keypair;
17323
+ /** Whether to wait for confirmation */
17324
+ waitForConfirmation?: boolean;
17253
17325
  }
17254
17326
  /**
17255
- * Account metadata for Solana instruction
17327
+ * Relayed transaction result
17256
17328
  */
17257
- interface SolanaAccountMeta {
17258
- /** Account public key */
17259
- pubkey: string;
17260
- /** Is signer */
17261
- isSigner: boolean;
17262
- /** Is writable */
17263
- isWritable: boolean;
17329
+ interface RelayedTransactionResult {
17330
+ /** Transaction signature */
17331
+ signature: string;
17332
+ /** Bundle ID if submitted via Jito */
17333
+ bundleId?: string;
17334
+ /** Submission status */
17335
+ status: 'submitted' | 'confirmed' | 'failed';
17336
+ /** Slot where transaction landed */
17337
+ slot?: number;
17338
+ /** Error message if failed */
17339
+ error?: string;
17340
+ /** Whether relayer was used or fell back to direct submission */
17341
+ relayed: boolean;
17264
17342
  }
17265
17343
  /**
17266
- * Network configuration for Solana
17267
- */
17268
- type SolanaNetwork = 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet';
17269
- /**
17270
- * Solana Noir Verifier configuration
17344
+ * Jito relayer error codes
17271
17345
  */
17272
- interface SolanaNoirVerifierConfig {
17273
- /**
17274
- * Solana network to use
17275
- * @default 'devnet'
17276
- */
17277
- network?: SolanaNetwork;
17278
- /**
17279
- * Custom RPC endpoint URL
17280
- * If not provided, uses default for network
17281
- */
17282
- rpcUrl?: string;
17283
- /**
17284
- * Verification program ID
17285
- * Uses native ZK Token Proof program by default
17286
- */
17287
- programId?: string;
17288
- /**
17289
- * Enable verbose logging
17290
- * @default false
17291
- */
17292
- verbose?: boolean;
17293
- /**
17294
- * Commitment level for transactions
17295
- * @default 'confirmed'
17296
- */
17297
- commitment?: 'processed' | 'confirmed' | 'finalized';
17298
- /**
17299
- * Maximum compute units for verification
17300
- * @default 400000
17301
- */
17302
- maxComputeUnits?: number;
17346
+ declare enum JitoRelayerErrorCode {
17347
+ BUNDLE_SUBMISSION_FAILED = "BUNDLE_SUBMISSION_FAILED",
17348
+ BUNDLE_TIMEOUT = "BUNDLE_TIMEOUT",
17349
+ BUNDLE_INVALID = "BUNDLE_INVALID",
17350
+ INSUFFICIENT_TIP = "INSUFFICIENT_TIP",
17351
+ CONNECTION_ERROR = "CONNECTION_ERROR",
17352
+ RATE_LIMITED = "RATE_LIMITED",
17353
+ INVALID_TRANSACTION = "INVALID_TRANSACTION"
17303
17354
  }
17304
17355
  /**
17305
- * Default RPC URLs for each network
17306
- * Localnet is configurable via SOLANA_LOCALNET_RPC environment variable
17356
+ * Jito relayer error
17307
17357
  */
17308
- declare const DEFAULT_RPC_URLS: Record<SolanaNetwork, string>;
17358
+ declare class JitoRelayerError extends Error {
17359
+ readonly code: JitoRelayerErrorCode;
17360
+ readonly details?: unknown | undefined;
17361
+ constructor(code: JitoRelayerErrorCode, message: string, details?: unknown | undefined);
17362
+ }
17309
17363
  /**
17310
- * Native Solana ZK proof program IDs
17364
+ * Jito Relayer for gas abstraction
17311
17365
  *
17312
- * Note: These are the native Solana programs for ZK proof verification.
17313
- * For custom Noir circuits, a dedicated verifier program would be needed.
17314
- */
17315
- declare const SOLANA_ZK_PROGRAM_IDS: {
17316
- /** ZK Token Proof Program (native) */
17317
- readonly ZK_TOKEN_PROOF: "ZkTokenProof1111111111111111111111111111111";
17318
- /** ZK ElGamal Proof Program (native) */
17319
- readonly ZK_ELGAMAL_PROOF: "ZkE1Gama1Proof11111111111111111111111111111";
17320
- /** Custom SIP Noir Verifier (TBD - to be deployed) */
17321
- readonly SIP_NOIR_VERIFIER: "SIPNoirVerifier1111111111111111111111111";
17322
- };
17323
- /**
17324
- * Error codes for Solana Noir verification
17325
- */
17326
- declare enum SolanaNoirErrorCode {
17327
- /** Invalid proof format */
17328
- INVALID_PROOF_FORMAT = "INVALID_PROOF_FORMAT",
17329
- /** Invalid public inputs */
17330
- INVALID_PUBLIC_INPUTS = "INVALID_PUBLIC_INPUTS",
17331
- /** Verification failed on-chain */
17332
- VERIFICATION_FAILED = "VERIFICATION_FAILED",
17333
- /** Network error */
17334
- NETWORK_ERROR = "NETWORK_ERROR",
17335
- /** Insufficient compute units */
17336
- INSUFFICIENT_COMPUTE = "INSUFFICIENT_COMPUTE",
17337
- /** Verification key not found */
17338
- VKEY_NOT_FOUND = "VKEY_NOT_FOUND",
17339
- /** Unsupported circuit type */
17340
- UNSUPPORTED_CIRCUIT = "UNSUPPORTED_CIRCUIT",
17341
- /** Transaction failed */
17342
- TRANSACTION_FAILED = "TRANSACTION_FAILED"
17343
- }
17344
- /**
17345
- * Solana Noir verification error
17366
+ * Submits Solana transactions via Jito's MEV infrastructure,
17367
+ * enabling gas abstraction for privacy transactions.
17368
+ *
17369
+ * @example
17370
+ * ```typescript
17371
+ * import { JitoRelayer } from '@sip-protocol/sdk'
17372
+ *
17373
+ * const relayer = new JitoRelayer({
17374
+ * blockEngineUrl: 'https://ny.mainnet.block-engine.jito.wtf/api/v1',
17375
+ * })
17376
+ *
17377
+ * // Submit a signed transaction via the relayer (tipPayer is required for the bundle to land)
17378
+ * const result = await relayer.relayTransaction({
17379
+ * transaction: signedTx,
17380
+ * tipLamports: 10_000, // 0.00001 SOL tip
17381
+ * tipPayer: relayerKeypair,
17382
+ * })
17383
+ *
17384
+ * console.log('Transaction relayed:', result.signature)
17385
+ * ```
17346
17386
  */
17347
- declare class SolanaNoirError extends Error {
17348
- readonly code: SolanaNoirErrorCode;
17349
- readonly details?: Record<string, unknown> | undefined;
17350
- constructor(message: string, code: SolanaNoirErrorCode, details?: Record<string, unknown> | undefined);
17387
+ declare class JitoRelayer {
17388
+ private readonly connection;
17389
+ private readonly blockEngineUrl;
17390
+ private readonly defaultTipLamports;
17391
+ private readonly debug;
17392
+ private readonly maxRetries;
17393
+ private readonly submissionTimeout;
17394
+ constructor(config?: JitoRelayerConfig);
17395
+ /** Encode a 64-byte ed25519 signature as a base58 string (Solana canonical form). */
17396
+ static encodeSignature(sig: Uint8Array): string;
17397
+ /**
17398
+ * Submit a bundle of transactions to Jito
17399
+ *
17400
+ * @param request - Bundle request with transactions and tip
17401
+ * @returns Bundle submission result
17402
+ */
17403
+ submitBundle(request: JitoBundleRequest): Promise<JitoBundleResult>;
17404
+ /**
17405
+ * Relay a single transaction via Jito
17406
+ *
17407
+ * This is the main method for gas abstraction - submit a transaction
17408
+ * through the relayer instead of paying gas directly.
17409
+ *
17410
+ * @param request - Transaction to relay
17411
+ * @returns Relay result
17412
+ */
17413
+ relayTransaction(request: RelayedTransactionRequest): Promise<RelayedTransactionResult>;
17414
+ /**
17415
+ * Check if Jito relayer is available
17416
+ */
17417
+ isAvailable(): Promise<boolean>;
17418
+ /**
17419
+ * Get current tip floor (minimum tip for inclusion)
17420
+ */
17421
+ getTipFloor(): Promise<number>;
17422
+ /**
17423
+ * Get a random tip account
17424
+ */
17425
+ getRandomTipAccount(): PublicKey;
17426
+ /**
17427
+ * Create tip instruction
17428
+ */
17429
+ private createTipInstruction;
17430
+ /**
17431
+ * Prepare transactions for bundle submission
17432
+ */
17433
+ private prepareBundleTransactions;
17434
+ /**
17435
+ * Send bundle to Jito block engine
17436
+ */
17437
+ private sendBundle;
17438
+ /**
17439
+ * Wait for bundle confirmation
17440
+ */
17441
+ private waitForBundleConfirmation;
17442
+ /**
17443
+ * Get bundle status from Jito
17444
+ */
17445
+ private getBundleStatus;
17446
+ /**
17447
+ * Direct submission fallback
17448
+ */
17449
+ private directSubmit;
17450
+ /**
17451
+ * Log debug message
17452
+ */
17453
+ private log;
17454
+ /**
17455
+ * Sleep utility
17456
+ */
17457
+ private sleep;
17351
17458
  }
17352
17459
  /**
17353
- * Maximum proof size in bytes
17460
+ * Create a Jito relayer instance
17354
17461
  *
17355
- * UltraHonk proofs are typically ~2KB, but we allow up to 4KB for safety.
17462
+ * @param config - Relayer configuration
17463
+ * @returns Jito relayer instance
17356
17464
  */
17357
- declare const MAX_PROOF_SIZE_BYTES = 4096;
17465
+ declare function createJitoRelayer(config?: JitoRelayerConfig): JitoRelayer;
17358
17466
  /**
17359
- * Maximum number of public inputs
17360
- *
17361
- * Based on Solana transaction size limits and our circuit designs.
17467
+ * Create a mainnet Jito relayer with NY block engine
17362
17468
  */
17363
- declare const MAX_PUBLIC_INPUTS = 32;
17469
+ declare function createMainnetRelayer(rpcUrl?: string): JitoRelayer;
17470
+
17364
17471
  /**
17365
- * Proof statistics for monitoring
17472
+ * Gasless cash-out for stealth recipients.
17473
+ *
17474
+ * A stealth address that received SPL tokens typically holds ZERO SOL, so it cannot
17475
+ * pay a transaction fee to move those tokens out. Here a relayer is the fee-payer; the
17476
+ * stealth address signs only the token transfers (via its raw ed25519 scalar — see
17477
+ * deriveStealthSigner). The relayer recovers its SOL cost as an SPL fee deducted from
17478
+ * the tokens being moved (fee-from-claim). Direct submission is the primary path; a
17479
+ * Jito bundle is an optional mainnet hardening layer (see submitGaslessCashout).
17366
17480
  */
17367
- interface ProofStatistics {
17368
- /** Circuit type */
17369
- circuitType: NoirCircuitType;
17370
- /** Proof size in bytes */
17371
- proofSize: number;
17372
- /** Public inputs size in bytes */
17373
- publicInputsSize: number;
17374
- /** Total serialized size */
17375
- totalSize: number;
17376
- /** Estimated compute units */
17377
- estimatedComputeUnits: number;
17481
+
17482
+ /** Parameters for building a gasless cash-out transaction. */
17483
+ interface GaslessCashoutParams {
17484
+ /** Solana RPC connection */
17485
+ connection: Connection;
17486
+ /** Stealth address holding the tokens (base58) */
17487
+ stealthAddress: string;
17488
+ /** Ephemeral public key from the payment (base58) */
17489
+ ephemeralPublicKey: string;
17490
+ /** Recipient's viewing private key (hex) */
17491
+ viewingPrivateKey: HexString;
17492
+ /** Recipient's spending private key (hex) */
17493
+ spendingPrivateKey: HexString;
17494
+ /** Final destination address (base58) */
17495
+ destinationAddress: string;
17496
+ /** SPL token mint */
17497
+ mint: PublicKey;
17498
+ /** Relayer public key — the transaction fee-payer (must hold SOL) */
17499
+ relayerPublicKey: PublicKey;
17500
+ /** Relayer's token account that receives the fee (ATA for `mint`) */
17501
+ relayerFeeAccount: PublicKey;
17502
+ /** Fee model */
17503
+ feeConfig: RelayerFeeConfig;
17504
+ /** Announcement scheme version: '2' canonical (default) | '1' legacy */
17505
+ version?: '1' | '2';
17378
17506
  }
17379
- /**
17380
- * Batch verification request
17381
- */
17382
- interface BatchVerificationRequest {
17383
- /** Proofs to verify */
17384
- proofs: ZKProof[];
17385
- /** Whether to fail fast on first invalid proof */
17386
- failFast?: boolean;
17507
+ /** A stealth-signed gasless cash-out transaction, awaiting the relayer's fee-payer signature. */
17508
+ interface GaslessCashoutBuild {
17509
+ /** Transaction signed by the stealth address; feePayer = relayer (relayer must still sign) */
17510
+ transaction: Transaction;
17511
+ /** Stealth address (base58) */
17512
+ stealthAddress: string;
17513
+ /** Final destination (base58) */
17514
+ destinationAddress: string;
17515
+ /** Gross amount in the stealth token account (base units) */
17516
+ grossAmount: bigint;
17517
+ /** Relayer fee deducted (base units) */
17518
+ relayerFee: bigint;
17519
+ /** Net amount forwarded to the destination (base units) */
17520
+ netAmount: bigint;
17521
+ /** Blockhash the transaction is bound to */
17522
+ blockhash: string;
17523
+ /** Last valid block height for confirmation */
17524
+ lastValidBlockHeight: number;
17387
17525
  }
17388
17526
  /**
17389
- * Batch verification result
17527
+ * Build a gasless cash-out transaction.
17528
+ *
17529
+ * Derives the stealth signer from the recipient's keys, computes the fee-from-claim,
17530
+ * assembles a two- (or three-) instruction transaction with the relayer as fee-payer,
17531
+ * and pre-signs with the stealth scalar. The relayer must add its own signature before
17532
+ * broadcasting.
17533
+ *
17534
+ * @throws If the relayer fee >= the gross claim amount (nothing left for the recipient)
17390
17535
  */
17391
- interface BatchVerificationResult {
17392
- /** Overall success */
17393
- success: boolean;
17394
- /** Results for each proof */
17395
- results: SolanaVerificationResult[];
17396
- /** Total proofs verified */
17397
- totalVerified: number;
17398
- /** Number of valid proofs */
17399
- validCount: number;
17400
- /** Total compute units used */
17401
- totalComputeUnits: number;
17536
+ declare function buildGaslessCashout(params: GaslessCashoutParams): Promise<GaslessCashoutBuild>;
17537
+ /** Parameters for submitting a built gasless cash-out. */
17538
+ interface SubmitGaslessCashoutParams {
17539
+ /** Solana RPC connection */
17540
+ connection: Connection;
17541
+ /** Output of buildGaslessCashout (stealth already signed) */
17542
+ build: GaslessCashoutBuild;
17543
+ /** Relayer keypair must equal build.transaction.feePayer */
17544
+ relayerKeypair: Keypair;
17545
+ /** Optional Jito relayer for the bundle path (mainnet hardening). Default: direct submit. */
17546
+ jitoRelayer?: JitoRelayer;
17547
+ /** Tip in lamports for the Jito path (ignored on the direct path) */
17548
+ tipLamports?: number;
17549
+ }
17550
+ /** Result of a gasless cash-out. */
17551
+ interface GaslessCashoutResult {
17552
+ /** Transaction signature (base58) */
17553
+ txSignature: string;
17554
+ /** Destination that received the net amount (base58) */
17555
+ destinationAddress: string;
17556
+ /** Net amount forwarded (base units) */
17557
+ amount: bigint;
17558
+ /** Relayer fee charged (base units) */
17559
+ relayerFee: bigint;
17560
+ /** Explorer URL */
17561
+ explorerUrl: string;
17562
+ /** Whether the Jito bundle path was used */
17563
+ viaJito: boolean;
17402
17564
  }
17403
17565
  /**
17404
- * Check if a string is a valid circuit type
17405
- */
17406
- declare function isNoirCircuitType(value: string): value is NoirCircuitType;
17407
- /**
17408
- * Check if a proof has the expected structure for Solana verification
17566
+ * Sign as the relayer (fee-payer) and submit a gasless cash-out.
17567
+ *
17568
+ * Direct submission is the primary path (works on devnet + mainnet). Supplying a
17569
+ * `jitoRelayer` routes through a Jito bundle instead (optional mainnet hardening;
17570
+ * Jito has no devnet block engine).
17571
+ *
17572
+ * @throws If `relayerKeypair` is not the transaction's fee-payer
17409
17573
  */
17410
- declare function isValidSolanaProof(proof: unknown): proof is ZKProof;
17574
+ declare function submitGaslessCashout(params: SubmitGaslessCashoutParams): Promise<GaslessCashoutResult>;
17575
+
17411
17576
  /**
17412
- * Estimate compute units for verification
17577
+ * Stealth address signing for Solana.
17413
17578
  *
17414
- * Based on circuit complexity and proof size
17579
+ * SIP's ed25519 stealth derivation yields a RAW SCALAR (s = s_spend + H(S) mod L),
17580
+ * not a standard ed25519 seed. Solana's `Keypair` (tweetnacl) signs by treating the
17581
+ * first 32 bytes as a seed (SHA-512 + clamp), so it cannot sign for a stealth address
17582
+ * whose private key is a raw scalar. This module signs directly with the scalar using
17583
+ * RFC 8032 Ed25519 — producing signatures any standard verifier and the Solana runtime
17584
+ * accept — and attaches them to a transaction via `Transaction.addSignature`.
17415
17585
  */
17416
- declare function estimateComputeUnits(circuitType: NoirCircuitType): number;
17417
17586
 
17418
17587
  /**
17419
- * Solana Noir Verifier
17588
+ * Produce an RFC 8032 Ed25519 signature from a raw little-endian scalar.
17420
17589
  *
17421
- * Verifies Noir ZK proofs on Solana blockchain.
17422
- *
17423
- * ## Overview
17590
+ * Unlike `Keypair`/tweetnacl signing (which expects a 32-byte seed and re-derives the
17591
+ * scalar via SHA-512 + clamp), this signs directly with the provided scalar `a` whose
17592
+ * public key is `A = a·G`. The per-signature nonce is derived deterministically from a
17593
+ * hash of the scalar and the message (RFC 8032 structure): unique per message, never
17594
+ * reused across distinct messages.
17424
17595
  *
17425
- * This module enables verification of SIP Protocol's Noir proofs on Solana:
17426
- * - Funding Proofs: Prove sufficient balance without revealing amount
17427
- * - Validity Proofs: Prove intent authorization without revealing sender
17428
- * - Fulfillment Proofs: Prove correct execution without revealing path
17429
- *
17430
- * ## Usage
17431
- *
17432
- * ```typescript
17433
- * import { SolanaNoirVerifier } from '@sip-protocol/sdk'
17434
- * import { NoirProofProvider } from '@sip-protocol/sdk'
17435
- *
17436
- * // Generate proof
17437
- * const provider = new NoirProofProvider()
17438
- * await provider.initialize()
17439
- * const { proof } = await provider.generateFundingProof(params)
17596
+ * @param message - Exact bytes to sign (e.g. a compiled transaction message)
17597
+ * @param scalar - 32-byte little-endian ed25519 scalar (the stealth private key)
17598
+ * @returns 64-byte signature (R S)
17599
+ * @throws If the scalar reduces to zero
17600
+ */
17601
+ declare function signEd25519WithScalar(message: Uint8Array, scalar: Uint8Array): Uint8Array;
17602
+ /** Parameters needed to derive a stealth address's signer. */
17603
+ interface DeriveStealthSignerParams {
17604
+ /** Stealth address (base58) */
17605
+ stealthAddress: string;
17606
+ /** Ephemeral public key from the payment (base58) */
17607
+ ephemeralPublicKey: string;
17608
+ /** Recipient's viewing private key (hex) */
17609
+ viewingPrivateKey: HexString;
17610
+ /** Recipient's spending private key (hex) */
17611
+ spendingPrivateKey: HexString;
17612
+ /** Announcement scheme version: '2' canonical (default) | '1' legacy */
17613
+ version?: '1' | '2';
17614
+ }
17615
+ /** Signs transactions/messages as a stealth address using its raw ed25519 scalar. */
17616
+ interface StealthSigner {
17617
+ /** The stealth address this signer controls */
17618
+ readonly publicKey: PublicKey;
17619
+ /** Sign arbitrary bytes, returning a 64-byte ed25519 signature */
17620
+ signMessage(message: Uint8Array): Uint8Array;
17621
+ /** Attach this stealth address's signature to a transaction. Call LAST — after feePayer, recentBlockhash, and all instructions are finalized (the signature covers the serialized message at call time). */
17622
+ signTransaction(transaction: Transaction): void;
17623
+ }
17624
+ /**
17625
+ * Re-derive the signer that controls a stealth address.
17440
17626
  *
17441
- * // Verify on Solana
17442
- * const verifier = new SolanaNoirVerifier({ network: 'devnet' })
17443
- * await verifier.initialize()
17627
+ * Routes derivation by announcement version (canonical SIP:2 vs legacy SIP:1) and
17628
+ * validates the derived scalar reproduces the on-chain stealth public key before
17629
+ * returning a signer. The signer signs with the raw scalar (see
17630
+ * {@link signEd25519WithScalar}); it does NOT construct a `Keypair`, which cannot sign
17631
+ * for a scalar-derived stealth address.
17444
17632
  *
17445
- * // Off-chain verification (fast, no transaction)
17446
- * const isValid = await verifier.verifyOffChain(proof)
17633
+ * @throws If the derived scalar does not produce the expected stealth public key
17634
+ */
17635
+ declare function deriveStealthSigner(params: DeriveStealthSignerParams): StealthSigner;
17636
+
17637
+ /**
17638
+ * Solana Noir Verifier Types
17447
17639
  *
17448
- * // On-chain verification (submits transaction)
17449
- * const result = await verifier.verifyOnChain(proof, wallet)
17450
- * ```
17640
+ * Type definitions for verifying Noir ZK proofs on Solana.
17451
17641
  *
17452
17642
  * ## Architecture
17453
17643
  *
17454
17644
  * ```
17455
17645
  * ┌─────────────────────────────────────────────────────────────┐
17456
- * │ CLIENT SIDE
17457
- * │ ┌─────────────┐ ┌──────────────────┐
17458
- * │ Noir Proof │───►│ SolanaNoirVerifier
17459
- * │ Provider │ │ - serialize()
17460
- * │ └─────────────┘ │ - verifyOffChain()│
17461
- * │ - verifyOnChain()
17462
- * │ └────────┬─────────┘ │
17463
- * └──────────────────────────────┼─────────────────────────────┘
17464
- * │
17465
- * ▼
17466
- * ┌─────────────────────────────────────────────────────────────┐
17467
- * │ SOLANA BLOCKCHAIN │
17468
- * │ ┌──────────────────────────────────────────────────────┐ │
17469
- * │ │ ZK Proof Verification Program │ │
17470
- * │ │ - Deserialize proof │ │
17471
- * │ │ - Load verification key │ │
17472
- * │ │ - Execute pairing checks │ │
17473
- * │ │ - Return verification result │ │
17474
- * │ └──────────────────────────────────────────────────────┘ │
17646
+ * │ NOIR PROOF FLOW ON SOLANA
17647
+ * │
17648
+ * │ 1. Generate proof (BrowserNoirProvider / NoirProofProvider)
17649
+ * │ 2. Serialize for Solana (SolanaNoirVerifier)
17650
+ * │ 3. Submit to Solana program (verify instruction)
17651
+ * │ 4. On-chain verification (ZK Token Proof / Custom)
17475
17652
  * └─────────────────────────────────────────────────────────────┘
17476
17653
  * ```
17477
17654
  *
17478
- * @module solana/noir-verifier
17655
+ * @module solana/noir-verifier-types
17479
17656
  */
17480
17657
 
17481
17658
  /**
17482
- * Solana Noir Verifier
17483
- *
17484
- * Enables verification of Noir ZK proofs on Solana blockchain.
17485
- *
17486
- * @example
17487
- * ```typescript
17488
- * const verifier = new SolanaNoirVerifier({
17489
- * network: 'devnet',
17490
- * verbose: true,
17491
- * })
17492
- *
17493
- * await verifier.initialize()
17494
- *
17495
- * // Verify proof off-chain (no transaction)
17496
- * const valid = await verifier.verifyOffChain(proof)
17659
+ * Supported Noir circuit types for Solana verification
17660
+ */
17661
+ type NoirCircuitType = 'funding' | 'validity' | 'fulfillment';
17662
+ /**
17663
+ * Circuit metadata for verification key generation
17664
+ */
17665
+ interface CircuitMetadata {
17666
+ /** Circuit type identifier */
17667
+ type: NoirCircuitType;
17668
+ /** Number of public inputs */
17669
+ publicInputCount: number;
17670
+ /** Approximate constraint count */
17671
+ constraintCount: number;
17672
+ /** Circuit version hash */
17673
+ versionHash: string;
17674
+ }
17675
+ /**
17676
+ * Circuit metadata for all supported circuits
17677
+ */
17678
+ declare const CIRCUIT_METADATA: Record<NoirCircuitType, CircuitMetadata>;
17679
+ /**
17680
+ * Verification key for Solana on-chain verification
17497
17681
  *
17498
- * // Or verify on-chain (submits transaction)
17499
- * const result = await verifier.verifyOnChain(proof, wallet)
17500
- * ```
17682
+ * Contains the cryptographic parameters needed to verify proofs on-chain.
17501
17683
  */
17502
- declare class SolanaNoirVerifier {
17503
- private config;
17504
- private _isReady;
17505
- private verificationKeys;
17506
- private connection;
17507
- constructor(config?: SolanaNoirVerifierConfig);
17508
- /**
17509
- * Get the Solana connection
17510
- */
17511
- getConnection(): Connection;
17512
- /**
17513
- * Check if verifier is initialized
17514
- */
17515
- get isReady(): boolean;
17516
- /**
17517
- * Get current configuration
17518
- */
17519
- getConfig(): Readonly<SolanaNoirVerifierConfig>;
17520
- /**
17521
- * Get RPC URL being used
17522
- */
17523
- getRpcUrl(): string;
17524
- /**
17525
- * Initialize the verifier
17526
- *
17527
- * Loads verification keys for all circuit types.
17528
- */
17529
- initialize(): Promise<void>;
17530
- /**
17531
- * Generate verification key for a circuit type
17532
- *
17533
- * Creates the cryptographic verification key needed to verify proofs.
17534
- */
17535
- generateVerificationKey(circuitType: NoirCircuitType): Promise<SolanaVerificationKey>;
17536
- /**
17537
- * Serialize a proof for Solana
17538
- *
17539
- * Converts a Noir proof into a format suitable for Solana transaction.
17540
- */
17541
- serializeProof(proof: ZKProof): SolanaSerializedProof;
17542
- /**
17543
- * Verify a proof off-chain
17544
- *
17545
- * Fast verification without submitting a transaction.
17546
- * Uses the local Noir backend for verification if @aztec/bb.js is available,
17547
- * otherwise falls back to mock verification.
17548
- *
17549
- * @param proof - The proof to verify
17550
- * @returns true if valid, false otherwise
17551
- *
17552
- * @remarks
17553
- * For production use, install @aztec/bb.js as a dependency:
17554
- * ```bash
17555
- * npm install @aztec/bb.js
17556
- * ```
17557
- */
17558
- verifyOffChain(proof: ZKProof): Promise<boolean>;
17559
- /**
17560
- * Try to import @aztec/bb.js dynamically
17561
- * Returns null if not available (allows graceful fallback)
17562
- */
17563
- private tryImportBBJS;
17564
- /**
17565
- * Verify proof using the real Noir backend
17566
- */
17567
- private verifyWithBackend;
17568
- /**
17569
- * Mock verification for testing and development
17570
- *
17571
- * WARNING: This does NOT provide cryptographic security.
17572
- * Only used when @aztec/bb.js is not available.
17573
- */
17574
- private mockVerify;
17575
- /**
17576
- * Verify a proof on-chain
17577
- *
17578
- * Submits a transaction to Solana to verify the proof using the Sunspot verifier.
17579
- *
17580
- * @param proof - The proof to verify
17581
- * @param wallet - Wallet interface with signTransaction method
17582
- * @returns Verification result with transaction signature
17583
- */
17584
- verifyOnChain(proof: ZKProof, wallet: {
17585
- publicKey: {
17586
- toBase58(): string;
17587
- };
17588
- signTransaction: <T extends Transaction>(tx: T) => Promise<T>;
17589
- }): Promise<SolanaVerificationResult>;
17590
- /**
17591
- * Create a Sunspot verifier instruction
17592
- *
17593
- * Sunspot verifiers expect instruction data in format: proof_bytes || public_witness_bytes
17594
- */
17595
- createSunspotVerifyInstruction(proof: ZKProof, programId: string): TransactionInstruction;
17684
+ interface SolanaVerificationKey {
17685
+ /** Circuit type this key is for */
17686
+ circuitType: NoirCircuitType;
17687
+ /** Serialized verification key bytes */
17688
+ keyBytes: Uint8Array;
17689
+ /** Key hash for integrity check */
17690
+ keyHash: string;
17691
+ /** Number of public inputs expected */
17692
+ publicInputCount: number;
17693
+ /** Solana account address where key is stored (if deployed) */
17694
+ accountAddress?: string;
17695
+ }
17696
+ /**
17697
+ * Solana-serialized proof ready for on-chain verification
17698
+ */
17699
+ interface SolanaSerializedProof {
17700
+ /** Original proof type */
17701
+ circuitType: NoirCircuitType;
17702
+ /** Proof bytes in Solana-compatible format */
17703
+ proofBytes: Uint8Array;
17704
+ /** Public inputs as Field elements (32 bytes each) */
17705
+ publicInputs: Uint8Array[];
17706
+ /** Total serialized size in bytes */
17707
+ totalSize: number;
17708
+ }
17709
+ /**
17710
+ * Proof verification result from Solana
17711
+ */
17712
+ interface SolanaVerificationResult {
17713
+ /** Whether the proof is valid */
17714
+ valid: boolean;
17715
+ /** Transaction signature if submitted on-chain */
17716
+ signature?: string;
17717
+ /** Slot number of verification */
17718
+ slot?: number;
17719
+ /** Compute units used */
17720
+ computeUnits?: number;
17721
+ /** Error message if verification failed */
17722
+ error?: string;
17723
+ }
17724
+ /**
17725
+ * Solana instruction for proof verification
17726
+ */
17727
+ interface SolanaVerifyInstruction {
17728
+ /** Program ID to call */
17729
+ programId: string;
17730
+ /** Instruction data */
17731
+ data: Uint8Array;
17732
+ /** Account keys required */
17733
+ keys: SolanaAccountMeta[];
17734
+ }
17735
+ /**
17736
+ * Account metadata for Solana instruction
17737
+ */
17738
+ interface SolanaAccountMeta {
17739
+ /** Account public key */
17740
+ pubkey: string;
17741
+ /** Is signer */
17742
+ isSigner: boolean;
17743
+ /** Is writable */
17744
+ isWritable: boolean;
17745
+ }
17746
+ /**
17747
+ * Network configuration for Solana
17748
+ */
17749
+ type SolanaNetwork = 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet';
17750
+ /**
17751
+ * Solana Noir Verifier configuration
17752
+ */
17753
+ interface SolanaNoirVerifierConfig {
17596
17754
  /**
17597
- * Serialize proof for Sunspot verifier
17598
- *
17599
- * Sunspot expects: proof_bytes || public_witness_bytes
17600
- * where public_witness contains the number of public inputs followed by the values
17755
+ * Solana network to use
17756
+ * @default 'devnet'
17601
17757
  */
17602
- serializeProofForSunspot(proof: ZKProof): Buffer;
17758
+ network?: SolanaNetwork;
17603
17759
  /**
17604
- * Create a verify instruction for Solana
17605
- *
17606
- * Builds the instruction data and account metas needed for verification.
17760
+ * Custom RPC endpoint URL
17761
+ * If not provided, uses default for network
17607
17762
  */
17608
- createVerifyInstruction(proof: ZKProof): SolanaVerifyInstruction;
17763
+ rpcUrl?: string;
17609
17764
  /**
17610
- * Get proof statistics
17611
- *
17612
- * Returns size and compute unit estimates for a proof.
17765
+ * Verification program ID
17766
+ * Uses native ZK Token Proof program by default
17613
17767
  */
17614
- getProofStatistics(proof: ZKProof): ProofStatistics;
17768
+ programId?: string;
17615
17769
  /**
17616
- * Batch verify multiple proofs
17617
- *
17618
- * Verifies multiple proofs, optionally failing fast on first invalid.
17770
+ * Enable verbose logging
17771
+ * @default false
17619
17772
  */
17620
- batchVerify(request: BatchVerificationRequest): Promise<BatchVerificationResult>;
17773
+ verbose?: boolean;
17621
17774
  /**
17622
- * Get verification key for a circuit type
17775
+ * Commitment level for transactions
17776
+ * @default 'confirmed'
17623
17777
  */
17624
- getVerificationKey(circuitType: NoirCircuitType): SolanaVerificationKey | undefined;
17778
+ commitment?: 'processed' | 'confirmed' | 'finalized';
17625
17779
  /**
17626
- * Destroy the verifier and free resources
17780
+ * Maximum compute units for verification
17781
+ * @default 400000
17627
17782
  */
17628
- destroy(): Promise<void>;
17629
- private ensureReady;
17630
- private loadCircuitArtifact;
17631
- private generateVKeyBytes;
17632
- private hashBytes;
17633
- private hexToBytes;
17634
- private circuitTypeToId;
17783
+ maxComputeUnits?: number;
17635
17784
  }
17636
17785
  /**
17637
- * Create a Solana Noir Verifier with default devnet configuration
17786
+ * Default RPC URLs for each network
17787
+ * Localnet is configurable via SOLANA_LOCALNET_RPC environment variable
17638
17788
  */
17639
- declare function createDevnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17789
+ declare const DEFAULT_RPC_URLS: Record<SolanaNetwork, string>;
17640
17790
  /**
17641
- * Create a Solana Noir Verifier with mainnet configuration
17791
+ * Native Solana ZK proof program IDs
17792
+ *
17793
+ * Note: These are the native Solana programs for ZK proof verification.
17794
+ * For custom Noir circuits, a dedicated verifier program would be needed.
17642
17795
  */
17643
- declare function createMainnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17644
-
17796
+ declare const SOLANA_ZK_PROGRAM_IDS: {
17797
+ /** ZK Token Proof Program (native) */
17798
+ readonly ZK_TOKEN_PROOF: "ZkTokenProof1111111111111111111111111111111";
17799
+ /** ZK ElGamal Proof Program (native) */
17800
+ readonly ZK_ELGAMAL_PROOF: "ZkE1Gama1Proof11111111111111111111111111111";
17801
+ /** Custom SIP Noir Verifier (TBD - to be deployed) */
17802
+ readonly SIP_NOIR_VERIFIER: "SIPNoirVerifier1111111111111111111111111";
17803
+ };
17645
17804
  /**
17646
- * Jito Relayer for SIP Protocol
17647
- *
17648
- * Enables gas abstraction for Solana shielded transactions using Jito's MEV infrastructure.
17649
- * The relayer submits transaction bundles on behalf of users, paying gas fees and breaking
17650
- * the direct link between the user's wallet and the privacy transaction.
17651
- *
17652
- * ## Why Jito?
17653
- *
17654
- * 1. **Native Solana**: Jito is battle-tested MEV infrastructure on Solana
17655
- * 2. **No Dedicated Server**: Uses Jito's network, no VPS maintenance needed
17656
- * 3. **Bundle Guarantees**: Atomic execution, no partial failures
17657
- * 4. **Lower Regulatory Risk**: Relayer only handles gas, not asset movement
17658
- *
17659
- * ## Architecture
17660
- *
17661
- * ```
17662
- * ┌─────────────────────────────────────────────────────────────────────────────┐
17663
- * │ GAS ABSTRACTION FLOW │
17664
- * │ │
17665
- * │ ┌─────────┐ ┌───────────────┐ ┌───────────┐ ┌──────────┐ │
17666
- * │ │ User │ ──▶ │ Sign TX │ ──▶ │ Jito │ ──▶ │ Solana │ │
17667
- * │ │ Wallet │ │ (no SOL fee) │ │ Relayer │ │ Network │ │
17668
- * │ └─────────┘ └───────────────┘ └───────────┘ └──────────┘ │
17669
- * │ │ │
17670
- * │ ▼ │
17671
- * │ Relayer pays │
17672
- * │ gas from tip │
17673
- * └─────────────────────────────────────────────────────────────────────────────┘
17674
- * ```
17675
- *
17676
- * ## Fee Model
17677
- *
17678
- * The relayer takes a small tip from the transaction (configurable, typically 0.1-0.5%)
17679
- * to cover gas costs and operational overhead.
17680
- *
17681
- * @see https://jito-foundation.gitbook.io/mev/
17682
- * @see https://jito-labs.github.io/jito-ts/
17805
+ * Error codes for Solana Noir verification
17683
17806
  */
17684
-
17807
+ declare enum SolanaNoirErrorCode {
17808
+ /** Invalid proof format */
17809
+ INVALID_PROOF_FORMAT = "INVALID_PROOF_FORMAT",
17810
+ /** Invalid public inputs */
17811
+ INVALID_PUBLIC_INPUTS = "INVALID_PUBLIC_INPUTS",
17812
+ /** Verification failed on-chain */
17813
+ VERIFICATION_FAILED = "VERIFICATION_FAILED",
17814
+ /** Network error */
17815
+ NETWORK_ERROR = "NETWORK_ERROR",
17816
+ /** Insufficient compute units */
17817
+ INSUFFICIENT_COMPUTE = "INSUFFICIENT_COMPUTE",
17818
+ /** Verification key not found */
17819
+ VKEY_NOT_FOUND = "VKEY_NOT_FOUND",
17820
+ /** Unsupported circuit type */
17821
+ UNSUPPORTED_CIRCUIT = "UNSUPPORTED_CIRCUIT",
17822
+ /** Transaction failed */
17823
+ TRANSACTION_FAILED = "TRANSACTION_FAILED"
17824
+ }
17685
17825
  /**
17686
- * Jito Block Engine endpoints
17687
- * @see https://jito-foundation.gitbook.io/mev/searcher-resources/block-engine
17826
+ * Solana Noir verification error
17688
17827
  */
17689
- declare const JITO_BLOCK_ENGINES: {
17690
- readonly mainnet: {
17691
- readonly amsterdam: "https://amsterdam.mainnet.block-engine.jito.wtf/api/v1";
17692
- readonly frankfurt: "https://frankfurt.mainnet.block-engine.jito.wtf/api/v1";
17693
- readonly ny: "https://ny.mainnet.block-engine.jito.wtf/api/v1";
17694
- readonly tokyo: "https://tokyo.mainnet.block-engine.jito.wtf/api/v1";
17695
- };
17696
- };
17828
+ declare class SolanaNoirError extends Error {
17829
+ readonly code: SolanaNoirErrorCode;
17830
+ readonly details?: Record<string, unknown> | undefined;
17831
+ constructor(message: string, code: SolanaNoirErrorCode, details?: Record<string, unknown> | undefined);
17832
+ }
17697
17833
  /**
17698
- * Jito tip accounts (one must receive the tip)
17699
- * @see https://jito-foundation.gitbook.io/mev/searcher-resources/tip-accounts
17834
+ * Maximum proof size in bytes
17835
+ *
17836
+ * UltraHonk proofs are typically ~2KB, but we allow up to 4KB for safety.
17700
17837
  */
17701
- declare const JITO_TIP_ACCOUNTS: readonly ["96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", "HFqU5x63VTqvQss8hp11i4bVmkekGTo46ibhvdrPnSVX", "Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY", "ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49", "DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh", "ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt", "DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL", "3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"];
17838
+ declare const MAX_PROOF_SIZE_BYTES = 4096;
17702
17839
  /**
17703
- * Default configuration values
17840
+ * Maximum number of public inputs
17841
+ *
17842
+ * Based on Solana transaction size limits and our circuit designs.
17704
17843
  */
17705
- declare const JITO_DEFAULTS: {
17706
- /** Default tip in lamports (0.001 SOL) */
17707
- readonly tipLamports: 1000000;
17708
- /** Maximum bundle size */
17709
- readonly maxBundleSize: 5;
17710
- /** Bundle submission timeout (ms) */
17711
- readonly submissionTimeout: 30000;
17712
- /** Confirmation timeout (ms) */
17713
- readonly confirmationTimeout: 60000;
17714
- /** Default retry attempts */
17715
- readonly maxRetries: 3;
17716
- };
17844
+ declare const MAX_PUBLIC_INPUTS = 32;
17717
17845
  /**
17718
- * Jito relayer configuration
17846
+ * Proof statistics for monitoring
17719
17847
  */
17720
- interface JitoRelayerConfig {
17721
- /** Jito block engine endpoint */
17722
- blockEngineUrl?: string;
17723
- /** Solana RPC URL */
17724
- rpcUrl?: string;
17725
- /** Default tip amount in lamports */
17726
- defaultTipLamports?: number;
17727
- /** Enable debug logging */
17728
- debug?: boolean;
17729
- /** Maximum retries for bundle submission */
17730
- maxRetries?: number;
17731
- /** Submission timeout in ms */
17732
- submissionTimeout?: number;
17848
+ interface ProofStatistics {
17849
+ /** Circuit type */
17850
+ circuitType: NoirCircuitType;
17851
+ /** Proof size in bytes */
17852
+ proofSize: number;
17853
+ /** Public inputs size in bytes */
17854
+ publicInputsSize: number;
17855
+ /** Total serialized size */
17856
+ totalSize: number;
17857
+ /** Estimated compute units */
17858
+ estimatedComputeUnits: number;
17733
17859
  }
17734
17860
  /**
17735
- * Bundle submission request
17861
+ * Batch verification request
17736
17862
  */
17737
- interface JitoBundleRequest {
17738
- /** Transactions to include in bundle */
17739
- transactions: (Transaction | VersionedTransaction)[];
17740
- /** Tip amount in lamports */
17741
- tipLamports?: number;
17742
- /** Tip payer keypair */
17743
- tipPayer: Keypair;
17744
- /** Whether to wait for confirmation */
17745
- waitForConfirmation?: boolean;
17863
+ interface BatchVerificationRequest {
17864
+ /** Proofs to verify */
17865
+ proofs: ZKProof[];
17866
+ /** Whether to fail fast on first invalid proof */
17867
+ failFast?: boolean;
17746
17868
  }
17747
17869
  /**
17748
- * Bundle submission result
17870
+ * Batch verification result
17749
17871
  */
17750
- interface JitoBundleResult {
17751
- /** Bundle UUID */
17752
- bundleId: string;
17753
- /** Transaction signatures in bundle */
17754
- signatures: string[];
17755
- /** Submission status */
17756
- status: 'submitted' | 'landed' | 'failed' | 'timeout';
17757
- /** Slot where bundle landed (if confirmed) */
17758
- slot?: number;
17759
- /** Error message if failed */
17760
- error?: string;
17761
- /** Actual tip paid in lamports */
17762
- tipPaid: number;
17872
+ interface BatchVerificationResult {
17873
+ /** Overall success */
17874
+ success: boolean;
17875
+ /** Results for each proof */
17876
+ results: SolanaVerificationResult[];
17877
+ /** Total proofs verified */
17878
+ totalVerified: number;
17879
+ /** Number of valid proofs */
17880
+ validCount: number;
17881
+ /** Total compute units used */
17882
+ totalComputeUnits: number;
17763
17883
  }
17764
17884
  /**
17765
- * Relayed transaction request
17885
+ * Check if a string is a valid circuit type
17766
17886
  */
17767
- interface RelayedTransactionRequest {
17768
- /** Signed transaction to relay */
17769
- transaction: Transaction | VersionedTransaction;
17770
- /** Tip amount in lamports (paid by relayer, recovered from user) */
17771
- tipLamports?: number;
17772
- /** Whether to wait for confirmation */
17773
- waitForConfirmation?: boolean;
17774
- }
17887
+ declare function isNoirCircuitType(value: string): value is NoirCircuitType;
17775
17888
  /**
17776
- * Relayed transaction result
17889
+ * Check if a proof has the expected structure for Solana verification
17777
17890
  */
17778
- interface RelayedTransactionResult {
17779
- /** Transaction signature */
17780
- signature: string;
17781
- /** Bundle ID if submitted via Jito */
17782
- bundleId?: string;
17783
- /** Submission status */
17784
- status: 'submitted' | 'confirmed' | 'failed';
17785
- /** Slot where transaction landed */
17786
- slot?: number;
17787
- /** Error message if failed */
17788
- error?: string;
17789
- /** Whether relayer was used or fell back to direct submission */
17790
- relayed: boolean;
17791
- }
17891
+ declare function isValidSolanaProof(proof: unknown): proof is ZKProof;
17792
17892
  /**
17793
- * Jito relayer error codes
17893
+ * Estimate compute units for verification
17894
+ *
17895
+ * Based on circuit complexity and proof size
17794
17896
  */
17795
- declare enum JitoRelayerErrorCode {
17796
- BUNDLE_SUBMISSION_FAILED = "BUNDLE_SUBMISSION_FAILED",
17797
- BUNDLE_TIMEOUT = "BUNDLE_TIMEOUT",
17798
- BUNDLE_INVALID = "BUNDLE_INVALID",
17799
- INSUFFICIENT_TIP = "INSUFFICIENT_TIP",
17800
- CONNECTION_ERROR = "CONNECTION_ERROR",
17801
- RATE_LIMITED = "RATE_LIMITED",
17802
- INVALID_TRANSACTION = "INVALID_TRANSACTION"
17803
- }
17897
+ declare function estimateComputeUnits(circuitType: NoirCircuitType): number;
17898
+
17804
17899
  /**
17805
- * Jito relayer error
17900
+ * Solana Noir Verifier
17901
+ *
17902
+ * Verifies Noir ZK proofs on Solana blockchain.
17903
+ *
17904
+ * ## Overview
17905
+ *
17906
+ * This module enables verification of SIP Protocol's Noir proofs on Solana:
17907
+ * - Funding Proofs: Prove sufficient balance without revealing amount
17908
+ * - Validity Proofs: Prove intent authorization without revealing sender
17909
+ * - Fulfillment Proofs: Prove correct execution without revealing path
17910
+ *
17911
+ * ## Usage
17912
+ *
17913
+ * ```typescript
17914
+ * import { SolanaNoirVerifier } from '@sip-protocol/sdk'
17915
+ * import { NoirProofProvider } from '@sip-protocol/sdk'
17916
+ *
17917
+ * // Generate proof
17918
+ * const provider = new NoirProofProvider()
17919
+ * await provider.initialize()
17920
+ * const { proof } = await provider.generateFundingProof(params)
17921
+ *
17922
+ * // Verify on Solana
17923
+ * const verifier = new SolanaNoirVerifier({ network: 'devnet' })
17924
+ * await verifier.initialize()
17925
+ *
17926
+ * // Off-chain verification (fast, no transaction)
17927
+ * const isValid = await verifier.verifyOffChain(proof)
17928
+ *
17929
+ * // On-chain verification (submits transaction)
17930
+ * const result = await verifier.verifyOnChain(proof, wallet)
17931
+ * ```
17932
+ *
17933
+ * ## Architecture
17934
+ *
17935
+ * ```
17936
+ * ┌─────────────────────────────────────────────────────────────┐
17937
+ * │ CLIENT SIDE │
17938
+ * │ ┌─────────────┐ ┌──────────────────┐ │
17939
+ * │ │ Noir Proof │───►│ SolanaNoirVerifier│ │
17940
+ * │ │ Provider │ │ - serialize() │ │
17941
+ * │ └─────────────┘ │ - verifyOffChain()│ │
17942
+ * │ │ - verifyOnChain() │ │
17943
+ * │ └────────┬─────────┘ │
17944
+ * └──────────────────────────────┼─────────────────────────────┘
17945
+ * │
17946
+ * ▼
17947
+ * ┌─────────────────────────────────────────────────────────────┐
17948
+ * │ SOLANA BLOCKCHAIN │
17949
+ * │ ┌──────────────────────────────────────────────────────┐ │
17950
+ * │ │ ZK Proof Verification Program │ │
17951
+ * │ │ - Deserialize proof │ │
17952
+ * │ │ - Load verification key │ │
17953
+ * │ │ - Execute pairing checks │ │
17954
+ * │ │ - Return verification result │ │
17955
+ * │ └──────────────────────────────────────────────────────┘ │
17956
+ * └─────────────────────────────────────────────────────────────┘
17957
+ * ```
17958
+ *
17959
+ * @module solana/noir-verifier
17806
17960
  */
17807
- declare class JitoRelayerError extends Error {
17808
- readonly code: JitoRelayerErrorCode;
17809
- readonly details?: unknown | undefined;
17810
- constructor(code: JitoRelayerErrorCode, message: string, details?: unknown | undefined);
17811
- }
17961
+
17812
17962
  /**
17813
- * Jito Relayer for gas abstraction
17963
+ * Solana Noir Verifier
17814
17964
  *
17815
- * Submits Solana transactions via Jito's MEV infrastructure,
17816
- * enabling gas abstraction for privacy transactions.
17965
+ * Enables verification of Noir ZK proofs on Solana blockchain.
17817
17966
  *
17818
17967
  * @example
17819
17968
  * ```typescript
17820
- * import { JitoRelayer } from '@sip-protocol/sdk'
17821
- *
17822
- * const relayer = new JitoRelayer({
17823
- * blockEngineUrl: 'https://ny.mainnet.block-engine.jito.wtf/api/v1',
17969
+ * const verifier = new SolanaNoirVerifier({
17970
+ * network: 'devnet',
17971
+ * verbose: true,
17824
17972
  * })
17825
17973
  *
17826
- * // Submit a signed transaction via relayer
17827
- * const result = await relayer.relayTransaction({
17828
- * transaction: signedTx,
17829
- * tipLamports: 10_000, // 0.00001 SOL tip
17830
- * })
17974
+ * await verifier.initialize()
17831
17975
  *
17832
- * console.log('Transaction relayed:', result.signature)
17976
+ * // Verify proof off-chain (no transaction)
17977
+ * const valid = await verifier.verifyOffChain(proof)
17978
+ *
17979
+ * // Or verify on-chain (submits transaction)
17980
+ * const result = await verifier.verifyOnChain(proof, wallet)
17833
17981
  * ```
17834
17982
  */
17835
- declare class JitoRelayer {
17836
- private readonly connection;
17837
- private readonly blockEngineUrl;
17838
- private readonly defaultTipLamports;
17839
- private readonly debug;
17840
- private readonly maxRetries;
17841
- private readonly submissionTimeout;
17842
- constructor(config?: JitoRelayerConfig);
17983
+ declare class SolanaNoirVerifier {
17984
+ private config;
17985
+ private _isReady;
17986
+ private verificationKeys;
17987
+ private connection;
17988
+ constructor(config?: SolanaNoirVerifierConfig);
17843
17989
  /**
17844
- * Submit a bundle of transactions to Jito
17990
+ * Get the Solana connection
17991
+ */
17992
+ getConnection(): Connection;
17993
+ /**
17994
+ * Check if verifier is initialized
17995
+ */
17996
+ get isReady(): boolean;
17997
+ /**
17998
+ * Get current configuration
17999
+ */
18000
+ getConfig(): Readonly<SolanaNoirVerifierConfig>;
18001
+ /**
18002
+ * Get RPC URL being used
18003
+ */
18004
+ getRpcUrl(): string;
18005
+ /**
18006
+ * Initialize the verifier
17845
18007
  *
17846
- * @param request - Bundle request with transactions and tip
17847
- * @returns Bundle submission result
18008
+ * Loads verification keys for all circuit types.
17848
18009
  */
17849
- submitBundle(request: JitoBundleRequest): Promise<JitoBundleResult>;
18010
+ initialize(): Promise<void>;
17850
18011
  /**
17851
- * Relay a single transaction via Jito
18012
+ * Generate verification key for a circuit type
17852
18013
  *
17853
- * This is the main method for gas abstraction - submit a transaction
17854
- * through the relayer instead of paying gas directly.
18014
+ * Creates the cryptographic verification key needed to verify proofs.
18015
+ */
18016
+ generateVerificationKey(circuitType: NoirCircuitType): Promise<SolanaVerificationKey>;
18017
+ /**
18018
+ * Serialize a proof for Solana
17855
18019
  *
17856
- * @param request - Transaction to relay
17857
- * @returns Relay result
18020
+ * Converts a Noir proof into a format suitable for Solana transaction.
17858
18021
  */
17859
- relayTransaction(request: RelayedTransactionRequest): Promise<RelayedTransactionResult>;
18022
+ serializeProof(proof: ZKProof): SolanaSerializedProof;
17860
18023
  /**
17861
- * Check if Jito relayer is available
18024
+ * Verify a proof off-chain
18025
+ *
18026
+ * Fast verification without submitting a transaction.
18027
+ * Uses the local Noir backend for verification if @aztec/bb.js is available,
18028
+ * otherwise falls back to mock verification.
18029
+ *
18030
+ * @param proof - The proof to verify
18031
+ * @returns true if valid, false otherwise
18032
+ *
18033
+ * @remarks
18034
+ * For production use, install @aztec/bb.js as a dependency:
18035
+ * ```bash
18036
+ * npm install @aztec/bb.js
18037
+ * ```
17862
18038
  */
17863
- isAvailable(): Promise<boolean>;
18039
+ verifyOffChain(proof: ZKProof): Promise<boolean>;
17864
18040
  /**
17865
- * Get current tip floor (minimum tip for inclusion)
18041
+ * Try to import @aztec/bb.js dynamically
18042
+ * Returns null if not available (allows graceful fallback)
17866
18043
  */
17867
- getTipFloor(): Promise<number>;
18044
+ private tryImportBBJS;
17868
18045
  /**
17869
- * Get a random tip account
18046
+ * Verify proof using the real Noir backend
17870
18047
  */
17871
- getRandomTipAccount(): PublicKey;
18048
+ private verifyWithBackend;
17872
18049
  /**
17873
- * Create tip instruction
18050
+ * Mock verification for testing and development
18051
+ *
18052
+ * WARNING: This does NOT provide cryptographic security.
18053
+ * Only used when @aztec/bb.js is not available.
17874
18054
  */
17875
- private createTipInstruction;
18055
+ private mockVerify;
17876
18056
  /**
17877
- * Prepare transactions for bundle submission
18057
+ * Verify a proof on-chain
18058
+ *
18059
+ * Submits a transaction to Solana to verify the proof using the Sunspot verifier.
18060
+ *
18061
+ * @param proof - The proof to verify
18062
+ * @param wallet - Wallet interface with signTransaction method
18063
+ * @returns Verification result with transaction signature
17878
18064
  */
17879
- private prepareBundleTransactions;
18065
+ verifyOnChain(proof: ZKProof, wallet: {
18066
+ publicKey: {
18067
+ toBase58(): string;
18068
+ };
18069
+ signTransaction: <T extends Transaction>(tx: T) => Promise<T>;
18070
+ }): Promise<SolanaVerificationResult>;
17880
18071
  /**
17881
- * Send bundle to Jito block engine
18072
+ * Create a Sunspot verifier instruction
18073
+ *
18074
+ * Sunspot verifiers expect instruction data in format: proof_bytes || public_witness_bytes
17882
18075
  */
17883
- private sendBundle;
18076
+ createSunspotVerifyInstruction(proof: ZKProof, programId: string): TransactionInstruction;
17884
18077
  /**
17885
- * Wait for bundle confirmation
18078
+ * Serialize proof for Sunspot verifier
18079
+ *
18080
+ * Sunspot expects: proof_bytes || public_witness_bytes
18081
+ * where public_witness contains the number of public inputs followed by the values
17886
18082
  */
17887
- private waitForBundleConfirmation;
18083
+ serializeProofForSunspot(proof: ZKProof): Buffer;
17888
18084
  /**
17889
- * Get bundle status from Jito
18085
+ * Create a verify instruction for Solana
18086
+ *
18087
+ * Builds the instruction data and account metas needed for verification.
17890
18088
  */
17891
- private getBundleStatus;
18089
+ createVerifyInstruction(proof: ZKProof): SolanaVerifyInstruction;
17892
18090
  /**
17893
- * Direct submission fallback
18091
+ * Get proof statistics
18092
+ *
18093
+ * Returns size and compute unit estimates for a proof.
17894
18094
  */
17895
- private directSubmit;
18095
+ getProofStatistics(proof: ZKProof): ProofStatistics;
17896
18096
  /**
17897
- * Log debug message
18097
+ * Batch verify multiple proofs
18098
+ *
18099
+ * Verifies multiple proofs, optionally failing fast on first invalid.
17898
18100
  */
17899
- private log;
18101
+ batchVerify(request: BatchVerificationRequest): Promise<BatchVerificationResult>;
17900
18102
  /**
17901
- * Sleep utility
18103
+ * Get verification key for a circuit type
17902
18104
  */
17903
- private sleep;
18105
+ getVerificationKey(circuitType: NoirCircuitType): SolanaVerificationKey | undefined;
18106
+ /**
18107
+ * Destroy the verifier and free resources
18108
+ */
18109
+ destroy(): Promise<void>;
18110
+ private ensureReady;
18111
+ private loadCircuitArtifact;
18112
+ private generateVKeyBytes;
18113
+ private hashBytes;
18114
+ private hexToBytes;
18115
+ private circuitTypeToId;
17904
18116
  }
17905
18117
  /**
17906
- * Create a Jito relayer instance
17907
- *
17908
- * @param config - Relayer configuration
17909
- * @returns Jito relayer instance
18118
+ * Create a Solana Noir Verifier with default devnet configuration
17910
18119
  */
17911
- declare function createJitoRelayer(config?: JitoRelayerConfig): JitoRelayer;
18120
+ declare function createDevnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17912
18121
  /**
17913
- * Create a mainnet Jito relayer with NY block engine
18122
+ * Create a Solana Noir Verifier with mainnet configuration
17914
18123
  */
17915
- declare function createMainnetRelayer(rpcUrl?: string): JitoRelayer;
18124
+ declare function createMainnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17916
18125
 
17917
18126
  /**
17918
18127
  * NEAR Same-Chain Privacy Types
@@ -24769,4 +24978,4 @@ declare function calculateFeeForSwap(contract: NEARFeeContract, swapAmount: bigi
24769
24978
  netAmountUsd: number;
24770
24979
  }>;
24771
24980
 
24772
- export { type CSPLServiceStatus as $, ATTESTATION_VERSION as A, BLS12_381_MODULUS as B, BN254_MODULUS as C, BUILTIN_TEMPLATES as D, type BackendCapabilities$1 as E, type BackendRegistrationOptions as F, type BalanceAttestationParams as G, BaseProofComposer as H, BaseWalletAdapter as I, type BatchVerificationRequest as J, type BatchVerificationResult as K, type BidReceipt as L, type BitcoinNetwork$1 as M, type BlockRange as N, type BridgeProvider as O, BrowserNoirProvider as P, type BrowserNoirProviderConfig as Q, CHAIN_NUMERIC_IDS as R, CIRCUIT_METADATA as S, COMPLIANCE_CIRCUIT_IDS as T, ETH_RPC_ENDPOINTS as U, SOLANA_RPC_ENDPOINTS as V, SUI_RPC_ENDPOINTS as W, CHAIN_PREFIXES as X, CSPLClient as Y, ZCASH_RPC_CONFIG as Z, type CSPLClientConfig as _, type AddressReuseResult as a, DEFAULT_VALIDITY_PERIOD_SECONDS as a$, CSPLTokenService as a0, type CSPLTokenServiceConfig as a1, type CSVExport as a2, type CacheEntry as a3, type CacheEntryMetadata as a4, type CacheEvent as a5, type CacheEventListener as a6, type CacheEventType as a7, type CacheKey as a8, type CacheKeyComponents as a9, type CosmosChainId as aA, type CosmosStealthResult as aB, CosmosStealthService as aC, type CreateBidParams as aD, type CreateIntentOptions as aE, type CreatePaymentOptions as aF, CrossSystemValidator as aG, CryptoError as aH, DEFAULT_AGGREGATOR_CONFIG as aI, DEFAULT_CHAIN_FEES as aJ, DEFAULT_CONVERSION_OPTIONS as aK, DEFAULT_FEE_TIERS as aL, DEFAULT_LRU_CONFIG as aM, DEFAULT_MANAGER_CONFIG as aN, DEFAULT_MOCK_CONFIG as aO, DEFAULT_MULTI_TIER_CONFIG as aP, DEFAULT_NETWORK_CONFIG as aQ, DEFAULT_ORCHESTRATOR_CONFIG as aR, DEFAULT_PERSISTENT_CONFIG as aS, DEFAULT_PIPELINE_CONFIG as aT, DEFAULT_PROXY_TIMEOUT as aU, DEFAULT_RANGE_API_ENDPOINT as aV, DEFAULT_RPC_URLS as aW, DEFAULT_SYNC_CONFIG as aX, DEFAULT_THRESHOLD as aY, DEFAULT_TOTAL_ORACLES as aZ, DEFAULT_TREASURY as a_, CacheKeyGenerator as aa, type CacheLookupResult as ab, type CacheWarmingConfig as ac, type CastVoteParams as ad, type ChainCharacteristics as ae, type ChainFamily as af, type ChainFeeConfig as ag, type ClusterResult as ah, type CommitmentPoint as ai, type CompatibilityEntry as aj, ComplianceManager as ak, type ComplianceProofConfig as al, ComplianceProofProvider as am, type ComplianceProofResult as an, type ComplianceProofType as ao, ComplianceReporter as ap, type CompositionPlan as aq, type CompositionRequest as ar, type CompositionState as as, type CompositionTemplate as at, ConditionalDisclosure as au, type ConversionErrorCode as av, type ConversionMetadata as aw, type ConversionOptions as ax, type ValidationError as ay, type ValidationResult as az, type AdvisorMessage as b, type GenerateAuditReportParams as b$, DEFAULT_WARMING_CONFIG as b0, type DecryptedTransaction as b1, DerivationPath as b2, type DeriveMultipleParams as b3, type DeriveViewingKeyParams as b4, type DerivedViewingKey as b5, type DetailedAggregationResult as b6, type DetailedVerificationResult as b7, type EIP1193ConnectInfo as b8, type EIP1193Event as b9, type ExportForRegulatorParams as bA, type ExportedViewingKey as bB, type FATFExport as bC, type FATFTransaction as bD, type FINCENExport as bE, type FINCENTransaction as bF, type FeeBreakdown as bG, type FeeCalculationInput as bH, type FeeCalculationResult as bI, FeeCalculator as bJ, type FeeCalculatorOptions as bK, type FeeCollectionEvent as bL, type FeeCollectionParams as bM, type FeeCollectionResult as bN, type FeeContractMethods as bO, type FeeContractState as bP, type FeeGovernanceProposal as bQ, type FeeModel as bR, type FeeStats as bS, type FeeTier as bT, type TreasuryConfig as bU, type FeeWaiver as bV, type FeeWaiverType as bW, type FieldCharacteristics as bX, FileCache as bY, type FindBestRouteParams as bZ, type FullAnalysisResult as b_, type EIP1193Provider as ba, type EIP1193ProviderRpcError as bb, type EIP1193RequestArguments as bc, type EIP712Domain as bd, type EIP712TypeDefinition as be, type EIP712TypedData as bf, type EIP712Types as bg, type EllipticCurve as bh, type EncryptedNote as bi, type EncryptedVote as bj, EncryptionNotImplementedError as bk, type EnhancedAccountData as bl, type EnhancedTransaction as bm, type EnhancedTransactionEvents as bn, type EnhancedTransactionType as bo, ErrorCode as bp, type EthereumAdapterConfig as bq, EthereumChainId as br, type EthereumChainIdType as bs, type EthereumChainMetadata as bt, type EthereumTokenMetadata as bu, type EthereumTransactionReceipt as bv, type EthereumTransactionRequest as bw, EthereumWalletAdapter as bx, type EthereumWalletName as by, type ExchangeExposureResult as bz, type AdvisorRecommendation as c, MAX_PROOF_SIZE_BYTES as c$, GenericProvider as c0, type GenericProviderConfig as c1, type GetTransactionHistoryOptions as c2, type Halo2NativeProof as c3, Halo2ProofConverter as c4, type HardwareAccount as c5, type HardwareConnectionStatus as c6, type HardwareDeviceInfo as c7, HardwareErrorCode as c8, type HardwareErrorCodeType as c9, InvalidProofError as cA, type InvalidationRule as cB, type InvalidationStrategy as cC, JITO_BLOCK_ENGINES as cD, JITO_DEFAULTS as cE, JITO_TIP_ACCOUNTS as cF, type JitoBundleRequest as cG, type JitoBundleResult as cH, JitoRelayer as cI, type JitoRelayerConfig as cJ, JitoRelayerError as cK, JitoRelayerErrorCode as cL, type Jurisdiction as cM, KNOWN_EXCHANGES as cN, KNOWN_ISSUERS as cO, type KimchiNativeProof as cP, KimchiProofConverter as cQ, type KnownExchange as cR, LRUCache as cS, type LRUCacheConfig as cT, type LatencyEstimate as cU, type LedgerConfig as cV, type LedgerModel as cW, LedgerWalletAdapter as cX, type LinkValidationResult as cY, type LogLevel as cZ, MAX_NEAR_AMOUNT as c_, type HardwareEthereumTx as ca, type HardwareSignRequest as cb, type HardwareSignature as cc, type HardwareTransport as cd, type HardwareWalletConfig as ce, HardwareWalletError as cf, type HardwareWalletType as cg, HeliusEnhanced as ch, type HeliusEnhancedConfig as ci, type HeliusEnhancedTransaction as cj, HeliusProvider as ck, type HeliusProviderConfig as cl, type HeliusWebhookPayload as cm, type HeliusWebhookTransaction as cn, type HistoryCompletenessParams as co, type ICacheKeyGenerator as cp, type ICompiledCircuitCache as cq, type ILRUCache as cr, type IMultiTierCache as cs, INITIAL_PROOF_CACHE_STATS as ct, type IPersistentCache as cu, type IProofCache as cv, type IVerificationKeyCache as cw, IndexedDBCache as cx, IntentBuilder as cy, IntentError as cz, type AdvisorResponse as d, NEAR_TOKEN_DECIMALS as d$, MAX_PUBLIC_INPUTS as d0, MEMO_PROGRAM_ID as d1, type MerkleProof as d2, type MobileBrowser as d3, type MobileDeviceInfo as d4, type MobilePlatform as d5, type MobileWASMCompatibility as d6, MockEthereumAdapter as d7, type MockEthereumAdapterConfig as d8, type MockHardwareConfig as d9, type NEARIntentsAdapterConfig as dA, NEARIntentsBackend as dB, type NEARNetwork as dC, type NEARPedersenCommitment as dD, type NEARPrivateTransferParams as dE, type NEARPrivateTransferResult as dF, type NEARScanParams as dG, type NEARScanResult as dH, type NEARStealthAddressResult as dI, type NEARStealthBalance as dJ, type NEARStealthMetaAddressResult as dK, type NEARTransactionData as dL, type NEARTransactionHistoryParams as dM, type NEARTransactionHistoryResult as dN, type NEARTransactionType as dO, type NEARViewingKey as dP, type NEARViewingKeyExport as dQ, type NEARViewingKeyStorage as dR, DEFAULT_GAS as dS, ED25519_ORDER as dT, NEAR_EXPLORER_URLS as dU, NEAR_FEE_CONTRACTS as dV, NEAR_IMPLICIT_ACCOUNT_LENGTH as dW, MAX_COMMITMENT_VALUE as dX, NEAR_RPC_ENDPOINTS as dY, SIP_MEMO_PREFIX$1 as dZ, NEAR_TOKEN_CONTRACTS as d_, MockLedgerAdapter as da, MockObliviousSyncProvider as db, MockProofProvider as dc, MockSolanaAdapter as dd, type MockSolanaAdapterConfig as de, MockSolver as df, type MockSolverConfig as dg, type MockSyncProviderConfig as dh, MockTrezorAdapter as di, MockWalletAdapter as dj, MultiTierCache as dk, type MultiTierCacheConfig as dl, type NEARAnnouncement as dm, type NEARClaimParams as dn, type NEARClaimResult as dp, type NEARCommitmentPoint as dq, type NEARDetectedPayment as dr, type NEAREncryptedPayload as ds, type NEARExportFormat as dt, type NEARExportOptions as du, NEARFeeContract as dv, type NEARFeeContractOptions as dw, type NEARHistoricalTransaction as dx, type NEARHistoryPrivacyLevel as dy, NEARIntentsAdapter as dz, type AdvisorRole as e, PrivateNFT as e$, type NEP141TokenCommitment as e0, type NativeProofFormat as e1, type NativeTransfer as e2, NetworkError as e3, type NetworkPrivacyConfig as e4, type NftTransfer as e5, type NoirCircuitType as e6, type NoirNativeProof as e7, NoirProofConverter as e8, ONE_NEAR as e9, type ParsedProxyConfig as eA, PaymentBuilder as eB, type PdfExportOptions as eC, type PedersenCommitment as eD, type PersistentCacheConfig as eE, type PreparedSwap as eF, type PriceFeed as eG, PrivacyAdvisorAgent as eH, type PrivacyAdvisorConfig as eI, type PrivacyAdvisoryReport as eJ, type AvailabilityResult as eK, type PrivacyBackend as eL, type BackendCapabilities as eM, PrivacyBackendRegistry as eN, type BackendSelectionResult as eO, type BackendType as eP, type PrivacyConfig as eQ, type PrivacyDisplayOptions as eR, PrivacyLogger as eS, type PrivacyLoggerConfig as eT, type PrivacyRecommendation as eU, type PrivacyScore as eV, type PrivacyScoreBreakdown as eW, SmartRouter as eX, type SmartRouterConfig as eY, type TransactionResult as eZ, type TransferParams as e_, ONE_YOCTO as ea, ORACLE_DOMAIN as eb, type ObliviousNullifier as ec, type ObliviousSyncConfig as ed, ObliviousSyncError as ee, ObliviousSyncErrorCode as ef, type ObliviousSyncProvider as eg, type ObliviousSyncQuery as eh, type ObliviousSyncResponse as ei, OneClickClient as ej, type OracleAttestationMessage as ek, type OracleId as el, type OracleInfo as em, type OracleRegistry as en, type OracleRegistryConfig as eo, type OracleSignature as ep, type OracleStatus as eq, type OrchestratorConfig as er, type OrchestratorProgressCallback as es, type OrchestratorProgressEvent as et, type OrchestratorResult as eu, PALLAS_MODULUS as ev, PROXY_ENV_VAR as ew, PROXY_ENV_VARS as ex, type ParallelAggregationOptions as ey, type ParseTransactionsOptions as ez, type AdvisorStatus as f, type SameChainExecutor as f$, PrivateVoting as f0, type ProductionConfigError as f1, type ProductionConfigValidationResult as f2, type ProductionConfigWarning as f3, type ProductionQuote as f4, ProductionSafetyError as f5, ProofAggregator as f6, type AuditLogEntry as f7, type ProofCacheStats as f8, ProofConversionError as f9, type RiskLevel as fA, type Route as fB, type RouteWithQuote as fC, type RouterPriority as fD, SIP as fE, type SIPConfig as fF, type SIPEnhancedTransaction as fG, SIPError as fH, type SIPLogLevel as fI, type SIPLoggerConfig as fJ, SIPNativeBackend as fK, type SIPNativeBackendConfig as fL, type SIPProtectionComparison as fM, type SIPTransactionMetadata as fN, SIP_MEMO_PREFIX as fO, SOLANA_EXPLORER_URLS as fP, SOLANA_RPC_ENDPOINTS$1 as fQ, SOLANA_TOKEN_DECIMALS as fR, SOLANA_TOKEN_MINTS as fS, SOLANA_ZK_PROGRAM_IDS as fT, STABLECOIN_ADDRESSES as fU, STABLECOIN_DECIMALS as fV, STABLECOIN_INFO as fW, SUPPORTED_JURISDICTIONS as fX, SYSTEM_INFO as fY, type SameChainExecuteParams as fZ, type SameChainExecuteResult as f_, type ProofConverter as fa, type ProofDependency as fb, ProofError as fc, ProofNotImplementedError as fd, ProofOrchestrator as fe, type ProofProgressCallback as ff, type ProofStatistics as fg, type ProofSystemToNativeMap as fh, type ProviderConfig as fi, type ProviderType as fj, type ProxiedFetch as fk, type ProxyAgentOptions as fl, type ProxyCheckResult as fm, type ProxyConfig as fn, type ProxyType as fo, type QuoteComparison as fp, type RangeAPIConfig as fq, type RangeSASAttestation as fr, type ReceivedNote as fs, type RecursiveAggregationOptions as ft, type RegisteredBackend as fu, type RegulatoryExport as fv, type RegulatoryFormat as fw, type RelayedTransactionRequest as fx, type RelayedTransactionResult as fy, type RevealedVote as fz, type AdvisoryContext as g, SurveillanceAnalyzer as g$, type SameChainTransferParams as g0, type SameChainTransferResult as g1, type SanctionsClearParams as g2, type SealedBid as g3, SealedBidAuction as g4, SecurityError as g5, type SensitiveData as g6, type SequentialAggregationOptions as g7, type SerializedError as g8, type SettlementBackend as g9, type SolanaNoirVerifierConfig as gA, type SolanaPrivateTransferParams as gB, type SolanaPrivateTransferResult as gC, type SolanaPublicKey as gD, type SolanaRPCProvider as gE, type SolanaCluster as gF, type SolanaSameChainConfig as gG, SolanaSameChainExecutor as gH, type SolanaScanParams as gI, type SolanaScanResult as gJ, type SolanaSendOptions as gK, type SolanaSerializedProof as gL, type SolanaSignature as gM, type SolanaTransaction as gN, type SolanaUnsignedTransaction as gO, type SolanaVerificationKey as gP, type SolanaVerificationResult as gQ, type SolanaVerifyInstruction as gR, type SolanaVersionedTransaction as gS, SolanaWalletAdapter as gT, type SolanaWalletName as gU, type SolanaWalletProvider as gV, type StablecoinInfo as gW, type StealthCurve as gX, type StreamCallback as gY, type SuiStealthResult as gZ, SuiStealthService as g_, type SettlementBackendFactory as ga, type SettlementBackendName as gb, type SettlementBackendRegistry as gc, type Quote as gd, type QuoteParams as ge, SettlementRegistry as gf, SettlementRegistryError as gg, type SwapParams as gh, type SwapResult as gi, type SwapRoute as gj, type SwapRouteStep as gk, type ShieldedBalance as gl, type ShieldedSendParams as gm, type ShieldedSendResult as gn, type SignedOracleAttestation as go, SmartRouter$1 as gp, type SocialLinkResult as gq, type SolanaAdapterConfig as gr, type SolanaAnnouncement as gs, type SolanaClaimParams as gt, type SolanaClaimResult as gu, type SolanaCluster$1 as gv, type SolanaConnection as gw, SolanaNoirError as gx, SolanaNoirErrorCode as gy, SolanaNoirVerifier as gz, type AggregationProgressCallback as h, WalletError as h$, type SurveillanceAnalyzerConfig as h0, type SwapEvent as h1, type SwapRequest as h2, type SwapResult$1 as h3, SwapStatus as h4, type SwapStatusResponse as h5, type SyncCompletionEvent as h6, type SyncEventListener as h7, SyncManager as h8, type SyncManagerConfig as h9, type TrezorConfig as hA, type TrezorModel as hB, TrezorWalletAdapter as hC, type UnifiedOptimizationProfile as hD, type UnifiedOptimizationResult as hE, UnifiedProofConverter as hF, type UnlockResult as hG, UnsupportedVersionError as hH, type UnwrapParams as hI, type UnwrapResult as hJ, VESTA_MODULUS as hK, type ValidationCheck as hL, ValidationError$1 as hM, type ValidationOptions as hN, type ValidationReport as hO, type VerificationOrder as hP, VerificationPipeline as hQ, type VerificationPipelineConfig as hR, type VerificationProgressCallback as hS, type VerificationProgressEvent as hT, type VerificationResult as hU, type VerifyBidParams as hV, type VerifyOptions as hW, type ViewingKeyAccessParams as hX, type ViewingKeyDerivationResult as hY, type ViewingKeyScope as hZ, type WalletAdapter as h_, type SyncOptions as ha, type SyncProgressEvent as hb, type SyncRandomness as hc, type SyncServiceHealth as hd, type SystemInfo as he, type SystemVerificationStats as hf, TOR_CONTROL_PORT as hg, TOR_HOST as hh, TOR_PORTS as hi, type TapScript as hj, type TaprootOutput as hk, type TemporalPatternResult as hl, type ThresholdShares as hm, ThresholdViewingKey as hn, type TimeLockParams as ho, type TimeLockResult as hp, type TimeWindowedViewingKey as hq, type TokenAsset as hr, type TokenMetadata as hs, type TokenTransfer as ht, type ToolResult as hu, type ToolsConfig as hv, type TransactionData as hw, type TransactionSummary as hx, type TransportType as hy, Treasury as hz, type AggregationProgressEvent as i, computeTweakedKey as i$, type WalletSyncState as i0, type WarmingResult as i1, type WebhookHandler as i2, type WebhookHandlerConfig as i3, type WebhookProcessResult as i4, type WebhookRequest as i5, type WrapParams as i6, type WrapResult as i7, ZcashNativeBackend as i8, type ZcashNativeBackendConfig as i9, base58ToHex as iA, bnbOptimizations as iB, bpsToPercent as iC, bytesToHex as iD, hexToBytes as iE, cacheKeyGenerator as iF, calculateFeeForSwap as iG, calculatePrivacyScore as iH, calculateSIPComparison as iI, checkAptosStealthAddress as iJ, checkEd25519StealthAddress as iK, checkEd25519StealthAddressV1 as iL, checkMobileWASMCompatibility as iM, checkNEARStealthAddress as iN, checkProxyAvailability as iO, checkSecp256k1StealthAddressV1 as iP, checkStealthAddress as iQ, checkSuiStealthAddress as iR, claimStealthPayment as iS, commit as iT, commitNEAR as iU, commitNEP141Token as iV, commitZero as iW, compareCrossChainCosts as iX, computeAttestationHash as iY, computeNEARViewingKeyHash as iZ, computeNEARViewingKeyHashFromPrivate as i_, type ZcashQuote as ia, type ZcashQuoteParams as ib, ZcashRPCClient as ic, ZcashRPCError as id, type ZcashRpcConfig as ie, ZcashShieldedService as ig, type ZcashShieldedServiceConfig as ih, type ZcashSwapParams as ii, type ZcashSwapResult as ij, ZcashSwapService as ik, type ZcashSwapServiceConfig as il, type ZcashSwapSourceChain as im, type ZcashSwapSourceToken as io, type ZcashSwapStatus as ip, addBlindings as iq, addBlindingsNEAR as ir, addCommitments as is, addCommitmentsNEAR as it, addOracle as iu, analyzeAddressReuse as iv, analyzeTemporalPatterns as iw, aptosAddressToAuthKey as ix, assertNoLocalhost as iy, attachProofs as iz, type AggregationStepResult as j, createShieldedPayment as j$, configureLogger as j0, convertFromSIP as j1, convertToSIP as j2, createAnalyzeWalletTool as j3, createAnnouncementMemo$1 as j4, createCacheKeyGenerator as j5, createCommitment as j6, createCrossSystemValidator as j7, createDevnetVerifier as j8, createEthereumAdapter as j9, createAnnouncementMemo as jA, createNEARFeeContract as jB, createNEARIntentsAdapter as jC, createNEARIntentsBackend as jD, createNEARMemoryStorage as jE, createNetworkPrivacyClient as jF, createNoirConverter as jG, createOracleRegistry as jH, createPersistentCache as jI, createPrivacyAdvisor as jJ, createPrivacyAdvisorTools as jK, createPrivacyLogger as jL, createPrivateOwnership as jM, createPrivateVoting as jN, createProductionConfig as jO, createProductionSIP as jP, createProofAggregator as jQ, createProofOrchestrator as jR, createProvider as jS, createProxiedFetch as jT, createProxyAgent as jU, createQuickScoreTool as jV, createSIP as jW, createSIPComparisonTool as jX, createSameChainExecutor as jY, createSealedBidAuction as jZ, createShieldedIntent as j_, createExplainTool as ja, createFeeCalculator as jb, createFileCache as jc, createHalo2Converter as jd, createHeliusEnhanced as je, createIndexedDBCache as jf, createJitoRelayer as jg, createKeySpendOnlyOutput as jh, createKimchiConverter as ji, createLRUCache as jj, createLedgerAdapter as jk, createLogger as jl, createMainnetFeeContract as jm, createMainnetRelayer as jn, createMainnetVerifier as jo, createMockAttestation as jp, createMockEthereumAdapter as jq, createMockEthereumProvider as jr, createMockLedgerAdapter as js, createMockSolanaAdapter as jt, createMockSolanaConnection as ju, createMockSolanaProvider as jv, createMockSolver as jw, createMockSyncProvider as jx, createMockTrezorAdapter as jy, createMultiTierCache as jz, type AggregatorConfig as k, fetchAttestation as k$, createSmartRouter as k0, createSolanaAdapter as k1, createSurveillanceAnalyzer as k2, createSyncManager as k3, createSyncState as k4, createTaprootOutput as k5, createTestnetFeeContract as k6, createTimeWindowedKey as k7, createTrezorAdapter as k8, createUnifiedConverter as k9, deserializeAttestationMessage as kA, deserializeIntent as kB, deserializePayment as kC, detectChainFamily as kD, detectClusters as kE, detectEthereumWallets as kF, detectExchangeExposure as kG, detectMobileBrowser as kH, detectMobilePlatform as kI, detectSolanaWallets as kJ, detectTorPort as kK, ed25519PublicKeyToAptosAddress as kL, ed25519PublicKeyToImplicitAccount as kM, ed25519PublicKeyToNearAddress as kN, ed25519PublicKeyToSolanaAddress as kO, ed25519PublicKeyToSuiAddress as kP, encodeNEARStealthMetaAddress as kQ, encodeStealthMetaAddress as kR, encryptForNEARViewing as kS, encryptForViewing as kT, estimateComputeUnits as kU, estimateFee as kV, estimatePrivateTransferFee as kW, optimizations as kX, exportNEARViewingKey as kY, exportTransactions as kZ, featureNotSupportedError as k_, createVerificationPipeline as ka, createWalletFactory as kb, createWebhookHandler as kc, createZcashClient as kd, createZcashNativeBackend as ke, createZcashShieldedService as kf, createZcashSwapService as kg, decodeStealthMetaAddress as kh, decodeTaprootAddress as ki, decryptMemo as kj, decryptWithNEARViewing as kk, decryptWithViewing as kl, defaultRegistry as km, deriveAptosStealthPrivateKey as kn, deriveEd25519StealthPrivateKey as ko, deriveEd25519StealthPrivateKeyV1 as kp, deriveNEARChildViewingKey as kq, deriveNEARStealthPrivateKey as kr, deriveObliviousNullifier as ks, deriveOracleId as kt, deriveSecp256k1StealthPrivateKeyV1 as ku, deriveStealthPrivateKey as kv, deriveStealthPrivateKeyV1 as kw, deriveSuiStealthPrivateKey as kx, deriveTraditionalNullifier as ky, deriveViewingKey as kz, type AnalyzableTransaction as l, getSupportedSameChainChains as l$, fetchWalletAttestations as l0, formatFee as l1, formatStablecoinAmount as l2, fromHex as l3, fromStablecoinUnits as l4, fromYoctoNEAR as l5, generateAptosStealthAddress as l6, generateBlinding as l7, generateBlindingNEAR as l8, generateCosmosStealthAddress as l9, getDerivationPath as lA, getErrorMessage as lB, getEthereumProvider as lC, getGenerators as lD, getGeneratorsNEAR as lE, getIntentSummary as lF, getLogLevelName as lG, getMobileDeviceInfo as lH, getAccountExplorerUrl as lI, getExplorerUrl$1 as lJ, getTokenContract as lK, getNEARViewingPublicKey as lL, getNativeToken as lM, getOSVersion as lN, getPaymentSummary as lO, getPaymentTimeRemaining as lP, getPrivacyConfig as lQ, getPrivacyDescription as lR, getProductionUrl as lS, getProxyFromEnv as lT, getExplorerUrl as lU, getSolanaProvider as lV, getSolanaTokenDecimals as lW, getStablecoin as lX, getStablecoinInfo as lY, getStablecoinsForChain as lZ, getStealthBalance as l_, generateCosmosStealthMetaAddress as la, generateEd25519StealthAddress as lb, generateEd25519StealthMetaAddress as lc, generateIntentId as ld, generateNEARStealthAddress as le, generateNEARStealthMetaAddress as lf, generateNEARViewingKeyFromSpending as lg, generatePdfReport as lh, generateRandomBytes as li, generateRandomNEARViewingKey as lj, generateStealthAddress as lk, generateStealthMetaAddress as ll, generateSuiStealthAddress as lm, generateSyncRandomness as ln, generateViewingKey as lo, getActiveOracles as lp, getAsset as lq, getAvailableTransports as lr, getBrowserInfo as ls, getBrowserVersion as lt, getChainCharacteristics as lu, getChainNumericId as lv, getChainsForStablecoin as lw, getCurrentEpoch as lx, getCurveForChain as ly, getDefaultRpcEndpoint as lz, type AnyNativeProof as m, logger as m$, getSupportedStablecoins as m0, getTimeRemaining as m1, getTokenByAddress as m2, getTokenDecimals as m3, getTokenMint as m4, getTokensForChain as m5, getTransactionByHash as m6, getTransactionCount as m7, getTransactionHistory as m8, getTransactionSummary as m9, isSameChainSupported as mA, isSecurityError as mB, isStablecoin as mC, isStablecoinOnChain as mD, isSyncRandomnessValid as mE, isTablet as mF, isTorAvailable as mG, isValidAmount as mH, isValidAptosAddress as mI, isValidChainId as mJ, isValidCompressedPublicKey as mK, isValidCosmosAddress as mL, isValidEd25519PublicKey as mM, isValidHex as mN, isValidHexLength as mO, isValidAccountId as mP, isValidNearAccountId as mQ, isValidNearImplicitAddress as mR, isValidPrivacyLevel as mS, isValidPrivateKey as mT, isValidScalar as mU, isValidSlippage as mV, isValidSolanaAddress as mW, isValidSolanaProof as mX, isValidStealthMetaAddress as mY, isValidSuiAddress as mZ, isValidTaprootAddress as m_, getXOnlyPublicKey as ma, hasEnoughOracles as mb, hasErrorCode as mc, hasRequiredProofs as md, hasTokenAccount as me, hash as mf, hexToNumber as mg, implicitAccountToEd25519PublicKey as mh, importNEARViewingKey as mi, isBrowser as mj, isEd25519Chain as mk, isExpired as ml, isImplicitAccount as mm, isKnownToken as mn, isLevelEnabled as mo, isLocalhostAllowed as mp, isLocalhostUrl as mq, isNEARAnnouncementForViewingKey as mr, isNamedAccount as ms, isNoirCircuitType as mt, isNonNegativeAmount as mu, isNoteInWindow as mv, isPaymentExpired as mw, isPrivateWalletAdapter as mx, isProductionEnvironment as my, isSIPError as mz, type ApproveParams as n, validateCreateIntentParams as n$, maskAmount as n0, nearAddressToEd25519PublicKey as n1, normalizeAddress as n2, normalizeSuiAddress as n3, notConnectedError as n4, parseAnnouncement$1 as n5, parseAnnouncement as n6, parseNEARStealthMetaAddress as n7, parseProxyConfig as n8, parseStealthAddress as n9, signAttestationMessage as nA, silenceLogger as nB, solanaAddressToEd25519PublicKey as nC, optimizations$1 as nD, solanaPublicKeyToHex as nE, stealthKeyToCosmosAddress as nF, subtractBlindings as nG, subtractBlindingsNEAR as nH, subtractCommitments as nI, subtractCommitmentsNEAR as nJ, supportsSharedArrayBuffer as nK, supportsTouch as nL, supportsWASMBulkMemory as nM, supportsWASMSimd as nN, supportsWebBluetooth as nO, supportsWebHID as nP, supportsWebUSB as nQ, supportsWebWorkers as nR, taprootAddress as nS, toHex as nT, toStablecoinUnits as nU, toYoctoNEAR as nV, trackIntent as nW, trackPayment as nX, updateOracleStatus as nY, updateSyncState as nZ, validateAsset as n_, percentToBps as na, privacyLogger as nb, processWebhookTransaction as nc, proveOwnership as nd, publicKeyToEthAddress as ne, recommendCheapestChain as nf, recommendProfile as ng, redactAddress as nh, redactSensitiveData as ni, redactSignature as nj, registerWallet as nk, removeOracle as nl, rotateCircuit as nm, scanForPayments as nn, schnorrSign as no, schnorrSignHex as np, schnorrVerify as nq, schnorrVerifyHex as nr, secureWipe as ns, secureWipeAll as nt, selectOptimalConfig as nu, sendPrivateSPLTransfer as nv, serializeAttestationMessage as nw, serializeIntent as nx, serializePayment as ny, setLogLevel as nz, type ApproveResult as o, validateIntentInput as o0, validateIntentOutput as o1, validateNEARStealthAddress as o2, validateNEARStealthMetaAddress as o3, validateNEARViewingKey as o4, validateProductionConfig as o5, validateScalar as o6, validateViewingKey as o7, verifyAttestation as o8, verifyAttestationSignature as o9, verifyAuthToken as oa, verifyCommitment as ob, verifyNEP141TokenCommitment as oc, verifyOpening as od, verifyOpeningNEAR as oe, verifyOracleSignature as of, verifyOwnership as og, verifyWebhookSignature as oh, walletRegistry as oi, withSecureBuffer as oj, withSecureBufferSync as ok, wrapError as ol, type AptosStealthResult as p, AptosStealthService as q, type AttestationGatedConfig as r, AttestationGatedDisclosure as s, type AttestationRequest as t, type AttestationResult as u, AttestationSchema as v, type AttestationVerificationResult as w, type AuditReport as x, AuditorKeyDerivation as y, AuditorType as z };
24981
+ export { type CSPLServiceStatus as $, ATTESTATION_VERSION as A, BLS12_381_MODULUS as B, BN254_MODULUS as C, BUILTIN_TEMPLATES as D, type BackendCapabilities$1 as E, type BackendRegistrationOptions as F, type BalanceAttestationParams as G, BaseProofComposer as H, BaseWalletAdapter as I, type BatchVerificationRequest as J, type BatchVerificationResult as K, type BidReceipt as L, type BitcoinNetwork$1 as M, type BlockRange as N, type BridgeProvider as O, BrowserNoirProvider as P, type BrowserNoirProviderConfig as Q, CHAIN_NUMERIC_IDS as R, CIRCUIT_METADATA as S, COMPLIANCE_CIRCUIT_IDS as T, ETH_RPC_ENDPOINTS as U, SOLANA_RPC_ENDPOINTS as V, SUI_RPC_ENDPOINTS as W, CHAIN_PREFIXES as X, CSPLClient as Y, ZCASH_RPC_CONFIG as Z, type CSPLClientConfig as _, type AddressReuseResult as a, DEFAULT_VALIDITY_PERIOD_SECONDS as a$, CSPLTokenService as a0, type CSPLTokenServiceConfig as a1, type CSVExport as a2, type CacheEntry as a3, type CacheEntryMetadata as a4, type CacheEvent as a5, type CacheEventListener as a6, type CacheEventType as a7, type CacheKey as a8, type CacheKeyComponents as a9, type CosmosChainId as aA, type CosmosStealthResult as aB, CosmosStealthService as aC, type CreateBidParams as aD, type CreateIntentOptions as aE, type CreatePaymentOptions as aF, CrossSystemValidator as aG, CryptoError as aH, DEFAULT_AGGREGATOR_CONFIG as aI, DEFAULT_CHAIN_FEES as aJ, DEFAULT_CONVERSION_OPTIONS as aK, DEFAULT_FEE_TIERS as aL, DEFAULT_LRU_CONFIG as aM, DEFAULT_MANAGER_CONFIG as aN, DEFAULT_MOCK_CONFIG as aO, DEFAULT_MULTI_TIER_CONFIG as aP, DEFAULT_NETWORK_CONFIG as aQ, DEFAULT_ORCHESTRATOR_CONFIG as aR, DEFAULT_PERSISTENT_CONFIG as aS, DEFAULT_PIPELINE_CONFIG as aT, DEFAULT_PROXY_TIMEOUT as aU, DEFAULT_RANGE_API_ENDPOINT as aV, DEFAULT_RPC_URLS as aW, DEFAULT_SYNC_CONFIG as aX, DEFAULT_THRESHOLD as aY, DEFAULT_TOTAL_ORACLES as aZ, DEFAULT_TREASURY as a_, CacheKeyGenerator as aa, type CacheLookupResult as ab, type CacheWarmingConfig as ac, type CastVoteParams as ad, type ChainCharacteristics as ae, type ChainFamily as af, type ChainFeeConfig as ag, type ClusterResult as ah, type CommitmentPoint as ai, type CompatibilityEntry as aj, ComplianceManager as ak, type ComplianceProofConfig as al, ComplianceProofProvider as am, type ComplianceProofResult as an, type ComplianceProofType as ao, ComplianceReporter as ap, type CompositionPlan as aq, type CompositionRequest as ar, type CompositionState as as, type CompositionTemplate as at, ConditionalDisclosure as au, type ConversionErrorCode as av, type ConversionMetadata as aw, type ConversionOptions as ax, type ValidationError as ay, type ValidationResult as az, type AdvisorMessage as b, type FullAnalysisResult as b$, DEFAULT_WARMING_CONFIG as b0, type DecryptedTransaction as b1, DerivationPath as b2, type DeriveMultipleParams as b3, type DeriveStealthSignerParams as b4, type DeriveViewingKeyParams as b5, type DerivedViewingKey as b6, type DetailedAggregationResult as b7, type DetailedVerificationResult as b8, type EIP1193ConnectInfo as b9, type ExchangeExposureResult as bA, type ExportForRegulatorParams as bB, type ExportedViewingKey as bC, type FATFExport as bD, type FATFTransaction as bE, type FINCENExport as bF, type FINCENTransaction as bG, type FeeBreakdown as bH, type FeeCalculationInput as bI, type FeeCalculationResult as bJ, FeeCalculator as bK, type FeeCalculatorOptions as bL, type FeeCollectionEvent as bM, type FeeCollectionParams as bN, type FeeCollectionResult as bO, type FeeContractMethods as bP, type FeeContractState as bQ, type FeeGovernanceProposal as bR, type FeeModel as bS, type FeeStats as bT, type FeeTier as bU, type TreasuryConfig as bV, type FeeWaiver as bW, type FeeWaiverType as bX, type FieldCharacteristics as bY, FileCache as bZ, type FindBestRouteParams as b_, type EIP1193Event as ba, type EIP1193Provider as bb, type EIP1193ProviderRpcError as bc, type EIP1193RequestArguments as bd, type EIP712Domain as be, type EIP712TypeDefinition as bf, type EIP712TypedData as bg, type EIP712Types as bh, type EllipticCurve as bi, type EncryptedNote as bj, type EncryptedVote as bk, EncryptionNotImplementedError as bl, type EnhancedAccountData as bm, type EnhancedTransaction as bn, type EnhancedTransactionEvents as bo, type EnhancedTransactionType as bp, ErrorCode as bq, type EthereumAdapterConfig as br, EthereumChainId as bs, type EthereumChainIdType as bt, type EthereumChainMetadata as bu, type EthereumTokenMetadata as bv, type EthereumTransactionReceipt as bw, type EthereumTransactionRequest as bx, EthereumWalletAdapter as by, type EthereumWalletName as bz, type AdvisorRecommendation as c, LedgerWalletAdapter as c$, type GaslessCashoutBuild as c0, type GaslessCashoutParams as c1, type GaslessCashoutResult as c2, type GenerateAuditReportParams as c3, GenericProvider as c4, type GenericProviderConfig as c5, type GetTransactionHistoryOptions as c6, type Halo2NativeProof as c7, Halo2ProofConverter as c8, type HardwareAccount as c9, type IVerificationKeyCache as cA, IndexedDBCache as cB, IntentBuilder as cC, IntentError as cD, InvalidProofError as cE, type InvalidationRule as cF, type InvalidationStrategy as cG, JITO_BLOCK_ENGINES as cH, JITO_DEFAULTS as cI, JITO_TIP_ACCOUNTS as cJ, type JitoBundleRequest as cK, type JitoBundleResult as cL, JitoRelayer as cM, type JitoRelayerConfig as cN, JitoRelayerError as cO, JitoRelayerErrorCode as cP, type Jurisdiction as cQ, KNOWN_EXCHANGES as cR, KNOWN_ISSUERS as cS, type KimchiNativeProof as cT, KimchiProofConverter as cU, type KnownExchange as cV, LRUCache as cW, type LRUCacheConfig as cX, type LatencyEstimate as cY, type LedgerConfig as cZ, type LedgerModel as c_, type HardwareConnectionStatus as ca, type HardwareDeviceInfo as cb, HardwareErrorCode as cc, type HardwareErrorCodeType as cd, type HardwareEthereumTx as ce, type HardwareSignRequest as cf, type HardwareSignature as cg, type HardwareTransport as ch, type HardwareWalletConfig as ci, HardwareWalletError as cj, type HardwareWalletType as ck, HeliusEnhanced as cl, type HeliusEnhancedConfig as cm, type HeliusEnhancedTransaction as cn, HeliusProvider as co, type HeliusProviderConfig as cp, type HeliusWebhookPayload as cq, type HeliusWebhookTransaction as cr, type HistoryCompletenessParams as cs, type ICacheKeyGenerator as ct, type ICompiledCircuitCache as cu, type ILRUCache as cv, type IMultiTierCache as cw, INITIAL_PROOF_CACHE_STATS as cx, type IPersistentCache as cy, type IProofCache as cz, type AdvisorResponse as d, MAX_COMMITMENT_VALUE as d$, type LinkValidationResult as d0, type LogLevel as d1, MAX_NEAR_AMOUNT as d2, MAX_PROOF_SIZE_BYTES as d3, MAX_PUBLIC_INPUTS as d4, MEMO_PROGRAM_ID as d5, type MerkleProof as d6, type MobileBrowser as d7, type MobileDeviceInfo as d8, type MobilePlatform as d9, type NEARFeeContractOptions as dA, type NEARHistoricalTransaction as dB, type NEARHistoryPrivacyLevel as dC, NEARIntentsAdapter as dD, type NEARIntentsAdapterConfig as dE, NEARIntentsBackend as dF, type NEARNetwork as dG, type NEARPedersenCommitment as dH, type NEARPrivateTransferParams as dI, type NEARPrivateTransferResult as dJ, type NEARScanParams as dK, type NEARScanResult as dL, type NEARStealthAddressResult as dM, type NEARStealthBalance as dN, type NEARStealthMetaAddressResult as dO, type NEARTransactionData as dP, type NEARTransactionHistoryParams as dQ, type NEARTransactionHistoryResult as dR, type NEARTransactionType as dS, type NEARViewingKey as dT, type NEARViewingKeyExport as dU, type NEARViewingKeyStorage as dV, DEFAULT_GAS as dW, ED25519_ORDER as dX, NEAR_EXPLORER_URLS as dY, NEAR_FEE_CONTRACTS as dZ, NEAR_IMPLICIT_ACCOUNT_LENGTH as d_, type MobileWASMCompatibility as da, MockEthereumAdapter as db, type MockEthereumAdapterConfig as dc, type MockHardwareConfig as dd, MockLedgerAdapter as de, MockObliviousSyncProvider as df, MockProofProvider as dg, MockSolanaAdapter as dh, type MockSolanaAdapterConfig as di, MockSolver as dj, type MockSolverConfig as dk, type MockSyncProviderConfig as dl, MockTrezorAdapter as dm, MockWalletAdapter as dn, MultiTierCache as dp, type MultiTierCacheConfig as dq, type NEARAnnouncement as dr, type NEARClaimParams as ds, type NEARClaimResult as dt, type NEARCommitmentPoint as du, type NEARDetectedPayment as dv, type NEAREncryptedPayload as dw, type NEARExportFormat as dx, type NEARExportOptions as dy, NEARFeeContract as dz, type AdvisorRole as e, SmartRouter as e$, NEAR_RPC_ENDPOINTS as e0, SIP_MEMO_PREFIX$1 as e1, NEAR_TOKEN_CONTRACTS as e2, NEAR_TOKEN_DECIMALS as e3, type NEP141TokenCommitment as e4, type NativeProofFormat as e5, type NativeTransfer as e6, NetworkError as e7, type NetworkPrivacyConfig as e8, type NftTransfer as e9, PROXY_ENV_VAR as eA, PROXY_ENV_VARS as eB, type ParallelAggregationOptions as eC, type ParseTransactionsOptions as eD, type ParsedProxyConfig as eE, PaymentBuilder as eF, type PdfExportOptions as eG, type PedersenCommitment as eH, type PersistentCacheConfig as eI, type PreparedSwap as eJ, type PriceFeed as eK, PrivacyAdvisorAgent as eL, type PrivacyAdvisorConfig as eM, type PrivacyAdvisoryReport as eN, type AvailabilityResult as eO, type PrivacyBackend as eP, type BackendCapabilities as eQ, PrivacyBackendRegistry as eR, type BackendSelectionResult as eS, type BackendType as eT, type PrivacyConfig as eU, type PrivacyDisplayOptions as eV, PrivacyLogger as eW, type PrivacyLoggerConfig as eX, type PrivacyRecommendation as eY, type PrivacyScore as eZ, type PrivacyScoreBreakdown as e_, type NoirCircuitType as ea, type NoirNativeProof as eb, NoirProofConverter as ec, ONE_NEAR as ed, ONE_YOCTO as ee, ORACLE_DOMAIN as ef, type ObliviousNullifier as eg, type ObliviousSyncConfig as eh, ObliviousSyncError as ei, ObliviousSyncErrorCode as ej, type ObliviousSyncProvider as ek, type ObliviousSyncQuery as el, type ObliviousSyncResponse as em, OneClickClient as en, type OracleAttestationMessage as eo, type OracleId as ep, type OracleInfo as eq, type OracleRegistry as er, type OracleRegistryConfig as es, type OracleSignature as et, type OracleStatus as eu, type OrchestratorConfig as ev, type OrchestratorProgressCallback as ew, type OrchestratorProgressEvent as ex, type OrchestratorResult as ey, PALLAS_MODULUS as ez, type AdvisorStatus as f, STABLECOIN_ADDRESSES as f$, type SmartRouterConfig as f0, type TransactionResult as f1, type TransferParams as f2, PrivateNFT as f3, PrivateVoting as f4, type ProductionConfigError as f5, type ProductionConfigValidationResult as f6, type ProductionConfigWarning as f7, type ProductionQuote as f8, ProductionSafetyError as f9, type RegulatoryFormat as fA, type RelayedTransactionRequest as fB, type RelayedTransactionResult as fC, type RelayerFeeConfig as fD, type RevealedVote as fE, type RiskLevel as fF, type Route as fG, type RouteWithQuote as fH, type RouterPriority as fI, SIP as fJ, type SIPConfig as fK, type SIPEnhancedTransaction as fL, SIPError as fM, type SIPLogLevel as fN, type SIPLoggerConfig as fO, SIPNativeBackend as fP, type SIPNativeBackendConfig as fQ, type SIPProtectionComparison as fR, type SIPTransactionMetadata as fS, SIP_MEMO_PREFIX as fT, SIP_MEMO_PREFIX_ANY as fU, SIP_MEMO_PREFIX_V2 as fV, SOLANA_EXPLORER_URLS as fW, SOLANA_RPC_ENDPOINTS$1 as fX, SOLANA_TOKEN_DECIMALS as fY, SOLANA_TOKEN_MINTS as fZ, SOLANA_ZK_PROGRAM_IDS as f_, ProofAggregator as fa, type AuditLogEntry as fb, type ProofCacheStats as fc, ProofConversionError as fd, type ProofConverter as fe, type ProofDependency as ff, ProofError as fg, ProofNotImplementedError as fh, ProofOrchestrator as fi, type ProofProgressCallback as fj, type ProofStatistics as fk, type ProofSystemToNativeMap as fl, type ProviderConfig as fm, type ProviderType as fn, type ProxiedFetch as fo, type ProxyAgentOptions as fp, type ProxyCheckResult as fq, type ProxyConfig as fr, type ProxyType as fs, type QuoteComparison as ft, type RangeAPIConfig as fu, type RangeSASAttestation as fv, type ReceivedNote as fw, type RecursiveAggregationOptions as fx, type RegisteredBackend as fy, type RegulatoryExport as fz, type AdvisoryContext as g, type SolanaWalletName as g$, STABLECOIN_DECIMALS as g0, STABLECOIN_INFO as g1, SUPPORTED_JURISDICTIONS as g2, SYSTEM_INFO as g3, type SameChainExecuteParams as g4, type SameChainExecuteResult as g5, type SameChainExecutor as g6, type SameChainTransferParams as g7, type SameChainTransferResult as g8, type SanctionsClearParams as g9, type SolanaClaimParams as gA, type SolanaClaimResult as gB, type SolanaCluster$1 as gC, type SolanaConnection as gD, SolanaNoirError as gE, SolanaNoirErrorCode as gF, SolanaNoirVerifier as gG, type SolanaNoirVerifierConfig as gH, type SolanaPrivateTransferParams as gI, type SolanaPrivateTransferResult as gJ, type SolanaPublicKey as gK, type SolanaRPCProvider as gL, type SolanaCluster as gM, type SolanaSameChainConfig as gN, SolanaSameChainExecutor as gO, type SolanaScanParams as gP, type SolanaScanResult as gQ, type SolanaSendOptions as gR, type SolanaSerializedProof as gS, type SolanaSignature as gT, type SolanaTransaction as gU, type SolanaUnsignedTransaction as gV, type SolanaVerificationKey as gW, type SolanaVerificationResult as gX, type SolanaVerifyInstruction as gY, type SolanaVersionedTransaction as gZ, SolanaWalletAdapter as g_, type SealedBid as ga, SealedBidAuction as gb, SecurityError as gc, type SensitiveData as gd, type SequentialAggregationOptions as ge, type SerializedError as gf, type SettlementBackend as gg, type SettlementBackendFactory as gh, type SettlementBackendName as gi, type SettlementBackendRegistry as gj, type Quote as gk, type QuoteParams as gl, SettlementRegistry as gm, SettlementRegistryError as gn, type SwapParams as go, type SwapResult as gp, type SwapRoute as gq, type SwapRouteStep as gr, type ShieldedBalance as gs, type ShieldedSendParams as gt, type ShieldedSendResult as gu, type SignedOracleAttestation as gv, SmartRouter$1 as gw, type SocialLinkResult as gx, type SolanaAdapterConfig as gy, type SolanaAnnouncement as gz, type AggregationProgressCallback as h, type VerificationProgressCallback as h$, type SolanaWalletProvider as h0, type StablecoinInfo as h1, type StealthCurve as h2, type StealthSigner as h3, type StreamCallback as h4, type SubmitGaslessCashoutParams as h5, type SuiStealthResult as h6, SuiStealthService as h7, SurveillanceAnalyzer as h8, type SurveillanceAnalyzerConfig as h9, type TokenAsset as hA, type TokenMetadata as hB, type TokenTransfer as hC, type ToolResult as hD, type ToolsConfig as hE, type TransactionData as hF, type TransactionSummary as hG, type TransportType as hH, Treasury as hI, type TrezorConfig as hJ, type TrezorModel as hK, TrezorWalletAdapter as hL, type UnifiedOptimizationProfile as hM, type UnifiedOptimizationResult as hN, UnifiedProofConverter as hO, type UnlockResult as hP, UnsupportedVersionError as hQ, type UnwrapParams as hR, type UnwrapResult as hS, VESTA_MODULUS as hT, type ValidationCheck as hU, ValidationError$1 as hV, type ValidationOptions as hW, type ValidationReport as hX, type VerificationOrder as hY, VerificationPipeline as hZ, type VerificationPipelineConfig as h_, type SwapEvent as ha, type SwapRequest as hb, type SwapResult$1 as hc, SwapStatus as hd, type SwapStatusResponse as he, type SyncCompletionEvent as hf, type SyncEventListener as hg, SyncManager as hh, type SyncManagerConfig as hi, type SyncOptions as hj, type SyncProgressEvent as hk, type SyncRandomness as hl, type SyncServiceHealth as hm, type SystemInfo as hn, type SystemVerificationStats as ho, TOR_CONTROL_PORT as hp, TOR_HOST as hq, TOR_PORTS as hr, type TapScript as hs, type TaprootOutput as ht, type TemporalPatternResult as hu, type ThresholdShares as hv, ThresholdViewingKey as hw, type TimeLockParams as hx, type TimeLockResult as hy, type TimeWindowedViewingKey as hz, type AggregationProgressEvent as i, checkSuiStealthAddress as i$, type VerificationProgressEvent as i0, type VerificationResult as i1, type VerifyBidParams as i2, type VerifyOptions as i3, type ViewingKeyAccessParams as i4, type ViewingKeyDerivationResult as i5, type ViewingKeyScope as i6, type WalletAdapter as i7, WalletError as i8, type WalletSyncState as i9, addBlindingsNEAR as iA, addCommitments as iB, addCommitmentsNEAR as iC, addOracle as iD, analyzeAddressReuse as iE, analyzeTemporalPatterns as iF, aptosAddressToAuthKey as iG, assertNoLocalhost as iH, attachProofs as iI, base58ToHex as iJ, bnbOptimizations as iK, bpsToPercent as iL, bytesToHex as iM, hexToBytes as iN, buildGaslessCashout as iO, cacheKeyGenerator as iP, calculateFeeForSwap as iQ, calculatePrivacyScore as iR, calculateSIPComparison as iS, checkAptosStealthAddress as iT, checkEd25519StealthAddress as iU, checkEd25519StealthAddressV1 as iV, checkMobileWASMCompatibility as iW, checkNEARStealthAddress as iX, checkProxyAvailability as iY, checkSecp256k1StealthAddressV1 as iZ, checkStealthAddress as i_, type WarmingResult as ia, type WebhookHandler as ib, type WebhookHandlerConfig as ic, type WebhookProcessResult as id, type WebhookRequest as ie, type WrapParams as ig, type WrapResult as ih, ZcashNativeBackend as ii, type ZcashNativeBackendConfig as ij, type ZcashQuote as ik, type ZcashQuoteParams as il, ZcashRPCClient as im, ZcashRPCError as io, type ZcashRpcConfig as ip, ZcashShieldedService as iq, type ZcashShieldedServiceConfig as ir, type ZcashSwapParams as is, type ZcashSwapResult as it, ZcashSwapService as iu, type ZcashSwapServiceConfig as iv, type ZcashSwapSourceChain as iw, type ZcashSwapSourceToken as ix, type ZcashSwapStatus as iy, addBlindings as iz, type AggregationStepResult as j, createProofAggregator as j$, claimStealthPayment as j0, commit as j1, commitNEAR as j2, commitNEP141Token as j3, commitZero as j4, compareCrossChainCosts as j5, computeAttestationHash as j6, computeNEARViewingKeyHash as j7, computeNEARViewingKeyHashFromPrivate as j8, computeRelayerFee as j9, createMockAttestation as jA, createMockEthereumAdapter as jB, createMockEthereumProvider as jC, createMockLedgerAdapter as jD, createMockSolanaAdapter as jE, createMockSolanaConnection as jF, createMockSolanaProvider as jG, createMockSolver as jH, createMockSyncProvider as jI, createMockTrezorAdapter as jJ, createMultiTierCache as jK, createAnnouncementMemo as jL, createNEARFeeContract as jM, createNEARIntentsAdapter as jN, createNEARIntentsBackend as jO, createNEARMemoryStorage as jP, createNetworkPrivacyClient as jQ, createNoirConverter as jR, createOracleRegistry as jS, createPersistentCache as jT, createPrivacyAdvisor as jU, createPrivacyAdvisorTools as jV, createPrivacyLogger as jW, createPrivateOwnership as jX, createPrivateVoting as jY, createProductionConfig as jZ, createProductionSIP as j_, computeTweakedKey as ja, configureLogger as jb, convertFromSIP as jc, convertToSIP as jd, createAnalyzeWalletTool as je, createAnnouncementMemo$1 as jf, createCacheKeyGenerator as jg, createCommitment as jh, createCrossSystemValidator as ji, createDevnetVerifier as jj, createEthereumAdapter as jk, createExplainTool as jl, createFeeCalculator as jm, createFileCache as jn, createHalo2Converter as jo, createHeliusEnhanced as jp, createIndexedDBCache as jq, createJitoRelayer as jr, createKeySpendOnlyOutput as js, createKimchiConverter as jt, createLRUCache as ju, createLedgerAdapter as jv, createLogger as jw, createMainnetFeeContract as jx, createMainnetRelayer as jy, createMainnetVerifier as jz, type AggregatorConfig as k, ed25519PublicKeyToSuiAddress as k$, createProofOrchestrator as k0, createProvider as k1, createProxiedFetch as k2, createProxyAgent as k3, createQuickScoreTool as k4, createSIP as k5, createSIPComparisonTool as k6, createSameChainExecutor as k7, createSealedBidAuction as k8, createShieldedIntent as k9, deriveEd25519StealthPrivateKeyV1 as kA, deriveNEARChildViewingKey as kB, deriveNEARStealthPrivateKey as kC, deriveObliviousNullifier as kD, deriveOracleId as kE, deriveSecp256k1StealthPrivateKeyV1 as kF, deriveStealthPrivateKey as kG, deriveStealthPrivateKeyV1 as kH, deriveStealthSigner as kI, deriveSuiStealthPrivateKey as kJ, deriveTraditionalNullifier as kK, deriveViewingKey as kL, deserializeAttestationMessage as kM, deserializeIntent as kN, deserializePayment as kO, detectChainFamily as kP, detectClusters as kQ, detectEthereumWallets as kR, detectExchangeExposure as kS, detectMobileBrowser as kT, detectMobilePlatform as kU, detectSolanaWallets as kV, detectTorPort as kW, ed25519PublicKeyToAptosAddress as kX, ed25519PublicKeyToImplicitAccount as kY, ed25519PublicKeyToNearAddress as kZ, ed25519PublicKeyToSolanaAddress as k_, createShieldedPayment as ka, createSmartRouter as kb, createSolanaAdapter as kc, createSurveillanceAnalyzer as kd, createSyncManager as ke, createSyncState as kf, createTaprootOutput as kg, createTestnetFeeContract as kh, createTimeWindowedKey as ki, createTrezorAdapter as kj, createUnifiedConverter as kk, createVerificationPipeline as kl, createWalletFactory as km, createWebhookHandler as kn, createZcashClient as ko, createZcashNativeBackend as kp, createZcashShieldedService as kq, createZcashSwapService as kr, decodeStealthMetaAddress as ks, decodeTaprootAddress as kt, decryptMemo as ku, decryptWithNEARViewing as kv, decryptWithViewing as kw, defaultRegistry as kx, deriveAptosStealthPrivateKey as ky, deriveEd25519StealthPrivateKey as kz, type AnalyzableTransaction as l, getPaymentTimeRemaining as l$, encodeNEARStealthMetaAddress as l0, encodeStealthMetaAddress as l1, encryptForNEARViewing as l2, encryptForViewing as l3, estimateComputeUnits as l4, estimateFee as l5, estimatePrivateTransferFee as l6, optimizations as l7, exportNEARViewingKey as l8, exportTransactions as l9, generateViewingKey as lA, getActiveOracles as lB, getAsset as lC, getAvailableTransports as lD, getBrowserInfo as lE, getBrowserVersion as lF, getChainCharacteristics as lG, getChainNumericId as lH, getChainsForStablecoin as lI, getCurrentEpoch as lJ, getCurveForChain as lK, getDefaultRpcEndpoint as lL, getDerivationPath as lM, getErrorMessage as lN, getEthereumProvider as lO, getGenerators as lP, getGeneratorsNEAR as lQ, getIntentSummary as lR, getLogLevelName as lS, getMobileDeviceInfo as lT, getAccountExplorerUrl as lU, getExplorerUrl$1 as lV, getTokenContract as lW, getNEARViewingPublicKey as lX, getNativeToken as lY, getOSVersion as lZ, getPaymentSummary as l_, featureNotSupportedError as la, fetchAttestation as lb, fetchWalletAttestations as lc, formatFee as ld, formatStablecoinAmount as le, fromHex as lf, fromStablecoinUnits as lg, fromYoctoNEAR as lh, generateAptosStealthAddress as li, generateBlinding as lj, generateBlindingNEAR as lk, generateCosmosStealthAddress as ll, generateCosmosStealthMetaAddress as lm, generateEd25519StealthAddress as ln, generateEd25519StealthMetaAddress as lo, generateIntentId as lp, generateNEARStealthAddress as lq, generateNEARStealthMetaAddress as lr, generateNEARViewingKeyFromSpending as ls, generatePdfReport as lt, generateRandomBytes as lu, generateRandomNEARViewingKey as lv, generateStealthAddress as lw, generateStealthMetaAddress as lx, generateSuiStealthAddress as ly, generateSyncRandomness as lz, type AnyNativeProof as m, isValidAccountId as m$, getPrivacyConfig as m0, getPrivacyDescription as m1, getProductionUrl as m2, getProxyFromEnv as m3, getExplorerUrl as m4, getSolanaProvider as m5, getSolanaTokenDecimals as m6, getStablecoin as m7, getStablecoinInfo as m8, getStablecoinsForChain as m9, isLevelEnabled as mA, isLocalhostAllowed as mB, isLocalhostUrl as mC, isNEARAnnouncementForViewingKey as mD, isNamedAccount as mE, isNoirCircuitType as mF, isNonNegativeAmount as mG, isNoteInWindow as mH, isPaymentExpired as mI, isPrivateWalletAdapter as mJ, isProductionEnvironment as mK, isSIPError as mL, isSameChainSupported as mM, isSecurityError as mN, isStablecoin as mO, isStablecoinOnChain as mP, isSyncRandomnessValid as mQ, isTablet as mR, isTorAvailable as mS, isValidAmount as mT, isValidAptosAddress as mU, isValidChainId as mV, isValidCompressedPublicKey as mW, isValidCosmosAddress as mX, isValidEd25519PublicKey as mY, isValidHex as mZ, isValidHexLength as m_, getStealthBalance as ma, getSupportedSameChainChains as mb, getSupportedStablecoins as mc, getTimeRemaining as md, getTokenByAddress as me, getTokenDecimals as mf, getTokenMint as mg, getTokensForChain as mh, getTransactionByHash as mi, getTransactionCount as mj, getTransactionHistory as mk, getTransactionSummary as ml, getXOnlyPublicKey as mm, hasEnoughOracles as mn, hasErrorCode as mo, hasRequiredProofs as mp, hasTokenAccount as mq, hash as mr, hexToNumber as ms, implicitAccountToEd25519PublicKey as mt, importNEARViewingKey as mu, isBrowser as mv, isEd25519Chain as mw, isExpired as mx, isImplicitAccount as my, isKnownToken as mz, type ApproveParams as n, supportsWASMSimd as n$, isValidNearAccountId as n0, isValidNearImplicitAddress as n1, isValidPrivacyLevel as n2, isValidPrivateKey as n3, isValidScalar as n4, isValidSlippage as n5, isValidSolanaAddress as n6, isValidSolanaProof as n7, isValidStealthMetaAddress as n8, isValidSuiAddress as n9, schnorrSign as nA, schnorrSignHex as nB, schnorrVerify as nC, schnorrVerifyHex as nD, secureWipe as nE, secureWipeAll as nF, selectOptimalConfig as nG, sendPrivateSPLTransfer as nH, serializeAttestationMessage as nI, serializeIntent as nJ, serializePayment as nK, setLogLevel as nL, signAttestationMessage as nM, signEd25519WithScalar as nN, silenceLogger as nO, solanaAddressToEd25519PublicKey as nP, optimizations$1 as nQ, solanaPublicKeyToHex as nR, stealthKeyToCosmosAddress as nS, submitGaslessCashout as nT, subtractBlindings as nU, subtractBlindingsNEAR as nV, subtractCommitments as nW, subtractCommitmentsNEAR as nX, supportsSharedArrayBuffer as nY, supportsTouch as nZ, supportsWASMBulkMemory as n_, isValidTaprootAddress as na, logger as nb, maskAmount as nc, nearAddressToEd25519PublicKey as nd, normalizeAddress as ne, normalizeSuiAddress as nf, notConnectedError as ng, parseAnnouncement$1 as nh, parseAnnouncement as ni, parseNEARStealthMetaAddress as nj, parseProxyConfig as nk, parseStealthAddress as nl, percentToBps as nm, privacyLogger as nn, processWebhookTransaction as no, proveOwnership as np, publicKeyToEthAddress as nq, recommendCheapestChain as nr, recommendProfile as ns, redactAddress as nt, redactSensitiveData as nu, redactSignature as nv, registerWallet as nw, removeOracle as nx, rotateCircuit as ny, scanForPayments as nz, type ApproveResult as o, supportsWebBluetooth as o0, supportsWebHID as o1, supportsWebUSB as o2, supportsWebWorkers as o3, taprootAddress as o4, toHex as o5, toStablecoinUnits as o6, toYoctoNEAR as o7, trackIntent as o8, trackPayment as o9, updateOracleStatus as oa, updateSyncState as ob, validateAsset as oc, validateCreateIntentParams as od, validateIntentInput as oe, validateIntentOutput as of, validateNEARStealthAddress as og, validateNEARStealthMetaAddress as oh, validateNEARViewingKey as oi, validateProductionConfig as oj, validateScalar as ok, validateViewingKey as ol, verifyAttestation as om, verifyAttestationSignature as on, verifyAuthToken as oo, verifyCommitment as op, verifyNEP141TokenCommitment as oq, verifyOpening as or, verifyOpeningNEAR as os, verifyOracleSignature as ot, verifyOwnership as ou, verifyWebhookSignature as ov, walletRegistry as ow, withSecureBuffer as ox, withSecureBufferSync as oy, wrapError as oz, type AptosStealthResult as p, AptosStealthService as q, type AttestationGatedConfig as r, AttestationGatedDisclosure as s, type AttestationRequest as t, type AttestationResult as u, AttestationSchema as v, type AttestationVerificationResult as w, type AuditReport as x, AuditorKeyDerivation as y, AuditorType as z };