@sip-protocol/sdk 0.6.16 → 0.6.18
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 +43 -15
- package/dist/browser.mjs +40 -11
- package/dist/{chunk-O33JCQFJ.mjs → chunk-NM5PTCQ5.mjs} +34 -35
- package/dist/{index-DCnkB6GS.d.ts → index-BzKgVQ87.d.ts} +7 -3
- package/dist/{index-CIyqTAkY.d.mts → index-mM-VDYdm.d.mts} +7 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -5
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/intent.ts +7 -5
- package/src/proofs/browser.ts +48 -13
package/dist/browser.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, B as BrowserNoirProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, p as MobileBrowser, q as MobileDeviceInfo, M as MobilePlatform, r as MobileWASMCompatibility, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, f as checkMobileWASMCompatibility, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, c as detectMobileBrowser, d as detectMobilePlatform, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, j as getBrowserVersion, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, e as getMobileDeviceInfo, k as getOSVersion, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, l as isTablet, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, m as supportsTouch, o as supportsWASMBulkMemory, n as supportsWASMSimd, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-CIyqTAkY.mjs';
|
|
1
|
+
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, B as BrowserNoirProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, p as MobileBrowser, q as MobileDeviceInfo, M as MobilePlatform, r as MobileWASMCompatibility, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, f as checkMobileWASMCompatibility, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, c as detectMobileBrowser, d as detectMobilePlatform, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, j as getBrowserVersion, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, e as getMobileDeviceInfo, k as getOSVersion, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, l as isTablet, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, m as supportsTouch, o as supportsWASMBulkMemory, n as supportsWASMSimd, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-mM-VDYdm.mjs';
|
|
2
2
|
export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, CreatePrivateOwnershipParams, CreateTreasuryParams, DefuseAssetId, DisclosedTransaction, DisclosureRequest, FulfillmentCommitment, FulfillmentProof, FulfillmentRequest, FulfillmentResult, FulfillmentStatus, GenerateReportParams, Hash, HexString, WalletAdapter as IWalletAdapter, IntentStatus, NATIVE_TOKENS, OneClickConfig, OneClickDepositMode, OneClickErrorCode, OneClickQuoteRequest, OneClickQuoteResponse, OneClickStatusResponse, OneClickSwapStatus, OneClickSwapType, OwnershipProof, OwnershipVerification, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateNFTOwnership, PrivateWalletAdapter, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, ProveOwnershipParams, Quote, RegisterAuditorParams, ReportData, ReportFormat, ReportStatus, ReportStatusType, ReportType, SIPSolver, SIP_VERSION, ShieldedIntent, ShieldedPayment, Signature, SignedTransaction, Solver, SolverCapabilities, SolverEvent, SolverEventListener, SolverQuote, SolverVisibleIntent, StablecoinSymbol, StealthAddress, StealthAddressRecovery, StealthMetaAddress, SwapRoute, SwapRouteStep, TrackedIntent, TrackedPayment, TransactionReceipt, TreasuryBalance, TreasuryConfig, TreasuryMember, TreasuryProposal, TreasuryRole, TreasuryTransaction, UnsignedTransaction, 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
|
import { F as FundingProofParams, V as ValidityProofParams, a as FulfillmentProofParams, P as ProofResult } from './noir-DKfEzWy9.mjs';
|
|
4
4
|
export { N as NoirProviderConfig, O as OracleAttestation, d as ProofFramework, b as ProofGenerationError, c as ProofProvider } from './noir-DKfEzWy9.mjs';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, B as BrowserNoirProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, p as MobileBrowser, q as MobileDeviceInfo, M as MobilePlatform, r as MobileWASMCompatibility, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, f as checkMobileWASMCompatibility, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, c as detectMobileBrowser, d as detectMobilePlatform, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, j as getBrowserVersion, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, e as getMobileDeviceInfo, k as getOSVersion, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, l as isTablet, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, m as supportsTouch, o as supportsWASMBulkMemory, n as supportsWASMSimd, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-DCnkB6GS.js';
|
|
1
|
+
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, B as BrowserNoirProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, p as MobileBrowser, q as MobileDeviceInfo, M as MobilePlatform, r as MobileWASMCompatibility, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, f as checkMobileWASMCompatibility, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, c as detectMobileBrowser, d as detectMobilePlatform, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, j as getBrowserVersion, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, e as getMobileDeviceInfo, k as getOSVersion, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, l as isTablet, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, m as supportsTouch, o as supportsWASMBulkMemory, n as supportsWASMSimd, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-BzKgVQ87.js';
|
|
2
2
|
export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, CreatePrivateOwnershipParams, CreateTreasuryParams, DefuseAssetId, DisclosedTransaction, DisclosureRequest, FulfillmentCommitment, FulfillmentProof, FulfillmentRequest, FulfillmentResult, FulfillmentStatus, GenerateReportParams, Hash, HexString, WalletAdapter as IWalletAdapter, IntentStatus, NATIVE_TOKENS, OneClickConfig, OneClickDepositMode, OneClickErrorCode, OneClickQuoteRequest, OneClickQuoteResponse, OneClickStatusResponse, OneClickSwapStatus, OneClickSwapType, OwnershipProof, OwnershipVerification, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateNFTOwnership, PrivateWalletAdapter, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, ProveOwnershipParams, Quote, RegisterAuditorParams, ReportData, ReportFormat, ReportStatus, ReportStatusType, ReportType, SIPSolver, SIP_VERSION, ShieldedIntent, ShieldedPayment, Signature, SignedTransaction, Solver, SolverCapabilities, SolverEvent, SolverEventListener, SolverQuote, SolverVisibleIntent, StablecoinSymbol, StealthAddress, StealthAddressRecovery, StealthMetaAddress, SwapRoute, SwapRouteStep, TrackedIntent, TrackedPayment, TransactionReceipt, TreasuryBalance, TreasuryConfig, TreasuryMember, TreasuryProposal, TreasuryRole, TreasuryTransaction, UnsignedTransaction, 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
|
import { F as FundingProofParams, V as ValidityProofParams, a as FulfillmentProofParams, P as ProofResult } from './noir-DKfEzWy9.js';
|
|
4
4
|
export { N as NoirProviderConfig, O as OracleAttestation, d as ProofFramework, b as ProofGenerationError, c as ProofProvider } from './noir-DKfEzWy9.js';
|
package/dist/browser.js
CHANGED
|
@@ -5434,9 +5434,9 @@ async function createShieldedIntent(params, options) {
|
|
|
5434
5434
|
const cleanHex = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
5435
5435
|
return (0, import_utils6.hexToBytes)(cleanHex);
|
|
5436
5436
|
};
|
|
5437
|
-
const effectiveOwnershipSig = ownershipSignature ??
|
|
5438
|
-
const effectiveSenderSecret = senderSecret ??
|
|
5439
|
-
const effectiveAuthSig = authorizationSignature ??
|
|
5437
|
+
const effectiveOwnershipSig = ownershipSignature ?? (0, import_utils6.randomBytes)(64);
|
|
5438
|
+
const effectiveSenderSecret = senderSecret ?? (0, import_utils6.randomBytes)(32);
|
|
5439
|
+
const effectiveAuthSig = authorizationSignature ?? (0, import_utils6.randomBytes)(64);
|
|
5440
5440
|
const fundingResult = await proofProvider.generateFundingProof({
|
|
5441
5441
|
balance: input.amount,
|
|
5442
5442
|
minimumRequired: input.amount,
|
|
@@ -5453,8 +5453,7 @@ async function createShieldedIntent(params, options) {
|
|
|
5453
5453
|
senderBlinding: hexToUint8(senderCommitment.blindingFactor),
|
|
5454
5454
|
senderSecret: effectiveSenderSecret,
|
|
5455
5455
|
authorizationSignature: effectiveAuthSig,
|
|
5456
|
-
nonce:
|
|
5457
|
-
// Could use randomBytes here
|
|
5456
|
+
nonce: (0, import_utils6.randomBytes)(32),
|
|
5458
5457
|
timestamp: now,
|
|
5459
5458
|
expiry: now + ttl
|
|
5460
5459
|
});
|
|
@@ -21683,6 +21682,23 @@ var BrowserNoirProvider = class _BrowserNoirProvider {
|
|
|
21683
21682
|
pubKeyY = Array.from(params.senderPublicKey.y);
|
|
21684
21683
|
} else {
|
|
21685
21684
|
const senderSecretBytes = this.ensureUint8Array(params.senderSecret);
|
|
21685
|
+
const hasNonZero = senderSecretBytes.some((b) => b !== 0);
|
|
21686
|
+
if (!hasNonZero && senderSecretBytes.length === 32) {
|
|
21687
|
+
const inputType = Object.prototype.toString.call(params.senderSecret);
|
|
21688
|
+
const inputKeys = Object.keys(params.senderSecret).slice(0, 5);
|
|
21689
|
+
const inputLength = "length" in params.senderSecret ? params.senderSecret.length : "N/A";
|
|
21690
|
+
console.error(
|
|
21691
|
+
"[BrowserNoirProvider] senderSecret appears to be all zeros after ensureUint8Array!",
|
|
21692
|
+
"\n Input type:",
|
|
21693
|
+
inputType,
|
|
21694
|
+
"\n Input length:",
|
|
21695
|
+
inputLength,
|
|
21696
|
+
"\n Sample keys:",
|
|
21697
|
+
inputKeys,
|
|
21698
|
+
"\n First few raw values:",
|
|
21699
|
+
[0, 1, 2, 3].map((i) => params.senderSecret[i])
|
|
21700
|
+
);
|
|
21701
|
+
}
|
|
21686
21702
|
const coords = this.getPublicKeyCoordinates(senderSecretBytes);
|
|
21687
21703
|
pubKeyX = coords.x;
|
|
21688
21704
|
pubKeyY = coords.y;
|
|
@@ -21989,22 +22005,34 @@ var BrowserNoirProvider = class _BrowserNoirProvider {
|
|
|
21989
22005
|
}
|
|
21990
22006
|
/**
|
|
21991
22007
|
* Ensure input is a proper Uint8Array (handles serialization from bundlers)
|
|
21992
|
-
*
|
|
21993
|
-
*
|
|
21994
|
-
*
|
|
22008
|
+
*
|
|
22009
|
+
* When Uint8Array passes through Next.js/bundlers, several issues can occur:
|
|
22010
|
+
* 1. Object becomes {0: x, 1: y, ...} (plain object with numeric keys)
|
|
22011
|
+
* 2. ArrayBuffer gets detached, making Array.from() return empty
|
|
22012
|
+
* 3. instanceof checks fail across different execution contexts
|
|
22013
|
+
*
|
|
22014
|
+
* This implementation ALWAYS reads bytes by index to be robust against all cases.
|
|
21995
22015
|
*/
|
|
21996
22016
|
ensureUint8Array(input) {
|
|
21997
|
-
let length;
|
|
21998
|
-
if ("
|
|
21999
|
-
length
|
|
22000
|
-
|
|
22001
|
-
|
|
22002
|
-
|
|
22017
|
+
let length = 0;
|
|
22018
|
+
if (typeof input === "object" && input !== null) {
|
|
22019
|
+
if ("length" in input && typeof input.length === "number") {
|
|
22020
|
+
length = input.length;
|
|
22021
|
+
} else if ("byteLength" in input && typeof input.byteLength === "number") {
|
|
22022
|
+
length = input.byteLength;
|
|
22023
|
+
} else {
|
|
22024
|
+
const numericKeys = Object.keys(input).filter((k) => /^\d+$/.test(k));
|
|
22025
|
+
length = numericKeys.length > 0 ? Math.max(...numericKeys.map(Number)) + 1 : 0;
|
|
22026
|
+
}
|
|
22003
22027
|
}
|
|
22004
22028
|
const result = new Uint8Array(length);
|
|
22005
22029
|
for (let i = 0; i < length; i++) {
|
|
22006
22030
|
const val = input[i];
|
|
22007
|
-
|
|
22031
|
+
if (typeof val === "number") {
|
|
22032
|
+
result[i] = val & 255;
|
|
22033
|
+
} else if (val !== void 0 && val !== null) {
|
|
22034
|
+
result[i] = Number(val) & 255;
|
|
22035
|
+
}
|
|
22008
22036
|
}
|
|
22009
22037
|
return result;
|
|
22010
22038
|
}
|
package/dist/browser.mjs
CHANGED
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
walletRegistry,
|
|
264
264
|
withSecureBuffer,
|
|
265
265
|
withSecureBufferSync
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-NM5PTCQ5.mjs";
|
|
267
267
|
import {
|
|
268
268
|
fulfillment_proof_default,
|
|
269
269
|
funding_proof_default,
|
|
@@ -696,6 +696,23 @@ var BrowserNoirProvider = class _BrowserNoirProvider {
|
|
|
696
696
|
pubKeyY = Array.from(params.senderPublicKey.y);
|
|
697
697
|
} else {
|
|
698
698
|
const senderSecretBytes = this.ensureUint8Array(params.senderSecret);
|
|
699
|
+
const hasNonZero = senderSecretBytes.some((b) => b !== 0);
|
|
700
|
+
if (!hasNonZero && senderSecretBytes.length === 32) {
|
|
701
|
+
const inputType = Object.prototype.toString.call(params.senderSecret);
|
|
702
|
+
const inputKeys = Object.keys(params.senderSecret).slice(0, 5);
|
|
703
|
+
const inputLength = "length" in params.senderSecret ? params.senderSecret.length : "N/A";
|
|
704
|
+
console.error(
|
|
705
|
+
"[BrowserNoirProvider] senderSecret appears to be all zeros after ensureUint8Array!",
|
|
706
|
+
"\n Input type:",
|
|
707
|
+
inputType,
|
|
708
|
+
"\n Input length:",
|
|
709
|
+
inputLength,
|
|
710
|
+
"\n Sample keys:",
|
|
711
|
+
inputKeys,
|
|
712
|
+
"\n First few raw values:",
|
|
713
|
+
[0, 1, 2, 3].map((i) => params.senderSecret[i])
|
|
714
|
+
);
|
|
715
|
+
}
|
|
699
716
|
const coords = this.getPublicKeyCoordinates(senderSecretBytes);
|
|
700
717
|
pubKeyX = coords.x;
|
|
701
718
|
pubKeyY = coords.y;
|
|
@@ -1002,22 +1019,34 @@ var BrowserNoirProvider = class _BrowserNoirProvider {
|
|
|
1002
1019
|
}
|
|
1003
1020
|
/**
|
|
1004
1021
|
* Ensure input is a proper Uint8Array (handles serialization from bundlers)
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1022
|
+
*
|
|
1023
|
+
* When Uint8Array passes through Next.js/bundlers, several issues can occur:
|
|
1024
|
+
* 1. Object becomes {0: x, 1: y, ...} (plain object with numeric keys)
|
|
1025
|
+
* 2. ArrayBuffer gets detached, making Array.from() return empty
|
|
1026
|
+
* 3. instanceof checks fail across different execution contexts
|
|
1027
|
+
*
|
|
1028
|
+
* This implementation ALWAYS reads bytes by index to be robust against all cases.
|
|
1008
1029
|
*/
|
|
1009
1030
|
ensureUint8Array(input) {
|
|
1010
|
-
let length;
|
|
1011
|
-
if ("
|
|
1012
|
-
length
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1031
|
+
let length = 0;
|
|
1032
|
+
if (typeof input === "object" && input !== null) {
|
|
1033
|
+
if ("length" in input && typeof input.length === "number") {
|
|
1034
|
+
length = input.length;
|
|
1035
|
+
} else if ("byteLength" in input && typeof input.byteLength === "number") {
|
|
1036
|
+
length = input.byteLength;
|
|
1037
|
+
} else {
|
|
1038
|
+
const numericKeys = Object.keys(input).filter((k) => /^\d+$/.test(k));
|
|
1039
|
+
length = numericKeys.length > 0 ? Math.max(...numericKeys.map(Number)) + 1 : 0;
|
|
1040
|
+
}
|
|
1016
1041
|
}
|
|
1017
1042
|
const result = new Uint8Array(length);
|
|
1018
1043
|
for (let i = 0; i < length; i++) {
|
|
1019
1044
|
const val = input[i];
|
|
1020
|
-
|
|
1045
|
+
if (typeof val === "number") {
|
|
1046
|
+
result[i] = val & 255;
|
|
1047
|
+
} else if (val !== void 0 && val !== null) {
|
|
1048
|
+
result[i] = Number(val) & 255;
|
|
1049
|
+
}
|
|
1021
1050
|
}
|
|
1022
1051
|
return result;
|
|
1023
1052
|
}
|
|
@@ -1303,7 +1303,7 @@ function generateRandomBytes(length) {
|
|
|
1303
1303
|
}
|
|
1304
1304
|
|
|
1305
1305
|
// src/intent.ts
|
|
1306
|
-
import { hexToBytes as hexToBytes4, bytesToHex as bytesToHex5 } from "@noble/hashes/utils";
|
|
1306
|
+
import { hexToBytes as hexToBytes4, bytesToHex as bytesToHex5, randomBytes as randomBytes6 } from "@noble/hashes/utils";
|
|
1307
1307
|
import { sha256 as sha2565 } from "@noble/hashes/sha256";
|
|
1308
1308
|
|
|
1309
1309
|
// src/privacy.ts
|
|
@@ -1777,9 +1777,9 @@ async function createShieldedIntent(params, options) {
|
|
|
1777
1777
|
const cleanHex = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
1778
1778
|
return hexToBytes4(cleanHex);
|
|
1779
1779
|
};
|
|
1780
|
-
const effectiveOwnershipSig = ownershipSignature ??
|
|
1781
|
-
const effectiveSenderSecret = senderSecret ??
|
|
1782
|
-
const effectiveAuthSig = authorizationSignature ??
|
|
1780
|
+
const effectiveOwnershipSig = ownershipSignature ?? randomBytes6(64);
|
|
1781
|
+
const effectiveSenderSecret = senderSecret ?? randomBytes6(32);
|
|
1782
|
+
const effectiveAuthSig = authorizationSignature ?? randomBytes6(64);
|
|
1783
1783
|
const fundingResult = await proofProvider.generateFundingProof({
|
|
1784
1784
|
balance: input.amount,
|
|
1785
1785
|
minimumRequired: input.amount,
|
|
@@ -1796,8 +1796,7 @@ async function createShieldedIntent(params, options) {
|
|
|
1796
1796
|
senderBlinding: hexToUint8(senderCommitment.blindingFactor),
|
|
1797
1797
|
senderSecret: effectiveSenderSecret,
|
|
1798
1798
|
authorizationSignature: effectiveAuthSig,
|
|
1799
|
-
nonce:
|
|
1800
|
-
// Could use randomBytes here
|
|
1799
|
+
nonce: randomBytes6(32),
|
|
1801
1800
|
timestamp: now,
|
|
1802
1801
|
expiry: now + ttl
|
|
1803
1802
|
});
|
|
@@ -3598,7 +3597,7 @@ import { sha256 as sha2567 } from "@noble/hashes/sha256";
|
|
|
3598
3597
|
|
|
3599
3598
|
// src/proofs/mock.ts
|
|
3600
3599
|
import { sha256 as sha2568 } from "@noble/hashes/sha256";
|
|
3601
|
-
import { bytesToHex as bytesToHex10, randomBytes as
|
|
3600
|
+
import { bytesToHex as bytesToHex10, randomBytes as randomBytes7 } from "@noble/hashes/utils";
|
|
3602
3601
|
var MOCK_PROOF_PREFIX = "0x4d4f434b";
|
|
3603
3602
|
var WARNING_MESSAGE = `
|
|
3604
3603
|
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
@@ -3764,7 +3763,7 @@ var MockProofProvider = class {
|
|
|
3764
3763
|
(_, v) => typeof v === "bigint" ? v.toString() : v
|
|
3765
3764
|
);
|
|
3766
3765
|
const hash2 = sha2568(new TextEncoder().encode(input));
|
|
3767
|
-
const random =
|
|
3766
|
+
const random = randomBytes7(16);
|
|
3768
3767
|
const combined = new Uint8Array(4 + hash2.length + random.length);
|
|
3769
3768
|
combined.set(new TextEncoder().encode("MOCK"), 0);
|
|
3770
3769
|
combined.set(hash2, 4);
|
|
@@ -4393,7 +4392,7 @@ import { ReportStatus as ReportStatus2 } from "@sip-protocol/types";
|
|
|
4393
4392
|
import {
|
|
4394
4393
|
IntentStatus as IntentStatus3
|
|
4395
4394
|
} from "@sip-protocol/types";
|
|
4396
|
-
import { bytesToHex as bytesToHex14, randomBytes as
|
|
4395
|
+
import { bytesToHex as bytesToHex14, randomBytes as randomBytes8 } from "@noble/hashes/utils";
|
|
4397
4396
|
var MockSolver = class {
|
|
4398
4397
|
info;
|
|
4399
4398
|
capabilities;
|
|
@@ -4475,7 +4474,7 @@ var MockSolver = class {
|
|
|
4475
4474
|
const spreadAmount = baseOutput * BigInt(Math.floor(this.spreadPercent * 1e4)) / 10000n;
|
|
4476
4475
|
const outputAmount = baseOutput + spreadAmount;
|
|
4477
4476
|
const feeAmount = outputAmount * BigInt(Math.floor(this.feePercent * 1e4)) / 10000n;
|
|
4478
|
-
const quoteId = `quote-${bytesToHex14(
|
|
4477
|
+
const quoteId = `quote-${bytesToHex14(randomBytes8(8))}`;
|
|
4479
4478
|
const now = Math.floor(Date.now() / 1e3);
|
|
4480
4479
|
const quote = {
|
|
4481
4480
|
quoteId,
|
|
@@ -4486,7 +4485,7 @@ var MockSolver = class {
|
|
|
4486
4485
|
expiry: now + 60,
|
|
4487
4486
|
// Quote valid for 1 minute
|
|
4488
4487
|
fee: feeAmount,
|
|
4489
|
-
signature: `0x${bytesToHex14(
|
|
4488
|
+
signature: `0x${bytesToHex14(randomBytes8(64))}`,
|
|
4490
4489
|
// Mock signature
|
|
4491
4490
|
validUntil: now + 60,
|
|
4492
4491
|
estimatedGas: 200000n
|
|
@@ -4523,7 +4522,7 @@ var MockSolver = class {
|
|
|
4523
4522
|
error: status.error
|
|
4524
4523
|
};
|
|
4525
4524
|
}
|
|
4526
|
-
const txHash = `0x${bytesToHex14(
|
|
4525
|
+
const txHash = `0x${bytesToHex14(randomBytes8(32))}`;
|
|
4527
4526
|
status.status = "completed";
|
|
4528
4527
|
status.txHash = txHash;
|
|
4529
4528
|
return {
|
|
@@ -4533,7 +4532,7 @@ var MockSolver = class {
|
|
|
4533
4532
|
txHash: intent.privacyLevel === "transparent" ? txHash : void 0,
|
|
4534
4533
|
fulfillmentProof: {
|
|
4535
4534
|
type: "fulfillment",
|
|
4536
|
-
proof: `0x${bytesToHex14(
|
|
4535
|
+
proof: `0x${bytesToHex14(randomBytes8(128))}`,
|
|
4537
4536
|
publicInputs: [
|
|
4538
4537
|
`0x${bytesToHex14(new TextEncoder().encode(intent.intentId))}`,
|
|
4539
4538
|
`0x${bytesToHex14(new TextEncoder().encode(quote.quoteId))}`
|
|
@@ -5688,7 +5687,7 @@ function createZcashNativeBackend(config) {
|
|
|
5688
5687
|
|
|
5689
5688
|
// src/settlement/backends/direct-chain.ts
|
|
5690
5689
|
import { PrivacyLevel as PrivacyLevel5 } from "@sip-protocol/types";
|
|
5691
|
-
import { randomBytes as
|
|
5690
|
+
import { randomBytes as randomBytes9, bytesToHex as bytesToHex15 } from "@noble/hashes/utils";
|
|
5692
5691
|
var DEFAULT_GAS_FEES = {
|
|
5693
5692
|
ethereum: 21000n * 50n * 1000000000n,
|
|
5694
5693
|
// 21k gas * 50 gwei = 0.00105 ETH
|
|
@@ -7309,7 +7308,7 @@ import {
|
|
|
7309
7308
|
PaymentStatus
|
|
7310
7309
|
} from "@sip-protocol/types";
|
|
7311
7310
|
import { sha256 as sha25613 } from "@noble/hashes/sha256";
|
|
7312
|
-
import { bytesToHex as bytesToHex18, hexToBytes as hexToBytes14, randomBytes as
|
|
7311
|
+
import { bytesToHex as bytesToHex18, hexToBytes as hexToBytes14, randomBytes as randomBytes10 } from "@noble/hashes/utils";
|
|
7313
7312
|
import { xchacha20poly1305 as xchacha20poly13052 } from "@noble/ciphers/chacha.js";
|
|
7314
7313
|
import { hkdf as hkdf2 } from "@noble/hashes/hkdf";
|
|
7315
7314
|
|
|
@@ -7876,7 +7875,7 @@ function encryptMemo(memo, viewingKey) {
|
|
|
7876
7875
|
const keyBytes = hexToBytes14(keyHex);
|
|
7877
7876
|
const encKey = hkdf2(sha25613, keyBytes, new Uint8Array(0), new Uint8Array(0), 32);
|
|
7878
7877
|
try {
|
|
7879
|
-
const nonce =
|
|
7878
|
+
const nonce = randomBytes10(24);
|
|
7880
7879
|
const cipher = xchacha20poly13052(encKey, nonce);
|
|
7881
7880
|
const plaintext = new TextEncoder().encode(memo);
|
|
7882
7881
|
const ciphertext = cipher.encrypt(plaintext);
|
|
@@ -7948,7 +7947,7 @@ import {
|
|
|
7948
7947
|
} from "@sip-protocol/types";
|
|
7949
7948
|
import { secp256k1 as secp256k16 } from "@noble/curves/secp256k1";
|
|
7950
7949
|
import { sha256 as sha25614 } from "@noble/hashes/sha256";
|
|
7951
|
-
import { bytesToHex as bytesToHex19, hexToBytes as hexToBytes15, randomBytes as
|
|
7950
|
+
import { bytesToHex as bytesToHex19, hexToBytes as hexToBytes15, randomBytes as randomBytes11 } from "@noble/hashes/utils";
|
|
7952
7951
|
var DEFAULT_PROPOSAL_TTL = 7 * 24 * 60 * 60;
|
|
7953
7952
|
var Treasury = class _Treasury {
|
|
7954
7953
|
config;
|
|
@@ -8439,11 +8438,11 @@ var Treasury = class _Treasury {
|
|
|
8439
8438
|
}
|
|
8440
8439
|
};
|
|
8441
8440
|
function generateTreasuryId() {
|
|
8442
|
-
const bytes =
|
|
8441
|
+
const bytes = randomBytes11(16);
|
|
8443
8442
|
return `treasury_${bytesToHex19(bytes)}`;
|
|
8444
8443
|
}
|
|
8445
8444
|
function generateProposalId() {
|
|
8446
|
-
const bytes =
|
|
8445
|
+
const bytes = randomBytes11(16);
|
|
8447
8446
|
return `prop_${bytesToHex19(bytes)}`;
|
|
8448
8447
|
}
|
|
8449
8448
|
function computeProposalHash(proposal) {
|
|
@@ -8634,7 +8633,7 @@ function validateBatchProposalParams(params, config) {
|
|
|
8634
8633
|
import {
|
|
8635
8634
|
ReportStatus
|
|
8636
8635
|
} from "@sip-protocol/types";
|
|
8637
|
-
import { bytesToHex as bytesToHex20, randomBytes as
|
|
8636
|
+
import { bytesToHex as bytesToHex20, randomBytes as randomBytes12 } from "@noble/hashes/utils";
|
|
8638
8637
|
var DEFAULTS2 = {
|
|
8639
8638
|
riskThreshold: 70,
|
|
8640
8639
|
highValueThreshold: 10000000000n,
|
|
@@ -9381,7 +9380,7 @@ var ComplianceManager = class _ComplianceManager {
|
|
|
9381
9380
|
}
|
|
9382
9381
|
};
|
|
9383
9382
|
function generateId(prefix) {
|
|
9384
|
-
return `${prefix}_${bytesToHex20(
|
|
9383
|
+
return `${prefix}_${bytesToHex20(randomBytes12(12))}`;
|
|
9385
9384
|
}
|
|
9386
9385
|
function validateRegisterAuditorParams(params) {
|
|
9387
9386
|
if (!params.organization?.trim()) {
|
|
@@ -10158,7 +10157,7 @@ var ComplianceReporter = class {
|
|
|
10158
10157
|
|
|
10159
10158
|
// src/compliance/conditional.ts
|
|
10160
10159
|
import { sha256 as sha25616 } from "@noble/hashes/sha256";
|
|
10161
|
-
import { bytesToHex as bytesToHex22, hexToBytes as hexToBytes17, randomBytes as
|
|
10160
|
+
import { bytesToHex as bytesToHex22, hexToBytes as hexToBytes17, randomBytes as randomBytes13 } from "@noble/hashes/utils";
|
|
10162
10161
|
import { xchacha20poly1305 as xchacha20poly13053 } from "@noble/ciphers/chacha.js";
|
|
10163
10162
|
var ConditionalDisclosure = class {
|
|
10164
10163
|
/**
|
|
@@ -10224,7 +10223,7 @@ var ConditionalDisclosure = class {
|
|
|
10224
10223
|
params.commitment,
|
|
10225
10224
|
revealAfterSeconds
|
|
10226
10225
|
);
|
|
10227
|
-
const nonce =
|
|
10226
|
+
const nonce = randomBytes13(24);
|
|
10228
10227
|
const viewingKeyBytes = hexToBytes17(params.viewingKey.slice(2));
|
|
10229
10228
|
const cipher = xchacha20poly13053(encryptionKey, nonce);
|
|
10230
10229
|
const encryptedKey = cipher.encrypt(viewingKeyBytes);
|
|
@@ -10411,7 +10410,7 @@ var CURVE_ORDER2 = secp256k17.CURVE.n;
|
|
|
10411
10410
|
|
|
10412
10411
|
// src/compliance/threshold.ts
|
|
10413
10412
|
import { sha256 as sha25618 } from "@noble/hashes/sha256";
|
|
10414
|
-
import { bytesToHex as bytesToHex24, hexToBytes as hexToBytes19, randomBytes as
|
|
10413
|
+
import { bytesToHex as bytesToHex24, hexToBytes as hexToBytes19, randomBytes as randomBytes14 } from "@noble/hashes/utils";
|
|
10415
10414
|
var FIELD_PRIME = 2n ** 256n - 189n;
|
|
10416
10415
|
var ThresholdViewingKey = class {
|
|
10417
10416
|
/**
|
|
@@ -10628,7 +10627,7 @@ var ThresholdViewingKey = class {
|
|
|
10628
10627
|
* Generate a random field element
|
|
10629
10628
|
*/
|
|
10630
10629
|
static randomFieldElement() {
|
|
10631
|
-
const bytes =
|
|
10630
|
+
const bytes = randomBytes14(32);
|
|
10632
10631
|
let value = 0n;
|
|
10633
10632
|
for (let i = 0; i < bytes.length; i++) {
|
|
10634
10633
|
value = value << 8n | BigInt(bytes[i]);
|
|
@@ -11099,7 +11098,7 @@ var AuditorKeyDerivation = class {
|
|
|
11099
11098
|
};
|
|
11100
11099
|
|
|
11101
11100
|
// src/auction/sealed-bid.ts
|
|
11102
|
-
import { randomBytes as
|
|
11101
|
+
import { randomBytes as randomBytes15, bytesToHex as bytesToHex26 } from "@noble/hashes/utils";
|
|
11103
11102
|
var SealedBidAuction = class {
|
|
11104
11103
|
/**
|
|
11105
11104
|
* Create a sealed bid for an auction
|
|
@@ -11176,7 +11175,7 @@ var SealedBidAuction = class {
|
|
|
11176
11175
|
);
|
|
11177
11176
|
}
|
|
11178
11177
|
}
|
|
11179
|
-
const salt = params.salt ??
|
|
11178
|
+
const salt = params.salt ?? randomBytes15(32);
|
|
11180
11179
|
const { commitment, blinding } = commit(params.amount, salt);
|
|
11181
11180
|
const sealedBid = {
|
|
11182
11181
|
auctionId: params.auctionId,
|
|
@@ -11807,7 +11806,7 @@ function createSealedBidAuction() {
|
|
|
11807
11806
|
// src/governance/private-vote.ts
|
|
11808
11807
|
import { sha256 as sha25620 } from "@noble/hashes/sha256";
|
|
11809
11808
|
import { hkdf as hkdf3 } from "@noble/hashes/hkdf";
|
|
11810
|
-
import { bytesToHex as bytesToHex27, hexToBytes as hexToBytes21, randomBytes as
|
|
11809
|
+
import { bytesToHex as bytesToHex27, hexToBytes as hexToBytes21, randomBytes as randomBytes16, utf8ToBytes as utf8ToBytes5 } from "@noble/hashes/utils";
|
|
11811
11810
|
import { xchacha20poly1305 as xchacha20poly13054 } from "@noble/ciphers/chacha.js";
|
|
11812
11811
|
var VOTE_ENCRYPTION_DOMAIN = "SIP-PRIVATE-VOTE-ENCRYPTION-V1";
|
|
11813
11812
|
var NONCE_SIZE2 = 24;
|
|
@@ -11844,7 +11843,7 @@ var PrivateVoting = class {
|
|
|
11844
11843
|
const { proposalId, choice, weight, encryptionKey, voter = "anonymous" } = params;
|
|
11845
11844
|
const derivedKey = this.deriveEncryptionKey(encryptionKey, proposalId);
|
|
11846
11845
|
try {
|
|
11847
|
-
const nonce =
|
|
11846
|
+
const nonce = randomBytes16(NONCE_SIZE2);
|
|
11848
11847
|
const voteData = {
|
|
11849
11848
|
proposalId,
|
|
11850
11849
|
choice,
|
|
@@ -12161,7 +12160,7 @@ var PrivateVoting = class {
|
|
|
12161
12160
|
}
|
|
12162
12161
|
const encryptedBlindings = {};
|
|
12163
12162
|
for (const [choice, blinding] of Object.entries(blindings)) {
|
|
12164
|
-
const nonce =
|
|
12163
|
+
const nonce = randomBytes16(NONCE_SIZE2);
|
|
12165
12164
|
const derivedKey = this.deriveEncryptionKey(decryptionKey, `${proposalId}-tally-${choice}`);
|
|
12166
12165
|
try {
|
|
12167
12166
|
const cipher = xchacha20poly13054(derivedKey, nonce);
|
|
@@ -16280,7 +16279,7 @@ function createTrezorAdapter(config) {
|
|
|
16280
16279
|
|
|
16281
16280
|
// src/wallet/hardware/mock.ts
|
|
16282
16281
|
import { WalletErrorCode as WalletErrorCode17 } from "@sip-protocol/types";
|
|
16283
|
-
import { bytesToHex as bytesToHex29, randomBytes as
|
|
16282
|
+
import { bytesToHex as bytesToHex29, randomBytes as randomBytes17 } from "@noble/hashes/utils";
|
|
16284
16283
|
var MockLedgerAdapter = class extends BaseWalletAdapter {
|
|
16285
16284
|
chain;
|
|
16286
16285
|
name = "mock-ledger";
|
|
@@ -16525,12 +16524,12 @@ var MockLedgerAdapter = class extends BaseWalletAdapter {
|
|
|
16525
16524
|
}
|
|
16526
16525
|
}
|
|
16527
16526
|
generateMockAddress(index) {
|
|
16528
|
-
const bytes =
|
|
16527
|
+
const bytes = randomBytes17(20);
|
|
16529
16528
|
bytes[0] = index;
|
|
16530
16529
|
return `0x${bytesToHex29(bytes)}`;
|
|
16531
16530
|
}
|
|
16532
16531
|
generateMockPublicKey(index) {
|
|
16533
|
-
const bytes =
|
|
16532
|
+
const bytes = randomBytes17(33);
|
|
16534
16533
|
bytes[0] = 2;
|
|
16535
16534
|
bytes[1] = index;
|
|
16536
16535
|
return `0x${bytesToHex29(bytes)}`;
|
|
@@ -16731,12 +16730,12 @@ var MockTrezorAdapter = class extends BaseWalletAdapter {
|
|
|
16731
16730
|
}
|
|
16732
16731
|
}
|
|
16733
16732
|
generateMockAddress(index) {
|
|
16734
|
-
const bytes =
|
|
16733
|
+
const bytes = randomBytes17(20);
|
|
16735
16734
|
bytes[0] = index + 100;
|
|
16736
16735
|
return `0x${bytesToHex29(bytes)}`;
|
|
16737
16736
|
}
|
|
16738
16737
|
generateMockPublicKey(index) {
|
|
16739
|
-
const bytes =
|
|
16738
|
+
const bytes = randomBytes17(33);
|
|
16740
16739
|
bytes[0] = 3;
|
|
16741
16740
|
bytes[1] = index + 100;
|
|
16742
16741
|
return `0x${bytesToHex29(bytes)}`;
|
|
@@ -774,9 +774,13 @@ declare class BrowserNoirProvider implements ProofProvider {
|
|
|
774
774
|
private bigintToBytes;
|
|
775
775
|
/**
|
|
776
776
|
* Ensure input is a proper Uint8Array (handles serialization from bundlers)
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
777
|
+
*
|
|
778
|
+
* When Uint8Array passes through Next.js/bundlers, several issues can occur:
|
|
779
|
+
* 1. Object becomes {0: x, 1: y, ...} (plain object with numeric keys)
|
|
780
|
+
* 2. ArrayBuffer gets detached, making Array.from() return empty
|
|
781
|
+
* 3. instanceof checks fail across different execution contexts
|
|
782
|
+
*
|
|
783
|
+
* This implementation ALWAYS reads bytes by index to be robust against all cases.
|
|
780
784
|
*/
|
|
781
785
|
private ensureUint8Array;
|
|
782
786
|
private hexToField;
|
|
@@ -774,9 +774,13 @@ declare class BrowserNoirProvider implements ProofProvider {
|
|
|
774
774
|
private bigintToBytes;
|
|
775
775
|
/**
|
|
776
776
|
* Ensure input is a proper Uint8Array (handles serialization from bundlers)
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
777
|
+
*
|
|
778
|
+
* When Uint8Array passes through Next.js/bundlers, several issues can occur:
|
|
779
|
+
* 1. Object becomes {0: x, 1: y, ...} (plain object with numeric keys)
|
|
780
|
+
* 2. ArrayBuffer gets detached, making Array.from() return empty
|
|
781
|
+
* 3. instanceof checks fail across different execution contexts
|
|
782
|
+
*
|
|
783
|
+
* This implementation ALWAYS reads bytes by index to be robust against all cases.
|
|
780
784
|
*/
|
|
781
785
|
private ensureUint8Array;
|
|
782
786
|
private hexToField;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-CIyqTAkY.mjs';
|
|
1
|
+
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-mM-VDYdm.mjs';
|
|
2
2
|
export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, CreatePrivateOwnershipParams, CreateTreasuryParams, DefuseAssetId, DisclosedTransaction, DisclosureRequest, FulfillmentCommitment, FulfillmentProof, FulfillmentRequest, FulfillmentResult, FulfillmentStatus, GenerateReportParams, Hash, HexString, WalletAdapter as IWalletAdapter, IntentStatus, NATIVE_TOKENS, OneClickConfig, OneClickDepositMode, OneClickErrorCode, OneClickQuoteRequest, OneClickQuoteResponse, OneClickStatusResponse, OneClickSwapStatus, OneClickSwapType, OwnershipProof, OwnershipVerification, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateNFTOwnership, PrivateWalletAdapter, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, ProveOwnershipParams, Quote, RegisterAuditorParams, ReportData, ReportFormat, ReportStatus, ReportStatusType, ReportType, SIPSolver, SIP_VERSION, ShieldedIntent, ShieldedPayment, Signature, SignedTransaction, Solver, SolverCapabilities, SolverEvent, SolverEventListener, SolverQuote, SolverVisibleIntent, StablecoinSymbol, StealthAddress, StealthAddressRecovery, StealthMetaAddress, SwapRoute, SwapRouteStep, TrackedIntent, TrackedPayment, TransactionReceipt, TreasuryBalance, TreasuryConfig, TreasuryMember, TreasuryProposal, TreasuryRole, TreasuryTransaction, UnsignedTransaction, 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, d as ProofFramework, b as ProofGenerationError, c as ProofProvider, P as ProofResult, V as ValidityProofParams } from './noir-DKfEzWy9.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-DCnkB6GS.js';
|
|
1
|
+
export { bH as ATTESTATION_VERSION, az as AptosStealthResult, al as AptosStealthService, bT as AttestationRequest, bU as AttestationResult, dB as AuditReport, dx as AuditorKeyDerivation, dy as AuditorType, cf as BackendCapabilities, e7 as BaseWalletAdapter, dX as BidReceipt, d2 as BitcoinNetwork, cP as BridgeProvider, t as BrowserNoirProviderConfig, bK as CHAIN_NUMERIC_IDS, aG as COSMOS_CHAIN_PREFIXES, dM as CSVExport, e2 as CastVoteParams, b8 as CommitmentPoint, dt as ComplianceManager, du as ComplianceReporter, dw as ConditionalDisclosure, aH as CosmosChainId, aI as CosmosStealthResult, aB as CosmosStealthService, dY as CreateBidParams, $ as CreateIntentOptions, dq as CreatePaymentOptions, C as CryptoError, bI as DEFAULT_THRESHOLD, bJ as DEFAULT_TOTAL_ORACLES, dC as DecryptedTransaction, eF as DerivationPath, dP as DeriveMultipleParams, dO as DeriveViewingKeyParams, dN as DerivedViewingKey, f6 as EIP1193ConnectInfo, f5 as EIP1193Event, f3 as EIP1193Provider, f7 as EIP1193ProviderRpcError, f4 as EIP1193RequestArguments, f8 as EIP712Domain, f9 as EIP712TypeDefinition, fb as EIP712TypedData, fa as EIP712Types, e0 as EncryptedVote, w as EncryptionNotImplementedError, E as ErrorCode, fh as EthereumAdapterConfig, eC as EthereumChainId, fi as EthereumChainIdType, ff as EthereumChainMetadata, fe as EthereumTokenMetadata, fd as EthereumTransactionReceipt, fc as EthereumTransactionRequest, eq as EthereumWalletAdapter, fg as EthereumWalletName, dE as ExportForRegulatorParams, cG as ExportedViewingKey, dI as FATFExport, dJ as FATFTransaction, dK as FINCENExport, dL as FINCENTransaction, co as FindBestRouteParams, dA as GenerateAuditReportParams, fw as HardwareAccount, fn as HardwareConnectionStatus, fp as HardwareDeviceInfo, eD as HardwareErrorCode, fy as HardwareErrorCodeType, fu as HardwareEthereumTx, ft as HardwareSignRequest, fv as HardwareSignature, fx as HardwareTransport, fq as HardwareWalletConfig, eE as HardwareWalletError, fk as HardwareWalletType, L as IntentBuilder, I as IntentError, dH as Jurisdiction, fr as LedgerConfig, fl as LedgerModel, eL as LedgerWalletAdapter, es as MockEthereumAdapter, fj as MockEthereumAdapterConfig, fz as MockHardwareConfig, eP as MockLedgerAdapter, br as MockProofProvider, ei as MockSolanaAdapter, f2 as MockSolanaAdapterConfig, c1 as MockSolver, c3 as MockSolverConfig, eQ as MockTrezorAdapter, e8 as MockWalletAdapter, bX as NEARIntentsAdapter, c0 as NEARIntentsAdapterConfig, cp as NEARIntentsBackend, N as NetworkError, bG as ORACLE_DOMAIN, bW as OneClickClient, bO as OracleAttestationMessage, bL as OracleId, bN as OracleInfo, bR as OracleRegistry, bS as OracleRegistryConfig, bP as OracleSignature, bM as OracleStatus, d3 as PaymentBuilder, dD as PdfExportOptions, b7 as PedersenCommitment, b_ as PreparedSwap, cQ as PriceFeed, aP as PrivacyConfig, e3 as PrivateNFT, d_ as PrivateVoting, K as ProductionQuote, u as ProofError, v as ProofNotImplementedError, P as ProofProgressCallback, cn as QuoteComparison, cE as ReceivedNote, dF as RegulatoryExport, dG as RegulatoryFormat, e1 as RevealedVote, cj as Route, cm as RouteWithQuote, F as SIP, J as SIPConfig, S as SIPError, dd as STABLECOIN_ADDRESSES, de as STABLECOIN_DECIMALS, dc as STABLECOIN_INFO, dW as SealedBid, dU as SealedBidAuction, D as SerializedError, cg as SettlementBackend, ch as SettlementBackendFactory, c7 as SettlementBackendName, ci as SettlementBackendRegistry, c9 as SettlementQuote, c8 as SettlementQuoteParams, c5 as SettlementRegistry, c6 as SettlementRegistryError, cc as SettlementSwapParams, cd as SettlementSwapResult, ca as SettlementSwapRoute, cb as SettlementSwapRouteStep, cF as ShieldedBalance, cC as ShieldedSendParams, cD as ShieldedSendResult, bQ as SignedOracleAttestation, ck as SmartRouter, eZ as SolanaAdapterConfig, eY as SolanaCluster, e_ as SolanaConnection, eT as SolanaPublicKey, e$ as SolanaSendOptions, f1 as SolanaSignature, eU as SolanaTransaction, f0 as SolanaUnsignedTransaction, eV as SolanaVersionedTransaction, eg as SolanaWalletAdapter, eX as SolanaWalletName, eW as SolanaWalletProvider, dr as StablecoinInfo, ak as StealthCurve, aA as SuiStealthResult, as as SuiStealthService, bZ as SwapRequest, b$ as SwapResult, c4 as SwapStatus, ce as SwapStatusResponse, d1 as TapScript, d0 as TaprootOutput, dQ as ThresholdShares, dz as ThresholdViewingKey, dT as TimeLockParams, dR as TimeLockResult, aQ as TransactionData, fo as TransportType, ds as Treasury, fs as TrezorConfig, fm as TrezorModel, eN as TrezorWalletAdapter, dS as UnlockResult, V as ValidationError, bV as VerificationResult, dZ as VerifyBidParams, W as WalletAdapter, e9 as WalletError, cr as ZcashNativeBackend, ct as ZcashNativeBackendConfig, cL as ZcashQuote, cK as ZcashQuoteParams, cu as ZcashRPCClient, cv as ZcashRPCError, cx as ZcashShieldedService, cB as ZcashShieldedServiceConfig, cM as ZcashSwapParams, cN as ZcashSwapResult, cz as ZcashSwapService, cH as ZcashSwapServiceConfig, cI as ZcashSwapSourceChain, cJ as ZcashSwapSourceToken, cO as ZcashSwapStatus, b3 as addBlindings, b1 as addCommitments, bx as addOracle, aq as aptosAddressToAuthKey, Q as attachProofs, ep as base58ToHex, b as browserBytesToHex, h as browserHexToBytes, ao as checkAptosStealthAddress, ac as checkEd25519StealthAddress, a3 as checkStealthAddress, av as checkSuiStealthAddress, a_ as commit, b0 as commitZero, bE as computeAttestationHash, cW as computeTweakedKey, aR as createCommitment, er as createEthereumAdapter, cY as createKeySpendOnlyOutput, eM as createLedgerAdapter, et as createMockEthereumAdapter, eu as createMockEthereumProvider, eR as createMockLedgerAdapter, ej as createMockSolanaAdapter, el as createMockSolanaConnection, ek as createMockSolanaProvider, c2 as createMockSolver, eS as createMockTrezorAdapter, bY as createNEARIntentsAdapter, cq as createNEARIntentsBackend, bw as createOracleRegistry, e4 as createPrivateOwnership, d$ as createPrivateVoting, H as createProductionSIP, G as createSIP, dV as createSealedBidAuction, O as createShieldedIntent, d4 as createShieldedPayment, cl as createSmartRouter, eh as createSolanaAdapter, cX as createTaprootOutput, eO as createTrezorAdapter, ee as createWalletFactory, cw as createZcashClient, cs as createZcashNativeBackend, cy as createZcashShieldedService, cA as createZcashSwapService, a5 as decodeStealthMetaAddress, c_ as decodeTaprootAddress, d5 as decryptMemo, aN as decryptWithViewing, an as deriveAptosStealthPrivateKey, ab as deriveEd25519StealthPrivateKey, bv as deriveOracleId, a2 as deriveStealthPrivateKey, au as deriveSuiStealthPrivateKey, aL as deriveViewingKey, bD as deserializeAttestationMessage, Z as deserializeIntent, da as deserializePayment, ew as detectEthereumWallets, en as detectSolanaWallets, ap as ed25519PublicKeyToAptosAddress, ag as ed25519PublicKeyToNearAddress, ad as ed25519PublicKeyToSolanaAddress, aw as ed25519PublicKeyToSuiAddress, a4 as encodeStealthMetaAddress, aM as encryptForViewing, eb as featureNotSupportedError, dp as formatStablecoinAmount, ey as fromHex, dn as fromStablecoinUnits, am as generateAptosStealthAddress, b6 as generateBlinding, aD as generateCosmosStealthAddress, aC as generateCosmosStealthMetaAddress, aa as generateEd25519StealthAddress, a9 as generateEd25519StealthMetaAddress, aT as generateIntentId, dv as generatePdfReport, aV as generateRandomBytes, a1 as generateStealthAddress, a0 as generateStealthMetaAddress, at as generateSuiStealthAddress, aK as generateViewingKey, bA as getActiveOracles, eK as getAvailableTransports, g as getBrowserInfo, bF as getChainNumericId, dl as getChainsForStablecoin, a8 as getCurveForChain, eB as getDefaultRpcEndpoint, eG as getDerivationPath, A as getErrorMessage, ev as getEthereumProvider, b5 as getGenerators, _ as getIntentSummary, db as getPaymentSummary, d8 as getPaymentTimeRemaining, aJ as getPrivacyConfig, aO as getPrivacyDescription, em as getSolanaProvider, df as getStablecoin, di as getStablecoinInfo, dg as getStablecoinsForChain, dj as getSupportedStablecoins, X as getTimeRemaining, cV as getXOnlyPublicKey, bB as hasEnoughOracles, y as hasErrorCode, R as hasRequiredProofs, aU as hash, ez as hexToNumber, i as isBrowser, a7 as isEd25519Chain, U as isExpired, be as isNonNegativeAmount, d7 as isPaymentExpired, ef as isPrivateWalletAdapter, x as isSIPError, dh as isStablecoin, dk as isStablecoinOnChain, bd as isValidAmount, ar as isValidAptosAddress, b9 as isValidChainId, bh as isValidCompressedPublicKey, aF as isValidCosmosAddress, bi as isValidEd25519PublicKey, bb as isValidHex, bc as isValidHexLength, aj as isValidNearAccountId, ai as isValidNearImplicitAddress, ba as isValidPrivacyLevel, bj as isValidPrivateKey, bk as isValidScalar, bf as isValidSlippage, af as isValidSolanaAddress, bg as isValidStealthMetaAddress, ay as isValidSuiAddress, c$ as isValidTaprootAddress, ah as nearAddressToEd25519PublicKey, eA as normalizeAddress, ax as normalizeSuiAddress, ea as notConnectedError, e5 as proveOwnership, a6 as publicKeyToEthAddress, ed as registerWallet, by as removeOracle, cR as schnorrSign, cT as schnorrSignHex, cS as schnorrVerify, cU as schnorrVerifyHex, aW as secureWipe, aX as secureWipeAll, bC as serializeAttestationMessage, Y as serializeIntent, d9 as serializePayment, bu as signAttestationMessage, ae as solanaAddressToEd25519PublicKey, eo as solanaPublicKeyToHex, aE as stealthKeyToCosmosAddress, b4 as subtractBlindings, b2 as subtractCommitments, a as supportsSharedArrayBuffer, eJ as supportsWebBluetooth, eI as supportsWebHID, eH as supportsWebUSB, s as supportsWebWorkers, cZ as taprootAddress, ex as toHex, dm as toStablecoinUnits, T as trackIntent, d6 as trackPayment, bz as updateOracleStatus, bm as validateAsset, bl as validateCreateIntentParams, bn as validateIntentInput, bo as validateIntentOutput, bq as validateScalar, bp as validateViewingKey, bs as verifyAttestation, aS as verifyCommitment, a$ as verifyOpening, bt as verifyOracleSignature, e6 as verifyOwnership, ec as walletRegistry, aY as withSecureBuffer, aZ as withSecureBufferSync, z as wrapError } from './index-BzKgVQ87.js';
|
|
2
2
|
export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, CreatePrivateOwnershipParams, CreateTreasuryParams, DefuseAssetId, DisclosedTransaction, DisclosureRequest, FulfillmentCommitment, FulfillmentProof, FulfillmentRequest, FulfillmentResult, FulfillmentStatus, GenerateReportParams, Hash, HexString, WalletAdapter as IWalletAdapter, IntentStatus, NATIVE_TOKENS, OneClickConfig, OneClickDepositMode, OneClickErrorCode, OneClickQuoteRequest, OneClickQuoteResponse, OneClickStatusResponse, OneClickSwapStatus, OneClickSwapType, OwnershipProof, OwnershipVerification, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateNFTOwnership, PrivateWalletAdapter, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, ProveOwnershipParams, Quote, RegisterAuditorParams, ReportData, ReportFormat, ReportStatus, ReportStatusType, ReportType, SIPSolver, SIP_VERSION, ShieldedIntent, ShieldedPayment, Signature, SignedTransaction, Solver, SolverCapabilities, SolverEvent, SolverEventListener, SolverQuote, SolverVisibleIntent, StablecoinSymbol, StealthAddress, StealthAddressRecovery, StealthMetaAddress, SwapRoute, SwapRouteStep, TrackedIntent, TrackedPayment, TransactionReceipt, TreasuryBalance, TreasuryConfig, TreasuryMember, TreasuryProposal, TreasuryRole, TreasuryTransaction, UnsignedTransaction, 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, d as ProofFramework, b as ProofGenerationError, c as ProofProvider, P as ProofResult, V as ValidityProofParams } from './noir-DKfEzWy9.js';
|
package/dist/index.js
CHANGED
|
@@ -5421,9 +5421,9 @@ async function createShieldedIntent(params, options) {
|
|
|
5421
5421
|
const cleanHex = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
5422
5422
|
return (0, import_utils6.hexToBytes)(cleanHex);
|
|
5423
5423
|
};
|
|
5424
|
-
const effectiveOwnershipSig = ownershipSignature ??
|
|
5425
|
-
const effectiveSenderSecret = senderSecret ??
|
|
5426
|
-
const effectiveAuthSig = authorizationSignature ??
|
|
5424
|
+
const effectiveOwnershipSig = ownershipSignature ?? (0, import_utils6.randomBytes)(64);
|
|
5425
|
+
const effectiveSenderSecret = senderSecret ?? (0, import_utils6.randomBytes)(32);
|
|
5426
|
+
const effectiveAuthSig = authorizationSignature ?? (0, import_utils6.randomBytes)(64);
|
|
5427
5427
|
const fundingResult = await proofProvider.generateFundingProof({
|
|
5428
5428
|
balance: input.amount,
|
|
5429
5429
|
minimumRequired: input.amount,
|
|
@@ -5440,8 +5440,7 @@ async function createShieldedIntent(params, options) {
|
|
|
5440
5440
|
senderBlinding: hexToUint8(senderCommitment.blindingFactor),
|
|
5441
5441
|
senderSecret: effectiveSenderSecret,
|
|
5442
5442
|
authorizationSignature: effectiveAuthSig,
|
|
5443
|
-
nonce:
|
|
5444
|
-
// Could use randomBytes here
|
|
5443
|
+
nonce: (0, import_utils6.randomBytes)(32),
|
|
5445
5444
|
timestamp: now,
|
|
5446
5445
|
expiry: now + ttl
|
|
5447
5446
|
});
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18",
|
|
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",
|
package/src/intent.ts
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
generateIntentId,
|
|
32
32
|
hash,
|
|
33
33
|
} from './crypto'
|
|
34
|
-
import { hexToBytes, bytesToHex } from '@noble/hashes/utils'
|
|
34
|
+
import { hexToBytes, bytesToHex, randomBytes } from '@noble/hashes/utils'
|
|
35
35
|
import { sha256 } from '@noble/hashes/sha256'
|
|
36
36
|
import { getPrivacyConfig, generateViewingKey } from './privacy'
|
|
37
37
|
import type { ProofProvider } from './proofs'
|
|
@@ -556,9 +556,11 @@ export async function createShieldedIntent(
|
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
// Use provided signatures or placeholders (if allowed)
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
const
|
|
559
|
+
// IMPORTANT: senderSecret must be random even for placeholders, as secp256k1
|
|
560
|
+
// rejects all-zero private keys. randomBytes generates cryptographically secure random values.
|
|
561
|
+
const effectiveOwnershipSig = ownershipSignature ?? randomBytes(64)
|
|
562
|
+
const effectiveSenderSecret = senderSecret ?? randomBytes(32)
|
|
563
|
+
const effectiveAuthSig = authorizationSignature ?? randomBytes(64)
|
|
562
564
|
|
|
563
565
|
// Generate funding proof
|
|
564
566
|
// Note: The funding proof proves balance >= minimumRequired
|
|
@@ -583,7 +585,7 @@ export async function createShieldedIntent(
|
|
|
583
585
|
senderBlinding: hexToUint8(senderCommitment.blindingFactor as HexString),
|
|
584
586
|
senderSecret: effectiveSenderSecret,
|
|
585
587
|
authorizationSignature: effectiveAuthSig,
|
|
586
|
-
nonce:
|
|
588
|
+
nonce: randomBytes(32),
|
|
587
589
|
timestamp: now,
|
|
588
590
|
expiry: now + ttl,
|
|
589
591
|
})
|
package/src/proofs/browser.ts
CHANGED
|
@@ -684,6 +684,24 @@ export class BrowserNoirProvider implements ProofProvider {
|
|
|
684
684
|
} else {
|
|
685
685
|
// Ensure senderSecret is a proper Uint8Array (handles bundler serialization)
|
|
686
686
|
const senderSecretBytes = this.ensureUint8Array(params.senderSecret)
|
|
687
|
+
|
|
688
|
+
// Debug: Check if bytes were read correctly
|
|
689
|
+
const hasNonZero = senderSecretBytes.some((b) => b !== 0)
|
|
690
|
+
if (!hasNonZero && senderSecretBytes.length === 32) {
|
|
691
|
+
// Log detailed debug info to help diagnose serialization issues
|
|
692
|
+
const inputType = Object.prototype.toString.call(params.senderSecret)
|
|
693
|
+
const inputKeys = Object.keys(params.senderSecret as object).slice(0, 5)
|
|
694
|
+
const inputLength =
|
|
695
|
+
'length' in (params.senderSecret as object) ? (params.senderSecret as { length: number }).length : 'N/A'
|
|
696
|
+
console.error(
|
|
697
|
+
'[BrowserNoirProvider] senderSecret appears to be all zeros after ensureUint8Array!',
|
|
698
|
+
'\n Input type:', inputType,
|
|
699
|
+
'\n Input length:', inputLength,
|
|
700
|
+
'\n Sample keys:', inputKeys,
|
|
701
|
+
'\n First few raw values:', [0, 1, 2, 3].map((i) => (params.senderSecret as Record<number, unknown>)[i])
|
|
702
|
+
)
|
|
703
|
+
}
|
|
704
|
+
|
|
687
705
|
const coords = this.getPublicKeyCoordinates(senderSecretBytes)
|
|
688
706
|
pubKeyX = coords.x
|
|
689
707
|
pubKeyY = coords.y
|
|
@@ -1055,26 +1073,43 @@ export class BrowserNoirProvider implements ProofProvider {
|
|
|
1055
1073
|
|
|
1056
1074
|
/**
|
|
1057
1075
|
* Ensure input is a proper Uint8Array (handles serialization from bundlers)
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1076
|
+
*
|
|
1077
|
+
* When Uint8Array passes through Next.js/bundlers, several issues can occur:
|
|
1078
|
+
* 1. Object becomes {0: x, 1: y, ...} (plain object with numeric keys)
|
|
1079
|
+
* 2. ArrayBuffer gets detached, making Array.from() return empty
|
|
1080
|
+
* 3. instanceof checks fail across different execution contexts
|
|
1081
|
+
*
|
|
1082
|
+
* This implementation ALWAYS reads bytes by index to be robust against all cases.
|
|
1061
1083
|
*/
|
|
1062
1084
|
private ensureUint8Array(input: Uint8Array | ArrayLike<number> | Record<string, unknown>): Uint8Array {
|
|
1063
|
-
// Determine length
|
|
1064
|
-
let length
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1085
|
+
// Determine length from object properties
|
|
1086
|
+
let length = 0
|
|
1087
|
+
|
|
1088
|
+
if (typeof input === 'object' && input !== null) {
|
|
1089
|
+
// Try to get length from the object
|
|
1090
|
+
if ('length' in input && typeof (input as { length: unknown }).length === 'number') {
|
|
1091
|
+
length = (input as { length: number }).length
|
|
1092
|
+
} else if ('byteLength' in input && typeof (input as { byteLength: unknown }).byteLength === 'number') {
|
|
1093
|
+
// ArrayBuffer or TypedArray with byteLength
|
|
1094
|
+
length = (input as { byteLength: number }).byteLength
|
|
1095
|
+
} else {
|
|
1096
|
+
// Count numeric keys for plain objects like {0: x, 1: y, ...}
|
|
1097
|
+
const numericKeys = Object.keys(input).filter(k => /^\d+$/.test(k))
|
|
1098
|
+
length = numericKeys.length > 0 ? Math.max(...numericKeys.map(Number)) + 1 : 0
|
|
1099
|
+
}
|
|
1071
1100
|
}
|
|
1072
1101
|
|
|
1073
|
-
//
|
|
1102
|
+
// Create result array and copy bytes by index
|
|
1074
1103
|
const result = new Uint8Array(length)
|
|
1075
1104
|
for (let i = 0; i < length; i++) {
|
|
1105
|
+
// Access by index - works for Uint8Array, Array, and plain objects
|
|
1076
1106
|
const val = (input as Record<number, unknown>)[i]
|
|
1077
|
-
|
|
1107
|
+
if (typeof val === 'number') {
|
|
1108
|
+
result[i] = val & 0xff
|
|
1109
|
+
} else if (val !== undefined && val !== null) {
|
|
1110
|
+
result[i] = Number(val) & 0xff
|
|
1111
|
+
}
|
|
1112
|
+
// else: leave as 0 (default)
|
|
1078
1113
|
}
|
|
1079
1114
|
|
|
1080
1115
|
return result
|