@sip-protocol/sdk 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +23 -8
- package/dist/browser.mjs +6 -2
- package/dist/{chunk-G3TBBG2K.mjs → chunk-7IUKXWDN.mjs} +10 -4
- package/dist/{chunk-PT2DNA7E.mjs → chunk-L4RKPNIJ.mjs} +11 -6
- package/dist/{index-B1d8pihL.d.mts → index-DH5XRHYV.d.mts} +22 -5
- package/dist/{index-UQhQJZbM.d.ts → index-mw7KGX5M.d.ts} +22 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -8
- package/dist/index.mjs +6 -2
- package/dist/{solana-ZWNIQTSU.mjs → solana-7QOA3HBZ.mjs} +1 -1
- package/package.json +1 -1
- package/src/chains/ethereum/index.ts +2 -0
- package/src/chains/ethereum/privacy-adapter.ts +56 -0
- package/src/chains/ethereum/stealth.ts +72 -0
- package/src/chains/ethereum/types.ts +18 -2
- package/src/chains/near/constants.ts +13 -1
- package/src/chains/near/index.ts +2 -0
- package/src/chains/near/resolver.ts +2 -2
- package/src/chains/near/types.ts +20 -9
- package/src/chains/solana/transfer.ts +1 -1
- package/src/index.ts +2 -0
- package/src/stealth/secp256k1.ts +17 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ATTESTATION_VERSION, a as AddressReuseResult, b as AdvisorMessage, c as AdvisorRecommendation, d as AdvisorResponse, e as AdvisorRole, f as AdvisorStatus, g as AdvisoryContext, h as AggregationProgressCallback, i as AggregationProgressEvent, j as AggregationStepResult, k as AggregatorConfig, l as AnalyzableTransaction, m as AnyNativeProof, n as ApproveParams, o as ApproveResult, p as AptosStealthResult, q as AptosStealthService, r as AttestationGatedConfig, s as AttestationGatedDisclosure, t as AttestationRequest, u as AttestationResult, v as AttestationSchema, w as AttestationVerificationResult, x as AuditReport, y as AuditorKeyDerivation, z as AuditorType, B as BLS12_381_MODULUS, C as BN254_MODULUS, D as BUILTIN_TEMPLATES, E as BackendCapabilities, F as BackendRegistrationOptions, G as BalanceAttestationParams, H as BaseProofComposer, I as BaseWalletAdapter, J as BatchVerificationRequest, K as BatchVerificationResult, L as BidReceipt, M as BitcoinNetwork, N as BlockRange, O as BridgeProvider, Q as BrowserNoirProviderConfig, R as CHAIN_NUMERIC_IDS, S as CIRCUIT_METADATA, T as COMPLIANCE_CIRCUIT_IDS, U as CONFIGURABLE_ETH_RPC, V as CONFIGURABLE_SOLANA_RPC, W as CONFIGURABLE_SUI_RPC, Z as CONFIGURABLE_ZCASH_RPC, X as COSMOS_CHAIN_PREFIXES, Y as CSPLClient, _ as CSPLClientConfig, $ as CSPLServiceStatus, a0 as CSPLTokenService, a1 as CSPLTokenServiceConfig, a2 as CSVExport, a3 as CacheEntry, a4 as CacheEntryMetadata, a5 as CacheEvent, a6 as CacheEventListener, a7 as CacheEventType, a8 as CacheKey, a9 as CacheKeyComponents, aa as CacheKeyGenerator, ab as CacheLookupResult, ac as CacheWarmingConfig, ad as CastVoteParams, ae as ChainCharacteristics, af as ChainFamily, ag as ChainFeeConfig, ah as ClusterResult, ai as CommitmentPoint, aj as CompatibilityEntry, ak as ComplianceManager, al as ComplianceProofConfig, am as ComplianceProofProvider, an as ComplianceProofResult, ao as ComplianceProofType, ap as ComplianceReporter, aq as CompositionPlan, ar as CompositionRequest, as as CompositionState, at as CompositionTemplate, au as ConditionalDisclosure, av as ConversionErrorCode, aw as ConversionMetadata, ax as ConversionOptions, ay as ConverterValidationError, az as ConverterValidationResult, aA as CosmosChainId, aB as CosmosStealthResult, aC as CosmosStealthService, aD as CreateBidParams, aE as CreateIntentOptions, aF as CreatePaymentOptions, aG as CrossSystemValidator, aH as CryptoError, aI as DEFAULT_AGGREGATOR_CONFIG, aJ as DEFAULT_CHAIN_FEES, aK as DEFAULT_CONVERSION_OPTIONS, aL as DEFAULT_FEE_TIERS, aM as DEFAULT_LRU_CONFIG, aN as DEFAULT_MANAGER_CONFIG, aO as DEFAULT_MOCK_CONFIG, aP as DEFAULT_MULTI_TIER_CONFIG, aQ as DEFAULT_NETWORK_CONFIG, aR as DEFAULT_ORCHESTRATOR_CONFIG, aS as DEFAULT_PERSISTENT_CONFIG, aT as DEFAULT_PIPELINE_CONFIG, aU as DEFAULT_PROXY_TIMEOUT, aV as DEFAULT_RANGE_API_ENDPOINT, aW as DEFAULT_RPC_URLS, aX as DEFAULT_SYNC_CONFIG, aY as DEFAULT_THRESHOLD, aZ as DEFAULT_TOTAL_ORACLES, a_ as DEFAULT_TREASURY, a$ as DEFAULT_VALIDITY_PERIOD_SECONDS, b0 as DEFAULT_WARMING_CONFIG, b1 as DecryptedTransaction, b2 as DerivationPath, b3 as DeriveMultipleParams, b4 as DeriveViewingKeyParams, b5 as DerivedViewingKey, b6 as DetailedAggregationResult, b7 as DetailedVerificationResult, b8 as EIP1193ConnectInfo, b9 as EIP1193Event, ba as EIP1193Provider, bb as EIP1193ProviderRpcError, bc as EIP1193RequestArguments, bd as EIP712Domain, be as EIP712TypeDefinition, bf as EIP712TypedData, bg as EIP712Types, bh as EllipticCurve, bi as EncryptedNote, bj as EncryptedVote, bk as EncryptionNotImplementedError, bl as EnhancedAccountData, bm as EnhancedTransaction, bn as EnhancedTransactionEvents, bo as EnhancedTransactionType, bp as ErrorCode, bq as EthereumAdapterConfig, br as EthereumChainId, bs as EthereumChainIdType, bt as EthereumChainMetadata, bu as EthereumTokenMetadata, bv as EthereumTransactionReceipt, bw as EthereumTransactionRequest, bx as EthereumWalletAdapter, by as EthereumWalletName, bz as ExchangeExposureResult, bA as ExportForRegulatorParams, bB as ExportedViewingKey, bC as FATFExport, bD as FATFTransaction, bE as FINCENExport, bF as FINCENTransaction, bG as FeeBreakdown, bH as FeeCalculationInput, bI as FeeCalculationResult, bJ as FeeCalculator, bK as FeeCalculatorOptions, bL as FeeCollectionEvent, bM as FeeCollectionParams, bN as FeeCollectionResult, bO as FeeContractMethods, bP as FeeContractState, bQ as FeeGovernanceProposal, bR as FeeModel, bS as FeeStats, bT as FeeTier, bU as FeeTreasuryConfig, bV as FeeWaiver, bW as FeeWaiverType, bX as FieldCharacteristics, bY as FileCache, bZ as FindBestRouteParams, b_ as FullAnalysisResult, b$ as GenerateAuditReportParams, c0 as GenericProvider, c1 as GenericProviderConfig, c2 as GetTransactionHistoryOptions, c3 as Halo2NativeProof, c4 as Halo2ProofConverter, c5 as HardwareAccount, c6 as HardwareConnectionStatus, c7 as HardwareDeviceInfo, c8 as HardwareErrorCode, c9 as HardwareErrorCodeType, ca as HardwareEthereumTx, cb as HardwareSignRequest, cc as HardwareSignature, cd as HardwareTransport, ce as HardwareWalletConfig, cf as HardwareWalletError, cg as HardwareWalletType, ch as HeliusEnhanced, ci as HeliusEnhancedConfig, cj as HeliusEnhancedTransaction, ck as HeliusProvider, cl as HeliusProviderConfig, cm as HeliusWebhookPayload, cn as HeliusWebhookTransaction, co as HistoryCompletenessParams, cp as ICacheKeyGenerator, cq as ICompiledCircuitCache, cr as ILRUCache, cs as IMultiTierCache, ct as INITIAL_PROOF_CACHE_STATS, cu as IPersistentCache, cv as IProofCache, cw as IVerificationKeyCache, cx as IndexedDBCache, cy as IntentBuilder, cz as IntentError, cA as InvalidProofError, cB as InvalidationRule, cC as InvalidationStrategy, cD as JITO_BLOCK_ENGINES, cE as JITO_DEFAULTS, cF as JITO_TIP_ACCOUNTS, cG as JitoBundleRequest, cH as JitoBundleResult, cI as JitoRelayer, cJ as JitoRelayerConfig, cK as JitoRelayerError, cL as JitoRelayerErrorCode, cM as Jurisdiction, cN as KNOWN_EXCHANGES, cO as KNOWN_ISSUERS, cP as KimchiNativeProof, cQ as KimchiProofConverter, cR as KnownExchange, cS as LRUCache, cT as LRUCacheConfig, cU as LatencyEstimate, cV as LedgerConfig, cW as LedgerModel, cX as LedgerWalletAdapter, cY as LinkValidationResult, cZ as LogLevel, c_ as MAX_NEAR_AMOUNT, c$ as MAX_PROOF_SIZE_BYTES, d0 as MAX_PUBLIC_INPUTS, d1 as MEMO_PROGRAM_ID, d2 as MerkleProof, d7 as MockEthereumAdapter, d8 as MockEthereumAdapterConfig, d9 as MockHardwareConfig, da as MockLedgerAdapter, db as MockObliviousSyncProvider, dc as MockProofProvider, dd as MockSolanaAdapter, de as MockSolanaAdapterConfig, df as MockSolver, dg as MockSolverConfig, dh as MockSyncProviderConfig, di as MockTrezorAdapter, dj as MockWalletAdapter, dk as MultiTierCache, dl as MultiTierCacheConfig, dm as NEARAnnouncement, dn as NEARClaimParams, dp as NEARClaimResult, dq as NEARCommitmentPoint, dr as NEARDetectedPayment, ds as NEAREncryptedPayload, dt as NEARExportFormat, du as NEARExportOptions, dv as NEARFeeContract, dw as NEARFeeContractOptions, dx as NEARHistoricalTransaction, dy as NEARHistoryPrivacyLevel, dz as NEARIntentsAdapter, dA as NEARIntentsAdapterConfig, dB as NEARIntentsBackend, dC as NEARNetwork, dD as NEARPedersenCommitment, dE as NEARPrivateTransferParams, dF as NEARPrivateTransferResult, dG as NEARScanParams, dH as NEARScanResult, dI as NEARStealthAddressResult, dJ as NEARStealthBalance, dK as NEARStealthMetaAddressResult, dL as NEARTransactionData, dM as NEARTransactionHistoryParams, dN as NEARTransactionHistoryResult, dO as NEARTransactionType, dP as NEARViewingKey, dQ as NEARViewingKeyExport, dR as NEARViewingKeyStorage, dS as NEAR_DEFAULT_GAS, dT as NEAR_ED25519_ORDER, dU as NEAR_EXPLORER_URLS, dV as NEAR_FEE_CONTRACTS, dW as NEAR_IMPLICIT_ACCOUNT_LENGTH, dX as NEAR_MAX_COMMITMENT_VALUE, dY as NEAR_RPC_ENDPOINTS, dZ as NEAR_SIP_MEMO_PREFIX, d_ as NEAR_TOKEN_CONTRACTS, d$ as NEAR_TOKEN_DECIMALS, e0 as NEP141TokenCommitment, e1 as NativeProofFormat, e2 as NativeTransfer, e3 as NetworkError, e4 as NetworkPrivacyConfig, e5 as NftTransfer, e6 as NoirCircuitType, e7 as NoirNativeProof, e8 as NoirProofConverter, e9 as ONE_NEAR, ea as ONE_YOCTO, eb as ORACLE_DOMAIN, ec as ObliviousNullifier, ed as ObliviousSyncConfig, ee as ObliviousSyncError, ef as ObliviousSyncErrorCode, eg as ObliviousSyncProvider, eh as ObliviousSyncQuery, ei as ObliviousSyncResponse, ej as OneClickClient, ek as OracleAttestationMessage, el as OracleId, em as OracleInfo, en as OracleRegistry, eo as OracleRegistryConfig, ep as OracleSignature, eq as OracleStatus, er as OrchestratorConfig, es as OrchestratorProgressCallback, et as OrchestratorProgressEvent, eu as OrchestratorResult, ev as PALLAS_MODULUS, ew as PROXY_ENV_VAR, ex as PROXY_ENV_VARS, ey as ParallelAggregationOptions, ez as ParseTransactionsOptions, eA as ParsedProxyConfig, eB as PaymentBuilder, eC as PdfExportOptions, eD as PedersenCommitment, eE as PersistentCacheConfig, eF as PreparedSwap, eG as PriceFeed, eH as PrivacyAdvisorAgent, eI as PrivacyAdvisorConfig, eJ as PrivacyAdvisoryReport, eK as PrivacyAvailabilityResult, eL as PrivacyBackend, eM as PrivacyBackendCapabilities, eN as PrivacyBackendRegistry, eO as PrivacyBackendSelectionResult, eP as PrivacyBackendType, eQ as PrivacyConfig, eR as PrivacyDisplayOptions, eS as PrivacyLogger, eT as PrivacyLoggerConfig, eU as PrivacyRecommendation, eV as PrivacyScore, eW as PrivacyScoreBreakdown, eX as PrivacySmartRouter, eY as PrivacySmartRouterConfig, eZ as PrivacyTransactionResult, e_ as PrivacyTransferParams, e$ as PrivateNFT, f0 as PrivateVoting, f1 as ProductionConfigError, f2 as ProductionConfigValidationResult, f3 as ProductionConfigWarning, f4 as ProductionQuote, f5 as ProductionSafetyError, f6 as ProofAggregator, f7 as ProofAuditLogEntry, f8 as ProofCacheStats, f9 as ProofConversionError, fa as ProofConverter, fb as ProofDependency, fc as ProofError, fd as ProofNotImplementedError, fe as ProofOrchestrator, ff as ProofProgressCallback, fg as ProofStatistics, fh as ProofSystemToNativeMap, fi as ProviderConfig, fj as ProviderType, fk as ProxiedFetch, fl as ProxyAgentOptions, fm as ProxyCheckResult, fn as ProxyConfig, fo as ProxyType, fp as QuoteComparison, fq as RangeAPIConfig, fr as RangeSASAttestation, fs as ReceivedNote, ft as RecursiveAggregationOptions, fu as RegisteredBackend, fv as RegulatoryExport, fw as RegulatoryFormat, fx as RelayedTransactionRequest, fy as RelayedTransactionResult, fz as RevealedVote, fA as RiskLevel, fB as Route, fC as RouteWithQuote, fD as RouterPriority, fE as SIP, fF as SIPConfig, fG as SIPEnhancedTransaction, fH as SIPError, fI as SIPLogLevel, fJ as SIPLoggerConfig, fK as SIPNativeBackend, fL as SIPNativeBackendConfig, fM as SIPProtectionComparison, fN as SIPTransactionMetadata, fO as SIP_MEMO_PREFIX, fP as SOLANA_EXPLORER_URLS, fQ as SOLANA_RPC_ENDPOINTS, fR as SOLANA_TOKEN_DECIMALS, fS as SOLANA_TOKEN_MINTS, fT as SOLANA_ZK_PROGRAM_IDS, fU as STABLECOIN_ADDRESSES, fV as STABLECOIN_DECIMALS, fW as STABLECOIN_INFO, fX as SUPPORTED_JURISDICTIONS, fY as SYSTEM_INFO, fZ as SameChainExecuteParams, f_ as SameChainExecuteResult, f$ as SameChainExecutor, g0 as SameChainTransferParams, g1 as SameChainTransferResult, g2 as SanctionsClearParams, g3 as SealedBid, g4 as SealedBidAuction, g5 as SecurityError, g6 as SensitiveData, g7 as SequentialAggregationOptions, g8 as SerializedError, g9 as SettlementBackend, ga as SettlementBackendFactory, gb as SettlementBackendName, gc as SettlementBackendRegistry, gd as SettlementQuote, ge as SettlementQuoteParams, gf as SettlementRegistry, gg as SettlementRegistryError, gh as SettlementSwapParams, gi as SettlementSwapResult, gj as SettlementSwapRoute, gk as SettlementSwapRouteStep, gl as ShieldedBalance, gm as ShieldedSendParams, gn as ShieldedSendResult, go as SignedOracleAttestation, gp as SmartRouter, gq as SocialLinkResult, gr as SolanaAdapterConfig, gs as SolanaAnnouncement, gt as SolanaClaimParams, gu as SolanaClaimResult, gv as SolanaCluster, gw as SolanaConnection, gx as SolanaNoirError, gy as SolanaNoirErrorCode, gy as SolanaNoirErrorCodeType, gz as SolanaNoirVerifier, gA as SolanaNoirVerifierConfig, gB as SolanaPrivateTransferParams, gC as SolanaPrivateTransferResult, gD as SolanaPublicKey, gE as SolanaRPCProvider, gF as SolanaSameChainCluster, gG as SolanaSameChainConfig, gH as SolanaSameChainExecutor, gI as SolanaScanParams, gJ as SolanaScanResult, gK as SolanaSendOptions, gL as SolanaSerializedProof, gM as SolanaSignature, gN as SolanaTransaction, gO as SolanaUnsignedTransaction, gP as SolanaVerificationKey, gQ as SolanaVerificationResult, gR as SolanaVerifyInstruction, gS as SolanaVersionedTransaction, gT as SolanaWalletAdapter, gU as SolanaWalletName, gV as SolanaWalletProvider, gW as StablecoinInfo, gX as StealthCurve, gY as StreamCallback, gZ as SuiStealthResult, g_ as SuiStealthService, g$ as SurveillanceAnalyzer, h0 as SurveillanceAnalyzerConfig, h1 as SwapEvent, h2 as SwapRequest, h3 as SwapResult, h4 as SwapStatus, h5 as SwapStatusResponse, h6 as SyncCompletionEvent, h7 as SyncEventListener, h8 as SyncManager, h9 as SyncManagerConfig, ha as SyncOptions, hb as SyncProgressEvent, hc as SyncRandomness, hd as SyncServiceHealth, he as SystemInfo, hf as SystemVerificationStats, hg as TOR_CONTROL_PORT, hh as TOR_HOST, hi as TOR_PORTS, hj as TapScript, hk as TaprootOutput, hl as TemporalPatternResult, hm as ThresholdShares, hn as ThresholdViewingKey, ho as TimeLockParams, hp as TimeLockResult, hq as TimeWindowedViewingKey, hr as TokenAsset, hs as TokenMetadata, ht as TokenTransfer, hu as ToolResult, hv as ToolsConfig, hw as TransactionData, hx as TransactionSummary, hy as TransportType, hz as Treasury, hA as TrezorConfig, hB as TrezorModel, hC as TrezorWalletAdapter, hD as UnifiedOptimizationProfile, hE as UnifiedOptimizationResult, hF as UnifiedProofConverter, hG as UnlockResult, hH as UnsupportedVersionError, hI as UnwrapParams, hJ as UnwrapResult, hK as VESTA_MODULUS, hL as ValidationCheck, hM as ValidationError, hN as ValidationOptions, hO as ValidationReport, hP as VerificationOrder, hQ as VerificationPipeline, hR as VerificationPipelineConfig, hS as VerificationProgressCallback, hT as VerificationProgressEvent, hU as VerificationResult, hV as VerifyBidParams, hW as VerifyOptions, hX as ViewingKeyAccessParams, hY as ViewingKeyDerivationResult, hZ as ViewingKeyScope, h_ as WalletAdapter, h$ as WalletError, i0 as WalletSyncState, i1 as WarmingResult, i2 as WebhookHandler, i3 as WebhookHandlerConfig, i4 as WebhookProcessResult, i5 as WebhookRequest, i6 as WrapParams, i7 as WrapResult, i8 as ZcashNativeBackend, i9 as ZcashNativeBackendConfig, ia as ZcashQuote, ib as ZcashQuoteParams, ic as ZcashRPCClient, id as ZcashRPCError, ie as ZcashRpcConfig, ig as ZcashShieldedService, ih as ZcashShieldedServiceConfig, ii as ZcashSwapParams, ij as ZcashSwapResult, ik as ZcashSwapService, il as ZcashSwapServiceConfig, im as ZcashSwapSourceChain, io as ZcashSwapSourceToken, ip as ZcashSwapStatus, iq as addBlindings, ir as addBlindingsNEAR, is as addCommitments, it as addCommitmentsNEAR, iu as addOracle, iv as analyzeAddressReuse, iw as analyzeTemporalPatterns, ix as aptosAddressToAuthKey, iy as assertNoLocalhost, iz as attachProofs, iA as base58ToHex, iB as bnbOptimizations, iC as bpsToPercent, iD as browserBytesToHex, iE as browserHexToBytes, iF as cacheKeyGenerator, iG as calculateFeeForSwap, iH as calculatePrivacyScore, iI as calculateSIPComparison, iJ as checkAptosStealthAddress, iK as checkEd25519StealthAddress, iL as checkEd25519StealthAddressV1, iN as checkNEARStealthAddress, iO as checkProxyAvailability, iP as checkSecp256k1StealthAddressV1, iQ as checkStealthAddress, iR as checkSuiStealthAddress, iS as claimStealthPayment, iT as commit, iU as commitNEAR, iV as commitNEP141Token, iW as commitZero, iX as compareCrossChainCosts, iY as computeAttestationHash, iZ as computeNEARViewingKeyHash, i_ as computeNEARViewingKeyHashFromPrivate, i$ as computeTweakedKey, j0 as configureLogger, j1 as convertFromSIP, j2 as convertToSIP, j3 as createAnalyzeWalletTool, j4 as createAnnouncementMemo, j5 as createCacheKeyGenerator, j6 as createCommitment, j7 as createCrossSystemValidator, j8 as createDevnetVerifier, j9 as createEthereumAdapter, ja as createExplainTool, jb as createFeeCalculator, jc as createFileCache, jd as createHalo2Converter, je as createHeliusEnhanced, jf as createIndexedDBCache, jg as createJitoRelayer, jh as createKeySpendOnlyOutput, ji as createKimchiConverter, jj as createLRUCache, jk as createLedgerAdapter, jl as createLogger, jm as createMainnetFeeContract, jn as createMainnetRelayer, jo as createMainnetVerifier, jp as createMockAttestation, jq as createMockEthereumAdapter, jr as createMockEthereumProvider, js as createMockLedgerAdapter, jt as createMockSolanaAdapter, ju as createMockSolanaConnection, jv as createMockSolanaProvider, jw as createMockSolver, jx as createMockSyncProvider, jy as createMockTrezorAdapter, jz as createMultiTierCache, jA as createNEARAnnouncementMemo, jB as createNEARFeeContract, jC as createNEARIntentsAdapter, jD as createNEARIntentsBackend, jE as createNEARMemoryStorage, jF as createNetworkPrivacyClient, jG as createNoirConverter, jH as createOracleRegistry, jI as createPersistentCache, jJ as createPrivacyAdvisor, jK as createPrivacyAdvisorTools, jL as createPrivacyLogger, jM as createPrivateOwnership, jN as createPrivateVoting, jO as createProductionConfig, jP as createProductionSIP, jQ as createProofAggregator, jR as createProofOrchestrator, jS as createProvider, jT as createProxiedFetch, jU as createProxyAgent, jV as createQuickScoreTool, jW as createSIP, jX as createSIPComparisonTool, jY as createSameChainExecutor, jZ as createSealedBidAuction, j_ as createShieldedIntent, j$ as createShieldedPayment, k0 as createSmartRouter, k1 as createSolanaAdapter, k2 as createSurveillanceAnalyzer, k3 as createSyncManager, k4 as createSyncState, k5 as createTaprootOutput, k6 as createTestnetFeeContract, k7 as createTimeWindowedKey, k8 as createTrezorAdapter, k9 as createUnifiedConverter, ka as createVerificationPipeline, kb as createWalletFactory, kc as createWebhookHandler, kd as createZcashClient, ke as createZcashNativeBackend, kf as createZcashShieldedService, kg as createZcashSwapService, kh as decodeStealthMetaAddress, ki as decodeTaprootAddress, kj as decryptMemo, kk as decryptWithNEARViewing, kl as decryptWithViewing, km as defaultRegistry, kn as deriveAptosStealthPrivateKey, ko as deriveEd25519StealthPrivateKey, kp as deriveEd25519StealthPrivateKeyV1, kq as deriveNEARChildViewingKey, kr as deriveNEARStealthPrivateKey, ks as deriveObliviousNullifier, kt as deriveOracleId, ku as deriveSecp256k1StealthPrivateKeyV1, kv as deriveStealthPrivateKey, kw as deriveStealthPrivateKeyV1, kx as deriveSuiStealthPrivateKey, ky as deriveTraditionalNullifier, kz as deriveViewingKey, kA as deserializeAttestationMessage, kB as deserializeIntent, kC as deserializePayment, kD as detectChainFamily, kE as detectClusters, kF as detectEthereumWallets, kG as detectExchangeExposure, kJ as detectSolanaWallets, kK as detectTorPort, kL as ed25519PublicKeyToAptosAddress, kM as ed25519PublicKeyToImplicitAccount, kN as ed25519PublicKeyToNearAddress, kO as ed25519PublicKeyToSolanaAddress, kP as ed25519PublicKeyToSuiAddress, kQ as encodeNEARStealthMetaAddress, kR as encodeStealthMetaAddress, kS as encryptForNEARViewing, kT as encryptForViewing, kU as estimateComputeUnits, kV as estimateFee, kW as estimatePrivateTransferFee, kX as evmOptimizations, kY as exportNEARViewingKey, kZ as exportTransactions, k_ as featureNotSupportedError, k$ as fetchAttestation, l0 as fetchWalletAttestations, l1 as formatFee, l2 as formatStablecoinAmount, l3 as fromHex, l4 as fromStablecoinUnits, l5 as fromYoctoNEAR, l6 as generateAptosStealthAddress, l7 as generateBlinding, l8 as generateBlindingNEAR, l9 as generateCosmosStealthAddress, la as generateCosmosStealthMetaAddress, lb as generateEd25519StealthAddress, lc as generateEd25519StealthMetaAddress, ld as generateIntentId, le as generateNEARStealthAddress, lf as generateNEARStealthMetaAddress, lg as generateNEARViewingKeyFromSpending, lh as generatePdfReport, li as generateRandomBytes, lj as generateRandomNEARViewingKey, lk as generateStealthAddress, ll as generateStealthMetaAddress, lm as generateSuiStealthAddress, ln as generateSyncRandomness, lo as generateViewingKey, lp as getActiveOracles, lq as getAsset, lr as getAvailableTransports, ls as getBrowserInfo, lu as getChainCharacteristics, lv as getChainNumericId, lw as getChainsForStablecoin, lx as getCurrentEpoch, ly as getCurveForChain, lz as getDefaultRpcEndpoint, lA as getDerivationPath, lB as getErrorMessage, lC as getEthereumProvider, lD as getGenerators, lE as getGeneratorsNEAR, lF as getIntentSummary, lG as getLogLevelName, lI as getNEARAccountExplorerUrl, lJ as getNEARExplorerUrl, lK as getNEARTokenContract, lL as getNEARViewingPublicKey, lM as getNativeToken, lO as getPaymentSummary, lP as getPaymentTimeRemaining, lQ as getPrivacyConfig, lR as getPrivacyDescription, lS as getProductionUrl, lT as getProxyFromEnv, lU as getSolanaExplorerUrl, lV as getSolanaProvider, lW as getSolanaTokenDecimals, lX as getStablecoin, lY as getStablecoinInfo, lZ as getStablecoinsForChain, l_ as getStealthBalance, l$ as getSupportedSameChainChains, m0 as getSupportedStablecoins, m1 as getTimeRemaining, m2 as getTokenByAddress, m3 as getTokenDecimals, m4 as getTokenMint, m5 as getTokensForChain, m6 as getTransactionByHash, m7 as getTransactionCount, m8 as getTransactionHistory, m9 as getTransactionSummary, ma as getXOnlyPublicKey, mb as hasEnoughOracles, mc as hasErrorCode, md as hasRequiredProofs, me as hasTokenAccount, mf as hash, mg as hexToNumber, mh as implicitAccountToEd25519PublicKey, mi as importNEARViewingKey, mj as isBrowser, mk as isEd25519Chain, ml as isExpired, mm as isImplicitAccount, mn as isKnownToken, mo as isLevelEnabled, mp as isLocalhostAllowed, mq as isLocalhostUrl, mr as isNEARAnnouncementForViewingKey, ms as isNamedAccount, mt as isNoirCircuitType, mu as isNonNegativeAmount, mv as isNoteInWindow, mw as isPaymentExpired, mx as isPrivateWalletAdapter, my as isProductionEnvironment, mz as isSIPError, mA as isSameChainSupported, mB as isSecurityError, mC as isStablecoin, mD as isStablecoinOnChain, mE as isSyncRandomnessValid, mG as isTorAvailable, mH as isValidAmount, mI as isValidAptosAddress, mJ as isValidChainId, mK as isValidCompressedPublicKey, mL as isValidCosmosAddress, mM as isValidEd25519PublicKey, mN as isValidHex, mO as isValidHexLength, mP as isValidNEARAccountId, mQ as isValidNearAccountId, mR as isValidNearImplicitAddress, mS as isValidPrivacyLevel, mT as isValidPrivateKey, mU as isValidScalar, mV as isValidSlippage, mW as isValidSolanaAddress, mX as isValidSolanaProof, mY as isValidStealthMetaAddress, mZ as isValidSuiAddress, m_ as isValidTaprootAddress, m$ as logger, n0 as maskAmount, n1 as nearAddressToEd25519PublicKey, n2 as normalizeAddress, n3 as normalizeSuiAddress, n4 as notConnectedError, n5 as parseAnnouncement, n6 as parseNEARAnnouncement, n7 as parseNEARStealthMetaAddress, n8 as parseProxyConfig, n9 as parseStealthAddress, na as percentToBps, nb as privacyLogger, nc as processWebhookTransaction, nd as proveOwnership, ne as publicKeyToEthAddress, nf as recommendCheapestChain, ng as recommendProfile, nh as redactAddress, ni as redactSensitiveData, nj as redactSignature, nk as registerWallet, nl as removeOracle, nm as rotateCircuit, nn as scanForPayments, no as schnorrSign, np as schnorrSignHex, nq as schnorrVerify, nr as schnorrVerifyHex, ns as secureWipe, nt as secureWipeAll, nu as selectOptimalConfig, nv as sendPrivateSPLTransfer, nw as serializeAttestationMessage, nx as serializeIntent, ny as serializePayment, nz as setLogLevel, nA as signAttestationMessage, nB as silenceLogger, nC as solanaAddressToEd25519PublicKey, nD as solanaOptimizations, nE as solanaPublicKeyToHex, nF as stealthKeyToCosmosAddress, nG as subtractBlindings, nH as subtractBlindingsNEAR, nI as subtractCommitments, nJ as subtractCommitmentsNEAR, nK as supportsSharedArrayBuffer, nO as supportsWebBluetooth, nP as supportsWebHID, nQ as supportsWebUSB, nR as supportsWebWorkers, nS as taprootAddress, nT as toHex, nU as toStablecoinUnits, nV as toYoctoNEAR, nW as trackIntent, nX as trackPayment, nY as updateOracleStatus, nZ as updateSyncState, n_ as validateAsset, n$ as validateCreateIntentParams, o0 as validateIntentInput, o1 as validateIntentOutput, o2 as validateNEARStealthAddress, o3 as validateNEARStealthMetaAddress, o4 as validateNEARViewingKey, o5 as validateProductionConfig, o6 as validateScalar, o7 as validateViewingKey, o8 as verifyAttestation, o9 as verifyAttestationSignature, oa as verifyAuthToken, ob as verifyCommitment, oc as verifyNEP141TokenCommitment, od as verifyOpening, oe as verifyOpeningNEAR, of as verifyOracleSignature, og as verifyOwnership, oh as verifyWebhookSignature, oi as walletRegistry, oj as withSecureBuffer, ok as withSecureBufferSync, ol as wrapError } from './index-UQhQJZbM.js';
|
|
1
|
+
export { A as ATTESTATION_VERSION, a as AddressReuseResult, b as AdvisorMessage, c as AdvisorRecommendation, d as AdvisorResponse, e as AdvisorRole, f as AdvisorStatus, g as AdvisoryContext, h as AggregationProgressCallback, i as AggregationProgressEvent, j as AggregationStepResult, k as AggregatorConfig, l as AnalyzableTransaction, m as AnyNativeProof, n as ApproveParams, o as ApproveResult, p as AptosStealthResult, q as AptosStealthService, r as AttestationGatedConfig, s as AttestationGatedDisclosure, t as AttestationRequest, u as AttestationResult, v as AttestationSchema, w as AttestationVerificationResult, x as AuditReport, y as AuditorKeyDerivation, z as AuditorType, B as BLS12_381_MODULUS, C as BN254_MODULUS, D as BUILTIN_TEMPLATES, E as BackendCapabilities, F as BackendRegistrationOptions, G as BalanceAttestationParams, H as BaseProofComposer, I as BaseWalletAdapter, J as BatchVerificationRequest, K as BatchVerificationResult, L as BidReceipt, M as BitcoinNetwork, N as BlockRange, O as BridgeProvider, Q as BrowserNoirProviderConfig, R as CHAIN_NUMERIC_IDS, S as CIRCUIT_METADATA, T as COMPLIANCE_CIRCUIT_IDS, U as CONFIGURABLE_ETH_RPC, V as CONFIGURABLE_SOLANA_RPC, W as CONFIGURABLE_SUI_RPC, Z as CONFIGURABLE_ZCASH_RPC, X as COSMOS_CHAIN_PREFIXES, Y as CSPLClient, _ as CSPLClientConfig, $ as CSPLServiceStatus, a0 as CSPLTokenService, a1 as CSPLTokenServiceConfig, a2 as CSVExport, a3 as CacheEntry, a4 as CacheEntryMetadata, a5 as CacheEvent, a6 as CacheEventListener, a7 as CacheEventType, a8 as CacheKey, a9 as CacheKeyComponents, aa as CacheKeyGenerator, ab as CacheLookupResult, ac as CacheWarmingConfig, ad as CastVoteParams, ae as ChainCharacteristics, af as ChainFamily, ag as ChainFeeConfig, ah as ClusterResult, ai as CommitmentPoint, aj as CompatibilityEntry, ak as ComplianceManager, al as ComplianceProofConfig, am as ComplianceProofProvider, an as ComplianceProofResult, ao as ComplianceProofType, ap as ComplianceReporter, aq as CompositionPlan, ar as CompositionRequest, as as CompositionState, at as CompositionTemplate, au as ConditionalDisclosure, av as ConversionErrorCode, aw as ConversionMetadata, ax as ConversionOptions, ay as ConverterValidationError, az as ConverterValidationResult, aA as CosmosChainId, aB as CosmosStealthResult, aC as CosmosStealthService, aD as CreateBidParams, aE as CreateIntentOptions, aF as CreatePaymentOptions, aG as CrossSystemValidator, aH as CryptoError, aI as DEFAULT_AGGREGATOR_CONFIG, aJ as DEFAULT_CHAIN_FEES, aK as DEFAULT_CONVERSION_OPTIONS, aL as DEFAULT_FEE_TIERS, aM as DEFAULT_LRU_CONFIG, aN as DEFAULT_MANAGER_CONFIG, aO as DEFAULT_MOCK_CONFIG, aP as DEFAULT_MULTI_TIER_CONFIG, aQ as DEFAULT_NETWORK_CONFIG, aR as DEFAULT_ORCHESTRATOR_CONFIG, aS as DEFAULT_PERSISTENT_CONFIG, aT as DEFAULT_PIPELINE_CONFIG, aU as DEFAULT_PROXY_TIMEOUT, aV as DEFAULT_RANGE_API_ENDPOINT, aW as DEFAULT_RPC_URLS, aX as DEFAULT_SYNC_CONFIG, aY as DEFAULT_THRESHOLD, aZ as DEFAULT_TOTAL_ORACLES, a_ as DEFAULT_TREASURY, a$ as DEFAULT_VALIDITY_PERIOD_SECONDS, b0 as DEFAULT_WARMING_CONFIG, b1 as DecryptedTransaction, b2 as DerivationPath, b3 as DeriveMultipleParams, b4 as DeriveViewingKeyParams, b5 as DerivedViewingKey, b6 as DetailedAggregationResult, b7 as DetailedVerificationResult, b8 as EIP1193ConnectInfo, b9 as EIP1193Event, ba as EIP1193Provider, bb as EIP1193ProviderRpcError, bc as EIP1193RequestArguments, bd as EIP712Domain, be as EIP712TypeDefinition, bf as EIP712TypedData, bg as EIP712Types, bh as EllipticCurve, bi as EncryptedNote, bj as EncryptedVote, bk as EncryptionNotImplementedError, bl as EnhancedAccountData, bm as EnhancedTransaction, bn as EnhancedTransactionEvents, bo as EnhancedTransactionType, bp as ErrorCode, bq as EthereumAdapterConfig, br as EthereumChainId, bs as EthereumChainIdType, bt as EthereumChainMetadata, bu as EthereumTokenMetadata, bv as EthereumTransactionReceipt, bw as EthereumTransactionRequest, bx as EthereumWalletAdapter, by as EthereumWalletName, bz as ExchangeExposureResult, bA as ExportForRegulatorParams, bB as ExportedViewingKey, bC as FATFExport, bD as FATFTransaction, bE as FINCENExport, bF as FINCENTransaction, bG as FeeBreakdown, bH as FeeCalculationInput, bI as FeeCalculationResult, bJ as FeeCalculator, bK as FeeCalculatorOptions, bL as FeeCollectionEvent, bM as FeeCollectionParams, bN as FeeCollectionResult, bO as FeeContractMethods, bP as FeeContractState, bQ as FeeGovernanceProposal, bR as FeeModel, bS as FeeStats, bT as FeeTier, bU as FeeTreasuryConfig, bV as FeeWaiver, bW as FeeWaiverType, bX as FieldCharacteristics, bY as FileCache, bZ as FindBestRouteParams, b_ as FullAnalysisResult, b$ as GenerateAuditReportParams, c0 as GenericProvider, c1 as GenericProviderConfig, c2 as GetTransactionHistoryOptions, c3 as Halo2NativeProof, c4 as Halo2ProofConverter, c5 as HardwareAccount, c6 as HardwareConnectionStatus, c7 as HardwareDeviceInfo, c8 as HardwareErrorCode, c9 as HardwareErrorCodeType, ca as HardwareEthereumTx, cb as HardwareSignRequest, cc as HardwareSignature, cd as HardwareTransport, ce as HardwareWalletConfig, cf as HardwareWalletError, cg as HardwareWalletType, ch as HeliusEnhanced, ci as HeliusEnhancedConfig, cj as HeliusEnhancedTransaction, ck as HeliusProvider, cl as HeliusProviderConfig, cm as HeliusWebhookPayload, cn as HeliusWebhookTransaction, co as HistoryCompletenessParams, cp as ICacheKeyGenerator, cq as ICompiledCircuitCache, cr as ILRUCache, cs as IMultiTierCache, ct as INITIAL_PROOF_CACHE_STATS, cu as IPersistentCache, cv as IProofCache, cw as IVerificationKeyCache, cx as IndexedDBCache, cy as IntentBuilder, cz as IntentError, cA as InvalidProofError, cB as InvalidationRule, cC as InvalidationStrategy, cD as JITO_BLOCK_ENGINES, cE as JITO_DEFAULTS, cF as JITO_TIP_ACCOUNTS, cG as JitoBundleRequest, cH as JitoBundleResult, cI as JitoRelayer, cJ as JitoRelayerConfig, cK as JitoRelayerError, cL as JitoRelayerErrorCode, cM as Jurisdiction, cN as KNOWN_EXCHANGES, cO as KNOWN_ISSUERS, cP as KimchiNativeProof, cQ as KimchiProofConverter, cR as KnownExchange, cS as LRUCache, cT as LRUCacheConfig, cU as LatencyEstimate, cV as LedgerConfig, cW as LedgerModel, cX as LedgerWalletAdapter, cY as LinkValidationResult, cZ as LogLevel, c_ as MAX_NEAR_AMOUNT, c$ as MAX_PROOF_SIZE_BYTES, d0 as MAX_PUBLIC_INPUTS, d1 as MEMO_PROGRAM_ID, d2 as MerkleProof, d7 as MockEthereumAdapter, d8 as MockEthereumAdapterConfig, d9 as MockHardwareConfig, da as MockLedgerAdapter, db as MockObliviousSyncProvider, dc as MockProofProvider, dd as MockSolanaAdapter, de as MockSolanaAdapterConfig, df as MockSolver, dg as MockSolverConfig, dh as MockSyncProviderConfig, di as MockTrezorAdapter, dj as MockWalletAdapter, dk as MultiTierCache, dl as MultiTierCacheConfig, dm as NEARAnnouncement, dn as NEARClaimParams, dp as NEARClaimResult, dq as NEARCommitmentPoint, dr as NEARDetectedPayment, ds as NEAREncryptedPayload, dt as NEARExportFormat, du as NEARExportOptions, dv as NEARFeeContract, dw as NEARFeeContractOptions, dx as NEARHistoricalTransaction, dy as NEARHistoryPrivacyLevel, dz as NEARIntentsAdapter, dA as NEARIntentsAdapterConfig, dB as NEARIntentsBackend, dC as NEARNetwork, dD as NEARPedersenCommitment, dE as NEARPrivateTransferParams, dF as NEARPrivateTransferResult, dG as NEARScanParams, dH as NEARScanResult, dI as NEARStealthAddressResult, dJ as NEARStealthBalance, dK as NEARStealthMetaAddressResult, dL as NEARTransactionData, dM as NEARTransactionHistoryParams, dN as NEARTransactionHistoryResult, dO as NEARTransactionType, dP as NEARViewingKey, dQ as NEARViewingKeyExport, dR as NEARViewingKeyStorage, dS as NEAR_DEFAULT_GAS, dT as NEAR_ED25519_ORDER, dU as NEAR_EXPLORER_URLS, dV as NEAR_FEE_CONTRACTS, dW as NEAR_IMPLICIT_ACCOUNT_LENGTH, dX as NEAR_MAX_COMMITMENT_VALUE, dY as NEAR_RPC_ENDPOINTS, dZ as NEAR_SIP_MEMO_PREFIX, d_ as NEAR_TOKEN_CONTRACTS, d$ as NEAR_TOKEN_DECIMALS, e0 as NEP141TokenCommitment, e1 as NativeProofFormat, e2 as NativeTransfer, e3 as NetworkError, e4 as NetworkPrivacyConfig, e5 as NftTransfer, e6 as NoirCircuitType, e7 as NoirNativeProof, e8 as NoirProofConverter, e9 as ONE_NEAR, ea as ONE_YOCTO, eb as ORACLE_DOMAIN, ec as ObliviousNullifier, ed as ObliviousSyncConfig, ee as ObliviousSyncError, ef as ObliviousSyncErrorCode, eg as ObliviousSyncProvider, eh as ObliviousSyncQuery, ei as ObliviousSyncResponse, ej as OneClickClient, ek as OracleAttestationMessage, el as OracleId, em as OracleInfo, en as OracleRegistry, eo as OracleRegistryConfig, ep as OracleSignature, eq as OracleStatus, er as OrchestratorConfig, es as OrchestratorProgressCallback, et as OrchestratorProgressEvent, eu as OrchestratorResult, ev as PALLAS_MODULUS, ew as PROXY_ENV_VAR, ex as PROXY_ENV_VARS, ey as ParallelAggregationOptions, ez as ParseTransactionsOptions, eA as ParsedProxyConfig, eB as PaymentBuilder, eC as PdfExportOptions, eD as PedersenCommitment, eE as PersistentCacheConfig, eF as PreparedSwap, eG as PriceFeed, eH as PrivacyAdvisorAgent, eI as PrivacyAdvisorConfig, eJ as PrivacyAdvisoryReport, eK as PrivacyAvailabilityResult, eL as PrivacyBackend, eM as PrivacyBackendCapabilities, eN as PrivacyBackendRegistry, eO as PrivacyBackendSelectionResult, eP as PrivacyBackendType, eQ as PrivacyConfig, eR as PrivacyDisplayOptions, eS as PrivacyLogger, eT as PrivacyLoggerConfig, eU as PrivacyRecommendation, eV as PrivacyScore, eW as PrivacyScoreBreakdown, eX as PrivacySmartRouter, eY as PrivacySmartRouterConfig, eZ as PrivacyTransactionResult, e_ as PrivacyTransferParams, e$ as PrivateNFT, f0 as PrivateVoting, f1 as ProductionConfigError, f2 as ProductionConfigValidationResult, f3 as ProductionConfigWarning, f4 as ProductionQuote, f5 as ProductionSafetyError, f6 as ProofAggregator, f7 as ProofAuditLogEntry, f8 as ProofCacheStats, f9 as ProofConversionError, fa as ProofConverter, fb as ProofDependency, fc as ProofError, fd as ProofNotImplementedError, fe as ProofOrchestrator, ff as ProofProgressCallback, fg as ProofStatistics, fh as ProofSystemToNativeMap, fi as ProviderConfig, fj as ProviderType, fk as ProxiedFetch, fl as ProxyAgentOptions, fm as ProxyCheckResult, fn as ProxyConfig, fo as ProxyType, fp as QuoteComparison, fq as RangeAPIConfig, fr as RangeSASAttestation, fs as ReceivedNote, ft as RecursiveAggregationOptions, fu as RegisteredBackend, fv as RegulatoryExport, fw as RegulatoryFormat, fx as RelayedTransactionRequest, fy as RelayedTransactionResult, fz as RevealedVote, fA as RiskLevel, fB as Route, fC as RouteWithQuote, fD as RouterPriority, fE as SIP, fF as SIPConfig, fG as SIPEnhancedTransaction, fH as SIPError, fI as SIPLogLevel, fJ as SIPLoggerConfig, fK as SIPNativeBackend, fL as SIPNativeBackendConfig, fM as SIPProtectionComparison, fN as SIPTransactionMetadata, fO as SIP_MEMO_PREFIX, fP as SIP_MEMO_PREFIX_ANY, fQ as SIP_MEMO_PREFIX_V2, fR as SOLANA_EXPLORER_URLS, fS as SOLANA_RPC_ENDPOINTS, fT as SOLANA_TOKEN_DECIMALS, fU as SOLANA_TOKEN_MINTS, fV as SOLANA_ZK_PROGRAM_IDS, fW as STABLECOIN_ADDRESSES, fX as STABLECOIN_DECIMALS, fY as STABLECOIN_INFO, fZ as SUPPORTED_JURISDICTIONS, f_ as SYSTEM_INFO, f$ as SameChainExecuteParams, g0 as SameChainExecuteResult, g1 as SameChainExecutor, g2 as SameChainTransferParams, g3 as SameChainTransferResult, g4 as SanctionsClearParams, g5 as SealedBid, g6 as SealedBidAuction, g7 as SecurityError, g8 as SensitiveData, g9 as SequentialAggregationOptions, ga as SerializedError, gb as SettlementBackend, gc as SettlementBackendFactory, gd as SettlementBackendName, ge as SettlementBackendRegistry, gf as SettlementQuote, gg as SettlementQuoteParams, gh as SettlementRegistry, gi as SettlementRegistryError, gj as SettlementSwapParams, gk as SettlementSwapResult, gl as SettlementSwapRoute, gm as SettlementSwapRouteStep, gn as ShieldedBalance, go as ShieldedSendParams, gp as ShieldedSendResult, gq as SignedOracleAttestation, gr as SmartRouter, gs as SocialLinkResult, gt as SolanaAdapterConfig, gu as SolanaAnnouncement, gv as SolanaClaimParams, gw as SolanaClaimResult, gx as SolanaCluster, gy as SolanaConnection, gz as SolanaNoirError, gA as SolanaNoirErrorCode, gA as SolanaNoirErrorCodeType, gB as SolanaNoirVerifier, gC as SolanaNoirVerifierConfig, gD as SolanaPrivateTransferParams, gE as SolanaPrivateTransferResult, gF as SolanaPublicKey, gG as SolanaRPCProvider, gH as SolanaSameChainCluster, gI as SolanaSameChainConfig, gJ as SolanaSameChainExecutor, gK as SolanaScanParams, gL as SolanaScanResult, gM as SolanaSendOptions, gN as SolanaSerializedProof, gO as SolanaSignature, gP as SolanaTransaction, gQ as SolanaUnsignedTransaction, gR as SolanaVerificationKey, gS as SolanaVerificationResult, gT as SolanaVerifyInstruction, gU as SolanaVersionedTransaction, gV as SolanaWalletAdapter, gW as SolanaWalletName, gX as SolanaWalletProvider, gY as StablecoinInfo, gZ as StealthCurve, g_ as StreamCallback, g$ as SuiStealthResult, h0 as SuiStealthService, h1 as SurveillanceAnalyzer, h2 as SurveillanceAnalyzerConfig, h3 as SwapEvent, h4 as SwapRequest, h5 as SwapResult, h6 as SwapStatus, h7 as SwapStatusResponse, h8 as SyncCompletionEvent, h9 as SyncEventListener, ha as SyncManager, hb as SyncManagerConfig, hc as SyncOptions, hd as SyncProgressEvent, he as SyncRandomness, hf as SyncServiceHealth, hg as SystemInfo, hh as SystemVerificationStats, hi as TOR_CONTROL_PORT, hj as TOR_HOST, hk as TOR_PORTS, hl as TapScript, hm as TaprootOutput, hn as TemporalPatternResult, ho as ThresholdShares, hp as ThresholdViewingKey, hq as TimeLockParams, hr as TimeLockResult, hs as TimeWindowedViewingKey, ht as TokenAsset, hu as TokenMetadata, hv as TokenTransfer, hw as ToolResult, hx as ToolsConfig, hy as TransactionData, hz as TransactionSummary, hA as TransportType, hB as Treasury, hC as TrezorConfig, hD as TrezorModel, hE as TrezorWalletAdapter, hF as UnifiedOptimizationProfile, hG as UnifiedOptimizationResult, hH as UnifiedProofConverter, hI as UnlockResult, hJ as UnsupportedVersionError, hK as UnwrapParams, hL as UnwrapResult, hM as VESTA_MODULUS, hN as ValidationCheck, hO as ValidationError, hP as ValidationOptions, hQ as ValidationReport, hR as VerificationOrder, hS as VerificationPipeline, hT as VerificationPipelineConfig, hU as VerificationProgressCallback, hV as VerificationProgressEvent, hW as VerificationResult, hX as VerifyBidParams, hY as VerifyOptions, hZ as ViewingKeyAccessParams, h_ as ViewingKeyDerivationResult, h$ as ViewingKeyScope, i0 as WalletAdapter, i1 as WalletError, i2 as WalletSyncState, i3 as WarmingResult, i4 as WebhookHandler, i5 as WebhookHandlerConfig, i6 as WebhookProcessResult, i7 as WebhookRequest, i8 as WrapParams, i9 as WrapResult, ia as ZcashNativeBackend, ib as ZcashNativeBackendConfig, ic as ZcashQuote, id as ZcashQuoteParams, ie as ZcashRPCClient, ig as ZcashRPCError, ih as ZcashRpcConfig, ii as ZcashShieldedService, ij as ZcashShieldedServiceConfig, ik as ZcashSwapParams, il as ZcashSwapResult, im as ZcashSwapService, io as ZcashSwapServiceConfig, ip as ZcashSwapSourceChain, iq as ZcashSwapSourceToken, ir as ZcashSwapStatus, is as addBlindings, it as addBlindingsNEAR, iu as addCommitments, iv as addCommitmentsNEAR, iw as addOracle, ix as analyzeAddressReuse, iy as analyzeTemporalPatterns, iz as aptosAddressToAuthKey, iA as assertNoLocalhost, iB as attachProofs, iC as base58ToHex, iD as bnbOptimizations, iE as bpsToPercent, iF as browserBytesToHex, iG as browserHexToBytes, iH as cacheKeyGenerator, iI as calculateFeeForSwap, iJ as calculatePrivacyScore, iK as calculateSIPComparison, iL as checkAptosStealthAddress, iM as checkEd25519StealthAddress, iN as checkEd25519StealthAddressV1, iP as checkNEARStealthAddress, iQ as checkProxyAvailability, iR as checkSecp256k1StealthAddressV1, iS as checkStealthAddress, iT as checkSuiStealthAddress, iU as claimStealthPayment, iV as commit, iW as commitNEAR, iX as commitNEP141Token, iY as commitZero, iZ as compareCrossChainCosts, i_ as computeAttestationHash, i$ as computeNEARViewingKeyHash, j0 as computeNEARViewingKeyHashFromPrivate, j1 as computeTweakedKey, j2 as configureLogger, j3 as convertFromSIP, j4 as convertToSIP, j5 as createAnalyzeWalletTool, j6 as createAnnouncementMemo, j7 as createCacheKeyGenerator, j8 as createCommitment, j9 as createCrossSystemValidator, ja as createDevnetVerifier, jb as createEthereumAdapter, jc as createExplainTool, jd as createFeeCalculator, je as createFileCache, jf as createHalo2Converter, jg as createHeliusEnhanced, jh as createIndexedDBCache, ji as createJitoRelayer, jj as createKeySpendOnlyOutput, jk as createKimchiConverter, jl as createLRUCache, jm as createLedgerAdapter, jn as createLogger, jo as createMainnetFeeContract, jp as createMainnetRelayer, jq as createMainnetVerifier, jr as createMockAttestation, js as createMockEthereumAdapter, jt as createMockEthereumProvider, ju as createMockLedgerAdapter, jv as createMockSolanaAdapter, jw as createMockSolanaConnection, jx as createMockSolanaProvider, jy as createMockSolver, jz as createMockSyncProvider, jA as createMockTrezorAdapter, jB as createMultiTierCache, jC as createNEARAnnouncementMemo, jD as createNEARFeeContract, jE as createNEARIntentsAdapter, jF as createNEARIntentsBackend, jG as createNEARMemoryStorage, jH as createNetworkPrivacyClient, jI as createNoirConverter, jJ as createOracleRegistry, jK as createPersistentCache, jL as createPrivacyAdvisor, jM as createPrivacyAdvisorTools, jN as createPrivacyLogger, jO as createPrivateOwnership, jP as createPrivateVoting, jQ as createProductionConfig, jR as createProductionSIP, jS as createProofAggregator, jT as createProofOrchestrator, jU as createProvider, jV as createProxiedFetch, jW as createProxyAgent, jX as createQuickScoreTool, jY as createSIP, jZ as createSIPComparisonTool, j_ as createSameChainExecutor, j$ as createSealedBidAuction, k0 as createShieldedIntent, k1 as createShieldedPayment, k2 as createSmartRouter, k3 as createSolanaAdapter, k4 as createSurveillanceAnalyzer, k5 as createSyncManager, k6 as createSyncState, k7 as createTaprootOutput, k8 as createTestnetFeeContract, k9 as createTimeWindowedKey, ka as createTrezorAdapter, kb as createUnifiedConverter, kc as createVerificationPipeline, kd as createWalletFactory, ke as createWebhookHandler, kf as createZcashClient, kg as createZcashNativeBackend, kh as createZcashShieldedService, ki as createZcashSwapService, kj as decodeStealthMetaAddress, kk as decodeTaprootAddress, kl as decryptMemo, km as decryptWithNEARViewing, kn as decryptWithViewing, ko as defaultRegistry, kp as deriveAptosStealthPrivateKey, kq as deriveEd25519StealthPrivateKey, kr as deriveEd25519StealthPrivateKeyV1, ks as deriveNEARChildViewingKey, kt as deriveNEARStealthPrivateKey, ku as deriveObliviousNullifier, kv as deriveOracleId, kw as deriveSecp256k1StealthPrivateKeyV1, kx as deriveStealthPrivateKey, ky as deriveStealthPrivateKeyV1, kz as deriveSuiStealthPrivateKey, kA as deriveTraditionalNullifier, kB as deriveViewingKey, kC as deserializeAttestationMessage, kD as deserializeIntent, kE as deserializePayment, kF as detectChainFamily, kG as detectClusters, kH as detectEthereumWallets, kI as detectExchangeExposure, kL as detectSolanaWallets, kM as detectTorPort, kN as ed25519PublicKeyToAptosAddress, kO as ed25519PublicKeyToImplicitAccount, kP as ed25519PublicKeyToNearAddress, kQ as ed25519PublicKeyToSolanaAddress, kR as ed25519PublicKeyToSuiAddress, kS as encodeNEARStealthMetaAddress, kT as encodeStealthMetaAddress, kU as encryptForNEARViewing, kV as encryptForViewing, kW as estimateComputeUnits, kX as estimateFee, kY as estimatePrivateTransferFee, kZ as evmOptimizations, k_ as exportNEARViewingKey, k$ as exportTransactions, l0 as featureNotSupportedError, l1 as fetchAttestation, l2 as fetchWalletAttestations, l3 as formatFee, l4 as formatStablecoinAmount, l5 as fromHex, l6 as fromStablecoinUnits, l7 as fromYoctoNEAR, l8 as generateAptosStealthAddress, l9 as generateBlinding, la as generateBlindingNEAR, lb as generateCosmosStealthAddress, lc as generateCosmosStealthMetaAddress, ld as generateEd25519StealthAddress, le as generateEd25519StealthMetaAddress, lf as generateIntentId, lg as generateNEARStealthAddress, lh as generateNEARStealthMetaAddress, li as generateNEARViewingKeyFromSpending, lj as generatePdfReport, lk as generateRandomBytes, ll as generateRandomNEARViewingKey, lm as generateStealthAddress, ln as generateStealthMetaAddress, lo as generateSuiStealthAddress, lp as generateSyncRandomness, lq as generateViewingKey, lr as getActiveOracles, ls as getAsset, lt as getAvailableTransports, lu as getBrowserInfo, lw as getChainCharacteristics, lx as getChainNumericId, ly as getChainsForStablecoin, lz as getCurrentEpoch, lA as getCurveForChain, lB as getDefaultRpcEndpoint, lC as getDerivationPath, lD as getErrorMessage, lE as getEthereumProvider, lF as getGenerators, lG as getGeneratorsNEAR, lH as getIntentSummary, lI as getLogLevelName, lK as getNEARAccountExplorerUrl, lL as getNEARExplorerUrl, lM as getNEARTokenContract, lN as getNEARViewingPublicKey, lO as getNativeToken, lQ as getPaymentSummary, lR as getPaymentTimeRemaining, lS as getPrivacyConfig, lT as getPrivacyDescription, lU as getProductionUrl, lV as getProxyFromEnv, lW as getSolanaExplorerUrl, lX as getSolanaProvider, lY as getSolanaTokenDecimals, lZ as getStablecoin, l_ as getStablecoinInfo, l$ as getStablecoinsForChain, m0 as getStealthBalance, m1 as getSupportedSameChainChains, m2 as getSupportedStablecoins, m3 as getTimeRemaining, m4 as getTokenByAddress, m5 as getTokenDecimals, m6 as getTokenMint, m7 as getTokensForChain, m8 as getTransactionByHash, m9 as getTransactionCount, ma as getTransactionHistory, mb as getTransactionSummary, mc as getXOnlyPublicKey, md as hasEnoughOracles, me as hasErrorCode, mf as hasRequiredProofs, mg as hasTokenAccount, mh as hash, mi as hexToNumber, mj as implicitAccountToEd25519PublicKey, mk as importNEARViewingKey, ml as isBrowser, mm as isEd25519Chain, mn as isExpired, mo as isImplicitAccount, mp as isKnownToken, mq as isLevelEnabled, mr as isLocalhostAllowed, ms as isLocalhostUrl, mt as isNEARAnnouncementForViewingKey, mu as isNamedAccount, mv as isNoirCircuitType, mw as isNonNegativeAmount, mx as isNoteInWindow, my as isPaymentExpired, mz as isPrivateWalletAdapter, mA as isProductionEnvironment, mB as isSIPError, mC as isSameChainSupported, mD as isSecurityError, mE as isStablecoin, mF as isStablecoinOnChain, mG as isSyncRandomnessValid, mI as isTorAvailable, mJ as isValidAmount, mK as isValidAptosAddress, mL as isValidChainId, mM as isValidCompressedPublicKey, mN as isValidCosmosAddress, mO as isValidEd25519PublicKey, mP as isValidHex, mQ as isValidHexLength, mR as isValidNEARAccountId, mS as isValidNearAccountId, mT as isValidNearImplicitAddress, mU as isValidPrivacyLevel, mV as isValidPrivateKey, mW as isValidScalar, mX as isValidSlippage, mY as isValidSolanaAddress, mZ as isValidSolanaProof, m_ as isValidStealthMetaAddress, m$ as isValidSuiAddress, n0 as isValidTaprootAddress, n1 as logger, n2 as maskAmount, n3 as nearAddressToEd25519PublicKey, n4 as normalizeAddress, n5 as normalizeSuiAddress, n6 as notConnectedError, n7 as parseAnnouncement, n8 as parseNEARAnnouncement, n9 as parseNEARStealthMetaAddress, na as parseProxyConfig, nb as parseStealthAddress, nc as percentToBps, nd as privacyLogger, ne as processWebhookTransaction, nf as proveOwnership, ng as publicKeyToEthAddress, nh as recommendCheapestChain, ni as recommendProfile, nj as redactAddress, nk as redactSensitiveData, nl as redactSignature, nm as registerWallet, nn as removeOracle, no as rotateCircuit, np as scanForPayments, nq as schnorrSign, nr as schnorrSignHex, ns as schnorrVerify, nt as schnorrVerifyHex, nu as secureWipe, nv as secureWipeAll, nw as selectOptimalConfig, nx as sendPrivateSPLTransfer, ny as serializeAttestationMessage, nz as serializeIntent, nA as serializePayment, nB as setLogLevel, nC as signAttestationMessage, nD as silenceLogger, nE as solanaAddressToEd25519PublicKey, nF as solanaOptimizations, nG as solanaPublicKeyToHex, nH as stealthKeyToCosmosAddress, nI as subtractBlindings, nJ as subtractBlindingsNEAR, nK as subtractCommitments, nL as subtractCommitmentsNEAR, nM as supportsSharedArrayBuffer, nQ as supportsWebBluetooth, nR as supportsWebHID, nS as supportsWebUSB, nT as supportsWebWorkers, nU as taprootAddress, nV as toHex, nW as toStablecoinUnits, nX as toYoctoNEAR, nY as trackIntent, nZ as trackPayment, n_ as updateOracleStatus, n$ as updateSyncState, o0 as validateAsset, o1 as validateCreateIntentParams, o2 as validateIntentInput, o3 as validateIntentOutput, o4 as validateNEARStealthAddress, o5 as validateNEARStealthMetaAddress, o6 as validateNEARViewingKey, o7 as validateProductionConfig, o8 as validateScalar, o9 as validateViewingKey, oa as verifyAttestation, ob as verifyAttestationSignature, oc as verifyAuthToken, od as verifyCommitment, oe as verifyNEP141TokenCommitment, of as verifyOpening, og as verifyOpeningNEAR, oh as verifyOracleSignature, oi as verifyOwnership, oj as verifyWebhookSignature, ok as walletRegistry, ol as withSecureBuffer, om as withSecureBufferSync, on as wrapError } from './index-mw7KGX5M.js';
|
|
2
2
|
export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, ComposedProof, ComposedProofStatus, CompositionError, CompositionErrorCode, CompositionEvent, CompositionEventListener, CompositionEventType, CompositionMetadata, CompositionMetrics, CompositionProgressEvent, CompositionResult, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, CreatePrivateOwnershipParams, CreateTreasuryParams, DEFAULT_COMPOSITION_CONFIG, DefuseAssetId, DisclosedTransaction, DisclosureRequest, FulfillmentCommitment, FulfillmentProof, FulfillmentRequest, FulfillmentResult, FulfillmentStatus, GenerateReportParams, Hash, HexString, WalletAdapter as IWalletAdapter, IndividualVerificationResult, IntentStatus, NATIVE_TOKENS, OneClickConfig, OneClickDepositMode, OneClickErrorCode, OneClickQuoteRequest, OneClickQuoteResponse, OneClickStatusResponse, OneClickSwapStatus, OneClickSwapType, OwnershipProof, OwnershipVerification, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateNFTOwnership, PrivateWalletAdapter, ProofAggregationStrategy, ProofCompositionConfig, ProofMetadata, ProofProviderCapabilities, ProofProviderMetrics, ProofProviderStatus, ProofSystem, VerificationResult as ProofVerificationResult, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, ProveOwnershipParams, Quote, RegisterAuditorParams, ReportData, ReportFormat, ReportStatus, ReportStatusType, ReportType, SIPSolver, SIP_VERSION, ShieldedIntent, ShieldedPayment, Signature, SignedTransaction, SingleProof, Solver, SolverCapabilities, SolverEvent, SolverEventListener, SolverQuote, SolverVisibleIntent, StablecoinSymbol, StealthAddress, StealthAddressRecovery, StealthMetaAddress, SwapRoute, SwapRouteStep, TrackedIntent, TrackedPayment, TransactionReceipt, TreasuryBalance, TreasuryConfig, TreasuryMember, TreasuryProposal, TreasuryRole, TreasuryTransaction, UnsignedTransaction, VerificationHints, ViewingKey, WalletAccountChangedEvent, WalletAdapterFactory, WalletChainChangedEvent, WalletConnectEvent, WalletConnectionState, WalletDisconnectEvent, WalletErrorCode, WalletErrorEvent, WalletEvent, WalletEventHandler, WalletEventType, WalletInfo, WalletRegistryEntry, WalletShieldedSendParams, WalletShieldedSendResult, ZKProof, ZcashAccountAddress, ZcashAccountBalance, ZcashAddressInfo, ZcashAddressType, ZcashBlock, ZcashBlockHeader, ZcashBlockchainInfo, ZcashConfig, ZcashErrorCode, ZcashNetwork, ZcashNetworkInfo, ZcashNewAccount, ZcashOperation, ZcashOperationError, ZcashOperationStatus, ZcashOperationTxResult, ZcashPool, ZcashPoolBalance, ZcashPrivacyPolicy, ZcashReceiverType, ZcashSendRecipient, ZcashShieldedSendParams, ZcashUnspentNote, isPrivate, supportsViewingKey } from '@sip-protocol/types';
|
|
3
3
|
export { a as FulfillmentProofParams, F as FundingProofParams, N as NoirProviderConfig, O as OracleAttestation, b as ProofFramework, c as ProofGenerationError, d as ProofProvider, P as ProofResult, V as ValidityProofParams } from './noir-CwPIyBLj.js';
|
|
4
4
|
export { A as AggregateProofsOptions, a as AggregationResult, C as CacheStats, b as CompatibilityMatrix, c as ComposableProofProvider, d as ComposeProofsOptions, e as CompositionTimeoutError, f as ConversionResult, g as ConvertProofOptions, f as ConverterConversionResult, F as FallbackConfig, I as IncompatibleSystemsError, P as ProofCacheEntry, h as ProofComposer, i as ProofCompositionError, j as ProofGenerationRequest, k as ProofGenerationResult, l as ProofProviderFactory, m as ProofProviderRegistration, n as ProofProviderRegistry, o as ProofTelemetry, p as ProofTelemetryMetrics, q as ProviderNotFoundError, R as RegisterProviderOptions, S as SystemCompatibility, T as TelemetryCollector, V as VerifyComposedProofOptions, W as WorkerPoolConfig, r as WorkerPoolStatus } from './interface-CQi0-WfS.js';
|
package/dist/index.js
CHANGED
|
@@ -1167,9 +1167,12 @@ function generateSecp256k1StealthAddress(recipientMetaAddress) {
|
|
|
1167
1167
|
viewingKeyBytes
|
|
1168
1168
|
);
|
|
1169
1169
|
const sharedSecretHash = (0, import_sha256.sha256)(sharedSecretPoint);
|
|
1170
|
-
const
|
|
1170
|
+
const hashScalar = bytesToBigInt(sharedSecretHash) % import_secp256k1.secp256k1.CURVE.n;
|
|
1171
|
+
if (hashScalar === 0n) {
|
|
1172
|
+
throw new Error("CRITICAL: zero hash scalar after reduction - investigate hash computation");
|
|
1173
|
+
}
|
|
1171
1174
|
const spendingKeyPoint = import_secp256k1.secp256k1.ProjectivePoint.fromHex(spendingKeyBytes);
|
|
1172
|
-
const hashTimesGPoint = import_secp256k1.secp256k1.ProjectivePoint.
|
|
1175
|
+
const hashTimesGPoint = import_secp256k1.secp256k1.ProjectivePoint.BASE.multiply(hashScalar);
|
|
1173
1176
|
const stealthPoint = spendingKeyPoint.add(hashTimesGPoint);
|
|
1174
1177
|
const stealthAddressBytes = stealthPoint.toRawBytes(true);
|
|
1175
1178
|
const viewTag = sharedSecretHash[0];
|
|
@@ -1287,9 +1290,12 @@ function checkSecp256k1StealthAddress(stealthAddress, viewingPrivateKey, spendin
|
|
|
1287
1290
|
if (sharedSecretHash[0] !== stealthAddress.viewTag) {
|
|
1288
1291
|
return false;
|
|
1289
1292
|
}
|
|
1290
|
-
const
|
|
1293
|
+
const hashScalar = bytesToBigInt(sharedSecretHash) % import_secp256k1.secp256k1.CURVE.n;
|
|
1294
|
+
if (hashScalar === 0n) {
|
|
1295
|
+
return false;
|
|
1296
|
+
}
|
|
1291
1297
|
const expectedPoint = import_secp256k1.secp256k1.ProjectivePoint.fromHex(spendingPubBytes).add(
|
|
1292
|
-
import_secp256k1.secp256k1.ProjectivePoint.
|
|
1298
|
+
import_secp256k1.secp256k1.ProjectivePoint.BASE.multiply(hashScalar)
|
|
1293
1299
|
);
|
|
1294
1300
|
const providedAddress = (0, import_utils2.hexToBytes)(stealthAddress.address.slice(2));
|
|
1295
1301
|
return (0, import_utils2.bytesToHex)(expectedPoint.toRawBytes(true)) === (0, import_utils2.bytesToHex)(providedAddress);
|
|
@@ -18279,6 +18285,8 @@ __export(index_exports, {
|
|
|
18279
18285
|
SIPError: () => SIPError,
|
|
18280
18286
|
SIPNativeBackend: () => SIPNativeBackend,
|
|
18281
18287
|
SIP_MEMO_PREFIX: () => SIP_MEMO_PREFIX,
|
|
18288
|
+
SIP_MEMO_PREFIX_ANY: () => SIP_MEMO_PREFIX_ANY,
|
|
18289
|
+
SIP_MEMO_PREFIX_V2: () => SIP_MEMO_PREFIX_V2,
|
|
18282
18290
|
SIP_VERSION: () => import_types84.SIP_VERSION,
|
|
18283
18291
|
SOLANA_EXPLORER_URLS: () => SOLANA_EXPLORER_URLS,
|
|
18284
18292
|
SOLANA_RPC_ENDPOINTS: () => SOLANA_RPC_ENDPOINTS3,
|
|
@@ -41078,6 +41086,8 @@ var NEAR_TOKEN_DECIMALS = {
|
|
|
41078
41086
|
stNEAR: 24
|
|
41079
41087
|
};
|
|
41080
41088
|
var SIP_MEMO_PREFIX2 = "SIP:1:";
|
|
41089
|
+
var SIP_MEMO_PREFIX_V22 = "SIP:2:";
|
|
41090
|
+
var SIP_MEMO_PREFIX_ANY2 = "SIP:";
|
|
41081
41091
|
var NEAR_IMPLICIT_ACCOUNT_LENGTH = 64;
|
|
41082
41092
|
var NEAR_ACCOUNT_ID_MIN_LENGTH = 2;
|
|
41083
41093
|
var NEAR_ACCOUNT_ID_MAX_LENGTH = 64;
|
|
@@ -41248,10 +41258,12 @@ function parseAnnouncement2(memo) {
|
|
|
41248
41258
|
if (!memo || typeof memo !== "string") {
|
|
41249
41259
|
return null;
|
|
41250
41260
|
}
|
|
41251
|
-
|
|
41261
|
+
const versionMatch = /^SIP:([12]):/.exec(memo);
|
|
41262
|
+
if (!versionMatch) {
|
|
41252
41263
|
return null;
|
|
41253
41264
|
}
|
|
41254
|
-
const
|
|
41265
|
+
const version = versionMatch[1];
|
|
41266
|
+
const content = memo.slice(versionMatch[0].length);
|
|
41255
41267
|
const parts = content.split(":");
|
|
41256
41268
|
if (parts.length < 2) {
|
|
41257
41269
|
return null;
|
|
@@ -41268,6 +41280,7 @@ function parseAnnouncement2(memo) {
|
|
|
41268
41280
|
return null;
|
|
41269
41281
|
}
|
|
41270
41282
|
return {
|
|
41283
|
+
version,
|
|
41271
41284
|
ephemeralPublicKey: `0x${ephemeralKeyHex.toLowerCase()}`,
|
|
41272
41285
|
viewTag
|
|
41273
41286
|
};
|
|
@@ -41275,7 +41288,7 @@ function parseAnnouncement2(memo) {
|
|
|
41275
41288
|
function createAnnouncementMemo2(ephemeralPublicKey, viewTag) {
|
|
41276
41289
|
const ephemeralKeyHex = ephemeralPublicKey.slice(2);
|
|
41277
41290
|
const viewTagHex = viewTag.toString(16).padStart(2, "0");
|
|
41278
|
-
return `${
|
|
41291
|
+
return `${SIP_MEMO_PREFIX_V22}${ephemeralKeyHex}:${viewTagHex}`;
|
|
41279
41292
|
}
|
|
41280
41293
|
|
|
41281
41294
|
// src/wallet/near/my-near-wallet.ts
|
|
@@ -44748,7 +44761,7 @@ var NEARStealthScanner = class {
|
|
|
44748
44761
|
parseAnnouncementsFromLogs(logs) {
|
|
44749
44762
|
const announcements = [];
|
|
44750
44763
|
for (const log6 of logs) {
|
|
44751
|
-
if (!log6.includes(
|
|
44764
|
+
if (!log6.includes(SIP_MEMO_PREFIX_ANY2)) {
|
|
44752
44765
|
continue;
|
|
44753
44766
|
}
|
|
44754
44767
|
const parsed = parseAnnouncement2(log6);
|
|
@@ -52644,6 +52657,8 @@ async function calculateFeeForSwap(contract, swapAmount, swapAmountUsd, sourceCh
|
|
|
52644
52657
|
SIPError,
|
|
52645
52658
|
SIPNativeBackend,
|
|
52646
52659
|
SIP_MEMO_PREFIX,
|
|
52660
|
+
SIP_MEMO_PREFIX_ANY,
|
|
52661
|
+
SIP_MEMO_PREFIX_V2,
|
|
52647
52662
|
SIP_VERSION,
|
|
52648
52663
|
SOLANA_EXPLORER_URLS,
|
|
52649
52664
|
SOLANA_RPC_ENDPOINTS,
|
package/dist/index.mjs
CHANGED
|
@@ -448,7 +448,7 @@ import {
|
|
|
448
448
|
verifyOracleSignature,
|
|
449
449
|
verifyOwnership,
|
|
450
450
|
walletRegistry
|
|
451
|
-
} from "./chunk-
|
|
451
|
+
} from "./chunk-L4RKPNIJ.mjs";
|
|
452
452
|
import {
|
|
453
453
|
DEFAULT_NETWORK_CONFIG,
|
|
454
454
|
DEFAULT_PROXY_TIMEOUT,
|
|
@@ -540,7 +540,7 @@ import {
|
|
|
540
540
|
verifyWebhookSignature,
|
|
541
541
|
withSecureBuffer,
|
|
542
542
|
withSecureBufferSync
|
|
543
|
-
} from "./chunk-
|
|
543
|
+
} from "./chunk-7IUKXWDN.mjs";
|
|
544
544
|
import {
|
|
545
545
|
Halo2Provider,
|
|
546
546
|
KimchiProvider,
|
|
@@ -574,6 +574,8 @@ import {
|
|
|
574
574
|
ETH_RPC_ENDPOINTS,
|
|
575
575
|
MEMO_PROGRAM_ID,
|
|
576
576
|
SIP_MEMO_PREFIX,
|
|
577
|
+
SIP_MEMO_PREFIX_ANY,
|
|
578
|
+
SIP_MEMO_PREFIX_V2,
|
|
577
579
|
SOLANA_EXPLORER_URLS,
|
|
578
580
|
SOLANA_RPC_ENDPOINTS,
|
|
579
581
|
SOLANA_RPC_ENDPOINTS2,
|
|
@@ -741,6 +743,8 @@ export {
|
|
|
741
743
|
SIPError,
|
|
742
744
|
SIPNativeBackend,
|
|
743
745
|
SIP_MEMO_PREFIX,
|
|
746
|
+
SIP_MEMO_PREFIX_ANY,
|
|
747
|
+
SIP_MEMO_PREFIX_V2,
|
|
744
748
|
SIP_VERSION,
|
|
745
749
|
SOLANA_EXPLORER_URLS,
|
|
746
750
|
SOLANA_RPC_ENDPOINTS2 as SOLANA_RPC_ENDPOINTS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Core SDK for Shielded Intents Protocol - Privacy layer for cross-chain transactions",
|
|
5
5
|
"author": "SIP Protocol <hello@sip-protocol.org>",
|
|
6
6
|
"homepage": "https://sip-protocol.org",
|
|
@@ -67,6 +67,7 @@ export type {
|
|
|
67
67
|
EthereumPrivacyAdapterState,
|
|
68
68
|
EthereumScanRecipient,
|
|
69
69
|
EthereumDetectedPaymentResult,
|
|
70
|
+
EthereumViewOnlyDetectionResult,
|
|
70
71
|
} from './types'
|
|
71
72
|
|
|
72
73
|
// ─── Stealth Addresses ────────────────────────────────────────────────────────
|
|
@@ -85,6 +86,7 @@ export {
|
|
|
85
86
|
deriveEthereumStealthPrivateKey,
|
|
86
87
|
checkEthereumStealthAddress,
|
|
87
88
|
checkEthereumStealthByEthAddress,
|
|
89
|
+
checkEthereumStealthByEthAddressViewOnly,
|
|
88
90
|
stealthPublicKeyToEthAddress,
|
|
89
91
|
extractPublicKeys,
|
|
90
92
|
createMetaAddressFromPublicKeys,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
deriveEthereumStealthPrivateKey,
|
|
19
19
|
checkEthereumStealthAddress,
|
|
20
20
|
checkEthereumStealthByEthAddress,
|
|
21
|
+
checkEthereumStealthByEthAddressViewOnly,
|
|
21
22
|
stealthPublicKeyToEthAddress,
|
|
22
23
|
type EthereumStealthMetaAddress,
|
|
23
24
|
type EthereumStealthAddress,
|
|
@@ -59,6 +60,7 @@ import type {
|
|
|
59
60
|
EthereumPrivacyAdapterState,
|
|
60
61
|
EthereumScanRecipient,
|
|
61
62
|
EthereumDetectedPaymentResult,
|
|
63
|
+
EthereumViewOnlyDetectionResult,
|
|
62
64
|
EthereumViewingKeyExport,
|
|
63
65
|
EthereumViewingKeyPair,
|
|
64
66
|
EthereumPedersenCommitment,
|
|
@@ -589,6 +591,11 @@ export class EthereumPrivacyAdapter {
|
|
|
589
591
|
|
|
590
592
|
// Check each recipient
|
|
591
593
|
for (const recipient of this.scanRecipients.values()) {
|
|
594
|
+
// The full scan derives the claimable key, which needs the spending private key.
|
|
595
|
+
// View-only recipients (no spending private key) are handled by scanAnnouncementsViewOnly.
|
|
596
|
+
if (!recipient.spendingPrivateKey) {
|
|
597
|
+
continue
|
|
598
|
+
}
|
|
592
599
|
// Use ETH address comparison since announcements store 20-byte addresses
|
|
593
600
|
// Returns the stealth private key if match found, null otherwise
|
|
594
601
|
const stealthPrivateKey = checkEthereumStealthByEthAddress(
|
|
@@ -620,6 +627,55 @@ export class EthereumPrivacyAdapter {
|
|
|
620
627
|
return results
|
|
621
628
|
}
|
|
622
629
|
|
|
630
|
+
/**
|
|
631
|
+
* Scan announcements for incoming payments — VIEW-ONLY.
|
|
632
|
+
*
|
|
633
|
+
* Detects payments using each registered recipient's viewing private key + spending
|
|
634
|
+
* public key only (never the spending private key), so a compliance auditor or a
|
|
635
|
+
* delegated watcher can find incoming payments without spend authority. Results carry
|
|
636
|
+
* no derived private key — claim by deriving it separately at claim time (with both
|
|
637
|
+
* private keys).
|
|
638
|
+
*
|
|
639
|
+
* @param announcements - Announcements to scan
|
|
640
|
+
* @returns Detected payments (without private keys)
|
|
641
|
+
*/
|
|
642
|
+
scanAnnouncementsViewOnly(
|
|
643
|
+
announcements: EthereumAnnouncement[]
|
|
644
|
+
): EthereumViewOnlyDetectionResult[] {
|
|
645
|
+
const results: EthereumViewOnlyDetectionResult[] = []
|
|
646
|
+
|
|
647
|
+
for (const announcement of announcements) {
|
|
648
|
+
const stealthAddress = announcementToStealthAddress(announcement)
|
|
649
|
+
|
|
650
|
+
for (const recipient of this.scanRecipients.values()) {
|
|
651
|
+
const isMatch = checkEthereumStealthByEthAddressViewOnly(
|
|
652
|
+
announcement.stealthAddress,
|
|
653
|
+
announcement.ephemeralPublicKey,
|
|
654
|
+
announcement.viewTag,
|
|
655
|
+
recipient.spendingPublicKey,
|
|
656
|
+
recipient.viewingPrivateKey,
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
if (isMatch) {
|
|
660
|
+
results.push({
|
|
661
|
+
payment: {
|
|
662
|
+
stealthAddress,
|
|
663
|
+
stealthEthAddress: announcement.stealthAddress,
|
|
664
|
+
txHash: announcement.txHash!,
|
|
665
|
+
blockNumber: announcement.blockNumber!,
|
|
666
|
+
logIndex: announcement.logIndex,
|
|
667
|
+
timestamp: announcement.timestamp,
|
|
668
|
+
},
|
|
669
|
+
recipient,
|
|
670
|
+
})
|
|
671
|
+
break // Found owner, no need to check other recipients
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
return results
|
|
677
|
+
}
|
|
678
|
+
|
|
623
679
|
/**
|
|
624
680
|
* Get topics for filtering announcement logs
|
|
625
681
|
*
|
|
@@ -460,6 +460,78 @@ export function checkEthereumStealthByEthAddress(
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
/**
|
|
464
|
+
* View-only check of an Ethereum stealth announcement by ETH address.
|
|
465
|
+
*
|
|
466
|
+
* Detects whether a payment was intended for this recipient using only the viewing
|
|
467
|
+
* PRIVATE key and the spending PUBLIC key — never the spending private key (which is
|
|
468
|
+
* required to claim, not to detect). Recomputes the expected stealth public key as
|
|
469
|
+
* `A = K_spend + H(S)*G` (point arithmetic on the spending public key), converts it to an
|
|
470
|
+
* ETH address, and compares. Mirrors {@link checkEthereumStealthByEthAddress} but without
|
|
471
|
+
* the spending private key and returning a boolean rather than the derived key.
|
|
472
|
+
*
|
|
473
|
+
* @param ethAddress - The ETH address from the announcement (20 bytes)
|
|
474
|
+
* @param ephemeralPublicKey - Ephemeral public key from the announcement
|
|
475
|
+
* @param viewTag - View tag from the announcement
|
|
476
|
+
* @param spendingPublicKey - Recipient's spending public key (meta-address spendingKey)
|
|
477
|
+
* @param viewingPrivateKey - Recipient's viewing private key
|
|
478
|
+
* @returns True if the address belongs to this recipient
|
|
479
|
+
*/
|
|
480
|
+
export function checkEthereumStealthByEthAddressViewOnly(
|
|
481
|
+
ethAddress: HexString,
|
|
482
|
+
ephemeralPublicKey: HexString,
|
|
483
|
+
viewTag: number,
|
|
484
|
+
spendingPublicKey: HexString,
|
|
485
|
+
viewingPrivateKey: HexString,
|
|
486
|
+
): boolean {
|
|
487
|
+
if (!isValidPrivateKey(viewingPrivateKey)) {
|
|
488
|
+
throw new ValidationError(
|
|
489
|
+
'must be a valid 32-byte hex string',
|
|
490
|
+
'viewingPrivateKey'
|
|
491
|
+
)
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
const viewingPrivBytes = hexToBytes(viewingPrivateKey.slice(2))
|
|
495
|
+
const spendingPubBytes = hexToBytes(spendingPublicKey.slice(2))
|
|
496
|
+
const ephemeralPubBytes = hexToBytes(ephemeralPublicKey.slice(2))
|
|
497
|
+
|
|
498
|
+
try {
|
|
499
|
+
// Compute shared secret: S = viewingPrivateKey * ephemeralPublicKey
|
|
500
|
+
// Canonical EIP-5564: ECDH on the viewing key (mirrors generation S = r * K_view)
|
|
501
|
+
const sharedSecretPoint = secp256k1.getSharedSecret(
|
|
502
|
+
viewingPrivBytes,
|
|
503
|
+
ephemeralPubBytes,
|
|
504
|
+
)
|
|
505
|
+
const sharedSecretHash = sha256(sharedSecretPoint)
|
|
506
|
+
|
|
507
|
+
// Quick view tag check
|
|
508
|
+
if (sharedSecretHash[0] !== viewTag) {
|
|
509
|
+
return false
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// Expected stealth address: A = K_spend + hash(S)*G — point arithmetic on the spending
|
|
513
|
+
// PUBLIC key, so no spending private key is needed. Reduce hash(S) into [1, n-1] (a zero
|
|
514
|
+
// offset would be degenerate) before scaling the generator.
|
|
515
|
+
const hashScalar = BigInt('0x' + bytesToHex(sharedSecretHash)) % secp256k1.CURVE.n
|
|
516
|
+
if (hashScalar === 0n) {
|
|
517
|
+
return false
|
|
518
|
+
}
|
|
519
|
+
const spendingPubPoint = secp256k1.ProjectivePoint.fromHex(spendingPubBytes)
|
|
520
|
+
const expectedPoint = spendingPubPoint.add(
|
|
521
|
+
secp256k1.ProjectivePoint.BASE.multiply(hashScalar),
|
|
522
|
+
)
|
|
523
|
+
const expectedPubKey = expectedPoint.toRawBytes(true)
|
|
524
|
+
|
|
525
|
+
// Convert to ETH address and compare (case-insensitive)
|
|
526
|
+
const expectedPubKeyHex = ('0x' + bytesToHex(expectedPubKey)) as HexString
|
|
527
|
+
const expectedEthAddress = publicKeyToEthAddress(expectedPubKeyHex)
|
|
528
|
+
|
|
529
|
+
return expectedEthAddress.toLowerCase() === ethAddress.toLowerCase()
|
|
530
|
+
} catch {
|
|
531
|
+
return false
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
463
535
|
// ─── Address Conversion ─────────────────────────────────────────────────────
|
|
464
536
|
|
|
465
537
|
/**
|
|
@@ -441,8 +441,12 @@ export interface EthereumScanRecipient {
|
|
|
441
441
|
viewingPrivateKey: HexString
|
|
442
442
|
/** Spending public key */
|
|
443
443
|
spendingPublicKey: HexString
|
|
444
|
-
/**
|
|
445
|
-
|
|
444
|
+
/**
|
|
445
|
+
* Spending private key — required to derive claimable keys during a full scan
|
|
446
|
+
* (`scanAnnouncements`). Optional for view-only registration: a recipient with only
|
|
447
|
+
* `viewingPrivateKey` + `spendingPublicKey` detects payments via `scanAnnouncementsViewOnly`.
|
|
448
|
+
*/
|
|
449
|
+
spendingPrivateKey?: HexString
|
|
446
450
|
/** Optional label */
|
|
447
451
|
label?: string
|
|
448
452
|
}
|
|
@@ -458,3 +462,15 @@ export interface EthereumDetectedPaymentResult {
|
|
|
458
462
|
/** Derived stealth private key (for claiming) */
|
|
459
463
|
stealthPrivateKey: HexString
|
|
460
464
|
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* View-only detected payment — carries no derived private key (detection used the
|
|
468
|
+
* spending PUBLIC key only). To claim, derive the stealth private key separately with
|
|
469
|
+
* both private keys at claim time.
|
|
470
|
+
*/
|
|
471
|
+
export interface EthereumViewOnlyDetectionResult {
|
|
472
|
+
/** The detected payment */
|
|
473
|
+
payment: EthereumDetectedPayment
|
|
474
|
+
/** The recipient that matched */
|
|
475
|
+
recipient: EthereumScanRecipient
|
|
476
|
+
}
|
|
@@ -77,11 +77,23 @@ export const NEAR_TOKEN_DECIMALS: Record<string, number> = {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* SIP announcement prefix
|
|
80
|
+
* SIP announcement memo prefix (legacy SIP:1, swapped scheme — read-only back-compat)
|
|
81
81
|
* Format: SIP:1:<ephemeral_pubkey_hex>:<view_tag_hex>
|
|
82
82
|
*/
|
|
83
83
|
export const SIP_MEMO_PREFIX = 'SIP:1:'
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Canonical EIP-5564 (SIP:2) announcement memo prefix — emitted by new sends.
|
|
87
|
+
* Format: SIP:2:<ephemeral_pubkey_hex>:<view_tag_hex>
|
|
88
|
+
*/
|
|
89
|
+
export const SIP_MEMO_PREFIX_V2 = 'SIP:2:'
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Version-agnostic announcement memo prefix for scanning.
|
|
93
|
+
* Matches both SIP:1 (legacy) and SIP:2 (canonical) announcements.
|
|
94
|
+
*/
|
|
95
|
+
export const SIP_MEMO_PREFIX_ANY = 'SIP:'
|
|
96
|
+
|
|
85
97
|
/**
|
|
86
98
|
* NEAR implicit account length (64 hex characters = 32 bytes)
|
|
87
99
|
*/
|
package/src/chains/near/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ import { isValidHex } from '../../validation'
|
|
|
38
38
|
import { checkNEARStealthAddress, implicitAccountToEd25519PublicKey } from './stealth'
|
|
39
39
|
import { parseAnnouncement, type NEARAnnouncement } from './types'
|
|
40
40
|
import {
|
|
41
|
-
|
|
41
|
+
SIP_MEMO_PREFIX_ANY,
|
|
42
42
|
VIEW_TAG_MIN,
|
|
43
43
|
VIEW_TAG_MAX,
|
|
44
44
|
isImplicitAccount,
|
|
@@ -722,7 +722,7 @@ export class NEARStealthScanner {
|
|
|
722
722
|
const announcements: NEARAnnouncement[] = []
|
|
723
723
|
|
|
724
724
|
for (const log of logs) {
|
|
725
|
-
if (!log.includes(
|
|
725
|
+
if (!log.includes(SIP_MEMO_PREFIX_ANY)) {
|
|
726
726
|
continue
|
|
727
727
|
}
|
|
728
728
|
|
package/src/chains/near/types.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { HexString, StealthAddress } from '@sip-protocol/types'
|
|
11
|
-
import {
|
|
11
|
+
import { SIP_MEMO_PREFIX_V2, VIEW_TAG_MIN, VIEW_TAG_MAX } from './constants'
|
|
12
12
|
|
|
13
13
|
// ─── Announcement Types ──────────────────────────────────────────────────────
|
|
14
14
|
|
|
@@ -18,6 +18,8 @@ import { SIP_MEMO_PREFIX, VIEW_TAG_MIN, VIEW_TAG_MAX } from './constants'
|
|
|
18
18
|
* Contains the information needed for recipients to scan for payments.
|
|
19
19
|
*/
|
|
20
20
|
export interface NEARAnnouncement {
|
|
21
|
+
/** Announcement scheme version: '1' = legacy swapped, '2' = canonical EIP-5564 */
|
|
22
|
+
version?: string
|
|
21
23
|
/** Ephemeral public key (ed25519, 0x-prefixed hex) */
|
|
22
24
|
ephemeralPublicKey: HexString
|
|
23
25
|
/** View tag for efficient filtering (0-255) */
|
|
@@ -35,16 +37,21 @@ export interface NEARAnnouncement {
|
|
|
35
37
|
/**
|
|
36
38
|
* Parse an announcement from a NEAR memo string
|
|
37
39
|
*
|
|
38
|
-
*
|
|
40
|
+
* Accepts SIP:1 (legacy swapped scheme) and SIP:2 (canonical EIP-5564); the detected
|
|
41
|
+
* version is returned. NEAR derives canonically regardless, so the version is recorded
|
|
42
|
+
* for consistency rather than to route the claim.
|
|
43
|
+
*
|
|
44
|
+
* Format: SIP:<version>:<ephemeral_pubkey_hex>:<view_tag_hex>
|
|
39
45
|
*
|
|
40
46
|
* @param memo - The memo string to parse
|
|
41
47
|
* @returns Parsed announcement or null if invalid
|
|
42
48
|
*
|
|
43
49
|
* @example
|
|
44
50
|
* ```typescript
|
|
45
|
-
* const memo = 'SIP:
|
|
51
|
+
* const memo = 'SIP:2:1234...abcd:0f'
|
|
46
52
|
* const announcement = parseAnnouncement(memo)
|
|
47
53
|
* if (announcement) {
|
|
54
|
+
* console.log(announcement.version) // '2'
|
|
48
55
|
* console.log(announcement.ephemeralPublicKey)
|
|
49
56
|
* console.log(announcement.viewTag) // 15
|
|
50
57
|
* }
|
|
@@ -55,13 +62,15 @@ export function parseAnnouncement(memo: string): Partial<NEARAnnouncement> | nul
|
|
|
55
62
|
return null
|
|
56
63
|
}
|
|
57
64
|
|
|
58
|
-
//
|
|
59
|
-
|
|
65
|
+
// Accept SIP:1 (legacy) and SIP:2 (canonical); capture the version.
|
|
66
|
+
const versionMatch = /^SIP:([12]):/.exec(memo)
|
|
67
|
+
if (!versionMatch) {
|
|
60
68
|
return null
|
|
61
69
|
}
|
|
70
|
+
const version = versionMatch[1]
|
|
62
71
|
|
|
63
|
-
// Parse parts:
|
|
64
|
-
const content = memo.slice(
|
|
72
|
+
// Parse parts: <ephemeral_pubkey_hex>:<view_tag_hex>
|
|
73
|
+
const content = memo.slice(versionMatch[0].length)
|
|
65
74
|
const parts = content.split(':')
|
|
66
75
|
|
|
67
76
|
if (parts.length < 2) {
|
|
@@ -86,6 +95,7 @@ export function parseAnnouncement(memo: string): Partial<NEARAnnouncement> | nul
|
|
|
86
95
|
}
|
|
87
96
|
|
|
88
97
|
return {
|
|
98
|
+
version,
|
|
89
99
|
ephemeralPublicKey: `0x${ephemeralKeyHex.toLowerCase()}` as HexString,
|
|
90
100
|
viewTag,
|
|
91
101
|
}
|
|
@@ -104,7 +114,7 @@ export function parseAnnouncement(memo: string): Partial<NEARAnnouncement> | nul
|
|
|
104
114
|
* stealthAddress.ephemeralPublicKey,
|
|
105
115
|
* stealthAddress.viewTag
|
|
106
116
|
* )
|
|
107
|
-
* // => 'SIP:
|
|
117
|
+
* // => 'SIP:2:1234...abcd:0f'
|
|
108
118
|
* ```
|
|
109
119
|
*/
|
|
110
120
|
export function createAnnouncementMemo(
|
|
@@ -117,7 +127,8 @@ export function createAnnouncementMemo(
|
|
|
117
127
|
// Convert view tag to 2-char hex
|
|
118
128
|
const viewTagHex = viewTag.toString(16).padStart(2, '0')
|
|
119
129
|
|
|
120
|
-
|
|
130
|
+
// Emit the canonical SIP:2 announcement (EIP-5564). Legacy SIP:1 remains parseable.
|
|
131
|
+
return `${SIP_MEMO_PREFIX_V2}${ephemeralKeyHex}:${viewTagHex}`
|
|
121
132
|
}
|
|
122
133
|
|
|
123
134
|
// ─── Transfer Types ──────────────────────────────────────────────────────────
|
|
@@ -218,7 +218,7 @@ export async function sendPrivateSPLTransfer(
|
|
|
218
218
|
)
|
|
219
219
|
|
|
220
220
|
// 4. Add memo with announcement for recipient scanning
|
|
221
|
-
// Format: SIP:
|
|
221
|
+
// Format: SIP:2:<ephemeral_pubkey_base58>:<view_tag_hex>:<stealth_address_base58>
|
|
222
222
|
// viewTag is a number (0-255), convert to 2-char hex
|
|
223
223
|
const viewTagHex = stealthAddress.viewTag.toString(16).padStart(2, '0')
|
|
224
224
|
const memoContent = createAnnouncementMemo(
|
package/src/index.ts
CHANGED