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.
Files changed (64) hide show
  1. pynapse/__init__.py +6 -0
  2. pynapse/_version.py +1 -0
  3. pynapse/contracts/__init__.py +34 -0
  4. pynapse/contracts/abi_registry.py +11 -0
  5. pynapse/contracts/addresses.json +30 -0
  6. pynapse/contracts/erc20_abi.json +92 -0
  7. pynapse/contracts/errorsAbi.json +933 -0
  8. pynapse/contracts/filecoinPayV1Abi.json +2424 -0
  9. pynapse/contracts/filecoinWarmStorageServiceAbi.json +2363 -0
  10. pynapse/contracts/filecoinWarmStorageServiceStateViewAbi.json +651 -0
  11. pynapse/contracts/generated.py +35 -0
  12. pynapse/contracts/payments_abi.json +205 -0
  13. pynapse/contracts/pdpVerifierAbi.json +1266 -0
  14. pynapse/contracts/providerIdSetAbi.json +161 -0
  15. pynapse/contracts/serviceProviderRegistryAbi.json +1479 -0
  16. pynapse/contracts/sessionKeyRegistryAbi.json +147 -0
  17. pynapse/core/__init__.py +68 -0
  18. pynapse/core/abis.py +25 -0
  19. pynapse/core/chains.py +97 -0
  20. pynapse/core/constants.py +27 -0
  21. pynapse/core/errors.py +22 -0
  22. pynapse/core/piece.py +263 -0
  23. pynapse/core/rand.py +14 -0
  24. pynapse/core/typed_data.py +320 -0
  25. pynapse/core/utils.py +30 -0
  26. pynapse/evm/__init__.py +3 -0
  27. pynapse/evm/client.py +26 -0
  28. pynapse/filbeam/__init__.py +3 -0
  29. pynapse/filbeam/service.py +39 -0
  30. pynapse/payments/__init__.py +17 -0
  31. pynapse/payments/service.py +826 -0
  32. pynapse/pdp/__init__.py +21 -0
  33. pynapse/pdp/server.py +331 -0
  34. pynapse/pdp/types.py +38 -0
  35. pynapse/pdp/verifier.py +82 -0
  36. pynapse/retriever/__init__.py +12 -0
  37. pynapse/retriever/async_chain.py +227 -0
  38. pynapse/retriever/chain.py +209 -0
  39. pynapse/session/__init__.py +12 -0
  40. pynapse/session/key.py +30 -0
  41. pynapse/session/permissions.py +57 -0
  42. pynapse/session/registry.py +90 -0
  43. pynapse/sp_registry/__init__.py +11 -0
  44. pynapse/sp_registry/capabilities.py +25 -0
  45. pynapse/sp_registry/pdp_capabilities.py +102 -0
  46. pynapse/sp_registry/service.py +446 -0
  47. pynapse/sp_registry/types.py +52 -0
  48. pynapse/storage/__init__.py +57 -0
  49. pynapse/storage/async_context.py +682 -0
  50. pynapse/storage/async_manager.py +757 -0
  51. pynapse/storage/context.py +680 -0
  52. pynapse/storage/manager.py +758 -0
  53. pynapse/synapse.py +191 -0
  54. pynapse/utils/__init__.py +25 -0
  55. pynapse/utils/constants.py +25 -0
  56. pynapse/utils/errors.py +3 -0
  57. pynapse/utils/metadata.py +35 -0
  58. pynapse/utils/piece_url.py +16 -0
  59. pynapse/warm_storage/__init__.py +13 -0
  60. pynapse/warm_storage/service.py +513 -0
  61. synapse_filecoin_sdk-0.1.0.dist-info/METADATA +74 -0
  62. synapse_filecoin_sdk-0.1.0.dist-info/RECORD +64 -0
  63. synapse_filecoin_sdk-0.1.0.dist-info/WHEEL +4 -0
  64. synapse_filecoin_sdk-0.1.0.dist-info/licenses/LICENSE.md +228 -0
