uvd-x402-sdk 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl

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/__init__.py CHANGED
@@ -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.2"
41
41
  __author__ = "Ultravioleta DAO"
42
42
 
43
43
  from uvd_x402_sdk.client import X402Client
@@ -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.2
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 | `"AUSD"` | N/A | `"AUSD"` |
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,13 @@ MIT License - see LICENSE file.
877
926
 
878
927
  ## Changelog
879
928
 
929
+ ### v0.3.2 (2025-12-21)
930
+
931
+ - Added critical implementation notes for multi-token support:
932
+ - EIP-712 domain names vary by chain (e.g., EURC is "Euro Coin" on Ethereum but "EURC" on Base)
933
+ - PYUSD uses v,r,s signature variant (Paxos implementation)
934
+ - Token info must be passed to facilitator via `extra` field
935
+
880
936
  ### v0.3.1 (2025-12-21)
881
937
 
882
938
  - Removed GHO and crvUSD token support (not EIP-3009 compatible)
@@ -1,4 +1,4 @@
1
- uvd_x402_sdk/__init__.py,sha256=3i3Xt655wgqBUNgNNodbsaMf9yJtt0qR9ZwraFoJScc,4901
1
+ uvd_x402_sdk/__init__.py,sha256=13c09ZmjH-rO6p2JHpUVl0gr3JgyVK3LG15dhoUHlIs,4901
2
2
  uvd_x402_sdk/client.py,sha256=QbK22DtC3HmvvCezphQ-UsYX468vKrIN-M_wF4pv9cM,18389
3
3
  uvd_x402_sdk/config.py,sha256=BNGnX2RwZ_ELIcSKU7RkwTUcln4LMFZdCwG1ptASKN8,8644
4
4
  uvd_x402_sdk/decorators.py,sha256=XJ7V4554hsa-AVDrizF1oKmeTysg5zlkQRcaeGBI73E,9767
@@ -16,8 +16,8 @@ uvd_x402_sdk/networks/evm.py,sha256=ezgZ0MHX6iWsb0VoleOJHJoMB7dF9evQxeLCGD-aEbs,
16
16
  uvd_x402_sdk/networks/near.py,sha256=sxbxT1NqjcENh8ysFLDpAx5DGizf1EI0YjwgviLfqcY,11608
17
17
  uvd_x402_sdk/networks/solana.py,sha256=kVSHRi57eTJdBtgI8SUbHfQUxYzx-_YvI_bEB0HIvNg,9351
18
18
  uvd_x402_sdk/networks/stellar.py,sha256=c-6re-dVc2-6gJ5rL4krUTaFsPz5vkactOJD-0wowBA,3534
19
- uvd_x402_sdk-0.3.1.dist-info/LICENSE,sha256=OcLzB_iSgMbvk7b0dlyvleY_IbL2WUaPxvn1CHw2uAc,1073
20
- uvd_x402_sdk-0.3.1.dist-info/METADATA,sha256=kulw5We1SUMsjRXERdVFK3amOflHfwfAFkc2oTdhH0U,26788
21
- uvd_x402_sdk-0.3.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
22
- uvd_x402_sdk-0.3.1.dist-info/top_level.txt,sha256=Exyjj_Kl7CDAGFMi72lT9oFPOYiRNZb3l8tr906mMmc,13
23
- uvd_x402_sdk-0.3.1.dist-info/RECORD,,
19
+ uvd_x402_sdk-0.3.2.dist-info/LICENSE,sha256=OcLzB_iSgMbvk7b0dlyvleY_IbL2WUaPxvn1CHw2uAc,1073
20
+ uvd_x402_sdk-0.3.2.dist-info/METADATA,sha256=B_s8VazTzB4gTi2bmKhQuzGH84Efoj0R-7VaE2fth6s,29150
21
+ uvd_x402_sdk-0.3.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
22
+ uvd_x402_sdk-0.3.2.dist-info/top_level.txt,sha256=Exyjj_Kl7CDAGFMi72lT9oFPOYiRNZb3l8tr906mMmc,13
23
+ uvd_x402_sdk-0.3.2.dist-info/RECORD,,