uvd-x402-sdk 2.15.2 → 2.16.2

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 (77) hide show
  1. package/README.md +247 -6
  2. package/dist/adapters/index.d.mts +1 -1
  3. package/dist/adapters/index.d.ts +1 -1
  4. package/dist/adapters/index.js +82 -1
  5. package/dist/adapters/index.js.map +1 -1
  6. package/dist/adapters/index.mjs +82 -1
  7. package/dist/adapters/index.mjs.map +1 -1
  8. package/dist/backend/index.d.mts +1 -1
  9. package/dist/backend/index.d.ts +1 -1
  10. package/dist/backend/index.js +82 -1
  11. package/dist/backend/index.js.map +1 -1
  12. package/dist/backend/index.mjs +82 -1
  13. package/dist/backend/index.mjs.map +1 -1
  14. package/dist/{index-Cwi_VM05.d.ts → index-B2cQzyKa.d.ts} +10 -2
  15. package/dist/{index-BYIugZlE.d.mts → index-BE5cH7oS.d.mts} +48 -5
  16. package/dist/{index-BYIugZlE.d.ts → index-BE5cH7oS.d.ts} +48 -5
  17. package/dist/{index-D3PO3jLW.d.mts → index-oE4dj05k.d.mts} +10 -2
  18. package/dist/index.d.mts +11 -2
  19. package/dist/index.d.ts +11 -2
  20. package/dist/index.js +111 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +110 -3
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/providers/algorand/index.d.mts +1 -1
  25. package/dist/providers/algorand/index.d.ts +1 -1
  26. package/dist/providers/algorand/index.js +95 -2
  27. package/dist/providers/algorand/index.js.map +1 -1
  28. package/dist/providers/algorand/index.mjs +95 -2
  29. package/dist/providers/algorand/index.mjs.map +1 -1
  30. package/dist/providers/evm/index.d.mts +1 -1
  31. package/dist/providers/evm/index.d.ts +1 -1
  32. package/dist/providers/evm/index.js +82 -1
  33. package/dist/providers/evm/index.js.map +1 -1
  34. package/dist/providers/evm/index.mjs +82 -1
  35. package/dist/providers/evm/index.mjs.map +1 -1
  36. package/dist/providers/near/index.d.mts +1 -1
  37. package/dist/providers/near/index.d.ts +1 -1
  38. package/dist/providers/near/index.js +82 -1
  39. package/dist/providers/near/index.js.map +1 -1
  40. package/dist/providers/near/index.mjs +82 -1
  41. package/dist/providers/near/index.mjs.map +1 -1
  42. package/dist/providers/solana/index.d.mts +1 -1
  43. package/dist/providers/solana/index.d.ts +1 -1
  44. package/dist/providers/solana/index.js +82 -1
  45. package/dist/providers/solana/index.js.map +1 -1
  46. package/dist/providers/solana/index.mjs +82 -1
  47. package/dist/providers/solana/index.mjs.map +1 -1
  48. package/dist/providers/stellar/index.d.mts +1 -1
  49. package/dist/providers/stellar/index.d.ts +1 -1
  50. package/dist/providers/stellar/index.js +82 -1
  51. package/dist/providers/stellar/index.js.map +1 -1
  52. package/dist/providers/stellar/index.mjs +82 -1
  53. package/dist/providers/stellar/index.mjs.map +1 -1
  54. package/dist/providers/sui/index.d.mts +105 -0
  55. package/dist/providers/sui/index.d.ts +105 -0
  56. package/dist/providers/sui/index.js +1027 -0
  57. package/dist/providers/sui/index.js.map +1 -0
  58. package/dist/providers/sui/index.mjs +1022 -0
  59. package/dist/providers/sui/index.mjs.map +1 -0
  60. package/dist/react/index.d.mts +3 -3
  61. package/dist/react/index.d.ts +3 -3
  62. package/dist/react/index.js +82 -1
  63. package/dist/react/index.js.map +1 -1
  64. package/dist/react/index.mjs +82 -1
  65. package/dist/react/index.mjs.map +1 -1
  66. package/dist/utils/index.d.mts +1 -1
  67. package/dist/utils/index.d.ts +1 -1
  68. package/dist/utils/index.js +82 -1
  69. package/dist/utils/index.js.map +1 -1
  70. package/dist/utils/index.mjs +82 -1
  71. package/dist/utils/index.mjs.map +1 -1
  72. package/package.json +15 -4
  73. package/src/chains/index.ts +98 -0
  74. package/src/facilitator.ts +18 -0
  75. package/src/index.ts +20 -1
  76. package/src/providers/sui/index.ts +431 -0
  77. package/src/types/index.ts +55 -3
@@ -1,4 +1,4 @@
1
- import { c as WalletAdapter, C as ChainConfig, P as PaymentInfo, l as X402Version } from '../../index-BYIugZlE.mjs';
1
+ import { c as WalletAdapter, C as ChainConfig, P as PaymentInfo, m as X402Version } from '../../index-BE5cH7oS.mjs';
2
2
 
