uvd-x402-sdk 0.2.3__tar.gz → 0.3.0__tar.gz

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 (29) hide show
  1. {uvd_x402_sdk-0.2.3/src/uvd_x402_sdk.egg-info → uvd_x402_sdk-0.3.0}/PKG-INFO +121 -8
  2. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/README.md +118 -5
  3. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/pyproject.toml +7 -2
  4. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/__init__.py +17 -1
  5. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/networks/__init__.py +26 -0
  6. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/networks/base.py +152 -1
  7. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/networks/evm.py +147 -6
  8. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0/src/uvd_x402_sdk.egg-info}/PKG-INFO +121 -8
  9. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/LICENSE +0 -0
  10. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/setup.cfg +0 -0
  11. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/client.py +0 -0
  12. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/config.py +0 -0
  13. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/decorators.py +0 -0
  14. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/exceptions.py +0 -0
  15. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/integrations/__init__.py +0 -0
  16. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/integrations/django_integration.py +0 -0
  17. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/integrations/fastapi_integration.py +0 -0
  18. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/integrations/flask_integration.py +0 -0
  19. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/integrations/lambda_integration.py +0 -0
  20. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/models.py +0 -0
  21. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/networks/near.py +0 -0
  22. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/networks/solana.py +0 -0
  23. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/networks/stellar.py +0 -0
  24. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk/response.py +0 -0
  25. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk.egg-info/SOURCES.txt +0 -0
  26. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk.egg-info/dependency_links.txt +0 -0
  27. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk.egg-info/requires.txt +0 -0
  28. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/src/uvd_x402_sdk.egg-info/top_level.txt +0 -0
  29. {uvd_x402_sdk-0.2.3 → uvd_x402_sdk-0.3.0}/tests/test_client.py +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uvd-x402-sdk
3
- Version: 0.2.3
4
- Summary: Python SDK for integrating x402 payments via the Ultravioleta DAO facilitator
3
+ Version: 0.3.0
4
+ Summary: Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD, GHO, crvUSD)
5
5
  Author-email: Ultravioleta DAO <dev@ultravioletadao.xyz>
6
6
  Project-URL: Homepage, https://github.com/UltravioletaDAO/uvd-x402-sdk-python
7
7
  Project-URL: Documentation, https://docs.ultravioletadao.xyz/x402-sdk
8
8
  Project-URL: Repository, https://github.com/UltravioletaDAO/uvd-x402-sdk-python
9
9
  Project-URL: Issues, https://github.com/UltravioletaDAO/uvd-x402-sdk-python/issues
10
- Keywords: x402,payments,crypto,usdc,web3,evm,solana,near,stellar,facilitator
10
+ Keywords: x402,payments,crypto,usdc,eurc,stablecoin,web3,evm,solana,near,stellar,facilitator,gasless,eip-712,eip-3009
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: License :: OSI Approved :: MIT License
@@ -51,17 +51,18 @@ Requires-Dist: httpx>=0.24.0; extra == "dev"
51
51
 
52
52
  Python SDK for integrating **x402 cryptocurrency payments** via the Ultravioleta DAO facilitator.
53
53
 
54
- Accept USDC payments across **14 blockchain networks** with a single integration. The SDK handles signature verification, on-chain settlement, and all the complexity of multi-chain payments.
54
+ Accept **gasless stablecoin payments** across **14 blockchain networks** with a single integration. The SDK handles signature verification, on-chain settlement, and all the complexity of multi-chain payments.
55
55
 
56
56
  ## Features
57
57
 
58
58
  - **14 Networks**: EVM chains (Base, Ethereum, Polygon, etc.), SVM chains (Solana, Fogo), NEAR, and Stellar
59
+ - **6 Stablecoins**: USDC, EURC, AUSD, PYUSD, GHO, crvUSD (EVM chains)
59
60
  - **x402 v1 & v2**: Full support for both protocol versions with auto-detection
60
61
  - **Framework Integrations**: Flask, FastAPI, Django, AWS Lambda
61
- - **Gasless Payments**: Users sign authorizations, facilitator pays all network fees
62
+ - **Gasless Payments**: Users sign EIP-712/EIP-3009 authorizations, facilitator pays all network fees
62
63
  - **Simple API**: Decorators and middleware for quick integration
63
64
  - **Type Safety**: Full Pydantic models and type hints
64
- - **Extensible**: Register custom networks easily
65
+ - **Extensible**: Register custom networks and tokens easily
65
66
 
66
67
  ## Quick Start (5 Lines)
67
68
 
@@ -93,6 +94,17 @@ print(f"Paid by {result.payer_address}, tx: {result.transaction_hash}")
93
94
  | NEAR | NEAR | - | `near:mainnet` | Active |
94
95
  | Stellar | Stellar | - | `stellar:pubnet` | Active |
95
96
 
97
+ ### Supported Tokens (EVM Chains)
98
+
99
+ | Token | Networks | Decimals |
100
+ |-------|----------|----------|
101
+ | USDC | All EVM chains | 6 |
102
+ | EURC | Ethereum, Base, Avalanche | 6 |
103
+ | AUSD | Ethereum, Arbitrum, Avalanche, Polygon, Monad | 6 |
104
+ | PYUSD | Ethereum | 6 |
105
+ | GHO | Ethereum, Base, Arbitrum | 18 |
106
+ | crvUSD | Ethereum, Arbitrum | 18 |
107
+
96
108
  ## Installation
97
109
 
