@qubic.org/contracts 0.2.0

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 (134) hide show
  1. package/README.md +285 -0
  2. package/dist/__generated__/computorcontrolledfund.d.ts +185 -0
  3. package/dist/__generated__/computorcontrolledfund.d.ts.map +1 -0
  4. package/dist/__generated__/computorcontrolledfund.js +805 -0
  5. package/dist/__generated__/computorcontrolledfund.js.map +1 -0
  6. package/dist/__generated__/escrow.d.ts +103 -0
  7. package/dist/__generated__/escrow.d.ts.map +1 -0
  8. package/dist/__generated__/escrow.js +383 -0
  9. package/dist/__generated__/escrow.js.map +1 -0
  10. package/dist/__generated__/generalquorumproposal.d.ts +130 -0
  11. package/dist/__generated__/generalquorumproposal.d.ts.map +1 -0
  12. package/dist/__generated__/generalquorumproposal.js +499 -0
  13. package/dist/__generated__/generalquorumproposal.js.map +1 -0
  14. package/dist/__generated__/index.d.ts +28 -0
  15. package/dist/__generated__/index.d.ts.map +1 -0
  16. package/dist/__generated__/index.js +28 -0
  17. package/dist/__generated__/index.js.map +1 -0
  18. package/dist/__generated__/msvault.d.ts +336 -0
  19. package/dist/__generated__/msvault.d.ts.map +1 -0
  20. package/dist/__generated__/msvault.js +1187 -0
  21. package/dist/__generated__/msvault.js.map +1 -0
  22. package/dist/__generated__/multisignvault.d.ts +348 -0
  23. package/dist/__generated__/multisignvault.d.ts.map +1 -0
  24. package/dist/__generated__/multisignvault.js +913 -0
  25. package/dist/__generated__/multisignvault.js.map +1 -0
  26. package/dist/__generated__/mylastmatch.d.ts +5 -0
  27. package/dist/__generated__/mylastmatch.d.ts.map +1 -0
  28. package/dist/__generated__/mylastmatch.js +7 -0
  29. package/dist/__generated__/mylastmatch.js.map +1 -0
  30. package/dist/__generated__/nostromo.d.ts +295 -0
  31. package/dist/__generated__/nostromo.d.ts.map +1 -0
  32. package/dist/__generated__/nostromo.js +1113 -0
  33. package/dist/__generated__/nostromo.js.map +1 -0
  34. package/dist/__generated__/pulse.d.ts +320 -0
  35. package/dist/__generated__/pulse.d.ts.map +1 -0
  36. package/dist/__generated__/pulse.js +1024 -0
  37. package/dist/__generated__/pulse.js.map +1 -0
  38. package/dist/__generated__/qbay.d.ts +415 -0
  39. package/dist/__generated__/qbay.d.ts.map +1 -0
  40. package/dist/__generated__/qbay.js +1486 -0
  41. package/dist/__generated__/qbay.js.map +1 -0
  42. package/dist/__generated__/qbond.d.ts +210 -0
  43. package/dist/__generated__/qbond.d.ts.map +1 -0
  44. package/dist/__generated__/qbond.js +694 -0
  45. package/dist/__generated__/qbond.js.map +1 -0
  46. package/dist/__generated__/qdraw.d.ts +39 -0
  47. package/dist/__generated__/qdraw.d.ts.map +1 -0
  48. package/dist/__generated__/qdraw.js +135 -0
  49. package/dist/__generated__/qdraw.js.map +1 -0
  50. package/dist/__generated__/qduel.d.ts +171 -0
  51. package/dist/__generated__/qduel.d.ts.map +1 -0
  52. package/dist/__generated__/qduel.js +573 -0
  53. package/dist/__generated__/qduel.js.map +1 -0
  54. package/dist/__generated__/qearn.d.ts +139 -0
  55. package/dist/__generated__/qearn.d.ts.map +1 -0
  56. package/dist/__generated__/qearn.js +471 -0
  57. package/dist/__generated__/qearn.js.map +1 -0
  58. package/dist/__generated__/qip.d.ts +84 -0
  59. package/dist/__generated__/qip.d.ts.map +1 -0
  60. package/dist/__generated__/qip.js +303 -0
  61. package/dist/__generated__/qip.js.map +1 -0
  62. package/dist/__generated__/qraffle.d.ts +235 -0
  63. package/dist/__generated__/qraffle.d.ts.map +1 -0
  64. package/dist/__generated__/qraffle.js +798 -0
  65. package/dist/__generated__/qraffle.js.map +1 -0
  66. package/dist/__generated__/qreservepool.d.ts +70 -0
  67. package/dist/__generated__/qreservepool.d.ts.map +1 -0
  68. package/dist/__generated__/qreservepool.js +177 -0
  69. package/dist/__generated__/qreservepool.js.map +1 -0
  70. package/dist/__generated__/qrwa.d.ts +285 -0
  71. package/dist/__generated__/qrwa.d.ts.map +1 -0
  72. package/dist/__generated__/qrwa.js +1063 -0
  73. package/dist/__generated__/qrwa.js.map +1 -0
  74. package/dist/__generated__/qswap.d.ts +273 -0
  75. package/dist/__generated__/qswap.d.ts.map +1 -0
  76. package/dist/__generated__/qswap.js +897 -0
  77. package/dist/__generated__/qswap.js.map +1 -0
  78. package/dist/__generated__/qthirtyfour.d.ts +231 -0
  79. package/dist/__generated__/qthirtyfour.d.ts.map +1 -0
  80. package/dist/__generated__/qthirtyfour.js +790 -0
  81. package/dist/__generated__/qthirtyfour.js.map +1 -0
  82. package/dist/__generated__/qubicicoportal.d.ts +81 -0
  83. package/dist/__generated__/qubicicoportal.d.ts.map +1 -0
  84. package/dist/__generated__/qubicicoportal.js +260 -0
  85. package/dist/__generated__/qubicicoportal.js.map +1 -0
  86. package/dist/__generated__/quottery.d.ts +308 -0
  87. package/dist/__generated__/quottery.d.ts.map +1 -0
  88. package/dist/__generated__/quottery.js +1062 -0
  89. package/dist/__generated__/quottery.js.map +1 -0
  90. package/dist/__generated__/qusino.d.ts +172 -0
  91. package/dist/__generated__/qusino.d.ts.map +1 -0
  92. package/dist/__generated__/qusino.js +533 -0
  93. package/dist/__generated__/qusino.js.map +1 -0
  94. package/dist/__generated__/qutil.d.ts +310 -0
  95. package/dist/__generated__/qutil.d.ts.map +1 -0
  96. package/dist/__generated__/qutil.js +1033 -0
  97. package/dist/__generated__/qutil.js.map +1 -0
  98. package/dist/__generated__/qvault.d.ts +535 -0
  99. package/dist/__generated__/qvault.d.ts.map +1 -0
  100. package/dist/__generated__/qvault.js +2047 -0
  101. package/dist/__generated__/qvault.js.map +1 -0
  102. package/dist/__generated__/qx.d.ts +178 -0
  103. package/dist/__generated__/qx.d.ts.map +1 -0
  104. package/dist/__generated__/qx.js +586 -0
  105. package/dist/__generated__/qx.js.map +1 -0
  106. package/dist/__generated__/random.d.ts +12 -0
  107. package/dist/__generated__/random.d.ts.map +1 -0
  108. package/dist/__generated__/random.js +26 -0
  109. package/dist/__generated__/random.js.map +1 -0
  110. package/dist/__generated__/randomlottery.d.ts +135 -0
  111. package/dist/__generated__/randomlottery.d.ts.map +1 -0
  112. package/dist/__generated__/randomlottery.js +451 -0
  113. package/dist/__generated__/randomlottery.js.map +1 -0
  114. package/dist/__generated__/supplywatcher.d.ts +5 -0
  115. package/dist/__generated__/supplywatcher.d.ts.map +1 -0
  116. package/dist/__generated__/supplywatcher.js +7 -0
  117. package/dist/__generated__/supplywatcher.js.map +1 -0
  118. package/dist/__generated__/vottunbridge.d.ts +226 -0
  119. package/dist/__generated__/vottunbridge.d.ts.map +1 -0
  120. package/dist/__generated__/vottunbridge.js +835 -0
  121. package/dist/__generated__/vottunbridge.js.map +1 -0
  122. package/dist/call-contract.d.ts +25 -0
  123. package/dist/call-contract.d.ts.map +1 -0
  124. package/dist/call-contract.js +41 -0
  125. package/dist/call-contract.js.map +1 -0
  126. package/dist/index.d.ts +6 -0
  127. package/dist/index.d.ts.map +1 -0
  128. package/dist/index.js +4 -0
  129. package/dist/index.js.map +1 -0
  130. package/dist/result.d.ts +12 -0
  131. package/dist/result.d.ts.map +1 -0
  132. package/dist/result.js +7 -0
  133. package/dist/result.js.map +1 -0
  134. package/package.json +32 -0
