@sip-protocol/sdk 0.7.3 → 0.7.4
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/LICENSE +21 -0
- package/README.md +267 -0
- package/dist/{TransportWebUSB-TQ7WZ4LE.mjs → TransportWebUSB-YQMAGJAJ.mjs} +12 -9
- package/dist/browser.d.mts +10 -4
- package/dist/browser.d.ts +10 -4
- package/dist/browser.js +47556 -19603
- package/dist/browser.mjs +628 -48
- package/dist/chunk-4GRJ5MAW.mjs +152 -0
- package/dist/chunk-5D7A3L3W.mjs +717 -0
- package/dist/chunk-64AYA5F5.mjs +7834 -0
- package/dist/chunk-GMDGB22A.mjs +379 -0
- package/dist/chunk-I534WKN7.mjs +328 -0
- package/dist/chunk-IBZVA5Y7.mjs +1003 -0
- package/dist/chunk-PRRZAWJE.mjs +223 -0
- package/dist/{chunk-UJCSKKID.mjs → chunk-XGB3TDIC.mjs} +13 -1
- package/dist/{chunk-3M3HNQCW.mjs → chunk-YWGJ77A2.mjs} +28656 -13103
- package/dist/{chunk-6WGN57S2.mjs → chunk-Z3K7W5S3.mjs} +48 -0
- package/dist/constants-LHAAUC2T.mjs +51 -0
- package/dist/dist-2OGQ7FED.mjs +3957 -0
- package/dist/dist-IFHPYLDX.mjs +254 -0
- package/dist/fulfillment_proof-ANHVPKTB.mjs +21 -0
- package/dist/funding_proof-ICFZ5LHY.mjs +21 -0
- package/dist/{index-DIBZHOOQ.d.ts → index-DXh2IGkz.d.ts} +21239 -10304
- package/dist/{index-8MQz13eJ.d.mts → index-DeE1ZzA4.d.mts} +21239 -10304
- package/dist/index.d.mts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +48396 -19623
- package/dist/index.mjs +537 -19
- package/dist/interface-Bf7w1PLW.d.mts +679 -0
- package/dist/interface-Bf7w1PLW.d.ts +679 -0
- package/dist/{noir-DKfEzWy9.d.mts → noir-kzbLVTei.d.mts} +31 -21
- package/dist/{noir-DKfEzWy9.d.ts → noir-kzbLVTei.d.ts} +31 -21
- package/dist/proofs/halo2.d.mts +151 -0
- package/dist/proofs/halo2.d.ts +151 -0
- package/dist/proofs/halo2.js +350 -0
- package/dist/proofs/halo2.mjs +11 -0
- package/dist/proofs/kimchi.d.mts +160 -0
- package/dist/proofs/kimchi.d.ts +160 -0
- package/dist/proofs/kimchi.js +431 -0
- package/dist/proofs/kimchi.mjs +13 -0
- package/dist/proofs/noir.d.mts +1 -1
- package/dist/proofs/noir.d.ts +1 -1
- package/dist/proofs/noir.js +74 -18
- package/dist/proofs/noir.mjs +84 -24
- package/dist/solana-U3MEGU7W.mjs +280 -0
- package/dist/validity_proof-3POXLPNY.mjs +21 -0
- package/package.json +54 -21
- package/src/adapters/index.ts +41 -0
- package/src/adapters/jupiter.ts +571 -0
- package/src/adapters/near-intents.ts +135 -0
- package/src/advisor/advisor.ts +653 -0
- package/src/advisor/index.ts +54 -0
- package/src/advisor/tools.ts +303 -0
- package/src/advisor/types.ts +164 -0
- package/src/chains/ethereum/announcement.ts +536 -0
- package/src/chains/ethereum/bnb-optimizations.ts +474 -0
- package/src/chains/ethereum/commitment.ts +522 -0
- package/src/chains/ethereum/constants.ts +462 -0
- package/src/chains/ethereum/deployment.ts +596 -0
- package/src/chains/ethereum/gas-estimation.ts +538 -0
- package/src/chains/ethereum/index.ts +268 -0
- package/src/chains/ethereum/optimizations.ts +614 -0
- package/src/chains/ethereum/privacy-adapter.ts +855 -0
- package/src/chains/ethereum/registry.ts +584 -0
- package/src/chains/ethereum/rpc.ts +905 -0
- package/src/chains/ethereum/stealth.ts +491 -0
- package/src/chains/ethereum/token.ts +790 -0
- package/src/chains/ethereum/transfer.ts +637 -0
- package/src/chains/ethereum/types.ts +456 -0
- package/src/chains/ethereum/viewing-key.ts +455 -0
- package/src/chains/near/commitment.ts +608 -0
- package/src/chains/near/constants.ts +284 -0
- package/src/chains/near/function-call.ts +871 -0
- package/src/chains/near/history.ts +654 -0
- package/src/chains/near/implicit-account.ts +840 -0
- package/src/chains/near/index.ts +393 -0
- package/src/chains/near/native-transfer.ts +658 -0
- package/src/chains/near/nep141.ts +775 -0
- package/src/chains/near/privacy-adapter.ts +889 -0
- package/src/chains/near/resolver.ts +971 -0
- package/src/chains/near/rpc.ts +1016 -0
- package/src/chains/near/stealth.ts +419 -0
- package/src/chains/near/types.ts +317 -0
- package/src/chains/near/viewing-key.ts +876 -0
- package/src/chains/solana/anchor-transfer.ts +386 -0
- package/src/chains/solana/commitment.ts +577 -0
- package/src/chains/solana/constants.ts +126 -12
- package/src/chains/solana/ephemeral-keys.ts +543 -0
- package/src/chains/solana/index.ts +252 -1
- package/src/chains/solana/key-derivation.ts +418 -0
- package/src/chains/solana/kit-compat.ts +334 -0
- package/src/chains/solana/optimizations.ts +560 -0
- package/src/chains/solana/privacy-adapter.ts +605 -0
- package/src/chains/solana/providers/generic.ts +47 -6
- package/src/chains/solana/providers/helius-enhanced-types.ts +336 -0
- package/src/chains/solana/providers/helius-enhanced.ts +623 -0
- package/src/chains/solana/providers/helius.ts +186 -33
- package/src/chains/solana/providers/index.ts +31 -0
- package/src/chains/solana/providers/interface.ts +61 -18
- package/src/chains/solana/providers/quicknode.ts +409 -0
- package/src/chains/solana/providers/triton.ts +426 -0
- package/src/chains/solana/providers/webhook.ts +338 -67
- package/src/chains/solana/rpc-client.ts +1150 -0
- package/src/chains/solana/scan.ts +83 -66
- package/src/chains/solana/sol-transfer.ts +732 -0
- package/src/chains/solana/spl-transfer.ts +886 -0
- package/src/chains/solana/stealth-scanner.ts +703 -0
- package/src/chains/solana/sunspot-verifier.ts +453 -0
- package/src/chains/solana/transaction-builder.ts +755 -0
- package/src/chains/solana/transfer.ts +74 -5
- package/src/chains/solana/types.ts +57 -6
- package/src/chains/solana/utils.ts +110 -0
- package/src/chains/solana/viewing-key.ts +807 -0
- package/src/compliance/fireblocks.ts +921 -0
- package/src/compliance/index.ts +23 -0
- package/src/compliance/range-sas.ts +398 -33
- package/src/config/endpoints.ts +100 -0
- package/src/crypto.ts +11 -8
- package/src/errors.ts +82 -0
- package/src/evm/erc4337-relayer.ts +830 -0
- package/src/evm/index.ts +47 -0
- package/src/fees/calculator.ts +396 -0
- package/src/fees/index.ts +87 -0
- package/src/fees/near-contract.ts +429 -0
- package/src/fees/types.ts +268 -0
- package/src/index.ts +686 -1
- package/src/intent.ts +6 -3
- package/src/logger.ts +324 -0
- package/src/network/index.ts +80 -0
- package/src/network/proxy.ts +691 -0
- package/src/optimizations/index.ts +541 -0
- package/src/oracle/types.ts +1 -0
- package/src/privacy-backends/arcium-types.ts +727 -0
- package/src/privacy-backends/arcium.ts +719 -0
- package/src/privacy-backends/combined-privacy.ts +866 -0
- package/src/privacy-backends/cspl-token.ts +595 -0
- package/src/privacy-backends/cspl-types.ts +512 -0
- package/src/privacy-backends/cspl.ts +907 -0
- package/src/privacy-backends/health.ts +488 -0
- package/src/privacy-backends/inco-types.ts +323 -0
- package/src/privacy-backends/inco.ts +616 -0
- package/src/privacy-backends/index.ts +254 -4
- package/src/privacy-backends/interface.ts +649 -6
- package/src/privacy-backends/lru-cache.ts +343 -0
- package/src/privacy-backends/magicblock.ts +458 -0
- package/src/privacy-backends/mock.ts +258 -0
- package/src/privacy-backends/privacycash.ts +13 -17
- package/src/privacy-backends/private-swap.ts +570 -0
- package/src/privacy-backends/rate-limiter.ts +683 -0
- package/src/privacy-backends/registry.ts +414 -2
- package/src/privacy-backends/router.ts +283 -3
- package/src/privacy-backends/shadowwire.ts +449 -0
- package/src/privacy-backends/sip-native.ts +3 -0
- package/src/privacy-logger.ts +191 -0
- package/src/production-safety.ts +373 -0
- package/src/proofs/aggregator.ts +1029 -0
- package/src/proofs/browser-composer.ts +1150 -0
- package/src/proofs/browser.ts +113 -25
- package/src/proofs/cache/index.ts +127 -0
- package/src/proofs/cache/interface.ts +545 -0
- package/src/proofs/cache/key-generator.ts +188 -0
- package/src/proofs/cache/lru-cache.ts +481 -0
- package/src/proofs/cache/multi-tier-cache.ts +575 -0
- package/src/proofs/cache/persistent-cache.ts +788 -0
- package/src/proofs/compliance-proof.ts +872 -0
- package/src/proofs/composer/base.ts +923 -0
- package/src/proofs/composer/index.ts +25 -0
- package/src/proofs/composer/interface.ts +518 -0
- package/src/proofs/composer/types.ts +383 -0
- package/src/proofs/converters/halo2.ts +452 -0
- package/src/proofs/converters/index.ts +208 -0
- package/src/proofs/converters/interface.ts +363 -0
- package/src/proofs/converters/kimchi.ts +462 -0
- package/src/proofs/converters/noir.ts +451 -0
- package/src/proofs/fallback.ts +888 -0
- package/src/proofs/halo2.ts +42 -0
- package/src/proofs/index.ts +471 -0
- package/src/proofs/interface.ts +13 -0
- package/src/proofs/kimchi.ts +42 -0
- package/src/proofs/lazy.ts +1004 -0
- package/src/proofs/mock.ts +25 -1
- package/src/proofs/noir.ts +110 -29
- package/src/proofs/orchestrator.ts +960 -0
- package/src/proofs/parallel/concurrency.ts +297 -0
- package/src/proofs/parallel/dependency-graph.ts +602 -0
- package/src/proofs/parallel/executor.ts +420 -0
- package/src/proofs/parallel/index.ts +131 -0
- package/src/proofs/parallel/interface.ts +685 -0
- package/src/proofs/parallel/worker-pool.ts +644 -0
- package/src/proofs/providers/halo2.ts +560 -0
- package/src/proofs/providers/index.ts +34 -0
- package/src/proofs/providers/kimchi.ts +641 -0
- package/src/proofs/validator.ts +881 -0
- package/src/proofs/verifier.ts +867 -0
- package/src/quantum/index.ts +112 -0
- package/src/quantum/winternitz-vault.ts +639 -0
- package/src/quantum/wots.ts +611 -0
- package/src/settlement/backends/direct-chain.ts +1 -0
- package/src/settlement/index.ts +9 -0
- package/src/settlement/router.ts +732 -46
- package/src/solana/index.ts +72 -0
- package/src/solana/jito-relayer.ts +687 -0
- package/src/solana/noir-verifier-types.ts +430 -0
- package/src/solana/noir-verifier.ts +816 -0
- package/src/stealth/address-derivation.ts +193 -0
- package/src/stealth/ed25519.ts +431 -0
- package/src/stealth/index.ts +233 -0
- package/src/stealth/meta-address.ts +221 -0
- package/src/stealth/secp256k1.ts +368 -0
- package/src/stealth/utils.ts +194 -0
- package/src/stealth.ts +50 -1504
- package/src/sync/index.ts +106 -0
- package/src/sync/manager.ts +504 -0
- package/src/sync/mock-provider.ts +318 -0
- package/src/sync/oblivious.ts +625 -0
- package/src/tokens/index.ts +15 -0
- package/src/tokens/registry.ts +301 -0
- package/src/utils/deprecation.ts +94 -0
- package/src/utils/index.ts +9 -0
- package/src/wallet/ethereum/index.ts +68 -0
- package/src/wallet/ethereum/metamask-privacy.ts +420 -0
- package/src/wallet/ethereum/multi-wallet.ts +646 -0
- package/src/wallet/ethereum/privacy-adapter.ts +700 -0
- package/src/wallet/ethereum/types.ts +3 -1
- package/src/wallet/ethereum/walletconnect-adapter.ts +675 -0
- package/src/wallet/hardware/index.ts +10 -0
- package/src/wallet/hardware/ledger-privacy.ts +414 -0
- package/src/wallet/index.ts +71 -0
- package/src/wallet/near/adapter.ts +626 -0
- package/src/wallet/near/index.ts +86 -0
- package/src/wallet/near/meteor-wallet.ts +1153 -0
- package/src/wallet/near/my-near-wallet.ts +790 -0
- package/src/wallet/near/wallet-selector.ts +702 -0
- package/src/wallet/solana/adapter.ts +6 -4
- package/src/wallet/solana/index.ts +13 -0
- package/src/wallet/solana/privacy-adapter.ts +567 -0
- package/src/wallet/sui/types.ts +6 -4
- package/src/zcash/rpc-client.ts +13 -6
- package/dist/chunk-2XIVXWHA.mjs +0 -1930
- package/dist/chunk-3INS3PR5.mjs +0 -884
- package/dist/chunk-3OVABDRH.mjs +0 -17096
- package/dist/chunk-7RFRWDCW.mjs +0 -1504
- package/dist/chunk-DLDWZFYC.mjs +0 -1495
- package/dist/chunk-E6SZWREQ.mjs +0 -57
- package/dist/chunk-F6F73W35.mjs +0 -16166
- package/dist/chunk-G33LB27A.mjs +0 -16166
- package/dist/chunk-HGU6HZRC.mjs +0 -231
- package/dist/chunk-L2K34JCU.mjs +0 -1496
- package/dist/chunk-OFDBEIEK.mjs +0 -16166
- package/dist/chunk-SF7YSLF5.mjs +0 -1515
- package/dist/chunk-SN4ZDTVW.mjs +0 -16166
- package/dist/chunk-WWUSGOXE.mjs +0 -17129
- package/dist/constants-VOI7BSLK.mjs +0 -27
- package/dist/index-B71aXVzk.d.ts +0 -13264
- package/dist/index-BYZbDjal.d.ts +0 -11390
- package/dist/index-CHB3KuOB.d.mts +0 -11859
- package/dist/index-CzWPI6Le.d.ts +0 -11859
- package/dist/index-pOIIuwfV.d.mts +0 -13264
- package/dist/index-xbWjohNq.d.mts +0 -11390
- package/dist/solana-4O4K45VU.mjs +0 -46
- package/dist/solana-5EMCTPTS.mjs +0 -46
- package/dist/solana-NDABAZ6P.mjs +0 -56
- package/dist/solana-Q4NAVBTS.mjs +0 -46
- package/dist/solana-ZYO63LY5.mjs +0 -46
package/src/index.ts
CHANGED
|
@@ -32,11 +32,13 @@ export {
|
|
|
32
32
|
ProofError,
|
|
33
33
|
IntentError,
|
|
34
34
|
NetworkError,
|
|
35
|
+
SecurityError,
|
|
35
36
|
// Legacy errors (now extend proper parent classes)
|
|
36
37
|
ProofNotImplementedError,
|
|
37
38
|
EncryptionNotImplementedError,
|
|
38
39
|
// Utility functions
|
|
39
40
|
isSIPError,
|
|
41
|
+
isSecurityError,
|
|
40
42
|
hasErrorCode,
|
|
41
43
|
wrapError,
|
|
42
44
|
getErrorMessage,
|
|
@@ -95,6 +97,8 @@ export {
|
|
|
95
97
|
nearAddressToEd25519PublicKey,
|
|
96
98
|
isValidNearImplicitAddress,
|
|
97
99
|
isValidNearAccountId,
|
|
100
|
+
// Parsing utilities
|
|
101
|
+
parseStealthAddress,
|
|
98
102
|
} from './stealth'
|
|
99
103
|
|
|
100
104
|
export type { StealthCurve } from './stealth'
|
|
@@ -222,6 +226,85 @@ export {
|
|
|
222
226
|
getBrowserInfo,
|
|
223
227
|
browserHexToBytes,
|
|
224
228
|
browserBytesToHex,
|
|
229
|
+
// Compliance proofs (Aztec/Noir bounty - Non-Financial ZK)
|
|
230
|
+
ComplianceProofProvider,
|
|
231
|
+
DEFAULT_VALIDITY_PERIOD_SECONDS,
|
|
232
|
+
SUPPORTED_JURISDICTIONS,
|
|
233
|
+
COMPLIANCE_CIRCUIT_IDS,
|
|
234
|
+
// ─── Proof Composition (M20) ────────────────────────────────────────────────
|
|
235
|
+
// Proof Aggregator
|
|
236
|
+
ProofAggregator,
|
|
237
|
+
createProofAggregator,
|
|
238
|
+
DEFAULT_AGGREGATOR_CONFIG,
|
|
239
|
+
// Verification Pipeline
|
|
240
|
+
VerificationPipeline,
|
|
241
|
+
createVerificationPipeline,
|
|
242
|
+
DEFAULT_PIPELINE_CONFIG,
|
|
243
|
+
// Cross-System Validator
|
|
244
|
+
CrossSystemValidator,
|
|
245
|
+
createCrossSystemValidator,
|
|
246
|
+
SYSTEM_INFO,
|
|
247
|
+
BN254_MODULUS,
|
|
248
|
+
PALLAS_MODULUS,
|
|
249
|
+
VESTA_MODULUS,
|
|
250
|
+
BLS12_381_MODULUS,
|
|
251
|
+
// Proof Orchestrator
|
|
252
|
+
ProofOrchestrator,
|
|
253
|
+
createProofOrchestrator,
|
|
254
|
+
DEFAULT_ORCHESTRATOR_CONFIG,
|
|
255
|
+
BUILTIN_TEMPLATES,
|
|
256
|
+
// Composer interfaces and errors
|
|
257
|
+
BaseProofComposer,
|
|
258
|
+
ProofCompositionError,
|
|
259
|
+
ProviderNotFoundError,
|
|
260
|
+
CompositionTimeoutError,
|
|
261
|
+
IncompatibleSystemsError,
|
|
262
|
+
// Composable Proof Providers (no WASM - safe for all environments)
|
|
263
|
+
Halo2Provider,
|
|
264
|
+
createHalo2Provider,
|
|
265
|
+
createOrchardProvider,
|
|
266
|
+
KimchiProvider,
|
|
267
|
+
createKimchiProvider,
|
|
268
|
+
createMinaMainnetProvider,
|
|
269
|
+
createZkAppProvider,
|
|
270
|
+
// Proof Composition types from @sip-protocol/types
|
|
271
|
+
ProofAggregationStrategy,
|
|
272
|
+
ComposedProofStatus,
|
|
273
|
+
CompositionErrorCode,
|
|
274
|
+
DEFAULT_COMPOSITION_CONFIG,
|
|
275
|
+
// ─── Proof Caching (M20-13) ─────────────────────────────────────────────────
|
|
276
|
+
LRUCache,
|
|
277
|
+
createLRUCache,
|
|
278
|
+
IndexedDBCache,
|
|
279
|
+
FileCache,
|
|
280
|
+
createPersistentCache,
|
|
281
|
+
createIndexedDBCache,
|
|
282
|
+
createFileCache,
|
|
283
|
+
MultiTierCache,
|
|
284
|
+
createMultiTierCache,
|
|
285
|
+
CacheKeyGenerator,
|
|
286
|
+
createCacheKeyGenerator,
|
|
287
|
+
cacheKeyGenerator,
|
|
288
|
+
DEFAULT_LRU_CONFIG,
|
|
289
|
+
DEFAULT_PERSISTENT_CONFIG,
|
|
290
|
+
DEFAULT_MULTI_TIER_CONFIG,
|
|
291
|
+
DEFAULT_WARMING_CONFIG,
|
|
292
|
+
INITIAL_PROOF_CACHE_STATS,
|
|
293
|
+
// ─── Proof Format Converters (M20-08) ──────────────────────────────────────────
|
|
294
|
+
NoirProofConverter,
|
|
295
|
+
createNoirConverter,
|
|
296
|
+
Halo2ProofConverter,
|
|
297
|
+
createHalo2Converter,
|
|
298
|
+
KimchiProofConverter,
|
|
299
|
+
createKimchiConverter,
|
|
300
|
+
UnifiedProofConverter,
|
|
301
|
+
createUnifiedConverter,
|
|
302
|
+
convertToSIP,
|
|
303
|
+
convertFromSIP,
|
|
304
|
+
ProofConversionError,
|
|
305
|
+
InvalidProofError,
|
|
306
|
+
UnsupportedVersionError,
|
|
307
|
+
DEFAULT_CONVERSION_OPTIONS,
|
|
225
308
|
} from './proofs'
|
|
226
309
|
|
|
227
310
|
export type {
|
|
@@ -235,6 +318,142 @@ export type {
|
|
|
235
318
|
NoirProviderConfig,
|
|
236
319
|
BrowserNoirProviderConfig,
|
|
237
320
|
ProofProgressCallback,
|
|
321
|
+
// Compliance proof types
|
|
322
|
+
ComplianceProofType,
|
|
323
|
+
ComplianceProofConfig,
|
|
324
|
+
ViewingKeyAccessParams,
|
|
325
|
+
SanctionsClearParams,
|
|
326
|
+
BalanceAttestationParams,
|
|
327
|
+
HistoryCompletenessParams,
|
|
328
|
+
ComplianceProofResult,
|
|
329
|
+
// ─── Proof Composition Types (M20) ──────────────────────────────────────────
|
|
330
|
+
// Aggregator types
|
|
331
|
+
AggregatorConfig,
|
|
332
|
+
AggregationProgressEvent,
|
|
333
|
+
AggregationProgressCallback,
|
|
334
|
+
SequentialAggregationOptions,
|
|
335
|
+
ParallelAggregationOptions,
|
|
336
|
+
RecursiveAggregationOptions,
|
|
337
|
+
AggregationStepResult,
|
|
338
|
+
DetailedAggregationResult,
|
|
339
|
+
// Verification Pipeline types
|
|
340
|
+
VerificationPipelineConfig,
|
|
341
|
+
ProofDependency,
|
|
342
|
+
VerificationOrder,
|
|
343
|
+
DetailedVerificationResult,
|
|
344
|
+
LinkValidationResult,
|
|
345
|
+
SystemVerificationStats,
|
|
346
|
+
VerificationProgressEvent,
|
|
347
|
+
VerificationProgressCallback,
|
|
348
|
+
VerifyOptions,
|
|
349
|
+
// Cross-System Validator types
|
|
350
|
+
EllipticCurve,
|
|
351
|
+
FieldCharacteristics,
|
|
352
|
+
SystemInfo,
|
|
353
|
+
ValidationCheck,
|
|
354
|
+
ValidationReport,
|
|
355
|
+
CompatibilityEntry,
|
|
356
|
+
ValidationOptions,
|
|
357
|
+
// Orchestrator types
|
|
358
|
+
OrchestratorConfig,
|
|
359
|
+
CompositionState,
|
|
360
|
+
CompositionPlan,
|
|
361
|
+
CompositionRequest,
|
|
362
|
+
OrchestratorResult,
|
|
363
|
+
AuditLogEntry as ProofAuditLogEntry,
|
|
364
|
+
OrchestratorProgressEvent,
|
|
365
|
+
OrchestratorProgressCallback,
|
|
366
|
+
CompositionTemplate,
|
|
367
|
+
// Composer interfaces
|
|
368
|
+
ComposableProofProvider,
|
|
369
|
+
ProofComposer,
|
|
370
|
+
ProofProviderFactory,
|
|
371
|
+
ProofProviderRegistry,
|
|
372
|
+
// Composer SDK types
|
|
373
|
+
ProofProviderRegistration,
|
|
374
|
+
RegisterProviderOptions,
|
|
375
|
+
ProofGenerationRequest,
|
|
376
|
+
ProofGenerationResult,
|
|
377
|
+
ComposeProofsOptions,
|
|
378
|
+
VerifyComposedProofOptions,
|
|
379
|
+
AggregateProofsOptions,
|
|
380
|
+
AggregationResult,
|
|
381
|
+
ConvertProofOptions,
|
|
382
|
+
ConversionResult,
|
|
383
|
+
ProofCacheEntry,
|
|
384
|
+
CacheStats,
|
|
385
|
+
WorkerPoolConfig,
|
|
386
|
+
WorkerPoolStatus,
|
|
387
|
+
SystemCompatibility,
|
|
388
|
+
CompatibilityMatrix,
|
|
389
|
+
FallbackConfig,
|
|
390
|
+
ProofTelemetry,
|
|
391
|
+
TelemetryCollector,
|
|
392
|
+
ProofTelemetryMetrics,
|
|
393
|
+
// Provider config types
|
|
394
|
+
Halo2ProviderConfig,
|
|
395
|
+
Halo2CircuitConfig,
|
|
396
|
+
Halo2ProvingKey,
|
|
397
|
+
KimchiProviderConfig,
|
|
398
|
+
KimchiCircuitConfig,
|
|
399
|
+
// Proof system types from @sip-protocol/types
|
|
400
|
+
ProofSystem,
|
|
401
|
+
ProofMetadata,
|
|
402
|
+
SingleProof,
|
|
403
|
+
ComposedProof,
|
|
404
|
+
CompositionMetadata,
|
|
405
|
+
VerificationHints,
|
|
406
|
+
ProofCompositionConfig,
|
|
407
|
+
ProofProviderCapabilities,
|
|
408
|
+
ProofProviderStatus,
|
|
409
|
+
ProofProviderMetrics,
|
|
410
|
+
CompositionResult,
|
|
411
|
+
CompositionError,
|
|
412
|
+
CompositionMetrics,
|
|
413
|
+
VerificationResult as ProofVerificationResult,
|
|
414
|
+
IndividualVerificationResult,
|
|
415
|
+
CompositionEventType,
|
|
416
|
+
CompositionEvent,
|
|
417
|
+
CompositionProgressEvent,
|
|
418
|
+
CompositionEventListener,
|
|
419
|
+
// ─── Proof Cache Types (M20-13) ─────────────────────────────────────────────
|
|
420
|
+
CacheKeyComponents,
|
|
421
|
+
CacheKey,
|
|
422
|
+
CacheEntryMetadata,
|
|
423
|
+
CacheEntry,
|
|
424
|
+
CacheLookupResult,
|
|
425
|
+
LRUCacheConfig,
|
|
426
|
+
PersistentCacheConfig,
|
|
427
|
+
MultiTierCacheConfig,
|
|
428
|
+
ProofCacheStats,
|
|
429
|
+
CacheEventType,
|
|
430
|
+
CacheEvent,
|
|
431
|
+
CacheEventListener,
|
|
432
|
+
InvalidationStrategy,
|
|
433
|
+
InvalidationRule,
|
|
434
|
+
CacheWarmingConfig,
|
|
435
|
+
WarmingResult,
|
|
436
|
+
ICacheKeyGenerator,
|
|
437
|
+
IProofCache,
|
|
438
|
+
ILRUCache,
|
|
439
|
+
IPersistentCache,
|
|
440
|
+
IMultiTierCache,
|
|
441
|
+
IVerificationKeyCache,
|
|
442
|
+
ICompiledCircuitCache,
|
|
443
|
+
// ─── Proof Converter Types (M20-08) ─────────────────────────────────────────
|
|
444
|
+
NativeProofFormat,
|
|
445
|
+
NoirNativeProof,
|
|
446
|
+
Halo2NativeProof,
|
|
447
|
+
KimchiNativeProof,
|
|
448
|
+
ConversionOptions,
|
|
449
|
+
ConversionResult as ConverterConversionResult,
|
|
450
|
+
ConversionMetadata,
|
|
451
|
+
ConversionErrorCode,
|
|
452
|
+
ProofConverter,
|
|
453
|
+
ValidationResult as ConverterValidationResult,
|
|
454
|
+
ValidationError as ConverterValidationError,
|
|
455
|
+
AnyNativeProof,
|
|
456
|
+
ProofSystemToNativeMap,
|
|
238
457
|
} from './proofs'
|
|
239
458
|
|
|
240
459
|
// Oracle attestation (for fulfillment proofs)
|
|
@@ -278,6 +497,18 @@ export type {
|
|
|
278
497
|
VerificationResult,
|
|
279
498
|
} from './oracle'
|
|
280
499
|
|
|
500
|
+
// Token registry
|
|
501
|
+
export {
|
|
502
|
+
getTokenDecimals,
|
|
503
|
+
getAsset,
|
|
504
|
+
getNativeToken,
|
|
505
|
+
getTokenByAddress,
|
|
506
|
+
isKnownToken,
|
|
507
|
+
getTokensForChain,
|
|
508
|
+
} from './tokens'
|
|
509
|
+
|
|
510
|
+
export type { TokenMetadata } from './tokens'
|
|
511
|
+
|
|
281
512
|
// Re-export types for convenience
|
|
282
513
|
export {
|
|
283
514
|
PrivacyLevel,
|
|
@@ -591,11 +822,15 @@ export {
|
|
|
591
822
|
createMockAttestation,
|
|
592
823
|
verifyAttestationSignature,
|
|
593
824
|
fetchAttestation,
|
|
825
|
+
fetchWalletAttestations,
|
|
826
|
+
KNOWN_ISSUERS,
|
|
827
|
+
DEFAULT_RANGE_API_ENDPOINT,
|
|
594
828
|
type RangeSASAttestation,
|
|
595
829
|
type AttestationGatedConfig,
|
|
596
830
|
type ViewingKeyDerivationResult,
|
|
597
831
|
type ViewingKeyScope,
|
|
598
832
|
type AttestationVerificationResult,
|
|
833
|
+
type RangeAPIConfig,
|
|
599
834
|
} from './compliance'
|
|
600
835
|
|
|
601
836
|
// Sealed-Bid Auctions
|
|
@@ -777,7 +1012,7 @@ export {
|
|
|
777
1012
|
SIP_MEMO_PREFIX,
|
|
778
1013
|
getExplorerUrl as getSolanaExplorerUrl,
|
|
779
1014
|
getTokenMint,
|
|
780
|
-
|
|
1015
|
+
getSolanaTokenDecimals,
|
|
781
1016
|
// Types helpers
|
|
782
1017
|
parseAnnouncement,
|
|
783
1018
|
createAnnouncementMemo,
|
|
@@ -788,8 +1023,67 @@ export {
|
|
|
788
1023
|
// Helius Webhook (Real-time Scanning)
|
|
789
1024
|
createWebhookHandler,
|
|
790
1025
|
processWebhookTransaction,
|
|
1026
|
+
verifyWebhookSignature,
|
|
1027
|
+
verifyAuthToken,
|
|
1028
|
+
// Helius Enhanced Transactions (Human-readable TX data)
|
|
1029
|
+
HeliusEnhanced,
|
|
1030
|
+
createHeliusEnhanced,
|
|
791
1031
|
} from './chains/solana'
|
|
792
1032
|
|
|
1033
|
+
// Solana Noir Verification (Aztec/Noir bounty)
|
|
1034
|
+
export {
|
|
1035
|
+
SolanaNoirVerifier,
|
|
1036
|
+
createDevnetVerifier,
|
|
1037
|
+
createMainnetVerifier,
|
|
1038
|
+
// Type guards
|
|
1039
|
+
isNoirCircuitType,
|
|
1040
|
+
isValidSolanaProof,
|
|
1041
|
+
// Utilities
|
|
1042
|
+
estimateComputeUnits,
|
|
1043
|
+
// Error
|
|
1044
|
+
SolanaNoirError,
|
|
1045
|
+
SolanaNoirErrorCode,
|
|
1046
|
+
// Constants
|
|
1047
|
+
CIRCUIT_METADATA,
|
|
1048
|
+
DEFAULT_RPC_URLS,
|
|
1049
|
+
SOLANA_ZK_PROGRAM_IDS,
|
|
1050
|
+
MAX_PROOF_SIZE_BYTES,
|
|
1051
|
+
MAX_PUBLIC_INPUTS,
|
|
1052
|
+
} from './solana'
|
|
1053
|
+
|
|
1054
|
+
// Jito Relayer (Solana Gas Abstraction)
|
|
1055
|
+
export {
|
|
1056
|
+
JitoRelayer,
|
|
1057
|
+
createJitoRelayer,
|
|
1058
|
+
createMainnetRelayer,
|
|
1059
|
+
JitoRelayerError,
|
|
1060
|
+
JitoRelayerErrorCode,
|
|
1061
|
+
JITO_BLOCK_ENGINES,
|
|
1062
|
+
JITO_TIP_ACCOUNTS,
|
|
1063
|
+
JITO_DEFAULTS,
|
|
1064
|
+
} from './solana'
|
|
1065
|
+
|
|
1066
|
+
export type {
|
|
1067
|
+
JitoRelayerConfig,
|
|
1068
|
+
JitoBundleRequest,
|
|
1069
|
+
JitoBundleResult,
|
|
1070
|
+
RelayedTransactionRequest,
|
|
1071
|
+
RelayedTransactionResult,
|
|
1072
|
+
} from './solana'
|
|
1073
|
+
|
|
1074
|
+
export type {
|
|
1075
|
+
NoirCircuitType,
|
|
1076
|
+
SolanaVerificationKey,
|
|
1077
|
+
SolanaSerializedProof,
|
|
1078
|
+
SolanaVerifyInstruction,
|
|
1079
|
+
SolanaVerificationResult,
|
|
1080
|
+
SolanaNoirVerifierConfig,
|
|
1081
|
+
SolanaNoirErrorCode as SolanaNoirErrorCodeType,
|
|
1082
|
+
ProofStatistics,
|
|
1083
|
+
BatchVerificationRequest,
|
|
1084
|
+
BatchVerificationResult,
|
|
1085
|
+
} from './solana'
|
|
1086
|
+
|
|
793
1087
|
export type {
|
|
794
1088
|
SolanaPrivateTransferParams,
|
|
795
1089
|
SolanaPrivateTransferResult,
|
|
@@ -812,8 +1106,132 @@ export type {
|
|
|
812
1106
|
HeliusWebhookPayload,
|
|
813
1107
|
WebhookHandlerConfig,
|
|
814
1108
|
WebhookProcessResult,
|
|
1109
|
+
WebhookRequest,
|
|
1110
|
+
WebhookHandler,
|
|
1111
|
+
// Helius Enhanced Transactions types
|
|
1112
|
+
HeliusEnhancedConfig,
|
|
1113
|
+
EnhancedTransactionType,
|
|
1114
|
+
NativeTransfer,
|
|
1115
|
+
TokenTransfer,
|
|
1116
|
+
NftTransfer,
|
|
1117
|
+
SwapEvent,
|
|
1118
|
+
EnhancedTransactionEvents,
|
|
1119
|
+
EnhancedAccountData,
|
|
1120
|
+
EnhancedTransaction,
|
|
1121
|
+
ParseTransactionsOptions,
|
|
1122
|
+
GetTransactionHistoryOptions,
|
|
1123
|
+
PrivacyDisplayOptions,
|
|
1124
|
+
SIPTransactionMetadata,
|
|
1125
|
+
SIPEnhancedTransaction,
|
|
1126
|
+
TransactionSummary,
|
|
815
1127
|
} from './chains/solana'
|
|
816
1128
|
|
|
1129
|
+
// NEAR Same-Chain Privacy (M17-NEAR)
|
|
1130
|
+
export {
|
|
1131
|
+
// Constants
|
|
1132
|
+
NEAR_RPC_ENDPOINTS,
|
|
1133
|
+
NEAR_EXPLORER_URLS,
|
|
1134
|
+
NEAR_TOKEN_CONTRACTS,
|
|
1135
|
+
NEAR_TOKEN_DECIMALS,
|
|
1136
|
+
NEAR_IMPLICIT_ACCOUNT_LENGTH,
|
|
1137
|
+
DEFAULT_GAS as NEAR_DEFAULT_GAS,
|
|
1138
|
+
ONE_NEAR,
|
|
1139
|
+
ONE_YOCTO,
|
|
1140
|
+
SIP_MEMO_PREFIX as NEAR_SIP_MEMO_PREFIX,
|
|
1141
|
+
getExplorerUrl as getNEARExplorerUrl,
|
|
1142
|
+
getAccountExplorerUrl as getNEARAccountExplorerUrl,
|
|
1143
|
+
getTokenContract as getNEARTokenContract,
|
|
1144
|
+
isImplicitAccount,
|
|
1145
|
+
isNamedAccount,
|
|
1146
|
+
isValidAccountId as isValidNEARAccountId,
|
|
1147
|
+
// Stealth Address (M17-NEAR-01, M17-NEAR-02)
|
|
1148
|
+
generateNEARStealthMetaAddress,
|
|
1149
|
+
generateNEARStealthAddress,
|
|
1150
|
+
deriveNEARStealthPrivateKey,
|
|
1151
|
+
checkNEARStealthAddress,
|
|
1152
|
+
ed25519PublicKeyToImplicitAccount,
|
|
1153
|
+
implicitAccountToEd25519PublicKey,
|
|
1154
|
+
encodeNEARStealthMetaAddress,
|
|
1155
|
+
parseNEARStealthMetaAddress,
|
|
1156
|
+
validateNEARStealthMetaAddress,
|
|
1157
|
+
validateNEARStealthAddress,
|
|
1158
|
+
// Types (re-exported from types.ts)
|
|
1159
|
+
parseAnnouncement as parseNEARAnnouncement,
|
|
1160
|
+
createAnnouncementMemo as createNEARAnnouncementMemo,
|
|
1161
|
+
// Pedersen Commitments (M17-NEAR-03)
|
|
1162
|
+
commitNEAR,
|
|
1163
|
+
verifyOpeningNEAR,
|
|
1164
|
+
commitNEP141Token,
|
|
1165
|
+
verifyNEP141TokenCommitment,
|
|
1166
|
+
toYoctoNEAR,
|
|
1167
|
+
fromYoctoNEAR,
|
|
1168
|
+
addCommitmentsNEAR,
|
|
1169
|
+
subtractCommitmentsNEAR,
|
|
1170
|
+
addBlindingsNEAR,
|
|
1171
|
+
subtractBlindingsNEAR,
|
|
1172
|
+
getGeneratorsNEAR,
|
|
1173
|
+
generateBlindingNEAR,
|
|
1174
|
+
NEAR_ED25519_ORDER,
|
|
1175
|
+
MAX_NEAR_AMOUNT,
|
|
1176
|
+
NEAR_MAX_COMMITMENT_VALUE,
|
|
1177
|
+
// Viewing Keys (M17-NEAR-04)
|
|
1178
|
+
generateNEARViewingKeyFromSpending,
|
|
1179
|
+
generateRandomNEARViewingKey,
|
|
1180
|
+
computeNEARViewingKeyHash,
|
|
1181
|
+
computeNEARViewingKeyHashFromPrivate,
|
|
1182
|
+
exportNEARViewingKey,
|
|
1183
|
+
importNEARViewingKey,
|
|
1184
|
+
encryptForNEARViewing,
|
|
1185
|
+
decryptWithNEARViewing,
|
|
1186
|
+
createNEARMemoryStorage,
|
|
1187
|
+
isNEARAnnouncementForViewingKey,
|
|
1188
|
+
deriveNEARChildViewingKey,
|
|
1189
|
+
getNEARViewingPublicKey,
|
|
1190
|
+
validateNEARViewingKey,
|
|
1191
|
+
} from './chains/near'
|
|
1192
|
+
|
|
1193
|
+
export type {
|
|
1194
|
+
NEARNetwork,
|
|
1195
|
+
NEARAnnouncement,
|
|
1196
|
+
NEARPrivateTransferParams,
|
|
1197
|
+
NEARPrivateTransferResult,
|
|
1198
|
+
NEARScanParams,
|
|
1199
|
+
NEARScanResult,
|
|
1200
|
+
NEARDetectedPayment,
|
|
1201
|
+
NEARClaimParams,
|
|
1202
|
+
NEARClaimResult,
|
|
1203
|
+
NEARStealthBalance,
|
|
1204
|
+
NEARStealthAddressResult,
|
|
1205
|
+
NEARStealthMetaAddressResult,
|
|
1206
|
+
// Commitment types (M17-NEAR-03)
|
|
1207
|
+
NEARPedersenCommitment,
|
|
1208
|
+
NEARCommitmentPoint,
|
|
1209
|
+
NEP141TokenCommitment,
|
|
1210
|
+
// Viewing key types (M17-NEAR-04)
|
|
1211
|
+
NEARViewingKey,
|
|
1212
|
+
NEARViewingKeyExport,
|
|
1213
|
+
NEAREncryptedPayload,
|
|
1214
|
+
NEARTransactionData,
|
|
1215
|
+
NEARViewingKeyStorage,
|
|
1216
|
+
// Transaction history types (M17-NEAR-20)
|
|
1217
|
+
NEARTransactionType,
|
|
1218
|
+
NEARHistoryPrivacyLevel,
|
|
1219
|
+
NEARHistoricalTransaction,
|
|
1220
|
+
NEARTransactionHistoryParams,
|
|
1221
|
+
NEARTransactionHistoryResult,
|
|
1222
|
+
NEARExportFormat,
|
|
1223
|
+
NEARExportOptions,
|
|
1224
|
+
} from './chains/near'
|
|
1225
|
+
|
|
1226
|
+
// NEAR Transaction History (M17-NEAR-20)
|
|
1227
|
+
export {
|
|
1228
|
+
getTransactionHistory,
|
|
1229
|
+
getTransactionByHash,
|
|
1230
|
+
getTransactionCount,
|
|
1231
|
+
exportTransactions,
|
|
1232
|
+
getTransactionSummary,
|
|
1233
|
+
} from './chains/near'
|
|
1234
|
+
|
|
817
1235
|
// Same-Chain Executors
|
|
818
1236
|
export {
|
|
819
1237
|
SolanaSameChainExecutor,
|
|
@@ -836,6 +1254,9 @@ export {
|
|
|
836
1254
|
defaultRegistry,
|
|
837
1255
|
// Backends
|
|
838
1256
|
SIPNativeBackend,
|
|
1257
|
+
// C-SPL (Confidential SPL Tokens)
|
|
1258
|
+
CSPLClient,
|
|
1259
|
+
CSPLTokenService,
|
|
839
1260
|
// Router
|
|
840
1261
|
SmartRouter as PrivacySmartRouter,
|
|
841
1262
|
} from './privacy-backends'
|
|
@@ -858,6 +1279,16 @@ export type {
|
|
|
858
1279
|
RegisteredBackend,
|
|
859
1280
|
// Backend config
|
|
860
1281
|
SIPNativeBackendConfig,
|
|
1282
|
+
// C-SPL types
|
|
1283
|
+
CSPLClientConfig,
|
|
1284
|
+
CSPLTokenServiceConfig,
|
|
1285
|
+
WrapParams,
|
|
1286
|
+
WrapResult,
|
|
1287
|
+
UnwrapParams,
|
|
1288
|
+
UnwrapResult,
|
|
1289
|
+
ApproveParams,
|
|
1290
|
+
ApproveResult,
|
|
1291
|
+
CSPLServiceStatus,
|
|
861
1292
|
} from './privacy-backends'
|
|
862
1293
|
|
|
863
1294
|
// Surveillance Analysis (Privacy Scoring)
|
|
@@ -896,3 +1327,257 @@ export type {
|
|
|
896
1327
|
AnalyzableTransaction,
|
|
897
1328
|
KnownExchange,
|
|
898
1329
|
} from './surveillance'
|
|
1330
|
+
|
|
1331
|
+
// Privacy Advisor Agent (LangChain-powered)
|
|
1332
|
+
export {
|
|
1333
|
+
PrivacyAdvisorAgent,
|
|
1334
|
+
createPrivacyAdvisor,
|
|
1335
|
+
// LangChain tools
|
|
1336
|
+
createPrivacyAdvisorTools,
|
|
1337
|
+
createAnalyzeWalletTool,
|
|
1338
|
+
createQuickScoreTool,
|
|
1339
|
+
createSIPComparisonTool,
|
|
1340
|
+
createExplainTool,
|
|
1341
|
+
} from './advisor'
|
|
1342
|
+
|
|
1343
|
+
export type {
|
|
1344
|
+
// Core types
|
|
1345
|
+
AdvisorRole,
|
|
1346
|
+
AdvisorMessage,
|
|
1347
|
+
AdvisorStatus,
|
|
1348
|
+
// Configuration
|
|
1349
|
+
PrivacyAdvisorConfig,
|
|
1350
|
+
AdvisoryContext,
|
|
1351
|
+
// Response types
|
|
1352
|
+
AdvisorResponse,
|
|
1353
|
+
PrivacyAdvisoryReport,
|
|
1354
|
+
AdvisorRecommendation,
|
|
1355
|
+
// Utilities
|
|
1356
|
+
ToolResult,
|
|
1357
|
+
StreamCallback,
|
|
1358
|
+
// Tools config
|
|
1359
|
+
ToolsConfig,
|
|
1360
|
+
} from './advisor'
|
|
1361
|
+
|
|
1362
|
+
// Privacy-Aware Logging (prevents sensitive data in logs)
|
|
1363
|
+
export {
|
|
1364
|
+
PrivacyLogger,
|
|
1365
|
+
createPrivacyLogger,
|
|
1366
|
+
privacyLogger,
|
|
1367
|
+
redactAddress,
|
|
1368
|
+
redactSignature,
|
|
1369
|
+
maskAmount,
|
|
1370
|
+
redactSensitiveData,
|
|
1371
|
+
} from './privacy-logger'
|
|
1372
|
+
|
|
1373
|
+
export type {
|
|
1374
|
+
LogLevel,
|
|
1375
|
+
PrivacyLoggerConfig,
|
|
1376
|
+
SensitiveData,
|
|
1377
|
+
} from './privacy-logger'
|
|
1378
|
+
|
|
1379
|
+
// Structured Logging (pino-based)
|
|
1380
|
+
export {
|
|
1381
|
+
logger,
|
|
1382
|
+
createLogger,
|
|
1383
|
+
configureLogger,
|
|
1384
|
+
silenceLogger,
|
|
1385
|
+
setLogLevel,
|
|
1386
|
+
getLogLevelName,
|
|
1387
|
+
isLevelEnabled,
|
|
1388
|
+
} from './logger'
|
|
1389
|
+
|
|
1390
|
+
export type {
|
|
1391
|
+
SIPLogLevel,
|
|
1392
|
+
SIPLoggerConfig,
|
|
1393
|
+
PinoLogger,
|
|
1394
|
+
} from './logger'
|
|
1395
|
+
|
|
1396
|
+
// Production Safety Checks
|
|
1397
|
+
export {
|
|
1398
|
+
// Environment detection
|
|
1399
|
+
isProductionEnvironment,
|
|
1400
|
+
isLocalhostAllowed,
|
|
1401
|
+
// URL validation
|
|
1402
|
+
isLocalhostUrl,
|
|
1403
|
+
validateProductionConfig,
|
|
1404
|
+
assertNoLocalhost,
|
|
1405
|
+
getProductionUrl,
|
|
1406
|
+
createProductionConfig,
|
|
1407
|
+
// Error class
|
|
1408
|
+
ProductionSafetyError,
|
|
1409
|
+
} from './production-safety'
|
|
1410
|
+
|
|
1411
|
+
export type {
|
|
1412
|
+
ProductionConfigValidationResult,
|
|
1413
|
+
ProductionConfigError,
|
|
1414
|
+
ProductionConfigWarning,
|
|
1415
|
+
} from './production-safety'
|
|
1416
|
+
|
|
1417
|
+
// Configurable Endpoint Configuration
|
|
1418
|
+
// All localhost defaults are configurable via environment variables
|
|
1419
|
+
export {
|
|
1420
|
+
SOLANA_RPC_ENDPOINTS as CONFIGURABLE_SOLANA_RPC,
|
|
1421
|
+
ETH_RPC_ENDPOINTS as CONFIGURABLE_ETH_RPC,
|
|
1422
|
+
SUI_RPC_ENDPOINTS as CONFIGURABLE_SUI_RPC,
|
|
1423
|
+
ZCASH_RPC_CONFIG as CONFIGURABLE_ZCASH_RPC,
|
|
1424
|
+
} from './config/endpoints'
|
|
1425
|
+
|
|
1426
|
+
export type { ZcashRpcConfig } from './config/endpoints'
|
|
1427
|
+
|
|
1428
|
+
// Network Privacy (Tor/SOCKS5 Proxy Support)
|
|
1429
|
+
export {
|
|
1430
|
+
// Types
|
|
1431
|
+
type ProxyConfig,
|
|
1432
|
+
type ProxyType,
|
|
1433
|
+
type ParsedProxyConfig,
|
|
1434
|
+
type ProxyAgentOptions,
|
|
1435
|
+
type ProxyCheckResult,
|
|
1436
|
+
type ProxiedFetch,
|
|
1437
|
+
type NetworkPrivacyConfig,
|
|
1438
|
+
// Constants
|
|
1439
|
+
TOR_PORTS,
|
|
1440
|
+
TOR_HOST,
|
|
1441
|
+
TOR_CONTROL_PORT,
|
|
1442
|
+
DEFAULT_PROXY_TIMEOUT,
|
|
1443
|
+
PROXY_ENV_VAR,
|
|
1444
|
+
PROXY_ENV_VARS,
|
|
1445
|
+
DEFAULT_NETWORK_CONFIG,
|
|
1446
|
+
// Functions
|
|
1447
|
+
parseProxyConfig,
|
|
1448
|
+
getProxyFromEnv,
|
|
1449
|
+
isTorAvailable,
|
|
1450
|
+
detectTorPort,
|
|
1451
|
+
checkProxyAvailability,
|
|
1452
|
+
createProxyAgent,
|
|
1453
|
+
createProxiedFetch,
|
|
1454
|
+
rotateCircuit,
|
|
1455
|
+
createNetworkPrivacyClient,
|
|
1456
|
+
} from './network'
|
|
1457
|
+
|
|
1458
|
+
// ─── Oblivious Sync (M20-27) ────────────────────────────────────────────────
|
|
1459
|
+
|
|
1460
|
+
// Oblivious synchronization where sync services learn NOTHING about user transactions
|
|
1461
|
+
// Inspired by Project Tachyon: https://seanbowe.com/blog/tachyon-scaling-zcash-oblivious-synchronization/
|
|
1462
|
+
export {
|
|
1463
|
+
// Types (ChainId already exported from solana module)
|
|
1464
|
+
type BlockRange,
|
|
1465
|
+
type EncryptedNote,
|
|
1466
|
+
type MerkleProof,
|
|
1467
|
+
type SyncRandomness,
|
|
1468
|
+
type ObliviousNullifier,
|
|
1469
|
+
type ObliviousSyncQuery,
|
|
1470
|
+
type ObliviousSyncResponse,
|
|
1471
|
+
type SyncServiceHealth,
|
|
1472
|
+
type ObliviousSyncConfig,
|
|
1473
|
+
type ObliviousSyncProvider,
|
|
1474
|
+
type WalletSyncState,
|
|
1475
|
+
type TimeWindowedViewingKey,
|
|
1476
|
+
type MockSyncProviderConfig,
|
|
1477
|
+
type SyncManagerConfig,
|
|
1478
|
+
type SyncProgressEvent,
|
|
1479
|
+
type SyncCompletionEvent,
|
|
1480
|
+
type SyncEventListener,
|
|
1481
|
+
type SyncOptions,
|
|
1482
|
+
// Constants
|
|
1483
|
+
DEFAULT_SYNC_CONFIG,
|
|
1484
|
+
DEFAULT_MOCK_CONFIG,
|
|
1485
|
+
DEFAULT_MANAGER_CONFIG,
|
|
1486
|
+
// Sync randomness functions
|
|
1487
|
+
generateSyncRandomness,
|
|
1488
|
+
isSyncRandomnessValid,
|
|
1489
|
+
getCurrentEpoch,
|
|
1490
|
+
// Nullifier functions
|
|
1491
|
+
deriveObliviousNullifier,
|
|
1492
|
+
deriveTraditionalNullifier,
|
|
1493
|
+
// Sync state management
|
|
1494
|
+
createSyncState,
|
|
1495
|
+
updateSyncState,
|
|
1496
|
+
// Viewing key integration
|
|
1497
|
+
createTimeWindowedKey,
|
|
1498
|
+
isNoteInWindow,
|
|
1499
|
+
// Errors
|
|
1500
|
+
ObliviousSyncError,
|
|
1501
|
+
ObliviousSyncErrorCode,
|
|
1502
|
+
// Mock provider
|
|
1503
|
+
MockObliviousSyncProvider,
|
|
1504
|
+
createMockSyncProvider,
|
|
1505
|
+
// Sync manager
|
|
1506
|
+
SyncManager,
|
|
1507
|
+
createSyncManager,
|
|
1508
|
+
} from './sync'
|
|
1509
|
+
|
|
1510
|
+
// ─── Chain-Specific Optimizations (M20-29) ──────────────────────────────────
|
|
1511
|
+
|
|
1512
|
+
// Provides optimized configurations for different blockchains:
|
|
1513
|
+
// - Solana: Compute unit budgeting, priority fees, ALT recommendations
|
|
1514
|
+
// - Ethereum/EVM: Gas optimization, L2 strategies, EIP-4844 blob support
|
|
1515
|
+
// - BNB Chain: PancakeSwap routing, cross-chain cost comparison
|
|
1516
|
+
// - Auto-selection: Smart chain detection and configuration selection
|
|
1517
|
+
export {
|
|
1518
|
+
// Namespaced chain-specific modules
|
|
1519
|
+
solanaOptimizations,
|
|
1520
|
+
evmOptimizations,
|
|
1521
|
+
bnbOptimizations,
|
|
1522
|
+
// Chain detection and characteristics
|
|
1523
|
+
detectChainFamily,
|
|
1524
|
+
getChainCharacteristics,
|
|
1525
|
+
// Auto-selection
|
|
1526
|
+
selectOptimalConfig,
|
|
1527
|
+
// Cost comparison
|
|
1528
|
+
compareCrossChainCosts,
|
|
1529
|
+
recommendCheapestChain,
|
|
1530
|
+
recommendProfile,
|
|
1531
|
+
} from './optimizations'
|
|
1532
|
+
|
|
1533
|
+
export type {
|
|
1534
|
+
// Common types
|
|
1535
|
+
ChainFamily,
|
|
1536
|
+
UnifiedOptimizationProfile,
|
|
1537
|
+
ChainCharacteristics,
|
|
1538
|
+
UnifiedOptimizationResult,
|
|
1539
|
+
} from './optimizations'
|
|
1540
|
+
|
|
1541
|
+
// ─── Fee Module ──────────────────────────────────────────────────────────────
|
|
1542
|
+
|
|
1543
|
+
export {
|
|
1544
|
+
// Calculator
|
|
1545
|
+
FeeCalculator,
|
|
1546
|
+
createFeeCalculator,
|
|
1547
|
+
estimateFee,
|
|
1548
|
+
formatFee,
|
|
1549
|
+
bpsToPercent,
|
|
1550
|
+
percentToBps,
|
|
1551
|
+
DEFAULT_FEE_TIERS,
|
|
1552
|
+
DEFAULT_CHAIN_FEES,
|
|
1553
|
+
// NEAR Contract
|
|
1554
|
+
NEARFeeContract,
|
|
1555
|
+
createNEARFeeContract,
|
|
1556
|
+
createMainnetFeeContract,
|
|
1557
|
+
createTestnetFeeContract,
|
|
1558
|
+
calculateFeeForSwap,
|
|
1559
|
+
NEAR_FEE_CONTRACTS,
|
|
1560
|
+
DEFAULT_TREASURY,
|
|
1561
|
+
} from './fees'
|
|
1562
|
+
|
|
1563
|
+
export type {
|
|
1564
|
+
// Fee types
|
|
1565
|
+
FeeModel,
|
|
1566
|
+
FeeTier,
|
|
1567
|
+
ChainFeeConfig,
|
|
1568
|
+
FeeCalculationInput,
|
|
1569
|
+
FeeCalculationResult,
|
|
1570
|
+
FeeBreakdown,
|
|
1571
|
+
TreasuryConfig as FeeTreasuryConfig, // Aliased to avoid conflict with existing TreasuryConfig
|
|
1572
|
+
FeeCollectionEvent,
|
|
1573
|
+
FeeStats,
|
|
1574
|
+
FeeContractState,
|
|
1575
|
+
FeeContractMethods,
|
|
1576
|
+
FeeWaiverType,
|
|
1577
|
+
FeeWaiver,
|
|
1578
|
+
FeeGovernanceProposal,
|
|
1579
|
+
FeeCalculatorOptions,
|
|
1580
|
+
NEARFeeContractOptions,
|
|
1581
|
+
FeeCollectionParams,
|
|
1582
|
+
FeeCollectionResult,
|
|
1583
|
+
} from './fees'
|