@sip-protocol/sdk 0.6.26 → 0.7.1

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.
Files changed (43) hide show
  1. package/dist/browser.d.mts +2 -1
  2. package/dist/browser.d.ts +2 -1
  3. package/dist/browser.js +5723 -4957
  4. package/dist/browser.mjs +94 -46
  5. package/dist/{chunk-ZEYNCEIE.mjs → chunk-3OVABDRH.mjs} +12 -0
  6. package/dist/chunk-6WGN57S2.mjs +218 -0
  7. package/dist/chunk-DLDWZFYC.mjs +1495 -0
  8. package/dist/chunk-E6SZWREQ.mjs +57 -0
  9. package/dist/{chunk-GFSLU6SP.mjs → chunk-G33LB27A.mjs} +496 -1407
  10. package/dist/chunk-HOR7PM3M.mjs +15 -0
  11. package/dist/chunk-L2K34JCU.mjs +1496 -0
  12. package/dist/{chunk-EMOAOF5P.mjs → chunk-SN4ZDTVW.mjs} +489 -1407
  13. package/dist/constants-VOI7BSLK.mjs +27 -0
  14. package/dist/{index-DO9Az5n4.d.ts → index-CHB3KuOB.d.mts} +483 -14
  15. package/dist/{index-CRz9S3eE.d.mts → index-CzWPI6Le.d.ts} +483 -14
  16. package/dist/index.d.mts +2 -1
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.js +5658 -4895
  19. package/dist/index.mjs +91 -43
  20. package/dist/proofs/noir.mjs +4 -2
  21. package/dist/solana-5EMCTPTS.mjs +46 -0
  22. package/dist/solana-Q4NAVBTS.mjs +46 -0
  23. package/package.json +4 -2
  24. package/src/chains/solana/constants.ts +101 -0
  25. package/src/chains/solana/index.ts +87 -0
  26. package/src/chains/solana/scan.ts +382 -0
  27. package/src/chains/solana/transfer.ts +266 -0
  28. package/src/chains/solana/types.ts +169 -0
  29. package/src/executors/index.ts +18 -0
  30. package/src/executors/same-chain.ts +154 -0
  31. package/src/index.ts +58 -1
  32. package/src/intent.ts +10 -0
  33. package/src/sip.ts +127 -0
  34. package/src/stealth.ts +12 -2
  35. package/dist/chunk-46TH5SRE.mjs +0 -17077
  36. package/dist/chunk-C7RM67TH.mjs +0 -17047
  37. package/dist/chunk-GE566OLO.mjs +0 -17059
  38. package/dist/chunk-JK4FDH74.mjs +0 -17059
  39. package/dist/chunk-TSOCBT73.mjs +0 -17067
  40. package/dist/index-BZxo_8F3.d.ts +0 -11388
  41. package/dist/index-DKJ81T9L.d.mts +0 -11388
  42. package/dist/index-Dex_NSYv.d.mts +0 -11390
  43. package/dist/index-DhThjSB5.d.ts +0 -11390
@@ -0,0 +1,57 @@
1
+ // src/chains/solana/constants.ts
2
+ var SOLANA_TOKEN_MINTS = {
3
+ /** USD Coin (USDC) - Circle's stablecoin */
4
+ USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
5
+ /** Tether USD (USDT) */
6
+ USDT: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
7
+ /** Wrapped SOL (for SPL token operations with native SOL) */
8
+ WSOL: "So11111111111111111111111111111111111111112"
9
+ };
10
+ var SOLANA_TOKEN_DECIMALS = {
11
+ SOL: 9,
12
+ WSOL: 9,
13
+ USDC: 6,
14
+ USDT: 6
15
+ };
16
+ var SOLANA_RPC_ENDPOINTS = {
17
+ "mainnet-beta": "https://api.mainnet-beta.solana.com",
18
+ mainnet: "https://api.mainnet-beta.solana.com",
19
+ devnet: "https://api.devnet.solana.com",
20
+ testnet: "https://api.testnet.solana.com",
21
+ localnet: "http://localhost:8899"
22
+ };
23
+ var SOLANA_EXPLORER_URLS = {
24
+ "mainnet-beta": "https://solscan.io",
25
+ mainnet: "https://solscan.io",
26
+ devnet: "https://solscan.io?cluster=devnet",
27
+ testnet: "https://solscan.io?cluster=testnet",
28
+ localnet: "http://localhost:3000"
29
+ };
30
+ var MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
31
+ var SIP_MEMO_PREFIX = "SIP:1:";
32
+ var ESTIMATED_TX_FEE_LAMPORTS = 5000n;
33
+ var ATA_RENT_LAMPORTS = 2039280n;
34
+ function getExplorerUrl(signature, cluster = "mainnet-beta") {
35
+ const baseUrl = SOLANA_EXPLORER_URLS[cluster];
36
+ return `${baseUrl}/tx/${signature}`;
37
+ }
38
+ function getTokenMint(symbol) {
39
+ return SOLANA_TOKEN_MINTS[symbol];
40
+ }
41
+ function getTokenDecimals(symbol) {
42
+ return SOLANA_TOKEN_DECIMALS[symbol] ?? 9;
43
+ }
44
+
45
+ export {
46
+ SOLANA_TOKEN_MINTS,
47
+ SOLANA_TOKEN_DECIMALS,
48
+ SOLANA_RPC_ENDPOINTS,
49
+ SOLANA_EXPLORER_URLS,
50
+ MEMO_PROGRAM_ID,
51
+ SIP_MEMO_PREFIX,
52
+ ESTIMATED_TX_FEE_LAMPORTS,
53
+ ATA_RENT_LAMPORTS,
54
+ getExplorerUrl,
55
+ getTokenMint,
56
+ getTokenDecimals
57
+ };