uvd-x402-sdk 0.2.2__py3-none-any.whl → 0.3.0__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 +185 -169
- uvd_x402_sdk/client.py +527 -527
- uvd_x402_sdk/config.py +248 -248
- uvd_x402_sdk/decorators.py +325 -325
- uvd_x402_sdk/exceptions.py +254 -254
- uvd_x402_sdk/integrations/__init__.py +74 -74
- uvd_x402_sdk/integrations/django_integration.py +237 -237
- uvd_x402_sdk/integrations/fastapi_integration.py +330 -330
- uvd_x402_sdk/integrations/flask_integration.py +259 -259
- uvd_x402_sdk/integrations/lambda_integration.py +320 -320
- uvd_x402_sdk/models.py +397 -397
- uvd_x402_sdk/networks/__init__.py +80 -54
- uvd_x402_sdk/networks/base.py +498 -347
- uvd_x402_sdk/networks/evm.py +356 -215
- uvd_x402_sdk/networks/near.py +397 -397
- uvd_x402_sdk/networks/solana.py +282 -282
- uvd_x402_sdk/networks/stellar.py +129 -129
- uvd_x402_sdk/response.py +439 -439
- {uvd_x402_sdk-0.2.2.dist-info → uvd_x402_sdk-0.3.0.dist-info}/LICENSE +21 -21
- {uvd_x402_sdk-0.2.2.dist-info → uvd_x402_sdk-0.3.0.dist-info}/METADATA +927 -778
- uvd_x402_sdk-0.3.0.dist-info/RECORD +23 -0
- uvd_x402_sdk-0.2.2.dist-info/RECORD +0 -23
- {uvd_x402_sdk-0.2.2.dist-info → uvd_x402_sdk-0.3.0.dist-info}/WHEEL +0 -0
- {uvd_x402_sdk-0.2.2.dist-info → uvd_x402_sdk-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,54 +1,80 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Network configurations for x402 payments.
|
|
3
|
-
|
|
4
|
-
This module provides configuration for all supported blockchain networks,
|
|
5
|
-
including USDC contract addresses, RPC URLs, and network-specific parameters.
|
|
6
|
-
|
|
7
|
-
The SDK supports 14 mainnet networks out of the box:
|
|
8
|
-
- 10 EVM chains: Base, Ethereum, Polygon, Arbitrum, Optimism, Avalanche,
|
|
9
|
-
Celo, HyperEVM, Unichain, Monad
|
|
10
|
-
- 2 SVM chains: Solana, Fogo
|
|
11
|
-
- 1 NEAR: NEAR Protocol
|
|
12
|
-
- 1 Stellar: Stellar
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
"""
|
|
2
|
+
Network configurations for x402 payments.
|
|
3
|
+
|
|
4
|
+
This module provides configuration for all supported blockchain networks,
|
|
5
|
+
including USDC contract addresses, RPC URLs, and network-specific parameters.
|
|
6
|
+
|
|
7
|
+
The SDK supports 14 mainnet networks out of the box:
|
|
8
|
+
- 10 EVM chains: Base, Ethereum, Polygon, Arbitrum, Optimism, Avalanche,
|
|
9
|
+
Celo, HyperEVM, Unichain, Monad
|
|
10
|
+
- 2 SVM chains: Solana, Fogo
|
|
11
|
+
- 1 NEAR: NEAR Protocol
|
|
12
|
+
- 1 Stellar: Stellar
|
|
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
|
+
|
|
22
|
+
You can register custom networks using `register_network()`.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from uvd_x402_sdk.networks.base import (
|
|
26
|
+
NetworkConfig,
|
|
27
|
+
NetworkType,
|
|
28
|
+
# Token types (multi-stablecoin support)
|
|
29
|
+
TokenType,
|
|
30
|
+
TokenConfig,
|
|
31
|
+
ALL_TOKEN_TYPES,
|
|
32
|
+
get_network,
|
|
33
|
+
get_network_by_chain_id,
|
|
34
|
+
register_network,
|
|
35
|
+
list_networks,
|
|
36
|
+
get_supported_chain_ids,
|
|
37
|
+
get_supported_network_names,
|
|
38
|
+
SUPPORTED_NETWORKS,
|
|
39
|
+
# Token helper functions
|
|
40
|
+
get_token_config,
|
|
41
|
+
get_supported_tokens,
|
|
42
|
+
is_token_supported,
|
|
43
|
+
get_networks_by_token,
|
|
44
|
+
# CAIP-2 utilities (x402 v2)
|
|
45
|
+
parse_caip2_network,
|
|
46
|
+
to_caip2_network,
|
|
47
|
+
is_caip2_format,
|
|
48
|
+
normalize_network,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Import all default network configurations
|
|
52
|
+
from uvd_x402_sdk.networks import evm, solana, near, stellar
|
|
53
|
+
|
|
54
|
+
__all__ = [
|
|
55
|
+
# Core
|
|
56
|
+
"NetworkConfig",
|
|
57
|
+
"NetworkType",
|
|
58
|
+
# Token types (multi-stablecoin support)
|
|
59
|
+
"TokenType",
|
|
60
|
+
"TokenConfig",
|
|
61
|
+
"ALL_TOKEN_TYPES",
|
|
62
|
+
# Registry functions
|
|
63
|
+
"get_network",
|
|
64
|
+
"get_network_by_chain_id",
|
|
65
|
+
"register_network",
|
|
66
|
+
"list_networks",
|
|
67
|
+
"get_supported_chain_ids",
|
|
68
|
+
"get_supported_network_names",
|
|
69
|
+
"SUPPORTED_NETWORKS",
|
|
70
|
+
# Token helper functions
|
|
71
|
+
"get_token_config",
|
|
72
|
+
"get_supported_tokens",
|
|
73
|
+
"is_token_supported",
|
|
74
|
+
"get_networks_by_token",
|
|
75
|
+
# CAIP-2 utilities (x402 v2)
|
|
76
|
+
"parse_caip2_network",
|
|
77
|
+
"to_caip2_network",
|
|
78
|
+
"is_caip2_format",
|
|
79
|
+
"normalize_network",
|
|
80
|
+
]
|