@mysten/kiosk 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/contracts/0x2/bag.mjs.map +1 -1
  3. package/dist/contracts/0x2/balance.mjs +1 -5
  4. package/dist/contracts/0x2/balance.mjs.map +1 -1
  5. package/dist/contracts/0x2/kiosk.mjs +4 -4
  6. package/dist/contracts/0x2/kiosk.mjs.map +1 -1
  7. package/dist/contracts/0x2/kiosk_extension.mjs +1 -1
  8. package/dist/contracts/0x2/kiosk_extension.mjs.map +1 -1
  9. package/dist/contracts/0x2/transfer_policy.mjs +6 -6
  10. package/dist/contracts/0x2/transfer_policy.mjs.map +1 -1
  11. package/dist/contracts/0x2/vec_set.mjs.map +1 -1
  12. package/package.json +8 -7
  13. package/src/contracts/0x2/bag.ts +2 -181
  14. package/src/contracts/0x2/balance.ts +3 -260
  15. package/src/contracts/0x2/kiosk.ts +4 -4
  16. package/src/contracts/0x2/kiosk_extension.ts +1 -1
  17. package/src/contracts/0x2/transfer_policy.ts +6 -6
  18. package/src/contracts/0x2/vec_set.ts +1 -198
  19. package/src/contracts/kiosk/witness_rule.ts +1 -1
  20. package/src/contracts/0x2/accumulator.ts +0 -24
  21. package/src/contracts/0x2/accumulator_metadata.ts +0 -38
  22. package/src/contracts/0x2/accumulator_settlement.ts +0 -14
  23. package/src/contracts/0x2/address.ts +0 -145
  24. package/src/contracts/0x2/address_alias.ts +0 -92
  25. package/src/contracts/0x2/authenticator_state.ts +0 -44
  26. package/src/contracts/0x2/bcs.ts +0 -495
  27. package/src/contracts/0x2/bls12381.ts +0 -717
  28. package/src/contracts/0x2/borrow.ts +0 -99
  29. package/src/contracts/0x2/clock.ts +0 -30
  30. package/src/contracts/0x2/coin.ts +0 -977
  31. package/src/contracts/0x2/coin_registry.ts +0 -874
  32. package/src/contracts/0x2/config.ts +0 -30
  33. package/src/contracts/0x2/deny_list.ts +0 -55
  34. package/src/contracts/0x2/derived_object.ts +0 -95
  35. package/src/contracts/0x2/display.ts +0 -258
  36. package/src/contracts/0x2/dynamic_field.ts +0 -171
  37. package/src/contracts/0x2/dynamic_object_field.ts +0 -167
  38. package/src/contracts/0x2/ecdsa_k1.ts +0 -65
  39. package/src/contracts/0x2/ecdsa_r1.ts +0 -49
  40. package/src/contracts/0x2/ecvrf.ts +0 -29
  41. package/src/contracts/0x2/ed25519.ts +0 -25
  42. package/src/contracts/0x2/event.ts +0 -42
  43. package/src/contracts/0x2/funds_accumulator.ts +0 -86
  44. package/src/contracts/0x2/groth16.ts +0 -171
  45. package/src/contracts/0x2/group_ops.ts +0 -49
  46. package/src/contracts/0x2/hash.ts +0 -37
  47. package/src/contracts/0x2/hex.ts +0 -37
  48. package/src/contracts/0x2/hmac.ts +0 -21
  49. package/src/contracts/0x2/linked_table.ts +0 -354
  50. package/src/contracts/0x2/math.ts +0 -117
  51. package/src/contracts/0x2/nitro_attestation.ts +0 -186
  52. package/src/contracts/0x2/object.ts +0 -249
  53. package/src/contracts/0x2/object_bag.ts +0 -210
  54. package/src/contracts/0x2/object_table.ts +0 -200
  55. package/src/contracts/0x2/package.ts +0 -414
  56. package/src/contracts/0x2/party.ts +0 -37
  57. package/src/contracts/0x2/pay.ts +0 -153
  58. package/src/contracts/0x2/poseidon.ts +0 -21
  59. package/src/contracts/0x2/priority_queue.ts +0 -139
  60. package/src/contracts/0x2/random.ts +0 -294
  61. package/src/contracts/0x2/sui.ts +0 -29
  62. package/src/contracts/0x2/table.ts +0 -200
  63. package/src/contracts/0x2/table_vec.ts +0 -232
  64. package/src/contracts/0x2/token.ts +0 -873
  65. package/src/contracts/0x2/transfer.ts +0 -216
  66. package/src/contracts/0x2/tx_context.ts +0 -129
  67. package/src/contracts/0x2/types.ts +0 -24
  68. package/src/contracts/0x2/url.ts +0 -77
  69. package/src/contracts/0x2/vdf.ts +0 -45
  70. package/src/contracts/0x2/vec_map.ts +0 -401
  71. package/src/contracts/0x2/versioned.ts +0 -153
  72. package/src/contracts/0x2/zklogin_verified_id.ts +0 -172
  73. package/src/contracts/0x2/zklogin_verified_issuer.ts +0 -99
  74. package/src/contracts/kiosk/deps/sui/object.ts +0 -15
