@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,1024 @@
1
+ import { buildPayload, decodePayload } from '@qubic.org/registry';
2
+ import { callContractFunction } from '../call-contract.js';
3
+ export const PULSE_CONTRACT_INDEX = 24;
4
+ const STRUCTS = {
5
+ 'Ticket': {
6
+ name: 'Ticket',
7
+ byteLength: 32,
8
+ fields: [
9
+ {
10
+ name: 'player',
11
+ type: 'id',
12
+ offset: 0,
13
+ byteLength: 32,
14
+ },
15
+ {
16
+ name: 'digits',
17
+ type: 'array',
18
+ offset: 32,
19
+ byteLength: 0,
20
+ arrayLength: 0,
21
+ arrayItemType: 'uint8',
22
+ arrayItemByteLength: 1,
23
+ },
24
+ ],
25
+ },
26
+ 'WinnerInfo': {
27
+ name: 'WinnerInfo',
28
+ byteLength: 42,
29
+ fields: [
30
+ {
31
+ name: 'winnerAddress',
32
+ type: 'id',
33
+ offset: 0,
34
+ byteLength: 32,
35
+ },
36
+ {
37
+ name: 'revenue',
38
+ type: 'uint64',
39
+ offset: 32,
40
+ byteLength: 8,
41
+ },
42
+ {
43
+ name: 'epoch',
44
+ type: 'uint16',
45
+ offset: 40,
46
+ byteLength: 2,
47
+ },
48
+ ],
49
+ },
50
+ 'AutoParticipant': {
51
+ name: 'AutoParticipant',
52
+ byteLength: 42,
53
+ fields: [
54
+ {
55
+ name: 'player',
56
+ type: 'id',
57
+ offset: 0,
58
+ byteLength: 32,
59
+ },
60
+ {
61
+ name: 'deposit',
62
+ type: 'sint64',
63
+ offset: 32,
64
+ byteLength: 8,
65
+ },
66
+ {
67
+ name: 'desiredTickets',
68
+ type: 'uint16',
69
+ offset: 40,
70
+ byteLength: 2,
71
+ },
72
+ ],
73
+ },
74
+ };
75
+ export const PULSE_BUY_TICKET_INPUT_TYPE = 2;
76
+ const PULSE_BUY_TICKET_INPUT_FIELDS = [
77
+ {
78
+ name: 'digits',
79
+ type: 'array',
80
+ offset: 0,
81
+ byteLength: 0,
82
+ arrayLength: 0,
83
+ arrayItemType: 'uint8',
84
+ arrayItemByteLength: 1,
85
+ },
86
+ ];
87
+ export function buildPulseBuyTicketInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
88
+ return buildPayload(PULSE_BUY_TICKET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
89
+ }
90
+ const PULSE_BUY_TICKET_OUTPUT_FIELDS = [
91
+ {
92
+ name: 'returnCode',
93
+ type: 'uint8',
94
+ offset: 0,
95
+ byteLength: 1,
96
+ },
97
+ ];
98
+ export function decodePulseBuyTicketOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
99
+ return decodePayload(data, PULSE_BUY_TICKET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
100
+ }
101
+ export const PULSE_BUY_RANDOM_TICKETS_INPUT_TYPE = 7;
102
+ const PULSE_BUY_RANDOM_TICKETS_INPUT_FIELDS = [
103
+ {
104
+ name: 'count',
105
+ type: 'uint16',
106
+ offset: 0,
107
+ byteLength: 2,
108
+ },
109
+ ];
110
+ export function buildPulseBuyRandomTicketsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
111
+ return buildPayload(PULSE_BUY_RANDOM_TICKETS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
112
+ }
113
+ const PULSE_BUY_RANDOM_TICKETS_OUTPUT_FIELDS = [
114
+ {
115
+ name: 'returnCode',
116
+ type: 'uint8',
117
+ offset: 0,
118
+ byteLength: 1,
119
+ },
120
+ ];
121
+ export function decodePulseBuyRandomTicketsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
122
+ return decodePayload(data, PULSE_BUY_RANDOM_TICKETS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
123
+ }
124
+ export const PULSE_DEPOSIT_AUTO_PARTICIPATION_INPUT_TYPE = 11;
125
+ const PULSE_DEPOSIT_AUTO_PARTICIPATION_INPUT_FIELDS = [
126
+ {
127
+ name: 'amount',
128
+ type: 'sint64',
129
+ offset: 0,
130
+ byteLength: 8,
131
+ },
132
+ {
133
+ name: 'desiredTickets',
134
+ type: 'sint16',
135
+ offset: 8,
136
+ byteLength: 2,
137
+ },
138
+ {
139
+ name: 'buyNow',
140
+ type: 'uint8',
141
+ offset: 10,
142
+ byteLength: 1,
143
+ },
144
+ ];
145
+ export function buildPulseDepositAutoParticipationInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
146
+ return buildPayload(PULSE_DEPOSIT_AUTO_PARTICIPATION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
147
+ }
148
+ const PULSE_DEPOSIT_AUTO_PARTICIPATION_OUTPUT_FIELDS = [
149
+ {
150
+ name: 'returnCode',
151
+ type: 'uint8',
152
+ offset: 0,
153
+ byteLength: 1,
154
+ },
155
+ ];
156
+ export function decodePulseDepositAutoParticipationOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
157
+ return decodePayload(data, PULSE_DEPOSIT_AUTO_PARTICIPATION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
158
+ }
159
+ export const PULSE_WITHDRAW_AUTO_PARTICIPATION_INPUT_TYPE = 12;
160
+ const PULSE_WITHDRAW_AUTO_PARTICIPATION_INPUT_FIELDS = [
161
+ {
162
+ name: 'amount',
163
+ type: 'sint64',
164
+ offset: 0,
165
+ byteLength: 8,
166
+ },
167
+ ];
168
+ export function buildPulseWithdrawAutoParticipationInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
169
+ return buildPayload(PULSE_WITHDRAW_AUTO_PARTICIPATION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
170
+ }
171
+ const PULSE_WITHDRAW_AUTO_PARTICIPATION_OUTPUT_FIELDS = [
172
+ {
173
+ name: 'returnCode',
174
+ type: 'uint8',
175
+ offset: 0,
176
+ byteLength: 1,
177
+ },
178
+ ];
179
+ export function decodePulseWithdrawAutoParticipationOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
180
+ return decodePayload(data, PULSE_WITHDRAW_AUTO_PARTICIPATION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
181
+ }
182
+ export const PULSE_SET_AUTO_CONFIG_INPUT_TYPE = 13;
183
+ const PULSE_SET_AUTO_CONFIG_INPUT_FIELDS = [
184
+ {
185
+ name: 'desiredTickets',
186
+ type: 'sint16',
187
+ offset: 0,
188
+ byteLength: 2,
189
+ },
190
+ ];
191
+ export function buildPulseSetAutoConfigInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
192
+ return buildPayload(PULSE_SET_AUTO_CONFIG_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
193
+ }
194
+ const PULSE_SET_AUTO_CONFIG_OUTPUT_FIELDS = [
195
+ {
196
+ name: 'returnCode',
197
+ type: 'uint8',
198
+ offset: 0,
199
+ byteLength: 1,
200
+ },
201
+ ];
202
+ export function decodePulseSetAutoConfigOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
203
+ return decodePayload(data, PULSE_SET_AUTO_CONFIG_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
204
+ }
205
+ export const PULSE_SET_AUTO_LIMITS_INPUT_TYPE = 14;
206
+ const PULSE_SET_AUTO_LIMITS_INPUT_FIELDS = [
207
+ {
208
+ name: 'maxTicketsPerUser',
209
+ type: 'uint16',
210
+ offset: 0,
211
+ byteLength: 2,
212
+ },
213
+ ];
214
+ export function buildPulseSetAutoLimitsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
215
+ return buildPayload(PULSE_SET_AUTO_LIMITS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
216
+ }
217
+ const PULSE_SET_AUTO_LIMITS_OUTPUT_FIELDS = [
218
+ {
219
+ name: 'returnCode',
220
+ type: 'uint8',
221
+ offset: 0,
222
+ byteLength: 1,
223
+ },
224
+ ];
225
+ export function decodePulseSetAutoLimitsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
226
+ return decodePayload(data, PULSE_SET_AUTO_LIMITS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
227
+ }
228
+ export const PULSE_DEPOSIT_MANAGED_Q_HEART_INPUT_TYPE = 15;
229
+ const PULSE_DEPOSIT_MANAGED_Q_HEART_INPUT_FIELDS = [
230
+ {
231
+ name: 'amount',
232
+ type: 'sint64',
233
+ offset: 0,
234
+ byteLength: 8,
235
+ },
236
+ ];
237
+ export function buildPulseDepositManagedQHeartInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
238
+ return buildPayload(PULSE_DEPOSIT_MANAGED_Q_HEART_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
239
+ }
240
+ const PULSE_DEPOSIT_MANAGED_Q_HEART_OUTPUT_FIELDS = [
241
+ {
242
+ name: 'returnCode',
243
+ type: 'uint8',
244
+ offset: 0,
245
+ byteLength: 1,
246
+ },
247
+ ];
248
+ export function decodePulseDepositManagedQHeartOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
249
+ return decodePayload(data, PULSE_DEPOSIT_MANAGED_Q_HEART_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
250
+ }
251
+ export const PULSE_TRANSFER_TOKEN_TO_QX_INPUT_TYPE = 16;
252
+ const PULSE_TRANSFER_TOKEN_TO_QX_INPUT_FIELDS = [
253
+ {
254
+ name: 'numberOfShares',
255
+ type: 'sint64',
256
+ offset: 0,
257
+ byteLength: 8,
258
+ },
259
+ ];
260
+ export function buildPulseTransferTokenToQxInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
261
+ return buildPayload(PULSE_TRANSFER_TOKEN_TO_QX_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
262
+ }
263
+ const PULSE_TRANSFER_TOKEN_TO_QX_OUTPUT_FIELDS = [
264
+ {
265
+ name: 'returnCode',
266
+ type: 'uint8',
267
+ offset: 0,
268
+ byteLength: 1,
269
+ },
270
+ ];
271
+ export function decodePulseTransferTokenToQxOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
272
+ return decodePayload(data, PULSE_TRANSFER_TOKEN_TO_QX_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
273
+ }
274
+ export const PULSE_SET_PRICE_INPUT_TYPE = 29;
275
+ const PULSE_SET_PRICE_INPUT_FIELDS = [
276
+ {
277
+ name: 'newPrice',
278
+ type: 'uint64',
279
+ offset: 0,
280
+ byteLength: 8,
281
+ },
282
+ ];
283
+ export function buildPulseSetPriceInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
284
+ return buildPayload(PULSE_SET_PRICE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
285
+ }
286
+ const PULSE_SET_PRICE_OUTPUT_FIELDS = [
287
+ {
288
+ name: 'returnCode',
289
+ type: 'uint8',
290
+ offset: 0,
291
+ byteLength: 1,
292
+ },
293
+ ];
294
+ export function decodePulseSetPriceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
295
+ return decodePayload(data, PULSE_SET_PRICE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
296
+ }
297
+ export const PULSE_SET_SCHEDULE_INPUT_TYPE = 30;
298
+ const PULSE_SET_SCHEDULE_INPUT_FIELDS = [
299
+ {
300
+ name: 'newSchedule',
301
+ type: 'uint8',
302
+ offset: 0,
303
+ byteLength: 1,
304
+ },
305
+ ];
306
+ export function buildPulseSetScheduleInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
307
+ return buildPayload(PULSE_SET_SCHEDULE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
308
+ }
309
+ const PULSE_SET_SCHEDULE_OUTPUT_FIELDS = [
310
+ {
311
+ name: 'returnCode',
312
+ type: 'uint8',
313
+ offset: 0,
314
+ byteLength: 1,
315
+ },
316
+ ];
317
+ export function decodePulseSetScheduleOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
318
+ return decodePayload(data, PULSE_SET_SCHEDULE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
319
+ }
320
+ export const PULSE_SET_DRAW_HOUR_INPUT_TYPE = 31;
321
+ const PULSE_SET_DRAW_HOUR_INPUT_FIELDS = [
322
+ {
323
+ name: 'newDrawHour',
324
+ type: 'uint8',
325
+ offset: 0,
326
+ byteLength: 1,
327
+ },
328
+ ];
329
+ export function buildPulseSetDrawHourInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
330
+ return buildPayload(PULSE_SET_DRAW_HOUR_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
331
+ }
332
+ const PULSE_SET_DRAW_HOUR_OUTPUT_FIELDS = [
333
+ {
334
+ name: 'returnCode',
335
+ type: 'uint8',
336
+ offset: 0,
337
+ byteLength: 1,
338
+ },
339
+ ];
340
+ export function decodePulseSetDrawHourOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
341
+ return decodePayload(data, PULSE_SET_DRAW_HOUR_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
342
+ }
343
+ export const PULSE_SET_FEES_INPUT_TYPE = 32;
344
+ const PULSE_SET_FEES_INPUT_FIELDS = [
345
+ {
346
+ name: 'devPercent',
347
+ type: 'uint8',
348
+ offset: 0,
349
+ byteLength: 1,
350
+ },
351
+ {
352
+ name: 'burnPercent',
353
+ type: 'uint8',
354
+ offset: 1,
355
+ byteLength: 1,
356
+ },
357
+ {
358
+ name: 'shareholdersPercent',
359
+ type: 'uint8',
360
+ offset: 2,
361
+ byteLength: 1,
362
+ },
363
+ {
364
+ name: 'rlShareholdersPercent',
365
+ type: 'uint8',
366
+ offset: 3,
367
+ byteLength: 1,
368
+ },
369
+ ];
370
+ export function buildPulseSetFeesInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
371
+ return buildPayload(PULSE_SET_FEES_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
372
+ }
373
+ const PULSE_SET_FEES_OUTPUT_FIELDS = [
374
+ {
375
+ name: 'returnCode',
376
+ type: 'uint8',
377
+ offset: 0,
378
+ byteLength: 1,
379
+ },
380
+ ];
381
+ export function decodePulseSetFeesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
382
+ return decodePayload(data, PULSE_SET_FEES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
383
+ }
384
+ export const PULSE_SET_Q_HEART_HOLD_LIMIT_INPUT_TYPE = 33;
385
+ const PULSE_SET_Q_HEART_HOLD_LIMIT_INPUT_FIELDS = [
386
+ {
387
+ name: 'newQHeartHoldLimit',
388
+ type: 'uint64',
389
+ offset: 0,
390
+ byteLength: 8,
391
+ },
392
+ ];
393
+ export function buildPulseSetQHeartHoldLimitInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
394
+ return buildPayload(PULSE_SET_Q_HEART_HOLD_LIMIT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
395
+ }
396
+ const PULSE_SET_Q_HEART_HOLD_LIMIT_OUTPUT_FIELDS = [
397
+ {
398
+ name: 'returnCode',
399
+ type: 'uint8',
400
+ offset: 0,
401
+ byteLength: 1,
402
+ },
403
+ ];
404
+ export function decodePulseSetQHeartHoldLimitOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
405
+ return decodePayload(data, PULSE_SET_Q_HEART_HOLD_LIMIT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
406
+ }
407
+ export const PULSE_VALIDATE_DIGITS_INPUT_TYPE = 1;
408
+ export const PULSE_VALIDATE_DIGITS_INPUT_SIZE = 0;
409
+ const PULSE_VALIDATE_DIGITS_INPUT_FIELDS = [
410
+ {
411
+ name: 'digits',
412
+ type: 'array',
413
+ offset: 0,
414
+ byteLength: 0,
415
+ arrayLength: 0,
416
+ arrayItemType: 'uint8',
417
+ arrayItemByteLength: 1,
418
+ },
419
+ ];
420
+ export function buildPulseValidateDigitsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
421
+ return buildPayload(PULSE_VALIDATE_DIGITS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
422
+ }
423
+ const PULSE_VALIDATE_DIGITS_OUTPUT_FIELDS = [
424
+ {
425
+ name: 'isValid',
426
+ type: 'uint8',
427
+ offset: 0,
428
+ byteLength: 1,
429
+ },
430
+ ];
431
+ export function decodePulseValidateDigitsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
432
+ return decodePayload(data, PULSE_VALIDATE_DIGITS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
433
+ }
434
+ export async function pulseValidateDigits(live, input, options) {
435
+ return callContractFunction({
436
+ live,
437
+ contractIndex: PULSE_CONTRACT_INDEX,
438
+ inputType: PULSE_VALIDATE_DIGITS_INPUT_TYPE,
439
+ inputSize: PULSE_VALIDATE_DIGITS_INPUT_SIZE,
440
+ inputFields: PULSE_VALIDATE_DIGITS_INPUT_FIELDS,
441
+ outputFields: PULSE_VALIDATE_DIGITS_OUTPUT_FIELDS,
442
+ structs: STRUCTS,
443
+ input: input,
444
+ ...options,
445
+ });
446
+ }
447
+ export const PULSE_GET_AUTO_PARTICIPATION_INPUT_TYPE = 9;
448
+ export const PULSE_GET_AUTO_PARTICIPATION_INPUT_SIZE = 32;
449
+ const PULSE_GET_AUTO_PARTICIPATION_INPUT_FIELDS = [
450
+ {
451
+ name: 'player',
452
+ type: 'id',
453
+ offset: 0,
454
+ byteLength: 32,
455
+ },
456
+ ];
457
+ export function buildPulseGetAutoParticipationInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
458
+ return buildPayload(PULSE_GET_AUTO_PARTICIPATION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
459
+ }
460
+ const PULSE_GET_AUTO_PARTICIPATION_OUTPUT_FIELDS = [
461
+ {
462
+ name: 'deposit',
463
+ type: 'uint64',
464
+ offset: 0,
465
+ byteLength: 8,
466
+ },
467
+ {
468
+ name: 'desiredTickets',
469
+ type: 'uint16',
470
+ offset: 8,
471
+ byteLength: 2,
472
+ },
473
+ {
474
+ name: 'returnCode',
475
+ type: 'uint8',
476
+ offset: 10,
477
+ byteLength: 1,
478
+ },
479
+ ];
480
+ export function decodePulseGetAutoParticipationOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
481
+ return decodePayload(data, PULSE_GET_AUTO_PARTICIPATION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
482
+ }
483
+ export async function pulseGetAutoParticipation(live, input, options) {
484
+ return callContractFunction({
485
+ live,
486
+ contractIndex: PULSE_CONTRACT_INDEX,
487
+ inputType: PULSE_GET_AUTO_PARTICIPATION_INPUT_TYPE,
488
+ inputSize: PULSE_GET_AUTO_PARTICIPATION_INPUT_SIZE,
489
+ inputFields: PULSE_GET_AUTO_PARTICIPATION_INPUT_FIELDS,
490
+ outputFields: PULSE_GET_AUTO_PARTICIPATION_OUTPUT_FIELDS,
491
+ structs: STRUCTS,
492
+ input: input,
493
+ ...options,
494
+ });
495
+ }
496
+ export const PULSE_GET_AUTO_STATS_INPUT_TYPE = 10;
497
+ export const PULSE_GET_AUTO_STATS_INPUT_SIZE = 0;
498
+ const PULSE_GET_AUTO_STATS_OUTPUT_FIELDS = [
499
+ {
500
+ name: 'participants',
501
+ type: 'array',
502
+ offset: 0,
503
+ byteLength: 0,
504
+ arrayLength: 0,
505
+ arrayItemByteLength: 42,
506
+ arrayItemStructRef: 'AutoParticipant',
507
+ },
508
+ {
509
+ name: 'maxAutoParticipants',
510
+ type: 'uint16',
511
+ offset: 0,
512
+ byteLength: 2,
513
+ },
514
+ {
515
+ name: 'maxAutoTicketsPerUser',
516
+ type: 'uint16',
517
+ offset: 2,
518
+ byteLength: 2,
519
+ },
520
+ {
521
+ name: 'roundSlotsLeft',
522
+ type: 'uint16',
523
+ offset: 4,
524
+ byteLength: 2,
525
+ },
526
+ {
527
+ name: 'returnCode',
528
+ type: 'uint8',
529
+ offset: 6,
530
+ byteLength: 1,
531
+ },
532
+ ];
533
+ export function decodePulseGetAutoStatsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
534
+ return decodePayload(data, PULSE_GET_AUTO_STATS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
535
+ }
536
+ export async function pulseGetAutoStats(live, options) {
537
+ return callContractFunction({
538
+ live,
539
+ contractIndex: PULSE_CONTRACT_INDEX,
540
+ inputType: PULSE_GET_AUTO_STATS_INPUT_TYPE,
541
+ inputSize: PULSE_GET_AUTO_STATS_INPUT_SIZE,
542
+ inputFields: [],
543
+ outputFields: PULSE_GET_AUTO_STATS_OUTPUT_FIELDS,
544
+ structs: STRUCTS,
545
+ input: {},
546
+ ...options,
547
+ });
548
+ }
549
+ export const PULSE_GET_TICKET_PRICE_INPUT_TYPE = 17;
550
+ export const PULSE_GET_TICKET_PRICE_INPUT_SIZE = 0;
551
+ const PULSE_GET_TICKET_PRICE_OUTPUT_FIELDS = [
552
+ {
553
+ name: 'ticketPrice',
554
+ type: 'uint64',
555
+ offset: 0,
556
+ byteLength: 8,
557
+ },
558
+ ];
559
+ export function decodePulseGetTicketPriceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
560
+ return decodePayload(data, PULSE_GET_TICKET_PRICE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
561
+ }
562
+ export async function pulseGetTicketPrice(live, options) {
563
+ return callContractFunction({
564
+ live,
565
+ contractIndex: PULSE_CONTRACT_INDEX,
566
+ inputType: PULSE_GET_TICKET_PRICE_INPUT_TYPE,
567
+ inputSize: PULSE_GET_TICKET_PRICE_INPUT_SIZE,
568
+ inputFields: [],
569
+ outputFields: PULSE_GET_TICKET_PRICE_OUTPUT_FIELDS,
570
+ structs: STRUCTS,
571
+ input: {},
572
+ ...options,
573
+ });
574
+ }
575
+ export const PULSE_GET_PLAYER_BALANCE_INPUT_TYPE = 18;
576
+ export const PULSE_GET_PLAYER_BALANCE_INPUT_SIZE = 32;
577
+ const PULSE_GET_PLAYER_BALANCE_INPUT_FIELDS = [
578
+ {
579
+ name: 'player',
580
+ type: 'id',
581
+ offset: 0,
582
+ byteLength: 32,
583
+ },
584
+ ];
585
+ export function buildPulseGetPlayerBalanceInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
586
+ return buildPayload(PULSE_GET_PLAYER_BALANCE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
587
+ }
588
+ const PULSE_GET_PLAYER_BALANCE_OUTPUT_FIELDS = [
589
+ {
590
+ name: 'balance',
591
+ type: 'uint64',
592
+ offset: 0,
593
+ byteLength: 8,
594
+ },
595
+ {
596
+ name: 'returnCode',
597
+ type: 'uint8',
598
+ offset: 8,
599
+ byteLength: 1,
600
+ },
601
+ ];
602
+ export function decodePulseGetPlayerBalanceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
603
+ return decodePayload(data, PULSE_GET_PLAYER_BALANCE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
604
+ }
605
+ export async function pulseGetPlayerBalance(live, input, options) {
606
+ return callContractFunction({
607
+ live,
608
+ contractIndex: PULSE_CONTRACT_INDEX,
609
+ inputType: PULSE_GET_PLAYER_BALANCE_INPUT_TYPE,
610
+ inputSize: PULSE_GET_PLAYER_BALANCE_INPUT_SIZE,
611
+ inputFields: PULSE_GET_PLAYER_BALANCE_INPUT_FIELDS,
612
+ outputFields: PULSE_GET_PLAYER_BALANCE_OUTPUT_FIELDS,
613
+ structs: STRUCTS,
614
+ input: input,
615
+ ...options,
616
+ });
617
+ }
618
+ export const PULSE_GET_FEES_INPUT_TYPE = 19;
619
+ export const PULSE_GET_FEES_INPUT_SIZE = 0;
620
+ const PULSE_GET_FEES_OUTPUT_FIELDS = [
621
+ {
622
+ name: 'devPercent',
623
+ type: 'uint8',
624
+ offset: 0,
625
+ byteLength: 1,
626
+ },
627
+ {
628
+ name: 'burnPercent',
629
+ type: 'uint8',
630
+ offset: 1,
631
+ byteLength: 1,
632
+ },
633
+ {
634
+ name: 'shareholdersPercent',
635
+ type: 'uint8',
636
+ offset: 2,
637
+ byteLength: 1,
638
+ },
639
+ {
640
+ name: 'rlShareholdersPercent',
641
+ type: 'uint8',
642
+ offset: 3,
643
+ byteLength: 1,
644
+ },
645
+ {
646
+ name: 'returnCode',
647
+ type: 'uint8',
648
+ offset: 4,
649
+ byteLength: 1,
650
+ },
651
+ ];
652
+ export function decodePulseGetFeesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
653
+ return decodePayload(data, PULSE_GET_FEES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
654
+ }
655
+ export async function pulseGetFees(live, options) {
656
+ return callContractFunction({
657
+ live,
658
+ contractIndex: PULSE_CONTRACT_INDEX,
659
+ inputType: PULSE_GET_FEES_INPUT_TYPE,
660
+ inputSize: PULSE_GET_FEES_INPUT_SIZE,
661
+ inputFields: [],
662
+ outputFields: PULSE_GET_FEES_OUTPUT_FIELDS,
663
+ structs: STRUCTS,
664
+ input: {},
665
+ ...options,
666
+ });
667
+ }
668
+ export const PULSE_GET_Q_HEART_HOLD_LIMIT_INPUT_TYPE = 20;
669
+ export const PULSE_GET_Q_HEART_HOLD_LIMIT_INPUT_SIZE = 0;
670
+ const PULSE_GET_Q_HEART_HOLD_LIMIT_OUTPUT_FIELDS = [
671
+ {
672
+ name: 'qheartHoldLimit',
673
+ type: 'uint64',
674
+ offset: 0,
675
+ byteLength: 8,
676
+ },
677
+ ];
678
+ export function decodePulseGetQHeartHoldLimitOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
679
+ return decodePayload(data, PULSE_GET_Q_HEART_HOLD_LIMIT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
680
+ }
681
+ export async function pulseGetQHeartHoldLimit(live, options) {
682
+ return callContractFunction({
683
+ live,
684
+ contractIndex: PULSE_CONTRACT_INDEX,
685
+ inputType: PULSE_GET_Q_HEART_HOLD_LIMIT_INPUT_TYPE,
686
+ inputSize: PULSE_GET_Q_HEART_HOLD_LIMIT_INPUT_SIZE,
687
+ inputFields: [],
688
+ outputFields: PULSE_GET_Q_HEART_HOLD_LIMIT_OUTPUT_FIELDS,
689
+ structs: STRUCTS,
690
+ input: {},
691
+ ...options,
692
+ });
693
+ }
694
+ export const PULSE_GET_Q_HEART_WALLET_INPUT_TYPE = 21;
695
+ export const PULSE_GET_Q_HEART_WALLET_INPUT_SIZE = 0;
696
+ const PULSE_GET_Q_HEART_WALLET_OUTPUT_FIELDS = [
697
+ {
698
+ name: 'wallet',
699
+ type: 'id',
700
+ offset: 0,
701
+ byteLength: 32,
702
+ },
703
+ ];
704
+ export function decodePulseGetQHeartWalletOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
705
+ return decodePayload(data, PULSE_GET_Q_HEART_WALLET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
706
+ }
707
+ export async function pulseGetQHeartWallet(live, options) {
708
+ return callContractFunction({
709
+ live,
710
+ contractIndex: PULSE_CONTRACT_INDEX,
711
+ inputType: PULSE_GET_Q_HEART_WALLET_INPUT_TYPE,
712
+ inputSize: PULSE_GET_Q_HEART_WALLET_INPUT_SIZE,
713
+ inputFields: [],
714
+ outputFields: PULSE_GET_Q_HEART_WALLET_OUTPUT_FIELDS,
715
+ structs: STRUCTS,
716
+ input: {},
717
+ ...options,
718
+ });
719
+ }
720
+ export const PULSE_GET_WINNING_DIGITS_INPUT_TYPE = 22;
721
+ export const PULSE_GET_WINNING_DIGITS_INPUT_SIZE = 0;
722
+ const PULSE_GET_WINNING_DIGITS_OUTPUT_FIELDS = [
723
+ {
724
+ name: 'digits',
725
+ type: 'array',
726
+ offset: 0,
727
+ byteLength: 0,
728
+ arrayLength: 0,
729
+ arrayItemType: 'uint8',
730
+ arrayItemByteLength: 1,
731
+ },
732
+ ];
733
+ export function decodePulseGetWinningDigitsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
734
+ return decodePayload(data, PULSE_GET_WINNING_DIGITS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
735
+ }
736
+ export async function pulseGetWinningDigits(live, options) {
737
+ return callContractFunction({
738
+ live,
739
+ contractIndex: PULSE_CONTRACT_INDEX,
740
+ inputType: PULSE_GET_WINNING_DIGITS_INPUT_TYPE,
741
+ inputSize: PULSE_GET_WINNING_DIGITS_INPUT_SIZE,
742
+ inputFields: [],
743
+ outputFields: PULSE_GET_WINNING_DIGITS_OUTPUT_FIELDS,
744
+ structs: STRUCTS,
745
+ input: {},
746
+ ...options,
747
+ });
748
+ }
749
+ export const PULSE_GET_BALANCE_INPUT_TYPE = 23;
750
+ export const PULSE_GET_BALANCE_INPUT_SIZE = 0;
751
+ const PULSE_GET_BALANCE_OUTPUT_FIELDS = [
752
+ {
753
+ name: 'balance',
754
+ type: 'uint64',
755
+ offset: 0,
756
+ byteLength: 8,
757
+ },
758
+ ];
759
+ export function decodePulseGetBalanceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
760
+ return decodePayload(data, PULSE_GET_BALANCE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
761
+ }
762
+ export async function pulseGetBalance(live, options) {
763
+ return callContractFunction({
764
+ live,
765
+ contractIndex: PULSE_CONTRACT_INDEX,
766
+ inputType: PULSE_GET_BALANCE_INPUT_TYPE,
767
+ inputSize: PULSE_GET_BALANCE_INPUT_SIZE,
768
+ inputFields: [],
769
+ outputFields: PULSE_GET_BALANCE_OUTPUT_FIELDS,
770
+ structs: STRUCTS,
771
+ input: {},
772
+ ...options,
773
+ });
774
+ }
775
+ export const PULSE_GET_PLAYERS_INPUT_TYPE = 24;
776
+ export const PULSE_GET_PLAYERS_INPUT_SIZE = 0;
777
+ const PULSE_GET_PLAYERS_OUTPUT_FIELDS = [
778
+ {
779
+ name: 'players',
780
+ type: 'array',
781
+ offset: 0,
782
+ byteLength: 32768,
783
+ arrayLength: 1024,
784
+ arrayItemByteLength: 32,
785
+ arrayItemStructRef: 'Ticket',
786
+ },
787
+ {
788
+ name: 'returnCode',
789
+ type: 'uint8',
790
+ offset: 32768,
791
+ byteLength: 1,
792
+ },
793
+ ];
794
+ export function decodePulseGetPlayersOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
795
+ return decodePayload(data, PULSE_GET_PLAYERS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
796
+ }
797
+ export async function pulseGetPlayers(live, options) {
798
+ return callContractFunction({
799
+ live,
800
+ contractIndex: PULSE_CONTRACT_INDEX,
801
+ inputType: PULSE_GET_PLAYERS_INPUT_TYPE,
802
+ inputSize: PULSE_GET_PLAYERS_INPUT_SIZE,
803
+ inputFields: [],
804
+ outputFields: PULSE_GET_PLAYERS_OUTPUT_FIELDS,
805
+ structs: STRUCTS,
806
+ input: {},
807
+ ...options,
808
+ });
809
+ }
810
+ export const PULSE_GET_PRIZE_TABLE_INPUT_TYPE = 25;
811
+ export const PULSE_GET_PRIZE_TABLE_INPUT_SIZE = 0;
812
+ const PULSE_GET_PRIZE_TABLE_OUTPUT_FIELDS = [
813
+ {
814
+ name: 'leftAlignedRewards',
815
+ type: 'array',
816
+ offset: 0,
817
+ byteLength: 0,
818
+ arrayLength: 0,
819
+ arrayItemType: 'uint64',
820
+ arrayItemByteLength: 8,
821
+ },
822
+ {
823
+ name: 'anyPositionRewards',
824
+ type: 'array',
825
+ offset: 0,
826
+ byteLength: 0,
827
+ arrayLength: 0,
828
+ arrayItemType: 'uint64',
829
+ arrayItemByteLength: 8,
830
+ },
831
+ {
832
+ name: 'ticketPrice',
833
+ type: 'uint64',
834
+ offset: 0,
835
+ byteLength: 8,
836
+ },
837
+ {
838
+ name: 'returnCode',
839
+ type: 'uint8',
840
+ offset: 8,
841
+ byteLength: 1,
842
+ },
843
+ ];
844
+ export function decodePulseGetPrizeTableOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
845
+ return decodePayload(data, PULSE_GET_PRIZE_TABLE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
846
+ }
847
+ export async function pulseGetPrizeTable(live, options) {
848
+ return callContractFunction({
849
+ live,
850
+ contractIndex: PULSE_CONTRACT_INDEX,
851
+ inputType: PULSE_GET_PRIZE_TABLE_INPUT_TYPE,
852
+ inputSize: PULSE_GET_PRIZE_TABLE_INPUT_SIZE,
853
+ inputFields: [],
854
+ outputFields: PULSE_GET_PRIZE_TABLE_OUTPUT_FIELDS,
855
+ structs: STRUCTS,
856
+ input: {},
857
+ ...options,
858
+ });
859
+ }
860
+ export const PULSE_GET_ROUND_STATE_INPUT_TYPE = 26;
861
+ export const PULSE_GET_ROUND_STATE_INPUT_SIZE = 0;
862
+ const PULSE_GET_ROUND_STATE_OUTPUT_FIELDS = [
863
+ {
864
+ name: 'epoch',
865
+ type: 'uint32',
866
+ offset: 0,
867
+ byteLength: 4,
868
+ },
869
+ {
870
+ name: 'lastDrawDateStamp',
871
+ type: 'uint32',
872
+ offset: 4,
873
+ byteLength: 4,
874
+ },
875
+ {
876
+ name: 'ticketCounter',
877
+ type: 'uint16',
878
+ offset: 8,
879
+ byteLength: 2,
880
+ },
881
+ {
882
+ name: 'maxPlayers',
883
+ type: 'uint16',
884
+ offset: 10,
885
+ byteLength: 2,
886
+ },
887
+ {
888
+ name: 'slotsLeft',
889
+ type: 'uint16',
890
+ offset: 12,
891
+ byteLength: 2,
892
+ },
893
+ {
894
+ name: 'currentState',
895
+ type: 'uint8',
896
+ offset: 14,
897
+ byteLength: 1,
898
+ },
899
+ {
900
+ name: 'drawHour',
901
+ type: 'uint8',
902
+ offset: 15,
903
+ byteLength: 1,
904
+ },
905
+ {
906
+ name: 'schedule',
907
+ type: 'uint8',
908
+ offset: 16,
909
+ byteLength: 1,
910
+ },
911
+ {
912
+ name: 'sellingOpen',
913
+ type: 'uint8',
914
+ offset: 17,
915
+ byteLength: 1,
916
+ },
917
+ {
918
+ name: 'returnCode',
919
+ type: 'uint8',
920
+ offset: 18,
921
+ byteLength: 1,
922
+ },
923
+ ];
924
+ export function decodePulseGetRoundStateOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
925
+ return decodePayload(data, PULSE_GET_ROUND_STATE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
926
+ }
927
+ export async function pulseGetRoundState(live, options) {
928
+ return callContractFunction({
929
+ live,
930
+ contractIndex: PULSE_CONTRACT_INDEX,
931
+ inputType: PULSE_GET_ROUND_STATE_INPUT_TYPE,
932
+ inputSize: PULSE_GET_ROUND_STATE_INPUT_SIZE,
933
+ inputFields: [],
934
+ outputFields: PULSE_GET_ROUND_STATE_OUTPUT_FIELDS,
935
+ structs: STRUCTS,
936
+ input: {},
937
+ ...options,
938
+ });
939
+ }
940
+ export const PULSE_GET_WINNERS_INPUT_TYPE = 28;
941
+ export const PULSE_GET_WINNERS_INPUT_SIZE = 0;
942
+ const PULSE_GET_WINNERS_OUTPUT_FIELDS = [
943
+ {
944
+ name: 'winners',
945
+ type: 'array',
946
+ offset: 0,
947
+ byteLength: 43008,
948
+ arrayLength: 1024,
949
+ arrayItemByteLength: 42,
950
+ arrayItemStructRef: 'WinnerInfo',
951
+ },
952
+ {
953
+ name: 'winnersCounter',
954
+ type: 'uint64',
955
+ offset: 43008,
956
+ byteLength: 8,
957
+ },
958
+ {
959
+ name: 'returnCode',
960
+ type: 'uint8',
961
+ offset: 43016,
962
+ byteLength: 1,
963
+ },
964
+ ];
965
+ export function decodePulseGetWinnersOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
966
+ return decodePayload(data, PULSE_GET_WINNERS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
967
+ }
968
+ export async function pulseGetWinners(live, options) {
969
+ return callContractFunction({
970
+ live,
971
+ contractIndex: PULSE_CONTRACT_INDEX,
972
+ inputType: PULSE_GET_WINNERS_INPUT_TYPE,
973
+ inputSize: PULSE_GET_WINNERS_INPUT_SIZE,
974
+ inputFields: [],
975
+ outputFields: PULSE_GET_WINNERS_OUTPUT_FIELDS,
976
+ structs: STRUCTS,
977
+ input: {},
978
+ ...options,
979
+ });
980
+ }
981
+ export const pulse = {
982
+ contractIndex: PULSE_CONTRACT_INDEX,
983
+ ValidateDigits: pulseValidateDigits,
984
+ GetAutoParticipation: pulseGetAutoParticipation,
985
+ GetAutoStats: pulseGetAutoStats,
986
+ GetTicketPrice: pulseGetTicketPrice,
987
+ GetPlayerBalance: pulseGetPlayerBalance,
988
+ GetFees: pulseGetFees,
989
+ GetQHeartHoldLimit: pulseGetQHeartHoldLimit,
990
+ GetQHeartWallet: pulseGetQHeartWallet,
991
+ GetWinningDigits: pulseGetWinningDigits,
992
+ GetBalance: pulseGetBalance,
993
+ GetPlayers: pulseGetPlayers,
994
+ GetPrizeTable: pulseGetPrizeTable,
995
+ GetRoundState: pulseGetRoundState,
996
+ GetWinners: pulseGetWinners,
997
+ buildBuyTicketInput: buildPulseBuyTicketInput,
998
+ decodeBuyTicketOutput: decodePulseBuyTicketOutput,
999
+ buildBuyRandomTicketsInput: buildPulseBuyRandomTicketsInput,
1000
+ decodeBuyRandomTicketsOutput: decodePulseBuyRandomTicketsOutput,
1001
+ buildDepositAutoParticipationInput: buildPulseDepositAutoParticipationInput,
1002
+ decodeDepositAutoParticipationOutput: decodePulseDepositAutoParticipationOutput,
1003
+ buildWithdrawAutoParticipationInput: buildPulseWithdrawAutoParticipationInput,
1004
+ decodeWithdrawAutoParticipationOutput: decodePulseWithdrawAutoParticipationOutput,
1005
+ buildSetAutoConfigInput: buildPulseSetAutoConfigInput,
1006
+ decodeSetAutoConfigOutput: decodePulseSetAutoConfigOutput,
1007
+ buildSetAutoLimitsInput: buildPulseSetAutoLimitsInput,
1008
+ decodeSetAutoLimitsOutput: decodePulseSetAutoLimitsOutput,
1009
+ buildDepositManagedQHeartInput: buildPulseDepositManagedQHeartInput,
1010
+ decodeDepositManagedQHeartOutput: decodePulseDepositManagedQHeartOutput,
1011
+ buildTransferTokenToQxInput: buildPulseTransferTokenToQxInput,
1012
+ decodeTransferTokenToQxOutput: decodePulseTransferTokenToQxOutput,
1013
+ buildSetPriceInput: buildPulseSetPriceInput,
1014
+ decodeSetPriceOutput: decodePulseSetPriceOutput,
1015
+ buildSetScheduleInput: buildPulseSetScheduleInput,
1016
+ decodeSetScheduleOutput: decodePulseSetScheduleOutput,
1017
+ buildSetDrawHourInput: buildPulseSetDrawHourInput,
1018
+ decodeSetDrawHourOutput: decodePulseSetDrawHourOutput,
1019
+ buildSetFeesInput: buildPulseSetFeesInput,
1020
+ decodeSetFeesOutput: decodePulseSetFeesOutput,
1021
+ buildSetQHeartHoldLimitInput: buildPulseSetQHeartHoldLimitInput,
1022
+ decodeSetQHeartHoldLimitOutput: decodePulseSetQHeartHoldLimitOutput,
1023
+ };
1024
+ //# sourceMappingURL=pulse.js.map