98
110
  ```bash
@@ -610,6 +622,92 @@ config = X402Config(
610
622
 
611
623
  ---
612
624
 
625
+ ## Multi-Token Support
626
+
627
+ The SDK supports 6 stablecoins on EVM chains. Use the token helper functions to query and work with different tokens.
628
+
629
+ ### Querying Token Support
630
+
631
+ ```python
632
+ from uvd_x402_sdk import (
633
+ TokenType,
634
+ get_token_config,
635
+ get_supported_tokens,
636
+ is_token_supported,
637
+ get_networks_by_token,
638
+ )
639
+
640
+ # Check which tokens a network supports
641
+ tokens = get_supported_tokens("ethereum")
642
+ print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd', 'gho', 'crvusd']
643
+
644
+ tokens = get_supported_tokens("base")
645
+ print(tokens) # ['usdc', 'eurc', 'gho']
646
+
647
+ # Check if a specific token is supported
648
+ if is_token_supported("ethereum", "eurc"):
649
+ print("EURC is available on Ethereum!")
650
+
651
+ # Get token configuration
652
+ config = get_token_config("ethereum", "eurc")
653
+ if config:
654
+ print(f"EURC address: {config.address}")
655
+ print(f"Decimals: {config.decimals}")
656
+ print(f"EIP-712 name: {config.name}")
657
+ print(f"EIP-712 version: {config.version}")
658
+
659
+ # Find all networks that support a token
660
+ networks = get_networks_by_token("gho")
661
+ for network in networks:
662
+ print(f"GHO available on: {network.display_name}")
663
+ # Output: GHO available on: Ethereum, Base, Arbitrum One
664
+ ```
665
+
666
+ ### Token Configuration
667
+
668
+ Each token has specific EIP-712 domain parameters required for signing:
669
+
670
+ ```python
671
+ from uvd_x402_sdk import TokenConfig, get_token_config
672
+
673
+ # TokenConfig structure
674
+ # - address: Contract address
675
+ # - decimals: Token decimals (6 for most, 18 for GHO/crvUSD)
676
+ # - name: EIP-712 domain name (e.g., "USD Coin", "EURC", "Gho Token")
677
+ # - version: EIP-712 domain version
678
+
679
+ # Example: Get EURC config on Base
680
+ eurc = get_token_config("base", "eurc")
681
+ # TokenConfig(
682
+ # address="0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
683
+ # decimals=6,
684
+ # name="EURC",
685
+ # version="2"
686
+ # )
687
+
688
+ # Example: Get GHO config on Ethereum (note: 18 decimals)
689
+ gho = get_token_config("ethereum", "gho")
690
+ # TokenConfig(
691
+ # address="0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f",
692
+ # decimals=18,
693
+ # name="Gho Token",
694
+ # version="1"
695
+ # )
696
+ ```
697
+
698
+ ### Available Tokens
699
+
700
+ | Token | Description | Decimals | Issuer |
701
+ |-------|-------------|----------|--------|
702
+ | `usdc` | USD Coin | 6 | Circle |
703
+ | `eurc` | Euro Coin | 6 | Circle |
704
+ | `ausd` | Agora USD | 6 | Agora Finance |
705
+ | `pyusd` | PayPal USD | 6 | PayPal/Paxos |
706
+ | `gho` | GHO Stablecoin | 18 | Aave |
707
+ | `crvusd` | Curve USD | 18 | Curve Finance |
708
+
709
+ ---
710
+
613
711
  ## Error Handling
614
712
 
615
713
  ```python
@@ -655,7 +753,7 @@ except X402Error as e:
655
753
 
656
754
  ## How x402 Works
657
755
 
658
- The x402 protocol enables gasless USDC payments:
756
+ The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD, GHO, crvUSD):
659
757
 
660
758
  ```
661
759
  1. User Request --> Client sends request without payment
@@ -698,13 +796,14 @@ The facilitator (https://facilitator.ultravioletadao.xyz) handles all on-chain i
698
796
  ## Security
699
797
 
700
798
  - Users **NEVER** pay gas or submit transactions directly
701
- - **EVM**: Users sign EIP-712 structured messages only (no transaction broadcast)
799
+ - **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD, GHO, crvUSD)
702
800
  - **Solana/Fogo**: Users sign partial transactions (facilitator co-signs and submits)
703
801
  - **Stellar**: Users sign Soroban authorization entries only
704
802
  - **NEAR**: Users sign NEP-366 meta-transactions (DelegateAction)
705
803
  - The facilitator submits and pays for all on-chain transactions
706
804
  - All signatures include expiration timestamps (`validBefore`) for replay protection
707
805
  - Nonces prevent double-spending of authorizations
806
+ - Each token has verified contract addresses and EIP-712 domain parameters
708
807
 
709
808
  ---
710
809
 
@@ -782,6 +881,20 @@ MIT License - see LICENSE file.
782
881
 
783
882
  ## Changelog
784
883
 
884
+ ### v0.3.0 (2025-12-20)
885
+
886
+ - **Multi-Stablecoin Support**: Added support for 6 stablecoins on EVM chains
887
+ - USDC (all EVM chains)
888
+ - EURC (Ethereum, Base, Avalanche)
889
+ - AUSD (Ethereum, Arbitrum, Avalanche, Polygon, Monad)
890
+ - PYUSD (Ethereum)
891
+ - GHO (Ethereum, Base, Arbitrum)
892
+ - crvUSD (Ethereum, Arbitrum)
893
+ - Added `TokenType` literal type and `TokenConfig` dataclass
894
+ - Added token helper functions: `get_token_config()`, `get_supported_tokens()`, `is_token_supported()`, `get_networks_by_token()`
895
+ - Added `tokens` field to `NetworkConfig` for multi-token configurations
896
+ - Updated EVM network configurations with token contract addresses and EIP-712 domain parameters
897
+
785
898
  ### v0.2.2 (2025-12-16)
786
899
 
787
900
  - Added Security section to documentation
@@ -2,17 +2,18 @@
2
2
 
3
3
  Python SDK for integrating **x402 cryptocurrency payments** via the Ultravioleta DAO facilitator.
4
4
 
5
- Accept USDC payments across **14 blockchain networks** with a single integration. The SDK handles signature verification, on-chain settlement, and all the complexity of multi-chain payments.
5
+ Accept **gasless stablecoin payments** across **14 blockchain networks** with a single integration. The SDK handles signature verification, on-chain settlement, and all the complexity of multi-chain payments.
6
6
 
7
7
  ## Features
8
8
 
9
9
  - **14 Networks**: EVM chains (Base, Ethereum, Polygon, etc.), SVM chains (Solana, Fogo), NEAR, and Stellar
10
+ - **6 Stablecoins**: USDC, EURC, AUSD, PYUSD, GHO, crvUSD (EVM chains)
10
11
  - **x402 v1 & v2**: Full support for both protocol versions with auto-detection
11
12
  - **Framework Integrations**: Flask, FastAPI, Django, AWS Lambda
12
- - **Gasless Payments**: Users sign authorizations, facilitator pays all network fees
13
+ - **Gasless Payments**: Users sign EIP-712/EIP-3009 authorizations, facilitator pays all network fees
13
14
  - **Simple API**: Decorators and middleware for quick integration
14
15
  - **Type Safety**: Full Pydantic models and type hints
15
- - **Extensible**: Register custom networks easily
16
+ - **Extensible**: Register custom networks and tokens easily
16
17
 
17
18
  ## Quick Start (5 Lines)
18
19
 
@@ -44,6 +45,17 @@ print(f"Paid by {result.payer_address}, tx: {result.transaction_hash}")
44
45
  | NEAR | NEAR | - | `near:mainnet` | Active |
45
46
  | Stellar | Stellar | - | `stellar:pubnet` | Active |
46
47
 
48
+ ### Supported Tokens (EVM Chains)
49
+
50
+ | Token | Networks | Decimals |
51
+ |-------|----------|----------|
52
+ | USDC | All EVM chains | 6 |
53
+ | EURC | Ethereum, Base, Avalanche | 6 |
54
+ | AUSD | Ethereum, Arbitrum, Avalanche, Polygon, Monad | 6 |
55
+ | PYUSD | Ethereum | 6 |
56
+ | GHO | Ethereum, Base, Arbitrum | 18 |
57
+ | crvUSD | Ethereum, Arbitrum | 18 |
58
+
47
59
  ## Installation
48
60
 
49
61
  ```bash
@@ -561,6 +573,92 @@ config = X402Config(
561
573
 
562
574
  ---
563
575
 
576
+ ## Multi-Token Support
577
+
578
+ The SDK supports 6 stablecoins on EVM chains. Use the token helper functions to query and work with different tokens.
579
+
580
+ ### Querying Token Support
581
+
582
+ ```python
583
+ from uvd_x402_sdk import (
584
+ TokenType,
585
+ get_token_config,
586
+ get_supported_tokens,
587
+ is_token_supported,
588
+ get_networks_by_token,
589
+ )
590
+
591
+ # Check which tokens a network supports
592
+ tokens = get_supported_tokens("ethereum")
593
+ print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd', 'gho', 'crvusd']
594
+
595
+ tokens = get_supported_tokens("base")
596
+ print(tokens) # ['usdc', 'eurc', 'gho']
597
+
598
+ # Check if a specific token is supported
599
+ if is_token_supported("ethereum", "eurc"):
600
+ print("EURC is available on Ethereum!")
601
+
602
+ # Get token configuration
603
+ config = get_token_config("ethereum", "eurc")
604
+ if config:
605
+ print(f"EURC address: {config.address}")
606
+ print(f"Decimals: {config.decimals}")
607
+ print(f"EIP-712 name: {config.name}")
608
+ print(f"EIP-712 version: {config.version}")
609
+
610
+ # Find all networks that support a token
611
+ networks = get_networks_by_token("gho")
612
+ for network in networks:
613
+ print(f"GHO available on: {network.display_name}")
614
+ # Output: GHO available on: Ethereum, Base, Arbitrum One
615
+ ```
616
+
617
+ ### Token Configuration
618
+
619
+ Each token has specific EIP-712 domain parameters required for signing:
620
+
621
+ ```python
622
+ from uvd_x402_sdk import TokenConfig, get_token_config
623
+
624
+ # TokenConfig structure
625
+ # - address: Contract address
626
+ # - decimals: Token decimals (6 for most, 18 for GHO/crvUSD)
627
+ # - name: EIP-712 domain name (e.g., "USD Coin", "EURC", "Gho Token")
628
+ # - version: EIP-712 domain version
629
+
630
+ # Example: Get EURC config on Base
631
+ eurc = get_token_config("base", "eurc")
632
+ # TokenConfig(
633
+ # address="0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
634
+ # decimals=6,
635
+ # name="EURC",
636
+ # version="2"
637
+ # )
638
+
639
+ # Example: Get GHO config on Ethereum (note: 18 decimals)
640
+ gho = get_token_config("ethereum", "gho")
641
+ # TokenConfig(
642
+ # address="0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f",
643
+ # decimals=18,
644
+ # name="Gho Token",
645
+ # version="1"
646
+ # )
647
+ ```
648
+
649
+ ### Available Tokens
650
+
651
+ | Token | Description | Decimals | Issuer |
652
+ |-------|-------------|----------|--------|
653
+ | `usdc` | USD Coin | 6 | Circle |
654
+ | `eurc` | Euro Coin | 6 | Circle |
655
+ | `ausd` | Agora USD | 6 | Agora Finance |
656
+ | `pyusd` | PayPal USD | 6 | PayPal/Paxos |
657
+ | `gho` | GHO Stablecoin | 18 | Aave |
658
+ | `crvusd` | Curve USD | 18 | Curve Finance |
659
+
660
+ ---
661
+
564
662
  ## Error Handling
565
663
 
566
664
  ```python
@@ -606,7 +704,7 @@ except X402Error as e:
606
704
 
607
705
  ## How x402 Works
608
706
 
609
- The x402 protocol enables gasless USDC payments:
707
+ The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD, GHO, crvUSD):
610
708
 
611
709
  ```
612
710
  1. User Request --> Client sends request without payment
@@ -649,13 +747,14 @@ The facilitator (https://facilitator.ultravioletadao.xyz) handles all on-chain i
649
747
  ## Security
650
748
 
651
749
  - Users **NEVER** pay gas or submit transactions directly
652
- - **EVM**: Users sign EIP-712 structured messages only (no transaction broadcast)
750
+ - **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD, GHO, crvUSD)
653
751
  - **Solana/Fogo**: Users sign partial transactions (facilitator co-signs and submits)
654
752
  - **Stellar**: Users sign Soroban authorization entries only
655
753
  - **NEAR**: Users sign NEP-366 meta-transactions (DelegateAction)
656
754
  - The facilitator submits and pays for all on-chain transactions
657
755
  - All signatures include expiration timestamps (`validBefore`) for replay protection
658
756
  - Nonces prevent double-spending of authorizations
757
+ - Each token has verified contract addresses and EIP-712 domain parameters
659
758
 
660
759
  ---
661
760
 
@@ -733,6 +832,20 @@ MIT License - see LICENSE file.
733
832
 
734
833
  ## Changelog
735
834
 
835
+ ### v0.3.0 (2025-12-20)
836
+
837
+ - **Multi-Stablecoin Support**: Added support for 6 stablecoins on EVM chains
838
+ - USDC (all EVM chains)
839
+ - EURC (Ethereum, Base, Avalanche)
840
+ - AUSD (Ethereum, Arbitrum, Avalanche, Polygon, Monad)
841
+ - PYUSD (Ethereum)
842
+ - GHO (Ethereum, Base, Arbitrum)
843
+ - crvUSD (Ethereum, Arbitrum)
844
+ - Added `TokenType` literal type and `TokenConfig` dataclass
845
+ - Added token helper functions: `get_token_config()`, `get_supported_tokens()`, `is_token_supported()`, `get_networks_by_token()`
846
+ - Added `tokens` field to `NetworkConfig` for multi-token configurations
847
+ - Updated EVM network configurations with token contract addresses and EIP-712 domain parameters
848
+
736
849
  ### v0.2.2 (2025-12-16)
737
850
 
738
851
  - Added Security section to documentation
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "uvd-x402-sdk"
7
- version = "0.2.3"
8
- description = "Python SDK for integrating x402 payments via the Ultravioleta DAO facilitator"
7
+ version = "0.3.0"
8
+ description = "Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD, GHO, crvUSD)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
11
11
  authors = [
@@ -16,12 +16,17 @@ keywords = [
16
16
  "payments",
17
17
  "crypto",
18
18
  "usdc",
19
+ "eurc",
20
+ "stablecoin",
19
21
  "web3",
20
22
  "evm",
21
23
  "solana",
22
24
  "near",
23
25
  "stellar",
24
26
  "facilitator",
27
+ "gasless",
28
+ "eip-712",
29
+ "eip-3009",
25
30
  ]
26
31
  classifiers = [
27
32
  "Development Status :: 4 - Beta",
@@ -37,7 +37,7 @@ Supported Networks (14 total):
37
37
  - Stellar (1): Stellar
38
38
  """
39
39
 
40
- __version__ = "0.2.3"
40
+ __version__ = "0.3.0"
41
41
  __author__ = "Ultravioleta DAO"
42
42
 
43
43
  from uvd_x402_sdk.client import X402Client
@@ -83,6 +83,14 @@ from uvd_x402_sdk.networks import (
83
83
  get_supported_chain_ids,
84
84
  get_supported_network_names,
85
85
  NetworkType,
86
+ # Token types (multi-stablecoin support)
87
+ TokenType,
88
+ TokenConfig,
89
+ ALL_TOKEN_TYPES,
90
+ get_token_config,
91
+ get_supported_tokens,
92
+ is_token_supported,
93
+ get_networks_by_token,
86
94
  # CAIP-2 utilities (v2 support)
87
95
  parse_caip2_network,
88
96
  to_caip2_network,
@@ -151,6 +159,14 @@ __all__ = [
151
159
  "get_supported_chain_ids",
152
160
  "get_supported_network_names",
153
161
  "NetworkType",
162
+ # Token types (multi-stablecoin support)
163
+ "TokenType",
164
+ "TokenConfig",
165
+ "ALL_TOKEN_TYPES",
166
+ "get_token_config",
167
+ "get_supported_tokens",
168
+ "is_token_supported",
169
+ "get_networks_by_token",
154
170
  # CAIP-2 utilities
155
171
  "parse_caip2_network",
156
172
  "to_caip2_network",
@@ -11,12 +11,24 @@ The SDK supports 14 mainnet networks out of the box:
11
11
  - 1 NEAR: NEAR Protocol
12
12
  - 1 Stellar: Stellar
13
13
 
14
+ Multi-token support (EVM chains only):
15
+ - USDC: All chains
16
+ - EURC: Ethereum, Base, Avalanche
17
+ - AUSD: Ethereum, Arbitrum, Avalanche, Polygon, Monad
18
+ - PYUSD: Ethereum
19
+ - GHO: Ethereum, Base, Arbitrum
20
+ - crvUSD: Ethereum, Arbitrum
21
+
14
22
  You can register custom networks using `register_network()`.
15
23
  """
16
24
 
17
25
  from uvd_x402_sdk.networks.base import (
18
26
  NetworkConfig,
19
27
  NetworkType,
28
+ # Token types (multi-stablecoin support)
29
+ TokenType,
30
+ TokenConfig,
31
+ ALL_TOKEN_TYPES,
20
32
  get_network,
21
33
  get_network_by_chain_id,
22
34
  register_network,
@@ -24,6 +36,11 @@ from uvd_x402_sdk.networks.base import (
24
36
  get_supported_chain_ids,
25
37
  get_supported_network_names,
26
38
  SUPPORTED_NETWORKS,
39
+ # Token helper functions
40
+ get_token_config,
41
+ get_supported_tokens,
42
+ is_token_supported,
43
+ get_networks_by_token,
27
44
  # CAIP-2 utilities (x402 v2)
28
45
  parse_caip2_network,
29
46
  to_caip2_network,
@@ -38,6 +55,10 @@ __all__ = [
38
55
  # Core
39
56
  "NetworkConfig",
40
57
  "NetworkType",
58
+ # Token types (multi-stablecoin support)
59
+ "TokenType",
60
+ "TokenConfig",
61
+ "ALL_TOKEN_TYPES",
41
62
  # Registry functions
42
63
  "get_network",
43
64
  "get_network_by_chain_id",
@@ -46,6 +67,11 @@ __all__ = [
46
67
  "get_supported_chain_ids",
47
68
  "get_supported_network_names",
48
69
  "SUPPORTED_NETWORKS",
70
+ # Token helper functions
71
+ "get_token_config",
72
+ "get_supported_tokens",
73
+ "is_token_supported",
74
+ "get_networks_by_token",
49
75
  # CAIP-2 utilities (x402 v2)
50
76
  "parse_caip2_network",
51
77
  "to_caip2_network",
@@ -4,12 +4,48 @@ Base network configuration and registry.
4
4
  This module provides the foundation for network configuration, including:
5
5
  - NetworkConfig dataclass for defining network parameters
6
6
  - NetworkType enum for categorizing networks
7
+ - TokenType for multi-stablecoin support
7
8
  - Global registry for storing and retrieving network configurations
8
9
  """
9
10
 
10
11
  from dataclasses import dataclass, field
11
12
  from enum import Enum
12
- from typing import Dict, List, Optional, Any
13
+ from typing import Dict, List, Literal, Optional, Any
14
+
15
+
16
+ # =============================================================================
17
+ # Token Type Definitions (Multi-Stablecoin Support)
18
+ # =============================================================================
19
+
20
+ # Supported stablecoin token types
21
+ # - usdc: USD Coin (Circle) - 6 decimals
22
+ # - eurc: Euro Coin (Circle) - 6 decimals
23
+ # - ausd: Agora USD (Agora Finance) - 6 decimals
24
+ # - pyusd: PayPal USD (PayPal/Paxos) - 6 decimals
25
+ # - gho: GHO Stablecoin (Aave) - 18 decimals
26
+ # - crvusd: Curve USD (Curve Finance) - 18 decimals
27
+ TokenType = Literal["usdc", "eurc", "ausd", "pyusd", "gho", "crvusd"]
28
+
29
+ # All supported token types
30
+ ALL_TOKEN_TYPES: List[TokenType] = ["usdc", "eurc", "ausd", "pyusd", "gho", "crvusd"]
31
+
32
+
33
+ @dataclass
34
+ class TokenConfig:
35
+ """
36
+ Configuration for a stablecoin token on a specific network.
37
+
38
+ Attributes:
39
+ address: Contract address of the token
40
+ decimals: Number of decimals (6 for most stablecoins, 18 for GHO/crvUSD)
41
+ name: Token name for EIP-712 domain (e.g., "USD Coin" or "USDC")
42
+ version: Token version for EIP-712 domain
43
+ """
44
+
45
+ address: str
46
+ decimals: int
47
+ name: str
48
+ version: str
13
49
 
14
50
 
15
51
  class NetworkType(Enum):
@@ -53,6 +89,7 @@ class NetworkConfig:
53
89
  usdc_domain_version: EIP-712 domain version (EVM only)
54
90
  rpc_url: Default RPC endpoint
55
91
  enabled: Whether network is currently enabled
92
+ tokens: Multi-token configurations (EVM chains only, maps token type to config)
56
93
  extra_config: Additional network-specific configuration
57
94
  """
58
95
 
@@ -66,6 +103,7 @@ class NetworkConfig:
66
103
  usdc_domain_version: str = "2"
67
104
  rpc_url: str = ""
68
105
  enabled: bool = True
106
+ tokens: Dict[TokenType, TokenConfig] = field(default_factory=dict)
69
107
  extra_config: Dict[str, Any] = field(default_factory=dict)
70
108
 
71
109
  def __post_init__(self) -> None:
@@ -209,6 +247,119 @@ def get_supported_network_names() -> List[str]:
209
247
  SUPPORTED_NETWORKS = _NETWORK_REGISTRY
210
248
 
211
249
 
250
+ # =============================================================================
251
+ # Token Helper Functions (Multi-Stablecoin Support)
252
+ # =============================================================================
253
+
254
+
255
+ def get_token_config(network_name: str, token_type: TokenType = "usdc") -> Optional[TokenConfig]:
256
+ """
257
+ Get token configuration for a specific network and token type.
258
+
259
+ Args:
260
+ network_name: Network identifier (e.g., 'base', 'ethereum')
261
+ token_type: Token type (defaults to 'usdc')
262
+
263
+ Returns:
264
+ TokenConfig if the token is supported on this network, None otherwise
265
+
266
+ Example:
267
+ >>> config = get_token_config('ethereum', 'eurc')
268
+ >>> if config:
269
+ ... print(f"EURC address: {config.address}")
270
+ """
271
+ network = get_network(network_name)
272
+ if not network:
273
+ return None
274
+
275
+ # Check tokens dict first (multi-token support)
276
+ if token_type in network.tokens:
277
+ return network.tokens[token_type]
278
+
279
+ # Fall back to USDC config for backward compatibility
280
+ if token_type == "usdc":
281
+ return TokenConfig(
282
+ address=network.usdc_address,
283
+ decimals=network.usdc_decimals,
284
+ name=network.usdc_domain_name,
285
+ version=network.usdc_domain_version,
286
+ )
287
+
288
+ return None
289
+
290
+
291
+ def get_supported_tokens(network_name: str) -> List[TokenType]:
292
+ """
293
+ Get list of supported token types for a network.
294
+
295
+ Args:
296
+ network_name: Network identifier
297
+
298
+ Returns:
299
+ List of supported TokenType values
300
+
301
+ Example:
302
+ >>> tokens = get_supported_tokens('ethereum')
303
+ >>> print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd', 'gho', 'crvusd']
304
+ """
305
+ network = get_network(network_name)
306
+ if not network:
307
+ return []
308
+
309
+ # Get tokens from the tokens dict
310
+ tokens: List[TokenType] = list(network.tokens.keys())
311
+
312
+ # Always include 'usdc' if the network has USDC configured
313
+ if "usdc" not in tokens and network.usdc_address:
314
+ tokens.insert(0, "usdc")
315
+
316
+ return tokens
317
+
318
+
319
+ def is_token_supported(network_name: str, token_type: TokenType) -> bool:
320
+ """
321
+ Check if a specific token is supported on a network.
322
+
323
+ Args:
324
+ network_name: Network identifier
325
+ token_type: Token type to check
326
+
327
+ Returns:
328
+ True if token is supported, False otherwise
329
+
330
+ Example:
331
+ >>> is_token_supported('ethereum', 'eurc')
332
+ True
333
+ >>> is_token_supported('celo', 'eurc')
334
+ False
335
+ """
336
+ return get_token_config(network_name, token_type) is not None
337
+
338
+
339
+ def get_networks_by_token(token_type: TokenType) -> List[NetworkConfig]:
340
+ """
341
+ Get all networks that support a specific token type.
342
+
343
+ Args:
344
+ token_type: Token type to search for
345
+
346
+ Returns:
347
+ List of NetworkConfig instances that support the token
348
+
349
+ Example:
350
+ >>> networks = get_networks_by_token('eurc')
351
+ >>> for n in networks:
352
+ ... print(n.name) # ethereum, base, avalanche
353
+ """
354
+ result = []
355
+ for network in _NETWORK_REGISTRY.values():
356
+ if not network.enabled:
357
+ continue
358
+ if is_token_supported(network.name, token_type):
359
+ result.append(network)
360
+ return result
361
+
362
+
212
363
  # =============================================================================
213
364
  # CAIP-2 Utilities (x402 v2 support)
214
365
  # =============================================================================
@@ -7,11 +7,20 @@ Each chain uses ERC-3009 TransferWithAuthorization for USDC transfers.
7
7
  Important EIP-712 domain considerations:
8
8
  - Most chains use 'USD Coin' as the domain name
9
9
  - Celo, HyperEVM, Unichain, Monad use 'USDC' as the domain name
10
+
11
+ Multi-token support:
12
+ - USDC: All chains (6 decimals)
13
+ - EURC: Ethereum, Base, Avalanche (6 decimals)
14
+ - AUSD: Ethereum, Arbitrum, Avalanche, Polygon, Monad (6 decimals)
15
+ - PYUSD: Ethereum (6 decimals)
16
+ - GHO: Ethereum, Base, Arbitrum (18 decimals)
17
+ - crvUSD: Ethereum, Arbitrum (18 decimals)
10
18
  """
11
19
 
12
20
  from uvd_x402_sdk.networks.base import (
13
21
  NetworkConfig,
14
22
  NetworkType,
23
+ TokenConfig,
15
24
  register_network,
16
25
  )
17
26
 
@@ -19,7 +28,7 @@ from uvd_x402_sdk.networks.base import (
19
28
  # EVM Networks Configuration
20
29
  # =============================================================================
21
30
 
22
- # Base (Layer 2)
31
+ # Base (Layer 2) - supports USDC, EURC, GHO
23
32
  BASE = NetworkConfig(
24
33
  name="base",
25
34
  display_name="Base",
@@ -31,9 +40,29 @@ BASE = NetworkConfig(
31
40
  usdc_domain_version="2",
32
41
  rpc_url="https://mainnet.base.org",
33
42
  enabled=True,
43
+ tokens={
44
+ "usdc": TokenConfig(
45
+ address="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
46
+ decimals=6,
47
+ name="USD Coin",
48
+ version="2",
49
+ ),
50
+ "eurc": TokenConfig(
51
+ address="0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
52
+ decimals=6,
53
+ name="EURC",
54
+ version="2",
55
+ ),
56
+ "gho": TokenConfig(
57
+ address="0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee",
58
+ decimals=18,
59
+ name="Gho Token",
60
+ version="1",
61
+ ),
62
+ },
34
63
  )
35
64
 
36
- # Ethereum Mainnet
65
+ # Ethereum Mainnet (supports all 6 stablecoins)
37
66
  ETHEREUM = NetworkConfig(
38
67
  name="ethereum",
39
68
  display_name="Ethereum",
@@ -45,9 +74,47 @@ ETHEREUM = NetworkConfig(
45
74
  usdc_domain_version="2",
46
75
  rpc_url="https://eth.llamarpc.com",
47
76
  enabled=True,
77
+ tokens={
78
+ "usdc": TokenConfig(
79
+ address="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
80
+ decimals=6,
81
+ name="USD Coin",
82
+ version="2",
83
+ ),
84
+ "eurc": TokenConfig(
85
+ address="0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
86
+ decimals=6,
87
+ name="EURC",
88
+ version="2",
89
+ ),
90
+ "ausd": TokenConfig(
91
+ address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
92
+ decimals=6,
93
+ name="Agora USD",
94
+ version="1",
95
+ ),
96
+ "pyusd": TokenConfig(
97
+ address="0x6c3ea9036406852006290770BEdFcAbA0e23A0e8",
98
+ decimals=6,
99
+ name="PayPal USD",
100
+ version="1",
101
+ ),
102
+ "gho": TokenConfig(
103
+ address="0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f",
104
+ decimals=18,
105
+ name="Gho Token",
106
+ version="1",
107
+ ),
108
+ "crvusd": TokenConfig(
109
+ address="0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
110
+ decimals=18,
111
+ name="Curve.Fi USD Stablecoin",
112
+ version="1",
113
+ ),
114
+ },
48
115
  )
49
116
 
50
- # Polygon (PoS)
117
+ # Polygon (PoS) - supports USDC, AUSD
51
118
  POLYGON = NetworkConfig(
52
119
  name="polygon",
53
120
  display_name="Polygon",
@@ -59,9 +126,23 @@ POLYGON = NetworkConfig(
59
126
  usdc_domain_version="2",
60
127
  rpc_url="https://polygon-rpc.com",
61
128
  enabled=True,
129
+ tokens={
130
+ "usdc": TokenConfig(
131
+ address="0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
132
+ decimals=6,
133
+ name="USD Coin",
134
+ version="2",
135
+ ),
136
+ "ausd": TokenConfig(
137
+ address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
138
+ decimals=6,
139
+ name="Agora USD",
140
+ version="1",
141
+ ),
142
+ },
62
143
  )
63
144
 
64
- # Arbitrum One
145
+ # Arbitrum One - supports USDC, AUSD, GHO, crvUSD
65
146
  ARBITRUM = NetworkConfig(
66
147
  name="arbitrum",
67
148
  display_name="Arbitrum One",
@@ -73,6 +154,32 @@ ARBITRUM = NetworkConfig(
73
154
  usdc_domain_version="2",
74
155
  rpc_url="https://arb1.arbitrum.io/rpc",
75
156
  enabled=True,
157
+ tokens={
158
+ "usdc": TokenConfig(
159
+ address="0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
160
+ decimals=6,
161
+ name="USD Coin",
162
+ version="2",
163
+ ),
164
+ "ausd": TokenConfig(
165
+ address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
166
+ decimals=6,
167
+ name="Agora USD",
168
+ version="1",
169
+ ),
170
+ "gho": TokenConfig(
171
+ address="0x7dfF72693f6A4149b17e7C6314655f6A9F7c8B33",
172
+ decimals=18,
173
+ name="Gho Token",
174
+ version="1",
175
+ ),
176
+ "crvusd": TokenConfig(
177
+ address="0x498Bf2B1e120FeD3ad3D42EA2165E9b73f99C1e5",
178
+ decimals=18,
179
+ name="Curve.Fi USD Stablecoin",
180
+ version="1",
181
+ ),
182
+ },
76
183
  )
77
184
 
78
185
  # Optimism
@@ -89,7 +196,7 @@ OPTIMISM = NetworkConfig(
89
196
  enabled=True,
90
197
  )
91
198
 
92
- # Avalanche C-Chain
199
+ # Avalanche C-Chain - supports USDC, EURC, AUSD
93
200
  AVALANCHE = NetworkConfig(
94
201
  name="avalanche",
95
202
  display_name="Avalanche C-Chain",
@@ -101,6 +208,26 @@ AVALANCHE = NetworkConfig(
101
208
  usdc_domain_version="2",
102
209
  rpc_url="https://avalanche-c-chain-rpc.publicnode.com",
103
210
  enabled=True,
211
+ tokens={
212
+ "usdc": TokenConfig(
213
+ address="0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
214
+ decimals=6,
215
+ name="USD Coin",
216
+ version="2",
217
+ ),
218
+ "eurc": TokenConfig(
219
+ address="0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD",
220
+ decimals=6,
221
+ name="EURC",
222
+ version="2",
223
+ ),
224
+ "ausd": TokenConfig(
225
+ address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
226
+ decimals=6,
227
+ name="Agora USD",
228
+ version="1",
229
+ ),
230
+ },
104
231
  )
105
232
 
106
233
  # Celo
@@ -148,7 +275,7 @@ UNICHAIN = NetworkConfig(
148
275
  enabled=True,
149
276
  )
150
277
 
151
- # Monad
278
+ # Monad - supports USDC, AUSD
152
279
  # NOTE: Monad uses 'USDC' (not 'USD Coin') for EIP-712 domain name
153
280
  MONAD = NetworkConfig(
154
281
  name="monad",
@@ -161,6 +288,20 @@ MONAD = NetworkConfig(
161
288
  usdc_domain_version="2",
162
289
  rpc_url="https://rpc.monad.xyz",
163
290
  enabled=True,
291
+ tokens={
292
+ "usdc": TokenConfig(
293
+ address="0x754704bc059f8c67012fed69bc8a327a5aafb603",
294
+ decimals=6,
295
+ name="USDC",
296
+ version="2",
297
+ ),
298
+ "ausd": TokenConfig(
299
+ address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
300
+ decimals=6,
301
+ name="Agora USD",
302
+ version="1",
303
+ ),
304
+ },
164
305
  )
165
306
 
166
307
  # =============================================================================
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uvd-x402-sdk
3
- Version: 0.2.3
4
- Summary: Python SDK for integrating x402 payments via the Ultravioleta DAO facilitator
3
+ Version: 0.3.0
4
+ Summary: Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD, GHO, crvUSD)
5
5
  Author-email: Ultravioleta DAO <dev@ultravioletadao.xyz>
6
6
  Project-URL: Homepage, https://github.com/UltravioletaDAO/uvd-x402-sdk-python
7
7
  Project-URL: Documentation, https://docs.ultravioletadao.xyz/x402-sdk
8
8
  Project-URL: Repository, https://github.com/UltravioletaDAO/uvd-x402-sdk-python
9
9
  Project-URL: Issues, https://github.com/UltravioletaDAO/uvd-x402-sdk-python/issues
10
- Keywords: x402,payments,crypto,usdc,web3,evm,solana,near,stellar,facilitator
10
+ Keywords: x402,payments,crypto,usdc,eurc,stablecoin,web3,evm,solana,near,stellar,facilitator,gasless,eip-712,eip-3009
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: License :: OSI Approved :: MIT License
@@ -51,17 +51,18 @@ Requires-Dist: httpx>=0.24.0; extra == "dev"
51
51
 
52
52
  Python SDK for integrating **x402 cryptocurrency payments** via the Ultravioleta DAO facilitator.
53
53
 
54
- Accept USDC payments across **14 blockchain networks** with a single integration. The SDK handles signature verification, on-chain settlement, and all the complexity of multi-chain payments.
54
+ Accept **gasless stablecoin payments** across **14 blockchain networks** with a single integration. The SDK handles signature verification, on-chain settlement, and all the complexity of multi-chain payments.
55
55
 
56
56
  ## Features
57
57
 
58
58
  - **14 Networks**: EVM chains (Base, Ethereum, Polygon, etc.), SVM chains (Solana, Fogo), NEAR, and Stellar
59
+ - **6 Stablecoins**: USDC, EURC, AUSD, PYUSD, GHO, crvUSD (EVM chains)
59
60
  - **x402 v1 & v2**: Full support for both protocol versions with auto-detection
60
61
  - **Framework Integrations**: Flask, FastAPI, Django, AWS Lambda
61
- - **Gasless Payments**: Users sign authorizations, facilitator pays all network fees
62
+ - **Gasless Payments**: Users sign EIP-712/EIP-3009 authorizations, facilitator pays all network fees
62
63
  - **Simple API**: Decorators and middleware for quick integration
63
64
  - **Type Safety**: Full Pydantic models and type hints
64
- - **Extensible**: Register custom networks easily
65
+ - **Extensible**: Register custom networks and tokens easily
65
66
 
66
67
  ## Quick Start (5 Lines)
67
68
 
@@ -93,6 +94,17 @@ print(f"Paid by {result.payer_address}, tx: {result.transaction_hash}")
93
94
  | NEAR | NEAR | - | `near:mainnet` | Active |
94
95
  | Stellar | Stellar | - | `stellar:pubnet` | Active |
95
96
 
97
+ ### Supported Tokens (EVM Chains)
98
+
99
+ | Token | Networks | Decimals |
100
+ |-------|----------|----------|
101
+ | USDC | All EVM chains | 6 |
102
+ | EURC | Ethereum, Base, Avalanche | 6 |
103
+ | AUSD | Ethereum, Arbitrum, Avalanche, Polygon, Monad | 6 |
104
+ | PYUSD | Ethereum | 6 |
105
+ | GHO | Ethereum, Base, Arbitrum | 18 |
106
+ | crvUSD | Ethereum, Arbitrum | 18 |
107
+
96
108
  ## Installation
97
109
 
98
110
  ```bash
@@ -610,6 +622,92 @@ config = X402Config(
610
622
 
611
623
  ---
612
624
 
625
+ ## Multi-Token Support
626
+
627
+ The SDK supports 6 stablecoins on EVM chains. Use the token helper functions to query and work with different tokens.
628
+
629
+ ### Querying Token Support
630
+
631
+ ```python
632
+ from uvd_x402_sdk import (
633
+ TokenType,
634
+ get_token_config,
635
+ get_supported_tokens,
636
+ is_token_supported,
637
+ get_networks_by_token,
638
+ )
639
+
640
+ # Check which tokens a network supports
641
+ tokens = get_supported_tokens("ethereum")
642
+ print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd', 'gho', 'crvusd']
643
+
644
+ tokens = get_supported_tokens("base")
645
+ print(tokens) # ['usdc', 'eurc', 'gho']
646
+
647
+ # Check if a specific token is supported
648
+ if is_token_supported("ethereum", "eurc"):
649
+ print("EURC is available on Ethereum!")
650
+
651
+ # Get token configuration
652
+ config = get_token_config("ethereum", "eurc")
653
+ if config:
654
+ print(f"EURC address: {config.address}")
655
+ print(f"Decimals: {config.decimals}")
656
+ print(f"EIP-712 name: {config.name}")
657
+ print(f"EIP-712 version: {config.version}")
658
+
659
+ # Find all networks that support a token
660
+ networks = get_networks_by_token("gho")
661
+ for network in networks:
662
+ print(f"GHO available on: {network.display_name}")
663
+ # Output: GHO available on: Ethereum, Base, Arbitrum One
664
+ ```
665
+
666
+ ### Token Configuration
667
+
668
+ Each token has specific EIP-712 domain parameters required for signing:
669
+
670
+ ```python
671
+ from uvd_x402_sdk import TokenConfig, get_token_config
672
+
673
+ # TokenConfig structure
674
+ # - address: Contract address
675
+ # - decimals: Token decimals (6 for most, 18 for GHO/crvUSD)
676
+ # - name: EIP-712 domain name (e.g., "USD Coin", "EURC", "Gho Token")
677
+ # - version: EIP-712 domain version
678
+
679
+ # Example: Get EURC config on Base
680
+ eurc = get_token_config("base", "eurc")
681
+ # TokenConfig(
682
+ # address="0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
683
+ # decimals=6,
684
+ # name="EURC",
685
+ # version="2"
686
+ # )
687
+
688
+ # Example: Get GHO config on Ethereum (note: 18 decimals)
689
+ gho = get_token_config("ethereum", "gho")
690
+ # TokenConfig(
691
+ # address="0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f",
692
+ # decimals=18,
693
+ # name="Gho Token",
694
+ # version="1"
695
+ # )
696
+ ```
697
+
698
+ ### Available Tokens
699
+
700
+ | Token | Description | Decimals | Issuer |
701
+ |-------|-------------|----------|--------|
702
+ | `usdc` | USD Coin | 6 | Circle |
703
+ | `eurc` | Euro Coin | 6 | Circle |
704
+ | `ausd` | Agora USD | 6 | Agora Finance |
705
+ | `pyusd` | PayPal USD | 6 | PayPal/Paxos |
706
+ | `gho` | GHO Stablecoin | 18 | Aave |
707
+ | `crvusd` | Curve USD | 18 | Curve Finance |
708
+
709
+ ---
710
+
613
711
  ## Error Handling
614
712
 
615
713
  ```python
@@ -655,7 +753,7 @@ except X402Error as e:
655
753
 
656
754
  ## How x402 Works
657
755
 
658
- The x402 protocol enables gasless USDC payments:
756
+ The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD, GHO, crvUSD):
659
757
 
660
758
  ```
661
759
  1. User Request --> Client sends request without payment
@@ -698,13 +796,14 @@ The facilitator (https://facilitator.ultravioletadao.xyz) handles all on-chain i
698
796
  ## Security
699
797
 
700
798
  - Users **NEVER** pay gas or submit transactions directly
701
- - **EVM**: Users sign EIP-712 structured messages only (no transaction broadcast)
799
+ - **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD, GHO, crvUSD)
702
800
  - **Solana/Fogo**: Users sign partial transactions (facilitator co-signs and submits)
703
801
  - **Stellar**: Users sign Soroban authorization entries only
704
802
  - **NEAR**: Users sign NEP-366 meta-transactions (DelegateAction)
705
803
  - The facilitator submits and pays for all on-chain transactions
706
804
  - All signatures include expiration timestamps (`validBefore`) for replay protection
707
805
  - Nonces prevent double-spending of authorizations
806
+ - Each token has verified contract addresses and EIP-712 domain parameters
708
807
 
709
808
  ---
710
809
 
@@ -782,6 +881,20 @@ MIT License - see LICENSE file.
782
881
 
783
882
  ## Changelog
784
883
 
884
+ ### v0.3.0 (2025-12-20)
885
+
886
+ - **Multi-Stablecoin Support**: Added support for 6 stablecoins on EVM chains
887
+ - USDC (all EVM chains)
888
+ - EURC (Ethereum, Base, Avalanche)
889
+ - AUSD (Ethereum, Arbitrum, Avalanche, Polygon, Monad)
890
+ - PYUSD (Ethereum)
891
+ - GHO (Ethereum, Base, Arbitrum)
892
+ - crvUSD (Ethereum, Arbitrum)
893
+ - Added `TokenType` literal type and `TokenConfig` dataclass
894
+ - Added token helper functions: `get_token_config()`, `get_supported_tokens()`, `is_token_supported()`, `get_networks_by_token()`
895
+ - Added `tokens` field to `NetworkConfig` for multi-token configurations
896
+ - Updated EVM network configurations with token contract addresses and EIP-712 domain parameters
897
+
785
898
  ### v0.2.2 (2025-12-16)
786
899
 
787
900
  - Added Security section to documentation
File without changes
File without changes