@sip-protocol/sdk 0.6.23 → 0.6.25
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 +60 -27
- package/dist/browser.mjs +1 -1
- package/dist/chunk-46TH5SRE.mjs +17077 -0
- package/dist/{chunk-CHC3HKUM.mjs → chunk-C7RM67TH.mjs} +9 -13
- package/dist/chunk-EMOAOF5P.mjs +17084 -0
- package/dist/chunk-GE566OLO.mjs +17059 -0
- package/dist/chunk-GFSLU6SP.mjs +17077 -0
- package/dist/chunk-JK4FDH74.mjs +17059 -0
- package/dist/chunk-TSOCBT73.mjs +17067 -0
- package/dist/index-BYZbDjal.d.ts +11390 -0
- package/dist/index-CRz9S3eE.d.mts +11390 -0
- package/dist/index-DO9Az5n4.d.ts +11390 -0
- package/dist/index-Dex_NSYv.d.mts +11390 -0
- package/dist/index-DhThjSB5.d.ts +11390 -0
- package/dist/index-xbWjohNq.d.mts +11390 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +60 -27
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/adapters/near-intents.ts +28 -5
- package/src/adapters/oneclick-client.ts +17 -2
- package/src/intent.ts +38 -19
- package/src/sip.ts +6 -2
- package/src/wallet/solana/adapter.ts +4 -1
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-DKJ81T9L.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-xbWjohNq.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-BZxo_8F3.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-BYZbDjal.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
|
@@ -5397,33 +5397,41 @@ async function createShieldedIntent(params, options) {
|
|
|
5397
5397
|
let validityProof;
|
|
5398
5398
|
const requiresProofs = privacy !== import_types.PrivacyLevel.TRANSPARENT;
|
|
5399
5399
|
if (requiresProofs && proofProvider && proofProvider.isReady) {
|
|
5400
|
-
const
|
|
5401
|
-
const
|
|
5402
|
-
|
|
5400
|
+
const hasAllSignatures = ownershipSignature && senderSecret && authorizationSignature;
|
|
5401
|
+
const canGenerateSignatures = senderSecret && !ownershipSignature && !authorizationSignature;
|
|
5402
|
+
const hasValidConfig = hasAllSignatures || canGenerateSignatures || allowPlaceholders;
|
|
5403
|
+
if (!hasValidConfig) {
|
|
5403
5404
|
throw new ValidationError(
|
|
5404
|
-
"Proof generation requires signatures
|
|
5405
|
+
"Proof generation requires either: (1) senderSecret alone (SDK generates signatures), (2) all three: ownershipSignature, senderSecret, authorizationSignature, or (3) set allowPlaceholders: true for development/testing.",
|
|
5405
5406
|
"options",
|
|
5406
5407
|
{
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5408
|
+
provided: [
|
|
5409
|
+
ownershipSignature && "ownershipSignature",
|
|
5410
|
+
senderSecret && "senderSecret",
|
|
5411
|
+
authorizationSignature && "authorizationSignature"
|
|
5411
5412
|
].filter(Boolean)
|
|
5412
5413
|
}
|
|
5413
5414
|
);
|
|
5414
5415
|
}
|
|
5415
|
-
if (usingPlaceholders) {
|
|
5416
|
-
console.warn(
|
|
5417
|
-
"[createShieldedIntent] WARNING: Using placeholder signatures for proof generation. These proofs are NOT cryptographically valid. Do NOT use in production!"
|
|
5418
|
-
);
|
|
5419
|
-
}
|
|
5420
5416
|
const hexToUint8 = (hex) => {
|
|
5421
5417
|
const cleanHex = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
5422
5418
|
return (0, import_utils6.hexToBytes)(cleanHex);
|
|
5423
5419
|
};
|
|
5424
5420
|
const effectiveSenderSecret = senderSecret ?? (0, import_utils6.randomBytes)(32);
|
|
5425
|
-
const
|
|
5421
|
+
const rawIntentHashBytes = (0, import_sha2565.sha256)(new TextEncoder().encode(intentId));
|
|
5426
5422
|
const intentHashHex = hash(intentId);
|
|
5423
|
+
const BN254_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617n;
|
|
5424
|
+
let hashValue = 0n;
|
|
5425
|
+
for (const byte of rawIntentHashBytes) {
|
|
5426
|
+
hashValue = hashValue * 256n + BigInt(byte);
|
|
5427
|
+
}
|
|
5428
|
+
const reducedHashValue = hashValue % BN254_MODULUS;
|
|
5429
|
+
const intentHashBytes = new Uint8Array(32);
|
|
5430
|
+
let temp = reducedHashValue;
|
|
5431
|
+
for (let i = 31; i >= 0; i--) {
|
|
5432
|
+
intentHashBytes[i] = Number(temp & 0xffn);
|
|
5433
|
+
temp = temp >> 8n;
|
|
5434
|
+
}
|
|
5427
5435
|
let effectiveOwnershipSig;
|
|
5428
5436
|
let effectiveAuthSig;
|
|
5429
5437
|
if (ownershipSignature && authorizationSignature) {
|
|
@@ -5619,7 +5627,7 @@ var OneClickClient = class {
|
|
|
5619
5627
|
*
|
|
5620
5628
|
* @param depositAddress - Deposit address from quote
|
|
5621
5629
|
* @param depositMemo - Optional memo for memo-based deposits
|
|
5622
|
-
* @returns Current swap status
|
|
5630
|
+
* @returns Current swap status with normalized transaction hashes
|
|
5623
5631
|
*/
|
|
5624
5632
|
async getStatus(depositAddress, depositMemo) {
|
|
5625
5633
|
if (!depositAddress) {
|
|
@@ -5629,7 +5637,14 @@ var OneClickClient = class {
|
|
|
5629
5637
|
if (depositMemo) {
|
|
5630
5638
|
params.set("depositMemo", depositMemo);
|
|
5631
5639
|
}
|
|
5632
|
-
|
|
5640
|
+
const rawStatus = await this.get(`/v0/status?${params.toString()}`);
|
|
5641
|
+
const settlementTxHash = rawStatus.settlementTxHash ?? rawStatus.destinationChainTxHashes?.[0]?.hash;
|
|
5642
|
+
const depositTxHash = rawStatus.depositTxHash ?? rawStatus.originChainTxHashes?.[0]?.hash;
|
|
5643
|
+
return {
|
|
5644
|
+
...rawStatus,
|
|
5645
|
+
settlementTxHash,
|
|
5646
|
+
depositTxHash
|
|
5647
|
+
};
|
|
5633
5648
|
}
|
|
5634
5649
|
/**
|
|
5635
5650
|
* Poll status until terminal state or timeout
|
|
@@ -6181,9 +6196,10 @@ var NEARIntentsAdapter = class {
|
|
|
6181
6196
|
* @param request - Swap request parameters
|
|
6182
6197
|
* @param recipientMetaAddress - Recipient's stealth meta-address (for privacy modes)
|
|
6183
6198
|
* @param senderAddress - Sender's address for refunds
|
|
6199
|
+
* @param transparentRecipient - Explicit recipient address for transparent mode (defaults to senderAddress)
|
|
6184
6200
|
* @returns Prepared swap with quote request
|
|
6185
6201
|
*/
|
|
6186
|
-
async prepareSwap(request, recipientMetaAddress, senderAddress) {
|
|
6202
|
+
async prepareSwap(request, recipientMetaAddress, senderAddress, transparentRecipient) {
|
|
6187
6203
|
this.validateRequest(request);
|
|
6188
6204
|
const inputChain = request.inputAsset.chain;
|
|
6189
6205
|
if (senderAddress) {
|
|
@@ -6313,13 +6329,28 @@ var NEARIntentsAdapter = class {
|
|
|
6313
6329
|
}
|
|
6314
6330
|
}
|
|
6315
6331
|
} else {
|
|
6316
|
-
|
|
6332
|
+
const directRecipient = transparentRecipient ?? senderAddress;
|
|
6333
|
+
if (!directRecipient) {
|
|
6317
6334
|
throw new ValidationError(
|
|
6318
|
-
"senderAddress is required for transparent mode (or use stealth address)",
|
|
6319
|
-
"
|
|
6335
|
+
"recipientAddress or senderAddress is required for transparent mode (or use stealth address)",
|
|
6336
|
+
"recipientAddress"
|
|
6337
|
+
);
|
|
6338
|
+
}
|
|
6339
|
+
const outputChain = request.outputAsset.chain;
|
|
6340
|
+
if (!isAddressValidForChain(directRecipient, outputChain)) {
|
|
6341
|
+
const outputChainType = getChainAddressType(outputChain);
|
|
6342
|
+
const recipientFormat = directRecipient.startsWith("0x") ? "EVM" : /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(directRecipient) ? "Solana" : /^[0-9a-f]{64}$/.test(directRecipient) || /^[a-z0-9._-]+$/.test(directRecipient) ? "NEAR" : "unknown";
|
|
6343
|
+
throw new ValidationError(
|
|
6344
|
+
`Recipient address format doesn't match output chain. You're swapping TO ${outputChain} (${outputChainType} format) but the recipient address uses ${recipientFormat} format. Please provide a recipient address that matches the destination chain (${outputChain}).`,
|
|
6345
|
+
"recipientAddress",
|
|
6346
|
+
{
|
|
6347
|
+
outputChain,
|
|
6348
|
+
expectedFormat: outputChainType,
|
|
6349
|
+
actualFormat: recipientFormat
|
|
6350
|
+
}
|
|
6320
6351
|
);
|
|
6321
6352
|
}
|
|
6322
|
-
recipientAddress =
|
|
6353
|
+
recipientAddress = directRecipient;
|
|
6323
6354
|
}
|
|
6324
6355
|
const quoteRequest = this.buildQuoteRequest(request, recipientAddress, refundAddress);
|
|
6325
6356
|
return {
|
|
@@ -6707,9 +6738,10 @@ var SIP = class {
|
|
|
6707
6738
|
* @param params - Intent parameters (CreateIntentParams for production, ShieldedIntent/CreateIntentParams for demo)
|
|
6708
6739
|
* @param recipientMetaAddress - Optional stealth meta-address for privacy modes
|
|
6709
6740
|
* @param senderAddress - Optional sender wallet address for cross-curve refunds
|
|
6741
|
+
* @param transparentRecipient - Optional explicit recipient address for transparent mode (defaults to senderAddress)
|
|
6710
6742
|
* @returns Array of quotes (with deposit info in production mode)
|
|
6711
6743
|
*/
|
|
6712
|
-
async getQuotes(params, recipientMetaAddress, senderAddress) {
|
|
6744
|
+
async getQuotes(params, recipientMetaAddress, senderAddress, transparentRecipient) {
|
|
6713
6745
|
if (this.isProductionMode()) {
|
|
6714
6746
|
if (!("input" in params)) {
|
|
6715
6747
|
throw new ValidationError(
|
|
@@ -6717,7 +6749,7 @@ var SIP = class {
|
|
|
6717
6749
|
"params"
|
|
6718
6750
|
);
|
|
6719
6751
|
}
|
|
6720
|
-
return this.getQuotesProduction(params, recipientMetaAddress, senderAddress);
|
|
6752
|
+
return this.getQuotesProduction(params, recipientMetaAddress, senderAddress, transparentRecipient);
|
|
6721
6753
|
}
|
|
6722
6754
|
return this.getQuotesDemo(params);
|
|
6723
6755
|
}
|
|
@@ -6757,7 +6789,7 @@ var SIP = class {
|
|
|
6757
6789
|
return this.config.network;
|
|
6758
6790
|
}
|
|
6759
6791
|
// ─── Production Mode Implementation ─────────────────────────────────────────
|
|
6760
|
-
async getQuotesProduction(params, recipientMetaAddress, senderAddress) {
|
|
6792
|
+
async getQuotesProduction(params, recipientMetaAddress, senderAddress, transparentRecipient) {
|
|
6761
6793
|
if (!this.intentsAdapter) {
|
|
6762
6794
|
throw new ValidationError(
|
|
6763
6795
|
"NEAR Intents adapter not configured. Set intentsAdapter in config for production mode.",
|
|
@@ -6784,7 +6816,8 @@ var SIP = class {
|
|
|
6784
6816
|
const prepared = await this.intentsAdapter.prepareSwap(
|
|
6785
6817
|
swapRequest,
|
|
6786
6818
|
metaAddr,
|
|
6787
|
-
senderAddress ?? this.wallet?.address
|
|
6819
|
+
senderAddress ?? this.wallet?.address,
|
|
6820
|
+
transparentRecipient
|
|
6788
6821
|
);
|
|
6789
6822
|
const rawQuote = await this.intentsAdapter.getQuote(prepared);
|
|
6790
6823
|
if (!rawQuote.amountOut || !rawQuote.amountIn) {
|
|
@@ -6836,7 +6869,7 @@ var SIP = class {
|
|
|
6836
6869
|
depositTxHash = await options.onDepositRequired(depositAddress, rawQuote.amountIn);
|
|
6837
6870
|
if (!depositTxHash || !this.isValidTxHash(depositTxHash)) {
|
|
6838
6871
|
throw new ValidationError(
|
|
6839
|
-
"Invalid deposit transaction hash. Expected 0x-prefixed hex
|
|
6872
|
+
"Invalid deposit transaction hash. Expected 0x-prefixed hex (64-132 chars) or base58 (32-88 chars).",
|
|
6840
6873
|
"depositTxHash",
|
|
6841
6874
|
{ received: depositTxHash }
|
|
6842
6875
|
);
|
|
@@ -17110,7 +17143,7 @@ var SolanaWalletAdapter = class extends BaseWalletAdapter {
|
|
|
17110
17143
|
const sendOptions = tx.metadata?.sendOptions;
|
|
17111
17144
|
const { signature } = await this.provider.signAndSendTransaction(solTx, sendOptions);
|
|
17112
17145
|
return {
|
|
17113
|
-
txHash:
|
|
17146
|
+
txHash: signature,
|
|
17114
17147
|
status: "pending",
|
|
17115
17148
|
// Transaction is sent but not confirmed yet
|
|
17116
17149
|
timestamp: Date.now()
|
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.25",
|
|
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",
|
|
@@ -275,12 +275,14 @@ export class NEARIntentsAdapter {
|
|
|
275
275
|
* @param request - Swap request parameters
|
|
276
276
|
* @param recipientMetaAddress - Recipient's stealth meta-address (for privacy modes)
|
|
277
277
|
* @param senderAddress - Sender's address for refunds
|
|
278
|
+
* @param transparentRecipient - Explicit recipient address for transparent mode (defaults to senderAddress)
|
|
278
279
|
* @returns Prepared swap with quote request
|
|
279
280
|
*/
|
|
280
281
|
async prepareSwap(
|
|
281
282
|
request: SwapRequest,
|
|
282
283
|
recipientMetaAddress?: StealthMetaAddress | string,
|
|
283
284
|
senderAddress?: string,
|
|
285
|
+
transparentRecipient?: string,
|
|
284
286
|
): Promise<PreparedSwap> {
|
|
285
287
|
// Validate request
|
|
286
288
|
this.validateRequest(request)
|
|
@@ -467,14 +469,35 @@ export class NEARIntentsAdapter {
|
|
|
467
469
|
}
|
|
468
470
|
}
|
|
469
471
|
} else {
|
|
470
|
-
// Transparent mode uses
|
|
471
|
-
|
|
472
|
+
// Transparent mode uses explicit recipient or falls back to sender
|
|
473
|
+
const directRecipient = transparentRecipient ?? senderAddress
|
|
474
|
+
if (!directRecipient) {
|
|
475
|
+
throw new ValidationError(
|
|
476
|
+
'recipientAddress or senderAddress is required for transparent mode (or use stealth address)',
|
|
477
|
+
'recipientAddress'
|
|
478
|
+
)
|
|
479
|
+
}
|
|
480
|
+
// Validate recipient address matches output chain
|
|
481
|
+
const outputChain = request.outputAsset.chain
|
|
482
|
+
if (!isAddressValidForChain(directRecipient, outputChain)) {
|
|
483
|
+
const outputChainType = getChainAddressType(outputChain)
|
|
484
|
+
const recipientFormat = directRecipient.startsWith('0x') ? 'EVM' :
|
|
485
|
+
/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(directRecipient) ? 'Solana' :
|
|
486
|
+
/^[0-9a-f]{64}$/.test(directRecipient) || /^[a-z0-9._-]+$/.test(directRecipient) ? 'NEAR' : 'unknown'
|
|
487
|
+
|
|
472
488
|
throw new ValidationError(
|
|
473
|
-
|
|
474
|
-
'
|
|
489
|
+
`Recipient address format doesn't match output chain. ` +
|
|
490
|
+
`You're swapping TO ${outputChain} (${outputChainType} format) but the recipient address uses ${recipientFormat} format. ` +
|
|
491
|
+
`Please provide a recipient address that matches the destination chain (${outputChain}).`,
|
|
492
|
+
'recipientAddress',
|
|
493
|
+
{
|
|
494
|
+
outputChain,
|
|
495
|
+
expectedFormat: outputChainType,
|
|
496
|
+
actualFormat: recipientFormat,
|
|
497
|
+
}
|
|
475
498
|
)
|
|
476
499
|
}
|
|
477
|
-
recipientAddress =
|
|
500
|
+
recipientAddress = directRecipient
|
|
478
501
|
}
|
|
479
502
|
|
|
480
503
|
// Build quote request
|
|
@@ -161,7 +161,7 @@ export class OneClickClient {
|
|
|
161
161
|
*
|
|
162
162
|
* @param depositAddress - Deposit address from quote
|
|
163
163
|
* @param depositMemo - Optional memo for memo-based deposits
|
|
164
|
-
* @returns Current swap status
|
|
164
|
+
* @returns Current swap status with normalized transaction hashes
|
|
165
165
|
*/
|
|
166
166
|
async getStatus(depositAddress: string, depositMemo?: string): Promise<OneClickStatusResponse> {
|
|
167
167
|
if (!depositAddress) {
|
|
@@ -173,7 +173,22 @@ export class OneClickClient {
|
|
|
173
173
|
params.set('depositMemo', depositMemo)
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
const rawStatus = await this.get<OneClickStatusResponse>(`/v0/status?${params.toString()}`)
|
|
177
|
+
|
|
178
|
+
// Normalize response: extract settlement tx hash from destinationChainTxHashes if available
|
|
179
|
+
// The 1Click API returns destinationChainTxHashes array with {hash, explorerUrl} objects
|
|
180
|
+
const settlementTxHash = rawStatus.settlementTxHash
|
|
181
|
+
?? rawStatus.destinationChainTxHashes?.[0]?.hash
|
|
182
|
+
|
|
183
|
+
// Extract deposit tx hash from originChainTxHashes if not already present
|
|
184
|
+
const depositTxHash = rawStatus.depositTxHash
|
|
185
|
+
?? rawStatus.originChainTxHashes?.[0]?.hash
|
|
186
|
+
|
|
187
|
+
return {
|
|
188
|
+
...rawStatus,
|
|
189
|
+
settlementTxHash,
|
|
190
|
+
depositTxHash,
|
|
191
|
+
}
|
|
177
192
|
}
|
|
178
193
|
|
|
179
194
|
/**
|
package/src/intent.ts
CHANGED
|
@@ -524,31 +524,30 @@ export async function createShieldedIntent(
|
|
|
524
524
|
const requiresProofs = privacy !== PrivacyLevelEnum.TRANSPARENT
|
|
525
525
|
|
|
526
526
|
if (requiresProofs && proofProvider && proofProvider.isReady) {
|
|
527
|
-
// Check if
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
527
|
+
// Check if we can generate valid proofs:
|
|
528
|
+
// - Option 1: All signatures provided (ownershipSignature + senderSecret + authorizationSignature)
|
|
529
|
+
// - Option 2: Just senderSecret provided (SDK generates signatures internally)
|
|
530
|
+
// - Option 3: allowPlaceholders: true (random bytes, won't verify - dev/test only)
|
|
531
|
+
const hasAllSignatures = ownershipSignature && senderSecret && authorizationSignature
|
|
532
|
+
const canGenerateSignatures = senderSecret && !ownershipSignature && !authorizationSignature
|
|
533
|
+
const hasValidConfig = hasAllSignatures || canGenerateSignatures || allowPlaceholders
|
|
534
|
+
|
|
535
|
+
if (!hasValidConfig) {
|
|
532
536
|
throw new ValidationError(
|
|
533
|
-
'Proof generation requires
|
|
537
|
+
'Proof generation requires either: (1) senderSecret alone (SDK generates signatures), ' +
|
|
538
|
+
'(2) all three: ownershipSignature, senderSecret, authorizationSignature, or ' +
|
|
539
|
+
'(3) set allowPlaceholders: true for development/testing.',
|
|
534
540
|
'options',
|
|
535
541
|
{
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
542
|
+
provided: [
|
|
543
|
+
ownershipSignature && 'ownershipSignature',
|
|
544
|
+
senderSecret && 'senderSecret',
|
|
545
|
+
authorizationSignature && 'authorizationSignature',
|
|
540
546
|
].filter(Boolean),
|
|
541
547
|
}
|
|
542
548
|
)
|
|
543
549
|
}
|
|
544
550
|
|
|
545
|
-
if (usingPlaceholders) {
|
|
546
|
-
console.warn(
|
|
547
|
-
'[createShieldedIntent] WARNING: Using placeholder signatures for proof generation. ' +
|
|
548
|
-
'These proofs are NOT cryptographically valid. Do NOT use in production!'
|
|
549
|
-
)
|
|
550
|
-
}
|
|
551
|
-
|
|
552
551
|
// Helper to convert HexString to Uint8Array
|
|
553
552
|
const hexToUint8 = (hex: HexString): Uint8Array => {
|
|
554
553
|
const cleanHex = hex.startsWith('0x') ? hex.slice(2) : hex
|
|
@@ -561,11 +560,31 @@ export async function createShieldedIntent(
|
|
|
561
560
|
const effectiveSenderSecret = senderSecret ?? randomBytes(32)
|
|
562
561
|
|
|
563
562
|
// Compute the intent hash that will be used in the circuit
|
|
564
|
-
|
|
563
|
+
// IMPORTANT: Noir uses BN254 field, so hash values >= field modulus get reduced.
|
|
564
|
+
// We must sign the REDUCED hash to match what the circuit verifies.
|
|
565
|
+
const rawIntentHashBytes = sha256(new TextEncoder().encode(intentId))
|
|
565
566
|
const intentHashHex = hash(intentId) as HexString
|
|
566
567
|
|
|
568
|
+
// BN254 scalar field modulus (must match browser.ts and the circuit)
|
|
569
|
+
const BN254_MODULUS = 21888242871839275222246405745257275088548364400416034343698204186575808495617n
|
|
570
|
+
|
|
571
|
+
// Convert hash bytes to bigint and reduce modulo BN254
|
|
572
|
+
let hashValue = 0n
|
|
573
|
+
for (const byte of rawIntentHashBytes) {
|
|
574
|
+
hashValue = hashValue * 256n + BigInt(byte)
|
|
575
|
+
}
|
|
576
|
+
const reducedHashValue = hashValue % BN254_MODULUS
|
|
577
|
+
|
|
578
|
+
// Convert reduced value back to 32-byte array (big-endian)
|
|
579
|
+
const intentHashBytes = new Uint8Array(32)
|
|
580
|
+
let temp = reducedHashValue
|
|
581
|
+
for (let i = 31; i >= 0; i--) {
|
|
582
|
+
intentHashBytes[i] = Number(temp & 0xffn)
|
|
583
|
+
temp = temp >> 8n
|
|
584
|
+
}
|
|
585
|
+
|
|
567
586
|
// Generate ECDSA signatures using senderSecret if not provided
|
|
568
|
-
// This ensures the signature matches the intentHash computed internally
|
|
587
|
+
// This ensures the signature matches the intentHash computed internally (after BN254 reduction)
|
|
569
588
|
let effectiveOwnershipSig: Uint8Array
|
|
570
589
|
let effectiveAuthSig: Uint8Array
|
|
571
590
|
|
package/src/sip.ts
CHANGED
|
@@ -639,12 +639,14 @@ export class SIP {
|
|
|
639
639
|
* @param params - Intent parameters (CreateIntentParams for production, ShieldedIntent/CreateIntentParams for demo)
|
|
640
640
|
* @param recipientMetaAddress - Optional stealth meta-address for privacy modes
|
|
641
641
|
* @param senderAddress - Optional sender wallet address for cross-curve refunds
|
|
642
|
+
* @param transparentRecipient - Optional explicit recipient address for transparent mode (defaults to senderAddress)
|
|
642
643
|
* @returns Array of quotes (with deposit info in production mode)
|
|
643
644
|
*/
|
|
644
645
|
async getQuotes(
|
|
645
646
|
params: CreateIntentParams | ShieldedIntent,
|
|
646
647
|
recipientMetaAddress?: StealthMetaAddress | string,
|
|
647
648
|
senderAddress?: string,
|
|
649
|
+
transparentRecipient?: string,
|
|
648
650
|
): Promise<ProductionQuote[]> {
|
|
649
651
|
// Production mode - use real NEAR Intents
|
|
650
652
|
if (this.isProductionMode()) {
|
|
@@ -655,7 +657,7 @@ export class SIP {
|
|
|
655
657
|
'params'
|
|
656
658
|
)
|
|
657
659
|
}
|
|
658
|
-
return this.getQuotesProduction(params, recipientMetaAddress, senderAddress)
|
|
660
|
+
return this.getQuotesProduction(params, recipientMetaAddress, senderAddress, transparentRecipient)
|
|
659
661
|
}
|
|
660
662
|
|
|
661
663
|
// Demo mode - return mock quotes
|
|
@@ -721,6 +723,7 @@ export class SIP {
|
|
|
721
723
|
params: CreateIntentParams,
|
|
722
724
|
recipientMetaAddress?: StealthMetaAddress | string,
|
|
723
725
|
senderAddress?: string,
|
|
726
|
+
transparentRecipient?: string,
|
|
724
727
|
): Promise<ProductionQuote[]> {
|
|
725
728
|
if (!this.intentsAdapter) {
|
|
726
729
|
throw new ValidationError(
|
|
@@ -763,6 +766,7 @@ export class SIP {
|
|
|
763
766
|
swapRequest,
|
|
764
767
|
metaAddr,
|
|
765
768
|
senderAddress ?? this.wallet?.address,
|
|
769
|
+
transparentRecipient,
|
|
766
770
|
)
|
|
767
771
|
const rawQuote = await this.intentsAdapter.getQuote(prepared)
|
|
768
772
|
|
|
@@ -839,7 +843,7 @@ export class SIP {
|
|
|
839
843
|
// Validate txHash format before proceeding
|
|
840
844
|
if (!depositTxHash || !this.isValidTxHash(depositTxHash)) {
|
|
841
845
|
throw new ValidationError(
|
|
842
|
-
'Invalid deposit transaction hash. Expected 0x-prefixed hex
|
|
846
|
+
'Invalid deposit transaction hash. Expected 0x-prefixed hex (64-132 chars) or base58 (32-88 chars).',
|
|
843
847
|
'depositTxHash',
|
|
844
848
|
{ received: depositTxHash }
|
|
845
849
|
)
|
|
@@ -293,8 +293,11 @@ export class SolanaWalletAdapter extends BaseWalletAdapter {
|
|
|
293
293
|
|
|
294
294
|
const { signature } = await this.provider.signAndSendTransaction(solTx, sendOptions)
|
|
295
295
|
|
|
296
|
+
// Phantom/Solflare return signature as base58 string
|
|
297
|
+
// The SDK validation accepts both base58 (32-88 chars) and 0x-prefixed hex formats
|
|
298
|
+
// Return the base58 signature directly - no need to convert
|
|
296
299
|
return {
|
|
297
|
-
txHash:
|
|
300
|
+
txHash: signature as HexString,
|
|
298
301
|
status: 'pending', // Transaction is sent but not confirmed yet
|
|
299
302
|
timestamp: Date.now(),
|
|
300
303
|
}
|