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,185 @@
1
+ [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [
5
+ {
6
+ "indexed": true,
7
+ "internalType": "address",
8
+ "name": "owner",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "indexed": true,
13
+ "internalType": "address",
14
+ "name": "spender",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "indexed": false,
19
+ "internalType": "uint256",
20
+ "name": "value",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "name": "Approval",
25
+ "type": "event"
26
+ },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ {
31
+ "indexed": true,
32
+ "internalType": "address",
33
+ "name": "from",
34
+ "type": "address"
35
+ },
36
+ {
37
+ "indexed": true,
38
+ "internalType": "address",
39
+ "name": "to",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "indexed": false,
44
+ "internalType": "uint256",
45
+ "name": "value",
46
+ "type": "uint256"
47
+ }
48
+ ],
49
+ "name": "Transfer",
50
+ "type": "event"
51
+ },
52
+ {
53
+ "inputs": [
54
+ {
55
+ "internalType": "address",
56
+ "name": "owner",
57
+ "type": "address"
58
+ },
59
+ {
60
+ "internalType": "address",
61
+ "name": "spender",
62
+ "type": "address"
63
+ }
64
+ ],
65
+ "name": "allowance",
66
+ "outputs": [
67
+ {
68
+ "internalType": "uint256",
69
+ "name": "",
70
+ "type": "uint256"
71
+ }
72
+ ],
73
+ "stateMutability": "view",
74
+ "type": "function"
75
+ },
76
+ {
77
+ "inputs": [
78
+ {
79
+ "internalType": "address",
80
+ "name": "spender",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "internalType": "uint256",
85
+ "name": "amount",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "name": "approve",
90
+ "outputs": [
91
+ {
92
+ "internalType": "bool",
93
+ "name": "",
94
+ "type": "bool"
95
+ }
96
+ ],
97
+ "stateMutability": "nonpayable",
98
+ "type": "function"
99
+ },
100
+ {
101
+ "inputs": [
102
+ {
103
+ "internalType": "address",
104
+ "name": "account",
105
+ "type": "address"
106
+ }
107
+ ],
108
+ "name": "balanceOf",
109
+ "outputs": [
110
+ {
111
+ "internalType": "uint256",
112
+ "name": "",
113
+ "type": "uint256"
114
+ }
115
+ ],
116
+ "stateMutability": "view",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [],
121
+ "name": "totalSupply",
122
+ "outputs": [
123
+ {
124
+ "internalType": "uint256",
125
+ "name": "",
126
+ "type": "uint256"
127
+ }
128
+ ],
129
+ "stateMutability": "view",
130
+ "type": "function"
131
+ },
132
+ {
133
+ "inputs": [
134
+ {
135
+ "internalType": "address",
136
+ "name": "to",
137
+ "type": "address"
138
+ },
139
+ {
140
+ "internalType": "uint256",
141
+ "name": "amount",
142
+ "type": "uint256"
143
+ }
144
+ ],
145
+ "name": "transfer",
146
+ "outputs": [
147
+ {
148
+ "internalType": "bool",
149
+ "name": "",
150
+ "type": "bool"
151
+ }
152
+ ],
153
+ "stateMutability": "nonpayable",
154
+ "type": "function"
155
+ },
156
+ {
157
+ "inputs": [
158
+ {
159
+ "internalType": "address",
160
+ "name": "from",
161
+ "type": "address"
162
+ },
163
+ {
164
+ "internalType": "address",
165
+ "name": "to",
166
+ "type": "address"
167
+ },
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "amount",
171
+ "type": "uint256"
172
+ }
173
+ ],
174
+ "name": "transferFrom",
175
+ "outputs": [
176
+ {
177
+ "internalType": "bool",
178
+ "name": "",
179
+ "type": "bool"
180
+ }
181
+ ],
182
+ "stateMutability": "nonpayable",
183
+ "type": "function"
184
+ }
185
+ ]
@@ -0,0 +1,250 @@
1
+ [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [],
5
+ "name": "SubmitTransactions",
6
+ "type": "event"
7
+ },
8
+ {
9
+ "inputs": [
10
+ {
11
+ "internalType": "bytes12",
12
+ "name": "subaccountName",
13
+ "type": "bytes12"
14
+ },
15
+ {
16
+ "internalType": "uint32",
17
+ "name": "productId",
18
+ "type": "uint32"
19
+ },
20
+ {
21
+ "internalType": "uint128",
22
+ "name": "amount",
23
+ "type": "uint128"
24
+ }
25
+ ],
26
+ "name": "depositCollateral",
27
+ "outputs": [],
28
+ "stateMutability": "nonpayable",
29
+ "type": "function"
30
+ },
31
+ {
32
+ "inputs": [
33
+ {
34
+ "internalType": "bytes32",
35
+ "name": "subaccount",
36
+ "type": "bytes32"
37
+ },
38
+ {
39
+ "internalType": "uint32",
40
+ "name": "productId",
41
+ "type": "uint32"
42
+ },
43
+ {
44
+ "internalType": "uint128",
45
+ "name": "amount",
46
+ "type": "uint128"
47
+ },
48
+ {
49
+ "internalType": "string",
50
+ "name": "referralCode",
51
+ "type": "string"
52
+ }
53
+ ],
54
+ "name": "depositCollateralWithReferral",
55
+ "outputs": [],
56
+ "stateMutability": "nonpayable",
57
+ "type": "function"
58
+ },
59
+ {
60
+ "inputs": [
61
+ {
62
+ "internalType": "bytes12",
63
+ "name": "subaccountName",
64
+ "type": "bytes12"
65
+ },
66
+ {
67
+ "internalType": "uint32",
68
+ "name": "productId",
69
+ "type": "uint32"
70
+ },
71
+ {
72
+ "internalType": "uint128",
73
+ "name": "amount",
74
+ "type": "uint128"
75
+ },
76
+ {
77
+ "internalType": "string",
78
+ "name": "referralCode",
79
+ "type": "string"
80
+ }
81
+ ],
82
+ "name": "depositCollateralWithReferral",
83
+ "outputs": [],
84
+ "stateMutability": "nonpayable",
85
+ "type": "function"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "uint32",
91
+ "name": "productId",
92
+ "type": "uint32"
93
+ }
94
+ ],
95
+ "name": "getBook",
96
+ "outputs": [
97
+ {
98
+ "internalType": "address",
99
+ "name": "",
100
+ "type": "address"
101
+ }
102
+ ],
103
+ "stateMutability": "view",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [
108
+ {
109
+ "internalType": "address",
110
+ "name": "sender",
111
+ "type": "address"
112
+ }
113
+ ],
114
+ "name": "getNonce",
115
+ "outputs": [
116
+ {
117
+ "internalType": "uint64",
118
+ "name": "",
119
+ "type": "uint64"
120
+ }
121
+ ],
122
+ "stateMutability": "view",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [
127
+ {
128
+ "internalType": "uint32",
129
+ "name": "productId",
130
+ "type": "uint32"
131
+ }
132
+ ],
133
+ "name": "getPriceX18",
134
+ "outputs": [
135
+ {
136
+ "internalType": "int128",
137
+ "name": "",
138
+ "type": "int128"
139
+ }
140
+ ],
141
+ "stateMutability": "view",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [
146
+ {
147
+ "internalType": "uint32",
148
+ "name": "healthGroup",
149
+ "type": "uint32"
150
+ }
151
+ ],
152
+ "name": "getPricesX18",
153
+ "outputs": [
154
+ {
155
+ "components": [
156
+ {
157
+ "internalType": "int128",
158
+ "name": "spotPriceX18",
159
+ "type": "int128"
160
+ },
161
+ {
162
+ "internalType": "int128",
163
+ "name": "perpPriceX18",
164
+ "type": "int128"
165
+ }
166
+ ],
167
+ "internalType": "struct IEndpoint.Prices",
168
+ "name": "",
169
+ "type": "tuple"
170
+ }
171
+ ],
172
+ "stateMutability": "view",
173
+ "type": "function"
174
+ },
175
+ {
176
+ "inputs": [],
177
+ "name": "getTime",
178
+ "outputs": [
179
+ {
180
+ "internalType": "uint128",
181
+ "name": "",
182
+ "type": "uint128"
183
+ }
184
+ ],
185
+ "stateMutability": "view",
186
+ "type": "function"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "getVersion",
191
+ "outputs": [
192
+ {
193
+ "internalType": "uint64",
194
+ "name": "",
195
+ "type": "uint64"
196
+ }
197
+ ],
198
+ "stateMutability": "nonpayable",
199
+ "type": "function"
200
+ },
201
+ {
202
+ "inputs": [
203
+ {
204
+ "internalType": "uint32",
205
+ "name": "productId",
206
+ "type": "uint32"
207
+ },
208
+ {
209
+ "internalType": "address",
210
+ "name": "book",
211
+ "type": "address"
212
+ }
213
+ ],
214
+ "name": "setBook",
215
+ "outputs": [],
216
+ "stateMutability": "nonpayable",
217
+ "type": "function"
218
+ },
219
+ {
220
+ "inputs": [
221
+ {
222
+ "internalType": "bytes",
223
+ "name": "transaction",
224
+ "type": "bytes"
225
+ }
226
+ ],
227
+ "name": "submitSlowModeTransaction",
228
+ "outputs": [],
229
+ "stateMutability": "nonpayable",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "inputs": [
234
+ {
235
+ "internalType": "uint64",
236
+ "name": "idx",
237
+ "type": "uint64"
238
+ },
239
+ {
240
+ "internalType": "bytes[]",
241
+ "name": "transactions",
242
+ "type": "bytes[]"
243
+ }
244
+ ],
245
+ "name": "submitTransactionsChecked",
246
+ "outputs": [],
247
+ "stateMutability": "nonpayable",
248
+ "type": "function"
249
+ }
250
+ ]
@@ -0,0 +1,76 @@
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": "week",
15
+ "type": "uint32"
16
+ },
17
+ {
18
+ "indexed": false,
19
+ "internalType": "uint256",
20
+ "name": "amount",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "name": "ClaimArb",
25
+ "type": "event"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "components": [
31
+ {
32
+ "internalType": "uint32",
33
+ "name": "week",
34
+ "type": "uint32"
35
+ },
36
+ {
37
+ "internalType": "uint256",
38
+ "name": "totalAmount",
39
+ "type": "uint256"
40
+ },
41
+ {
42
+ "internalType": "bytes32[]",
43
+ "name": "proof",
44
+ "type": "bytes32[]"
45
+ }
46
+ ],
47
+ "internalType": "struct IArbAirdrop.ClaimProof[]",
48
+ "name": "claimProofs",
49
+ "type": "tuple[]"
50
+ }
51
+ ],
52
+ "name": "claim",
53
+ "outputs": [],
54
+ "stateMutability": "nonpayable",
55
+ "type": "function"
56
+ },
57
+ {
58
+ "inputs": [
59
+ {
60
+ "internalType": "address",
61
+ "name": "account",
62
+ "type": "address"
63
+ }
64
+ ],
65
+ "name": "getClaimed",
66
+ "outputs": [
67
+ {
68
+ "internalType": "uint256[]",
69
+ "name": "",
70
+ "type": "uint256[]"
71
+ }
72
+ ],
73
+ "stateMutability": "view",
74
+ "type": "function"
75
+ }
76
+ ]