@sip-protocol/sdk 0.11.1 → 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 +864 -545
  5. package/dist/browser.mjs +13 -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-DH5XRHYV.d.mts → index-B_fGN4Fk.d.mts} +796 -597
  16. package/dist/{index-mw7KGX5M.d.ts → index-rqQpCeVM.d.ts} +796 -597
  17. package/dist/index.d.mts +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +864 -545
  20. package/dist/index.mjs +13 -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 +14 -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.mjs';
@@ -15599,6 +15599,8 @@ interface SolanaScanResult {
15599
15599
  stealthAddress: string;
15600
15600
  /** Ephemeral public key from the sender (base58) */
15601
15601
  ephemeralPublicKey: string;
15602
+ /** Announcement scheme version ('1' legacy | '2' canonical) — pass to claim */
15603
+ version: '1' | '2';
15602
15604
  /** Amount received (in token's smallest unit) */
15603
15605
  amount: bigint;
15604
15606
  /** Token mint address */
@@ -17164,765 +17166,962 @@ declare function createNetworkPrivacyClient(config?: NetworkPrivacyConfig): Prom
17164
17166
  }>;
17165
17167
 
17166
17168
  /**
17167
- * Solana Noir Verifier Types
17169
+ * Relayer fee model for gasless cash-out.
17168
17170
  *
17169
- * 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
17170
17207
  *
17171
17208
  * ## Architecture
17172
17209
  *
17173
17210
  * ```
17174
- * ┌─────────────────────────────────────────────────────────────┐
17175
- * │ NOIR PROOF FLOW ON SOLANA
17176
- * │
17177
- * │ 1. Generate proof (BrowserNoirProvider / NoirProofProvider)
17178
- * │ 2. Serialize for Solana (SolanaNoirVerifier)
17179
- * │ 3. Submit to Solana program (verify instruction)
17180
- * │ 4. On-chain verification (ZK Token Proof / Custom)
17181
- * └─────────────────────────────────────────────────────────────┘
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
+ * └─────────────────────────────────────────────────────────────────────────────┘
17182
17223
  * ```
17183
17224
  *
17184
- * @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/
17185
17232
  */
17186
17233
 
17187
17234
  /**
17188
- * Supported Noir circuit types for Solana verification
17235
+ * Jito Block Engine endpoints
17236
+ * @see https://jito-foundation.gitbook.io/mev/searcher-resources/block-engine
17189
17237
  */
17190
- 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
+ };
17191
17246
  /**
17192
- * 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
17193
17249
  */
17194
- interface CircuitMetadata {
17195
- /** Circuit type identifier */
17196
- type: NoirCircuitType;
17197
- /** Number of public inputs */
17198
- publicInputCount: number;
17199
- /** Approximate constraint count */
17200
- constraintCount: number;
17201
- /** Circuit version hash */
17202
- versionHash: string;
17203
- }
17250
+ declare const JITO_TIP_ACCOUNTS: readonly ["96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", "HFqU5x63VTqvQss8hp11i4bVmkekGTo46ibhvdrPnSVX", "Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY", "ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49", "DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh", "ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt", "DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL", "3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"];
17204
17251
  /**
17205
- * Circuit metadata for all supported circuits
17252
+ * Default configuration values
17206
17253
  */
17207
- 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
+ };
17208
17266
  /**
17209
- * Verification key for Solana on-chain verification
17210
- *
17211
- * Contains the cryptographic parameters needed to verify proofs on-chain.
17267
+ * Jito relayer configuration
17212
17268
  */
17213
- interface SolanaVerificationKey {
17214
- /** Circuit type this key is for */
17215
- circuitType: NoirCircuitType;
17216
- /** Serialized verification key bytes */
17217
- keyBytes: Uint8Array;
17218
- /** Key hash for integrity check */
17219
- keyHash: string;
17220
- /** Number of public inputs expected */
17221
- publicInputCount: number;
17222
- /** Solana account address where key is stored (if deployed) */
17223
- 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;
17224
17282
  }
17225
17283
  /**
17226
- * Solana-serialized proof ready for on-chain verification
17284
+ * Bundle submission request
17227
17285
  */
17228
- interface SolanaSerializedProof {
17229
- /** Original proof type */
17230
- circuitType: NoirCircuitType;
17231
- /** Proof bytes in Solana-compatible format */
17232
- proofBytes: Uint8Array;
17233
- /** Public inputs as Field elements (32 bytes each) */
17234
- publicInputs: Uint8Array[];
17235
- /** Total serialized size in bytes */
17236
- 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;
17237
17295
  }
17238
17296
  /**
17239
- * Proof verification result from Solana
17297
+ * Bundle submission result
17240
17298
  */
17241
- interface SolanaVerificationResult {
17242
- /** Whether the proof is valid */
17243
- valid: boolean;
17244
- /** Transaction signature if submitted on-chain */
17245
- signature?: string;
17246
- /** 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) */
17247
17307
  slot?: number;
17248
- /** Compute units used */
17249
- computeUnits?: number;
17250
- /** Error message if verification failed */
17308
+ /** Error message if failed */
17251
17309
  error?: string;
17310
+ /** Actual tip paid in lamports */
17311
+ tipPaid: number;
17252
17312
  }
17253
17313
  /**
17254
- * Solana instruction for proof verification
17314
+ * Relayed transaction request
17255
17315
  */
17256
- interface SolanaVerifyInstruction {
17257
- /** Program ID to call */
17258
- programId: string;
17259
- /** Instruction data */
17260
- data: Uint8Array;
17261
- /** Account keys required */
17262
- 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;
17263
17325
  }
17264
17326
  /**
17265
- * Account metadata for Solana instruction
17327
+ * Relayed transaction result
17266
17328
  */
17267
- interface SolanaAccountMeta {
17268
- /** Account public key */
17269
- pubkey: string;
17270
- /** Is signer */
17271
- isSigner: boolean;
17272
- /** Is writable */
17273
- 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;
17274
17342
  }
17275
17343
  /**
17276
- * Network configuration for Solana
17277
- */
17278
- type SolanaNetwork = 'mainnet-beta' | 'devnet' | 'testnet' | 'localnet';
17279
- /**
17280
- * Solana Noir Verifier configuration
17344
+ * Jito relayer error codes
17281
17345
  */
17282
- interface SolanaNoirVerifierConfig {
17283
- /**
17284
- * Solana network to use
17285
- * @default 'devnet'
17286
- */
17287
- network?: SolanaNetwork;
17288
- /**
17289
- * Custom RPC endpoint URL
17290
- * If not provided, uses default for network
17291
- */
17292
- rpcUrl?: string;
17293
- /**
17294
- * Verification program ID
17295
- * Uses native ZK Token Proof program by default
17296
- */
17297
- programId?: string;
17298
- /**
17299
- * Enable verbose logging
17300
- * @default false
17301
- */
17302
- verbose?: boolean;
17303
- /**
17304
- * Commitment level for transactions
17305
- * @default 'confirmed'
17306
- */
17307
- commitment?: 'processed' | 'confirmed' | 'finalized';
17308
- /**
17309
- * Maximum compute units for verification
17310
- * @default 400000
17311
- */
17312
- 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"
17313
17354
  }
