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,352 @@
1
+ [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [
5
+ {
6
+ "indexed": false,
7
+ "internalType": "uint32",
8
+ "name": "productId",
9
+ "type": "uint32"
10
+ }
11
+ ],
12
+ "name": "AddProduct",
13
+ "type": "event"
14
+ },
15
+ {
16
+ "inputs": [
17
+ {
18
+ "components": [
19
+ {
20
+ "internalType": "uint32",
21
+ "name": "productId",
22
+ "type": "uint32"
23
+ },
24
+ {
25
+ "internalType": "bytes32",
26
+ "name": "subaccount",
27
+ "type": "bytes32"
28
+ },
29
+ {
30
+ "internalType": "int128",
31
+ "name": "amountDelta",
32
+ "type": "int128"
33
+ },
34
+ {
35
+ "internalType": "int128",
36
+ "name": "vQuoteDelta",
37
+ "type": "int128"
38
+ }
39
+ ],
40
+ "internalType": "struct IProductEngine.ProductDelta[]",
41
+ "name": "deltas",
42
+ "type": "tuple[]"
43
+ }
44
+ ],
45
+ "name": "applyDeltas",
46
+ "outputs": [],
47
+ "stateMutability": "nonpayable",
48
+ "type": "function"
49
+ },
50
+ {
51
+ "inputs": [
52
+ {
53
+ "internalType": "uint32",
54
+ "name": "productId",
55
+ "type": "uint32"
56
+ },
57
+ {
58
+ "internalType": "bytes32",
59
+ "name": "subaccount",
60
+ "type": "bytes32"
61
+ },
62
+ {
63
+ "internalType": "int128",
64
+ "name": "amountLp",
65
+ "type": "int128"
66
+ }
67
+ ],
68
+ "name": "burnLp",
69
+ "outputs": [
70
+ {
71
+ "internalType": "int128",
72
+ "name": "",
73
+ "type": "int128"
74
+ },
75
+ {
76
+ "internalType": "int128",
77
+ "name": "",
78
+ "type": "int128"
79
+ }
80
+ ],
81
+ "stateMutability": "nonpayable",
82
+ "type": "function"
83
+ },
84
+ {
85
+ "inputs": [
86
+ {
87
+ "internalType": "bytes32",
88
+ "name": "liquidatee",
89
+ "type": "bytes32"
90
+ },
91
+ {
92
+ "internalType": "bytes32",
93
+ "name": "liquidator",
94
+ "type": "bytes32"
95
+ },
96
+ {
97
+ "internalType": "address",
98
+ "name": "feeCalculator",
99
+ "type": "address"
100
+ }
101
+ ],
102
+ "name": "decomposeLps",
103
+ "outputs": [
104
+ {
105
+ "internalType": "int128",
106
+ "name": "",
107
+ "type": "int128"
108
+ }
109
+ ],
110
+ "stateMutability": "nonpayable",
111
+ "type": "function"
112
+ },
113
+ {
114
+ "inputs": [
115
+ {
116
+ "internalType": "uint32",
117
+ "name": "productId",
118
+ "type": "uint32"
119
+ },
120
+ {
121
+ "internalType": "bytes32",
122
+ "name": "subaccount",
123
+ "type": "bytes32"
124
+ }
125
+ ],
126
+ "name": "getBalanceAmount",
127
+ "outputs": [
128
+ {
129
+ "internalType": "int128",
130
+ "name": "",
131
+ "type": "int128"
132
+ }
133
+ ],
134
+ "stateMutability": "view",
135
+ "type": "function"
136
+ },
137
+ {
138
+ "inputs": [],
139
+ "name": "getClearinghouse",
140
+ "outputs": [
141
+ {
142
+ "internalType": "address",
143
+ "name": "",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "stateMutability": "view",
148
+ "type": "function"
149
+ },
150
+ {
151
+ "inputs": [],
152
+ "name": "getEngineType",
153
+ "outputs": [
154
+ {
155
+ "internalType": "enum IProductEngine.EngineType",
156
+ "name": "",
157
+ "type": "uint8"
158
+ }
159
+ ],
160
+ "stateMutability": "pure",
161
+ "type": "function"
162
+ },
163
+ {
164
+ "inputs": [
165
+ {
166
+ "internalType": "uint32",
167
+ "name": "productId",
168
+ "type": "uint32"
169
+ }
170
+ ],
171
+ "name": "getOrderbook",
172
+ "outputs": [
173
+ {
174
+ "internalType": "address",
175
+ "name": "",
176
+ "type": "address"
177
+ }
178
+ ],
179
+ "stateMutability": "view",
180
+ "type": "function"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "getProductIds",
185
+ "outputs": [
186
+ {
187
+ "internalType": "uint32[]",
188
+ "name": "",
189
+ "type": "uint32[]"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "inputs": [
197
+ {
198
+ "internalType": "address",
199
+ "name": "_clearinghouse",
200
+ "type": "address"
201
+ },
202
+ {
203
+ "internalType": "address",
204
+ "name": "_quote",
205
+ "type": "address"
206
+ },
207
+ {
208
+ "internalType": "address",
209
+ "name": "_endpoint",
210
+ "type": "address"
211
+ },
212
+ {
213
+ "internalType": "address",
214
+ "name": "_admin",
215
+ "type": "address"
216
+ },
217
+ {
218
+ "internalType": "address",
219
+ "name": "_fees",
220
+ "type": "address"
221
+ }
222
+ ],
223
+ "name": "initialize",
224
+ "outputs": [],
225
+ "stateMutability": "nonpayable",
226
+ "type": "function"
227
+ },
228
+ {
229
+ "inputs": [
230
+ {
231
+ "internalType": "uint32",
232
+ "name": "productId",
233
+ "type": "uint32"
234
+ },
235
+ {
236
+ "internalType": "bytes32",
237
+ "name": "subaccount",
238
+ "type": "bytes32"
239
+ },
240
+ {
241
+ "internalType": "int128",
242
+ "name": "amountBase",
243
+ "type": "int128"
244
+ },
245
+ {
246
+ "internalType": "int128",
247
+ "name": "quoteAmountLow",
248
+ "type": "int128"
249
+ },
250
+ {
251
+ "internalType": "int128",
252
+ "name": "quoteAmountHigh",
253
+ "type": "int128"
254
+ }
255
+ ],
256
+ "name": "mintLp",
257
+ "outputs": [],
258
+ "stateMutability": "nonpayable",
259
+ "type": "function"
260
+ },
261
+ {
262
+ "inputs": [
263
+ {
264
+ "internalType": "uint32",
265
+ "name": "productId",
266
+ "type": "uint32"
267
+ },
268
+ {
269
+ "internalType": "int128",
270
+ "name": "baseDelta",
271
+ "type": "int128"
272
+ },
273
+ {
274
+ "internalType": "int128",
275
+ "name": "quoteDelta",
276
+ "type": "int128"
277
+ }
278
+ ],
279
+ "name": "swapLp",
280
+ "outputs": [
281
+ {
282
+ "internalType": "int128",
283
+ "name": "",
284
+ "type": "int128"
285
+ },
286
+ {
287
+ "internalType": "int128",
288
+ "name": "",
289
+ "type": "int128"
290
+ }
291
+ ],
292
+ "stateMutability": "nonpayable",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [
297
+ {
298
+ "internalType": "uint32",
299
+ "name": "productId",
300
+ "type": "uint32"
301
+ },
302
+ {
303
+ "internalType": "int128",
304
+ "name": "amount",
305
+ "type": "int128"
306
+ },
307
+ {
308
+ "internalType": "int128",
309
+ "name": "priceX18",
310
+ "type": "int128"
311
+ },
312
+ {
313
+ "internalType": "int128",
314
+ "name": "sizeIncrement",
315
+ "type": "int128"
316
+ },
317
+ {
318
+ "internalType": "int128",
319
+ "name": "lpSpreadX18",
320
+ "type": "int128"
321
+ }
322
+ ],
323
+ "name": "swapLp",
324
+ "outputs": [
325
+ {
326
+ "internalType": "int128",
327
+ "name": "",
328
+ "type": "int128"
329
+ },
330
+ {
331
+ "internalType": "int128",
332
+ "name": "",
333
+ "type": "int128"
334
+ }
335
+ ],
336
+ "stateMutability": "nonpayable",
337
+ "type": "function"
338
+ },
339
+ {
340
+ "inputs": [
341
+ {
342
+ "internalType": "bytes",
343
+ "name": "txn",
344
+ "type": "bytes"
345
+ }
346
+ ],
347
+ "name": "updateProduct",
348
+ "outputs": [],
349
+ "stateMutability": "nonpayable",
350
+ "type": "function"
351
+ }
352
+ ]