@@ -0,0 +1,790 @@
1
+ import { buildPayload, decodePayload } from '@qubic.org/registry';
2
+ import { callContractFunction } from '../call-contract.js';
3
+ export const Q_THIRTY_FOUR_CONTRACT_INDEX = 22;
4
+ const STRUCTS = {
5
+ 'NextEpochData': {
6
+ name: 'NextEpochData',
7
+ byteLength: 18,
8
+ fields: [
9
+ {
10
+ name: 'newTicketPrice',
11
+ type: 'uint64',
12
+ offset: 0,
13
+ byteLength: 8,
14
+ },
15
+ {
16
+ name: 'newTargetJackpot',
17
+ type: 'uint64',
18
+ offset: 8,
19
+ byteLength: 8,
20
+ },
21
+ {
22
+ name: 'newSchedule',
23
+ type: 'uint8',
24
+ offset: 16,
25
+ byteLength: 1,
26
+ },
27
+ {
28
+ name: 'newDrawHour',
29
+ type: 'uint8',
30
+ offset: 17,
31
+ byteLength: 1,
32
+ },
33
+ ],
34
+ },
35
+ 'WinnerData': {
36
+ name: 'WinnerData',
37
+ byteLength: 40974,
38
+ fields: [
39
+ {
40
+ name: 'winners',
41
+ type: 'array',
42
+ offset: 0,
43
+ byteLength: 40960,
44
+ arrayLength: 1024,
45
+ arrayItemByteLength: 40,
46
+ arrayItemStructRef: 'WinnerPlayerData',
47
+ },
48
+ {
49
+ name: 'winnerValues',
50
+ type: 'array',
51
+ offset: 40960,
52
+ byteLength: 4,
53
+ arrayLength: 4,
54
+ arrayItemType: 'uint8',
55
+ arrayItemByteLength: 1,
56
+ },
57
+ {
58
+ name: 'winnerCounter',
59
+ type: 'uint64',
60
+ offset: 40964,
61
+ byteLength: 8,
62
+ },
63
+ {
64
+ name: 'epoch',
65
+ type: 'uint16',
66
+ offset: 40972,
67
+ byteLength: 2,
68
+ },
69
+ ],
70
+ },
71
+ 'PoolsSnapshot': {
72
+ name: 'PoolsSnapshot',
73
+ byteLength: 27,
74
+ fields: [
75
+ {
76
+ name: 'jackpot',
77
+ type: 'uint64',
78
+ offset: 0,
79
+ byteLength: 8,
80
+ },
81
+ {
82
+ name: 'reserve',
83
+ type: 'uint64',
84
+ offset: 8,
85
+ byteLength: 8,
86
+ },
87
+ {
88
+ name: 'targetJackpot',
89
+ type: 'uint64',
90
+ offset: 16,
91
+ byteLength: 8,
92
+ },
93
+ {
94
+ name: 'frActive',
95
+ type: 'uint8',
96
+ offset: 24,
97
+ byteLength: 1,
98
+ },
99
+ {
100
+ name: 'roundsSinceK4',
101
+ type: 'uint16',
102
+ offset: 25,
103
+ byteLength: 2,
104
+ },
105
+ ],
106
+ },
107
+ 'PlayerData': {
108
+ name: 'PlayerData',
109
+ byteLength: 36,
110
+ fields: [
111
+ {
112
+ name: 'player',
113
+ type: 'id',
114
+ offset: 0,
115
+ byteLength: 32,
116
+ },
117
+ {
118
+ name: 'randomValues',
119
+ type: 'array',
120
+ offset: 32,
121
+ byteLength: 4,
122
+ arrayLength: 4,
123
+ arrayItemType: 'uint8',
124
+ arrayItemByteLength: 1,
125
+ },
126
+ ],
127
+ },
128
+ 'WinningCombination': {
129
+ name: 'WinningCombination',
130
+ byteLength: 4,
131
+ fields: [
132
+ {
133
+ name: 'values',
134
+ type: 'array',
135
+ offset: 0,
136
+ byteLength: 4,
137
+ arrayLength: 4,
138
+ arrayItemType: 'uint8',
139
+ arrayItemByteLength: 1,
140
+ },
141
+ ],
142
+ },
143
+ 'WinnerPlayerData': {
144
+ name: 'WinnerPlayerData',
145
+ byteLength: 40,
146
+ fields: [
147
+ {
148
+ name: 'player',
149
+ type: 'id',
150
+ offset: 0,
151
+ byteLength: 32,
152
+ },
153
+ {
154
+ name: 'randomValues',
155
+ type: 'array',
156
+ offset: 32,
157
+ byteLength: 4,
158
+ arrayLength: 4,
159
+ arrayItemType: 'uint8',
160
+ arrayItemByteLength: 1,
161
+ },
162
+ {
163
+ name: 'wonAmount',
164
+ type: 'uint32',
165
+ offset: 36,
166
+ byteLength: 4,
167
+ },
168
+ ],
169
+ },
170
+ };
171
+ export const Q_THIRTY_FOUR_BUY_TICKET_INPUT_TYPE = 6;
172
+ const Q_THIRTY_FOUR_BUY_TICKET_INPUT_FIELDS = [
173
+ {
174
+ name: 'randomValues',
175
+ type: 'array',
176
+ offset: 0,
177
+ byteLength: 4,
178
+ arrayLength: 4,
179
+ arrayItemType: 'uint8',
180
+ arrayItemByteLength: 1,
181
+ },
182
+ ];
183
+ export function buildQThirtyFourBuyTicketInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
184
+ return buildPayload(Q_THIRTY_FOUR_BUY_TICKET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
185
+ }
186
+ const Q_THIRTY_FOUR_BUY_TICKET_OUTPUT_FIELDS = [
187
+ {
188
+ name: 'returnCode',
189
+ type: 'uint8',
190
+ offset: 0,
191
+ byteLength: 1,
192
+ },
193
+ ];
194
+ export function decodeQThirtyFourBuyTicketOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
195
+ return decodePayload(data, Q_THIRTY_FOUR_BUY_TICKET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
196
+ }
197
+ export const Q_THIRTY_FOUR_BUY_TICKETS_BATCH_INPUT_TYPE = 7;
198
+ const Q_THIRTY_FOUR_BUY_TICKETS_BATCH_INPUT_FIELDS = [
199
+ {
200
+ name: 'tickets',
201
+ type: 'array',
202
+ offset: 0,
203
+ byteLength: 0,
204
+ arrayLength: 0,
205
+ arrayItemType: 'uint8',
206
+ arrayItemByteLength: 1,
207
+ },
208
+ ];
209
+ export function buildQThirtyFourBuyTicketsBatchInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
210
+ return buildPayload(Q_THIRTY_FOUR_BUY_TICKETS_BATCH_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
211
+ }
212
+ const Q_THIRTY_FOUR_BUY_TICKETS_BATCH_OUTPUT_FIELDS = [
213
+ {
214
+ name: 'boughtTicketCount',
215
+ type: 'uint16',
216
+ offset: 0,
217
+ byteLength: 2,
218
+ },
219
+ {
220
+ name: 'returnCode',
221
+ type: 'uint8',
222
+ offset: 2,
223
+ byteLength: 1,
224
+ },
225
+ ];
226
+ export function decodeQThirtyFourBuyTicketsBatchOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
227
+ return decodePayload(data, Q_THIRTY_FOUR_BUY_TICKETS_BATCH_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
228
+ }
229
+ export const Q_THIRTY_FOUR_BUY_TICKETS_BY_SELECTION_INPUT_TYPE = 8;
230
+ const Q_THIRTY_FOUR_BUY_TICKETS_BY_SELECTION_INPUT_FIELDS = [
231
+ {
232
+ name: 'numbers',
233
+ type: 'array',
234
+ offset: 0,
235
+ byteLength: 0,
236
+ arrayLength: 0,
237
+ arrayItemType: 'uint8',
238
+ arrayItemByteLength: 1,
239
+ },
240
+ ];
241
+ export function buildQThirtyFourBuyTicketsBySelectionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
242
+ return buildPayload(Q_THIRTY_FOUR_BUY_TICKETS_BY_SELECTION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
243
+ }
244
+ const Q_THIRTY_FOUR_BUY_TICKETS_BY_SELECTION_OUTPUT_FIELDS = [
245
+ {
246
+ name: 'requestedTicketCount',
247
+ type: 'uint16',
248
+ offset: 0,
249
+ byteLength: 2,
250
+ },
251
+ {
252
+ name: 'boughtTicketCount',
253
+ type: 'uint16',
254
+ offset: 2,
255
+ byteLength: 2,
256
+ },
257
+ {
258
+ name: 'returnCode',
259
+ type: 'uint8',
260
+ offset: 4,
261
+ byteLength: 1,
262
+ },
263
+ ];
264
+ export function decodeQThirtyFourBuyTicketsBySelectionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
265
+ return decodePayload(data, Q_THIRTY_FOUR_BUY_TICKETS_BY_SELECTION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
266
+ }
267
+ export const Q_THIRTY_FOUR_SET_PRICE_INPUT_TYPE = 9;
268
+ const Q_THIRTY_FOUR_SET_PRICE_INPUT_FIELDS = [
269
+ {
270
+ name: 'newPrice',
271
+ type: 'uint64',
272
+ offset: 0,
273
+ byteLength: 8,
274
+ },
275
+ ];
276
+ export function buildQThirtyFourSetPriceInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
277
+ return buildPayload(Q_THIRTY_FOUR_SET_PRICE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
278
+ }
279
+ const Q_THIRTY_FOUR_SET_PRICE_OUTPUT_FIELDS = [
280
+ {
281
+ name: 'returnCode',
282
+ type: 'uint8',
283
+ offset: 0,
284
+ byteLength: 1,
285
+ },
286
+ ];
287
+ export function decodeQThirtyFourSetPriceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
288
+ return decodePayload(data, Q_THIRTY_FOUR_SET_PRICE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
289
+ }
290
+ export const Q_THIRTY_FOUR_SET_SCHEDULE_INPUT_TYPE = 10;
291
+ const Q_THIRTY_FOUR_SET_SCHEDULE_INPUT_FIELDS = [
292
+ {
293
+ name: 'newSchedule',
294
+ type: 'uint8',
295
+ offset: 0,
296
+ byteLength: 1,
297
+ },
298
+ ];
299
+ export function buildQThirtyFourSetScheduleInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
300
+ return buildPayload(Q_THIRTY_FOUR_SET_SCHEDULE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
301
+ }
302
+ const Q_THIRTY_FOUR_SET_SCHEDULE_OUTPUT_FIELDS = [
303
+ {
304
+ name: 'returnCode',
305
+ type: 'uint8',
306
+ offset: 0,
307
+ byteLength: 1,
308
+ },
309
+ ];
310
+ export function decodeQThirtyFourSetScheduleOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
311
+ return decodePayload(data, Q_THIRTY_FOUR_SET_SCHEDULE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
312
+ }
313
+ export const Q_THIRTY_FOUR_SET_DRAW_HOUR_INPUT_TYPE = 11;
314
+ const Q_THIRTY_FOUR_SET_DRAW_HOUR_INPUT_FIELDS = [
315
+ {
316
+ name: 'newDrawHour',
317
+ type: 'uint8',
318
+ offset: 0,
319
+ byteLength: 1,
320
+ },
321
+ ];
322
+ export function buildQThirtyFourSetDrawHourInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
323
+ return buildPayload(Q_THIRTY_FOUR_SET_DRAW_HOUR_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
324
+ }
325
+ const Q_THIRTY_FOUR_SET_DRAW_HOUR_OUTPUT_FIELDS = [
326
+ {
327
+ name: 'returnCode',
328
+ type: 'uint8',
329
+ offset: 0,
330
+ byteLength: 1,
331
+ },
332
+ ];
333
+ export function decodeQThirtyFourSetDrawHourOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
334
+ return decodePayload(data, Q_THIRTY_FOUR_SET_DRAW_HOUR_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
335
+ }
336
+ export const Q_THIRTY_FOUR_SET_TARGET_JACKPOT_INPUT_TYPE = 12;
337
+ const Q_THIRTY_FOUR_SET_TARGET_JACKPOT_INPUT_FIELDS = [
338
+ {
339
+ name: 'newTargetJackpot',
340
+ type: 'uint64',
341
+ offset: 0,
342
+ byteLength: 8,
343
+ },
344
+ ];
345
+ export function buildQThirtyFourSetTargetJackpotInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
346
+ return buildPayload(Q_THIRTY_FOUR_SET_TARGET_JACKPOT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
347
+ }
348
+ const Q_THIRTY_FOUR_SET_TARGET_JACKPOT_OUTPUT_FIELDS = [
349
+ {
350
+ name: 'returnCode',
351
+ type: 'uint8',
352
+ offset: 0,
353
+ byteLength: 1,
354
+ },
355
+ ];
356
+ export function decodeQThirtyFourSetTargetJackpotOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
357
+ return decodePayload(data, Q_THIRTY_FOUR_SET_TARGET_JACKPOT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
358
+ }
359
+ export const Q_THIRTY_FOUR_SYNC_JACKPOT_INPUT_TYPE = 37;
360
+ const Q_THIRTY_FOUR_SYNC_JACKPOT_OUTPUT_FIELDS = [
361
+ {
362
+ name: 'returnCode',
363
+ type: 'uint8',
364
+ offset: 0,
365
+ byteLength: 1,
366
+ },
367
+ ];
368
+ export function decodeQThirtyFourSyncJackpotOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
369
+ return decodePayload(data, Q_THIRTY_FOUR_SYNC_JACKPOT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
370
+ }
371
+ export const Q_THIRTY_FOUR_GET_TICKET_PRICE_INPUT_TYPE = 22;
372
+ export const Q_THIRTY_FOUR_GET_TICKET_PRICE_INPUT_SIZE = 0;
373
+ const Q_THIRTY_FOUR_GET_TICKET_PRICE_OUTPUT_FIELDS = [
374
+ {
375
+ name: 'ticketPrice',
376
+ type: 'uint64',
377
+ offset: 0,
378
+ byteLength: 8,
379
+ },
380
+ ];
381
+ export function decodeQThirtyFourGetTicketPriceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
382
+ return decodePayload(data, Q_THIRTY_FOUR_GET_TICKET_PRICE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
383
+ }
384
+ export async function qThirtyFourGetTicketPrice(live, options) {
385
+ return callContractFunction({
386
+ live,
387
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
388
+ inputType: Q_THIRTY_FOUR_GET_TICKET_PRICE_INPUT_TYPE,
389
+ inputSize: Q_THIRTY_FOUR_GET_TICKET_PRICE_INPUT_SIZE,
390
+ inputFields: [],
391
+ outputFields: Q_THIRTY_FOUR_GET_TICKET_PRICE_OUTPUT_FIELDS,
392
+ structs: STRUCTS,
393
+ input: {},
394
+ ...options,
395
+ });
396
+ }
397
+ export const Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_INPUT_TYPE = 23;
398
+ export const Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_INPUT_SIZE = 0;
399
+ const Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_OUTPUT_FIELDS = [
400
+ {
401
+ name: 'nextEpochData',
402
+ type: 'struct',
403
+ offset: 0,
404
+ byteLength: 18,
405
+ structRef: 'NextEpochData',
406
+ },
407
+ ];
408
+ export function decodeQThirtyFourGetNextEpochDataOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
409
+ return decodePayload(data, Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
410
+ }
411
+ export async function qThirtyFourGetNextEpochData(live, options) {
412
+ return callContractFunction({
413
+ live,
414
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
415
+ inputType: Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_INPUT_TYPE,
416
+ inputSize: Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_INPUT_SIZE,
417
+ inputFields: [],
418
+ outputFields: Q_THIRTY_FOUR_GET_NEXT_EPOCH_DATA_OUTPUT_FIELDS,
419
+ structs: STRUCTS,
420
+ input: {},
421
+ ...options,
422
+ });
423
+ }
424
+ export const Q_THIRTY_FOUR_GET_SCHEDULE_INPUT_TYPE = 24;
425
+ export const Q_THIRTY_FOUR_GET_SCHEDULE_INPUT_SIZE = 0;
426
+ const Q_THIRTY_FOUR_GET_SCHEDULE_OUTPUT_FIELDS = [
427
+ {
428
+ name: 'schedule',
429
+ type: 'uint8',
430
+ offset: 0,
431
+ byteLength: 1,
432
+ },
433
+ ];
434
+ export function decodeQThirtyFourGetScheduleOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
435
+ return decodePayload(data, Q_THIRTY_FOUR_GET_SCHEDULE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
436
+ }
437
+ export async function qThirtyFourGetSchedule(live, options) {
438
+ return callContractFunction({
439
+ live,
440
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
441
+ inputType: Q_THIRTY_FOUR_GET_SCHEDULE_INPUT_TYPE,
442
+ inputSize: Q_THIRTY_FOUR_GET_SCHEDULE_INPUT_SIZE,
443
+ inputFields: [],
444
+ outputFields: Q_THIRTY_FOUR_GET_SCHEDULE_OUTPUT_FIELDS,
445
+ structs: STRUCTS,
446
+ input: {},
447
+ ...options,
448
+ });
449
+ }
450
+ export const Q_THIRTY_FOUR_GET_WINNER_DATA_INPUT_TYPE = 25;
451
+ export const Q_THIRTY_FOUR_GET_WINNER_DATA_INPUT_SIZE = 0;
452
+ const Q_THIRTY_FOUR_GET_WINNER_DATA_OUTPUT_FIELDS = [
453
+ {
454
+ name: 'winnerData',
455
+ type: 'struct',
456
+ offset: 0,
457
+ byteLength: 40974,
458
+ structRef: 'WinnerData',
459
+ },
460
+ ];
461
+ export function decodeQThirtyFourGetWinnerDataOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
462
+ return decodePayload(data, Q_THIRTY_FOUR_GET_WINNER_DATA_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
463
+ }
464
+ export async function qThirtyFourGetWinnerData(live, options) {
465
+ return callContractFunction({
466
+ live,
467
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
468
+ inputType: Q_THIRTY_FOUR_GET_WINNER_DATA_INPUT_TYPE,
469
+ inputSize: Q_THIRTY_FOUR_GET_WINNER_DATA_INPUT_SIZE,
470
+ inputFields: [],
471
+ outputFields: Q_THIRTY_FOUR_GET_WINNER_DATA_OUTPUT_FIELDS,
472
+ structs: STRUCTS,
473
+ input: {},
474
+ ...options,
475
+ });
476
+ }
477
+ export const Q_THIRTY_FOUR_GET_POOLS_INPUT_TYPE = 26;
478
+ export const Q_THIRTY_FOUR_GET_POOLS_INPUT_SIZE = 0;
479
+ const Q_THIRTY_FOUR_GET_POOLS_OUTPUT_FIELDS = [
480
+ {
481
+ name: 'pools',
482
+ type: 'struct',
483
+ offset: 0,
484
+ byteLength: 27,
485
+ structRef: 'PoolsSnapshot',
486
+ },
487
+ ];
488
+ export function decodeQThirtyFourGetPoolsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
489
+ return decodePayload(data, Q_THIRTY_FOUR_GET_POOLS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
490
+ }
491
+ export async function qThirtyFourGetPools(live, options) {
492
+ return callContractFunction({
493
+ live,
494
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
495
+ inputType: Q_THIRTY_FOUR_GET_POOLS_INPUT_TYPE,
496
+ inputSize: Q_THIRTY_FOUR_GET_POOLS_INPUT_SIZE,
497
+ inputFields: [],
498
+ outputFields: Q_THIRTY_FOUR_GET_POOLS_OUTPUT_FIELDS,
499
+ structs: STRUCTS,
500
+ input: {},
501
+ ...options,
502
+ });
503
+ }
504
+ export const Q_THIRTY_FOUR_GET_DRAW_HOUR_INPUT_TYPE = 27;
505
+ export const Q_THIRTY_FOUR_GET_DRAW_HOUR_INPUT_SIZE = 0;
506
+ const Q_THIRTY_FOUR_GET_DRAW_HOUR_OUTPUT_FIELDS = [
507
+ {
508
+ name: 'drawHour',
509
+ type: 'uint8',
510
+ offset: 0,
511
+ byteLength: 1,
512
+ },
513
+ ];
514
+ export function decodeQThirtyFourGetDrawHourOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
515
+ return decodePayload(data, Q_THIRTY_FOUR_GET_DRAW_HOUR_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
516
+ }
517
+ export async function qThirtyFourGetDrawHour(live, options) {
518
+ return callContractFunction({
519
+ live,
520
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
521
+ inputType: Q_THIRTY_FOUR_GET_DRAW_HOUR_INPUT_TYPE,
522
+ inputSize: Q_THIRTY_FOUR_GET_DRAW_HOUR_INPUT_SIZE,
523
+ inputFields: [],
524
+ outputFields: Q_THIRTY_FOUR_GET_DRAW_HOUR_OUTPUT_FIELDS,
525
+ structs: STRUCTS,
526
+ input: {},
527
+ ...options,
528
+ });
529
+ }
530
+ export const Q_THIRTY_FOUR_GET_STATE_INPUT_TYPE = 28;
531
+ export const Q_THIRTY_FOUR_GET_STATE_INPUT_SIZE = 0;
532
+ const Q_THIRTY_FOUR_GET_STATE_OUTPUT_FIELDS = [
533
+ {
534
+ name: 'currentState',
535
+ type: 'uint8',
536
+ offset: 0,
537
+ byteLength: 1,
538
+ },
539
+ ];
540
+ export function decodeQThirtyFourGetStateOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
541
+ return decodePayload(data, Q_THIRTY_FOUR_GET_STATE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
542
+ }
543
+ export async function qThirtyFourGetState(live, options) {
544
+ return callContractFunction({
545
+ live,
546
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
547
+ inputType: Q_THIRTY_FOUR_GET_STATE_INPUT_TYPE,
548
+ inputSize: Q_THIRTY_FOUR_GET_STATE_INPUT_SIZE,
549
+ inputFields: [],
550
+ outputFields: Q_THIRTY_FOUR_GET_STATE_OUTPUT_FIELDS,
551
+ structs: STRUCTS,
552
+ input: {},
553
+ ...options,
554
+ });
555
+ }
556
+ export const Q_THIRTY_FOUR_GET_FEES_INPUT_TYPE = 31;
557
+ export const Q_THIRTY_FOUR_GET_FEES_INPUT_SIZE = 0;
558
+ const Q_THIRTY_FOUR_GET_FEES_OUTPUT_FIELDS = [
559
+ {
560
+ name: 'teamFeePercent',
561
+ type: 'uint8',
562
+ offset: 0,
563
+ byteLength: 1,
564
+ },
565
+ {
566
+ name: 'distributionFeePercent',
567
+ type: 'uint8',
568
+ offset: 1,
569
+ byteLength: 1,
570
+ },
571
+ {
572
+ name: 'winnerFeePercent',
573
+ type: 'uint8',
574
+ offset: 2,
575
+ byteLength: 1,
576
+ },
577
+ {
578
+ name: 'burnPercent',
579
+ type: 'uint8',
580
+ offset: 3,
581
+ byteLength: 1,
582
+ },
583
+ {
584
+ name: 'returnCode',
585
+ type: 'uint8',
586
+ offset: 4,
587
+ byteLength: 1,
588
+ },
589
+ ];
590
+ export function decodeQThirtyFourGetFeesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
591
+ return decodePayload(data, Q_THIRTY_FOUR_GET_FEES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
592
+ }
593
+ export async function qThirtyFourGetFees(live, options) {
594
+ return callContractFunction({
595
+ live,
596
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
597
+ inputType: Q_THIRTY_FOUR_GET_FEES_INPUT_TYPE,
598
+ inputSize: Q_THIRTY_FOUR_GET_FEES_INPUT_SIZE,
599
+ inputFields: [],
600
+ outputFields: Q_THIRTY_FOUR_GET_FEES_OUTPUT_FIELDS,
601
+ structs: STRUCTS,
602
+ input: {},
603
+ ...options,
604
+ });
605
+ }
606
+ export const Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_TYPE = 34;
607
+ export const Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_SIZE = 16;
608
+ const Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_FIELDS = [
609
+ {
610
+ name: 'k2WinnerCount',
611
+ type: 'uint64',
612
+ offset: 0,
613
+ byteLength: 8,
614
+ },
615
+ {
616
+ name: 'k3WinnerCount',
617
+ type: 'uint64',
618
+ offset: 8,
619
+ byteLength: 8,
620
+ },
621
+ ];
622
+ export function buildQThirtyFourEstimatePrizePayoutsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
623
+ return buildPayload(Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
624
+ }
625
+ const Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_OUTPUT_FIELDS = [
626
+ {
627
+ name: 'k2PayoutPerWinner',
628
+ type: 'uint64',
629
+ offset: 0,
630
+ byteLength: 8,
631
+ },
632
+ {
633
+ name: 'k3PayoutPerWinner',
634
+ type: 'uint64',
635
+ offset: 8,
636
+ byteLength: 8,
637
+ },
638
+ {
639
+ name: 'k2MinFloor',
640
+ type: 'uint64',
641
+ offset: 16,
642
+ byteLength: 8,
643
+ },
644
+ {
645
+ name: 'k3MinFloor',
646
+ type: 'uint64',
647
+ offset: 24,
648
+ byteLength: 8,
649
+ },
650
+ {
651
+ name: 'perWinnerCap',
652
+ type: 'uint64',
653
+ offset: 32,
654
+ byteLength: 8,
655
+ },
656
+ {
657
+ name: 'totalRevenue',
658
+ type: 'uint64',
659
+ offset: 40,
660
+ byteLength: 8,
661
+ },
662
+ {
663
+ name: 'k2Pool',
664
+ type: 'uint64',
665
+ offset: 48,
666
+ byteLength: 8,
667
+ },
668
+ {
669
+ name: 'k3Pool',
670
+ type: 'uint64',
671
+ offset: 56,
672
+ byteLength: 8,
673
+ },
674
+ ];
675
+ export function decodeQThirtyFourEstimatePrizePayoutsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
676
+ return decodePayload(data, Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
677
+ }
678
+ export async function qThirtyFourEstimatePrizePayouts(live, input, options) {
679
+ return callContractFunction({
680
+ live,
681
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
682
+ inputType: Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_TYPE,
683
+ inputSize: Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_SIZE,
684
+ inputFields: Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_INPUT_FIELDS,
685
+ outputFields: Q_THIRTY_FOUR_ESTIMATE_PRIZE_PAYOUTS_OUTPUT_FIELDS,
686
+ structs: STRUCTS,
687
+ input: input,
688
+ ...options,
689
+ });
690
+ }
691
+ export const Q_THIRTY_FOUR_GET_PLAYERS_INPUT_TYPE = 35;
692
+ export const Q_THIRTY_FOUR_GET_PLAYERS_INPUT_SIZE = 0;
693
+ const Q_THIRTY_FOUR_GET_PLAYERS_OUTPUT_FIELDS = [
694
+ {
695
+ name: 'players',
696
+ type: 'array',
697
+ offset: 0,
698
+ byteLength: 36864,
699
+ arrayLength: 1024,
700
+ arrayItemByteLength: 36,
701
+ arrayItemStructRef: 'PlayerData',
702
+ },
703
+ {
704
+ name: 'returnCode',
705
+ type: 'uint8',
706
+ offset: 36864,
707
+ byteLength: 1,
708
+ },
709
+ ];
710
+ export function decodeQThirtyFourGetPlayersOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
711
+ return decodePayload(data, Q_THIRTY_FOUR_GET_PLAYERS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
712
+ }
713
+ export async function qThirtyFourGetPlayers(live, options) {
714
+ return callContractFunction({
715
+ live,
716
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
717
+ inputType: Q_THIRTY_FOUR_GET_PLAYERS_INPUT_TYPE,
718
+ inputSize: Q_THIRTY_FOUR_GET_PLAYERS_INPUT_SIZE,
719
+ inputFields: [],
720
+ outputFields: Q_THIRTY_FOUR_GET_PLAYERS_OUTPUT_FIELDS,
721
+ structs: STRUCTS,
722
+ input: {},
723
+ ...options,
724
+ });
725
+ }
726
+ export const Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_INPUT_TYPE = 36;
727
+ export const Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_INPUT_SIZE = 0;
728
+ const Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_OUTPUT_FIELDS = [
729
+ {
730
+ name: 'history',
731
+ type: 'array',
732
+ offset: 0,
733
+ byteLength: 512,
734
+ arrayLength: 128,
735
+ arrayItemByteLength: 4,
736
+ arrayItemStructRef: 'WinningCombination',
737
+ },
738
+ {
739
+ name: 'returnCode',
740
+ type: 'uint8',
741
+ offset: 512,
742
+ byteLength: 1,
743
+ },
744
+ ];
745
+ export function decodeQThirtyFourGetWinningCombinationsHistoryOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
746
+ return decodePayload(data, Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
747
+ }
748
+ export async function qThirtyFourGetWinningCombinationsHistory(live, options) {
749
+ return callContractFunction({
750
+ live,
751
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
752
+ inputType: Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_INPUT_TYPE,
753
+ inputSize: Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_INPUT_SIZE,
754
+ inputFields: [],
755
+ outputFields: Q_THIRTY_FOUR_GET_WINNING_COMBINATIONS_HISTORY_OUTPUT_FIELDS,
756
+ structs: STRUCTS,
757
+ input: {},
758
+ ...options,
759
+ });
760
+ }
761
+ export const qThirtyFour = {
762
+ contractIndex: Q_THIRTY_FOUR_CONTRACT_INDEX,
763
+ GetTicketPrice: qThirtyFourGetTicketPrice,
764
+ GetNextEpochData: qThirtyFourGetNextEpochData,
765
+ GetSchedule: qThirtyFourGetSchedule,
766
+ GetWinnerData: qThirtyFourGetWinnerData,
767
+ GetPools: qThirtyFourGetPools,
768
+ GetDrawHour: qThirtyFourGetDrawHour,
769
+ GetState: qThirtyFourGetState,
770
+ GetFees: qThirtyFourGetFees,
771
+ EstimatePrizePayouts: qThirtyFourEstimatePrizePayouts,
772
+ GetPlayers: qThirtyFourGetPlayers,
773
+ GetWinningCombinationsHistory: qThirtyFourGetWinningCombinationsHistory,
774
+ buildBuyTicketInput: buildQThirtyFourBuyTicketInput,
775
+ decodeBuyTicketOutput: decodeQThirtyFourBuyTicketOutput,
776
+ buildBuyTicketsBatchInput: buildQThirtyFourBuyTicketsBatchInput,
777
+ decodeBuyTicketsBatchOutput: decodeQThirtyFourBuyTicketsBatchOutput,
778
+ buildBuyTicketsBySelectionInput: buildQThirtyFourBuyTicketsBySelectionInput,
779
+ decodeBuyTicketsBySelectionOutput: decodeQThirtyFourBuyTicketsBySelectionOutput,
780
+ buildSetPriceInput: buildQThirtyFourSetPriceInput,
781
+ decodeSetPriceOutput: decodeQThirtyFourSetPriceOutput,
782
+ buildSetScheduleInput: buildQThirtyFourSetScheduleInput,
783
+ decodeSetScheduleOutput: decodeQThirtyFourSetScheduleOutput,
784
+ buildSetDrawHourInput: buildQThirtyFourSetDrawHourInput,
785
+ decodeSetDrawHourOutput: decodeQThirtyFourSetDrawHourOutput,
786
+ buildSetTargetJackpotInput: buildQThirtyFourSetTargetJackpotInput,
787
+ decodeSetTargetJackpotOutput: decodeQThirtyFourSetTargetJackpotOutput,
788
+ decodeSyncJackpotOutput: decodeQThirtyFourSyncJackpotOutput,
789
+ };
790
+ //# sourceMappingURL=qthirtyfour.js.map