17314
17355
  /**
17315
- * Default RPC URLs for each network
17316
- * Localnet is configurable via SOLANA_LOCALNET_RPC environment variable
17356
+ * Jito relayer error
17317
17357
  */
17318
- 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
+ }
17319
17363
  /**
17320
- * Native Solana ZK proof program IDs
17364
+ * Jito Relayer for gas abstraction
17321
17365
  *
17322
- * Note: These are the native Solana programs for ZK proof verification.
17323
- * For custom Noir circuits, a dedicated verifier program would be needed.
17324
- */
17325
- declare const SOLANA_ZK_PROGRAM_IDS: {
17326
- /** ZK Token Proof Program (native) */
17327
- readonly ZK_TOKEN_PROOF: "ZkTokenProof1111111111111111111111111111111";
17328
- /** ZK ElGamal Proof Program (native) */
17329
- readonly ZK_ELGAMAL_PROOF: "ZkE1Gama1Proof11111111111111111111111111111";
17330
- /** Custom SIP Noir Verifier (TBD - to be deployed) */
17331
- readonly SIP_NOIR_VERIFIER: "SIPNoirVerifier1111111111111111111111111";
17332
- };
17333
- /**
17334
- * Error codes for Solana Noir verification
17335
- */
17336
- declare enum SolanaNoirErrorCode {
17337
- /** Invalid proof format */
17338
- INVALID_PROOF_FORMAT = "INVALID_PROOF_FORMAT",
17339
- /** Invalid public inputs */
17340
- INVALID_PUBLIC_INPUTS = "INVALID_PUBLIC_INPUTS",
17341
- /** Verification failed on-chain */
17342
- VERIFICATION_FAILED = "VERIFICATION_FAILED",
17343
- /** Network error */
17344
- NETWORK_ERROR = "NETWORK_ERROR",
17345
- /** Insufficient compute units */
17346
- INSUFFICIENT_COMPUTE = "INSUFFICIENT_COMPUTE",
17347
- /** Verification key not found */
17348
- VKEY_NOT_FOUND = "VKEY_NOT_FOUND",
17349
- /** Unsupported circuit type */
17350
- UNSUPPORTED_CIRCUIT = "UNSUPPORTED_CIRCUIT",
17351
- /** Transaction failed */
17352
- TRANSACTION_FAILED = "TRANSACTION_FAILED"
17353
- }
17354
- /**
17355
- * 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
+ * ```
17356
17386
  */
17357
- declare class SolanaNoirError extends Error {
17358
- readonly code: SolanaNoirErrorCode;
17359
- readonly details?: Record<string, unknown> | undefined;
17360
- 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;
17361
17458
  }
17362
17459
  /**
17363
- * Maximum proof size in bytes
17460
+ * Create a Jito relayer instance
17364
17461
  *
17365
- * UltraHonk proofs are typically ~2KB, but we allow up to 4KB for safety.
17462
+ * @param config - Relayer configuration
17463
+ * @returns Jito relayer instance
17366
17464
  */
17367
- declare const MAX_PROOF_SIZE_BYTES = 4096;
17465
+ declare function createJitoRelayer(config?: JitoRelayerConfig): JitoRelayer;
17368
17466
  /**
17369
- * Maximum number of public inputs
17370
- *
17371
- * Based on Solana transaction size limits and our circuit designs.
17467
+ * Create a mainnet Jito relayer with NY block engine
17372
17468
  */
17373
- declare const MAX_PUBLIC_INPUTS = 32;
17469
+ declare function createMainnetRelayer(rpcUrl?: string): JitoRelayer;
17470
+
17374
17471
  /**
17375
- * 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).
17376
17480
  */
17377
- interface ProofStatistics {
17378
- /** Circuit type */
17379
- circuitType: NoirCircuitType;
17380
- /** Proof size in bytes */
17381
- proofSize: number;
17382
- /** Public inputs size in bytes */
17383
- publicInputsSize: number;
17384
- /** Total serialized size */
17385
- totalSize: number;
17386
- /** Estimated compute units */
17387
- 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';
17388
17506
  }
17389
- /**
17390
- * Batch verification request
17391
- */
17392
- interface BatchVerificationRequest {
17393
- /** Proofs to verify */
17394
- proofs: ZKProof[];
17395
- /** Whether to fail fast on first invalid proof */
17396
- 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;
17397
17525
  }
17398
17526
  /**
17399
- * 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)
17400
17535
  */
17401
- interface BatchVerificationResult {
17402
- /** Overall success */
17403
- success: boolean;
17404
- /** Results for each proof */
17405
- results: SolanaVerificationResult[];
17406
- /** Total proofs verified */
17407
- totalVerified: number;
17408
- /** Number of valid proofs */
17409
- validCount: number;
17410
- /** Total compute units used */
17411
- 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;
17412
17564
  }
17413
17565
  /**
17414
- * Check if a string is a valid circuit type
17415
- */
17416
- declare function isNoirCircuitType(value: string): value is NoirCircuitType;
17417
- /**
17418
- * 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
17419
17573
  */
17420
- declare function isValidSolanaProof(proof: unknown): proof is ZKProof;
17574
+ declare function submitGaslessCashout(params: SubmitGaslessCashoutParams): Promise<GaslessCashoutResult>;
17575
+
17421
17576
  /**
17422
- * Estimate compute units for verification
17577
+ * Stealth address signing for Solana.
17423
17578
  *
17424
- * 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`.
17425
17585
  */
17426
- declare function estimateComputeUnits(circuitType: NoirCircuitType): number;
17427
17586
 
