@sip-protocol/sdk 0.2.7 → 0.2.9

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/README.md ADDED
@@ -0,0 +1,349 @@
1
+ # @sip-protocol/sdk
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@sip-protocol/sdk.svg)](https://www.npmjs.com/package/@sip-protocol/sdk)
4
+ [![Tests](https://github.com/sip-protocol/sip-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/sip-protocol/sip-protocol/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ **Privacy layer for cross-chain transactions.** One toggle to shield sender, amount, and recipient.
8
+
9
+ SIP (Shielded Intents Protocol) is the privacy standard for Web3 - like HTTPS for the internet. Add privacy to any cross-chain swap with stealth addresses, Pedersen commitments, and viewing keys for compliance.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @sip-protocol/sdk
15
+ # or
16
+ pnpm add @sip-protocol/sdk
17
+ # or
18
+ yarn add @sip-protocol/sdk
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ ### Basic Private Swap
24
+
25
+ ```typescript
26
+ import { SIP, PrivacyLevel, NATIVE_TOKENS } from '@sip-protocol/sdk'
27
+
28
+ // Create SIP client
29
+ const sip = new SIP({ network: 'mainnet' })
30
+
31
+ // Create a shielded cross-chain swap
32
+ const intent = await sip.createIntent({
33
+ input: { chain: 'ethereum', token: 'ETH', amount: '1.0' },
34
+ output: { chain: 'solana', token: 'SOL' },
35
+ privacy: PrivacyLevel.SHIELDED,
36
+ })
37
+
38
+ // Get quotes from solvers
39
+ const quotes = await sip.getQuotes(intent)
40
+
41
+ // Execute the swap (privacy preserved!)
42
+ const result = await sip.execute(intent, quotes[0])
43
+ console.log('Swap complete:', result.status)
44
+ ```
45
+
46
+ ### Privacy Levels
47
+
48
+ ```typescript
49
+ import { PrivacyLevel } from '@sip-protocol/sdk'
50
+
51
+ // Full transparency (regular swap)
52
+ PrivacyLevel.TRANSPARENT
53
+
54
+ // Maximum privacy (hidden sender, amount, recipient)
55
+ PrivacyLevel.SHIELDED
56
+
57
+ // Privacy + compliance (auditor can verify with viewing key)
58
+ PrivacyLevel.COMPLIANT
59
+ ```
60
+
61
+ ### Generate Stealth Address
62
+
63
+ ```typescript
64
+ import { generateStealthMetaAddress, generateStealthAddress } from '@sip-protocol/sdk'
65
+
66
+ // Recipient generates a meta-address (share this publicly)
67
+ const { metaAddress, spendingKey, viewingKey } = generateStealthMetaAddress('ethereum')
68
+
69
+ // Sender generates one-time stealth address from meta-address
70
+ const { stealthAddress, ephemeralPublicKey } = generateStealthAddress(metaAddress)
71
+
72
+ // Funds sent to stealthAddress are only recoverable by recipient
73
+ console.log('Send funds to:', stealthAddress)
74
+ ```
75
+
76
+ ### Pedersen Commitments
77
+
78
+ ```typescript
79
+ import { commit, verifyOpening, addCommitments } from '@sip-protocol/sdk'
80
+
81
+ // Hide an amount in a commitment
82
+ const amount = 1000000n // 1 USDC (6 decimals)
83
+ const { commitment, blinding } = commit(amount)
84
+
85
+ // Verify the commitment opens to the claimed amount
86
+ const isValid = verifyOpening(commitment, amount, blinding)
87
+ console.log('Commitment valid:', isValid) // true
88
+
89
+ // Commitments are homomorphic (can add without revealing)
90
+ const { commitment: c1, blinding: b1 } = commit(100n)
91
+ const { commitment: c2, blinding: b2 } = commit(200n)
92
+ const sumCommitment = addCommitments(c1, c2)
93
+ // sumCommitment commits to 300 without revealing individual amounts
94
+ ```
95
+
96
+ ### NEAR Intents Integration
97
+
98
+ ```typescript
99
+ import { NEARIntentsAdapter, generateStealthMetaAddress, PrivacyLevel } from '@sip-protocol/sdk'
100
+
101
+ const adapter = new NEARIntentsAdapter({
102
+ jwtToken: process.env.NEAR_INTENTS_JWT,
103
+ })
104
+
105
+ // Create swap request
106
+ const request = {
107
+ requestId: `swap_${Date.now()}`,
108
+ privacyLevel: PrivacyLevel.SHIELDED,
109
+ inputAsset: { chain: 'near', symbol: 'NEAR', decimals: 24 },
110
+ inputAmount: 1000000000000000000000000n, // 1 NEAR
111
+ outputAsset: { chain: 'ethereum', symbol: 'ETH', decimals: 18 },
112
+ }
113
+
114
+ // Generate stealth address for recipient
115
+ const { metaAddress } = generateStealthMetaAddress('ethereum')
116
+
117
+ // Prepare and execute
118
+ const prepared = await adapter.prepareSwap(request, metaAddress)
119
+ const quote = await adapter.getQuote(prepared)
120
+ console.log('Quote:', quote.amountOut, 'ETH')
121
+ ```
122
+
123
+ ### Compliant Mode with Viewing Keys
124
+
125
+ ```typescript
126
+ import {
127
+ SIP,
128
+ PrivacyLevel,
129
+ generateViewingKey,
130
+ encryptForViewing,
131
+ decryptWithViewing
132
+ } from '@sip-protocol/sdk'
133
+
134
+ // Create compliant swap (privacy + audit capability)
135
+ const sip = new SIP({ network: 'mainnet' })
136
+
137
+ const intent = await sip.createIntent({
138
+ input: { chain: 'ethereum', token: 'USDC', amount: '10000' },
139
+ output: { chain: 'polygon', token: 'USDC' },
140
+ privacy: PrivacyLevel.COMPLIANT,
141
+ })
142
+
143
+ // Generate viewing key for auditor
144
+ const viewingKey = generateViewingKey()
145
+
146
+ // Encrypt transaction details for auditor
147
+ const encrypted = encryptForViewing(
148
+ { amount: '10000', sender: '0x...', recipient: '0x...' },
149
+ viewingKey.publicKey
150
+ )
151
+
152
+ // Auditor can decrypt with their private key
153
+ const decrypted = decryptWithViewing(encrypted, viewingKey.privateKey)
154
+ ```
155
+
156
+ ## Core Concepts
157
+
158
+ ### Stealth Addresses (EIP-5564)
159
+
160
+ One-time addresses that prevent linking transactions to recipients:
161
+
162
+ | Chain Type | Curve | Function |
163
+ |------------|-------|----------|
164
+ | EVM (Ethereum, Polygon, Arbitrum) | secp256k1 | `generateStealthMetaAddress()` |
165
+ | Solana, NEAR | ed25519 | `generateEd25519StealthMetaAddress()` |
166
+
167
+ ### Pedersen Commitments
168
+
169
+ Hide amounts while proving correctness:
170
+
171
+ - **Hiding**: Commitment reveals nothing about the value
172
+ - **Binding**: Cannot open to different values
173
+ - **Homomorphic**: `C(a) + C(b) = C(a+b)` - verify sums without revealing
174
+
175
+ ### Privacy Levels
176
+
177
+ | Level | Sender | Amount | Recipient | Auditable |
178
+ |-------|--------|--------|-----------|-----------|
179
+ | `TRANSPARENT` | Visible | Visible | Visible | N/A |
180
+ | `SHIELDED` | Hidden | Hidden | Hidden | No |
181
+ | `COMPLIANT` | Hidden | Hidden | Hidden | Yes (viewing key) |
182
+
183
+ ## API Reference
184
+
185
+ ### Main Client
186
+
187
+ ```typescript
188
+ import { SIP, createSIP, createProductionSIP } from '@sip-protocol/sdk'
189
+
190
+ const sip = new SIP({ network: 'mainnet' })
191
+ // or
192
+ const sip = createSIP({ network: 'testnet' })
193
+ // or (with NEAR Intents)
194
+ const sip = createProductionSIP({ jwtToken: '...' })
195
+ ```
196
+
197
+ ### Intent Builder
198
+
199
+ ```typescript
200
+ import { IntentBuilder, createShieldedIntent } from '@sip-protocol/sdk'
201
+
202
+ // Fluent API
203
+ const intent = new IntentBuilder()
204
+ .from('ethereum', 'ETH', '1.0')
205
+ .to('solana', 'SOL')
206
+ .withPrivacy(PrivacyLevel.SHIELDED)
207
+ .build()
208
+
209
+ // Or direct creation
210
+ const intent = createShieldedIntent({
211
+ input: { chain: 'ethereum', token: 'ETH', amount: '1.0' },
212
+ output: { chain: 'solana', token: 'SOL' },
213
+ })
214
+ ```
215
+
216
+ ### Wallet Adapters
217
+
218
+ ```typescript
219
+ import {
220
+ EthereumWalletAdapter,
221
+ SolanaWalletAdapter,
222
+ LedgerWalletAdapter,
223
+ TrezorWalletAdapter,
224
+ } from '@sip-protocol/sdk'
225
+
226
+ // MetaMask / Browser wallet
227
+ const eth = await EthereumWalletAdapter.create()
228
+ await eth.connect()
229
+
230
+ // Phantom / Solflare
231
+ const sol = await SolanaWalletAdapter.create()
232
+ await sol.connect()
233
+
234
+ // Hardware wallets
235
+ const ledger = await LedgerWalletAdapter.create({ transport: 'webusb' })
236
+ const trezor = await TrezorWalletAdapter.create()
237
+ ```
238
+
239
+ ### Proof Providers
240
+
241
+ ```typescript
242
+ // Browser (WASM-based)
243
+ import { BrowserNoirProvider } from '@sip-protocol/sdk/browser'
244
+
245
+ const provider = new BrowserNoirProvider()
246
+ await provider.initialize()
247
+ const proof = await provider.generateFundingProof(params)
248
+
249
+ // Node.js
250
+ import { NoirProofProvider } from '@sip-protocol/sdk/proofs/noir'
251
+
252
+ const provider = new NoirProofProvider()
253
+ await provider.initialize()
254
+ const proof = await provider.generateFundingProof(params)
255
+
256
+ // Mock (for testing)
257
+ import { MockProofProvider } from '@sip-protocol/sdk'
258
+
259
+ const mock = new MockProofProvider()
260
+ const proof = await mock.generateFundingProof(params)
261
+ ```
262
+
263
+ ### Zcash Integration
264
+
265
+ ```typescript
266
+ import { ZcashRPCClient, ZcashShieldedService } from '@sip-protocol/sdk'
267
+
268
+ const client = new ZcashRPCClient({
269
+ host: 'localhost',
270
+ port: 8232,
271
+ username: process.env.ZCASH_RPC_USER,
272
+ password: process.env.ZCASH_RPC_PASS,
273
+ })
274
+
275
+ const service = new ZcashShieldedService({ client })
276
+ const result = await service.shieldedSend({
277
+ from: 'z-address...',
278
+ to: 'z-address...',
279
+ amount: 1.5,
280
+ memo: 'Private payment',
281
+ })
282
+ ```
283
+
284
+ ## Supported Chains
285
+
286
+ | Chain | Input | Output | Stealth Curve |
287
+ |-------|-------|--------|---------------|
288
+ | Ethereum | Yes | Yes | secp256k1 |
289
+ | Solana | Yes | Yes | ed25519 |
290
+ | NEAR | Yes | Yes | ed25519 |
291
+ | Polygon | Yes | Yes | secp256k1 |
292
+ | Arbitrum | Yes | Yes | secp256k1 |
293
+ | Base | Yes | Yes | secp256k1 |
294
+ | Optimism | Yes | Yes | secp256k1 |
295
+ | Bitcoin | Yes | Yes | - |
296
+ | Zcash | Yes | Yes | - |
297
+
298
+ ## Error Handling
299
+
300
+ ```typescript
301
+ import { SIPError, ValidationError, CryptoError, isSIPError } from '@sip-protocol/sdk'
302
+
303
+ try {
304
+ await sip.execute(intent, quote)
305
+ } catch (error) {
306
+ if (isSIPError(error)) {
307
+ console.error('SIP Error:', error.code, error.message)
308
+
309
+ if (error instanceof ValidationError) {
310
+ console.error('Invalid input:', error.details)
311
+ }
312
+ }
313
+ }
314
+ ```
315
+
316
+ ## Testing
317
+
318
+ The SDK includes 1,295 tests covering all functionality:
319
+
320
+ ```bash
321
+ # Run all tests
322
+ pnpm test
323
+
324
+ # Run with coverage
325
+ pnpm test:coverage
326
+
327
+ # Run benchmarks
328
+ pnpm bench
329
+ ```
330
+
331
+ ## Documentation
332
+
333
+ - [Full Documentation](https://docs.sip-protocol.org)
334
+ - [API Reference](https://docs.sip-protocol.org/api)
335
+ - [Examples](https://github.com/sip-protocol/sip-protocol/tree/main/examples)
336
+
337
+ ## Contributing
338
+
339
+ See [CONTRIBUTING.md](https://github.com/sip-protocol/sip-protocol/blob/main/CONTRIBUTING.md) for guidelines.
340
+
341
+ ## License
342
+
343
+ MIT License - see [LICENSE](https://github.com/sip-protocol/sip-protocol/blob/main/LICENSE) for details.
344
+
345
+ ---
346
+
347
+ **SIP Protocol** - Privacy is a feature, not a bug.
348
+
349
+ [Website](https://sip-protocol.org) | [Docs](https://docs.sip-protocol.org) | [GitHub](https://github.com/sip-protocol/sip-protocol) | [Discord](https://discord.gg/sip-protocol)
@@ -1,3 +1,3 @@
1
- export { ATTESTATION_VERSION, AttestationRequest, AttestationResult, BaseWalletAdapter, B as BrowserNoirProvider, BrowserNoirProviderConfig, CHAIN_NUMERIC_IDS, CommitmentPoint, ComplianceManager, CreateIntentOptions, CreatePaymentOptions, CryptoError, DEFAULT_THRESHOLD, DEFAULT_TOTAL_ORACLES, DerivationPath, EIP1193ConnectInfo, EIP1193Event, EIP1193Provider, EIP1193ProviderRpcError, EIP1193RequestArguments, EIP712Domain, EIP712TypeDefinition, EIP712TypedData, EIP712Types, EncryptionNotImplementedError, ErrorCode, EthereumAdapterConfig, EthereumChainId, EthereumChainIdType, EthereumChainMetadata, EthereumTokenMetadata, EthereumTransactionReceipt, EthereumTransactionRequest, EthereumWalletAdapter, EthereumWalletName, ExportedViewingKey, HardwareAccount, HardwareConnectionStatus, HardwareDeviceInfo, HardwareErrorCode, HardwareErrorCodeType, HardwareEthereumTx, HardwareSignRequest, HardwareSignature, HardwareTransport, HardwareWalletConfig, HardwareWalletError, HardwareWalletType, IntentBuilder, IntentError, LedgerConfig, LedgerModel, LedgerWalletAdapter, MockEthereumAdapter, MockEthereumAdapterConfig, MockHardwareConfig, MockLedgerAdapter, MockProofProvider, MockSolanaAdapter, MockSolanaAdapterConfig, MockSolver, MockSolverConfig, MockTrezorAdapter, MockWalletAdapter, NEARIntentsAdapter, NEARIntentsAdapterConfig, NetworkError, ORACLE_DOMAIN, OneClickClient, OracleAttestationMessage, OracleId, OracleInfo, OracleRegistry, OracleRegistryConfig, OracleSignature, OracleStatus, PaymentBuilder, PedersenCommitment, PreparedSwap, PrivacyConfig, ProductionQuote, ProofError, ProofNotImplementedError, ProofProgressCallback, ReceivedNote, SIP, SIPConfig, SIPError, STABLECOIN_ADDRESSES, STABLECOIN_DECIMALS, STABLECOIN_INFO, SerializedError, ShieldedBalance, ShieldedSendParams, ShieldedSendResult, SignedOracleAttestation, SolanaAdapterConfig, SolanaCluster, SolanaConnection, SolanaPublicKey, SolanaSendOptions, SolanaSignature, SolanaTransaction, SolanaUnsignedTransaction, SolanaVersionedTransaction, SolanaWalletAdapter, SolanaWalletName, SolanaWalletProvider, StablecoinInfo, StealthCurve, SwapRequest, SwapResult, TransactionData, TransportType, Treasury, TrezorConfig, TrezorModel, TrezorWalletAdapter, ValidationError, VerificationResult, WalletAdapter, WalletError, ZcashRPCClient, ZcashRPCError, ZcashShieldedService, ZcashShieldedServiceConfig, addBlindings, addCommitments, addOracle, attachProofs, base58ToHex, browserBytesToHex, browserHexToBytes, checkEd25519StealthAddress, checkStealthAddress, commit, commitZero, computeAttestationHash, createCommitment, createEthereumAdapter, createLedgerAdapter, createMockEthereumAdapter, createMockEthereumProvider, createMockLedgerAdapter, createMockSolanaAdapter, createMockSolanaConnection, createMockSolanaProvider, createMockSolver, createMockTrezorAdapter, createNEARIntentsAdapter, createOracleRegistry, createProductionSIP, createSIP, createShieldedIntent, createShieldedPayment, createSolanaAdapter, createTrezorAdapter, createWalletFactory, createZcashClient, createZcashShieldedService, decodeStealthMetaAddress, decryptMemo, decryptWithViewing, deriveEd25519StealthPrivateKey, deriveOracleId, deriveStealthPrivateKey, deriveViewingKey, deserializeAttestationMessage, deserializeIntent, deserializePayment, detectEthereumWallets, detectSolanaWallets, ed25519PublicKeyToNearAddress, ed25519PublicKeyToSolanaAddress, encodeStealthMetaAddress, encryptForViewing, featureNotSupportedError, formatStablecoinAmount, fromHex, fromStablecoinUnits, generateBlinding, generateEd25519StealthAddress, generateEd25519StealthMetaAddress, generateIntentId, generateRandomBytes, generateStealthAddress, generateStealthMetaAddress, generateViewingKey, getActiveOracles, getAvailableTransports, getBrowserInfo, getChainNumericId, getChainsForStablecoin, getCurveForChain, getDefaultRpcEndpoint, getDerivationPath, getErrorMessage, getEthereumProvider, getGenerators, getIntentSummary, getPaymentSummary, getPaymentTimeRemaining, getPrivacyConfig, getPrivacyDescription, getSolanaProvider, getStablecoin, getStablecoinInfo, getStablecoinsForChain, getSupportedStablecoins, getTimeRemaining, hasEnoughOracles, hasErrorCode, hasRequiredProofs, hash, hexToNumber, isBrowser, isEd25519Chain, isExpired, isNonNegativeAmount, isPaymentExpired, isPrivateWalletAdapter, isSIPError, isStablecoin, isStablecoinOnChain, isValidAmount, isValidChainId, isValidCompressedPublicKey, isValidEd25519PublicKey, isValidHex, isValidHexLength, isValidNearAccountId, isValidNearImplicitAddress, isValidPrivacyLevel, isValidPrivateKey, isValidScalar, isValidSlippage, isValidSolanaAddress, isValidStealthMetaAddress, nearAddressToEd25519PublicKey, normalizeAddress, notConnectedError, publicKeyToEthAddress, registerWallet, removeOracle, secureWipe, secureWipeAll, serializeAttestationMessage, serializeIntent, serializePayment, signAttestationMessage, solanaAddressToEd25519PublicKey, solanaPublicKeyToHex, subtractBlindings, subtractCommitments, supportsSharedArrayBuffer, supportsWebBluetooth, supportsWebHID, supportsWebUSB, supportsWebWorkers, toHex, toStablecoinUnits, trackIntent, trackPayment, updateOracleStatus, validateAsset, validateCreateIntentParams, validateIntentInput, validateIntentOutput, validateScalar, validateViewingKey, verifyAttestation, verifyCommitment, verifyOpening, verifyOracleSignature, walletRegistry, withSecureBuffer, withSecureBufferSync, wrapError } from './index.mjs';
1
+ export { ATTESTATION_VERSION, AttestationRequest, AttestationResult, BaseWalletAdapter, BridgeProvider, B as BrowserNoirProvider, BrowserNoirProviderConfig, CHAIN_NUMERIC_IDS, CommitmentPoint, ComplianceManager, CreateIntentOptions, CreatePaymentOptions, CryptoError, DEFAULT_THRESHOLD, DEFAULT_TOTAL_ORACLES, DerivationPath, EIP1193ConnectInfo, EIP1193Event, EIP1193Provider, EIP1193ProviderRpcError, EIP1193RequestArguments, EIP712Domain, EIP712TypeDefinition, EIP712TypedData, EIP712Types, EncryptionNotImplementedError, ErrorCode, EthereumAdapterConfig, EthereumChainId, EthereumChainIdType, EthereumChainMetadata, EthereumTokenMetadata, EthereumTransactionReceipt, EthereumTransactionRequest, EthereumWalletAdapter, EthereumWalletName, ExportedViewingKey, HardwareAccount, HardwareConnectionStatus, HardwareDeviceInfo, HardwareErrorCode, HardwareErrorCodeType, HardwareEthereumTx, HardwareSignRequest, HardwareSignature, HardwareTransport, HardwareWalletConfig, HardwareWalletError, HardwareWalletType, IntentBuilder, IntentError, LedgerConfig, LedgerModel, LedgerWalletAdapter, MockEthereumAdapter, MockEthereumAdapterConfig, MockHardwareConfig, MockLedgerAdapter, MockProofProvider, MockSolanaAdapter, MockSolanaAdapterConfig, MockSolver, MockSolverConfig, MockTrezorAdapter, MockWalletAdapter, NEARIntentsAdapter, NEARIntentsAdapterConfig, NetworkError, ORACLE_DOMAIN, OneClickClient, OracleAttestationMessage, OracleId, OracleInfo, OracleRegistry, OracleRegistryConfig, OracleSignature, OracleStatus, PaymentBuilder, PedersenCommitment, PreparedSwap, PriceFeed, PrivacyConfig, ProductionQuote, ProofError, ProofNotImplementedError, ProofProgressCallback, ReceivedNote, SIP, SIPConfig, SIPError, STABLECOIN_ADDRESSES, STABLECOIN_DECIMALS, STABLECOIN_INFO, SerializedError, ShieldedBalance, ShieldedSendParams, ShieldedSendResult, SignedOracleAttestation, SolanaAdapterConfig, SolanaCluster, SolanaConnection, SolanaPublicKey, SolanaSendOptions, SolanaSignature, SolanaTransaction, SolanaUnsignedTransaction, SolanaVersionedTransaction, SolanaWalletAdapter, SolanaWalletName, SolanaWalletProvider, StablecoinInfo, StealthCurve, SwapRequest, SwapResult, TransactionData, TransportType, Treasury, TrezorConfig, TrezorModel, TrezorWalletAdapter, ValidationError, VerificationResult, WalletAdapter, WalletError, ZcashQuote, ZcashQuoteParams, ZcashRPCClient, ZcashRPCError, ZcashShieldedService, ZcashShieldedServiceConfig, ZcashSwapParams, ZcashSwapResult, ZcashSwapService, ZcashSwapServiceConfig, ZcashSwapSourceChain, ZcashSwapSourceToken, ZcashSwapStatus, addBlindings, addCommitments, addOracle, attachProofs, base58ToHex, browserBytesToHex, browserHexToBytes, checkEd25519StealthAddress, checkStealthAddress, commit, commitZero, computeAttestationHash, createCommitment, createEthereumAdapter, createLedgerAdapter, createMockEthereumAdapter, createMockEthereumProvider, createMockLedgerAdapter, createMockSolanaAdapter, createMockSolanaConnection, createMockSolanaProvider, createMockSolver, createMockTrezorAdapter, createNEARIntentsAdapter, createOracleRegistry, createProductionSIP, createSIP, createShieldedIntent, createShieldedPayment, createSolanaAdapter, createTrezorAdapter, createWalletFactory, createZcashClient, createZcashShieldedService, createZcashSwapService, decodeStealthMetaAddress, decryptMemo, decryptWithViewing, deriveEd25519StealthPrivateKey, deriveOracleId, deriveStealthPrivateKey, deriveViewingKey, deserializeAttestationMessage, deserializeIntent, deserializePayment, detectEthereumWallets, detectSolanaWallets, ed25519PublicKeyToNearAddress, ed25519PublicKeyToSolanaAddress, encodeStealthMetaAddress, encryptForViewing, featureNotSupportedError, formatStablecoinAmount, fromHex, fromStablecoinUnits, generateBlinding, generateEd25519StealthAddress, generateEd25519StealthMetaAddress, generateIntentId, generateRandomBytes, generateStealthAddress, generateStealthMetaAddress, generateViewingKey, getActiveOracles, getAvailableTransports, getBrowserInfo, getChainNumericId, getChainsForStablecoin, getCurveForChain, getDefaultRpcEndpoint, getDerivationPath, getErrorMessage, getEthereumProvider, getGenerators, getIntentSummary, getPaymentSummary, getPaymentTimeRemaining, getPrivacyConfig, getPrivacyDescription, getSolanaProvider, getStablecoin, getStablecoinInfo, getStablecoinsForChain, getSupportedStablecoins, getTimeRemaining, hasEnoughOracles, hasErrorCode, hasRequiredProofs, hash, hexToNumber, isBrowser, isEd25519Chain, isExpired, isNonNegativeAmount, isPaymentExpired, isPrivateWalletAdapter, isSIPError, isStablecoin, isStablecoinOnChain, isValidAmount, isValidChainId, isValidCompressedPublicKey, isValidEd25519PublicKey, isValidHex, isValidHexLength, isValidNearAccountId, isValidNearImplicitAddress, isValidPrivacyLevel, isValidPrivateKey, isValidScalar, isValidSlippage, isValidSolanaAddress, isValidStealthMetaAddress, nearAddressToEd25519PublicKey, normalizeAddress, notConnectedError, publicKeyToEthAddress, registerWallet, removeOracle, secureWipe, secureWipeAll, serializeAttestationMessage, serializeIntent, serializePayment, signAttestationMessage, solanaAddressToEd25519PublicKey, solanaPublicKeyToHex, subtractBlindings, subtractCommitments, supportsSharedArrayBuffer, supportsWebBluetooth, supportsWebHID, supportsWebUSB, supportsWebWorkers, toHex, toStablecoinUnits, trackIntent, trackPayment, updateOracleStatus, validateAsset, validateCreateIntentParams, validateIntentInput, validateIntentOutput, validateScalar, validateViewingKey, verifyAttestation, verifyCommitment, verifyOpening, verifyOracleSignature, walletRegistry, withSecureBuffer, withSecureBufferSync, wrapError } from './index.mjs';
2
2
  export { c as FulfillmentProofParams, F as FundingProofParams, N as NoirProviderConfig, O as OracleAttestation, a as ProofFramework, d as ProofGenerationError, P as ProofProvider, b as ProofResult, V as ValidityProofParams } from './noir-BHQtFvRk.mjs';
3
3
  export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, 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, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateWalletAdapter, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, 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';
package/dist/browser.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { ATTESTATION_VERSION, AttestationRequest, AttestationResult, BaseWalletAdapter, B as BrowserNoirProvider, BrowserNoirProviderConfig, CHAIN_NUMERIC_IDS, CommitmentPoint, ComplianceManager, CreateIntentOptions, CreatePaymentOptions, CryptoError, DEFAULT_THRESHOLD, DEFAULT_TOTAL_ORACLES, DerivationPath, EIP1193ConnectInfo, EIP1193Event, EIP1193Provider, EIP1193ProviderRpcError, EIP1193RequestArguments, EIP712Domain, EIP712TypeDefinition, EIP712TypedData, EIP712Types, EncryptionNotImplementedError, ErrorCode, EthereumAdapterConfig, EthereumChainId, EthereumChainIdType, EthereumChainMetadata, EthereumTokenMetadata, EthereumTransactionReceipt, EthereumTransactionRequest, EthereumWalletAdapter, EthereumWalletName, ExportedViewingKey, HardwareAccount, HardwareConnectionStatus, HardwareDeviceInfo, HardwareErrorCode, HardwareErrorCodeType, HardwareEthereumTx, HardwareSignRequest, HardwareSignature, HardwareTransport, HardwareWalletConfig, HardwareWalletError, HardwareWalletType, IntentBuilder, IntentError, LedgerConfig, LedgerModel, LedgerWalletAdapter, MockEthereumAdapter, MockEthereumAdapterConfig, MockHardwareConfig, MockLedgerAdapter, MockProofProvider, MockSolanaAdapter, MockSolanaAdapterConfig, MockSolver, MockSolverConfig, MockTrezorAdapter, MockWalletAdapter, NEARIntentsAdapter, NEARIntentsAdapterConfig, NetworkError, ORACLE_DOMAIN, OneClickClient, OracleAttestationMessage, OracleId, OracleInfo, OracleRegistry, OracleRegistryConfig, OracleSignature, OracleStatus, PaymentBuilder, PedersenCommitment, PreparedSwap, PrivacyConfig, ProductionQuote, ProofError, ProofNotImplementedError, ProofProgressCallback, ReceivedNote, SIP, SIPConfig, SIPError, STABLECOIN_ADDRESSES, STABLECOIN_DECIMALS, STABLECOIN_INFO, SerializedError, ShieldedBalance, ShieldedSendParams, ShieldedSendResult, SignedOracleAttestation, SolanaAdapterConfig, SolanaCluster, SolanaConnection, SolanaPublicKey, SolanaSendOptions, SolanaSignature, SolanaTransaction, SolanaUnsignedTransaction, SolanaVersionedTransaction, SolanaWalletAdapter, SolanaWalletName, SolanaWalletProvider, StablecoinInfo, StealthCurve, SwapRequest, SwapResult, TransactionData, TransportType, Treasury, TrezorConfig, TrezorModel, TrezorWalletAdapter, ValidationError, VerificationResult, WalletAdapter, WalletError, ZcashRPCClient, ZcashRPCError, ZcashShieldedService, ZcashShieldedServiceConfig, addBlindings, addCommitments, addOracle, attachProofs, base58ToHex, browserBytesToHex, browserHexToBytes, checkEd25519StealthAddress, checkStealthAddress, commit, commitZero, computeAttestationHash, createCommitment, createEthereumAdapter, createLedgerAdapter, createMockEthereumAdapter, createMockEthereumProvider, createMockLedgerAdapter, createMockSolanaAdapter, createMockSolanaConnection, createMockSolanaProvider, createMockSolver, createMockTrezorAdapter, createNEARIntentsAdapter, createOracleRegistry, createProductionSIP, createSIP, createShieldedIntent, createShieldedPayment, createSolanaAdapter, createTrezorAdapter, createWalletFactory, createZcashClient, createZcashShieldedService, decodeStealthMetaAddress, decryptMemo, decryptWithViewing, deriveEd25519StealthPrivateKey, deriveOracleId, deriveStealthPrivateKey, deriveViewingKey, deserializeAttestationMessage, deserializeIntent, deserializePayment, detectEthereumWallets, detectSolanaWallets, ed25519PublicKeyToNearAddress, ed25519PublicKeyToSolanaAddress, encodeStealthMetaAddress, encryptForViewing, featureNotSupportedError, formatStablecoinAmount, fromHex, fromStablecoinUnits, generateBlinding, generateEd25519StealthAddress, generateEd25519StealthMetaAddress, generateIntentId, generateRandomBytes, generateStealthAddress, generateStealthMetaAddress, generateViewingKey, getActiveOracles, getAvailableTransports, getBrowserInfo, getChainNumericId, getChainsForStablecoin, getCurveForChain, getDefaultRpcEndpoint, getDerivationPath, getErrorMessage, getEthereumProvider, getGenerators, getIntentSummary, getPaymentSummary, getPaymentTimeRemaining, getPrivacyConfig, getPrivacyDescription, getSolanaProvider, getStablecoin, getStablecoinInfo, getStablecoinsForChain, getSupportedStablecoins, getTimeRemaining, hasEnoughOracles, hasErrorCode, hasRequiredProofs, hash, hexToNumber, isBrowser, isEd25519Chain, isExpired, isNonNegativeAmount, isPaymentExpired, isPrivateWalletAdapter, isSIPError, isStablecoin, isStablecoinOnChain, isValidAmount, isValidChainId, isValidCompressedPublicKey, isValidEd25519PublicKey, isValidHex, isValidHexLength, isValidNearAccountId, isValidNearImplicitAddress, isValidPrivacyLevel, isValidPrivateKey, isValidScalar, isValidSlippage, isValidSolanaAddress, isValidStealthMetaAddress, nearAddressToEd25519PublicKey, normalizeAddress, notConnectedError, publicKeyToEthAddress, registerWallet, removeOracle, secureWipe, secureWipeAll, serializeAttestationMessage, serializeIntent, serializePayment, signAttestationMessage, solanaAddressToEd25519PublicKey, solanaPublicKeyToHex, subtractBlindings, subtractCommitments, supportsSharedArrayBuffer, supportsWebBluetooth, supportsWebHID, supportsWebUSB, supportsWebWorkers, toHex, toStablecoinUnits, trackIntent, trackPayment, updateOracleStatus, validateAsset, validateCreateIntentParams, validateIntentInput, validateIntentOutput, validateScalar, validateViewingKey, verifyAttestation, verifyCommitment, verifyOpening, verifyOracleSignature, walletRegistry, withSecureBuffer, withSecureBufferSync, wrapError } from './index.js';
1
+ export { ATTESTATION_VERSION, AttestationRequest, AttestationResult, BaseWalletAdapter, BridgeProvider, B as BrowserNoirProvider, BrowserNoirProviderConfig, CHAIN_NUMERIC_IDS, CommitmentPoint, ComplianceManager, CreateIntentOptions, CreatePaymentOptions, CryptoError, DEFAULT_THRESHOLD, DEFAULT_TOTAL_ORACLES, DerivationPath, EIP1193ConnectInfo, EIP1193Event, EIP1193Provider, EIP1193ProviderRpcError, EIP1193RequestArguments, EIP712Domain, EIP712TypeDefinition, EIP712TypedData, EIP712Types, EncryptionNotImplementedError, ErrorCode, EthereumAdapterConfig, EthereumChainId, EthereumChainIdType, EthereumChainMetadata, EthereumTokenMetadata, EthereumTransactionReceipt, EthereumTransactionRequest, EthereumWalletAdapter, EthereumWalletName, ExportedViewingKey, HardwareAccount, HardwareConnectionStatus, HardwareDeviceInfo, HardwareErrorCode, HardwareErrorCodeType, HardwareEthereumTx, HardwareSignRequest, HardwareSignature, HardwareTransport, HardwareWalletConfig, HardwareWalletError, HardwareWalletType, IntentBuilder, IntentError, LedgerConfig, LedgerModel, LedgerWalletAdapter, MockEthereumAdapter, MockEthereumAdapterConfig, MockHardwareConfig, MockLedgerAdapter, MockProofProvider, MockSolanaAdapter, MockSolanaAdapterConfig, MockSolver, MockSolverConfig, MockTrezorAdapter, MockWalletAdapter, NEARIntentsAdapter, NEARIntentsAdapterConfig, NetworkError, ORACLE_DOMAIN, OneClickClient, OracleAttestationMessage, OracleId, OracleInfo, OracleRegistry, OracleRegistryConfig, OracleSignature, OracleStatus, PaymentBuilder, PedersenCommitment, PreparedSwap, PriceFeed, PrivacyConfig, ProductionQuote, ProofError, ProofNotImplementedError, ProofProgressCallback, ReceivedNote, SIP, SIPConfig, SIPError, STABLECOIN_ADDRESSES, STABLECOIN_DECIMALS, STABLECOIN_INFO, SerializedError, ShieldedBalance, ShieldedSendParams, ShieldedSendResult, SignedOracleAttestation, SolanaAdapterConfig, SolanaCluster, SolanaConnection, SolanaPublicKey, SolanaSendOptions, SolanaSignature, SolanaTransaction, SolanaUnsignedTransaction, SolanaVersionedTransaction, SolanaWalletAdapter, SolanaWalletName, SolanaWalletProvider, StablecoinInfo, StealthCurve, SwapRequest, SwapResult, TransactionData, TransportType, Treasury, TrezorConfig, TrezorModel, TrezorWalletAdapter, ValidationError, VerificationResult, WalletAdapter, WalletError, ZcashQuote, ZcashQuoteParams, ZcashRPCClient, ZcashRPCError, ZcashShieldedService, ZcashShieldedServiceConfig, ZcashSwapParams, ZcashSwapResult, ZcashSwapService, ZcashSwapServiceConfig, ZcashSwapSourceChain, ZcashSwapSourceToken, ZcashSwapStatus, addBlindings, addCommitments, addOracle, attachProofs, base58ToHex, browserBytesToHex, browserHexToBytes, checkEd25519StealthAddress, checkStealthAddress, commit, commitZero, computeAttestationHash, createCommitment, createEthereumAdapter, createLedgerAdapter, createMockEthereumAdapter, createMockEthereumProvider, createMockLedgerAdapter, createMockSolanaAdapter, createMockSolanaConnection, createMockSolanaProvider, createMockSolver, createMockTrezorAdapter, createNEARIntentsAdapter, createOracleRegistry, createProductionSIP, createSIP, createShieldedIntent, createShieldedPayment, createSolanaAdapter, createTrezorAdapter, createWalletFactory, createZcashClient, createZcashShieldedService, createZcashSwapService, decodeStealthMetaAddress, decryptMemo, decryptWithViewing, deriveEd25519StealthPrivateKey, deriveOracleId, deriveStealthPrivateKey, deriveViewingKey, deserializeAttestationMessage, deserializeIntent, deserializePayment, detectEthereumWallets, detectSolanaWallets, ed25519PublicKeyToNearAddress, ed25519PublicKeyToSolanaAddress, encodeStealthMetaAddress, encryptForViewing, featureNotSupportedError, formatStablecoinAmount, fromHex, fromStablecoinUnits, generateBlinding, generateEd25519StealthAddress, generateEd25519StealthMetaAddress, generateIntentId, generateRandomBytes, generateStealthAddress, generateStealthMetaAddress, generateViewingKey, getActiveOracles, getAvailableTransports, getBrowserInfo, getChainNumericId, getChainsForStablecoin, getCurveForChain, getDefaultRpcEndpoint, getDerivationPath, getErrorMessage, getEthereumProvider, getGenerators, getIntentSummary, getPaymentSummary, getPaymentTimeRemaining, getPrivacyConfig, getPrivacyDescription, getSolanaProvider, getStablecoin, getStablecoinInfo, getStablecoinsForChain, getSupportedStablecoins, getTimeRemaining, hasEnoughOracles, hasErrorCode, hasRequiredProofs, hash, hexToNumber, isBrowser, isEd25519Chain, isExpired, isNonNegativeAmount, isPaymentExpired, isPrivateWalletAdapter, isSIPError, isStablecoin, isStablecoinOnChain, isValidAmount, isValidChainId, isValidCompressedPublicKey, isValidEd25519PublicKey, isValidHex, isValidHexLength, isValidNearAccountId, isValidNearImplicitAddress, isValidPrivacyLevel, isValidPrivateKey, isValidScalar, isValidSlippage, isValidSolanaAddress, isValidStealthMetaAddress, nearAddressToEd25519PublicKey, normalizeAddress, notConnectedError, publicKeyToEthAddress, registerWallet, removeOracle, secureWipe, secureWipeAll, serializeAttestationMessage, serializeIntent, serializePayment, signAttestationMessage, solanaAddressToEd25519PublicKey, solanaPublicKeyToHex, subtractBlindings, subtractCommitments, supportsSharedArrayBuffer, supportsWebBluetooth, supportsWebHID, supportsWebUSB, supportsWebWorkers, toHex, toStablecoinUnits, trackIntent, trackPayment, updateOracleStatus, validateAsset, validateCreateIntentParams, validateIntentInput, validateIntentOutput, validateScalar, validateViewingKey, verifyAttestation, verifyCommitment, verifyOpening, verifyOracleSignature, walletRegistry, withSecureBuffer, withSecureBufferSync, wrapError } from './index.js';
2
2
  export { c as FulfillmentProofParams, F as FundingProofParams, N as NoirProviderConfig, O as OracleAttestation, a as ProofFramework, d as ProofGenerationError, P as ProofProvider, b as ProofResult, V as ValidityProofParams } from './noir-BHQtFvRk.js';
3
3
  export { Asset, AuditLogEntry, AuditScope, AuditorRegistration, AuditorViewingKey, BatchPaymentRecipient, BatchPaymentRequest, ChainId, Commitment, ComplianceConfig, ComplianceReport, ComplianceRole, CreateBatchProposalParams, CreateComplianceConfigParams, CreateIntentParams, CreatePaymentParams, CreatePaymentProposalParams, 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, PaymentPurpose, PaymentReceipt, PaymentStatus, PaymentStatusType, PrivacyLevel, PrivateWalletAdapter, ProposalSignature, ProposalStatus, ProposalStatusType, ProposalType, 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';