@@ -0,0 +1,205 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "accounts",
5
+ "inputs": [
6
+ {"name": "token", "type": "address"},
7
+ {"name": "owner", "type": "address"}
8
+ ],
9
+ "outputs": [
10
+ {"name": "funds", "type": "uint256"},
11
+ {"name": "lockupCurrent", "type": "uint256"},
12
+ {"name": "lockupRate", "type": "uint256"},
13
+ {"name": "lockupLastSettledAt", "type": "uint256"}
14
+ ],
15
+ "stateMutability": "view"
16
+ },
17
+ {
18
+ "type": "function",
19
+ "name": "getAccountInfoIfSettled",
20
+ "inputs": [
21
+ {"name": "token", "type": "address"},
22
+ {"name": "owner", "type": "address"}
23
+ ],
24
+ "outputs": [
25
+ {"name": "fundedUntilEpoch", "type": "uint256"},
26
+ {"name": "currentFunds", "type": "uint256"},
27
+ {"name": "availableFunds", "type": "uint256"},
28
+ {"name": "currentLockupRate", "type": "uint256"}
29
+ ],
30
+ "stateMutability": "view"
31
+ },
32
+ {
33
+ "type": "function",
34
+ "name": "deposit",
35
+ "inputs": [
36
+ {"name": "token", "type": "address"},
37
+ {"name": "to", "type": "address"},
38
+ {"name": "amount", "type": "uint256"}
39
+ ],
40
+ "outputs": [],
41
+ "stateMutability": "payable"
42
+ },
43
+ {
44
+ "type": "function",
45
+ "name": "withdraw",
46
+ "inputs": [
47
+ {"name": "token", "type": "address"},
48
+ {"name": "amount", "type": "uint256"}
49
+ ],
50
+ "outputs": [],
51
+ "stateMutability": "nonpayable"
52
+ },
53
+ {
54
+ "type": "function",
55
+ "name": "withdrawTo",
56
+ "inputs": [
57
+ {"name": "token", "type": "address"},
58
+ {"name": "to", "type": "address"},
59
+ {"name": "amount", "type": "uint256"}
60
+ ],
61
+ "outputs": [],
62
+ "stateMutability": "nonpayable"
63
+ },
64
+ {
65
+ "type": "function",
66
+ "name": "setOperatorApproval",
67
+ "inputs": [
68
+ {"name": "token", "type": "address"},
69
+ {"name": "operator", "type": "address"},
70
+ {"name": "approved", "type": "bool"},
71
+ {"name": "rateAllowance", "type": "uint256"},
72
+ {"name": "lockupAllowance", "type": "uint256"},
73
+ {"name": "maxLockupPeriod", "type": "uint256"}
74
+ ],
75
+ "outputs": [],
76
+ "stateMutability": "nonpayable"
77
+ },
78
+ {
79
+ "type": "function",
80
+ "name": "operatorApprovals",
81
+ "inputs": [
82
+ {"name": "token", "type": "address"},
83
+ {"name": "client", "type": "address"},
84
+ {"name": "operator", "type": "address"}
85
+ ],
86
+ "outputs": [
87
+ {"name": "isApproved", "type": "bool"},
88
+ {"name": "rateAllowance", "type": "uint256"},
89
+ {"name": "lockupAllowance", "type": "uint256"},
90
+ {"name": "rateUsed", "type": "uint256"},
91
+ {"name": "lockupUsed", "type": "uint256"},
92
+ {"name": "maxLockupPeriod", "type": "uint256"}
93
+ ],
94
+ "stateMutability": "view"
95
+ },
96
+ {
97
+ "type": "function",
98
+ "name": "getRail",
99
+ "inputs": [
100
+ {"name": "railId", "type": "uint256"}
101
+ ],
102
+ "outputs": [
103
+ {
104
+ "name": "",
105
+ "type": "tuple",
106
+ "components": [
107
+ {"name": "token", "type": "address"},
108
+ {"name": "from", "type": "address"},
109
+ {"name": "to", "type": "address"},
110
+ {"name": "operator", "type": "address"},
111
+ {"name": "validator", "type": "address"},
112
+ {"name": "paymentRate", "type": "uint256"},
113
+ {"name": "lockupPeriod", "type": "uint256"},
114
+ {"name": "lockupFixed", "type": "uint256"},
115
+ {"name": "settledUpTo", "type": "uint256"},
116
+ {"name": "endEpoch", "type": "uint256"},
117
+ {"name": "commissionRateBps", "type": "uint256"},
118
+ {"name": "serviceFeeRecipient", "type": "address"}
119
+ ]
120
+ }
121
+ ],
122
+ "stateMutability": "view"
123
+ },
124
+ {
125
+ "type": "function",
126
+ "name": "getRailsForPayerAndToken",
127
+ "inputs": [
128
+ {"name": "payer", "type": "address"},
129
+ {"name": "token", "type": "address"},
130
+ {"name": "offset", "type": "uint256"},
131
+ {"name": "limit", "type": "uint256"}
132
+ ],
133
+ "outputs": [
134
+ {
135
+ "name": "results",
136
+ "type": "tuple[]",
137
+ "components": [
138
+ {"name": "railId", "type": "uint256"},
139
+ {"name": "isTerminated", "type": "bool"},
140
+ {"name": "endEpoch", "type": "uint256"}
141
+ ]
142
+ },
143
+ {"name": "nextOffset", "type": "uint256"},
144
+ {"name": "total", "type": "uint256"}
145
+ ],
146
+ "stateMutability": "view"
147
+ },
148
+ {
149
+ "type": "function",
150
+ "name": "getRailsForPayeeAndToken",
151
+ "inputs": [
152
+ {"name": "payee", "type": "address"},
153
+ {"name": "token", "type": "address"},
154
+ {"name": "offset", "type": "uint256"},
155
+ {"name": "limit", "type": "uint256"}
156
+ ],
157
+ "outputs": [
158
+ {
159
+ "name": "results",
160
+ "type": "tuple[]",
161
+ "components": [
162
+ {"name": "railId", "type": "uint256"},
163
+ {"name": "isTerminated", "type": "bool"},
164
+ {"name": "endEpoch", "type": "uint256"}
165
+ ]
166
+ },
167
+ {"name": "nextOffset", "type": "uint256"},
168
+ {"name": "total", "type": "uint256"}
169
+ ],
170
+ "stateMutability": "view"
171
+ },
172
+ {
173
+ "type": "function",
174
+ "name": "settleRail",
175
+ "inputs": [
176
+ {"name": "railId", "type": "uint256"},
177
+ {"name": "untilEpoch", "type": "uint256"}
178
+ ],
179
+ "outputs": [
180
+ {"name": "totalSettledAmount", "type": "uint256"},
181
+ {"name": "totalNetPayeeAmount", "type": "uint256"},
182
+ {"name": "totalOperatorCommission", "type": "uint256"},
183
+ {"name": "totalNetworkFee", "type": "uint256"},
184
+ {"name": "finalSettledEpoch", "type": "uint256"},
185
+ {"name": "note", "type": "string"}
186
+ ],
187
+ "stateMutability": "payable"
188
+ },
189
+ {
190
+ "type": "function",
191
+ "name": "settleTerminatedRailWithoutValidation",
192
+ "inputs": [
193
+ {"name": "railId", "type": "uint256"}
194
+ ],
195
+ "outputs": [
196
+ {"name": "totalSettledAmount", "type": "uint256"},
197
+ {"name": "totalNetPayeeAmount", "type": "uint256"},
198
+ {"name": "totalOperatorCommission", "type": "uint256"},
199
+ {"name": "totalNetworkFee", "type": "uint256"},
200
+ {"name": "finalSettledEpoch", "type": "uint256"},
201
+ {"name": "note", "type": "string"}
202
+ ],
203
+ "stateMutability": "nonpayable"
204
+ }
205
+ ]