nado-protocol 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 (78) hide show
  1. nado_protocol/__init__.py +0 -0
  2. nado_protocol/client/__init__.py +200 -0
  3. nado_protocol/client/apis/__init__.py +26 -0
  4. nado_protocol/client/apis/base.py +42 -0
  5. nado_protocol/client/apis/market/__init__.py +23 -0
  6. nado_protocol/client/apis/market/execute.py +192 -0
  7. nado_protocol/client/apis/market/query.py +310 -0
  8. nado_protocol/client/apis/perp/__init__.py +18 -0
  9. nado_protocol/client/apis/perp/query.py +30 -0
  10. nado_protocol/client/apis/rewards/__init__.py +6 -0
  11. nado_protocol/client/apis/rewards/execute.py +131 -0
  12. nado_protocol/client/apis/rewards/query.py +12 -0
  13. nado_protocol/client/apis/spot/__init__.py +23 -0
  14. nado_protocol/client/apis/spot/base.py +32 -0
  15. nado_protocol/client/apis/spot/execute.py +117 -0
  16. nado_protocol/client/apis/spot/query.py +79 -0
  17. nado_protocol/client/apis/subaccount/__init__.py +24 -0
  18. nado_protocol/client/apis/subaccount/execute.py +54 -0
  19. nado_protocol/client/apis/subaccount/query.py +145 -0
  20. nado_protocol/client/context.py +90 -0
  21. nado_protocol/contracts/__init__.py +377 -0
  22. nado_protocol/contracts/abis/Endpoint.json +636 -0
  23. nado_protocol/contracts/abis/FQuerier.json +1909 -0
  24. nado_protocol/contracts/abis/IClearinghouse.json +876 -0
  25. nado_protocol/contracts/abis/IERC20.json +185 -0
  26. nado_protocol/contracts/abis/IEndpoint.json +250 -0
  27. nado_protocol/contracts/abis/IFoundationRewardsAirdrop.json +76 -0
  28. nado_protocol/contracts/abis/IOffchainBook.json +536 -0
  29. nado_protocol/contracts/abis/IPerpEngine.json +931 -0
  30. nado_protocol/contracts/abis/IProductEngine.json +352 -0
  31. nado_protocol/contracts/abis/ISpotEngine.json +813 -0
  32. nado_protocol/contracts/abis/IStaking.json +288 -0
  33. nado_protocol/contracts/abis/IVrtxAirdrop.json +138 -0
  34. nado_protocol/contracts/abis/MockERC20.json +311 -0
  35. nado_protocol/contracts/deployments/deployment.test.json +18 -0
  36. nado_protocol/contracts/eip712/__init__.py +16 -0
  37. nado_protocol/contracts/eip712/domain.py +36 -0
  38. nado_protocol/contracts/eip712/sign.py +79 -0
  39. nado_protocol/contracts/eip712/types.py +154 -0
  40. nado_protocol/contracts/loader.py +55 -0
  41. nado_protocol/contracts/types.py +141 -0
  42. nado_protocol/engine_client/__init__.py +35 -0
  43. nado_protocol/engine_client/execute.py +416 -0
  44. nado_protocol/engine_client/query.py +481 -0
  45. nado_protocol/engine_client/types/__init__.py +113 -0
  46. nado_protocol/engine_client/types/execute.py +680 -0
  47. nado_protocol/engine_client/types/models.py +247 -0
  48. nado_protocol/engine_client/types/query.py +516 -0
  49. nado_protocol/engine_client/types/stream.py +6 -0
  50. nado_protocol/indexer_client/__init__.py +28 -0
  51. nado_protocol/indexer_client/query.py +466 -0
  52. nado_protocol/indexer_client/types/__init__.py +122 -0
  53. nado_protocol/indexer_client/types/models.py +364 -0
  54. nado_protocol/indexer_client/types/query.py +819 -0
  55. nado_protocol/trigger_client/__init__.py +17 -0
  56. nado_protocol/trigger_client/execute.py +118 -0
  57. nado_protocol/trigger_client/query.py +61 -0
  58. nado_protocol/trigger_client/types/__init__.py +7 -0
  59. nado_protocol/trigger_client/types/execute.py +89 -0
  60. nado_protocol/trigger_client/types/models.py +44 -0
  61. nado_protocol/trigger_client/types/query.py +77 -0
  62. nado_protocol/utils/__init__.py +37 -0
  63. nado_protocol/utils/backend.py +111 -0
  64. nado_protocol/utils/bytes32.py +159 -0
  65. nado_protocol/utils/enum.py +6 -0
  66. nado_protocol/utils/exceptions.py +58 -0
  67. nado_protocol/utils/execute.py +403 -0
  68. nado_protocol/utils/expiration.py +45 -0
  69. nado_protocol/utils/interest.py +66 -0
  70. nado_protocol/utils/math.py +67 -0
  71. nado_protocol/utils/model.py +79 -0
  72. nado_protocol/utils/nonce.py +33 -0
  73. nado_protocol/utils/subaccount.py +18 -0
  74. nado_protocol/utils/time.py +21 -0
  75. nado_protocol-0.1.0.dist-info/METADATA +157 -0
  76. nado_protocol-0.1.0.dist-info/RECORD +78 -0
  77. nado_protocol-0.1.0.dist-info/WHEEL +4 -0
  78. nado_protocol-0.1.0.dist-info/entry_points.txt +11 -0
