uvd-x402-sdk 0.2.1__py3-none-any.whl → 0.2.3__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 +169 -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 +54 -54
- uvd_x402_sdk/networks/base.py +347 -347
- uvd_x402_sdk/networks/evm.py +215 -215
- uvd_x402_sdk/networks/near.py +397 -397
- uvd_x402_sdk/networks/solana.py +282 -269
- uvd_x402_sdk/networks/stellar.py +129 -129
- uvd_x402_sdk/response.py +439 -439
- {uvd_x402_sdk-0.2.1.dist-info → uvd_x402_sdk-0.2.3.dist-info}/LICENSE +21 -21
- {uvd_x402_sdk-0.2.1.dist-info → uvd_x402_sdk-0.2.3.dist-info}/METADATA +814 -778
- uvd_x402_sdk-0.2.3.dist-info/RECORD +23 -0
- uvd_x402_sdk-0.2.1.dist-info/RECORD +0 -23
- {uvd_x402_sdk-0.2.1.dist-info → uvd_x402_sdk-0.2.3.dist-info}/WHEEL +0 -0
- {uvd_x402_sdk-0.2.1.dist-info → uvd_x402_sdk-0.2.3.dist-info}/top_level.txt +0 -0
|
@@ -1,54 +1,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
|
-
You can register custom networks using `register_network()`.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from uvd_x402_sdk.networks.base import (
|
|
18
|
-
NetworkConfig,
|
|
19
|
-
NetworkType,
|
|
20
|
-
get_network,
|
|
21
|
-
get_network_by_chain_id,
|
|
22
|
-
register_network,
|
|
23
|
-
list_networks,
|
|
24
|
-
get_supported_chain_ids,
|
|
25
|
-
get_supported_network_names,
|
|
26
|
-
SUPPORTED_NETWORKS,
|
|
27
|
-
# CAIP-2 utilities (x402 v2)
|
|
28
|
-
parse_caip2_network,
|
|
29
|
-
to_caip2_network,
|
|
30
|
-
is_caip2_format,
|
|
31
|
-
normalize_network,
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
# Import all default network configurations
|
|
35
|
-
from uvd_x402_sdk.networks import evm, solana, near, stellar
|
|
36
|
-
|
|
37
|
-
__all__ = [
|
|
38
|
-
# Core
|
|
39
|
-
"NetworkConfig",
|
|
40
|
-
"NetworkType",
|
|
41
|
-
# Registry functions
|
|
42
|
-
"get_network",
|
|
43
|
-
"get_network_by_chain_id",
|
|
44
|
-
"register_network",
|
|
45
|
-
"list_networks",
|
|
46
|
-
"get_supported_chain_ids",
|
|
47
|
-
"get_supported_network_names",
|
|
48
|
-
"SUPPORTED_NETWORKS",
|
|
49
|
-
# CAIP-2 utilities (x402 v2)
|
|
50
|
-
"parse_caip2_network",
|
|
51
|
-
"to_caip2_network",
|
|
52
|
-
"is_caip2_format",
|
|
53
|
-
"normalize_network",
|
|
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
|
+
You can register custom networks using `register_network()`.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from uvd_x402_sdk.networks.base import (
|
|
18
|
+
NetworkConfig,
|
|
19
|
+
NetworkType,
|
|
20
|
+
get_network,
|
|
21
|
+
get_network_by_chain_id,
|
|
22
|
+
register_network,
|
|
23
|
+
list_networks,
|
|
24
|
+
get_supported_chain_ids,
|
|
25
|
+
get_supported_network_names,
|
|
26
|
+
SUPPORTED_NETWORKS,
|
|
27
|
+
# CAIP-2 utilities (x402 v2)
|
|
28
|
+
parse_caip2_network,
|
|
29
|
+
to_caip2_network,
|
|
30
|
+
is_caip2_format,
|
|
31
|
+
normalize_network,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Import all default network configurations
|
|
35
|
+
from uvd_x402_sdk.networks import evm, solana, near, stellar
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
# Core
|
|
39
|
+
"NetworkConfig",
|
|
40
|
+
"NetworkType",
|
|
41
|
+
# Registry functions
|
|
42
|
+
"get_network",
|
|
43
|
+
"get_network_by_chain_id",
|
|
44
|
+
"register_network",
|
|
45
|
+
"list_networks",
|
|
46
|
+
"get_supported_chain_ids",
|
|
47
|
+
"get_supported_network_names",
|
|
48
|
+
"SUPPORTED_NETWORKS",
|
|
49
|
+
# CAIP-2 utilities (x402 v2)
|
|
50
|
+
"parse_caip2_network",
|
|
51
|
+
"to_caip2_network",
|
|
52
|
+
"is_caip2_format",
|
|
53
|
+
"normalize_network",
|
|
54
|
+
]
|