@n1xyz/nord-ts 0.0.1

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 (141) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +20 -0
  3. package/.prettierignore +1 -0
  4. package/README.md +110 -0
  5. package/dist/abis/ERC20_ABI.d.ts +39 -0
  6. package/dist/abis/ERC20_ABI.js +313 -0
  7. package/dist/abis/NORD_GETTERS_FACET_ABI.d.ts +34 -0
  8. package/dist/abis/NORD_GETTERS_FACET_ABI.js +195 -0
  9. package/dist/abis/NORD_RAMP_FACET_ABI.d.ts +35 -0
  10. package/dist/abis/NORD_RAMP_FACET_ABI.js +144 -0
  11. package/dist/abis/index.d.ts +3 -0
  12. package/dist/abis/index.js +9 -0
  13. package/dist/const.d.ts +11 -0
  14. package/dist/const.js +34 -0
  15. package/dist/gen/common.d.ts +63 -0
  16. package/dist/gen/common.js +205 -0
  17. package/dist/gen/nord.d.ts +705 -0
  18. package/dist/gen/nord.js +4784 -0
  19. package/dist/index.d.ts +5 -0
  20. package/dist/index.js +21 -0
  21. package/dist/nord/Nord.d.ts +76 -0
  22. package/dist/nord/Nord.js +376 -0
  23. package/dist/nord/NordImpl.d.ts +7 -0
  24. package/dist/nord/NordImpl.js +6 -0
  25. package/dist/nord/NordUser.d.ts +77 -0
  26. package/dist/nord/NordUser.js +249 -0
  27. package/dist/nord/actions.d.ts +101 -0
  28. package/dist/nord/actions.js +254 -0
  29. package/dist/nord/index.d.ts +2 -0
  30. package/dist/nord/index.js +9 -0
  31. package/dist/types.d.ts +343 -0
  32. package/dist/types.js +92 -0
  33. package/dist/utils.d.ts +114 -0
  34. package/dist/utils.js +257 -0
  35. package/docs/.nojekyll +1 -0
  36. package/docs/assets/highlight.css +92 -0
  37. package/docs/assets/icons.js +15 -0
  38. package/docs/assets/icons.svg +1 -0
  39. package/docs/assets/main.js +59 -0
  40. package/docs/assets/navigation.js +1 -0
  41. package/docs/assets/search.js +1 -0
  42. package/docs/assets/style.css +1415 -0
  43. package/docs/classes/Nord.html +44 -0
  44. package/docs/classes/NordUser.html +35 -0
  45. package/docs/classes/Subscriber.html +6 -0
  46. package/docs/enums/FillMode.html +5 -0
  47. package/docs/enums/KeyType.html +4 -0
  48. package/docs/enums/PeakTpsPeriodUnit.html +15 -0
  49. package/docs/enums/Side.html +3 -0
  50. package/docs/functions/assert.html +1 -0
  51. package/docs/functions/bigIntToProtoU128.html +4 -0
  52. package/docs/functions/checkPubKeyLength.html +1 -0
  53. package/docs/functions/checkedFetch.html +6 -0
  54. package/docs/functions/createWebSocketSubscription.html +12 -0
  55. package/docs/functions/decodeLengthDelimited.html +10 -0
  56. package/docs/functions/encodeLengthDelimited.html +6 -0
  57. package/docs/functions/fillModeToProtoFillMode.html +5 -0
  58. package/docs/functions/findMarket.html +1 -0
  59. package/docs/functions/findToken.html +1 -0
  60. package/docs/functions/makeWalletSignFn.html +6 -0
  61. package/docs/functions/optExpect.html +5 -0
  62. package/docs/functions/optMap.html +5 -0
  63. package/docs/functions/optUnwrap.html +2 -0
  64. package/docs/functions/panic.html +1 -0
  65. package/docs/functions/signAction.html +6 -0
  66. package/docs/functions/toScaledU128.html +8 -0
  67. package/docs/functions/toScaledU64.html +8 -0
  68. package/docs/index.html +21 -0
  69. package/docs/interfaces/Account.html +8 -0
  70. package/docs/interfaces/ActionInfo.html +8 -0
  71. package/docs/interfaces/ActionQuery.html +4 -0
  72. package/docs/interfaces/ActionResponse.html +8 -0
  73. package/docs/interfaces/ActionsExtendedInfo.html +10 -0
  74. package/docs/interfaces/ActionsQuery.html +5 -0
  75. package/docs/interfaces/ActionsResponse.html +6 -0
  76. package/docs/interfaces/AggregateMetrics.html +12 -0
  77. package/docs/interfaces/BlockQuery.html +6 -0
  78. package/docs/interfaces/BlockResponse.html +6 -0
  79. package/docs/interfaces/BlockSummary.html +8 -0
  80. package/docs/interfaces/BlockSummaryResponse.html +6 -0
  81. package/docs/interfaces/DeltaEvent.html +6 -0
  82. package/docs/interfaces/ERC20TokenInfo.html +5 -0
  83. package/docs/interfaces/Info.html +3 -0
  84. package/docs/interfaces/Market.html +6 -0
  85. package/docs/interfaces/MarketStats.html +7 -0
  86. package/docs/interfaces/MarketsStatsResponse.html +2 -0
  87. package/docs/interfaces/NordConfig.html +5 -0
  88. package/docs/interfaces/Order.html +6 -0
  89. package/docs/interfaces/OrderInfo.html +6 -0
  90. package/docs/interfaces/OrderbookOrder.html +6 -0
  91. package/docs/interfaces/OrderbookResponse.html +10 -0
  92. package/docs/interfaces/PerpMarketStats.html +5 -0
  93. package/docs/interfaces/RollmanActionExtendedInfo.html +4 -0
  94. package/docs/interfaces/RollmanActionInfo.html +4 -0
  95. package/docs/interfaces/RollmanActionResponse.html +4 -0
  96. package/docs/interfaces/RollmanActionsResponse.html +2 -0
  97. package/docs/interfaces/RollmanBlockResponse.html +3 -0
  98. package/docs/interfaces/SubscriberConfig.html +3 -0
  99. package/docs/interfaces/Token.html +5 -0
  100. package/docs/interfaces/Trade.html +5 -0
  101. package/docs/interfaces/TradeInfo.html +20 -0
  102. package/docs/interfaces/Trades.html +5 -0
  103. package/docs/interfaces/TradesQueryParams.html +10 -0
  104. package/docs/interfaces/TradesResponse.html +12 -0
  105. package/docs/modules.html +77 -0
  106. package/docs/types/BigIntValue.html +2 -0
  107. package/docs/variables/DEBUG_KEYS.html +1 -0
  108. package/docs/variables/DEFAULT_FUNDING_AMOUNTS.html +1 -0
  109. package/docs/variables/DEV_CONTRACT_ADDRESS.html +1 -0
  110. package/docs/variables/DEV_TOKEN_INFOS.html +1 -0
  111. package/docs/variables/DEV_URL.html +1 -0
  112. package/docs/variables/ERC20_ABI.html +1 -0
  113. package/docs/variables/EVM_DEV_URL.html +1 -0
  114. package/docs/variables/FAUCET_PRIVATE_ADDRESS.html +1 -0
  115. package/docs/variables/MAX_BUFFER_LEN.html +1 -0
  116. package/docs/variables/NORD_GETTERS_FACET_ABI.html +1 -0
  117. package/docs/variables/NORD_RAMP_FACET_ABI.html +1 -0
  118. package/docs/variables/SESSION_TTL.html +1 -0
  119. package/docs/variables/WEBSERVER_DEV_URL.html +1 -0
  120. package/docs/variables/ZERO_DECIMAL.html +1 -0
  121. package/jest.config.ts +9 -0
  122. package/nodemon.json +4 -0
  123. package/package.json +61 -0
  124. package/protoc-generate.sh +23 -0
  125. package/src/abis/ERC20_ABI.ts +310 -0
  126. package/src/abis/NORD_GETTERS_FACET_ABI.ts +192 -0
  127. package/src/abis/NORD_RAMP_FACET_ABI.ts +141 -0
  128. package/src/abis/index.ts +3 -0
  129. package/src/const.ts +39 -0
  130. package/src/gen/common.ts +280 -0
  131. package/src/gen/nord.ts +5666 -0
  132. package/src/index.ts +5 -0
  133. package/src/nord/Nord.ts +504 -0
  134. package/src/nord/NordImpl.ts +8 -0
  135. package/src/nord/NordUser.ts +469 -0
  136. package/src/nord/actions.ts +484 -0
  137. package/src/nord/index.ts +2 -0
  138. package/src/types.ts +393 -0
  139. package/src/utils.ts +300 -0
  140. package/tests/utils.spec.ts +154 -0
  141. package/tsconfig.json +24 -0
