@deriverse/kit 1.0.38 → 1.0.41

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 (59) hide show
  1. package/dist/auto_buffer.d.ts +0 -2
  2. package/dist/auto_data.d.ts +0 -2
  3. package/dist/constants.d.ts +12 -0
  4. package/dist/constants.js +26 -0
  5. package/dist/engine/account-helpers.d.ts +59 -0
  6. package/dist/engine/account-helpers.js +177 -0
  7. package/dist/engine/account-helpers.test.d.ts +1 -0
  8. package/dist/engine/account-helpers.test.js +199 -0
  9. package/dist/engine/client-queries.d.ts +36 -0
  10. package/dist/engine/client-queries.js +498 -0
  11. package/dist/engine/client-queries.test.d.ts +1 -0
  12. package/dist/engine/client-queries.test.js +341 -0
  13. package/dist/engine/context-builders.d.ts +16 -0
  14. package/dist/engine/context-builders.js +158 -0
  15. package/dist/engine/context-builders.test.d.ts +1 -0
  16. package/dist/engine/context-builders.test.js +156 -0
  17. package/dist/engine/index.d.ts +101 -0
  18. package/dist/engine/index.js +745 -0
  19. package/dist/engine/index.test.d.ts +1 -0
  20. package/dist/engine/index.test.js +663 -0
  21. package/dist/engine/logs-decoder.d.ts +18 -0
  22. package/dist/engine/logs-decoder.js +414 -0
  23. package/dist/engine/logs-decoder.test.d.ts +1 -0
  24. package/dist/engine/logs-decoder.test.js +836 -0
  25. package/dist/engine/perp-instructions.d.ts +68 -0
  26. package/dist/engine/perp-instructions.js +478 -0
  27. package/dist/engine/perp-instructions.test.d.ts +1 -0
  28. package/dist/engine/perp-instructions.test.js +296 -0
  29. package/dist/engine/spot-instructions.d.ts +52 -0
  30. package/dist/engine/spot-instructions.js +376 -0
  31. package/dist/engine/spot-instructions.test.d.ts +1 -0
  32. package/dist/engine/spot-instructions.test.js +221 -0
  33. package/dist/engine/utils.d.ts +23 -0
  34. package/dist/engine/utils.js +329 -0
  35. package/dist/engine/utils.test.d.ts +1 -0
  36. package/dist/engine/utils.test.js +120 -0
  37. package/dist/index.d.ts +6 -247
  38. package/dist/index.js +14 -2925
  39. package/dist/instruction_models.d.ts +0 -2
  40. package/dist/instruction_models.js +39 -40
  41. package/dist/logs_models.d.ts +0 -2
  42. package/dist/types/engine-args.d.ts +32 -0
  43. package/dist/types/engine-args.js +2 -0
  44. package/dist/types/enums.d.ts +43 -0
  45. package/dist/{types.js → types/enums.js} +3 -5
  46. package/dist/types/index.d.ts +8 -0
  47. package/dist/types/index.js +38 -0
  48. package/dist/types/log-message.d.ts +2 -0
  49. package/dist/types/log-message.js +2 -0
  50. package/dist/types/responses.d.ts +248 -0
  51. package/dist/types/responses.js +2 -0
  52. package/dist/types/schemas.d.ts +165 -0
  53. package/dist/types/schemas.js +254 -0
  54. package/dist/types/schemas.test.d.ts +1 -0
  55. package/dist/types/schemas.test.js +94 -0
  56. package/dist/utils.d.ts +0 -0
  57. package/dist/utils.js +1 -0
  58. package/package.json +26 -6
  59. package/dist/types.d.ts +0 -565
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  export declare function newOperatorData(tag: number): Buffer;
4
2
  export declare function newRootAccountData(tag: number, privateMode: number, lutSlot: number): Buffer;
5
3
  export declare function newSpotOrderData(tag: number, ioc: number, orderType: number, side: number, instrId: number, price: number, amount: number, edgePrice: number): Buffer;