@@ -1,717 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- import { type Transaction } from '@mysten/sui/transactions';
7
- const $moduleName = '0x2::bls12381';
8
- export const Scalar = new MoveStruct({
9
- name: `${$moduleName}::Scalar`,
10
- fields: {
11
- dummy_field: bcs.bool(),
12
- },
13
- });
14
- export const G1 = new MoveStruct({
15
- name: `${$moduleName}::G1`,
16
- fields: {
17
- dummy_field: bcs.bool(),
18
- },
19
- });
20
- export const G2 = new MoveStruct({
21
- name: `${$moduleName}::G2`,
22
- fields: {
23
- dummy_field: bcs.bool(),
24
- },
25
- });
26
- export const GT = new MoveStruct({
27
- name: `${$moduleName}::GT`,
28
- fields: {
29
- dummy_field: bcs.bool(),
30
- },
31
- });
32
- export const UncompressedG1 = new MoveStruct({
33
- name: `${$moduleName}::UncompressedG1`,
34
- fields: {
35
- dummy_field: bcs.bool(),
36
- },
37
- });
38
- export interface Bls12381MinSigVerifyOptions {
39
- package?: string;
40
- arguments: [
41
- RawTransactionArgument<number[]>,
42
- RawTransactionArgument<number[]>,
43
- RawTransactionArgument<number[]>,
44
- ];
45
- }
46
- export function bls12381MinSigVerify(options: Bls12381MinSigVerifyOptions) {
47
- const packageAddress =
48
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
49
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>'] satisfies (string | null)[];
50
- return (tx: Transaction) =>
51
- tx.moveCall({
52
- package: packageAddress,
53
- module: 'bls12381',
54
- function: 'bls12381_min_sig_verify',
55
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
56
- });
57
- }
58
- export interface Bls12381MinPkVerifyOptions {
59
- package?: string;
60
- arguments: [
61
- RawTransactionArgument<number[]>,
62
- RawTransactionArgument<number[]>,
63
- RawTransactionArgument<number[]>,
64
- ];
65
- }
66
- export function bls12381MinPkVerify(options: Bls12381MinPkVerifyOptions) {
67
- const packageAddress =
68
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
69
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>'] satisfies (string | null)[];
70
- return (tx: Transaction) =>
71
- tx.moveCall({
72
- package: packageAddress,
73
- module: 'bls12381',
74
- function: 'bls12381_min_pk_verify',
75
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
76
- });
77
- }
78
- export interface ScalarFromBytesOptions {
79
- package?: string;
80
- arguments: [RawTransactionArgument<number[]>];
81
- }
82
- export function scalarFromBytes(options: ScalarFromBytesOptions) {
83
- const packageAddress =
84
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
85
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
86
- return (tx: Transaction) =>
87
- tx.moveCall({
88
- package: packageAddress,
89
- module: 'bls12381',
90
- function: 'scalar_from_bytes',
91
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
92
- });
93
- }
94
- export interface ScalarFromU64Options {
95
- package?: string;
96
- arguments: [RawTransactionArgument<number | bigint>];
97
- }
98
- export function scalarFromU64(options: ScalarFromU64Options) {
99
- const packageAddress =
100
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
101
- const argumentsTypes = ['u64'] satisfies (string | null)[];
102
- return (tx: Transaction) =>
103
- tx.moveCall({
104
- package: packageAddress,
105
- module: 'bls12381',
106
- function: 'scalar_from_u64',
107
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
108
- });
109
- }
110
- export interface ScalarZeroOptions {
111
- package?: string;
112
- arguments?: [];
113
- }
114
- export function scalarZero(options: ScalarZeroOptions = {}) {
115
- const packageAddress =
116
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
117
- return (tx: Transaction) =>
118
- tx.moveCall({
119
- package: packageAddress,
120
- module: 'bls12381',
121
- function: 'scalar_zero',
122
- });
123
- }
124
- export interface ScalarOneOptions {
125
- package?: string;
126
- arguments?: [];
127
- }
128
- export function scalarOne(options: ScalarOneOptions = {}) {
129
- const packageAddress =
130
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
131
- return (tx: Transaction) =>
132
- tx.moveCall({
133
- package: packageAddress,
134
- module: 'bls12381',
135
- function: 'scalar_one',
136
- });
137
- }
138
- export interface ScalarAddOptions {
139
- package?: string;
140
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
141
- }
142
- export function scalarAdd(options: ScalarAddOptions) {
143
- const packageAddress =
144
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
145
- const argumentsTypes = [null, null] satisfies (string | null)[];
146
- return (tx: Transaction) =>
147
- tx.moveCall({
148
- package: packageAddress,
149
- module: 'bls12381',
150
- function: 'scalar_add',
151
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
152
- });
153
- }
154
- export interface ScalarSubOptions {
155
- package?: string;
156
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
157
- }
158
- export function scalarSub(options: ScalarSubOptions) {
159
- const packageAddress =
160
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
161
- const argumentsTypes = [null, null] satisfies (string | null)[];
162
- return (tx: Transaction) =>
163
- tx.moveCall({
164
- package: packageAddress,
165
- module: 'bls12381',
166
- function: 'scalar_sub',
167
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
168
- });
169
- }
170
- export interface ScalarMulOptions {
171
- package?: string;
172
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
173
- }
174
- export function scalarMul(options: ScalarMulOptions) {
175
- const packageAddress =
176
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
177
- const argumentsTypes = [null, null] satisfies (string | null)[];
178
- return (tx: Transaction) =>
179
- tx.moveCall({
180
- package: packageAddress,
181
- module: 'bls12381',
182
- function: 'scalar_mul',
183
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
184
- });
185
- }
186
- export interface ScalarDivOptions {
187
- package?: string;
188
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
189
- }
190
- export function scalarDiv(options: ScalarDivOptions) {
191
- const packageAddress =
192
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
193
- const argumentsTypes = [null, null] satisfies (string | null)[];
194
- return (tx: Transaction) =>
195
- tx.moveCall({
196
- package: packageAddress,
197
- module: 'bls12381',
198
- function: 'scalar_div',
199
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
200
- });
201
- }
202
- export interface ScalarNegOptions {
203
- package?: string;
204
- arguments: [RawTransactionArgument<string>];
205
- }
206
- export function scalarNeg(options: ScalarNegOptions) {
207
- const packageAddress =
208
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
209
- const argumentsTypes = [null] satisfies (string | null)[];
210
- return (tx: Transaction) =>
211
- tx.moveCall({
212
- package: packageAddress,
213
- module: 'bls12381',
214
- function: 'scalar_neg',
215
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
216
- });
217
- }
218
- export interface ScalarInvOptions {
219
- package?: string;
220
- arguments: [RawTransactionArgument<string>];
221
- }
222
- export function scalarInv(options: ScalarInvOptions) {
223
- const packageAddress =
224
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
225
- const argumentsTypes = [null] satisfies (string | null)[];
226
- return (tx: Transaction) =>
227
- tx.moveCall({
228
- package: packageAddress,
229
- module: 'bls12381',
230
- function: 'scalar_inv',
231
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
232
- });
233
- }
234
- export interface G1FromBytesOptions {
235
- package?: string;
236
- arguments: [RawTransactionArgument<number[]>];
237
- }
238
- export function g1FromBytes(options: G1FromBytesOptions) {
239
- const packageAddress =
240
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
241
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
242
- return (tx: Transaction) =>
243
- tx.moveCall({
244
- package: packageAddress,
245
- module: 'bls12381',
246
- function: 'g1_from_bytes',
247
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
248
- });
249
- }
250
- export interface G1IdentityOptions {
251
- package?: string;
252
- arguments?: [];
253
- }
254
- export function g1Identity(options: G1IdentityOptions = {}) {
255
- const packageAddress =
256
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
257
- return (tx: Transaction) =>
258
- tx.moveCall({
259
- package: packageAddress,
260
- module: 'bls12381',
261
- function: 'g1_identity',
262
- });
263
- }
264
- export interface G1GeneratorOptions {
265
- package?: string;
266
- arguments?: [];
267
- }
268
- export function g1Generator(options: G1GeneratorOptions = {}) {
269
- const packageAddress =
270
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
271
- return (tx: Transaction) =>
272
- tx.moveCall({
273
- package: packageAddress,
274
- module: 'bls12381',
275
- function: 'g1_generator',
276
- });
277
- }
278
- export interface G1AddOptions {
279
- package?: string;
280
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
281
- }
282
- export function g1Add(options: G1AddOptions) {
283
- const packageAddress =
284
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
285
- const argumentsTypes = [null, null] satisfies (string | null)[];
286
- return (tx: Transaction) =>
287
- tx.moveCall({
288
- package: packageAddress,
289
- module: 'bls12381',
290
- function: 'g1_add',
291
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
292
- });
293
- }
294
- export interface G1SubOptions {
295
- package?: string;
296
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
297
- }
298
- export function g1Sub(options: G1SubOptions) {
299
- const packageAddress =
300
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
301
- const argumentsTypes = [null, null] satisfies (string | null)[];
302
- return (tx: Transaction) =>
303
- tx.moveCall({
304
- package: packageAddress,
305
- module: 'bls12381',
306
- function: 'g1_sub',
307
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
308
- });
309
- }
310
- export interface G1MulOptions {
311
- package?: string;
312
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
313
- }
314
- export function g1Mul(options: G1MulOptions) {
315
- const packageAddress =
316
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
317
- const argumentsTypes = [null, null] satisfies (string | null)[];
318
- return (tx: Transaction) =>
319
- tx.moveCall({
320
- package: packageAddress,
321
- module: 'bls12381',
322
- function: 'g1_mul',
323
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
324
- });
325
- }
326
- export interface G1DivOptions {
327
- package?: string;
328
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
329
- }
330
- export function g1Div(options: G1DivOptions) {
331
- const packageAddress =
332
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
333
- const argumentsTypes = [null, null] satisfies (string | null)[];
334
- return (tx: Transaction) =>
335
- tx.moveCall({
336
- package: packageAddress,
337
- module: 'bls12381',
338
- function: 'g1_div',
339
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
340
- });
341
- }
342
- export interface G1NegOptions {
343
- package?: string;
344
- arguments: [RawTransactionArgument<string>];
345
- }
346
- export function g1Neg(options: G1NegOptions) {
347
- const packageAddress =
348
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
349
- const argumentsTypes = [null] satisfies (string | null)[];
350
- return (tx: Transaction) =>
351
- tx.moveCall({
352
- package: packageAddress,
353
- module: 'bls12381',
354
- function: 'g1_neg',
355
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
356
- });
357
- }
358
- export interface HashToG1Options {
359
- package?: string;
360
- arguments: [RawTransactionArgument<number[]>];
361
- }
362
- export function hashToG1(options: HashToG1Options) {
363
- const packageAddress =
364
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
365
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
366
- return (tx: Transaction) =>
367
- tx.moveCall({
368
- package: packageAddress,
369
- module: 'bls12381',
370
- function: 'hash_to_g1',
371
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
372
- });
373
- }
374
- export interface G1MultiScalarMultiplicationOptions {
375
- package?: string;
376
- arguments: [RawTransactionArgument<string[]>, RawTransactionArgument<string[]>];
377
- }
378
- export function g1MultiScalarMultiplication(options: G1MultiScalarMultiplicationOptions) {
379
- const packageAddress =
380
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
381
- const argumentsTypes = ['vector<null>', 'vector<null>'] satisfies (string | null)[];
382
- return (tx: Transaction) =>
383
- tx.moveCall({
384
- package: packageAddress,
385
- module: 'bls12381',
386
- function: 'g1_multi_scalar_multiplication',
387
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
388
- });
389
- }
390
- export interface G1ToUncompressedG1Options {
391
- package?: string;
392
- arguments: [RawTransactionArgument<string>];
393
- }
394
- export function g1ToUncompressedG1(options: G1ToUncompressedG1Options) {
395
- const packageAddress =
396
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
397
- const argumentsTypes = [null] satisfies (string | null)[];
398
- return (tx: Transaction) =>
399
- tx.moveCall({
400
- package: packageAddress,
401
- module: 'bls12381',
402
- function: 'g1_to_uncompressed_g1',
403
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
404
- });
405
- }
406
- export interface G2FromBytesOptions {
407
- package?: string;
408
- arguments: [RawTransactionArgument<number[]>];
409
- }
410
- export function g2FromBytes(options: G2FromBytesOptions) {
411
- const packageAddress =
412
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
413
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
414
- return (tx: Transaction) =>
415
- tx.moveCall({
416
- package: packageAddress,
417
- module: 'bls12381',
418
- function: 'g2_from_bytes',
419
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
420
- });
421
- }
422
- export interface G2IdentityOptions {
423
- package?: string;
424
- arguments?: [];
425
- }
426
- export function g2Identity(options: G2IdentityOptions = {}) {
427
- const packageAddress =
428
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
429
- return (tx: Transaction) =>
430
- tx.moveCall({
431
- package: packageAddress,
432
- module: 'bls12381',
433
- function: 'g2_identity',
434
- });
435
- }
436
- export interface G2GeneratorOptions {
437
- package?: string;
438
- arguments?: [];
439
- }
440
- export function g2Generator(options: G2GeneratorOptions = {}) {
441
- const packageAddress =
442
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
443
- return (tx: Transaction) =>
444
- tx.moveCall({
445
- package: packageAddress,
446
- module: 'bls12381',
447
- function: 'g2_generator',
448
- });
449
- }
450
- export interface G2AddOptions {
451
- package?: string;
452
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
453
- }
454
- export function g2Add(options: G2AddOptions) {
455
- const packageAddress =
456
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
457
- const argumentsTypes = [null, null] satisfies (string | null)[];
458
- return (tx: Transaction) =>
459
- tx.moveCall({
460
- package: packageAddress,
461
- module: 'bls12381',
462
- function: 'g2_add',
463
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
464
- });
465
- }
466
- export interface G2SubOptions {
467
- package?: string;
468
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
469
- }
470
- export function g2Sub(options: G2SubOptions) {
471
- const packageAddress =
472
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
473
- const argumentsTypes = [null, null] satisfies (string | null)[];
474
- return (tx: Transaction) =>
475
- tx.moveCall({
476
- package: packageAddress,
477
- module: 'bls12381',
478
- function: 'g2_sub',
479
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
480
- });
481
- }
482
- export interface G2MulOptions {
483
- package?: string;
484
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
485
- }
486
- export function g2Mul(options: G2MulOptions) {
487
- const packageAddress =
488
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
489
- const argumentsTypes = [null, null] satisfies (string | null)[];
490
- return (tx: Transaction) =>
491
- tx.moveCall({
492
- package: packageAddress,
493
- module: 'bls12381',
494
- function: 'g2_mul',
495
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
496
- });
497
- }
498
- export interface G2DivOptions {
499
- package?: string;
500
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
501
- }
502
- export function g2Div(options: G2DivOptions) {
503
- const packageAddress =
504
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
505
- const argumentsTypes = [null, null] satisfies (string | null)[];
506
- return (tx: Transaction) =>
507
- tx.moveCall({
508
- package: packageAddress,
509
- module: 'bls12381',
510
- function: 'g2_div',
511
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
512
- });
513
- }
514
- export interface G2NegOptions {
515
- package?: string;
516
- arguments: [RawTransactionArgument<string>];
517
- }
518
- export function g2Neg(options: G2NegOptions) {
519
- const packageAddress =
520
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
521
- const argumentsTypes = [null] satisfies (string | null)[];
522
- return (tx: Transaction) =>
523
- tx.moveCall({
524
- package: packageAddress,
525
- module: 'bls12381',
526
- function: 'g2_neg',
527
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
528
- });
529
- }
530
- export interface HashToG2Options {
531
- package?: string;
532
- arguments: [RawTransactionArgument<number[]>];
533
- }
534
- export function hashToG2(options: HashToG2Options) {
535
- const packageAddress =
536
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
537
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
538
- return (tx: Transaction) =>
539
- tx.moveCall({
540
- package: packageAddress,
541
- module: 'bls12381',
542
- function: 'hash_to_g2',
543
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
544
- });
545
- }
546
- export interface G2MultiScalarMultiplicationOptions {
547
- package?: string;
548
- arguments: [RawTransactionArgument<string[]>, RawTransactionArgument<string[]>];
549
- }
550
- export function g2MultiScalarMultiplication(options: G2MultiScalarMultiplicationOptions) {
551
- const packageAddress =
552
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
553
- const argumentsTypes = ['vector<null>', 'vector<null>'] satisfies (string | null)[];
554
- return (tx: Transaction) =>
555
- tx.moveCall({
556
- package: packageAddress,
557
- module: 'bls12381',
558
- function: 'g2_multi_scalar_multiplication',
559
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
560
- });
561
- }
562
- export interface GtIdentityOptions {
563
- package?: string;
564
- arguments?: [];
565
- }
566
- export function gtIdentity(options: GtIdentityOptions = {}) {
567
- const packageAddress =
568
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
569
- return (tx: Transaction) =>
570
- tx.moveCall({
571
- package: packageAddress,
572
- module: 'bls12381',
573
- function: 'gt_identity',
574
- });
575
- }
576
- export interface GtGeneratorOptions {
577
- package?: string;
578
- arguments?: [];
579
- }
580
- export function gtGenerator(options: GtGeneratorOptions = {}) {
581
- const packageAddress =
582
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
583
- return (tx: Transaction) =>
584
- tx.moveCall({
585
- package: packageAddress,
586
- module: 'bls12381',
587
- function: 'gt_generator',
588
- });
589
- }
590
- export interface GtAddOptions {
591
- package?: string;
592
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
593
- }
594
- export function gtAdd(options: GtAddOptions) {
595
- const packageAddress =
596
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
597
- const argumentsTypes = [null, null] satisfies (string | null)[];
598
- return (tx: Transaction) =>
599
- tx.moveCall({
600
- package: packageAddress,
601
- module: 'bls12381',
602
- function: 'gt_add',
603
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
604
- });
605
- }
606
- export interface GtSubOptions {
607
- package?: string;
608
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
609
- }
610
- export function gtSub(options: GtSubOptions) {
611
- const packageAddress =
612
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
613
- const argumentsTypes = [null, null] satisfies (string | null)[];
614
- return (tx: Transaction) =>
615
- tx.moveCall({
616
- package: packageAddress,
617
- module: 'bls12381',
618
- function: 'gt_sub',
619
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
620
- });
621
- }
622
- export interface GtMulOptions {
623
- package?: string;
624
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
625
- }
626
- export function gtMul(options: GtMulOptions) {
627
- const packageAddress =
628
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
629
- const argumentsTypes = [null, null] satisfies (string | null)[];
630
- return (tx: Transaction) =>
631
- tx.moveCall({
632
- package: packageAddress,
633
- module: 'bls12381',
634
- function: 'gt_mul',
635
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
636
- });
637
- }
638
- export interface GtDivOptions {
639
- package?: string;
640
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
641
- }
642
- export function gtDiv(options: GtDivOptions) {
643
- const packageAddress =
644
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
645
- const argumentsTypes = [null, null] satisfies (string | null)[];
646
- return (tx: Transaction) =>
647
- tx.moveCall({
648
- package: packageAddress,
649
- module: 'bls12381',
650
- function: 'gt_div',
651
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
652
- });
653
- }
654
- export interface GtNegOptions {
655
- package?: string;
656
- arguments: [RawTransactionArgument<string>];
657
- }
658
- export function gtNeg(options: GtNegOptions) {
659
- const packageAddress =
660
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
661
- const argumentsTypes = [null] satisfies (string | null)[];
662
- return (tx: Transaction) =>
663
- tx.moveCall({
664
- package: packageAddress,
665
- module: 'bls12381',
666
- function: 'gt_neg',
667
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
668
- });
669
- }
670
- export interface PairingOptions {
671
- package?: string;
672
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
673
- }
674
- export function pairing(options: PairingOptions) {
675
- const packageAddress =
676
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
677
- const argumentsTypes = [null, null] satisfies (string | null)[];
678
- return (tx: Transaction) =>
679
- tx.moveCall({
680
- package: packageAddress,
681
- module: 'bls12381',
682
- function: 'pairing',
683
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
684
- });
685
- }
686
- export interface UncompressedG1ToG1Options {
687
- package?: string;
688
- arguments: [RawTransactionArgument<string>];
689
- }
690
- export function uncompressedG1ToG1(options: UncompressedG1ToG1Options) {
691
- const packageAddress =
692
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
693
- const argumentsTypes = [null] satisfies (string | null)[];
694
- return (tx: Transaction) =>
695
- tx.moveCall({
696
- package: packageAddress,
697
- module: 'bls12381',
698
- function: 'uncompressed_g1_to_g1',
699
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
700
- });
701
- }
702
- export interface UncompressedG1SumOptions {
703
- package?: string;
704
- arguments: [RawTransactionArgument<string[]>];
705
- }
706
- export function uncompressedG1Sum(options: UncompressedG1SumOptions) {
707
- const packageAddress =
708
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
709
- const argumentsTypes = ['vector<null>'] satisfies (string | null)[];
710
- return (tx: Transaction) =>
711
- tx.moveCall({
712
- package: packageAddress,
713
- module: 'bls12381',
714
- function: 'uncompressed_g1_sum',
715
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
716
- });
717
- }