@@ -0,0 +1,310 @@
1
+ export const ERC20_ABI = [
2
+ {
3
+ type: "function",
4
+ name: "allowance",
5
+ inputs: [
6
+ {
7
+ name: "owner",
8
+ type: "address",
9
+ internalType: "address",
10
+ },
11
+ {
12
+ name: "spender",
13
+ type: "address",
14
+ internalType: "address",
15
+ },
16
+ ],
17
+ outputs: [
18
+ {
19
+ name: "",
20
+ type: "uint256",
21
+ internalType: "uint256",
22
+ },
23
+ ],
24
+ stateMutability: "view",
25
+ },
26
+ {
27
+ type: "function",
28
+ name: "approve",
29
+ inputs: [
30
+ {
31
+ name: "spender",
32
+ type: "address",
33
+ internalType: "address",
34
+ },
35
+ {
36
+ name: "value",
37
+ type: "uint256",
38
+ internalType: "uint256",
39
+ },
40
+ ],
41
+ outputs: [
42
+ {
43
+ name: "",
44
+ type: "bool",
45
+ internalType: "bool",
46
+ },
47
+ ],
48
+ stateMutability: "nonpayable",
49
+ },
50
+ {
51
+ type: "function",
52
+ name: "balanceOf",
53
+ inputs: [
54
+ {
55
+ name: "account",
56
+ type: "address",
57
+ internalType: "address",
58
+ },
59
+ ],
60
+ outputs: [
61
+ {
62
+ name: "",
63
+ type: "uint256",
64
+ internalType: "uint256",
65
+ },
66
+ ],
67
+ stateMutability: "view",
68
+ },
69
+ {
70
+ type: "function",
71
+ name: "decimals",
72
+ inputs: [],
73
+ outputs: [
74
+ {
75
+ name: "",
76
+ type: "uint8",
77
+ internalType: "uint8",
78
+ },
79
+ ],
80
+ stateMutability: "view",
81
+ },
82
+ {
83
+ type: "function",
84
+ name: "name",
85
+ inputs: [],
86
+ outputs: [
87
+ {
88
+ name: "",
89
+ type: "string",
90
+ internalType: "string",
91
+ },
92
+ ],
93
+ stateMutability: "view",
94
+ },
95
+ {
96
+ type: "function",
97
+ name: "symbol",
98
+ inputs: [],
99
+ outputs: [
100
+ {
101
+ name: "",
102
+ type: "string",
103
+ internalType: "string",
104
+ },
105
+ ],
106
+ stateMutability: "view",
107
+ },
108
+ {
109
+ type: "function",
110
+ name: "totalSupply",
111
+ inputs: [],
112
+ outputs: [
113
+ {
114
+ name: "",
115
+ type: "uint256",
116
+ internalType: "uint256",
117
+ },
118
+ ],
119
+ stateMutability: "view",
120
+ },
121
+ {
122
+ type: "function",
123
+ name: "transfer",
124
+ inputs: [
125
+ {
126
+ name: "to",
127
+ type: "address",
128
+ internalType: "address",
129
+ },
130
+ {
131
+ name: "value",
132
+ type: "uint256",
133
+ internalType: "uint256",
134
+ },
135
+ ],
136
+ outputs: [
137
+ {
138
+ name: "",
139
+ type: "bool",
140
+ internalType: "bool",
141
+ },
142
+ ],
143
+ stateMutability: "nonpayable",
144
+ },
145
+ {
146
+ type: "function",
147
+ name: "transferFrom",
148
+ inputs: [
149
+ {
150
+ name: "from",
151
+ type: "address",
152
+ internalType: "address",
153
+ },
154
+ {
155
+ name: "to",
156
+ type: "address",
157
+ internalType: "address",
158
+ },
159
+ {
160
+ name: "value",
161
+ type: "uint256",
162
+ internalType: "uint256",
163
+ },
164
+ ],
165
+ outputs: [
166
+ {
167
+ name: "",
168
+ type: "bool",
169
+ internalType: "bool",
170
+ },
171
+ ],
172
+ stateMutability: "nonpayable",
173
+ },
174
+ {
175
+ type: "event",
176
+ name: "Approval",
177
+ inputs: [
178
+ {
179
+ name: "owner",
180
+ type: "address",
181
+ indexed: true,
182
+ internalType: "address",
183
+ },
184
+ {
185
+ name: "spender",
186
+ type: "address",
187
+ indexed: true,
188
+ internalType: "address",
189
+ },
190
+ {
191
+ name: "value",
192
+ type: "uint256",
193
+ indexed: false,
194
+ internalType: "uint256",
195
+ },
196
+ ],
197
+ anonymous: false,
198
+ },
199
+ {
200
+ type: "event",
201
+ name: "Transfer",
202
+ inputs: [
203
+ {
204
+ name: "from",
205
+ type: "address",
206
+ indexed: true,
207
+ internalType: "address",
208
+ },
209
+ {
210
+ name: "to",
211
+ type: "address",
212
+ indexed: true,
213
+ internalType: "address",
214
+ },
215
+ {
216
+ name: "value",
217
+ type: "uint256",
218
+ indexed: false,
219
+ internalType: "uint256",
220
+ },
221
+ ],
222
+ anonymous: false,
223
+ },
224
+ {
225
+ type: "error",
226
+ name: "ERC20InsufficientAllowance",
227
+ inputs: [
228
+ {
229
+ name: "spender",
230
+ type: "address",
231
+ internalType: "address",
232
+ },
233
+ {
234
+ name: "allowance",
235
+ type: "uint256",
236
+ internalType: "uint256",
237
+ },
238
+ {
239
+ name: "needed",
240
+ type: "uint256",
241
+ internalType: "uint256",
242
+ },
243
+ ],
244
+ },
245
+ {
246
+ type: "error",
247
+ name: "ERC20InsufficientBalance",
248
+ inputs: [
249
+ {
250
+ name: "sender",
251
+ type: "address",
252
+ internalType: "address",
253
+ },
254
+ {
255
+ name: "balance",
256
+ type: "uint256",
257
+ internalType: "uint256",
258
+ },
259
+ {
260
+ name: "needed",
261
+ type: "uint256",
262
+ internalType: "uint256",
263
+ },
264
+ ],
265
+ },
266
+ {
267
+ type: "error",
268
+ name: "ERC20InvalidApprover",
269
+ inputs: [
270
+ {
271
+ name: "approver",
272
+ type: "address",
273
+ internalType: "address",
274
+ },
275
+ ],
276
+ },
277
+ {
278
+ type: "error",
279
+ name: "ERC20InvalidReceiver",
280
+ inputs: [
281
+ {
282
+ name: "receiver",
283
+ type: "address",
284
+ internalType: "address",
285
+ },
286
+ ],
287
+ },
288
+ {
289
+ type: "error",
290
+ name: "ERC20InvalidSender",
291
+ inputs: [
292
+ {
293
+ name: "sender",
294
+ type: "address",
295
+ internalType: "address",
296
+ },
297
+ ],
298
+ },
299
+ {
300
+ type: "error",
301
+ name: "ERC20InvalidSpender",
302
+ inputs: [
303
+ {
304
+ name: "spender",
305
+ type: "address",
306
+ internalType: "address",
307
+ },
308
+ ],
309
+ },
310
+ ];
@@ -0,0 +1,192 @@
1
+ export const NORD_GETTERS_FACET_ABI = [
2
+ {
3
+ type: "function",
4
+ name: "getActionId",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
7
+ stateMutability: "view",
8
+ },
9
+ {
10
+ type: "function",
11
+ name: "getActionNonce",
12
+ inputs: [],
13
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
14
+ stateMutability: "view",
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "getAssetInfo",
19
+ inputs: [{ name: "assetId", type: "uint256", internalType: "uint256" }],
20
+ outputs: [
21
+ { name: "addr", type: "address", internalType: "address" },
22
+ {
23
+ name: "decimals",
24
+ type: "uint8",
25
+ internalType: "uint8",
26
+ },
27
+ { name: "added", type: "bool", internalType: "bool" },
28
+ ],
29
+ stateMutability: "view",
30
+ },
31
+ {
32
+ type: "function",
33
+ name: "getBlockId",
34
+ inputs: [],
35
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
36
+ stateMutability: "view",
37
+ },
38
+ {
39
+ type: "function",
40
+ name: "getCurrentStateHash",
41
+ inputs: [],
42
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
43
+ stateMutability: "view",
44
+ },
45
+ {
46
+ type: "function",
47
+ name: "getDAFactRegistry",
48
+ inputs: [],
49
+ outputs: [{ name: "", type: "address", internalType: "address" }],
50
+ stateMutability: "view",
51
+ },
52
+ {
53
+ type: "function",
54
+ name: "getFraudProofParticipant",
55
+ inputs: [{ name: "index", type: "uint256", internalType: "uint256" }],
56
+ outputs: [{ name: "", type: "address", internalType: "address" }],
57
+ stateMutability: "view",
58
+ },
59
+ {
60
+ type: "function",
61
+ name: "getFraudProofParticipantCount",
62
+ inputs: [],
63
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
64
+ stateMutability: "view",
65
+ },
66
+ {
67
+ type: "function",
68
+ name: "getFraudProofParticipants",
69
+ inputs: [],
70
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
71
+ stateMutability: "view",
72
+ },
73
+ {
74
+ type: "function",
75
+ name: "getLastFinalizedStateUpdateInfo",
76
+ inputs: [],
77
+ outputs: [
78
+ { name: "blockId", type: "uint64", internalType: "uint64" },
79
+ {
80
+ name: "actionId",
81
+ type: "uint64",
82
+ internalType: "uint64",
83
+ },
84
+ { name: "currentStateHash", type: "uint256", internalType: "uint256" },
85
+ ],
86
+ stateMutability: "view",
87
+ },
88
+ {
89
+ type: "function",
90
+ name: "getNextProposedBlockId",
91
+ inputs: [],
92
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
93
+ stateMutability: "view",
94
+ },
95
+ {
96
+ type: "function",
97
+ name: "getOperator",
98
+ inputs: [{ name: "index", type: "uint256", internalType: "uint256" }],
99
+ outputs: [{ name: "", type: "address", internalType: "address" }],
100
+ stateMutability: "view",
101
+ },
102
+ {
103
+ type: "function",
104
+ name: "getOperatorCount",
105
+ inputs: [],
106
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
107
+ stateMutability: "view",
108
+ },
109
+ {
110
+ type: "function",
111
+ name: "getOperators",
112
+ inputs: [],
113
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
114
+ stateMutability: "view",
115
+ },
116
+ {
117
+ type: "function",
118
+ name: "getPendingDeposit",
119
+ inputs: [
120
+ { name: "owner", type: "bytes", internalType: "bytes" },
121
+ {
122
+ name: "assetId",
123
+ type: "uint256",
124
+ internalType: "uint256",
125
+ },
126
+ ],
127
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
128
+ stateMutability: "view",
129
+ },
130
+ {
131
+ type: "function",
132
+ name: "getPendingFacts",
133
+ inputs: [{ name: "blockId", type: "uint256", internalType: "uint256" }],
134
+ outputs: [
135
+ {
136
+ name: "",
137
+ type: "tuple",
138
+ internalType: "struct Types.StateUpdateFacts",
139
+ components: [
140
+ {
141
+ name: "prevStateHash",
142
+ type: "uint256",
143
+ internalType: "uint256",
144
+ },
145
+ {
146
+ name: "pendingStateHash",
147
+ type: "uint256",
148
+ internalType: "uint256",
149
+ },
150
+ {
151
+ name: "daFact",
152
+ type: "uint256",
153
+ internalType: "uint256",
154
+ },
155
+ {
156
+ name: "onchainUpdatesHash",
157
+ type: "uint256",
158
+ internalType: "uint256",
159
+ },
160
+ { name: "startingActionId", type: "uint64", internalType: "uint64" },
161
+ {
162
+ name: "endingActionId",
163
+ type: "uint64",
164
+ internalType: "uint64",
165
+ },
166
+ ],
167
+ },
168
+ ],
169
+ stateMutability: "view",
170
+ },
171
+ {
172
+ type: "function",
173
+ name: "getPendingWithdrawal",
174
+ inputs: [
175
+ { name: "owner", type: "address", internalType: "address" },
176
+ {
177
+ name: "assetId",
178
+ type: "uint256",
179
+ internalType: "uint256",
180
+ },
181
+ ],
182
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
183
+ stateMutability: "view",
184
+ },
185
+ {
186
+ type: "function",
187
+ name: "getStateFactRegistry",
188
+ inputs: [],
189
+ outputs: [{ name: "", type: "address", internalType: "address" }],
190
+ stateMutability: "view",
191
+ },
192
+ ];
@@ -0,0 +1,141 @@
1
+ export const NORD_RAMP_FACET_ABI = [
2
+ {
3
+ type: "function",
4
+ name: "depositUnchecked",
5
+ inputs: [
6
+ { name: "recipient", type: "bytes", internalType: "bytes" },
7
+ {
8
+ name: "assetId",
9
+ type: "uint256",
10
+ internalType: "uint256",
11
+ },
12
+ { name: "amount", type: "uint256", internalType: "uint256" },
13
+ ],
14
+ outputs: [],
15
+ stateMutability: "payable",
16
+ },
17
+ {
18
+ type: "function",
19
+ name: "withdraw",
20
+ inputs: [
21
+ { name: "receiver", type: "address", internalType: "address" },
22
+ {
23
+ name: "assetId",
24
+ type: "uint256",
25
+ internalType: "uint256",
26
+ },
27
+ ],
28
+ outputs: [],
29
+ stateMutability: "nonpayable",
30
+ },
31
+ {
32
+ type: "event",
33
+ name: "RampDeposit",
34
+ inputs: [
35
+ {
36
+ name: "caller",
37
+ type: "address",
38
+ indexed: true,
39
+ internalType: "address",
40
+ },
41
+ {
42
+ name: "receiverPublicKey",
43
+ type: "bytes",
44
+ indexed: false,
45
+ internalType: "bytes",
46
+ },
47
+ {
48
+ name: "assetId",
49
+ type: "uint256",
50
+ indexed: true,
51
+ internalType: "uint256",
52
+ },
53
+ {
54
+ name: "quantizedAmount",
55
+ type: "uint256",
56
+ indexed: false,
57
+ internalType: "uint256",
58
+ },
59
+ {
60
+ name: "actionNonce",
61
+ type: "uint256",
62
+ indexed: false,
63
+ internalType: "uint256",
64
+ },
65
+ ],
66
+ anonymous: false,
67
+ },
68
+ {
69
+ type: "event",
70
+ name: "RampWithdrawal",
71
+ inputs: [
72
+ { name: "user", type: "address", indexed: true, internalType: "address" },
73
+ {
74
+ name: "assetId",
75
+ type: "uint256",
76
+ indexed: true,
77
+ internalType: "uint256",
78
+ },
79
+ {
80
+ name: "quantizedAmount",
81
+ type: "uint256",
82
+ indexed: false,
83
+ internalType: "uint256",
84
+ },
85
+ ],
86
+ anonymous: false,
87
+ },
88
+ {
89
+ type: "error",
90
+ name: "AddressEmptyCode",
91
+ inputs: [{ name: "target", type: "address", internalType: "address" }],
92
+ },
93
+ {
94
+ type: "error",
95
+ name: "AddressInsufficientBalance",
96
+ inputs: [{ name: "account", type: "address", internalType: "address" }],
97
+ },
98
+ {
99
+ type: "error",
100
+ name: "AssetNotAdded",
101
+ inputs: [{ name: "assetId", type: "uint256", internalType: "uint256" }],
102
+ },
103
+ { type: "error", name: "FailedInnerCall", inputs: [] },
104
+ {
105
+ type: "error",
106
+ name: "IncorrectAmountTransferred",
107
+ inputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
108
+ },
109
+ {
110
+ type: "error",
111
+ name: "InvalidAmount",
112
+ inputs: [
113
+ { name: "amount", type: "uint256", internalType: "uint256" },
114
+ {
115
+ name: "quantum",
116
+ type: "uint256",
117
+ internalType: "uint256",
118
+ },
119
+ ],
120
+ },
121
+ {
122
+ type: "error",
123
+ name: "InvalidPublicKeyLength",
124
+ inputs: [{ name: "publicKey", type: "bytes", internalType: "bytes" }],
125
+ },
126
+ {
127
+ type: "error",
128
+ name: "InvalidRecipient",
129
+ inputs: [{ name: "recipient", type: "address", internalType: "address" }],
130
+ },
131
+ {
132
+ type: "error",
133
+ name: "QuantizedAmountTooLarge",
134
+ inputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
135
+ },
136
+ {
137
+ type: "error",
138
+ name: "SafeERC20FailedOperation",
139
+ inputs: [{ name: "token", type: "address", internalType: "address" }],
140
+ },
141
+ ];
@@ -0,0 +1,3 @@
1
+ export { ERC20_ABI } from "./ERC20_ABI";
2
+ export { NORD_RAMP_FACET_ABI } from "./NORD_RAMP_FACET_ABI";
3
+ export { NORD_GETTERS_FACET_ABI } from "./NORD_GETTERS_FACET_ABI";
package/src/const.ts ADDED
@@ -0,0 +1,39 @@
1
+ // DEV SETUP:
2
+ import { ERC20TokenInfo } from "./types";
3
+
4
+ const EVM_PORT = "8545";
5
+ const WEBSERVER_PORT = "80";
6
+
7
+ export const DEBUG_KEYS = [
8
+ "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
9
+ "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d",
10
+ "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a",
11
+ "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6",
12
+ "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a",
13
+ "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba",
14
+ "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e",
15
+ "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356",
16
+ "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97",
17
+ "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6",
18
+ ];
19
+
20
+ export const DEV_URL = "http://localhost";
21
+ export const EVM_DEV_URL = DEV_URL + ":" + EVM_PORT;
22
+ export const WEBSERVER_DEV_URL = DEV_URL + ":" + WEBSERVER_PORT;
23
+ export const DEV_CONTRACT_ADDRESS =
24
+ "0x8a791620dd6260079bf849dc5567adc3f2fdc318";
25
+ export const DEV_TOKEN_INFOS: ERC20TokenInfo[] = [
26
+ {
27
+ address: "0x9a9f2ccfde556a7e9ff0848998aa4a0cfd8863ae",
28
+ precision: 6,
29
+ tokenId: 0,
30
+ name: "usdc",
31
+ },
32
+ ];
33
+ export const FAUCET_PRIVATE_ADDRESS =
34
+ "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
35
+
36
+ export const DEFAULT_FUNDING_AMOUNTS: { [key: string]: [string, number] } = {
37
+ ETH: ["0.2", 0],
38
+ "0x9a9f2ccfde556a7e9ff0848998aa4a0cfd8863ae": ["10000", 6],
39
+ };