17428
17587
  /**
17429
- * Solana Noir Verifier
17588
+ * Produce an RFC 8032 Ed25519 signature from a raw little-endian scalar.
17430
17589
  *
17431
- * Verifies Noir ZK proofs on Solana blockchain.
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.
17432
17595
  *
17433
- * ## Overview
17434
- *
17435
- * This module enables verification of SIP Protocol's Noir proofs on Solana:
17436
- * - Funding Proofs: Prove sufficient balance without revealing amount
17437
- * - Validity Proofs: Prove intent authorization without revealing sender
17438
- * - Fulfillment Proofs: Prove correct execution without revealing path
17439
- *
17440
- * ## Usage
17441
- *
17442
- * ```typescript
17443
- * import { SolanaNoirVerifier } from '@sip-protocol/sdk'
17444
- * import { NoirProofProvider } from '@sip-protocol/sdk'
17445
- *
17446
- * // Generate proof
17447
- * const provider = new NoirProofProvider()
17448
- * await provider.initialize()
17449
- * 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.
17450
17626
  *
17451
- * // Verify on Solana
17452
- * const verifier = new SolanaNoirVerifier({ network: 'devnet' })
17453
- * 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.
17454
17632
  *
17455
- * // Off-chain verification (fast, no transaction)
17456
- * 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
17457
17639
  *
17458
- * // On-chain verification (submits transaction)
17459
- * const result = await verifier.verifyOnChain(proof, wallet)
17460
- * ```
17640
+ * Type definitions for verifying Noir ZK proofs on Solana.
17461
17641
  *
17462
17642
  * ## Architecture
17463
17643
  *
17464
17644
  * ```
17465
17645
  * ┌─────────────────────────────────────────────────────────────┐
17466
- * │ CLIENT SIDE
17467
- * │ ┌─────────────┐ ┌──────────────────┐
17468
- * │ Noir Proof │───►│ SolanaNoirVerifier
17469
- * │ Provider │ │ - serialize()
17470
- * │ └─────────────┘ │ - verifyOffChain()│
17471
- * │ - verifyOnChain()
17472
- * │ └────────┬─────────┘ │
17473
- * └──────────────────────────────┼─────────────────────────────┘
17474
- * │
17475
- * ▼
17476
- * ┌─────────────────────────────────────────────────────────────┐
17477
- * │ SOLANA BLOCKCHAIN │
17478
- * │ ┌──────────────────────────────────────────────────────┐ │
17479
- * │ │ ZK Proof Verification Program │ │
17480
- * │ │ - Deserialize proof │ │
17481
- * │ │ - Load verification key │ │
17482
- * │ │ - Execute pairing checks │ │
17483
- * │ │ - Return verification result │ │
17484
- * │ └──────────────────────────────────────────────────────┘ │
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)
17485
17652
  * └─────────────────────────────────────────────────────────────┘
17486
17653
  * ```
17487
17654
  *
17488
- * @module solana/noir-verifier
17655
+ * @module solana/noir-verifier-types
17489
17656
  */
17490
17657
 
17491
17658
  /**
17492
- * Solana Noir Verifier
17493
- *
17494
- * Enables verification of Noir ZK proofs on Solana blockchain.
17495
- *
17496
- * @example
17497
- * ```typescript
17498
- * const verifier = new SolanaNoirVerifier({
17499
- * network: 'devnet',
17500
- * verbose: true,
17501
- * })
17502
- *
17503
- * await verifier.initialize()
17504
- *
17505
- * // Verify proof off-chain (no transaction)
17506
- * 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
17507
17681
  *
17508
- * // Or verify on-chain (submits transaction)
17509
- * const result = await verifier.verifyOnChain(proof, wallet)
17510
- * ```
17682
+ * Contains the cryptographic parameters needed to verify proofs on-chain.
17511
17683
  */
17512
- declare class SolanaNoirVerifier {
17513
- private config;
17514
- private _isReady;
17515
- private verificationKeys;
17516
- private connection;
17517
- constructor(config?: SolanaNoirVerifierConfig);
17518
- /**
17519
- * Get the Solana connection
17520
- */
17521
- getConnection(): Connection;
17522
- /**
17523
- * Check if verifier is initialized
17524
- */
17525
- get isReady(): boolean;
17526
- /**
17527
- * Get current configuration
17528
- */
17529
- getConfig(): Readonly<SolanaNoirVerifierConfig>;
17530
- /**
17531
- * Get RPC URL being used
17532
- */
17533
- getRpcUrl(): string;
17534
- /**
17535
- * Initialize the verifier
17536
- *
17537
- * Loads verification keys for all circuit types.
17538
- */
17539
- initialize(): Promise<void>;
17540
- /**
17541
- * Generate verification key for a circuit type
17542
- *
17543
- * Creates the cryptographic verification key needed to verify proofs.
17544
- */
17545
- generateVerificationKey(circuitType: NoirCircuitType): Promise<SolanaVerificationKey>;
17546
- /**
17547
- * Serialize a proof for Solana
17548
- *
17549
- * Converts a Noir proof into a format suitable for Solana transaction.
17550
- */
17551
- serializeProof(proof: ZKProof): SolanaSerializedProof;
17552
- /**
17553
- * Verify a proof off-chain
17554
- *
17555
- * Fast verification without submitting a transaction.
17556
- * Uses the local Noir backend for verification if @aztec/bb.js is available,
17557
- * otherwise falls back to mock verification.
17558
- *
17559
- * @param proof - The proof to verify
17560
- * @returns true if valid, false otherwise
17561
- *
17562
- * @remarks
17563
- * For production use, install @aztec/bb.js as a dependency:
17564
- * ```bash
17565
- * npm install @aztec/bb.js
17566
- * ```
17567
- */
17568
- verifyOffChain(proof: ZKProof): Promise<boolean>;
17569
- /**
17570
- * Try to import @aztec/bb.js dynamically
17571
- * Returns null if not available (allows graceful fallback)
17572
- */
17573
- private tryImportBBJS;
17574
- /**
17575
- * Verify proof using the real Noir backend
17576
- */
17577
- private verifyWithBackend;
17578
- /**
17579
- * Mock verification for testing and development
17580
- *
17581
- * WARNING: This does NOT provide cryptographic security.
17582
- * Only used when @aztec/bb.js is not available.
17583
- */
17584
- private mockVerify;
17585
- /**
17586
- * Verify a proof on-chain
17587
- *
17588
- * Submits a transaction to Solana to verify the proof using the Sunspot verifier.
17589
- *
17590
- * @param proof - The proof to verify
17591
- * @param wallet - Wallet interface with signTransaction method
17592
- * @returns Verification result with transaction signature
17593
- */
17594
- verifyOnChain(proof: ZKProof, wallet: {
17595
- publicKey: {
17596
- toBase58(): string;
17597
- };
17598
- signTransaction: <T extends Transaction>(tx: T) => Promise<T>;
17599
- }): Promise<SolanaVerificationResult>;
17600
- /**
17601
- * Create a Sunspot verifier instruction
17602
- *
17603
- * Sunspot verifiers expect instruction data in format: proof_bytes || public_witness_bytes
17604
- */
17605
- 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 {
17606
17754
  /**
17607
- * Serialize proof for Sunspot verifier
17608
- *
17609
- * Sunspot expects: proof_bytes || public_witness_bytes
17610
- * where public_witness contains the number of public inputs followed by the values
17755
+ * Solana network to use
17756
+ * @default 'devnet'
17611
17757
  */
17612
- serializeProofForSunspot(proof: ZKProof): Buffer;
17758
+ network?: SolanaNetwork;
17613
17759
  /**
17614
- * Create a verify instruction for Solana
17615
- *
17616
- * Builds the instruction data and account metas needed for verification.
17760
+ * Custom RPC endpoint URL
17761
+ * If not provided, uses default for network
17617
17762
  */
17618
- createVerifyInstruction(proof: ZKProof): SolanaVerifyInstruction;
17763
+ rpcUrl?: string;
17619
17764
  /**
17620
- * Get proof statistics
17621
- *
17622
- * Returns size and compute unit estimates for a proof.
17765
+ * Verification program ID
17766
+ * Uses native ZK Token Proof program by default
17623
17767
  */
17624
- getProofStatistics(proof: ZKProof): ProofStatistics;
17768
+ programId?: string;
17625
17769
  /**
17626
- * Batch verify multiple proofs
17627
- *
17628
- * Verifies multiple proofs, optionally failing fast on first invalid.
17770
+ * Enable verbose logging
17771
+ * @default false
17629
17772
  */
17630
- batchVerify(request: BatchVerificationRequest): Promise<BatchVerificationResult>;
17773
+ verbose?: boolean;
17631
17774
  /**
17632
- * Get verification key for a circuit type
17775
+ * Commitment level for transactions
17776
+ * @default 'confirmed'
17633
17777
  */
17634
- getVerificationKey(circuitType: NoirCircuitType): SolanaVerificationKey | undefined;
17778
+ commitment?: 'processed' | 'confirmed' | 'finalized';
17635
17779
  /**
17636
- * Destroy the verifier and free resources
17780
+ * Maximum compute units for verification
17781
+ * @default 400000
17637
17782
  */
17638
- destroy(): Promise<void>;
17639
- private ensureReady;
17640
- private loadCircuitArtifact;
17641
- private generateVKeyBytes;
17642
- private hashBytes;
17643
- private hexToBytes;
17644
- private circuitTypeToId;
17783
+ maxComputeUnits?: number;
17645
17784
  }
17646
17785
  /**
17647
- * 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
17648
17788
  */
17649
- declare function createDevnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17789
+ declare const DEFAULT_RPC_URLS: Record<SolanaNetwork, string>;
17650
17790
  /**
17651
- * 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.
17652
17795
  */
17653
- declare function createMainnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17654
-
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
+ };
17655
17804
  /**
17656
- * Jito Relayer for SIP Protocol
17657
- *
17658
- * Enables gas abstraction for Solana shielded transactions using Jito's MEV infrastructure.
17659
- * The relayer submits transaction bundles on behalf of users, paying gas fees and breaking
17660
- * the direct link between the user's wallet and the privacy transaction.
17661
- *
17662
- * ## Why Jito?
17663
- *
17664
- * 1. **Native Solana**: Jito is battle-tested MEV infrastructure on Solana
17665
- * 2. **No Dedicated Server**: Uses Jito's network, no VPS maintenance needed
17666
- * 3. **Bundle Guarantees**: Atomic execution, no partial failures
17667
- * 4. **Lower Regulatory Risk**: Relayer only handles gas, not asset movement
17668
- *
17669
- * ## Architecture
17670
- *
17671
- * ```
17672
- * ┌─────────────────────────────────────────────────────────────────────────────┐
17673
- * │ GAS ABSTRACTION FLOW │
17674
- * │ │
17675
- * │ ┌─────────┐ ┌───────────────┐ ┌───────────┐ ┌──────────┐ │
17676
- * │ │ User │ ──▶ │ Sign TX │ ──▶ │ Jito │ ──▶ │ Solana │ │
17677
- * │ │ Wallet │ │ (no SOL fee) │ │ Relayer │ │ Network │ │
17678
- * │ └─────────┘ └───────────────┘ └───────────┘ └──────────┘ │
17679
- * │ │ │
17680
- * │ ▼ │
17681
- * │ Relayer pays │
17682
- * │ gas from tip │
17683
- * └─────────────────────────────────────────────────────────────────────────────┘
17684
- * ```
17685
- *
17686
- * ## Fee Model
17687
- *
17688
- * The relayer takes a small tip from the transaction (configurable, typically 0.1-0.5%)
17689
- * to cover gas costs and operational overhead.
17690
- *
17691
- * @see https://jito-foundation.gitbook.io/mev/
17692
- * @see https://jito-labs.github.io/jito-ts/
17805
+ * Error codes for Solana Noir verification
17693
17806
  */
