uvd-x402-sdk 2.91.0 → 2.92.0

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 (67) hide show
  1. package/README.md +6 -2
  2. package/dist/adapters/index.js +88 -1
  3. package/dist/adapters/index.js.map +1 -1
  4. package/dist/adapters/index.mjs +88 -1
  5. package/dist/adapters/index.mjs.map +1 -1
  6. package/dist/backend/index.js +88 -1
  7. package/dist/backend/index.js.map +1 -1
  8. package/dist/backend/index.mjs +88 -1
  9. package/dist/backend/index.mjs.map +1 -1
  10. package/dist/erc8128/index.js +2 -0
  11. package/dist/erc8128/index.js.map +1 -1
  12. package/dist/erc8128/index.mjs +2 -0
  13. package/dist/erc8128/index.mjs.map +1 -1
  14. package/dist/{index-DAC3DRdT.d.mts → index-B-iLEkAH.d.mts} +3 -2
  15. package/dist/{index-DRSEcZ36.d.ts → index-DkoNhJfq.d.ts} +3 -2
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +88 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +88 -1
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/providers/algorand/index.js +88 -1
  23. package/dist/providers/algorand/index.js.map +1 -1
  24. package/dist/providers/algorand/index.mjs +88 -1
  25. package/dist/providers/algorand/index.mjs.map +1 -1
  26. package/dist/providers/evm/index.js +88 -1
  27. package/dist/providers/evm/index.js.map +1 -1
  28. package/dist/providers/evm/index.mjs +88 -1
  29. package/dist/providers/evm/index.mjs.map +1 -1
  30. package/dist/providers/near/index.js +88 -1
  31. package/dist/providers/near/index.js.map +1 -1
  32. package/dist/providers/near/index.mjs +88 -1
  33. package/dist/providers/near/index.mjs.map +1 -1
  34. package/dist/providers/solana/index.js +88 -1
  35. package/dist/providers/solana/index.js.map +1 -1
  36. package/dist/providers/solana/index.mjs +88 -1
  37. package/dist/providers/solana/index.mjs.map +1 -1
  38. package/dist/providers/stellar/index.js +88 -1
  39. package/dist/providers/stellar/index.js.map +1 -1
  40. package/dist/providers/stellar/index.mjs +88 -1
  41. package/dist/providers/stellar/index.mjs.map +1 -1
  42. package/dist/providers/sui/index.js +88 -1
  43. package/dist/providers/sui/index.js.map +1 -1
  44. package/dist/providers/sui/index.mjs +88 -1
  45. package/dist/providers/sui/index.mjs.map +1 -1
  46. package/dist/providers/xrpl/index.js +88 -1
  47. package/dist/providers/xrpl/index.js.map +1 -1
  48. package/dist/providers/xrpl/index.mjs +88 -1
  49. package/dist/providers/xrpl/index.mjs.map +1 -1
  50. package/dist/react/index.d.mts +1 -1
  51. package/dist/react/index.d.ts +1 -1
  52. package/dist/react/index.js +88 -1
  53. package/dist/react/index.js.map +1 -1
  54. package/dist/react/index.mjs +88 -1
  55. package/dist/react/index.mjs.map +1 -1
  56. package/dist/react/picker/index.js +86 -1
  57. package/dist/react/picker/index.js.map +1 -1
  58. package/dist/react/picker/index.mjs +86 -1
  59. package/dist/react/picker/index.mjs.map +1 -1
  60. package/dist/utils/index.js +88 -1
  61. package/dist/utils/index.js.map +1 -1
  62. package/dist/utils/index.mjs +88 -1
  63. package/dist/utils/index.mjs.map +1 -1
  64. package/package.json +3 -2
  65. package/src/chains/index.ts +85 -3
  66. package/src/index.ts +2 -2
  67. package/src/types/index.ts +2 -0
