@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 +349 -0
- package/dist/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +614 -159
- package/dist/browser.mjs +5 -1
- package/dist/chunk-KXN6IWL5.mjs +10736 -0
- package/dist/chunk-UPTISVCY.mjs +10304 -0
- package/dist/index.d.mts +289 -1
- package/dist/index.d.ts +289 -1
- package/dist/index.js +614 -159
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
- package/src/adapters/near-intents.ts +31 -5
- package/src/index.ts +12 -0
- package/src/zcash/bridge.ts +738 -0
- package/src/zcash/index.ts +36 -1
- package/src/zcash/swap-service.ts +793 -0
package/dist/index.mjs
CHANGED
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
ZcashRPCClient,
|
|
48
48
|
ZcashRPCError,
|
|
49
49
|
ZcashShieldedService,
|
|
50
|
+
ZcashSwapService,
|
|
50
51
|
addBlindings,
|
|
51
52
|
addCommitments,
|
|
52
53
|
addOracle,
|
|
@@ -80,6 +81,7 @@ import {
|
|
|
80
81
|
createWalletFactory,
|
|
81
82
|
createZcashClient,
|
|
82
83
|
createZcashShieldedService,
|
|
84
|
+
createZcashSwapService,
|
|
83
85
|
decodeStealthMetaAddress,
|
|
84
86
|
decryptMemo,
|
|
85
87
|
decryptWithViewing,
|
|
@@ -197,7 +199,7 @@ import {
|
|
|
197
199
|
walletRegistry,
|
|
198
200
|
withSecureBuffer,
|
|
199
201
|
withSecureBufferSync
|
|
200
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-KXN6IWL5.mjs";
|
|
201
203
|
import {
|
|
202
204
|
CryptoError,
|
|
203
205
|
EncryptionNotImplementedError,
|
|
@@ -273,6 +275,7 @@ export {
|
|
|
273
275
|
ZcashRPCClient,
|
|
274
276
|
ZcashRPCError,
|
|
275
277
|
ZcashShieldedService,
|
|
278
|
+
ZcashSwapService,
|
|
276
279
|
addBlindings,
|
|
277
280
|
addCommitments,
|
|
278
281
|
addOracle,
|
|
@@ -307,6 +310,7 @@ export {
|
|
|
307
310
|
createWalletFactory,
|
|
308
311
|
createZcashClient,
|
|
309
312
|
createZcashShieldedService,
|
|
313
|
+
createZcashSwapService,
|
|
310
314
|
decodeStealthMetaAddress,
|
|
311
315
|
decryptMemo,
|
|
312
316
|
decryptWithViewing,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
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",
|
|
@@ -138,27 +138,53 @@ const DEFAULT_ASSET_MAPPINGS: Record<string, DefuseAssetId> = {
|
|
|
138
138
|
// NEAR assets
|
|
139
139
|
'near:NEAR': 'nep141:wrap.near',
|
|
140
140
|
'near:wNEAR': 'nep141:wrap.near',
|
|
141
|
+
'near:USDC': 'nep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
|
|
141
142
|
|
|
142
143
|
// Ethereum assets (via OMFT bridge)
|
|
143
144
|
'ethereum:ETH': 'nep141:eth.omft.near',
|
|
144
|
-
'ethereum:USDC': 'nep141:
|
|
145
|
-
'ethereum:USDT': 'nep141:
|
|
145
|
+
'ethereum:USDC': 'nep141:eth-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.omft.near',
|
|
146
|
+
'ethereum:USDT': 'nep141:eth-0xdac17f958d2ee523a2206206994597c13d831ec7.omft.near',
|
|
146
147
|
|
|
147
148
|
// Solana assets (via OMFT bridge)
|
|
148
149
|
'solana:SOL': 'nep141:sol.omft.near',
|
|
150
|
+
'solana:USDC': 'nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near',
|
|
151
|
+
'solana:USDT': 'nep141:sol-c800a4bd850783ccb82c2b2c7e84175443606352.omft.near',
|
|
149
152
|
|
|
150
153
|
// Zcash assets
|
|
151
154
|
'zcash:ZEC': 'nep141:zec.omft.near',
|
|
152
155
|
|
|
153
156
|
// Arbitrum assets
|
|
154
157
|
'arbitrum:ETH': 'nep141:arb.omft.near',
|
|
158
|
+
'arbitrum:ARB': 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
|
|
159
|
+
'arbitrum:USDC': 'nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near',
|
|
155
160
|
|
|
156
161
|
// Base assets
|
|
157
162
|
'base:ETH': 'nep141:base.omft.near',
|
|
163
|
+
'base:USDC': 'nep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near',
|
|
158
164
|
|
|
159
|
-
//
|
|
160
|
-
'
|
|
161
|
-
'
|
|
165
|
+
// Optimism assets (via HOT bridge - uses nep245)
|
|
166
|
+
'optimism:ETH': 'nep245:v2_1.omni.hot.tg:10_11111111111111111111',
|
|
167
|
+
'optimism:OP': 'nep245:v2_1.omni.hot.tg:10_vLAiSt9KfUGKpw5cD3vsSyNYBo7',
|
|
168
|
+
'optimism:USDC': 'nep245:v2_1.omni.hot.tg:10_A2ewyUyDp6qsue1jqZsGypkCxRJ',
|
|
169
|
+
|
|
170
|
+
// Polygon assets (via HOT bridge - uses nep245)
|
|
171
|
+
'polygon:POL': 'nep245:v2_1.omni.hot.tg:137_11111111111111111111',
|
|
172
|
+
'polygon:MATIC': 'nep245:v2_1.omni.hot.tg:137_11111111111111111111', // POL is the rebranded MATIC
|
|
173
|
+
'polygon:USDC': 'nep245:v2_1.omni.hot.tg:137_qiStmoQJDQPTebaPjgx5VBxZv6L',
|
|
174
|
+
|
|
175
|
+
// BNB Chain assets (via HOT bridge - uses nep245)
|
|
176
|
+
'bsc:BNB': 'nep245:v2_1.omni.hot.tg:56_11111111111111111111',
|
|
177
|
+
'bsc:USDC': 'nep245:v2_1.omni.hot.tg:56_2w93GqMcEmQFDru84j3HZZWt557r',
|
|
178
|
+
|
|
179
|
+
// Avalanche assets (via HOT bridge - uses nep245)
|
|
180
|
+
'avalanche:AVAX': 'nep245:v2_1.omni.hot.tg:43114_11111111111111111111',
|
|
181
|
+
'avalanche:USDC': 'nep245:v2_1.omni.hot.tg:43114_3atVJH3r5c4GqiSYmg9fECvjc47o',
|
|
182
|
+
|
|
183
|
+
// Bitcoin
|
|
184
|
+
'bitcoin:BTC': 'nep141:btc.omft.near',
|
|
185
|
+
|
|
186
|
+
// Aptos
|
|
187
|
+
'aptos:APT': 'nep141:aptos.omft.near',
|
|
162
188
|
}
|
|
163
189
|
|
|
164
190
|
/**
|
package/src/index.ts
CHANGED
|
@@ -372,6 +372,8 @@ export {
|
|
|
372
372
|
createZcashClient,
|
|
373
373
|
ZcashShieldedService,
|
|
374
374
|
createZcashShieldedService,
|
|
375
|
+
ZcashSwapService,
|
|
376
|
+
createZcashSwapService,
|
|
375
377
|
} from './zcash'
|
|
376
378
|
export { ZcashErrorCode } from '@sip-protocol/types'
|
|
377
379
|
|
|
@@ -382,6 +384,16 @@ export type {
|
|
|
382
384
|
ReceivedNote,
|
|
383
385
|
ShieldedBalance,
|
|
384
386
|
ExportedViewingKey,
|
|
387
|
+
ZcashSwapServiceConfig,
|
|
388
|
+
ZcashSwapSourceChain,
|
|
389
|
+
ZcashSwapSourceToken,
|
|
390
|
+
ZcashQuoteParams,
|
|
391
|
+
ZcashQuote,
|
|
392
|
+
ZcashSwapParams,
|
|
393
|
+
ZcashSwapResult,
|
|
394
|
+
ZcashSwapStatus,
|
|
395
|
+
BridgeProvider,
|
|
396
|
+
PriceFeed,
|
|
385
397
|
} from './zcash'
|
|
386
398
|
|
|
387
399
|
export type {
|