17694
-
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
+ }
17695
17825
  /**
17696
- * Jito Block Engine endpoints
17697
- * @see https://jito-foundation.gitbook.io/mev/searcher-resources/block-engine
17826
+ * Solana Noir verification error
17698
17827
  */
17699
- declare const JITO_BLOCK_ENGINES: {
17700
- readonly mainnet: {
17701
- readonly amsterdam: "https://amsterdam.mainnet.block-engine.jito.wtf/api/v1";
17702
- readonly frankfurt: "https://frankfurt.mainnet.block-engine.jito.wtf/api/v1";
17703
- readonly ny: "https://ny.mainnet.block-engine.jito.wtf/api/v1";
17704
- readonly tokyo: "https://tokyo.mainnet.block-engine.jito.wtf/api/v1";
17705
- };
17706
- };
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
+ }
17707
17833
  /**
17708
- * Jito tip accounts (one must receive the tip)
17709
- * @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.
17710
17837
  */
17711
- declare const JITO_TIP_ACCOUNTS: readonly ["96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", "HFqU5x63VTqvQss8hp11i4bVmkekGTo46ibhvdrPnSVX", "Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY", "ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49", "DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh", "ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt", "DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL", "3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"];
17838
+ declare const MAX_PROOF_SIZE_BYTES = 4096;
17712
17839
  /**
17713
- * Default configuration values
17840
+ * Maximum number of public inputs
17841
+ *
17842
+ * Based on Solana transaction size limits and our circuit designs.
17714
17843
  */
17715
- declare const JITO_DEFAULTS: {
17716
- /** Default tip in lamports (0.001 SOL) */
17717
- readonly tipLamports: 1000000;
17718
- /** Maximum bundle size */
17719
- readonly maxBundleSize: 5;
17720
- /** Bundle submission timeout (ms) */
17721
- readonly submissionTimeout: 30000;
17722
- /** Confirmation timeout (ms) */
17723
- readonly confirmationTimeout: 60000;
17724
- /** Default retry attempts */
17725
- readonly maxRetries: 3;
17726
- };
17844
+ declare const MAX_PUBLIC_INPUTS = 32;
17727
17845
  /**
17728
- * Jito relayer configuration
17846
+ * Proof statistics for monitoring
17729
17847
  */
17730
- interface JitoRelayerConfig {
17731
- /** Jito block engine endpoint */
17732
- blockEngineUrl?: string;
17733
- /** Solana RPC URL */
17734
- rpcUrl?: string;
17735
- /** Default tip amount in lamports */
17736
- defaultTipLamports?: number;
17737
- /** Enable debug logging */
17738
- debug?: boolean;
17739
- /** Maximum retries for bundle submission */
17740
- maxRetries?: number;
17741
- /** Submission timeout in ms */
17742
- 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;
17743
17859
  }
17744
17860
  /**
17745
- * Bundle submission request
17861
+ * Batch verification request
17746
17862
  */
