uvd-x402-sdk 0.3.1__tar.gz → 0.3.3__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.3.1/src/uvd_x402_sdk.egg-info → uvd_x402_sdk-0.3.3}/PKG-INFO +62 -1
  2. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/README.md +61 -0
  3. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/pyproject.toml +1 -1
  4. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/__init__.py +1 -1
  5. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/networks/evm.py +7 -7
  6. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3/src/uvd_x402_sdk.egg-info}/PKG-INFO +62 -1
  7. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/LICENSE +0 -0
  8. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/setup.cfg +0 -0
  9. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/client.py +0 -0
  10. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/config.py +0 -0
  11. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/decorators.py +0 -0
  12. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/exceptions.py +0 -0
  13. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/integrations/__init__.py +0 -0
  14. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/integrations/django_integration.py +0 -0
  15. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/integrations/fastapi_integration.py +0 -0
  16. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/integrations/flask_integration.py +0 -0
  17. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/integrations/lambda_integration.py +0 -0
  18. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/models.py +0 -0
  19. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/networks/__init__.py +0 -0
  20. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/networks/base.py +0 -0
  21. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/networks/near.py +0 -0
  22. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/networks/solana.py +0 -0
  23. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/networks/stellar.py +0 -0
  24. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk/response.py +0 -0
  25. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk.egg-info/SOURCES.txt +0 -0
  26. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk.egg-info/dependency_links.txt +0 -0
  27. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk.egg-info/requires.txt +0 -0
  28. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/src/uvd_x402_sdk.egg-info/top_level.txt +0 -0
  29. {uvd_x402_sdk-0.3.1 → uvd_x402_sdk-0.3.3}/tests/test_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uvd-x402-sdk
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
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
@@ -702,6 +702,55 @@ pyusd = get_token_config("ethereum", "pyusd")
702
702
  | `ausd` | Agora USD | 6 | Agora Finance |
703
703
  | `pyusd` | PayPal USD | 6 | PayPal/Paxos |
704
704
 
705
+ ### Critical Implementation Notes
706
+
707
+ #### EIP-712 Domain Names Vary by Chain
708
+
709
+ The same token may use **different EIP-712 domain names on different chains**. This affects signature verification.
710
+
711
+ | Token | Ethereum | Base | Avalanche |
712
+ |-------|----------|------|-----------|
713
+ | EURC | `"Euro Coin"` | `"EURC"` | `"Euro Coin"` |
714
+ | USDC | `"USD Coin"` | `"USD Coin"` | `"USD Coin"` |
715
+ | AUSD | `"Agora Dollar"` | N/A | `"Agora Dollar"` |
716
+ | PYUSD | `"PayPal USD"` | N/A | N/A |
717
+
718
+ **Important:** Always use `get_token_config()` to get the correct domain name. Never hardcode domain names.
719
+
720
+ ```python
721
+ # CORRECT: Use get_token_config for each chain
722
+ eurc_base = get_token_config("base", "eurc")
723
+ # TokenConfig(name="EURC", version="2", ...)
724
+
725
+ eurc_ethereum = get_token_config("ethereum", "eurc")
726
+ # TokenConfig(name="Euro Coin", version="2", ...)
727
+ ```
728
+
729
+ #### PYUSD Signature Format (PayPal USD)
730
+
731
+ PYUSD uses the Paxos implementation which only supports the **v,r,s signature variant** of `transferWithAuthorization`. This is different from Circle's USDC/EURC which support both compact bytes and v,r,s variants.
732
+
733
+ **Backend implications:**
734
+ - The x402 facilitator (v1.9.0+) automatically handles this by detecting PYUSD and using `transferWithAuthorization_1(v,r,s)` instead of `transferWithAuthorization_0(bytes signature)`
735
+ - If using a custom facilitator, ensure it supports the v,r,s variant for PYUSD
736
+
737
+ #### Token Info Must Be Passed to Facilitator
738
+
739
+ When using non-USDC tokens, your backend **must** pass the token info (including EIP-712 domain) to the facilitator. This is done via the `extra` field in `paymentRequirements`:
740
+
741
+ ```python
742
+ # When building payment requirements for the facilitator
743
+ payment_requirements = {
744
+ "asset": token_address, # Use actual token address, NOT hardcoded USDC
745
+ "extra": {
746
+ "name": token_config.name, # EIP-712 domain name
747
+ "version": token_config.version, # EIP-712 domain version
748
+ }
749
+ }
750
+ ```
751
+
752
+ Without this, the facilitator will use wrong EIP-712 domain and signature verification will fail with "invalid signature" error.
753
+
705
754
  ---