@@ -19,6 +19,8 @@ var CAIP2_IDENTIFIERS = {
19
19
  "skale-base-sepolia": "eip155:324705682",
20
20
  robinhood: "eip155:4663",
21
21
  "robinhood-testnet": "eip155:46630",
22
+ arc: "eip155:5042",
23
+ "arc-testnet": "eip155:5042002",
22
24
  // SVM chains
23
25
  solana: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
24
26
  fogo: "svm:fogo",
@@ -57,7 +59,7 @@ var X402Error = class _X402Error extends Error {
57
59
  var DEFAULT_FACILITATOR_URL = "https://facilitator.ultravioletadao.xyz";
58
60
  var SUPPORTED_CHAINS = {
59
61
  // ============================================================================
60
- // EVM CHAINS (15 networks)
62
+ // EVM CHAINS (16 enabled + BSC, disabled)
61
63
  // ============================================================================
62
64
  base: {
63
65
  chainId: 8453,
@@ -687,6 +689,91 @@ var SUPPORTED_CHAINS = {
687
689
  enabled: true
688
690
  }
689
691
  },
692
+ // Arc testnet (Circle). The stablecoin IS the chain's native asset, so the SAME
693
+ // balance is readable at TWO precisions:
694
+ // - native / gas, via eth_getBalance and EIP-1559 fees: 18 decimals
695
+ // - ERC-20 interface, via balanceOf and transferWithAuthorization: 6 decimals
696
+ // (the ERC-20 view is floor(native / 10^12))
697
+ // An x402 payment is an EIP-3009 authorization against the ERC-20 interface, so
698
+ // its `value` is ALWAYS in the 6 of `tokens.usdc.decimals`. Scaling a price with
699
+ // `nativeCurrency.decimals` instead charges 10^12 times the amount: $0.01 would
700
+ // be signed as 10000000000000000 units, i.e. 10 billion USDC. `nativeCurrency`
701
+ // below is correct where it is actually used -- the wallet_addEthereumChain
702
+ // params -- and must never reach `parseUnits` for a payment.
703
+ // Pinned by src/arc-testnet.test.ts.
704
+ //
705
+ // Mainnet (5042) and testnet (5042002) were verified independently against
706
+ // their official RPCs on 2026-09-16. EURC is not registered without its E2E proof.
707
+ arc: {
708
+ chainId: 5042,
709
+ chainIdHex: "0x13b2",
710
+ name: "arc",
711
+ displayName: "Arc",
712
+ networkType: "evm",
713
+ rpcUrl: "https://rpc.mainnet.arc.io",
714
+ explorerUrl: "https://explorer.arc.io",
715
+ nativeCurrency: {
716
+ name: "USD Coin",
717
+ symbol: "USDC",
718
+ decimals: 18
719
+ // gas precision ONLY -- never the scale of a payment
720
+ },
721
+ usdc: {
722
+ address: "0x3600000000000000000000000000000000000000",
723
+ decimals: 6,
724
+ // ERC-20 interface, which is what an EIP-3009 value is denominated in
725
+ name: "USDC",
726
+ // on-chain name(); must match the EIP-712 domain exactly
727
+ version: "2"
728
+ },
729
+ tokens: {
730
+ usdc: {
731
+ address: "0x3600000000000000000000000000000000000000",
732
+ decimals: 6,
733
+ name: "USDC",
734
+ version: "2"
735
+ }
736
+ },
737
+ x402: {
738
+ facilitatorUrl: DEFAULT_FACILITATOR_URL,
739
+ enabled: true
740
+ }
741
+ },
742
+ "arc-testnet": {
743
+ chainId: 5042002,
744
+ chainIdHex: "0x4cef52",
745
+ name: "arc-testnet",
746
+ displayName: "Arc Testnet",
747
+ networkType: "evm",
748
+ rpcUrl: "https://rpc.testnet.arc.io",
749
+ explorerUrl: "https://explorer.testnet.arc.io",
750
+ nativeCurrency: {
751
+ name: "USD Coin",
752
+ symbol: "USDC",
753
+ decimals: 18
754
+ // gas precision ONLY -- never the scale of a payment
755
+ },
756
+ usdc: {
757
+ address: "0x3600000000000000000000000000000000000000",
758
+ decimals: 6,
759
+ // ERC-20 interface, which is what an EIP-3009 value is denominated in
760
+ name: "USDC",
761
+ // on-chain name(); must match the EIP-712 domain exactly
762
+ version: "2"
763
+ },
764
+ tokens: {
765
+ usdc: {
766
+ address: "0x3600000000000000000000000000000000000000",
767
+ decimals: 6,
768
+ name: "USDC",
769
+ version: "2"
770
+ }
771
+ },
772
+ x402: {
773
+ facilitatorUrl: DEFAULT_FACILITATOR_URL,
774
+ enabled: true
775
+ }
776
+ },
690
777
  // ============================================================================
691
778
  // SVM CHAINS (2 networks) - Solana Virtual Machine
692
779
  // ============================================================================