@@ -0,0 +1,288 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "claimUsdc",
5
+ "outputs": [],
6
+ "stateMutability": "nonpayable",
7
+ "type": "function"
8
+ },
9
+ {
10
+ "inputs": [],
11
+ "name": "claimUsdcAndStake",
12
+ "outputs": [],
13
+ "stateMutability": "nonpayable",
14
+ "type": "function"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "claimVrtx",
19
+ "outputs": [],
20
+ "stateMutability": "nonpayable",
21
+ "type": "function"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "address",
27
+ "name": "account",
28
+ "type": "address"
29
+ }
30
+ ],
31
+ "name": "getEstimatedVrtxToStake",
32
+ "outputs": [
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "",
36
+ "type": "uint256"
37
+ }
38
+ ],
39
+ "stateMutability": "nonpayable",
40
+ "type": "function"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "getGlobalRewardsBreakdown",
45
+ "outputs": [
46
+ {
47
+ "components": [
48
+ {
49
+ "internalType": "uint64",
50
+ "name": "distributionTime",
51
+ "type": "uint64"
52
+ },
53
+ {
54
+ "internalType": "uint256",
55
+ "name": "rewardsAmount",
56
+ "type": "uint256"
57
+ }
58
+ ],
59
+ "internalType": "struct IStaking.GlobalRewardsBreakdown[]",
60
+ "name": "",
61
+ "type": "tuple[]"
62
+ }
63
+ ],
64
+ "stateMutability": "view",
65
+ "type": "function"
66
+ },
67
+ {
68
+ "inputs": [
69
+ {
70
+ "internalType": "address",
71
+ "name": "account",
72
+ "type": "address"
73
+ }
74
+ ],
75
+ "name": "getLastActionTimes",
76
+ "outputs": [
77
+ {
78
+ "components": [
79
+ {
80
+ "internalType": "uint64",
81
+ "name": "lastStakeTime",
82
+ "type": "uint64"
83
+ },
84
+ {
85
+ "internalType": "uint64",
86
+ "name": "lastWithdrawTime",
87
+ "type": "uint64"
88
+ }
89
+ ],
90
+ "internalType": "struct IStaking.LastActionTimes",
91
+ "name": "",
92
+ "type": "tuple"
93
+ }
94
+ ],
95
+ "stateMutability": "view",
96
+ "type": "function"
97
+ },
98
+ {
99
+ "inputs": [
100
+ {
101
+ "internalType": "address",
102
+ "name": "account",
103
+ "type": "address"
104
+ }
105
+ ],
106
+ "name": "getRewardsBreakdown",
107
+ "outputs": [
108
+ {
109
+ "internalType": "uint256[]",
110
+ "name": "",
111
+ "type": "uint256[]"
112
+ }
113
+ ],
114
+ "stateMutability": "view",
115
+ "type": "function"
116
+ },
117
+ {
118
+ "inputs": [
119
+ {
120
+ "internalType": "address",
121
+ "name": "account",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "name": "getScore",
126
+ "outputs": [
127
+ {
128
+ "internalType": "uint256",
129
+ "name": "",
130
+ "type": "uint256"
131
+ }
132
+ ],
133
+ "stateMutability": "view",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [],
138
+ "name": "getTotalScore",
139
+ "outputs": [
140
+ {
141
+ "internalType": "uint256",
142
+ "name": "",
143
+ "type": "uint256"
144
+ }
145
+ ],
146
+ "stateMutability": "view",
147
+ "type": "function"
148
+ },
149
+ {
150
+ "inputs": [],
151
+ "name": "getTotalVrtxStaked",
152
+ "outputs": [
153
+ {
154
+ "internalType": "uint256",
155
+ "name": "",
156
+ "type": "uint256"
157
+ }
158
+ ],
159
+ "stateMutability": "view",
160
+ "type": "function"
161
+ },
162
+ {
163
+ "inputs": [
164
+ {
165
+ "internalType": "address",
166
+ "name": "account",
167
+ "type": "address"
168
+ }
169
+ ],
170
+ "name": "getUsdcClaimable",
171
+ "outputs": [
172
+ {
173
+ "internalType": "uint256",
174
+ "name": "",
175
+ "type": "uint256"
176
+ }
177
+ ],
178
+ "stateMutability": "view",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "inputs": [
183
+ {
184
+ "internalType": "address",
185
+ "name": "account",
186
+ "type": "address"
187
+ }
188
+ ],
189
+ "name": "getVrtxStaked",
190
+ "outputs": [
191
+ {
192
+ "internalType": "uint256",
193
+ "name": "",
194
+ "type": "uint256"
195
+ }
196
+ ],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "getWithdrawLockingTime",
203
+ "outputs": [
204
+ {
205
+ "internalType": "uint64",
206
+ "name": "",
207
+ "type": "uint64"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "internalType": "address",
217
+ "name": "account",
218
+ "type": "address"
219
+ }
220
+ ],
221
+ "name": "getWithdrawnVrtxStates",
222
+ "outputs": [
223
+ {
224
+ "components": [
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "vrtxClaimable",
228
+ "type": "uint256"
229
+ },
230
+ {
231
+ "internalType": "uint256",
232
+ "name": "vrtxPendingUnlock",
233
+ "type": "uint256"
234
+ }
235
+ ],
236
+ "internalType": "struct IStaking.WithdrawnVrtxStates",
237
+ "name": "",
238
+ "type": "tuple"
239
+ }
240
+ ],
241
+ "stateMutability": "view",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [
246
+ {
247
+ "internalType": "uint256",
248
+ "name": "amount",
249
+ "type": "uint256"
250
+ }
251
+ ],
252
+ "name": "stake",
253
+ "outputs": [],
254
+ "stateMutability": "nonpayable",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [
259
+ {
260
+ "internalType": "address",
261
+ "name": "staker",
262
+ "type": "address"
263
+ },
264
+ {
265
+ "internalType": "uint256",
266
+ "name": "amount",
267
+ "type": "uint256"
268
+ }
269
+ ],
270
+ "name": "stakeAs",
271
+ "outputs": [],
272
+ "stateMutability": "nonpayable",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "amount",
280
+ "type": "uint256"
281
+ }
282
+ ],
283
+ "name": "withdraw",
284
+ "outputs": [],
285
+ "stateMutability": "nonpayable",
286
+ "type": "function"
287
+ }
288
+ ]
@@ -0,0 +1,138 @@
1
+ [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [
5
+ {
6
+ "indexed": true,
7
+ "internalType": "address",
8
+ "name": "account",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "indexed": false,
13
+ "internalType": "uint32",
14
+ "name": "epoch",
15
+ "type": "uint32"
16
+ },
17
+ {
18
+ "indexed": false,
19
+ "internalType": "uint256",
20
+ "name": "amount",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "name": "ClaimVrtx",
25
+ "type": "event"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "uint32",
31
+ "name": "epoch",
32
+ "type": "uint32"
33
+ },
34
+ {
35
+ "internalType": "uint256",
36
+ "name": "amount",
37
+ "type": "uint256"
38
+ },
39
+ {
40
+ "internalType": "uint256",
41
+ "name": "totalAmount",
42
+ "type": "uint256"
43
+ },
44
+ {
45
+ "internalType": "bytes32[]",
46
+ "name": "proof",
47
+ "type": "bytes32[]"
48
+ }
49
+ ],
50
+ "name": "claim",
51
+ "outputs": [],
52
+ "stateMutability": "nonpayable",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "uint32",
59
+ "name": "epoch",
60
+ "type": "uint32"
61
+ },
62
+ {
63
+ "internalType": "uint256",
64
+ "name": "amount",
65
+ "type": "uint256"
66
+ },
67
+ {
68
+ "internalType": "uint256",
69
+ "name": "totalAmount",
70
+ "type": "uint256"
71
+ },
72
+ {
73
+ "internalType": "bytes32[]",
74
+ "name": "proof",
75
+ "type": "bytes32[]"
76
+ }
77
+ ],
78
+ "name": "claimAndStake",
79
+ "outputs": [],
80
+ "stateMutability": "nonpayable",
81
+ "type": "function"
82
+ },
83
+ {
84
+ "inputs": [
85
+ {
86
+ "internalType": "uint256",
87
+ "name": "amount",
88
+ "type": "uint256"
89
+ },
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "totalAmount",
93
+ "type": "uint256"
94
+ },
95
+ {
96
+ "internalType": "bytes32[]",
97
+ "name": "proof",
98
+ "type": "bytes32[]"
99
+ }
100
+ ],
101
+ "name": "claimToLBA",
102
+ "outputs": [],
103
+ "stateMutability": "nonpayable",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [
108
+ {
109
+ "internalType": "address",
110
+ "name": "account",
111
+ "type": "address"
112
+ }
113
+ ],
114
+ "name": "getClaimed",
115
+ "outputs": [
116
+ {
117
+ "internalType": "uint256[]",
118
+ "name": "",
119
+ "type": "uint256[]"
120
+ }
121
+ ],
122
+ "stateMutability": "view",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [],
127
+ "name": "getClaimingDeadlines",
128
+ "outputs": [
129
+ {
130
+ "internalType": "uint64[]",
131
+ "name": "",
132
+ "type": "uint64[]"
133
+ }
134
+ ],
135
+ "stateMutability": "view",
136
+ "type": "function"
137
+ }
138
+ ]