706
755
 
707
756
  ## Error Handling
@@ -877,6 +926,18 @@ MIT License - see LICENSE file.
877
926
 
878
927
  ## Changelog
879
928
 
929
+ ### v0.3.3 (2025-12-22)
930
+
931
+ - Fixed EIP-712 domain names: AUSD uses "Agora Dollar" (not "Agora USD")
932
+ - Fixed EURC domain name on Ethereum/Avalanche: "Euro Coin" (not "EURC")
933
+
934
+ ### v0.3.2 (2025-12-21)
935
+
936
+ - Added critical implementation notes for multi-token support:
937
+ - EIP-712 domain names vary by chain (e.g., EURC is "Euro Coin" on Ethereum but "EURC" on Base)
938
+ - PYUSD uses v,r,s signature variant (Paxos implementation)
939
+ - Token info must be passed to facilitator via `extra` field
940
+
880
941
  ### v0.3.1 (2025-12-21)
881
942
 
882
943
  - Removed GHO and crvUSD token support (not EIP-3009 compatible)
@@ -653,6 +653,55 @@ pyusd = get_token_config("ethereum", "pyusd")
653
653
  | `ausd` | Agora USD | 6 | Agora Finance |
654
654
  | `pyusd` | PayPal USD | 6 | PayPal/Paxos |
655
655
 
656
+ ### Critical Implementation Notes
657
+
658
+ #### EIP-712 Domain Names Vary by Chain
659
+
660
+ The same token may use **different EIP-712 domain names on different chains**. This affects signature verification.
661
+
662
+ | Token | Ethereum | Base | Avalanche |
663
+ |-------|----------|------|-----------|
664
+ | EURC | `"Euro Coin"` | `"EURC"` | `"Euro Coin"` |
665
+ | USDC | `"USD Coin"` | `"USD Coin"` | `"USD Coin"` |
666
+ | AUSD | `"Agora Dollar"` | N/A | `"Agora Dollar"` |
667
+ | PYUSD | `"PayPal USD"` | N/A | N/A |
668
+
669
+ **Important:** Always use `get_token_config()` to get the correct domain name. Never hardcode domain names.
670
+
671
+ ```python
672
+ # CORRECT: Use get_token_config for each chain
673
+ eurc_base = get_token_config("base", "eurc")
674
+ # TokenConfig(name="EURC", version="2", ...)
675
+
676
+ eurc_ethereum = get_token_config("ethereum", "eurc")
677
+ # TokenConfig(name="Euro Coin", version="2", ...)
678
+ ```
679
+
680
+ #### PYUSD Signature Format (PayPal USD)
681
+
682
+ PYUSD uses the Paxos implementation which only supports the **v,r,s signature variant** of `transferWithAuthorization`. This is different from Circle's USDC/EURC which support both compact bytes and v,r,s variants.
683
+
684
+ **Backend implications:**
685
+ - The x402 facilitator (v1.9.0+) automatically handles this by detecting PYUSD and using `transferWithAuthorization_1(v,r,s)` instead of `transferWithAuthorization_0(bytes signature)`
686
+ - If using a custom facilitator, ensure it supports the v,r,s variant for PYUSD
687
+
688
+ #### Token Info Must Be Passed to Facilitator
689
+
690
+ When using non-USDC tokens, your backend **must** pass the token info (including EIP-712 domain) to the facilitator. This is done via the `extra` field in `paymentRequirements`:
691
+
692
+ ```python
693
+ # When building payment requirements for the facilitator
694
+ payment_requirements = {
695
+ "asset": token_address, # Use actual token address, NOT hardcoded USDC
696
+ "extra": {
697
+ "name": token_config.name, # EIP-712 domain name
698
+ "version": token_config.version, # EIP-712 domain version
699
+ }
700
+ }
701
+ ```
702
+
703
+ Without this, the facilitator will use wrong EIP-712 domain and signature verification will fail with "invalid signature" error.
704
+
656
705
  ---