17747
- interface JitoBundleRequest {
17748
- /** Transactions to include in bundle */
17749
- transactions: (Transaction | VersionedTransaction)[];
17750
- /** Tip amount in lamports */
17751
- tipLamports?: number;
17752
- /** Tip payer keypair */
17753
- tipPayer: Keypair;
17754
- /** Whether to wait for confirmation */
17755
- waitForConfirmation?: boolean;
17863
+ interface BatchVerificationRequest {
17864
+ /** Proofs to verify */
17865
+ proofs: ZKProof[];
17866
+ /** Whether to fail fast on first invalid proof */
17867
+ failFast?: boolean;
17756
17868
  }
17757
17869
  /**
17758
- * Bundle submission result
17870
+ * Batch verification result
17759
17871
  */
17760
- interface JitoBundleResult {
17761
- /** Bundle UUID */
17762
- bundleId: string;
17763
- /** Transaction signatures in bundle */
17764
- signatures: string[];
17765
- /** Submission status */
17766
- status: 'submitted' | 'landed' | 'failed' | 'timeout';
17767
- /** Slot where bundle landed (if confirmed) */
17768
- slot?: number;
17769
- /** Error message if failed */
17770
- error?: string;
17771
- /** Actual tip paid in lamports */
17772
- 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;
17773
17883
  }
17774
17884
  /**
17775
- * Relayed transaction request
17885
+ * Check if a string is a valid circuit type
17776
17886
  */
17777
- interface RelayedTransactionRequest {
17778
- /** Signed transaction to relay */
17779
- transaction: Transaction | VersionedTransaction;
17780
- /** Tip amount in lamports (paid by relayer, recovered from user) */
17781
- tipLamports?: number;
17782
- /** Whether to wait for confirmation */
17783
- waitForConfirmation?: boolean;
17784
- }
17887
+ declare function isNoirCircuitType(value: string): value is NoirCircuitType;
17785
17888
  /**
17786
- * Relayed transaction result
17889
+ * Check if a proof has the expected structure for Solana verification
17787
17890
  */
17788
- interface RelayedTransactionResult {
17789
- /** Transaction signature */
17790
- signature: string;
17791
- /** Bundle ID if submitted via Jito */
17792
- bundleId?: string;
17793
- /** Submission status */
17794
- status: 'submitted' | 'confirmed' | 'failed';
17795
- /** Slot where transaction landed */
17796
- slot?: number;
17797
- /** Error message if failed */
17798
- error?: string;
17799
- /** Whether relayer was used or fell back to direct submission */
17800
- relayed: boolean;
17801
- }
17891
+ declare function isValidSolanaProof(proof: unknown): proof is ZKProof;
17802
17892
  /**
17803
- * Jito relayer error codes
17893
+ * Estimate compute units for verification
17894
+ *
17895
+ * Based on circuit complexity and proof size
17804
17896
  */
17805
- declare enum JitoRelayerErrorCode {
17806
- BUNDLE_SUBMISSION_FAILED = "BUNDLE_SUBMISSION_FAILED",
17807
- BUNDLE_TIMEOUT = "BUNDLE_TIMEOUT",
17808
- BUNDLE_INVALID = "BUNDLE_INVALID",
17809
- INSUFFICIENT_TIP = "INSUFFICIENT_TIP",
17810
- CONNECTION_ERROR = "CONNECTION_ERROR",
17811
- RATE_LIMITED = "RATE_LIMITED",
17812
- INVALID_TRANSACTION = "INVALID_TRANSACTION"
17813
- }
17897
+ declare function estimateComputeUnits(circuitType: NoirCircuitType): number;
17898
+
17814
17899
  /**
17815
- * 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
17816
17960
  */
17817
- declare class JitoRelayerError extends Error {
17818
- readonly code: JitoRelayerErrorCode;
17819
- readonly details?: unknown | undefined;
17820
- constructor(code: JitoRelayerErrorCode, message: string, details?: unknown | undefined);
17821
- }
17961
+
17822
17962
  /**
17823
- * Jito Relayer for gas abstraction
17963
+ * Solana Noir Verifier
17824
17964
  *
17825
- * Submits Solana transactions via Jito's MEV infrastructure,
17826
- * enabling gas abstraction for privacy transactions.
17965
+ * Enables verification of Noir ZK proofs on Solana blockchain.
17827
17966
  *
17828
17967
  * @example
17829
17968
  * ```typescript
17830
- * import { JitoRelayer } from '@sip-protocol/sdk'
17831
- *
17832
- * const relayer = new JitoRelayer({
17833
- * blockEngineUrl: 'https://ny.mainnet.block-engine.jito.wtf/api/v1',
17969
+ * const verifier = new SolanaNoirVerifier({
17970
+ * network: 'devnet',
17971
+ * verbose: true,
17834
17972
  * })
17835
17973
  *
17836
- * // Submit a signed transaction via relayer
17837
- * const result = await relayer.relayTransaction({
17838
- * transaction: signedTx,
17839
- * tipLamports: 10_000, // 0.00001 SOL tip
17840
- * })
17974
+ * await verifier.initialize()
17841
17975
  *
17842
- * 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)
17843
17981
  * ```
17844
17982
  */
17845
- declare class JitoRelayer {
17846
- private readonly connection;
17847
- private readonly blockEngineUrl;
17848
- private readonly defaultTipLamports;
17849
- private readonly debug;
17850
- private readonly maxRetries;
17851
- private readonly submissionTimeout;
17852
- constructor(config?: JitoRelayerConfig);
17983
+ declare class SolanaNoirVerifier {
17984
+ private config;
17985
+ private _isReady;
17986
+ private verificationKeys;
17987
+ private connection;
17988
+ constructor(config?: SolanaNoirVerifierConfig);
17853
17989
  /**
17854
- * 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
17855
18007
  *
17856
- * @param request - Bundle request with transactions and tip
17857
- * @returns Bundle submission result
18008
+ * Loads verification keys for all circuit types.
17858
18009
  */
17859
- submitBundle(request: JitoBundleRequest): Promise<JitoBundleResult>;
18010
+ initialize(): Promise<void>;
17860
18011
  /**
17861
- * Relay a single transaction via Jito
18012
+ * Generate verification key for a circuit type
17862
18013
  *
17863
- * This is the main method for gas abstraction - submit a transaction
17864
- * 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
17865
18019
  *
17866
- * @param request - Transaction to relay
17867
- * @returns Relay result
18020
+ * Converts a Noir proof into a format suitable for Solana transaction.
17868
18021
  */
17869
- relayTransaction(request: RelayedTransactionRequest): Promise<RelayedTransactionResult>;
18022
+ serializeProof(proof: ZKProof): SolanaSerializedProof;
17870
18023
  /**
17871
- * 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
+ * ```
17872
18038
  */
17873
- isAvailable(): Promise<boolean>;
18039
+ verifyOffChain(proof: ZKProof): Promise<boolean>;
17874
18040
  /**
17875
- * 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)
17876
18043
  */
17877
- getTipFloor(): Promise<number>;
18044
+ private tryImportBBJS;
17878
18045
  /**
17879
- * Get a random tip account
18046
+ * Verify proof using the real Noir backend
17880
18047
  */
17881
- getRandomTipAccount(): PublicKey;
18048
+ private verifyWithBackend;
17882
18049
  /**
17883
- * 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.
17884
18054
  */
17885
- private createTipInstruction;
18055
+ private mockVerify;
17886
18056
  /**
17887
- * 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
17888
18064
  */
17889
- 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>;
17890
18071
  /**
17891
- * 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
17892
18075
  */
17893
- private sendBundle;
18076
+ createSunspotVerifyInstruction(proof: ZKProof, programId: string): TransactionInstruction;
17894
18077
  /**
17895
- * 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
17896
18082
  */
17897
- private waitForBundleConfirmation;
18083
+ serializeProofForSunspot(proof: ZKProof): Buffer;
17898
18084
  /**
17899
- * Get bundle status from Jito
18085
+ * Create a verify instruction for Solana
18086
+ *
18087
+ * Builds the instruction data and account metas needed for verification.
17900
18088
  */
17901
- private getBundleStatus;
18089
+ createVerifyInstruction(proof: ZKProof): SolanaVerifyInstruction;
17902
18090
  /**
17903
- * Direct submission fallback
18091
+ * Get proof statistics
18092
+ *
18093
+ * Returns size and compute unit estimates for a proof.
17904
18094
  */
17905
- private directSubmit;
18095
+ getProofStatistics(proof: ZKProof): ProofStatistics;
17906
18096
  /**
17907
- * Log debug message
18097
+ * Batch verify multiple proofs
18098
+ *
18099
+ * Verifies multiple proofs, optionally failing fast on first invalid.
17908
18100
  */
17909
- private log;
18101
+ batchVerify(request: BatchVerificationRequest): Promise<BatchVerificationResult>;
17910
18102
  /**
17911
- * Sleep utility
18103
+ * Get verification key for a circuit type
17912
18104
  */
17913
- 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;
17914
18116
  }
17915
18117
  /**
17916
- * Create a Jito relayer instance
17917
- *
17918
- * @param config - Relayer configuration
17919
- * @returns Jito relayer instance
18118
+ * Create a Solana Noir Verifier with default devnet configuration
17920
18119
  */
17921
- declare function createJitoRelayer(config?: JitoRelayerConfig): JitoRelayer;
18120
+ declare function createDevnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17922
18121
  /**
17923
- * Create a mainnet Jito relayer with NY block engine
18122
+ * Create a Solana Noir Verifier with mainnet configuration
17924
18123
  */
17925
- declare function createMainnetRelayer(rpcUrl?: string): JitoRelayer;
18124
+ declare function createMainnetVerifier(config?: Omit<SolanaNoirVerifierConfig, 'network'>): SolanaNoirVerifier;
17926
18125
 
17927
18126
  /**
17928
18127
  * NEAR Same-Chain Privacy Types
@@ -24779,4 +24978,4 @@ declare function calculateFeeForSwap(contract: NEARFeeContract, swapAmount: bigi
24779
24978
  netAmountUsd: number;
24780
24979
  }>;
24781
24980
 
24782
- 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 SameChainExecuteParams 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, SIP_MEMO_PREFIX_ANY as fP, SIP_MEMO_PREFIX_V2 as fQ, SOLANA_EXPLORER_URLS as fR, SOLANA_RPC_ENDPOINTS$1 as fS, SOLANA_TOKEN_DECIMALS as fT, SOLANA_TOKEN_MINTS as fU, SOLANA_ZK_PROGRAM_IDS as fV, STABLECOIN_ADDRESSES as fW, STABLECOIN_DECIMALS as fX, STABLECOIN_INFO as fY, SUPPORTED_JURISDICTIONS as fZ, SYSTEM_INFO 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, type SuiStealthResult as g$, type SameChainExecuteResult as g0, type SameChainExecutor as g1, type SameChainTransferParams as g2, type SameChainTransferResult as g3, type SanctionsClearParams as g4, type SealedBid as g5, SealedBidAuction as g6, SecurityError as g7, type SensitiveData as g8, type SequentialAggregationOptions as g9, SolanaNoirErrorCode as gA, SolanaNoirVerifier as gB, type SolanaNoirVerifierConfig as gC, type SolanaPrivateTransferParams as gD, type SolanaPrivateTransferResult as gE, type SolanaPublicKey as gF, type SolanaRPCProvider as gG, type SolanaCluster as gH, type SolanaSameChainConfig as gI, SolanaSameChainExecutor as gJ, type SolanaScanParams as gK, type SolanaScanResult as gL, type SolanaSendOptions as gM, type SolanaSerializedProof as gN, type SolanaSignature as gO, type SolanaTransaction as gP, type SolanaUnsignedTransaction as gQ, type SolanaVerificationKey as gR, type SolanaVerificationResult as gS, type SolanaVerifyInstruction as gT, type SolanaVersionedTransaction as gU, SolanaWalletAdapter as gV, type SolanaWalletName as gW, type SolanaWalletProvider as gX, type StablecoinInfo as gY, type StealthCurve as gZ, type StreamCallback as g_, type SerializedError as ga, type SettlementBackend as gb, type SettlementBackendFactory as gc, type SettlementBackendName as gd, type SettlementBackendRegistry as ge, type Quote as gf, type QuoteParams as gg, SettlementRegistry as gh, SettlementRegistryError as gi, type SwapParams as gj, type SwapResult as gk, type SwapRoute as gl, type SwapRouteStep as gm, type ShieldedBalance as gn, type ShieldedSendParams as go, type ShieldedSendResult as gp, type SignedOracleAttestation as gq, SmartRouter$1 as gr, type SocialLinkResult as gs, type SolanaAdapterConfig as gt, type SolanaAnnouncement as gu, type SolanaClaimParams as gv, type SolanaClaimResult as gw, type SolanaCluster$1 as gx, type SolanaConnection as gy, SolanaNoirError as gz, type AggregationProgressCallback as h, type ViewingKeyScope as h$, SuiStealthService as h0, SurveillanceAnalyzer as h1, type SurveillanceAnalyzerConfig as h2, type SwapEvent as h3, type SwapRequest as h4, type SwapResult$1 as h5, SwapStatus as h6, type SwapStatusResponse as h7, type SyncCompletionEvent as h8, type SyncEventListener as h9, type TransportType as hA, Treasury as hB, type TrezorConfig as hC, type TrezorModel as hD, TrezorWalletAdapter as hE, type UnifiedOptimizationProfile as hF, type UnifiedOptimizationResult as hG, UnifiedProofConverter as hH, type UnlockResult as hI, UnsupportedVersionError as hJ, type UnwrapParams as hK, type UnwrapResult as hL, VESTA_MODULUS as hM, type ValidationCheck as hN, ValidationError$1 as hO, type ValidationOptions as hP, type ValidationReport as hQ, type VerificationOrder as hR, VerificationPipeline as hS, type VerificationPipelineConfig as hT, type VerificationProgressCallback as hU, type VerificationProgressEvent as hV, type VerificationResult as hW, type VerifyBidParams as hX, type VerifyOptions as hY, type ViewingKeyAccessParams as hZ, type ViewingKeyDerivationResult as h_, SyncManager as ha, type SyncManagerConfig as hb, type SyncOptions as hc, type SyncProgressEvent as hd, type SyncRandomness as he, type SyncServiceHealth as hf, type SystemInfo as hg, type SystemVerificationStats as hh, TOR_CONTROL_PORT as hi, TOR_HOST as hj, TOR_PORTS as hk, type TapScript as hl, type TaprootOutput as hm, type TemporalPatternResult as hn, type ThresholdShares as ho, ThresholdViewingKey as hp, type TimeLockParams as hq, type TimeLockResult as hr, type TimeWindowedViewingKey as hs, type TokenAsset as ht, type TokenMetadata as hu, type TokenTransfer as hv, type ToolResult as hw, type ToolsConfig as hx, type TransactionData as hy, type TransactionSummary as hz, type AggregationProgressEvent as i, computeNEARViewingKeyHash as i$, type WalletAdapter as i0, WalletError as i1, type WalletSyncState as i2, type WarmingResult as i3, type WebhookHandler as i4, type WebhookHandlerConfig as i5, type WebhookProcessResult as i6, type WebhookRequest as i7, type WrapParams as i8, type WrapResult as i9, assertNoLocalhost as iA, attachProofs as iB, base58ToHex as iC, bnbOptimizations as iD, bpsToPercent as iE, bytesToHex as iF, hexToBytes as iG, cacheKeyGenerator as iH, calculateFeeForSwap as iI, calculatePrivacyScore as iJ, calculateSIPComparison as iK, checkAptosStealthAddress as iL, checkEd25519StealthAddress as iM, checkEd25519StealthAddressV1 as iN, checkMobileWASMCompatibility as iO, checkNEARStealthAddress as iP, checkProxyAvailability as iQ, checkSecp256k1StealthAddressV1 as iR, checkStealthAddress as iS, checkSuiStealthAddress as iT, claimStealthPayment as iU, commit as iV, commitNEAR as iW, commitNEP141Token as iX, commitZero as iY, compareCrossChainCosts as iZ, computeAttestationHash as i_, ZcashNativeBackend as ia, type ZcashNativeBackendConfig as ib, type ZcashQuote as ic, type ZcashQuoteParams as id, ZcashRPCClient as ie, ZcashRPCError as ig, type ZcashRpcConfig as ih, ZcashShieldedService as ii, type ZcashShieldedServiceConfig as ij, type ZcashSwapParams as ik, type ZcashSwapResult as il, ZcashSwapService as im, type ZcashSwapServiceConfig as io, type ZcashSwapSourceChain as ip, type ZcashSwapSourceToken as iq, type ZcashSwapStatus as ir, addBlindings as is, addBlindingsNEAR as it, addCommitments as iu, addCommitmentsNEAR as iv, addOracle as iw, analyzeAddressReuse as ix, analyzeTemporalPatterns as iy, aptosAddressToAuthKey as iz, type AggregationStepResult as j, createSealedBidAuction as j$, computeNEARViewingKeyHashFromPrivate as j0, computeTweakedKey as j1, configureLogger as j2, convertFromSIP as j3, convertToSIP as j4, createAnalyzeWalletTool as j5, createAnnouncementMemo$1 as j6, createCacheKeyGenerator as j7, createCommitment as j8, createCrossSystemValidator as j9, createMockTrezorAdapter as jA, createMultiTierCache as jB, createAnnouncementMemo as jC, createNEARFeeContract as jD, createNEARIntentsAdapter as jE, createNEARIntentsBackend as jF, createNEARMemoryStorage as jG, createNetworkPrivacyClient as jH, createNoirConverter as jI, createOracleRegistry as jJ, createPersistentCache as jK, createPrivacyAdvisor as jL, createPrivacyAdvisorTools as jM, createPrivacyLogger as jN, createPrivateOwnership as jO, createPrivateVoting as jP, createProductionConfig as jQ, createProductionSIP as jR, createProofAggregator as jS, createProofOrchestrator as jT, createProvider as jU, createProxiedFetch as jV, createProxyAgent as jW, createQuickScoreTool as jX, createSIP as jY, createSIPComparisonTool as jZ, createSameChainExecutor as j_, createDevnetVerifier as ja, createEthereumAdapter as jb, createExplainTool as jc, createFeeCalculator as jd, createFileCache as je, createHalo2Converter as jf, createHeliusEnhanced as jg, createIndexedDBCache as jh, createJitoRelayer as ji, createKeySpendOnlyOutput as jj, createKimchiConverter as jk, createLRUCache as jl, createLedgerAdapter as jm, createLogger as jn, createMainnetFeeContract as jo, createMainnetRelayer as jp, createMainnetVerifier as jq, createMockAttestation as jr, createMockEthereumAdapter as js, createMockEthereumProvider as jt, createMockLedgerAdapter as ju, createMockSolanaAdapter as jv, createMockSolanaConnection as jw, createMockSolanaProvider as jx, createMockSolver as jy, createMockSyncProvider as jz, type AggregatorConfig as k, exportTransactions as k$, createShieldedIntent as k0, createShieldedPayment as k1, createSmartRouter as k2, createSolanaAdapter as k3, createSurveillanceAnalyzer as k4, createSyncManager as k5, createSyncState as k6, createTaprootOutput as k7, createTestnetFeeContract as k8, createTimeWindowedKey as k9, deriveTraditionalNullifier as kA, deriveViewingKey as kB, deserializeAttestationMessage as kC, deserializeIntent as kD, deserializePayment as kE, detectChainFamily as kF, detectClusters as kG, detectEthereumWallets as kH, detectExchangeExposure as kI, detectMobileBrowser as kJ, detectMobilePlatform as kK, detectSolanaWallets as kL, detectTorPort as kM, ed25519PublicKeyToAptosAddress as kN, ed25519PublicKeyToImplicitAccount as kO, ed25519PublicKeyToNearAddress as kP, ed25519PublicKeyToSolanaAddress as kQ, ed25519PublicKeyToSuiAddress as kR, encodeNEARStealthMetaAddress as kS, encodeStealthMetaAddress as kT, encryptForNEARViewing as kU, encryptForViewing as kV, estimateComputeUnits as kW, estimateFee as kX, estimatePrivateTransferFee as kY, optimizations as kZ, exportNEARViewingKey as k_, createTrezorAdapter as ka, createUnifiedConverter as kb, createVerificationPipeline as kc, createWalletFactory as kd, createWebhookHandler as ke, createZcashClient as kf, createZcashNativeBackend as kg, createZcashShieldedService as kh, createZcashSwapService as ki, decodeStealthMetaAddress as kj, decodeTaprootAddress as kk, decryptMemo as kl, decryptWithNEARViewing as km, decryptWithViewing as kn, defaultRegistry as ko, deriveAptosStealthPrivateKey as kp, deriveEd25519StealthPrivateKey as kq, deriveEd25519StealthPrivateKeyV1 as kr, deriveNEARChildViewingKey as ks, deriveNEARStealthPrivateKey as kt, deriveObliviousNullifier as ku, deriveOracleId as kv, deriveSecp256k1StealthPrivateKeyV1 as kw, deriveStealthPrivateKey as kx, deriveStealthPrivateKeyV1 as ky, deriveSuiStealthPrivateKey as kz, type AnalyzableTransaction as l, getStablecoinsForChain as l$, featureNotSupportedError as l0, fetchAttestation as l1, fetchWalletAttestations as l2, formatFee as l3, formatStablecoinAmount as l4, fromHex as l5, fromStablecoinUnits as l6, fromYoctoNEAR as l7, generateAptosStealthAddress as l8, generateBlinding as l9, getCurveForChain as lA, getDefaultRpcEndpoint as lB, getDerivationPath as lC, getErrorMessage as lD, getEthereumProvider as lE, getGenerators as lF, getGeneratorsNEAR as lG, getIntentSummary as lH, getLogLevelName as lI, getMobileDeviceInfo as lJ, getAccountExplorerUrl as lK, getExplorerUrl$1 as lL, getTokenContract as lM, getNEARViewingPublicKey as lN, getNativeToken as lO, getOSVersion as lP, getPaymentSummary as lQ, getPaymentTimeRemaining as lR, getPrivacyConfig as lS, getPrivacyDescription as lT, getProductionUrl as lU, getProxyFromEnv as lV, getExplorerUrl as lW, getSolanaProvider as lX, getSolanaTokenDecimals as lY, getStablecoin as lZ, getStablecoinInfo as l_, generateBlindingNEAR as la, generateCosmosStealthAddress as lb, generateCosmosStealthMetaAddress as lc, generateEd25519StealthAddress as ld, generateEd25519StealthMetaAddress as le, generateIntentId as lf, generateNEARStealthAddress as lg, generateNEARStealthMetaAddress as lh, generateNEARViewingKeyFromSpending as li, generatePdfReport as lj, generateRandomBytes as lk, generateRandomNEARViewingKey as ll, generateStealthAddress as lm, generateStealthMetaAddress as ln, generateSuiStealthAddress as lo, generateSyncRandomness as lp, generateViewingKey as lq, getActiveOracles as lr, getAsset as ls, getAvailableTransports as lt, getBrowserInfo as lu, getBrowserVersion as lv, getChainCharacteristics as lw, getChainNumericId as lx, getChainsForStablecoin as ly, getCurrentEpoch as lz, type AnyNativeProof as m, isValidSuiAddress as m$, getStealthBalance as m0, getSupportedSameChainChains as m1, getSupportedStablecoins as m2, getTimeRemaining as m3, getTokenByAddress as m4, getTokenDecimals as m5, getTokenMint as m6, getTokensForChain as m7, getTransactionByHash as m8, getTransactionCount as m9, isProductionEnvironment as mA, isSIPError as mB, isSameChainSupported as mC, isSecurityError as mD, isStablecoin as mE, isStablecoinOnChain as mF, isSyncRandomnessValid as mG, isTablet as mH, isTorAvailable as mI, isValidAmount as mJ, isValidAptosAddress as mK, isValidChainId as mL, isValidCompressedPublicKey as mM, isValidCosmosAddress as mN, isValidEd25519PublicKey as mO, isValidHex as mP, isValidHexLength as mQ, isValidAccountId as mR, isValidNearAccountId as mS, isValidNearImplicitAddress as mT, isValidPrivacyLevel as mU, isValidPrivateKey as mV, isValidScalar as mW, isValidSlippage as mX, isValidSolanaAddress as mY, isValidSolanaProof as mZ, isValidStealthMetaAddress as m_, getTransactionHistory as ma, getTransactionSummary as mb, getXOnlyPublicKey as mc, hasEnoughOracles as md, hasErrorCode as me, hasRequiredProofs as mf, hasTokenAccount as mg, hash as mh, hexToNumber as mi, implicitAccountToEd25519PublicKey as mj, importNEARViewingKey as mk, isBrowser as ml, isEd25519Chain as mm, isExpired as mn, isImplicitAccount as mo, isKnownToken as mp, isLevelEnabled as mq, isLocalhostAllowed as mr, isLocalhostUrl as ms, isNEARAnnouncementForViewingKey as mt, isNamedAccount as mu, isNoirCircuitType as mv, isNonNegativeAmount as mw, isNoteInWindow as mx, isPaymentExpired as my, isPrivateWalletAdapter as mz, type ApproveParams as n, updateSyncState as n$, isValidTaprootAddress as n0, logger as n1, maskAmount as n2, nearAddressToEd25519PublicKey as n3, normalizeAddress as n4, normalizeSuiAddress as n5, notConnectedError as n6, parseAnnouncement$1 as n7, parseAnnouncement as n8, parseNEARStealthMetaAddress as n9, serializePayment as nA, setLogLevel as nB, signAttestationMessage as nC, silenceLogger as nD, solanaAddressToEd25519PublicKey as nE, optimizations$1 as nF, solanaPublicKeyToHex as nG, stealthKeyToCosmosAddress as nH, subtractBlindings as nI, subtractBlindingsNEAR as nJ, subtractCommitments as nK, subtractCommitmentsNEAR as nL, supportsSharedArrayBuffer as nM, supportsTouch as nN, supportsWASMBulkMemory as nO, supportsWASMSimd as nP, supportsWebBluetooth as nQ, supportsWebHID as nR, supportsWebUSB as nS, supportsWebWorkers as nT, taprootAddress as nU, toHex as nV, toStablecoinUnits as nW, toYoctoNEAR as nX, trackIntent as nY, trackPayment as nZ, updateOracleStatus as n_, parseProxyConfig as na, parseStealthAddress as nb, percentToBps as nc, privacyLogger as nd, processWebhookTransaction as ne, proveOwnership as nf, publicKeyToEthAddress as ng, recommendCheapestChain as nh, recommendProfile as ni, redactAddress as nj, redactSensitiveData as nk, redactSignature as nl, registerWallet as nm, removeOracle as nn, rotateCircuit as no, scanForPayments as np, schnorrSign as nq, schnorrSignHex as nr, schnorrVerify as ns, schnorrVerifyHex as nt, secureWipe as nu, secureWipeAll as nv, selectOptimalConfig as nw, sendPrivateSPLTransfer as nx, serializeAttestationMessage as ny, serializeIntent as nz, type ApproveResult as o, validateAsset as o0, validateCreateIntentParams as o1, validateIntentInput as o2, validateIntentOutput as o3, validateNEARStealthAddress as o4, validateNEARStealthMetaAddress as o5, validateNEARViewingKey as o6, validateProductionConfig as o7, validateScalar as o8, validateViewingKey as o9, verifyAttestation as oa, verifyAttestationSignature as ob, verifyAuthToken as oc, verifyCommitment as od, verifyNEP141TokenCommitment as oe, verifyOpening as of, verifyOpeningNEAR as og, verifyOracleSignature as oh, verifyOwnership as oi, verifyWebhookSignature as oj, walletRegistry as ok, withSecureBuffer as ol, withSecureBufferSync as om, wrapError as on, 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 };