@@ -1,6 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.activateClientRefProgramData = exports.garbageCollectorData = exports.changeVotingData = exports.setSeatPurchasingFeeData = exports.perpClientsProcessingData = exports.newBaseCrncyData = exports.changeDenominatorData = exports.setVarianceData = exports.pointsProgramExpiration = exports.newPrivateClient = exports.sellMarketSeatData = exports.buyMarketSeatData = exports.changeRefProgramData = exports.perpMassCancelData = exports.perpOrderCancelData = exports.setInstrReadyForPerpUpgradeData = exports.upgradeToPerpData = exports.airdropData = exports.votingData = exports.perpQuotesReplaceData = exports.spotQuotesReplaceData = exports.swapData = exports.withdrawData = exports.perpWithdrawData = exports.moveSpotAvailFundsData = exports.perpDepositData = exports.feesWithdrawData = exports.feesDepositData = exports.depositData = exports.newInstrumentData = exports.spotLpData = exports.spotMassCancelData = exports.spotOrderCancelData = exports.perpStatisticsResetData = exports.perpChangeLeverageData = exports.newPerpOrderData = exports.newSpotOrderData = exports.newRootAccountData = exports.newOperatorData = void 0;
3
+ exports.newOperatorData = newOperatorData;
4
+ exports.newRootAccountData = newRootAccountData;
5
+ exports.newSpotOrderData = newSpotOrderData;
6
+ exports.newPerpOrderData = newPerpOrderData;
7
+ exports.perpChangeLeverageData = perpChangeLeverageData;
8
+ exports.perpStatisticsResetData = perpStatisticsResetData;
9
+ exports.spotOrderCancelData = spotOrderCancelData;
10
+ exports.spotMassCancelData = spotMassCancelData;
11
+ exports.spotLpData = spotLpData;
12
+ exports.newInstrumentData = newInstrumentData;
13
+ exports.depositData = depositData;
14
+ exports.feesDepositData = feesDepositData;
15
+ exports.feesWithdrawData = feesWithdrawData;
16
+ exports.perpDepositData = perpDepositData;
17
+ exports.moveSpotAvailFundsData = moveSpotAvailFundsData;
18
+ exports.perpWithdrawData = perpWithdrawData;
19
+ exports.withdrawData = withdrawData;
20
+ exports.swapData = swapData;
21
+ exports.spotQuotesReplaceData = spotQuotesReplaceData;
22
+ exports.perpQuotesReplaceData = perpQuotesReplaceData;
23
+ exports.votingData = votingData;
24
+ exports.airdropData = airdropData;
25
+ exports.upgradeToPerpData = upgradeToPerpData;
26
+ exports.setInstrReadyForPerpUpgradeData = setInstrReadyForPerpUpgradeData;
27
+ exports.perpOrderCancelData = perpOrderCancelData;
28
+ exports.perpMassCancelData = perpMassCancelData;
29
+ exports.changeRefProgramData = changeRefProgramData;
30
+ exports.buyMarketSeatData = buyMarketSeatData;
31
+ exports.sellMarketSeatData = sellMarketSeatData;
32
+ exports.newPrivateClient = newPrivateClient;
33
+ exports.pointsProgramExpiration = pointsProgramExpiration;
34
+ exports.setVarianceData = setVarianceData;
35
+ exports.changeDenominatorData = changeDenominatorData;
36
+ exports.newBaseCrncyData = newBaseCrncyData;
37
+ exports.perpClientsProcessingData = perpClientsProcessingData;
38
+ exports.setSeatPurchasingFeeData = setSeatPurchasingFeeData;
39
+ exports.changeVotingData = changeVotingData;
40
+ exports.garbageCollectorData = garbageCollectorData;
41
+ exports.activateClientRefProgramData = activateClientRefProgramData;
4
42
  function newOperatorData(tag) {
5
43
  let buf = Buffer.alloc(4);
6
44
  buf.writeUint8(tag, 0);
@@ -8,7 +46,6 @@ function newOperatorData(tag) {
8
46
  buf.writeUint16LE(0, 2);
9
47
  return buf;
10
48
  }
11
- exports.newOperatorData = newOperatorData;
12
49
  function newRootAccountData(tag, privateMode, lutSlot) {
13
50
  let buf = Buffer.alloc(8);
14
51
  buf.writeUint8(tag, 0);
@@ -17,7 +54,6 @@ function newRootAccountData(tag, privateMode, lutSlot) {
17
54
  buf.writeUint32LE(lutSlot, 4);
18
55
  return buf;
19
56
  }
20
- exports.newRootAccountData = newRootAccountData;
21
57
  function newSpotOrderData(tag, ioc, orderType, side, instrId, price, amount, edgePrice) {
22
58
  let buf = Buffer.alloc(32);
23
59
  buf.writeUint8(tag, 0);
@@ -30,7 +66,6 @@ function newSpotOrderData(tag, ioc, orderType, side, instrId, price, amount, edg
30
66
  buf.writeBigInt64LE(BigInt(Math.floor(edgePrice)), 24);
31
67
  return buf;
32
68
  }
33
- exports.newSpotOrderData = newSpotOrderData;
34
69
  function newPerpOrderData(tag, ioc, leverage, orderType, side, instrId, price, amount, edgePrice) {
35
70
  let buf = Buffer.alloc(40);
36
71
  buf.writeUint8(tag, 0);
@@ -47,7 +82,6 @@ function newPerpOrderData(tag, ioc, leverage, orderType, side, instrId, price, a
47
82
  buf.writeBigInt64LE(BigInt(Math.floor(edgePrice)), 32);
48
83
  return buf;
49
84
  }
50
- exports.newPerpOrderData = newPerpOrderData;
51
85
  function perpChangeLeverageData(tag, leverage, instrId) {
52
86
  let buf = Buffer.alloc(8);
53
87
  buf.writeUint8(tag, 0);
@@ -56,7 +90,6 @@ function perpChangeLeverageData(tag, leverage, instrId) {
56
90
  buf.writeUint32LE(instrId, 4);
57
91
  return buf;
58
92
  }
59
- exports.perpChangeLeverageData = perpChangeLeverageData;
60
93
  function perpStatisticsResetData(tag, instrId) {
61
94
  let buf = Buffer.alloc(8);
62
95
  buf.writeUint8(tag, 0);
@@ -65,7 +98,6 @@ function perpStatisticsResetData(tag, instrId) {
65
98
  buf.writeUint32LE(instrId, 4);
66
99
  return buf;
67
100
  }
68
- exports.perpStatisticsResetData = perpStatisticsResetData;
69
101
  function spotOrderCancelData(tag, side, instrId, orderId) {
70
102
  let buf = Buffer.alloc(16);
71
103
  buf.writeUint8(tag, 0);
@@ -75,7 +107,6 @@ function spotOrderCancelData(tag, side, instrId, orderId) {
75
107
  buf.writeBigInt64LE(BigInt(Math.floor(orderId)), 8);
76
108
  return buf;
77
109
  }
78
- exports.spotOrderCancelData = spotOrderCancelData;
79
110
  function spotMassCancelData(tag, instrId) {
80
111
  let buf = Buffer.alloc(8);
81
112
  buf.writeUint8(tag, 0);
@@ -84,7 +115,6 @@ function spotMassCancelData(tag, instrId) {
84
115
  buf.writeUint32LE(instrId, 4);
85
116
  return buf;
86
117
  }
87
- exports.spotMassCancelData = spotMassCancelData;
88
118
  function spotLpData(tag, side, instrId, amount, minPrice, maxPrice) {
89
119
  let buf = Buffer.alloc(32);
90
120
  buf.writeUint8(tag, 0);
@@ -96,7 +126,6 @@ function spotLpData(tag, side, instrId, amount, minPrice, maxPrice) {
96
126
  buf.writeBigInt64LE(BigInt(Math.floor(maxPrice)), 24);
97
127
  return buf;
98
128
  }
99
- exports.spotLpData = spotLpData;
100
129
  function newInstrumentData(tag, crncyTokenId, lutSlot, price) {
101
130
  let buf = Buffer.alloc(24);
102
131
  buf.writeUint8(tag, 0);
@@ -108,7 +137,6 @@ function newInstrumentData(tag, crncyTokenId, lutSlot, price) {
108
137
  buf.writeBigInt64LE(BigInt(Math.floor(price)), 16);
109
138
  return buf;
110
139
  }
111
- exports.newInstrumentData = newInstrumentData;
112
140
  function depositData(tag, competitionId, depositAll, tokenId, amount, lutSlot, refId) {
113
141
  let buf = Buffer.alloc(24);
114
142
  buf.writeUint8(tag, 0);
@@ -121,7 +149,6 @@ function depositData(tag, competitionId, depositAll, tokenId, amount, lutSlot, r
121
149
  buf.writeUint32LE(refId, 20);
122
150
  return buf;
123
151
  }
124
- exports.depositData = depositData;
125
152
  function feesDepositData(tag, tokenId, amount) {
126
153
  let buf = Buffer.alloc(16);
127
154
  buf.writeUint8(tag, 0);
@@ -131,7 +158,6 @@ function feesDepositData(tag, tokenId, amount) {
131
158
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 8);
132
159
  return buf;
133
160
  }
134
- exports.feesDepositData = feesDepositData;
135
161
  function feesWithdrawData(tag, tokenId, amount) {
136
162
  let buf = Buffer.alloc(16);
137
163
  buf.writeUint8(tag, 0);
@@ -141,7 +167,6 @@ function feesWithdrawData(tag, tokenId, amount) {
141
167
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 8);
142
168
  return buf;
143
169
  }
144
- exports.feesWithdrawData = feesWithdrawData;
145
170
  function perpDepositData(tag, instrId, amount) {
146
171
  let buf = Buffer.alloc(16);
147
172
  buf.writeUint8(tag, 0);
@@ -151,7 +176,6 @@ function perpDepositData(tag, instrId, amount) {
151
176
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 8);
152
177
  return buf;
153
178
  }
154
- exports.perpDepositData = perpDepositData;
155
179
  function moveSpotAvailFundsData(tag, instrId) {
156
180
  let buf = Buffer.alloc(8);
157
181
  buf.writeUint8(tag, 0);
@@ -160,7 +184,6 @@ function moveSpotAvailFundsData(tag, instrId) {
160
184
  buf.writeUint32LE(instrId, 4);
161
185
  return buf;
162
186
  }
163
- exports.moveSpotAvailFundsData = moveSpotAvailFundsData;
164
187
  function perpWithdrawData(tag, instrId, amount) {
165
188
  let buf = Buffer.alloc(16);
166
189
  buf.writeUint8(tag, 0);
@@ -170,7 +193,6 @@ function perpWithdrawData(tag, instrId, amount) {
170
193
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 8);
171
194
  return buf;
172
195
  }
173
- exports.perpWithdrawData = perpWithdrawData;
174
196
  function withdrawData(tag, tokenId, amount) {
175
197
  let buf = Buffer.alloc(16);
176
198
  buf.writeUint8(tag, 0);
@@ -180,7 +202,6 @@ function withdrawData(tag, tokenId, amount) {
180
202
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 8);
181
203
  return buf;
182
204
  }
183
- exports.withdrawData = withdrawData;
184
205
  function swapData(tag, inputCrncy, instrId, price, amount) {
185
206
  let buf = Buffer.alloc(24);
186
207
  buf.writeUint8(tag, 0);
@@ -191,7 +212,6 @@ function swapData(tag, inputCrncy, instrId, price, amount) {
191
212
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 16);
192
213
  return buf;
193
214
  }
194
- exports.swapData = swapData;
195
215
  function spotQuotesReplaceData(tag, instrId, newBidPrice, newBidQty, oldBidOrderId, newAskPrice, newAskQty, oldAskOrderId) {
196
216
  let buf = Buffer.alloc(56);
197
217
  buf.writeUint8(tag, 0);
@@ -206,7 +226,6 @@ function spotQuotesReplaceData(tag, instrId, newBidPrice, newBidQty, oldBidOrder
206
226
  buf.writeBigInt64LE(BigInt(Math.floor(oldAskOrderId)), 48);
207
227
  return buf;
208
228
  }
209
- exports.spotQuotesReplaceData = spotQuotesReplaceData;
210
229
  function perpQuotesReplaceData(tag, instrId, newBidPrice, newBidQty, oldBidOrderId, newAskPrice, newAskQty, oldAskOrderId) {
211
230
  let buf = Buffer.alloc(56);
212
231
  buf.writeUint8(tag, 0);
@@ -221,7 +240,6 @@ function perpQuotesReplaceData(tag, instrId, newBidPrice, newBidQty, oldBidOrder
221
240
  buf.writeBigInt64LE(BigInt(Math.floor(oldAskOrderId)), 48);
222
241
  return buf;
223
242
  }
224
- exports.perpQuotesReplaceData = perpQuotesReplaceData;
225
243
  function votingData(tag, choice, votingCounter) {
226
244
  let buf = Buffer.alloc(8);
227
245
  buf.writeUint8(tag, 0);
@@ -230,7 +248,6 @@ function votingData(tag, choice, votingCounter) {
230
248
  buf.writeUint32LE(votingCounter, 4);
231
249
  return buf;
232
250
  }
233
- exports.votingData = votingData;
234
251
  function airdropData(tag, ratio) {
235
252
  let buf = Buffer.alloc(16);
236
253
  buf.writeUint8(tag, 0);
@@ -239,7 +256,6 @@ function airdropData(tag, ratio) {
239
256
  buf.writeUint32LE(0, 4);
240
257
  return buf;
241
258
  }
242
- exports.airdropData = airdropData;
243
259
  function upgradeToPerpData(tag, instrId) {
244
260
  let buf = Buffer.alloc(8);
245
261
  buf.writeUint8(tag, 0);
@@ -248,7 +264,6 @@ function upgradeToPerpData(tag, instrId) {
248
264
  buf.writeUint32LE(instrId, 4);
249
265
  return buf;
250
266
  }
251
- exports.upgradeToPerpData = upgradeToPerpData;
252
267
  function setInstrReadyForPerpUpgradeData(tag, instrId, variance) {
253
268
  let buf = Buffer.alloc(16);
254
269
  buf.writeUint8(tag, 0);
@@ -257,7 +272,6 @@ function setInstrReadyForPerpUpgradeData(tag, instrId, variance) {
257
272
  buf.writeUint32LE(instrId, 4);
258
273
  return buf;
259
274
  }
260
- exports.setInstrReadyForPerpUpgradeData = setInstrReadyForPerpUpgradeData;
261
275
  function perpOrderCancelData(tag, side, instrId, orderId) {
262
276
  let buf = Buffer.alloc(16);
263
277
  buf.writeUint8(tag, 0);
@@ -267,7 +281,6 @@ function perpOrderCancelData(tag, side, instrId, orderId) {
267
281
  buf.writeBigInt64LE(BigInt(Math.floor(orderId)), 8);
268
282
  return buf;
269
283
  }
270
- exports.perpOrderCancelData = perpOrderCancelData;
271
284
  function perpMassCancelData(tag, instrId) {
272
285
  let buf = Buffer.alloc(8);
273
286
  buf.writeUint8(tag, 0);
@@ -276,7 +289,6 @@ function perpMassCancelData(tag, instrId) {
276
289
  buf.writeUint32LE(instrId, 4);
277
290
  return buf;
278
291
  }
279
- exports.perpMassCancelData = perpMassCancelData;
280
292
  function changeRefProgramData(tag, refProgramDuration, refLinkDuration, refDiscount, refRatio) {
281
293
  let buf = Buffer.alloc(32);
282
294
  buf.writeUint8(tag, 0);
@@ -287,7 +299,6 @@ function changeRefProgramData(tag, refProgramDuration, refLinkDuration, refDisco
287
299
  buf.writeUint32LE(refLinkDuration, 12);
288
300
  return buf;
289
301
  }
290
- exports.changeRefProgramData = changeRefProgramData;
291
302
  function buyMarketSeatData(tag, instrId, edgePrice, amount) {
292
303
  let buf = Buffer.alloc(24);
293
304
  buf.writeUint8(tag, 0);
@@ -298,7 +309,6 @@ function buyMarketSeatData(tag, instrId, edgePrice, amount) {
298
309
  buf.writeBigInt64LE(BigInt(Math.floor(amount)), 16);
299
310
  return buf;
300
311
  }
301
- exports.buyMarketSeatData = buyMarketSeatData;
302
312
  function sellMarketSeatData(tag, instrId, edgePrice) {
303
313
  let buf = Buffer.alloc(16);
304
314
  buf.writeUint8(tag, 0);
@@ -308,7 +318,6 @@ function sellMarketSeatData(tag, instrId, edgePrice) {
308
318
  buf.writeBigInt64LE(BigInt(Math.floor(edgePrice)), 8);
309
319
  return buf;
310
320
  }
311
- exports.sellMarketSeatData = sellMarketSeatData;
312
321
  function newPrivateClient(tag, expirationTime) {
313
322
  let buf = Buffer.alloc(8);
314
323
  buf.writeUint8(tag, 0);
@@ -317,7 +326,6 @@ function newPrivateClient(tag, expirationTime) {
317
326
  buf.writeUint32LE(expirationTime, 4);
318
327
  return buf;
319
328
  }
320
- exports.newPrivateClient = newPrivateClient;
321
329
  function pointsProgramExpiration(tag, newExpirationTime) {
322
330
  let buf = Buffer.alloc(8);
323
331
  buf.writeUint8(tag, 0);
@@ -326,7 +334,6 @@ function pointsProgramExpiration(tag, newExpirationTime) {
326
334
  buf.writeUint32LE(newExpirationTime, 4);
327
335
  return buf;
328
336
  }
329
- exports.pointsProgramExpiration = pointsProgramExpiration;
330
337
  function setVarianceData(tag, variance) {
331
338
  let buf = Buffer.alloc(12);
332
339
  buf.writeUint8(tag, 0);
@@ -334,7 +341,6 @@ function setVarianceData(tag, variance) {
334
341
  buf.writeUint16LE(0, 2);
335
342
  return buf;
336
343
  }
337
- exports.setVarianceData = setVarianceData;
338
344
  function changeDenominatorData(tag, baseCrncyId, denominator) {
339
345
  let buf = Buffer.alloc(16);
340
346
  buf.writeUint8(tag, 0);
@@ -343,7 +349,6 @@ function changeDenominatorData(tag, baseCrncyId, denominator) {
343
349
  buf.writeUint32LE(baseCrncyId, 4);
344
350
  return buf;
345
351
  }
346
- exports.changeDenominatorData = changeDenominatorData;
347
352
  function newBaseCrncyData(tag, denominator) {
348
353
  let buf = Buffer.alloc(16);
349
354
  buf.writeUint8(tag, 0);
@@ -352,7 +357,6 @@ function newBaseCrncyData(tag, denominator) {
352
357
  buf.writeUint32LE(0, 4);
353
358
  return buf;
354
359
  }
355
- exports.newBaseCrncyData = newBaseCrncyData;
356
360
  function perpClientsProcessingData(tag, instrId) {
357
361
  let buf = Buffer.alloc(8);
358
362
  buf.writeUint8(tag, 0);
@@ -361,7 +365,6 @@ function perpClientsProcessingData(tag, instrId) {
361
365
  buf.writeUint32LE(instrId, 4);
362
366
  return buf;
363
367
  }
364
- exports.perpClientsProcessingData = perpClientsProcessingData;
365
368
  function setSeatPurchasingFeeData(tag, fee) {
366
369
  let buf = Buffer.alloc(16);
367
370
  buf.writeUint8(tag, 0);
@@ -370,7 +373,6 @@ function setSeatPurchasingFeeData(tag, fee) {
370
373
  buf.writeUint32LE(0, 4);
371
374
  return buf;
372
375
  }
373
- exports.setSeatPurchasingFeeData = setSeatPurchasingFeeData;
374
376
  function changeVotingData(tag, newChoice, votingCounter) {
375
377
  let buf = Buffer.alloc(8);
376
378
  buf.writeUint8(tag, 0);
@@ -379,7 +381,6 @@ function changeVotingData(tag, newChoice, votingCounter) {
379
381
  buf.writeUint32LE(votingCounter, 4);
380
382
  return buf;
381
383
  }
382
- exports.changeVotingData = changeVotingData;
383
384
  function garbageCollectorData(tag, instrId) {
384
385
  let buf = Buffer.alloc(8);
385
386
  buf.writeUint8(tag, 0);
@@ -388,7 +389,6 @@ function garbageCollectorData(tag, instrId) {
388
389
  buf.writeUint32LE(instrId, 4);
389
390
  return buf;
390
391
  }
391
- exports.garbageCollectorData = garbageCollectorData;
392
392
  function activateClientRefProgramData(tag, refId) {
393
393
  let buf = Buffer.alloc(8);
394
394
  buf.writeUint8(tag, 0);
@@ -397,4 +397,3 @@ function activateClientRefProgramData(tag, refId) {
397
397
  buf.writeUint32LE(refId, 4);
398
398
  return buf;
399
399
  }
400
- exports.activateClientRefProgramData = activateClientRefProgramData;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  export declare enum LogType {
4
2
  deposit = 1,
5
3
  withdraw = 2,
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ import { EngineArgsSchema, InstrIdSchema, DepositArgsSchema, WithdrawArgsSchema, NewSpotOrderArgsSchema, SpotQuotesReplaceArgsSchema, SwapArgsSchema, SpotOrderCancelArgsSchema, SpotMassCancelArgsSchema, SpotLpArgsSchema, PerpDepositArgsSchema, PerpBuySeatArgsSchema, PerpSellSeatArgsSchema, NewPerpOrderArgsSchema, PerpQuotesReplaceArgsSchema, PerpOrderCancelArgsSchema, PerpMassCancelArgsSchema, PerpChangeLeverageArgsSchema, PerpStatisticsResetArgsSchema, PerpForcedCloseArgsSchema, NewInstrumentArgsSchema, GetInstrIdArgsSchema, GetSpotContextArgsSchema, GetInstrAccountByTagArgsSchema, UpdateInstrDataArgsSchema, DistribDividendsArgsSchema, GetClientSpotOrdersInfoArgsSchema, GetClientPerpOrdersInfoArgsSchema, GetClientSpotOrdersArgsSchema, GetClientPerpOrdersArgsSchema } from './schemas';
3
+ export type EngineArgs = z.infer<typeof EngineArgsSchema>;
4
+ export type InstrId = z.infer<typeof InstrIdSchema>;
5
+ export type DepositArgs = z.infer<typeof DepositArgsSchema>;
6
+ export type WithdrawArgs = z.infer<typeof WithdrawArgsSchema>;
7
+ export type NewSpotOrderArgs = z.infer<typeof NewSpotOrderArgsSchema>;
8
+ export type SpotQuotesReplaceArgs = z.infer<typeof SpotQuotesReplaceArgsSchema>;
9
+ export type SwapArgs = z.infer<typeof SwapArgsSchema>;
10
+ export type SpotOrderCancelArgs = z.infer<typeof SpotOrderCancelArgsSchema>;
11
+ export type SpotMassCancelArgs = z.infer<typeof SpotMassCancelArgsSchema>;
12
+ export type SpotLpArgs = z.infer<typeof SpotLpArgsSchema>;
13
+ export type PerpDepositArgs = z.infer<typeof PerpDepositArgsSchema>;
14
+ export type PerpBuySeatArgs = z.infer<typeof PerpBuySeatArgsSchema>;
15
+ export type PerpSellSeatArgs = z.infer<typeof PerpSellSeatArgsSchema>;
16
+ export type NewPerpOrderArgs = z.infer<typeof NewPerpOrderArgsSchema>;
17
+ export type PerpQuotesReplaceArgs = z.infer<typeof PerpQuotesReplaceArgsSchema>;
18
+ export type PerpOrderCancelArgs = z.infer<typeof PerpOrderCancelArgsSchema>;
19
+ export type PerpMassCancelArgs = z.infer<typeof PerpMassCancelArgsSchema>;
20
+ export type PerpChangeLeverageArgs = z.infer<typeof PerpChangeLeverageArgsSchema>;
21
+ export type PerpStatisticsResetArgs = z.infer<typeof PerpStatisticsResetArgsSchema>;
22
+ export type PerpForcedCloseArgs = z.infer<typeof PerpForcedCloseArgsSchema>;
23
+ export type NewInstrumentArgs = z.infer<typeof NewInstrumentArgsSchema>;
24
+ export type GetInstrIdArgs = z.infer<typeof GetInstrIdArgsSchema>;
25
+ export type GetSpotContextArgs = z.infer<typeof GetSpotContextArgsSchema>;
26
+ export type getInstrAccountByTagArgs = z.infer<typeof GetInstrAccountByTagArgsSchema>;
27
+ export type updateInstrDataArgs = z.infer<typeof UpdateInstrDataArgsSchema>;
28
+ export type DistribDividendsArgs = z.infer<typeof DistribDividendsArgsSchema>;
29
+ export type GetClientSpotOrdersInfoArgs = z.infer<typeof GetClientSpotOrdersInfoArgsSchema>;
30
+ export type GetClientPerpOrdersInfoArgs = z.infer<typeof GetClientPerpOrdersInfoArgsSchema>;
31
+ export type GetClientSpotOrdersArgs = z.infer<typeof GetClientSpotOrdersArgsSchema>;
32
+ export type GetClientPerpOrdersArgs = z.infer<typeof GetClientPerpOrdersArgsSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ export { LogType } from '../logs_models';
2
+ export declare enum InstrMask {
3
+ DRV = 268435456,
4
+ READY_TO_DRV_UPGRADE = 536870912,
5
+ PERP = 1073741824,
6
+ ORACLE = 2147483648,
7
+ READY_TO_PERP_UPGRADE = 16777216
8
+ }
9
+ export declare enum AccountType {
10
+ CLIENT_COMMUNITY = 35,
11
+ CLIENT_PRIMARY = 31,
12
+ COMMUNITY = 34,
13
+ HOLDER = 1,
14
+ ROOT = 2,
15
+ INSTR = 7,
16
+ SPOT_15M_CANDLES = 20,
17
+ SPOT_1M_CANDLES = 19,
18
+ SPOT_ASK_ORDERS = 17,
19
+ SPOT_ASKS_TREE = 15,
20
+ SPOT_BID_ORDERS = 16,
21
+ SPOT_BIDS_TREE = 14,
22
+ SPOT_CLIENT_INFOS = 12,
23
+ SPOT_CLIENT_INFOS2 = 13,
24
+ SPOT_DAY_CANDLES = 21,
25
+ SPOT_LINES = 18,
26
+ SPOT_MAPS = 10,
27
+ TOKEN = 4,
28
+ PERP_ASK_ORDERS = 36,
29
+ PERP_ASKS_TREE = 37,
30
+ PERP_BID_ORDERS = 38,
31
+ PERP_BIDS_TREE = 39,
32
+ PERP_CLIENT_INFOS = 41,
33
+ PERP_CLIENT_INFOS2 = 42,
34
+ PERP_CLIENT_INFOS3 = 43,
35
+ PERP_CLIENT_INFOS4 = 44,
36
+ PERP_CLIENT_INFOS5 = 45,
37
+ PERP_LINES = 46,
38
+ PERP_MAPS = 47,
39
+ PERP_LONG_PX_TREE = 48,
40
+ PERP_SHORT_PX_TREE = 49,
41
+ PERP_REBALANCE_TIME_TREE = 50,
42
+ PRIVATE_CLIENTS = 51
43
+ }
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MARKET_DEPTH = exports.PROGRAM_ID = exports.VERSION = exports.AccountType = exports.InstrMask = void 0;
4
- const kit_1 = require("@solana/kit");
3
+ exports.AccountType = exports.InstrMask = exports.LogType = void 0;
4
+ var logs_models_1 = require("../logs_models");
5
+ Object.defineProperty(exports, "LogType", { enumerable: true, get: function () { return logs_models_1.LogType; } });
5
6
  var InstrMask;
6
7
  (function (InstrMask) {
7
8
  InstrMask[InstrMask["DRV"] = 268435456] = "DRV";
@@ -46,6 +47,3 @@ var AccountType;
46
47
  AccountType[AccountType["PERP_REBALANCE_TIME_TREE"] = 50] = "PERP_REBALANCE_TIME_TREE";
47
48
  AccountType[AccountType["PRIVATE_CLIENTS"] = 51] = "PRIVATE_CLIENTS";
48
49
  })(AccountType || (exports.AccountType = AccountType = {}));
49
- exports.VERSION = 1;
50
- exports.PROGRAM_ID = (0, kit_1.address)("DRVSpZ2YUYYKgZP8XtLhAGtT1zYSCKzeHfb4DgRnrgqD");
51
- exports.MARKET_DEPTH = 20;
@@ -0,0 +1,8 @@
1
+ import { IAccountMeta, IInstruction } from '@solana/kit';
2
+ export { InstrMask, AccountType, LogType } from './enums';
3
+ export { EngineArgs, InstrId, DepositArgs, WithdrawArgs, NewSpotOrderArgs, SpotQuotesReplaceArgs, SwapArgs, PerpQuotesReplaceArgs, SpotOrderCancelArgs, PerpOrderCancelArgs, SpotMassCancelArgs, PerpMassCancelArgs, PerpStatisticsResetArgs, PerpChangeLeverageArgs, PerpForcedCloseArgs, GetInstrIdArgs, GetSpotContextArgs, getInstrAccountByTagArgs, updateInstrDataArgs, SpotLpArgs, DistribDividendsArgs, PerpDepositArgs, PerpBuySeatArgs, PerpSellSeatArgs, NewPerpOrderArgs, NewInstrumentArgs, GetClientSpotOrdersInfoArgs, GetClientPerpOrdersInfoArgs, GetClientSpotOrdersArgs, GetClientPerpOrdersArgs, } from './engine-args';
4
+ export { LinePx, Instrument, Token, GetClientSpotOrdersInfoResponse, GetClientPerpOrdersInfoResponse, GetClientSpotOrdersResponse, GetClientPerpOrdersResponse, ClientTokenData, ClientLpData, ClientSpotData, ClientPerpData, RefLink, CommunityData, ClientCommunityData, ClientRefProgramData, GetClientDataResponse, } from './responses';
5
+ export { LogMessage } from './log-message';
6
+ export { EngineArgsSchema, InstrIdSchema, DepositArgsSchema, WithdrawArgsSchema, NewSpotOrderArgsSchema, SpotQuotesReplaceArgsSchema, SwapArgsSchema, SpotOrderCancelArgsSchema, SpotMassCancelArgsSchema, SpotLpArgsSchema, PerpDepositArgsSchema, PerpBuySeatArgsSchema, PerpSellSeatArgsSchema, NewPerpOrderArgsSchema, PerpQuotesReplaceArgsSchema, PerpOrderCancelArgsSchema, PerpMassCancelArgsSchema, PerpChangeLeverageArgsSchema, PerpStatisticsResetArgsSchema, PerpForcedCloseArgsSchema, NewInstrumentArgsSchema, GetInstrIdArgsSchema, GetClientSpotOrdersInfoArgsSchema, GetClientPerpOrdersInfoArgsSchema, GetClientSpotOrdersArgsSchema, GetClientPerpOrdersArgsSchema, DistribDividendsArgsSchema, GetSpotContextArgsSchema, GetInstrAccountByTagArgsSchema, UpdateInstrDataArgsSchema, } from './schemas';
7
+ export type Instruction = IInstruction;
8
+ export type AccountMeta = IAccountMeta;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateInstrDataArgsSchema = exports.GetInstrAccountByTagArgsSchema = exports.GetSpotContextArgsSchema = exports.DistribDividendsArgsSchema = exports.GetClientPerpOrdersArgsSchema = exports.GetClientSpotOrdersArgsSchema = exports.GetClientPerpOrdersInfoArgsSchema = exports.GetClientSpotOrdersInfoArgsSchema = exports.GetInstrIdArgsSchema = exports.NewInstrumentArgsSchema = exports.PerpForcedCloseArgsSchema = exports.PerpStatisticsResetArgsSchema = exports.PerpChangeLeverageArgsSchema = exports.PerpMassCancelArgsSchema = exports.PerpOrderCancelArgsSchema = exports.PerpQuotesReplaceArgsSchema = exports.NewPerpOrderArgsSchema = exports.PerpSellSeatArgsSchema = exports.PerpBuySeatArgsSchema = exports.PerpDepositArgsSchema = exports.SpotLpArgsSchema = exports.SpotMassCancelArgsSchema = exports.SpotOrderCancelArgsSchema = exports.SwapArgsSchema = exports.SpotQuotesReplaceArgsSchema = exports.NewSpotOrderArgsSchema = exports.WithdrawArgsSchema = exports.DepositArgsSchema = exports.InstrIdSchema = exports.EngineArgsSchema = exports.LogType = exports.AccountType = exports.InstrMask = void 0;
4
+ var enums_1 = require("./enums");
5
+ Object.defineProperty(exports, "InstrMask", { enumerable: true, get: function () { return enums_1.InstrMask; } });
6
+ Object.defineProperty(exports, "AccountType", { enumerable: true, get: function () { return enums_1.AccountType; } });
7
+ Object.defineProperty(exports, "LogType", { enumerable: true, get: function () { return enums_1.LogType; } });
8
+ var schemas_1 = require("./schemas");
9
+ Object.defineProperty(exports, "EngineArgsSchema", { enumerable: true, get: function () { return schemas_1.EngineArgsSchema; } });
10
+ Object.defineProperty(exports, "InstrIdSchema", { enumerable: true, get: function () { return schemas_1.InstrIdSchema; } });
11
+ Object.defineProperty(exports, "DepositArgsSchema", { enumerable: true, get: function () { return schemas_1.DepositArgsSchema; } });
12
+ Object.defineProperty(exports, "WithdrawArgsSchema", { enumerable: true, get: function () { return schemas_1.WithdrawArgsSchema; } });
13
+ Object.defineProperty(exports, "NewSpotOrderArgsSchema", { enumerable: true, get: function () { return schemas_1.NewSpotOrderArgsSchema; } });
14
+ Object.defineProperty(exports, "SpotQuotesReplaceArgsSchema", { enumerable: true, get: function () { return schemas_1.SpotQuotesReplaceArgsSchema; } });
15
+ Object.defineProperty(exports, "SwapArgsSchema", { enumerable: true, get: function () { return schemas_1.SwapArgsSchema; } });
16
+ Object.defineProperty(exports, "SpotOrderCancelArgsSchema", { enumerable: true, get: function () { return schemas_1.SpotOrderCancelArgsSchema; } });
17
+ Object.defineProperty(exports, "SpotMassCancelArgsSchema", { enumerable: true, get: function () { return schemas_1.SpotMassCancelArgsSchema; } });
18
+ Object.defineProperty(exports, "SpotLpArgsSchema", { enumerable: true, get: function () { return schemas_1.SpotLpArgsSchema; } });
19
+ Object.defineProperty(exports, "PerpDepositArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpDepositArgsSchema; } });
20
+ Object.defineProperty(exports, "PerpBuySeatArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpBuySeatArgsSchema; } });
21
+ Object.defineProperty(exports, "PerpSellSeatArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpSellSeatArgsSchema; } });
22
+ Object.defineProperty(exports, "NewPerpOrderArgsSchema", { enumerable: true, get: function () { return schemas_1.NewPerpOrderArgsSchema; } });
23
+ Object.defineProperty(exports, "PerpQuotesReplaceArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpQuotesReplaceArgsSchema; } });
24
+ Object.defineProperty(exports, "PerpOrderCancelArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpOrderCancelArgsSchema; } });
25
+ Object.defineProperty(exports, "PerpMassCancelArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpMassCancelArgsSchema; } });
26
+ Object.defineProperty(exports, "PerpChangeLeverageArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpChangeLeverageArgsSchema; } });
27
+ Object.defineProperty(exports, "PerpStatisticsResetArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpStatisticsResetArgsSchema; } });
28
+ Object.defineProperty(exports, "PerpForcedCloseArgsSchema", { enumerable: true, get: function () { return schemas_1.PerpForcedCloseArgsSchema; } });
29
+ Object.defineProperty(exports, "NewInstrumentArgsSchema", { enumerable: true, get: function () { return schemas_1.NewInstrumentArgsSchema; } });
30
+ Object.defineProperty(exports, "GetInstrIdArgsSchema", { enumerable: true, get: function () { return schemas_1.GetInstrIdArgsSchema; } });
31
+ Object.defineProperty(exports, "GetClientSpotOrdersInfoArgsSchema", { enumerable: true, get: function () { return schemas_1.GetClientSpotOrdersInfoArgsSchema; } });
32
+ Object.defineProperty(exports, "GetClientPerpOrdersInfoArgsSchema", { enumerable: true, get: function () { return schemas_1.GetClientPerpOrdersInfoArgsSchema; } });
33
+ Object.defineProperty(exports, "GetClientSpotOrdersArgsSchema", { enumerable: true, get: function () { return schemas_1.GetClientSpotOrdersArgsSchema; } });
34
+ Object.defineProperty(exports, "GetClientPerpOrdersArgsSchema", { enumerable: true, get: function () { return schemas_1.GetClientPerpOrdersArgsSchema; } });
35
+ Object.defineProperty(exports, "DistribDividendsArgsSchema", { enumerable: true, get: function () { return schemas_1.DistribDividendsArgsSchema; } });
36
+ Object.defineProperty(exports, "GetSpotContextArgsSchema", { enumerable: true, get: function () { return schemas_1.GetSpotContextArgsSchema; } });
37
+ Object.defineProperty(exports, "GetInstrAccountByTagArgsSchema", { enumerable: true, get: function () { return schemas_1.GetInstrAccountByTagArgsSchema; } });
38
+ Object.defineProperty(exports, "UpdateInstrDataArgsSchema", { enumerable: true, get: function () { return schemas_1.UpdateInstrDataArgsSchema; } });
@@ -0,0 +1,2 @@
1
+ import { BuyMarketSeatReportModel, DepositReportModel, DrvsAirdropReportModel, EarningsReportModel, FeesDepositReportModel, FeesWithdrawReportModel, PerpChangeLeverageReportModel, PerpDepositReportModel, PerpFeesReportModel, PerpFillOrderReportModel, PerpFundingReportModel, PerpMassCancelReportModel, PerpNewOrderReportModel, PerpOrderCancelReportModel, PerpOrderRevokeReportModel, PerpPlaceMassCancelReportModel, PerpPlaceOrderReportModel, PerpSocLossReportModel, PerpWithdrawReportModel, SellMarketSeatReportModel, SpotFeesReportModel, SpotFillOrderReportModel, SpotlpTradeReportModel, SpotMassCancelReportModel, SpotNewOrderReportModel, SpotOrderCancelReportModel, SpotOrderRevokeReportModel, SpotPlaceMassCancelReportModel, SpotPlaceOrderReportModel, WithdrawReportModel } from '../logs_models';
2
+ export type LogMessage = DepositReportModel | WithdrawReportModel | PerpDepositReportModel | PerpWithdrawReportModel | FeesDepositReportModel | FeesWithdrawReportModel | SpotlpTradeReportModel | EarningsReportModel | DrvsAirdropReportModel | SpotPlaceOrderReportModel | SpotFillOrderReportModel | SpotNewOrderReportModel | SpotOrderCancelReportModel | SpotOrderRevokeReportModel | SpotFeesReportModel | SpotPlaceMassCancelReportModel | SpotMassCancelReportModel | PerpPlaceOrderReportModel | PerpFillOrderReportModel | PerpNewOrderReportModel | PerpOrderCancelReportModel | PerpOrderRevokeReportModel | PerpFeesReportModel | PerpPlaceMassCancelReportModel | PerpMassCancelReportModel | PerpFundingReportModel | PerpSocLossReportModel | PerpChangeLeverageReportModel | BuyMarketSeatReportModel | SellMarketSeatReportModel;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });