uvd-x402-sdk 0.3.0__tar.gz → 0.3.1__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.
- {uvd_x402_sdk-0.3.0/src/uvd_x402_sdk.egg-info → uvd_x402_sdk-0.3.1}/PKG-INFO +22 -23
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/README.md +20 -21
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/pyproject.toml +2 -2
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/__init__.py +1 -1
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/networks/__init__.py +0 -2
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/networks/base.py +4 -6
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/networks/evm.py +3 -35
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1/src/uvd_x402_sdk.egg-info}/PKG-INFO +22 -23
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/LICENSE +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/setup.cfg +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/client.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/config.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/decorators.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/exceptions.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/__init__.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/django_integration.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/fastapi_integration.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/flask_integration.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/lambda_integration.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/models.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/networks/near.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/networks/solana.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/networks/stellar.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/response.py +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk.egg-info/SOURCES.txt +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk.egg-info/dependency_links.txt +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk.egg-info/requires.txt +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk.egg-info/top_level.txt +0 -0
- {uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/tests/test_client.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: uvd-x402-sdk
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD)
|
|
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
|
|
@@ -56,7 +56,7 @@ Accept **gasless stablecoin payments** across **14 blockchain networks** with a
|
|
|
56
56
|
## Features
|
|
57
57
|
|
|
58
58
|
- **14 Networks**: EVM chains (Base, Ethereum, Polygon, etc.), SVM chains (Solana, Fogo), NEAR, and Stellar
|
|
59
|
-
- **
|
|
59
|
+
- **4 Stablecoins**: USDC, EURC, AUSD, PYUSD (EVM chains)
|
|
60
60
|
- **x402 v1 & v2**: Full support for both protocol versions with auto-detection
|
|
61
61
|
- **Framework Integrations**: Flask, FastAPI, Django, AWS Lambda
|
|
62
62
|
- **Gasless Payments**: Users sign EIP-712/EIP-3009 authorizations, facilitator pays all network fees
|
|
@@ -102,8 +102,6 @@ print(f"Paid by {result.payer_address}, tx: {result.transaction_hash}")
|
|
|
102
102
|
| EURC | Ethereum, Base, Avalanche | 6 |
|
|
103
103
|
| AUSD | Ethereum, Arbitrum, Avalanche, Polygon, Monad | 6 |
|
|
104
104
|
| PYUSD | Ethereum | 6 |
|
|
105
|
-
| GHO | Ethereum, Base, Arbitrum | 18 |
|
|
106
|
-
| crvUSD | Ethereum, Arbitrum | 18 |
|
|
107
105
|
|
|
108
106
|
## Installation
|
|
109
107
|
|
|
@@ -639,10 +637,10 @@ from uvd_x402_sdk import (
|
|
|
639
637
|
|
|
640
638
|
# Check which tokens a network supports
|
|
641
639
|
tokens = get_supported_tokens("ethereum")
|
|
642
|
-
print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd'
|
|
640
|
+
print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd']
|
|
643
641
|
|
|
644
642
|
tokens = get_supported_tokens("base")
|
|
645
|
-
print(tokens) # ['usdc', 'eurc'
|
|
643
|
+
print(tokens) # ['usdc', 'eurc']
|
|
646
644
|
|
|
647
645
|
# Check if a specific token is supported
|
|
648
646
|
if is_token_supported("ethereum", "eurc"):
|
|
@@ -657,10 +655,10 @@ if config:
|
|
|
657
655
|
print(f"EIP-712 version: {config.version}")
|
|
658
656
|
|
|
659
657
|
# Find all networks that support a token
|
|
660
|
-
networks = get_networks_by_token("
|
|
658
|
+
networks = get_networks_by_token("eurc")
|
|
661
659
|
for network in networks:
|
|
662
|
-
print(f"
|
|
663
|
-
# Output:
|
|
660
|
+
print(f"EURC available on: {network.display_name}")
|
|
661
|
+
# Output: EURC available on: Ethereum, Base, Avalanche C-Chain
|
|
664
662
|
```
|
|
665
663
|
|
|
666
664
|
### Token Configuration
|
|
@@ -672,7 +670,7 @@ from uvd_x402_sdk import TokenConfig, get_token_config
|
|
|
672
670
|
|
|
673
671
|
# TokenConfig structure
|
|
674
672
|
# - address: Contract address
|
|
675
|
-
# - decimals: Token decimals (6 for
|
|
673
|
+
# - decimals: Token decimals (6 for all supported stablecoins)
|
|
676
674
|
# - name: EIP-712 domain name (e.g., "USD Coin", "EURC", "Gho Token")
|
|
677
675
|
# - version: EIP-712 domain version
|
|
678
676
|
|
|
@@ -685,12 +683,12 @@ eurc = get_token_config("base", "eurc")
|
|
|
685
683
|
# version="2"
|
|
686
684
|
# )
|
|
687
685
|
|
|
688
|
-
# Example: Get
|
|
689
|
-
|
|
686
|
+
# Example: Get PYUSD config on Ethereum
|
|
687
|
+
pyusd = get_token_config("ethereum", "pyusd")
|
|
690
688
|
# TokenConfig(
|
|
691
|
-
# address="
|
|
692
|
-
# decimals=
|
|
693
|
-
# name="
|
|
689
|
+
# address="0x6c3ea9036406852006290770BEdFcAbA0e23A0e8",
|
|
690
|
+
# decimals=6,
|
|
691
|
+
# name="PayPal USD",
|
|
694
692
|
# version="1"
|
|
695
693
|
# )
|
|
696
694
|
```
|
|
@@ -703,8 +701,6 @@ gho = get_token_config("ethereum", "gho")
|
|
|
703
701
|
| `eurc` | Euro Coin | 6 | Circle |
|
|
704
702
|
| `ausd` | Agora USD | 6 | Agora Finance |
|
|
705
703
|
| `pyusd` | PayPal USD | 6 | PayPal/Paxos |
|
|
706
|
-
| `gho` | GHO Stablecoin | 18 | Aave |
|
|
707
|
-
| `crvusd` | Curve USD | 18 | Curve Finance |
|
|
708
704
|
|
|
709
705
|
---
|
|
710
706
|
|
|
@@ -753,7 +749,7 @@ except X402Error as e:
|
|
|
753
749
|
|
|
754
750
|
## How x402 Works
|
|
755
751
|
|
|
756
|
-
The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD
|
|
752
|
+
The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD):
|
|
757
753
|
|
|
758
754
|
```
|
|
759
755
|
1. User Request --> Client sends request without payment
|
|
@@ -796,7 +792,7 @@ The facilitator (https://facilitator.ultravioletadao.xyz) handles all on-chain i
|
|
|
796
792
|
## Security
|
|
797
793
|
|
|
798
794
|
- Users **NEVER** pay gas or submit transactions directly
|
|
799
|
-
- **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD
|
|
795
|
+
- **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD)
|
|
800
796
|
- **Solana/Fogo**: Users sign partial transactions (facilitator co-signs and submits)
|
|
801
797
|
- **Stellar**: Users sign Soroban authorization entries only
|
|
802
798
|
- **NEAR**: Users sign NEP-366 meta-transactions (DelegateAction)
|
|
@@ -881,15 +877,18 @@ MIT License - see LICENSE file.
|
|
|
881
877
|
|
|
882
878
|
## Changelog
|
|
883
879
|
|
|
880
|
+
### v0.3.1 (2025-12-21)
|
|
881
|
+
|
|
882
|
+
- Removed GHO and crvUSD token support (not EIP-3009 compatible)
|
|
883
|
+
- SDK now supports 4 stablecoins: USDC, EURC, AUSD, PYUSD
|
|
884
|
+
|
|
884
885
|
### v0.3.0 (2025-12-20)
|
|
885
886
|
|
|
886
|
-
- **Multi-Stablecoin Support**: Added support for
|
|
887
|
+
- **Multi-Stablecoin Support**: Added support for 4 stablecoins on EVM chains
|
|
887
888
|
- USDC (all EVM chains)
|
|
888
889
|
- EURC (Ethereum, Base, Avalanche)
|
|
889
890
|
- AUSD (Ethereum, Arbitrum, Avalanche, Polygon, Monad)
|
|
890
891
|
- PYUSD (Ethereum)
|
|
891
|
-
- GHO (Ethereum, Base, Arbitrum)
|
|
892
|
-
- crvUSD (Ethereum, Arbitrum)
|
|
893
892
|
- Added `TokenType` literal type and `TokenConfig` dataclass
|
|
894
893
|
- Added token helper functions: `get_token_config()`, `get_supported_tokens()`, `is_token_supported()`, `get_networks_by_token()`
|
|
895
894
|
- Added `tokens` field to `NetworkConfig` for multi-token configurations
|
|
@@ -7,7 +7,7 @@ Accept **gasless stablecoin payments** across **14 blockchain networks** with a
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- **14 Networks**: EVM chains (Base, Ethereum, Polygon, etc.), SVM chains (Solana, Fogo), NEAR, and Stellar
|
|
10
|
-
- **
|
|
10
|
+
- **4 Stablecoins**: USDC, EURC, AUSD, PYUSD (EVM chains)
|
|
11
11
|
- **x402 v1 & v2**: Full support for both protocol versions with auto-detection
|
|
12
12
|
- **Framework Integrations**: Flask, FastAPI, Django, AWS Lambda
|
|
13
13
|
- **Gasless Payments**: Users sign EIP-712/EIP-3009 authorizations, facilitator pays all network fees
|
|
@@ -53,8 +53,6 @@ print(f"Paid by {result.payer_address}, tx: {result.transaction_hash}")
|
|
|
53
53
|
| EURC | Ethereum, Base, Avalanche | 6 |
|
|
54
54
|
| AUSD | Ethereum, Arbitrum, Avalanche, Polygon, Monad | 6 |
|
|
55
55
|
| PYUSD | Ethereum | 6 |
|
|
56
|
-
| GHO | Ethereum, Base, Arbitrum | 18 |
|
|
57
|
-
| crvUSD | Ethereum, Arbitrum | 18 |
|
|
58
56
|
|
|
59
57
|
## Installation
|
|
60
58
|
|
|
@@ -590,10 +588,10 @@ from uvd_x402_sdk import (
|
|
|
590
588
|
|
|
591
589
|
# Check which tokens a network supports
|
|
592
590
|
tokens = get_supported_tokens("ethereum")
|
|
593
|
-
print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd'
|
|
591
|
+
print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd']
|
|
594
592
|
|
|
595
593
|
tokens = get_supported_tokens("base")
|
|
596
|
-
print(tokens) # ['usdc', 'eurc'
|
|
594
|
+
print(tokens) # ['usdc', 'eurc']
|
|
597
595
|
|
|
598
596
|
# Check if a specific token is supported
|
|
599
597
|
if is_token_supported("ethereum", "eurc"):
|
|
@@ -608,10 +606,10 @@ if config:
|
|
|
608
606
|
print(f"EIP-712 version: {config.version}")
|
|
609
607
|
|
|
610
608
|
# Find all networks that support a token
|
|
611
|
-
networks = get_networks_by_token("
|
|
609
|
+
networks = get_networks_by_token("eurc")
|
|
612
610
|
for network in networks:
|
|
613
|
-
print(f"
|
|
614
|
-
# Output:
|
|
611
|
+
print(f"EURC available on: {network.display_name}")
|
|
612
|
+
# Output: EURC available on: Ethereum, Base, Avalanche C-Chain
|
|
615
613
|
```
|
|
616
614
|
|
|
617
615
|
### Token Configuration
|
|
@@ -623,7 +621,7 @@ from uvd_x402_sdk import TokenConfig, get_token_config
|
|
|
623
621
|
|
|
624
622
|
# TokenConfig structure
|
|
625
623
|
# - address: Contract address
|
|
626
|
-
# - decimals: Token decimals (6 for
|
|
624
|
+
# - decimals: Token decimals (6 for all supported stablecoins)
|
|
627
625
|
# - name: EIP-712 domain name (e.g., "USD Coin", "EURC", "Gho Token")
|
|
628
626
|
# - version: EIP-712 domain version
|
|
629
627
|
|
|
@@ -636,12 +634,12 @@ eurc = get_token_config("base", "eurc")
|
|
|
636
634
|
# version="2"
|
|
637
635
|
# )
|
|
638
636
|
|
|
639
|
-
# Example: Get
|
|
640
|
-
|
|
637
|
+
# Example: Get PYUSD config on Ethereum
|
|
638
|
+
pyusd = get_token_config("ethereum", "pyusd")
|
|
641
639
|
# TokenConfig(
|
|
642
|
-
# address="
|
|
643
|
-
# decimals=
|
|
644
|
-
# name="
|
|
640
|
+
# address="0x6c3ea9036406852006290770BEdFcAbA0e23A0e8",
|
|
641
|
+
# decimals=6,
|
|
642
|
+
# name="PayPal USD",
|
|
645
643
|
# version="1"
|
|
646
644
|
# )
|
|
647
645
|
```
|
|
@@ -654,8 +652,6 @@ gho = get_token_config("ethereum", "gho")
|
|
|
654
652
|
| `eurc` | Euro Coin | 6 | Circle |
|
|
655
653
|
| `ausd` | Agora USD | 6 | Agora Finance |
|
|
656
654
|
| `pyusd` | PayPal USD | 6 | PayPal/Paxos |
|
|
657
|
-
| `gho` | GHO Stablecoin | 18 | Aave |
|
|
658
|
-
| `crvusd` | Curve USD | 18 | Curve Finance |
|
|
659
655
|
|
|
660
656
|
---
|
|
661
657
|
|
|
@@ -704,7 +700,7 @@ except X402Error as e:
|
|
|
704
700
|
|
|
705
701
|
## How x402 Works
|
|
706
702
|
|
|
707
|
-
The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD
|
|
703
|
+
The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD):
|
|
708
704
|
|
|
709
705
|
```
|
|
710
706
|
1. User Request --> Client sends request without payment
|
|
@@ -747,7 +743,7 @@ The facilitator (https://facilitator.ultravioletadao.xyz) handles all on-chain i
|
|
|
747
743
|
## Security
|
|
748
744
|
|
|
749
745
|
- Users **NEVER** pay gas or submit transactions directly
|
|
750
|
-
- **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD
|
|
746
|
+
- **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD)
|
|
751
747
|
- **Solana/Fogo**: Users sign partial transactions (facilitator co-signs and submits)
|
|
752
748
|
- **Stellar**: Users sign Soroban authorization entries only
|
|
753
749
|
- **NEAR**: Users sign NEP-366 meta-transactions (DelegateAction)
|
|
@@ -832,15 +828,18 @@ MIT License - see LICENSE file.
|
|
|
832
828
|
|
|
833
829
|
## Changelog
|
|
834
830
|
|
|
831
|
+
### v0.3.1 (2025-12-21)
|
|
832
|
+
|
|
833
|
+
- Removed GHO and crvUSD token support (not EIP-3009 compatible)
|
|
834
|
+
- SDK now supports 4 stablecoins: USDC, EURC, AUSD, PYUSD
|
|
835
|
+
|
|
835
836
|
### v0.3.0 (2025-12-20)
|
|
836
837
|
|
|
837
|
-
- **Multi-Stablecoin Support**: Added support for
|
|
838
|
+
- **Multi-Stablecoin Support**: Added support for 4 stablecoins on EVM chains
|
|
838
839
|
- USDC (all EVM chains)
|
|
839
840
|
- EURC (Ethereum, Base, Avalanche)
|
|
840
841
|
- AUSD (Ethereum, Arbitrum, Avalanche, Polygon, Monad)
|
|
841
842
|
- PYUSD (Ethereum)
|
|
842
|
-
- GHO (Ethereum, Base, Arbitrum)
|
|
843
|
-
- crvUSD (Ethereum, Arbitrum)
|
|
844
843
|
- Added `TokenType` literal type and `TokenConfig` dataclass
|
|
845
844
|
- Added token helper functions: `get_token_config()`, `get_supported_tokens()`, `is_token_supported()`, `get_networks_by_token()`
|
|
846
845
|
- Added `tokens` field to `NetworkConfig` for multi-token configurations
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "uvd-x402-sdk"
|
|
7
|
-
version = "0.3.
|
|
8
|
-
description = "Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD
|
|
7
|
+
version = "0.3.1"
|
|
8
|
+
description = "Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
authors = [
|
|
@@ -16,8 +16,6 @@ Multi-token support (EVM chains only):
|
|
|
16
16
|
- EURC: Ethereum, Base, Avalanche
|
|
17
17
|
- AUSD: Ethereum, Arbitrum, Avalanche, Polygon, Monad
|
|
18
18
|
- PYUSD: Ethereum
|
|
19
|
-
- GHO: Ethereum, Base, Arbitrum
|
|
20
|
-
- crvUSD: Ethereum, Arbitrum
|
|
21
19
|
|
|
22
20
|
You can register custom networks using `register_network()`.
|
|
23
21
|
"""
|
|
@@ -22,12 +22,10 @@ from typing import Dict, List, Literal, Optional, Any
|
|
|
22
22
|
# - eurc: Euro Coin (Circle) - 6 decimals
|
|
23
23
|
# - ausd: Agora USD (Agora Finance) - 6 decimals
|
|
24
24
|
# - pyusd: PayPal USD (PayPal/Paxos) - 6 decimals
|
|
25
|
-
|
|
26
|
-
# - crvusd: Curve USD (Curve Finance) - 18 decimals
|
|
27
|
-
TokenType = Literal["usdc", "eurc", "ausd", "pyusd", "gho", "crvusd"]
|
|
25
|
+
TokenType = Literal["usdc", "eurc", "ausd", "pyusd"]
|
|
28
26
|
|
|
29
27
|
# All supported token types
|
|
30
|
-
ALL_TOKEN_TYPES: List[TokenType] = ["usdc", "eurc", "ausd", "pyusd"
|
|
28
|
+
ALL_TOKEN_TYPES: List[TokenType] = ["usdc", "eurc", "ausd", "pyusd"]
|
|
31
29
|
|
|
32
30
|
|
|
33
31
|
@dataclass
|
|
@@ -37,7 +35,7 @@ class TokenConfig:
|
|
|
37
35
|
|
|
38
36
|
Attributes:
|
|
39
37
|
address: Contract address of the token
|
|
40
|
-
decimals: Number of decimals (6 for
|
|
38
|
+
decimals: Number of decimals (6 for all supported stablecoins)
|
|
41
39
|
name: Token name for EIP-712 domain (e.g., "USD Coin" or "USDC")
|
|
42
40
|
version: Token version for EIP-712 domain
|
|
43
41
|
"""
|
|
@@ -300,7 +298,7 @@ def get_supported_tokens(network_name: str) -> List[TokenType]:
|
|
|
300
298
|
|
|
301
299
|
Example:
|
|
302
300
|
>>> tokens = get_supported_tokens('ethereum')
|
|
303
|
-
>>> print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd'
|
|
301
|
+
>>> print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd']
|
|
304
302
|
"""
|
|
305
303
|
network = get_network(network_name)
|
|
306
304
|
if not network:
|
|
@@ -13,8 +13,6 @@ Multi-token support:
|
|
|
13
13
|
- EURC: Ethereum, Base, Avalanche (6 decimals)
|
|
14
14
|
- AUSD: Ethereum, Arbitrum, Avalanche, Polygon, Monad (6 decimals)
|
|
15
15
|
- PYUSD: Ethereum (6 decimals)
|
|
16
|
-
- GHO: Ethereum, Base, Arbitrum (18 decimals)
|
|
17
|
-
- crvUSD: Ethereum, Arbitrum (18 decimals)
|
|
18
16
|
"""
|
|
19
17
|
|
|
20
18
|
from uvd_x402_sdk.networks.base import (
|
|
@@ -28,7 +26,7 @@ from uvd_x402_sdk.networks.base import (
|
|
|
28
26
|
# EVM Networks Configuration
|
|
29
27
|
# =============================================================================
|
|
30
28
|
|
|
31
|
-
# Base (Layer 2) - supports USDC, EURC
|
|
29
|
+
# Base (Layer 2) - supports USDC, EURC
|
|
32
30
|
BASE = NetworkConfig(
|
|
33
31
|
name="base",
|
|
34
32
|
display_name="Base",
|
|
@@ -53,16 +51,10 @@ BASE = NetworkConfig(
|
|
|
53
51
|
name="EURC",
|
|
54
52
|
version="2",
|
|
55
53
|
),
|
|
56
|
-
"gho": TokenConfig(
|
|
57
|
-
address="0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee",
|
|
58
|
-
decimals=18,
|
|
59
|
-
name="Gho Token",
|
|
60
|
-
version="1",
|
|
61
|
-
),
|
|
62
54
|
},
|
|
63
55
|
)
|
|
64
56
|
|
|
65
|
-
# Ethereum Mainnet
|
|
57
|
+
# Ethereum Mainnet - supports USDC, EURC, AUSD, PYUSD
|
|
66
58
|
ETHEREUM = NetworkConfig(
|
|
67
59
|
name="ethereum",
|
|
68
60
|
display_name="Ethereum",
|
|
@@ -99,18 +91,6 @@ ETHEREUM = NetworkConfig(
|
|
|
99
91
|
name="PayPal USD",
|
|
100
92
|
version="1",
|
|
101
93
|
),
|
|
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
94
|
},
|
|
115
95
|
)
|
|
116
96
|
|
|
@@ -142,7 +122,7 @@ POLYGON = NetworkConfig(
|
|
|
142
122
|
},
|
|
143
123
|
)
|
|
144
124
|
|
|
145
|
-
# Arbitrum One - supports USDC, AUSD
|
|
125
|
+
# Arbitrum One - supports USDC, AUSD
|
|
146
126
|
ARBITRUM = NetworkConfig(
|
|
147
127
|
name="arbitrum",
|
|
148
128
|
display_name="Arbitrum One",
|
|
@@ -167,18 +147,6 @@ ARBITRUM = NetworkConfig(
|
|
|
167
147
|
name="Agora USD",
|
|
168
148
|
version="1",
|
|
169
149
|
),
|
|
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
150
|
},
|
|
183
151
|
)
|
|
184
152
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: uvd-x402-sdk
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Python SDK for x402 payments - gasless crypto payments across 14 blockchains with multi-stablecoin support (USDC, EURC, AUSD, PYUSD)
|
|
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
|
|
@@ -56,7 +56,7 @@ Accept **gasless stablecoin payments** across **14 blockchain networks** with a
|
|
|
56
56
|
## Features
|
|
57
57
|
|
|
58
58
|
- **14 Networks**: EVM chains (Base, Ethereum, Polygon, etc.), SVM chains (Solana, Fogo), NEAR, and Stellar
|
|
59
|
-
- **
|
|
59
|
+
- **4 Stablecoins**: USDC, EURC, AUSD, PYUSD (EVM chains)
|
|
60
60
|
- **x402 v1 & v2**: Full support for both protocol versions with auto-detection
|
|
61
61
|
- **Framework Integrations**: Flask, FastAPI, Django, AWS Lambda
|
|
62
62
|
- **Gasless Payments**: Users sign EIP-712/EIP-3009 authorizations, facilitator pays all network fees
|
|
@@ -102,8 +102,6 @@ print(f"Paid by {result.payer_address}, tx: {result.transaction_hash}")
|
|
|
102
102
|
| EURC | Ethereum, Base, Avalanche | 6 |
|
|
103
103
|
| AUSD | Ethereum, Arbitrum, Avalanche, Polygon, Monad | 6 |
|
|
104
104
|
| PYUSD | Ethereum | 6 |
|
|
105
|
-
| GHO | Ethereum, Base, Arbitrum | 18 |
|
|
106
|
-
| crvUSD | Ethereum, Arbitrum | 18 |
|
|
107
105
|
|
|
108
106
|
## Installation
|
|
109
107
|
|
|
@@ -639,10 +637,10 @@ from uvd_x402_sdk import (
|
|
|
639
637
|
|
|
640
638
|
# Check which tokens a network supports
|
|
641
639
|
tokens = get_supported_tokens("ethereum")
|
|
642
|
-
print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd'
|
|
640
|
+
print(tokens) # ['usdc', 'eurc', 'ausd', 'pyusd']
|
|
643
641
|
|
|
644
642
|
tokens = get_supported_tokens("base")
|
|
645
|
-
print(tokens) # ['usdc', 'eurc'
|
|
643
|
+
print(tokens) # ['usdc', 'eurc']
|
|
646
644
|
|
|
647
645
|
# Check if a specific token is supported
|
|
648
646
|
if is_token_supported("ethereum", "eurc"):
|
|
@@ -657,10 +655,10 @@ if config:
|
|
|
657
655
|
print(f"EIP-712 version: {config.version}")
|
|
658
656
|
|
|
659
657
|
# Find all networks that support a token
|
|
660
|
-
networks = get_networks_by_token("
|
|
658
|
+
networks = get_networks_by_token("eurc")
|
|
661
659
|
for network in networks:
|
|
662
|
-
print(f"
|
|
663
|
-
# Output:
|
|
660
|
+
print(f"EURC available on: {network.display_name}")
|
|
661
|
+
# Output: EURC available on: Ethereum, Base, Avalanche C-Chain
|
|
664
662
|
```
|
|
665
663
|
|
|
666
664
|
### Token Configuration
|
|
@@ -672,7 +670,7 @@ from uvd_x402_sdk import TokenConfig, get_token_config
|
|
|
672
670
|
|
|
673
671
|
# TokenConfig structure
|
|
674
672
|
# - address: Contract address
|
|
675
|
-
# - decimals: Token decimals (6 for
|
|
673
|
+
# - decimals: Token decimals (6 for all supported stablecoins)
|
|
676
674
|
# - name: EIP-712 domain name (e.g., "USD Coin", "EURC", "Gho Token")
|
|
677
675
|
# - version: EIP-712 domain version
|
|
678
676
|
|
|
@@ -685,12 +683,12 @@ eurc = get_token_config("base", "eurc")
|
|
|
685
683
|
# version="2"
|
|
686
684
|
# )
|
|
687
685
|
|
|
688
|
-
# Example: Get
|
|
689
|
-
|
|
686
|
+
# Example: Get PYUSD config on Ethereum
|
|
687
|
+
pyusd = get_token_config("ethereum", "pyusd")
|
|
690
688
|
# TokenConfig(
|
|
691
|
-
# address="
|
|
692
|
-
# decimals=
|
|
693
|
-
# name="
|
|
689
|
+
# address="0x6c3ea9036406852006290770BEdFcAbA0e23A0e8",
|
|
690
|
+
# decimals=6,
|
|
691
|
+
# name="PayPal USD",
|
|
694
692
|
# version="1"
|
|
695
693
|
# )
|
|
696
694
|
```
|
|
@@ -703,8 +701,6 @@ gho = get_token_config("ethereum", "gho")
|
|
|
703
701
|
| `eurc` | Euro Coin | 6 | Circle |
|
|
704
702
|
| `ausd` | Agora USD | 6 | Agora Finance |
|
|
705
703
|
| `pyusd` | PayPal USD | 6 | PayPal/Paxos |
|
|
706
|
-
| `gho` | GHO Stablecoin | 18 | Aave |
|
|
707
|
-
| `crvusd` | Curve USD | 18 | Curve Finance |
|
|
708
704
|
|
|
709
705
|
---
|
|
710
706
|
|
|
@@ -753,7 +749,7 @@ except X402Error as e:
|
|
|
753
749
|
|
|
754
750
|
## How x402 Works
|
|
755
751
|
|
|
756
|
-
The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD
|
|
752
|
+
The x402 protocol enables gasless stablecoin payments (USDC, EURC, AUSD, PYUSD):
|
|
757
753
|
|
|
758
754
|
```
|
|
759
755
|
1. User Request --> Client sends request without payment
|
|
@@ -796,7 +792,7 @@ The facilitator (https://facilitator.ultravioletadao.xyz) handles all on-chain i
|
|
|
796
792
|
## Security
|
|
797
793
|
|
|
798
794
|
- Users **NEVER** pay gas or submit transactions directly
|
|
799
|
-
- **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD
|
|
795
|
+
- **EVM**: Users sign EIP-712 structured messages for any supported stablecoin (USDC, EURC, AUSD, PYUSD)
|
|
800
796
|
- **Solana/Fogo**: Users sign partial transactions (facilitator co-signs and submits)
|
|
801
797
|
- **Stellar**: Users sign Soroban authorization entries only
|
|
802
798
|
- **NEAR**: Users sign NEP-366 meta-transactions (DelegateAction)
|
|
@@ -881,15 +877,18 @@ MIT License - see LICENSE file.
|
|
|
881
877
|
|
|
882
878
|
## Changelog
|
|
883
879
|
|
|
880
|
+
### v0.3.1 (2025-12-21)
|
|
881
|
+
|
|
882
|
+
- Removed GHO and crvUSD token support (not EIP-3009 compatible)
|
|
883
|
+
- SDK now supports 4 stablecoins: USDC, EURC, AUSD, PYUSD
|
|
884
|
+
|
|
884
885
|
### v0.3.0 (2025-12-20)
|
|
885
886
|
|
|
886
|
-
- **Multi-Stablecoin Support**: Added support for
|
|
887
|
+
- **Multi-Stablecoin Support**: Added support for 4 stablecoins on EVM chains
|
|
887
888
|
- USDC (all EVM chains)
|
|
888
889
|
- EURC (Ethereum, Base, Avalanche)
|
|
889
890
|
- AUSD (Ethereum, Arbitrum, Avalanche, Polygon, Monad)
|
|
890
891
|
- PYUSD (Ethereum)
|
|
891
|
-
- GHO (Ethereum, Base, Arbitrum)
|
|
892
|
-
- crvUSD (Ethereum, Arbitrum)
|
|
893
892
|
- Added `TokenType` literal type and `TokenConfig` dataclass
|
|
894
893
|
- Added token helper functions: `get_token_config()`, `get_supported_tokens()`, `is_token_supported()`, `get_networks_by_token()`
|
|
895
894
|
- Added `tokens` field to `NetworkConfig` for multi-token configurations
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/django_integration.py
RENAMED
|
File without changes
|
{uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/fastapi_integration.py
RENAMED
|
File without changes
|
{uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/flask_integration.py
RENAMED
|
File without changes
|
{uvd_x402_sdk-0.3.0 → uvd_x402_sdk-0.3.1}/src/uvd_x402_sdk/integrations/lambda_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|