657
706
 
658
707
  ## Error Handling
@@ -828,6 +877,18 @@ MIT License - see LICENSE file.
828
877
 
829
878
  ## Changelog
830
879
 
880
+ ### v0.3.3 (2025-12-22)
881
+
882
+ - Fixed EIP-712 domain names: AUSD uses "Agora Dollar" (not "Agora USD")
883
+ - Fixed EURC domain name on Ethereum/Avalanche: "Euro Coin" (not "EURC")
884
+
885
+ ### v0.3.2 (2025-12-21)
886
+
887
+ - Added critical implementation notes for multi-token support:
888
+ - EIP-712 domain names vary by chain (e.g., EURC is "Euro Coin" on Ethereum but "EURC" on Base)
889
+ - PYUSD uses v,r,s signature variant (Paxos implementation)
890
+ - Token info must be passed to facilitator via `extra` field
891
+
831
892
  ### v0.3.1 (2025-12-21)
832
893
 
833
894
  - Removed GHO and crvUSD token support (not EIP-3009 compatible)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "uvd-x402-sdk"
7
- version = "0.3.1"
7
+ version = "0.3.3"
8
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"
@@ -37,7 +37,7 @@ Supported Networks (14 total):
37
37
  - Stellar (1): Stellar
38
38
  """
39
39
 
40
- __version__ = "0.3.1"
40
+ __version__ = "0.3.3"
41
41
  __author__ = "Ultravioleta DAO"
42
42
 
43
43
  from uvd_x402_sdk.client import X402Client
@@ -76,13 +76,13 @@ ETHEREUM = NetworkConfig(
76
76
  "eurc": TokenConfig(
77
77
  address="0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
78
78
  decimals=6,
79
- name="EURC",
79
+ name="Euro Coin",
80
80
  version="2",
81
81
  ),
82
82
  "ausd": TokenConfig(
83
83
  address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
84
84
  decimals=6,
85
- name="Agora USD",
85
+ name="Agora Dollar",
86
86
  version="1",
87
87
  ),
88
88
  "pyusd": TokenConfig(
@@ -116,7 +116,7 @@ POLYGON = NetworkConfig(
116
116
  "ausd": TokenConfig(
117
117
  address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
118
118
  decimals=6,
119
- name="Agora USD",
119
+ name="Agora Dollar",
120
120
  version="1",
121
121
  ),
122
122
  },
@@ -144,7 +144,7 @@ ARBITRUM = NetworkConfig(
144
144
  "ausd": TokenConfig(
145
145
  address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
146
146
  decimals=6,
147
- name="Agora USD",
147
+ name="Agora Dollar",
148
148
  version="1",
149
149
  ),
150
150
  },
@@ -186,13 +186,13 @@ AVALANCHE = NetworkConfig(
186
186
  "eurc": TokenConfig(
187
187
  address="0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD",
188
188
  decimals=6,
189
- name="EURC",
189
+ name="Euro Coin",
190
190
  version="2",
191
191
  ),
192
192
  "ausd": TokenConfig(
193
193
  address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
194
194
  decimals=6,
195
- name="Agora USD",
195
+ name="Agora Dollar",
196
196
  version="1",
197
197
  ),
198
198
  },
@@ -266,7 +266,7 @@ MONAD = NetworkConfig(
266
266
  "ausd": TokenConfig(
267
267
  address="0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
268
268
  decimals=6,
269
- name="Agora USD",
269
+ name="Agora Dollar",
270
270
  version="1",
271
271
  ),
272
272
  },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uvd-x402-sdk
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
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
@@ -702,6 +702,55 @@ pyusd = get_token_config("ethereum", "pyusd")
702
702
  | `ausd` | Agora USD | 6 | Agora Finance |
703
703
  | `pyusd` | PayPal USD | 6 | PayPal/Paxos |
704
704
 
705
+ ### Critical Implementation Notes
706
+
707
+ #### EIP-712 Domain Names Vary by Chain
708
+
709
+ The same token may use **different EIP-712 domain names on different chains**. This affects signature verification.
710
+
711
+ | Token | Ethereum | Base | Avalanche |
712
+ |-------|----------|------|-----------|
713
+ | EURC | `"Euro Coin"` | `"EURC"` | `"Euro Coin"` |
714
+ | USDC | `"USD Coin"` | `"USD Coin"` | `"USD Coin"` |
715
+ | AUSD | `"Agora Dollar"` | N/A | `"Agora Dollar"` |
716
+ | PYUSD | `"PayPal USD"` | N/A | N/A |
717
+
718
+ **Important:** Always use `get_token_config()` to get the correct domain name. Never hardcode domain names.
719
+
720
+ ```python
721
+ # CORRECT: Use get_token_config for each chain
722
+ eurc_base = get_token_config("base", "eurc")
723
+ # TokenConfig(name="EURC", version="2", ...)
724
+
725
+ eurc_ethereum = get_token_config("ethereum", "eurc")
726
+ # TokenConfig(name="Euro Coin", version="2", ...)
727
+ ```
728
+
729
+ #### PYUSD Signature Format (PayPal USD)
730
+
731
+ PYUSD uses the Paxos implementation which only supports the **v,r,s signature variant** of `transferWithAuthorization`. This is different from Circle's USDC/EURC which support both compact bytes and v,r,s variants.
732
+
733
+ **Backend implications:**
734
+ - The x402 facilitator (v1.9.0+) automatically handles this by detecting PYUSD and using `transferWithAuthorization_1(v,r,s)` instead of `transferWithAuthorization_0(bytes signature)`
735
+ - If using a custom facilitator, ensure it supports the v,r,s variant for PYUSD
736
+
737
+ #### Token Info Must Be Passed to Facilitator
738
+
739
+ When using non-USDC tokens, your backend **must** pass the token info (including EIP-712 domain) to the facilitator. This is done via the `extra` field in `paymentRequirements`:
740
+
741
+ ```python
742
+ # When building payment requirements for the facilitator
743
+ payment_requirements = {
744
+ "asset": token_address, # Use actual token address, NOT hardcoded USDC
745
+ "extra": {
746
+ "name": token_config.name, # EIP-712 domain name
747
+ "version": token_config.version, # EIP-712 domain version
748
+ }
749
+ }
750
+ ```
751
+
752
+ Without this, the facilitator will use wrong EIP-712 domain and signature verification will fail with "invalid signature" error.
753
+
705
754
  ---
706
755
 
707
756
  ## Error Handling
@@ -877,6 +926,18 @@ MIT License - see LICENSE file.
877
926
 
878
927
  ## Changelog
879
928
 
929
+ ### v0.3.3 (2025-12-22)
930
+
931
+ - Fixed EIP-712 domain names: AUSD uses "Agora Dollar" (not "Agora USD")
932
+ - Fixed EURC domain name on Ethereum/Avalanche: "Euro Coin" (not "EURC")
933
+
934
+ ### v0.3.2 (2025-12-21)
935
+
936
+ - Added critical implementation notes for multi-token support:
937
+ - EIP-712 domain names vary by chain (e.g., EURC is "Euro Coin" on Ethereum but "EURC" on Base)
938
+ - PYUSD uses v,r,s signature variant (Paxos implementation)
939
+ - Token info must be passed to facilitator via `extra` field
940
+
880
941
  ### v0.3.1 (2025-12-21)
881
942
 
882
943
  - Removed GHO and crvUSD token support (not EIP-3009 compatible)
File without changes
File without changes