synapse-filecoin-sdk 0.1.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.
- pynapse/__init__.py +6 -0
- pynapse/_version.py +1 -0
- pynapse/contracts/__init__.py +34 -0
- pynapse/contracts/abi_registry.py +11 -0
- pynapse/contracts/addresses.json +30 -0
- pynapse/contracts/erc20_abi.json +92 -0
- pynapse/contracts/errorsAbi.json +933 -0
- pynapse/contracts/filecoinPayV1Abi.json +2424 -0
- pynapse/contracts/filecoinWarmStorageServiceAbi.json +2363 -0
- pynapse/contracts/filecoinWarmStorageServiceStateViewAbi.json +651 -0
- pynapse/contracts/generated.py +35 -0
- pynapse/contracts/payments_abi.json +205 -0
- pynapse/contracts/pdpVerifierAbi.json +1266 -0
- pynapse/contracts/providerIdSetAbi.json +161 -0
- pynapse/contracts/serviceProviderRegistryAbi.json +1479 -0
- pynapse/contracts/sessionKeyRegistryAbi.json +147 -0
- pynapse/core/__init__.py +68 -0
- pynapse/core/abis.py +25 -0
- pynapse/core/chains.py +97 -0
- pynapse/core/constants.py +27 -0
- pynapse/core/errors.py +22 -0
- pynapse/core/piece.py +263 -0
- pynapse/core/rand.py +14 -0
- pynapse/core/typed_data.py +320 -0
- pynapse/core/utils.py +30 -0
- pynapse/evm/__init__.py +3 -0
- pynapse/evm/client.py +26 -0
- pynapse/filbeam/__init__.py +3 -0
- pynapse/filbeam/service.py +39 -0
- pynapse/payments/__init__.py +17 -0
- pynapse/payments/service.py +826 -0
- pynapse/pdp/__init__.py +21 -0
- pynapse/pdp/server.py +331 -0
- pynapse/pdp/types.py +38 -0
- pynapse/pdp/verifier.py +82 -0
- pynapse/retriever/__init__.py +12 -0
- pynapse/retriever/async_chain.py +227 -0
- pynapse/retriever/chain.py +209 -0
- pynapse/session/__init__.py +12 -0
- pynapse/session/key.py +30 -0
- pynapse/session/permissions.py +57 -0
- pynapse/session/registry.py +90 -0
- pynapse/sp_registry/__init__.py +11 -0
- pynapse/sp_registry/capabilities.py +25 -0
- pynapse/sp_registry/pdp_capabilities.py +102 -0
- pynapse/sp_registry/service.py +446 -0
- pynapse/sp_registry/types.py +52 -0
- pynapse/storage/__init__.py +57 -0
- pynapse/storage/async_context.py +682 -0
- pynapse/storage/async_manager.py +757 -0
- pynapse/storage/context.py +680 -0
- pynapse/storage/manager.py +758 -0
- pynapse/synapse.py +191 -0
- pynapse/utils/__init__.py +25 -0
- pynapse/utils/constants.py +25 -0
- pynapse/utils/errors.py +3 -0
- pynapse/utils/metadata.py +35 -0
- pynapse/utils/piece_url.py +16 -0
- pynapse/warm_storage/__init__.py +13 -0
- pynapse/warm_storage/service.py +513 -0
- synapse_filecoin_sdk-0.1.0.dist-info/METADATA +74 -0
- synapse_filecoin_sdk-0.1.0.dist-info/RECORD +64 -0
- synapse_filecoin_sdk-0.1.0.dist-info/WHEEL +4 -0
- synapse_filecoin_sdk-0.1.0.dist-info/licenses/LICENSE.md +228 -0
pynapse/__init__.py
ADDED
pynapse/_version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from .abi_registry import load
|
|
4
|
+
from .generated import FILECOIN_PAY_V1_ABI
|
|
5
|
+
|
|
6
|
+
ERC20_ABI = load("erc20_abi.json")
|
|
7
|
+
# Use the complete FilecoinPayV1 ABI (payments_abi.json was a minimal stub)
|
|
8
|
+
PAYMENTS_ABI = FILECOIN_PAY_V1_ABI
|
|
9
|
+
|
|
10
|
+
from .generated import (
|
|
11
|
+
ADDRESSES,
|
|
12
|
+
ERRORS_ABI,
|
|
13
|
+
FILECOIN_PAY_V1_ABI,
|
|
14
|
+
FWSS_ABI,
|
|
15
|
+
FWSS_VIEW_ABI,
|
|
16
|
+
PDP_VERIFIER_ABI,
|
|
17
|
+
PROVIDER_ID_SET_ABI,
|
|
18
|
+
SERVICE_PROVIDER_REGISTRY_ABI,
|
|
19
|
+
SESSION_KEY_REGISTRY_ABI,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"ERC20_ABI",
|
|
24
|
+
"PAYMENTS_ABI",
|
|
25
|
+
"ADDRESSES",
|
|
26
|
+
"ERRORS_ABI",
|
|
27
|
+
"FILECOIN_PAY_V1_ABI",
|
|
28
|
+
"FWSS_ABI",
|
|
29
|
+
"FWSS_VIEW_ABI",
|
|
30
|
+
"PDP_VERIFIER_ABI",
|
|
31
|
+
"PROVIDER_ID_SET_ABI",
|
|
32
|
+
"SERVICE_PROVIDER_REGISTRY_ABI",
|
|
33
|
+
"SESSION_KEY_REGISTRY_ABI",
|
|
34
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"filecoinPayV1Address": {
|
|
3
|
+
"314": "0x23b1e018F08BB982348b15a86ee926eEBf7F4DAa",
|
|
4
|
+
"314159": "0x09a0fDc2723fAd1A7b8e3e00eE5DF73841df55a0"
|
|
5
|
+
},
|
|
6
|
+
"filecoinWarmStorageServiceAddress": {
|
|
7
|
+
"314": "0x8408502033C418E1bbC97cE9ac48E5528F371A9f",
|
|
8
|
+
"314159": "0x02925630df557F957f70E112bA06e50965417CA0"
|
|
9
|
+
},
|
|
10
|
+
"filecoinWarmStorageServiceStateViewAddress": {
|
|
11
|
+
"314": "0x638a4986332bF9B889E5D7435B966C5ecdE077Fa",
|
|
12
|
+
"314159": "0x53d235D474585EC102ccaB7e0cdcE951dD00f716"
|
|
13
|
+
},
|
|
14
|
+
"serviceProviderRegistryAddress": {
|
|
15
|
+
"314": "0xf55dDbf63F1b55c3F1D4FA7e339a68AB7b64A5eB",
|
|
16
|
+
"314159": "0x839e5c9988e4e9977d40708d0094103c0839Ac9D"
|
|
17
|
+
},
|
|
18
|
+
"sessionKeyRegistryAddress": {
|
|
19
|
+
"314": "0x74FD50525A958aF5d484601E252271f9625231aB",
|
|
20
|
+
"314159": "0x518411c2062E119Aaf7A8B12A2eDf9a939347655"
|
|
21
|
+
},
|
|
22
|
+
"pdpVerifierAddress": {
|
|
23
|
+
"314": "0xBADd0B92C1c71d02E7d520f64c0876538fa2557F",
|
|
24
|
+
"314159": "0x85e366Cf9DD2c0aE37E963d9556F5f4718d6417C"
|
|
25
|
+
},
|
|
26
|
+
"providerIdSetAddress": {
|
|
27
|
+
"314": "0x59eFa2e8324E1551d46010d7B0B140eE2F5c726b",
|
|
28
|
+
"314159": "0xAA2f7CfC7ecAc616EC9C1f6d700fAd19087FAC84"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "name",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": [{"name": "", "type": "string"}],
|
|
7
|
+
"stateMutability": "view"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "function",
|
|
11
|
+
"name": "symbol",
|
|
12
|
+
"inputs": [],
|
|
13
|
+
"outputs": [{"name": "", "type": "string"}],
|
|
14
|
+
"stateMutability": "view"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "function",
|
|
18
|
+
"name": "decimals",
|
|
19
|
+
"inputs": [],
|
|
20
|
+
"outputs": [{"name": "", "type": "uint8"}],
|
|
21
|
+
"stateMutability": "view"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "function",
|
|
25
|
+
"name": "totalSupply",
|
|
26
|
+
"inputs": [],
|
|
27
|
+
"outputs": [{"name": "", "type": "uint256"}],
|
|
28
|
+
"stateMutability": "view"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "function",
|
|
32
|
+
"name": "balanceOf",
|
|
33
|
+
"inputs": [{"name": "account", "type": "address"}],
|
|
34
|
+
"outputs": [{"name": "", "type": "uint256"}],
|
|
35
|
+
"stateMutability": "view"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "function",
|
|
39
|
+
"name": "allowance",
|
|
40
|
+
"inputs": [
|
|
41
|
+
{"name": "owner", "type": "address"},
|
|
42
|
+
{"name": "spender", "type": "address"}
|
|
43
|
+
],
|
|
44
|
+
"outputs": [{"name": "", "type": "uint256"}],
|
|
45
|
+
"stateMutability": "view"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "function",
|
|
49
|
+
"name": "approve",
|
|
50
|
+
"inputs": [
|
|
51
|
+
{"name": "spender", "type": "address"},
|
|
52
|
+
{"name": "amount", "type": "uint256"}
|
|
53
|
+
],
|
|
54
|
+
"outputs": [{"name": "", "type": "bool"}],
|
|
55
|
+
"stateMutability": "nonpayable"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "function",
|
|
59
|
+
"name": "transfer",
|
|
60
|
+
"inputs": [
|
|
61
|
+
{"name": "to", "type": "address"},
|
|
62
|
+
{"name": "amount", "type": "uint256"}
|
|
63
|
+
],
|
|
64
|
+
"outputs": [{"name": "", "type": "bool"}],
|
|
65
|
+
"stateMutability": "nonpayable"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "function",
|
|
69
|
+
"name": "transferFrom",
|
|
70
|
+
"inputs": [
|
|
71
|
+
{"name": "from", "type": "address"},
|
|
72
|
+
{"name": "to", "type": "address"},
|
|
73
|
+
{"name": "amount", "type": "uint256"}
|
|
74
|
+
],
|
|
75
|
+
"outputs": [{"name": "", "type": "bool"}],
|
|
76
|
+
"stateMutability": "nonpayable"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "function",
|
|
80
|
+
"name": "nonces",
|
|
81
|
+
"inputs": [{"name": "owner", "type": "address"}],
|
|
82
|
+
"outputs": [{"name": "", "type": "uint256"}],
|
|
83
|
+
"stateMutability": "view"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "function",
|
|
87
|
+
"name": "DOMAIN_SEPARATOR",
|
|
88
|
+
"inputs": [],
|
|
89
|
+
"outputs": [{"name": "", "type": "bytes32"}],
|
|
90
|
+
"stateMutability": "view"
|
|
91
|
+
}
|
|
92
|
+
]
|