@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,977 +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, type BcsType } from '@mysten/sui/bcs';
6
- import { type Transaction } from '@mysten/sui/transactions';
7
- import * as balance_1 from './balance.js';
8
- import * as url from './url.js';
9
- const $moduleName = '0x2::coin';
10
- export const Coin = new MoveStruct({
11
- name: `${$moduleName}::Coin`,
12
- fields: {
13
- id: bcs.Address,
14
- balance: balance_1.Balance,
15
- },
16
- });
17
- export const CoinMetadata = new MoveStruct({
18
- name: `${$moduleName}::CoinMetadata`,
19
- fields: {
20
- id: bcs.Address,
21
- decimals: bcs.u8(),
22
- name: bcs.string(),
23
- symbol: bcs.string(),
24
- description: bcs.string(),
25
- icon_url: bcs.option(url.Url),
26
- },
27
- });
28
- export const RegulatedCoinMetadata = new MoveStruct({
29
- name: `${$moduleName}::RegulatedCoinMetadata`,
30
- fields: {
31
- id: bcs.Address,
32
- coin_metadata_object: bcs.Address,
33
- deny_cap_object: bcs.Address,
34
- },
35
- });
36
- export const TreasuryCap = new MoveStruct({
37
- name: `${$moduleName}::TreasuryCap`,
38
- fields: {
39
- id: bcs.Address,
40
- total_supply: balance_1.Supply,
41
- },
42
- });
43
- export const DenyCapV2 = new MoveStruct({
44
- name: `${$moduleName}::DenyCapV2`,
45
- fields: {
46
- id: bcs.Address,
47
- allow_global_pause: bcs.bool(),
48
- },
49
- });
50
- export const CurrencyCreated = new MoveStruct({
51
- name: `${$moduleName}::CurrencyCreated`,
52
- fields: {
53
- decimals: bcs.u8(),
54
- },
55
- });
56
- export const DenyCap = new MoveStruct({
57
- name: `${$moduleName}::DenyCap`,
58
- fields: {
59
- id: bcs.Address,
60
- },
61
- });
62
- export interface TotalSupplyOptions {
63
- package?: string;
64
- arguments: [RawTransactionArgument<string>];
65
- typeArguments: [string];
66
- }
67
- export function totalSupply(options: TotalSupplyOptions) {
68
- const packageAddress =
69
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
70
- const argumentsTypes = [null] satisfies (string | null)[];
71
- return (tx: Transaction) =>
72
- tx.moveCall({
73
- package: packageAddress,
74
- module: 'coin',
75
- function: 'total_supply',
76
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
77
- typeArguments: options.typeArguments,
78
- });
79
- }
80
- export interface TreasuryIntoSupplyOptions {
81
- package?: string;
82
- arguments: [RawTransactionArgument<string>];
83
- typeArguments: [string];
84
- }
85
- export function treasuryIntoSupply(options: TreasuryIntoSupplyOptions) {
86
- const packageAddress =
87
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
88
- const argumentsTypes = [null] satisfies (string | null)[];
89
- return (tx: Transaction) =>
90
- tx.moveCall({
91
- package: packageAddress,
92
- module: 'coin',
93
- function: 'treasury_into_supply',
94
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
95
- typeArguments: options.typeArguments,
96
- });
97
- }
98
- export interface SupplyImmutOptions {
99
- package?: string;
100
- arguments: [RawTransactionArgument<string>];
101
- typeArguments: [string];
102
- }
103
- export function supplyImmut(options: SupplyImmutOptions) {
104
- const packageAddress =
105
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
106
- const argumentsTypes = [null] satisfies (string | null)[];
107
- return (tx: Transaction) =>
108
- tx.moveCall({
109
- package: packageAddress,
110
- module: 'coin',
111
- function: 'supply_immut',
112
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
113
- typeArguments: options.typeArguments,
114
- });
115
- }
116
- export interface SupplyMutOptions {
117
- package?: string;
118
- arguments: [RawTransactionArgument<string>];
119
- typeArguments: [string];
120
- }
121
- export function supplyMut(options: SupplyMutOptions) {
122
- const packageAddress =
123
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
124
- const argumentsTypes = [null] satisfies (string | null)[];
125
- return (tx: Transaction) =>
126
- tx.moveCall({
127
- package: packageAddress,
128
- module: 'coin',
129
- function: 'supply_mut',
130
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
131
- typeArguments: options.typeArguments,
132
- });
133
- }
134
- export interface ValueOptions {
135
- package?: string;
136
- arguments: [RawTransactionArgument<string>];
137
- typeArguments: [string];
138
- }
139
- export function value(options: ValueOptions) {
140
- const packageAddress =
141
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
142
- const argumentsTypes = [null] satisfies (string | null)[];
143
- return (tx: Transaction) =>
144
- tx.moveCall({
145
- package: packageAddress,
146
- module: 'coin',
147
- function: 'value',
148
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
149
- typeArguments: options.typeArguments,
150
- });
151
- }
152
- export interface BalanceOptions {
153
- package?: string;
154
- arguments: [RawTransactionArgument<string>];
155
- typeArguments: [string];
156
- }
157
- export function balance(options: BalanceOptions) {
158
- const packageAddress =
159
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
160
- const argumentsTypes = [null] satisfies (string | null)[];
161
- return (tx: Transaction) =>
162
- tx.moveCall({
163
- package: packageAddress,
164
- module: 'coin',
165
- function: 'balance',
166
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
167
- typeArguments: options.typeArguments,
168
- });
169
- }
170
- export interface BalanceMutOptions {
171
- package?: string;
172
- arguments: [RawTransactionArgument<string>];
173
- typeArguments: [string];
174
- }
175
- export function balanceMut(options: BalanceMutOptions) {
176
- const packageAddress =
177
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
178
- const argumentsTypes = [null] satisfies (string | null)[];
179
- return (tx: Transaction) =>
180
- tx.moveCall({
181
- package: packageAddress,
182
- module: 'coin',
183
- function: 'balance_mut',
184
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
185
- typeArguments: options.typeArguments,
186
- });
187
- }
188
- export interface FromBalanceOptions {
189
- package?: string;
190
- arguments: [RawTransactionArgument<string>];
191
- typeArguments: [string];
192
- }
193
- export function fromBalance(options: FromBalanceOptions) {
194
- const packageAddress =
195
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
196
- const argumentsTypes = [null] satisfies (string | null)[];
197
- return (tx: Transaction) =>
198
- tx.moveCall({
199
- package: packageAddress,
200
- module: 'coin',
201
- function: 'from_balance',
202
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
203
- typeArguments: options.typeArguments,
204
- });
205
- }
206
- export interface IntoBalanceOptions {
207
- package?: string;
208
- arguments: [RawTransactionArgument<string>];
209
- typeArguments: [string];
210
- }
211
- export function intoBalance(options: IntoBalanceOptions) {
212
- const packageAddress =
213
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
214
- const argumentsTypes = [null] satisfies (string | null)[];
215
- return (tx: Transaction) =>
216
- tx.moveCall({
217
- package: packageAddress,
218
- module: 'coin',
219
- function: 'into_balance',
220
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
221
- typeArguments: options.typeArguments,
222
- });
223
- }
224
- export interface TakeOptions {
225
- package?: string;
226
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number | bigint>];
227
- typeArguments: [string];
228
- }
229
- export function take(options: TakeOptions) {
230
- const packageAddress =
231
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
232
- const argumentsTypes = [null, 'u64'] satisfies (string | null)[];
233
- return (tx: Transaction) =>
234
- tx.moveCall({
235
- package: packageAddress,
236
- module: 'coin',
237
- function: 'take',
238
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
239
- typeArguments: options.typeArguments,
240
- });
241
- }
242
- export interface PutOptions {
243
- package?: string;
244
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
245
- typeArguments: [string];
246
- }
247
- export function put(options: PutOptions) {
248
- const packageAddress =
249
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
250
- const argumentsTypes = [null, null] satisfies (string | null)[];
251
- return (tx: Transaction) =>
252
- tx.moveCall({
253
- package: packageAddress,
254
- module: 'coin',
255
- function: 'put',
256
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
257
- typeArguments: options.typeArguments,
258
- });
259
- }
260
- export interface RedeemFundsOptions {
261
- package?: string;
262
- arguments: [RawTransactionArgument<string>];
263
- typeArguments: [string];
264
- }
265
- export function redeemFunds(options: RedeemFundsOptions) {
266
- const packageAddress =
267
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
268
- const argumentsTypes = [null] satisfies (string | null)[];
269
- return (tx: Transaction) =>
270
- tx.moveCall({
271
- package: packageAddress,
272
- module: 'coin',
273
- function: 'redeem_funds',
274
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
275
- typeArguments: options.typeArguments,
276
- });
277
- }
278
- export interface SendFundsOptions {
279
- package?: string;
280
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
281
- typeArguments: [string];
282
- }
283
- export function sendFunds(options: SendFundsOptions) {
284
- const packageAddress =
285
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
286
- const argumentsTypes = [null, 'address'] satisfies (string | null)[];
287
- return (tx: Transaction) =>
288
- tx.moveCall({
289
- package: packageAddress,
290
- module: 'coin',
291
- function: 'send_funds',
292
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
293
- typeArguments: options.typeArguments,
294
- });
295
- }
296
- export interface JoinOptions {
297
- package?: string;
298
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
299
- typeArguments: [string];
300
- }
301
- export function join(options: JoinOptions) {
302
- const packageAddress =
303
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
304
- const argumentsTypes = [null, null] satisfies (string | null)[];
305
- return (tx: Transaction) =>
306
- tx.moveCall({
307
- package: packageAddress,
308
- module: 'coin',
309
- function: 'join',
310
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
311
- typeArguments: options.typeArguments,
312
- });
313
- }
314
- export interface SplitOptions {
315
- package?: string;
316
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number | bigint>];
317
- typeArguments: [string];
318
- }
319
- export function split(options: SplitOptions) {
320
- const packageAddress =
321
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
322
- const argumentsTypes = [null, 'u64'] satisfies (string | null)[];
323
- return (tx: Transaction) =>
324
- tx.moveCall({
325
- package: packageAddress,
326
- module: 'coin',
327
- function: 'split',
328
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
329
- typeArguments: options.typeArguments,
330
- });
331
- }
332
- export interface DivideIntoNOptions {
333
- package?: string;
334
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number | bigint>];
335
- typeArguments: [string];
336
- }
337
- export function divideIntoN(options: DivideIntoNOptions) {
338
- const packageAddress =
339
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
340
- const argumentsTypes = [null, 'u64'] satisfies (string | null)[];
341
- return (tx: Transaction) =>
342
- tx.moveCall({
343
- package: packageAddress,
344
- module: 'coin',
345
- function: 'divide_into_n',
346
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
347
- typeArguments: options.typeArguments,
348
- });
349
- }
350
- export interface ZeroOptions {
351
- package?: string;
352
- arguments?: [];
353
- typeArguments: [string];
354
- }
355
- export function zero(options: ZeroOptions) {
356
- const packageAddress =
357
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
358
- return (tx: Transaction) =>
359
- tx.moveCall({
360
- package: packageAddress,
361
- module: 'coin',
362
- function: 'zero',
363
- typeArguments: options.typeArguments,
364
- });
365
- }
366
- export interface DestroyZeroOptions {
367
- package?: string;
368
- arguments: [RawTransactionArgument<string>];
369
- typeArguments: [string];
370
- }
371
- export function destroyZero(options: DestroyZeroOptions) {
372
- const packageAddress =
373
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
374
- const argumentsTypes = [null] satisfies (string | null)[];
375
- return (tx: Transaction) =>
376
- tx.moveCall({
377
- package: packageAddress,
378
- module: 'coin',
379
- function: 'destroy_zero',
380
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
381
- typeArguments: options.typeArguments,
382
- });
383
- }
384
- export interface CreateCurrencyOptions<T0 extends BcsType<any>> {
385
- package?: string;
386
- arguments: [
387
- RawTransactionArgument<T0>,
388
- RawTransactionArgument<number>,
389
- RawTransactionArgument<number[]>,
390
- RawTransactionArgument<number[]>,
391
- RawTransactionArgument<number[]>,
392
- RawTransactionArgument<string | null>,
393
- ];
394
- typeArguments: [string];
395
- }
396
- export function createCurrency<T0 extends BcsType<any>>(options: CreateCurrencyOptions<T0>) {
397
- const packageAddress =
398
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
399
- const argumentsTypes = [
400
- `${options.typeArguments[0]}`,
401
- 'u8',
402
- 'vector<u8>',
403
- 'vector<u8>',
404
- 'vector<u8>',
405
- '0x1::option::Option<null>',
406
- ] satisfies (string | null)[];
407
- return (tx: Transaction) =>
408
- tx.moveCall({
409
- package: packageAddress,
410
- module: 'coin',
411
- function: 'create_currency',
412
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
413
- typeArguments: options.typeArguments,
414
- });
415
- }
416
- export interface CreateRegulatedCurrencyV2Options<T0 extends BcsType<any>> {
417
- package?: string;
418
- arguments: [
419
- RawTransactionArgument<T0>,
420
- RawTransactionArgument<number>,
421
- RawTransactionArgument<number[]>,
422
- RawTransactionArgument<number[]>,
423
- RawTransactionArgument<number[]>,
424
- RawTransactionArgument<string | null>,
425
- RawTransactionArgument<boolean>,
426
- ];
427
- typeArguments: [string];
428
- }
429
- export function createRegulatedCurrencyV2<T0 extends BcsType<any>>(
430
- options: CreateRegulatedCurrencyV2Options<T0>,
431
- ) {
432
- const packageAddress =
433
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
434
- const argumentsTypes = [
435
- `${options.typeArguments[0]}`,
436
- 'u8',
437
- 'vector<u8>',
438
- 'vector<u8>',
439
- 'vector<u8>',
440
- '0x1::option::Option<null>',
441
- 'bool',
442
- ] satisfies (string | null)[];
443
- return (tx: Transaction) =>
444
- tx.moveCall({
445
- package: packageAddress,
446
- module: 'coin',
447
- function: 'create_regulated_currency_v2',
448
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
449
- typeArguments: options.typeArguments,
450
- });
451
- }
452
- export interface MigrateRegulatedCurrencyToV2Options {
453
- package?: string;
454
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<boolean>];
455
- typeArguments: [string];
456
- }
457
- export function migrateRegulatedCurrencyToV2(options: MigrateRegulatedCurrencyToV2Options) {
458
- const packageAddress =
459
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
460
- const argumentsTypes = ['0x2::deny_list::DenyList', null, 'bool'] satisfies (string | null)[];
461
- return (tx: Transaction) =>
462
- tx.moveCall({
463
- package: packageAddress,
464
- module: 'coin',
465
- function: 'migrate_regulated_currency_to_v2',
466
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
467
- typeArguments: options.typeArguments,
468
- });
469
- }
470
- export interface MintOptions {
471
- package?: string;
472
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number | bigint>];
473
- typeArguments: [string];
474
- }
475
- export function mint(options: MintOptions) {
476
- const packageAddress =
477
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
478
- const argumentsTypes = [null, 'u64'] satisfies (string | null)[];
479
- return (tx: Transaction) =>
480
- tx.moveCall({
481
- package: packageAddress,
482
- module: 'coin',
483
- function: 'mint',
484
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
485
- typeArguments: options.typeArguments,
486
- });
487
- }
488
- export interface MintBalanceOptions {
489
- package?: string;
490
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number | bigint>];
491
- typeArguments: [string];
492
- }
493
- export function mintBalance(options: MintBalanceOptions) {
494
- const packageAddress =
495
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
496
- const argumentsTypes = [null, 'u64'] satisfies (string | null)[];
497
- return (tx: Transaction) =>
498
- tx.moveCall({
499
- package: packageAddress,
500
- module: 'coin',
501
- function: 'mint_balance',
502
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
503
- typeArguments: options.typeArguments,
504
- });
505
- }
506
- export interface BurnOptions {
507
- package?: string;
508
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
509
- typeArguments: [string];
510
- }
511
- export function burn(options: BurnOptions) {
512
- const packageAddress =
513
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
514
- const argumentsTypes = [null, null] satisfies (string | null)[];
515
- return (tx: Transaction) =>
516
- tx.moveCall({
517
- package: packageAddress,
518
- module: 'coin',
519
- function: 'burn',
520
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
521
- typeArguments: options.typeArguments,
522
- });
523
- }
524
- export interface DenyListV2AddOptions {
525
- package?: string;
526
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
527
- typeArguments: [string];
528
- }
529
- export function denyListV2Add(options: DenyListV2AddOptions) {
530
- const packageAddress =
531
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
532
- const argumentsTypes = ['0x2::deny_list::DenyList', null, 'address'] satisfies (string | null)[];
533
- return (tx: Transaction) =>
534
- tx.moveCall({
535
- package: packageAddress,
536
- module: 'coin',
537
- function: 'deny_list_v2_add',
538
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
539
- typeArguments: options.typeArguments,
540
- });
541
- }
542
- export interface DenyListV2RemoveOptions {
543
- package?: string;
544
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
545
- typeArguments: [string];
546
- }
547
- export function denyListV2Remove(options: DenyListV2RemoveOptions) {
548
- const packageAddress =
549
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
550
- const argumentsTypes = ['0x2::deny_list::DenyList', null, 'address'] satisfies (string | null)[];
551
- return (tx: Transaction) =>
552
- tx.moveCall({
553
- package: packageAddress,
554
- module: 'coin',
555
- function: 'deny_list_v2_remove',
556
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
557
- typeArguments: options.typeArguments,
558
- });
559
- }
560
- export interface DenyListV2ContainsCurrentEpochOptions {
561
- package?: string;
562
- arguments: [RawTransactionArgument<string>];
563
- typeArguments: [string];
564
- }
565
- export function denyListV2ContainsCurrentEpoch(options: DenyListV2ContainsCurrentEpochOptions) {
566
- const packageAddress =
567
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
568
- const argumentsTypes = ['0x2::deny_list::DenyList', 'address'] satisfies (string | null)[];
569
- return (tx: Transaction) =>
570
- tx.moveCall({
571
- package: packageAddress,
572
- module: 'coin',
573
- function: 'deny_list_v2_contains_current_epoch',
574
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
575
- typeArguments: options.typeArguments,
576
- });
577
- }
578
- export interface DenyListV2ContainsNextEpochOptions {
579
- package?: string;
580
- arguments: [RawTransactionArgument<string>];
581
- typeArguments: [string];
582
- }
583
- export function denyListV2ContainsNextEpoch(options: DenyListV2ContainsNextEpochOptions) {
584
- const packageAddress =
585
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
586
- const argumentsTypes = ['0x2::deny_list::DenyList', 'address'] satisfies (string | null)[];
587
- return (tx: Transaction) =>
588
- tx.moveCall({
589
- package: packageAddress,
590
- module: 'coin',
591
- function: 'deny_list_v2_contains_next_epoch',
592
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
593
- typeArguments: options.typeArguments,
594
- });
595
- }
596
- export interface DenyListV2EnableGlobalPauseOptions {
597
- package?: string;
598
- arguments: [RawTransactionArgument<string>];
599
- typeArguments: [string];
600
- }
601
- export function denyListV2EnableGlobalPause(options: DenyListV2EnableGlobalPauseOptions) {
602
- const packageAddress =
603
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
604
- const argumentsTypes = ['0x2::deny_list::DenyList', null] satisfies (string | null)[];
605
- return (tx: Transaction) =>
606
- tx.moveCall({
607
- package: packageAddress,
608
- module: 'coin',
609
- function: 'deny_list_v2_enable_global_pause',
610
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
611
- typeArguments: options.typeArguments,
612
- });
613
- }
614
- export interface DenyListV2DisableGlobalPauseOptions {
615
- package?: string;
616
- arguments: [RawTransactionArgument<string>];
617
- typeArguments: [string];
618
- }
619
- export function denyListV2DisableGlobalPause(options: DenyListV2DisableGlobalPauseOptions) {
620
- const packageAddress =
621
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
622
- const argumentsTypes = ['0x2::deny_list::DenyList', null] satisfies (string | null)[];
623
- return (tx: Transaction) =>
624
- tx.moveCall({
625
- package: packageAddress,
626
- module: 'coin',
627
- function: 'deny_list_v2_disable_global_pause',
628
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
629
- typeArguments: options.typeArguments,
630
- });
631
- }
632
- export interface DenyListV2IsGlobalPauseEnabledCurrentEpochOptions {
633
- package?: string;
634
- arguments?: [];
635
- typeArguments: [string];
636
- }
637
- export function denyListV2IsGlobalPauseEnabledCurrentEpoch(
638
- options: DenyListV2IsGlobalPauseEnabledCurrentEpochOptions,
639
- ) {
640
- const packageAddress =
641
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
642
- const argumentsTypes = ['0x2::deny_list::DenyList'] satisfies (string | null)[];
643
- return (tx: Transaction) =>
644
- tx.moveCall({
645
- package: packageAddress,
646
- module: 'coin',
647
- function: 'deny_list_v2_is_global_pause_enabled_current_epoch',
648
- arguments: normalizeMoveArguments(options.arguments ?? [], argumentsTypes),
649
- typeArguments: options.typeArguments,
650
- });
651
- }
652
- export interface DenyListV2IsGlobalPauseEnabledNextEpochOptions {
653
- package?: string;
654
- arguments?: [];
655
- typeArguments: [string];
656
- }
657
- export function denyListV2IsGlobalPauseEnabledNextEpoch(
658
- options: DenyListV2IsGlobalPauseEnabledNextEpochOptions,
659
- ) {
660
- const packageAddress =
661
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
662
- const argumentsTypes = ['0x2::deny_list::DenyList'] satisfies (string | null)[];
663
- return (tx: Transaction) =>
664
- tx.moveCall({
665
- package: packageAddress,
666
- module: 'coin',
667
- function: 'deny_list_v2_is_global_pause_enabled_next_epoch',
668
- arguments: normalizeMoveArguments(options.arguments ?? [], argumentsTypes),
669
- typeArguments: options.typeArguments,
670
- });
671
- }
672
- export interface MintAndTransferOptions {
673
- package?: string;
674
- arguments: [
675
- RawTransactionArgument<string>,
676
- RawTransactionArgument<number | bigint>,
677
- RawTransactionArgument<string>,
678
- ];
679
- typeArguments: [string];
680
- }
681
- export function mintAndTransfer(options: MintAndTransferOptions) {
682
- const packageAddress =
683
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
684
- const argumentsTypes = [null, 'u64', 'address'] satisfies (string | null)[];
685
- return (tx: Transaction) =>
686
- tx.moveCall({
687
- package: packageAddress,
688
- module: 'coin',
689
- function: 'mint_and_transfer',
690
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
691
- typeArguments: options.typeArguments,
692
- });
693
- }
694
- export interface UpdateNameOptions {
695
- package?: string;
696
- arguments: [
697
- RawTransactionArgument<string>,
698
- RawTransactionArgument<string>,
699
- RawTransactionArgument<string>,
700
- ];
701
- typeArguments: [string];
702
- }
703
- export function updateName(options: UpdateNameOptions) {
704
- const packageAddress =
705
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
706
- const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
707
- return (tx: Transaction) =>
708
- tx.moveCall({
709
- package: packageAddress,
710
- module: 'coin',
711
- function: 'update_name',
712
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
713
- typeArguments: options.typeArguments,
714
- });
715
- }
716
- export interface UpdateSymbolOptions {
717
- package?: string;
718
- arguments: [
719
- RawTransactionArgument<string>,
720
- RawTransactionArgument<string>,
721
- RawTransactionArgument<string>,
722
- ];
723
- typeArguments: [string];
724
- }
725
- export function updateSymbol(options: UpdateSymbolOptions) {
726
- const packageAddress =
727
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
728
- const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
729
- return (tx: Transaction) =>
730
- tx.moveCall({
731
- package: packageAddress,
732
- module: 'coin',
733
- function: 'update_symbol',
734
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
735
- typeArguments: options.typeArguments,
736
- });
737
- }
738
- export interface UpdateDescriptionOptions {
739
- package?: string;
740
- arguments: [
741
- RawTransactionArgument<string>,
742
- RawTransactionArgument<string>,
743
- RawTransactionArgument<string>,
744
- ];
745
- typeArguments: [string];
746
- }
747
- export function updateDescription(options: UpdateDescriptionOptions) {
748
- const packageAddress =
749
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
750
- const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
751
- return (tx: Transaction) =>
752
- tx.moveCall({
753
- package: packageAddress,
754
- module: 'coin',
755
- function: 'update_description',
756
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
757
- typeArguments: options.typeArguments,
758
- });
759
- }
760
- export interface UpdateIconUrlOptions {
761
- package?: string;
762
- arguments: [
763
- RawTransactionArgument<string>,
764
- RawTransactionArgument<string>,
765
- RawTransactionArgument<string>,
766
- ];
767
- typeArguments: [string];
768
- }
769
- export function updateIconUrl(options: UpdateIconUrlOptions) {
770
- const packageAddress =
771
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
772
- const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
773
- return (tx: Transaction) =>
774
- tx.moveCall({
775
- package: packageAddress,
776
- module: 'coin',
777
- function: 'update_icon_url',
778
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
779
- typeArguments: options.typeArguments,
780
- });
781
- }
782
- export interface GetDecimalsOptions {
783
- package?: string;
784
- arguments: [RawTransactionArgument<string>];
785
- typeArguments: [string];
786
- }
787
- export function getDecimals(options: GetDecimalsOptions) {
788
- const packageAddress =
789
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
790
- const argumentsTypes = [null] satisfies (string | null)[];
791
- return (tx: Transaction) =>
792
- tx.moveCall({
793
- package: packageAddress,
794
- module: 'coin',
795
- function: 'get_decimals',
796
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
797
- typeArguments: options.typeArguments,
798
- });
799
- }
800
- export interface GetNameOptions {
801
- package?: string;
802
- arguments: [RawTransactionArgument<string>];
803
- typeArguments: [string];
804
- }
805
- export function getName(options: GetNameOptions) {
806
- const packageAddress =
807
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
808
- const argumentsTypes = [null] satisfies (string | null)[];
809
- return (tx: Transaction) =>
810
- tx.moveCall({
811
- package: packageAddress,
812
- module: 'coin',
813
- function: 'get_name',
814
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
815
- typeArguments: options.typeArguments,
816
- });
817
- }
818
- export interface GetSymbolOptions {
819
- package?: string;
820
- arguments: [RawTransactionArgument<string>];
821
- typeArguments: [string];
822
- }
823
- export function getSymbol(options: GetSymbolOptions) {
824
- const packageAddress =
825
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
826
- const argumentsTypes = [null] satisfies (string | null)[];
827
- return (tx: Transaction) =>
828
- tx.moveCall({
829
- package: packageAddress,
830
- module: 'coin',
831
- function: 'get_symbol',
832
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
833
- typeArguments: options.typeArguments,
834
- });
835
- }
836
- export interface GetDescriptionOptions {
837
- package?: string;
838
- arguments: [RawTransactionArgument<string>];
839
- typeArguments: [string];
840
- }
841
- export function getDescription(options: GetDescriptionOptions) {
842
- const packageAddress =
843
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
844
- const argumentsTypes = [null] satisfies (string | null)[];
845
- return (tx: Transaction) =>
846
- tx.moveCall({
847
- package: packageAddress,
848
- module: 'coin',
849
- function: 'get_description',
850
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
851
- typeArguments: options.typeArguments,
852
- });
853
- }
854
- export interface GetIconUrlOptions {
855
- package?: string;
856
- arguments: [RawTransactionArgument<string>];
857
- typeArguments: [string];
858
- }
859
- export function getIconUrl(options: GetIconUrlOptions) {
860
- const packageAddress =
861
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
862
- const argumentsTypes = [null] satisfies (string | null)[];
863
- return (tx: Transaction) =>
864
- tx.moveCall({
865
- package: packageAddress,
866
- module: 'coin',
867
- function: 'get_icon_url',
868
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
869
- typeArguments: options.typeArguments,
870
- });
871
- }
872
- export interface SupplyOptions {
873
- package?: string;
874
- arguments: [RawTransactionArgument<string>];
875
- typeArguments: [string];
876
- }
877
- export function supply(options: SupplyOptions) {
878
- const packageAddress =
879
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
880
- const argumentsTypes = [null] satisfies (string | null)[];
881
- return (tx: Transaction) =>
882
- tx.moveCall({
883
- package: packageAddress,
884
- module: 'coin',
885
- function: 'supply',
886
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
887
- typeArguments: options.typeArguments,
888
- });
889
- }
890
- export interface CreateRegulatedCurrencyOptions<T0 extends BcsType<any>> {
891
- package?: string;
892
- arguments: [
893
- RawTransactionArgument<T0>,
894
- RawTransactionArgument<number>,
895
- RawTransactionArgument<number[]>,
896
- RawTransactionArgument<number[]>,
897
- RawTransactionArgument<number[]>,
898
- RawTransactionArgument<string | null>,
899
- ];
900
- typeArguments: [string];
901
- }
902
- export function createRegulatedCurrency<T0 extends BcsType<any>>(
903
- options: CreateRegulatedCurrencyOptions<T0>,
904
- ) {
905
- const packageAddress =
906
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
907
- const argumentsTypes = [
908
- `${options.typeArguments[0]}`,
909
- 'u8',
910
- 'vector<u8>',
911
- 'vector<u8>',
912
- 'vector<u8>',
913
- '0x1::option::Option<null>',
914
- ] satisfies (string | null)[];
915
- return (tx: Transaction) =>
916
- tx.moveCall({
917
- package: packageAddress,
918
- module: 'coin',
919
- function: 'create_regulated_currency',
920
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
921
- typeArguments: options.typeArguments,
922
- });
923
- }
924
- export interface DenyListAddOptions {
925
- package?: string;
926
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
927
- typeArguments: [string];
928
- }
929
- export function denyListAdd(options: DenyListAddOptions) {
930
- const packageAddress =
931
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
932
- const argumentsTypes = ['0x2::deny_list::DenyList', null, 'address'] satisfies (string | null)[];
933
- return (tx: Transaction) =>
934
- tx.moveCall({
935
- package: packageAddress,
936
- module: 'coin',
937
- function: 'deny_list_add',
938
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
939
- typeArguments: options.typeArguments,
940
- });
941
- }
942
- export interface DenyListRemoveOptions {
943
- package?: string;
944
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
945
- typeArguments: [string];
946
- }
947
- export function denyListRemove(options: DenyListRemoveOptions) {
948
- const packageAddress =
949
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
950
- const argumentsTypes = ['0x2::deny_list::DenyList', null, 'address'] satisfies (string | null)[];
951
- return (tx: Transaction) =>
952
- tx.moveCall({
953
- package: packageAddress,
954
- module: 'coin',
955
- function: 'deny_list_remove',
956
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
957
- typeArguments: options.typeArguments,
958
- });
959
- }
960
- export interface DenyListContainsOptions {
961
- package?: string;
962
- arguments: [RawTransactionArgument<string>];
963
- typeArguments: [string];
964
- }
965
- export function denyListContains(options: DenyListContainsOptions) {
966
- const packageAddress =
967
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
968
- const argumentsTypes = ['0x2::deny_list::DenyList', 'address'] satisfies (string | null)[];
969
- return (tx: Transaction) =>
970
- tx.moveCall({
971
- package: packageAddress,
972
- module: 'coin',
973
- function: 'deny_list_contains',
974
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
975
- typeArguments: options.typeArguments,
976
- });
977
- }