3
3
  /**
4
4
  * uvd-x402-sdk - Algorand Provider
@@ -1,4 +1,4 @@
1
- import { c as WalletAdapter, C as ChainConfig, P as PaymentInfo, l as X402Version } from '../../index-BYIugZlE.js';
1
+ import { c as WalletAdapter, C as ChainConfig, P as PaymentInfo, m as X402Version } from '../../index-BE5cH7oS.js';
2
2
 
3
3
  /**
4
4
  * uvd-x402-sdk - Algorand Provider
@@ -24,7 +24,10 @@ var CAIP2_IDENTIFIERS = {
24
24
  near: "near:mainnet",
25
25
  // Algorand
26
26
  algorand: "algorand:mainnet",
27
- "algorand-testnet": "algorand:testnet"
27
+ "algorand-testnet": "algorand:testnet",
28
+ // Sui
29
+ sui: "sui:mainnet",
30
+ "sui-testnet": "sui:testnet"
28
31
  };
29
32
  Object.fromEntries(
30
33
  Object.entries(CAIP2_IDENTIFIERS).map(([k, v]) => [v, k])
@@ -656,6 +659,84 @@ var SUPPORTED_CHAINS = {
656
659
  facilitatorUrl: DEFAULT_FACILITATOR_URL,
657
660
  enabled: true
658
661
  }
662
+ },
663
+ // ============================================================================
664
+ // SUI (2 networks) - Uses sponsored transactions (facilitator pays gas)
665
+ // ============================================================================
666
+ sui: {
667
+ chainId: 0,
668
+ // Non-EVM
669
+ chainIdHex: "0x0",
670
+ name: "sui",
671
+ displayName: "Sui",
672
+ networkType: "sui",
673
+ rpcUrl: "https://fullnode.mainnet.sui.io:443",
674
+ explorerUrl: "https://suiscan.xyz/mainnet",
675
+ nativeCurrency: {
676
+ name: "Sui",
677
+ symbol: "SUI",
678
+ decimals: 9
679
+ },
680
+ usdc: {
681
+ // USDC coin type on Sui mainnet
682
+ address: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
683
+ decimals: 6,
684
+ name: "USDC",
685
+ version: "1"
686
+ },
687
+ tokens: {
688
+ usdc: {
689
+ address: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
690
+ decimals: 6,
691
+ name: "USDC",
692
+ version: "1"
693
+ },
694
+ ausd: {
695
+ // AUSD (Agora USD) coin type on Sui mainnet
696
+ address: "0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD",
697
+ decimals: 6,
698
+ name: "AUSD",
699
+ version: "1"
700
+ }
701
+ },
702
+ x402: {
703
+ facilitatorUrl: DEFAULT_FACILITATOR_URL,
704
+ enabled: true
705
+ }
706
+ },
707
+ "sui-testnet": {
708
+ chainId: 0,
709
+ // Non-EVM
710
+ chainIdHex: "0x0",
711
+ name: "sui-testnet",
712
+ displayName: "Sui Testnet",
713
+ networkType: "sui",
714
+ rpcUrl: "https://fullnode.testnet.sui.io:443",
715
+ explorerUrl: "https://suiscan.xyz/testnet",
716
+ nativeCurrency: {
717
+ name: "Sui",
718
+ symbol: "SUI",
719
+ decimals: 9
720
+ },
721
+ usdc: {
722
+ // USDC coin type on Sui testnet
723
+ address: "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC",
724
+ decimals: 6,
725
+ name: "USDC",
726
+ version: "1"
727
+ },
728
+ tokens: {
729
+ usdc: {
730
+ address: "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC",
731
+ decimals: 6,
732
+ name: "USDC",
733
+ version: "1"
734
+ }
735
+ },
736
+ x402: {
737
+ facilitatorUrl: DEFAULT_FACILITATOR_URL,
738
+ enabled: true
739
+ }
659
740
  }
660
741
  };
661
742
  function getChainByName(name) {
@@ -752,7 +833,19 @@ var FACILITATOR_ADDRESSES = {
752
833
  /**
753
834
  * Algorand facilitator address (testnet)
754
835
  */
755
- "algorand-testnet": "5DPPDQNYUPCTXRZWRYSF3WPYU6RKAUR25F3YG4EKXQRHV5AUAI62H5GXL4"
836
+ "algorand-testnet": "5DPPDQNYUPCTXRZWRYSF3WPYU6RKAUR25F3YG4EKXQRHV5AUAI62H5GXL4",
837
+ // ============================================
838
+ // Sui
839
+ // ============================================
840
+ /**
841
+ * Sui facilitator address (mainnet)
842
+ * Used for: Sponsoring transactions (paying gas)
843
+ */
844
+ sui: "0xe7bbf2b13f7d72714760aa16e024fa1b35a978793f9893d0568a4fbf356a764a",
845
+ /**
846
+ * Sui facilitator address (testnet)
847
+ */
848
+ "sui-testnet": "0xabbd16a2fab2a502c9cfe835195a6fc7d70bfc27cffb40b8b286b52a97006e67"
756
849
  };
757
850
  function getFacilitatorAddress(chainName, networkType) {
758
851
  const exactMatch = FACILITATOR_ADDRESSES[chainName];