@mysten/kiosk 1.1.0 → 1.1.2

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 (76) hide show
  1. package/CHANGELOG.md +16 -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/dist/contracts/utils/index.mjs.map +1 -1
  13. package/package.json +8 -7
  14. package/src/contracts/0x2/bag.ts +2 -181
  15. package/src/contracts/0x2/balance.ts +3 -260
  16. package/src/contracts/0x2/kiosk.ts +4 -4
  17. package/src/contracts/0x2/kiosk_extension.ts +1 -1
  18. package/src/contracts/0x2/transfer_policy.ts +6 -6
  19. package/src/contracts/0x2/vec_set.ts +1 -198
  20. package/src/contracts/kiosk/witness_rule.ts +1 -1
  21. package/src/contracts/utils/index.ts +1 -1
  22. package/src/contracts/0x2/accumulator.ts +0 -24
  23. package/src/contracts/0x2/accumulator_metadata.ts +0 -38
  24. package/src/contracts/0x2/accumulator_settlement.ts +0 -14
  25. package/src/contracts/0x2/address.ts +0 -145
  26. package/src/contracts/0x2/address_alias.ts +0 -92
  27. package/src/contracts/0x2/authenticator_state.ts +0 -44
  28. package/src/contracts/0x2/bcs.ts +0 -495
  29. package/src/contracts/0x2/bls12381.ts +0 -717
  30. package/src/contracts/0x2/borrow.ts +0 -99
  31. package/src/contracts/0x2/clock.ts +0 -30
  32. package/src/contracts/0x2/coin.ts +0 -977
  33. package/src/contracts/0x2/coin_registry.ts +0 -874
  34. package/src/contracts/0x2/config.ts +0 -30
  35. package/src/contracts/0x2/deny_list.ts +0 -55
  36. package/src/contracts/0x2/derived_object.ts +0 -95
  37. package/src/contracts/0x2/display.ts +0 -258
  38. package/src/contracts/0x2/dynamic_field.ts +0 -171
  39. package/src/contracts/0x2/dynamic_object_field.ts +0 -167
  40. package/src/contracts/0x2/ecdsa_k1.ts +0 -65
  41. package/src/contracts/0x2/ecdsa_r1.ts +0 -49
  42. package/src/contracts/0x2/ecvrf.ts +0 -29
  43. package/src/contracts/0x2/ed25519.ts +0 -25
  44. package/src/contracts/0x2/event.ts +0 -42
  45. package/src/contracts/0x2/funds_accumulator.ts +0 -86
  46. package/src/contracts/0x2/groth16.ts +0 -171
  47. package/src/contracts/0x2/group_ops.ts +0 -49
  48. package/src/contracts/0x2/hash.ts +0 -37
  49. package/src/contracts/0x2/hex.ts +0 -37
  50. package/src/contracts/0x2/hmac.ts +0 -21
  51. package/src/contracts/0x2/linked_table.ts +0 -354
  52. package/src/contracts/0x2/math.ts +0 -117
  53. package/src/contracts/0x2/nitro_attestation.ts +0 -186
  54. package/src/contracts/0x2/object.ts +0 -249
  55. package/src/contracts/0x2/object_bag.ts +0 -210
  56. package/src/contracts/0x2/object_table.ts +0 -200
  57. package/src/contracts/0x2/package.ts +0 -414
  58. package/src/contracts/0x2/party.ts +0 -37
  59. package/src/contracts/0x2/pay.ts +0 -153
  60. package/src/contracts/0x2/poseidon.ts +0 -21
  61. package/src/contracts/0x2/priority_queue.ts +0 -139
  62. package/src/contracts/0x2/random.ts +0 -294
  63. package/src/contracts/0x2/sui.ts +0 -29
  64. package/src/contracts/0x2/table.ts +0 -200
  65. package/src/contracts/0x2/table_vec.ts +0 -232
  66. package/src/contracts/0x2/token.ts +0 -873
  67. package/src/contracts/0x2/transfer.ts +0 -216
  68. package/src/contracts/0x2/tx_context.ts +0 -129
  69. package/src/contracts/0x2/types.ts +0 -24
  70. package/src/contracts/0x2/url.ts +0 -77
  71. package/src/contracts/0x2/vdf.ts +0 -45
  72. package/src/contracts/0x2/vec_map.ts +0 -401
  73. package/src/contracts/0x2/versioned.ts +0 -153
  74. package/src/contracts/0x2/zklogin_verified_id.ts +0 -172
  75. package/src/contracts/0x2/zklogin_verified_issuer.ts +0 -99
  76. package/src/contracts/kiosk/deps/sui/object.ts +0 -15
@@ -2,8 +2,7 @@
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
4
  import { type BcsType, bcs } from '@mysten/sui/bcs';
5
- import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
6
- import { type Transaction } from '@mysten/sui/transactions';
5
+ import { MoveStruct } from '../utils/index.js';
7
6
  const $moduleName = '0x2::vec_set';
8
7
  export function VecSet<T0 extends BcsType<any>>(...typeParameters: [T0]) {
9
8
  return new MoveStruct({
@@ -13,199 +12,3 @@ export function VecSet<T0 extends BcsType<any>>(...typeParameters: [T0]) {
13
12
  },
14
13
  });
15
14
  }
16
- export interface EmptyOptions {
17
- package?: string;
18
- arguments?: [];
19
- typeArguments: [string];
20
- }
21
- export function empty(options: EmptyOptions) {
22
- const packageAddress =
23
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
24
- return (tx: Transaction) =>
25
- tx.moveCall({
26
- package: packageAddress,
27
- module: 'vec_set',
28
- function: 'empty',
29
- typeArguments: options.typeArguments,
30
- });
31
- }
32
- export interface SingletonOptions<T0 extends BcsType<any>> {
33
- package?: string;
34
- arguments: [RawTransactionArgument<T0>];
35
- typeArguments: [string];
36
- }
37
- export function singleton<T0 extends BcsType<any>>(options: SingletonOptions<T0>) {
38
- const packageAddress =
39
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
40
- const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
41
- return (tx: Transaction) =>
42
- tx.moveCall({
43
- package: packageAddress,
44
- module: 'vec_set',
45
- function: 'singleton',
46
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
47
- typeArguments: options.typeArguments,
48
- });
49
- }
50
- export interface InsertOptions<T0 extends BcsType<any>> {
51
- package?: string;
52
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
53
- typeArguments: [string];
54
- }
55
- export function insert<T0 extends BcsType<any>>(options: InsertOptions<T0>) {
56
- const packageAddress =
57
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
58
- const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
59
- return (tx: Transaction) =>
60
- tx.moveCall({
61
- package: packageAddress,
62
- module: 'vec_set',
63
- function: 'insert',
64
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
65
- typeArguments: options.typeArguments,
66
- });
67
- }
68
- export interface RemoveOptions<T0 extends BcsType<any>> {
69
- package?: string;
70
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
71
- typeArguments: [string];
72
- }
73
- export function remove<T0 extends BcsType<any>>(options: RemoveOptions<T0>) {
74
- const packageAddress =
75
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
76
- const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
77
- return (tx: Transaction) =>
78
- tx.moveCall({
79
- package: packageAddress,
80
- module: 'vec_set',
81
- function: 'remove',
82
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
83
- typeArguments: options.typeArguments,
84
- });
85
- }
86
- export interface ContainsOptions<T0 extends BcsType<any>> {
87
- package?: string;
88
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
89
- typeArguments: [string];
90
- }
91
- export function contains<T0 extends BcsType<any>>(options: ContainsOptions<T0>) {
92
- const packageAddress =
93
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
94
- const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
95
- return (tx: Transaction) =>
96
- tx.moveCall({
97
- package: packageAddress,
98
- module: 'vec_set',
99
- function: 'contains',
100
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
101
- typeArguments: options.typeArguments,
102
- });
103
- }
104
- export interface LengthOptions {
105
- package?: string;
106
- arguments: [RawTransactionArgument<string>];
107
- typeArguments: [string];
108
- }
109
- export function length(options: LengthOptions) {
110
- const packageAddress =
111
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
112
- const argumentsTypes = [null] satisfies (string | null)[];
113
- return (tx: Transaction) =>
114
- tx.moveCall({
115
- package: packageAddress,
116
- module: 'vec_set',
117
- function: 'length',
118
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
119
- typeArguments: options.typeArguments,
120
- });
121
- }
122
- export interface IsEmptyOptions {
123
- package?: string;
124
- arguments: [RawTransactionArgument<string>];
125
- typeArguments: [string];
126
- }
127
- export function isEmpty(options: IsEmptyOptions) {
128
- const packageAddress =
129
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
130
- const argumentsTypes = [null] satisfies (string | null)[];
131
- return (tx: Transaction) =>
132
- tx.moveCall({
133
- package: packageAddress,
134
- module: 'vec_set',
135
- function: 'is_empty',
136
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
137
- typeArguments: options.typeArguments,
138
- });
139
- }
140
- export interface IntoKeysOptions {
141
- package?: string;
142
- arguments: [RawTransactionArgument<string>];
143
- typeArguments: [string];
144
- }
145
- export function intoKeys(options: IntoKeysOptions) {
146
- const packageAddress =
147
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
148
- const argumentsTypes = [null] satisfies (string | null)[];
149
- return (tx: Transaction) =>
150
- tx.moveCall({
151
- package: packageAddress,
152
- module: 'vec_set',
153
- function: 'into_keys',
154
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
155
- typeArguments: options.typeArguments,
156
- });
157
- }
158
- export interface FromKeysOptions<T0 extends BcsType<any>> {
159
- package?: string;
160
- arguments: [RawTransactionArgument<T0[]>];
161
- typeArguments: [string];
162
- }
163
- export function fromKeys<T0 extends BcsType<any>>(options: FromKeysOptions<T0>) {
164
- const packageAddress =
165
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
166
- const argumentsTypes = [`vector<${options.typeArguments[0]}>`] satisfies (string | null)[];
167
- return (tx: Transaction) =>
168
- tx.moveCall({
169
- package: packageAddress,
170
- module: 'vec_set',
171
- function: 'from_keys',
172
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
173
- typeArguments: options.typeArguments,
174
- });
175
- }
176
- export interface KeysOptions {
177
- package?: string;
178
- arguments: [RawTransactionArgument<string>];
179
- typeArguments: [string];
180
- }
181
- export function keys(options: KeysOptions) {
182
- const packageAddress =
183
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
184
- const argumentsTypes = [null] satisfies (string | null)[];
185
- return (tx: Transaction) =>
186
- tx.moveCall({
187
- package: packageAddress,
188
- module: 'vec_set',
189
- function: 'keys',
190
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
191
- typeArguments: options.typeArguments,
192
- });
193
- }
194
- export interface SizeOptions {
195
- package?: string;
196
- arguments: [RawTransactionArgument<string>];
197
- typeArguments: [string];
198
- }
199
- export function size(options: SizeOptions) {
200
- const packageAddress =
201
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
202
- const argumentsTypes = [null] satisfies (string | null)[];
203
- return (tx: Transaction) =>
204
- tx.moveCall({
205
- package: packageAddress,
206
- module: 'vec_set',
207
- function: 'size',
208
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
209
- typeArguments: options.typeArguments,
210
- });
211
- }
@@ -24,7 +24,7 @@ import { bcs, type BcsType } from '@mysten/sui/bcs';
24
24
  import { type Transaction } from '@mysten/sui/transactions';
25
25
  const $moduleName = '@local-pkg/kiosk::witness_rule';
26
26
  export const Rule = new MoveStruct({
27
- name: `${$moduleName}::Rule`,
27
+ name: `${$moduleName}::Rule<phantom Proof>`,
28
28
  fields: {
29
29
  dummy_field: bcs.bool(),
30
30
  },
@@ -218,7 +218,7 @@ export class MoveEnum<
218
218
  > extends BcsEnum<T, Name> {}
219
219
 
220
220
  export class MoveTuple<
221
- T extends readonly BcsType<any>[],
221
+ const T extends readonly BcsType<any>[],
222
222
  const Name extends string,
223
223
  > extends BcsTuple<T, Name> {}
224
224
 
@@ -1,24 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveStruct } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- const $moduleName = '0x2::accumulator';
7
- export const AccumulatorRoot = new MoveStruct({
8
- name: `${$moduleName}::AccumulatorRoot`,
9
- fields: {
10
- id: bcs.Address,
11
- },
12
- });
13
- export const U128 = new MoveStruct({
14
- name: `${$moduleName}::U128`,
15
- fields: {
16
- value: bcs.u128(),
17
- },
18
- });
19
- export const Key = new MoveStruct({
20
- name: `${$moduleName}::Key`,
21
- fields: {
22
- address: bcs.Address,
23
- },
24
- });
@@ -1,38 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveStruct } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- import * as bag from './bag.js';
7
- const $moduleName = '0x2::accumulator_metadata';
8
- export const OwnerKey = new MoveStruct({
9
- name: `${$moduleName}::OwnerKey`,
10
- fields: {
11
- owner: bcs.Address,
12
- },
13
- });
14
- export const Owner = new MoveStruct({
15
- name: `${$moduleName}::Owner`,
16
- fields: {
17
- balances: bag.Bag,
18
- owner: bcs.Address,
19
- },
20
- });
21
- export const MetadataKey = new MoveStruct({
22
- name: `${$moduleName}::MetadataKey`,
23
- fields: {
24
- dummy_field: bcs.bool(),
25
- },
26
- });
27
- export const Metadata = new MoveStruct({
28
- name: `${$moduleName}::Metadata`,
29
- fields: {
30
- fields: bag.Bag,
31
- },
32
- });
33
- export const AccumulatorObjectCountKey = new MoveStruct({
34
- name: `${$moduleName}::AccumulatorObjectCountKey`,
35
- fields: {
36
- dummy_field: bcs.bool(),
37
- },
38
- });
@@ -1,14 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveStruct } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- const $moduleName = '0x2::accumulator_settlement';
7
- export const EventStreamHead = new MoveStruct({
8
- name: `${$moduleName}::EventStreamHead`,
9
- fields: {
10
- mmr: bcs.vector(bcs.u256()),
11
- checkpoint_seq: bcs.u64(),
12
- num_events: bcs.u64(),
13
- },
14
- });
@@ -1,145 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { type Transaction } from '@mysten/sui/transactions';
5
- import { normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
6
- export interface ToU256Options {
7
- package?: string;
8
- arguments: [RawTransactionArgument<string>];
9
- }
10
- export function toU256(options: ToU256Options) {
11
- const packageAddress =
12
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
13
- const argumentsTypes = ['address'] satisfies (string | null)[];
14
- return (tx: Transaction) =>
15
- tx.moveCall({
16
- package: packageAddress,
17
- module: 'address',
18
- function: 'to_u256',
19
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
20
- });
21
- }
22
- export interface FromU256Options {
23
- package?: string;
24
- arguments: [RawTransactionArgument<number | bigint>];
25
- }
26
- export function fromU256(options: FromU256Options) {
27
- const packageAddress =
28
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
29
- const argumentsTypes = ['u256'] satisfies (string | null)[];
30
- return (tx: Transaction) =>
31
- tx.moveCall({
32
- package: packageAddress,
33
- module: 'address',
34
- function: 'from_u256',
35
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
36
- });
37
- }
38
- export interface FromBytesOptions {
39
- package?: string;
40
- arguments: [RawTransactionArgument<number[]>];
41
- }
42
- export function fromBytes(options: FromBytesOptions) {
43
- const packageAddress =
44
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
45
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
46
- return (tx: Transaction) =>
47
- tx.moveCall({
48
- package: packageAddress,
49
- module: 'address',
50
- function: 'from_bytes',
51
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
52
- });
53
- }
54
- export interface ToBytesOptions {
55
- package?: string;
56
- arguments: [RawTransactionArgument<string>];
57
- }
58
- export function toBytes(options: ToBytesOptions) {
59
- const packageAddress =
60
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
61
- const argumentsTypes = ['address'] satisfies (string | null)[];
62
- return (tx: Transaction) =>
63
- tx.moveCall({
64
- package: packageAddress,
65
- module: 'address',
66
- function: 'to_bytes',
67
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
68
- });
69
- }
70
- export interface ToAsciiStringOptions {
71
- package?: string;
72
- arguments: [RawTransactionArgument<string>];
73
- }
74
- export function toAsciiString(options: ToAsciiStringOptions) {
75
- const packageAddress =
76
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
77
- const argumentsTypes = ['address'] satisfies (string | null)[];
78
- return (tx: Transaction) =>
79
- tx.moveCall({
80
- package: packageAddress,
81
- module: 'address',
82
- function: 'to_ascii_string',
83
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
84
- });
85
- }
86
- export interface ToStringOptions {
87
- package?: string;
88
- arguments: [RawTransactionArgument<string>];
89
- }
90
- export function toString(options: ToStringOptions) {
91
- const packageAddress =
92
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
93
- const argumentsTypes = ['address'] satisfies (string | null)[];
94
- return (tx: Transaction) =>
95
- tx.moveCall({
96
- package: packageAddress,
97
- module: 'address',
98
- function: 'to_string',
99
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
100
- });
101
- }
102
- export interface FromAsciiBytesOptions {
103
- package?: string;
104
- arguments: [RawTransactionArgument<number[]>];
105
- }
106
- export function fromAsciiBytes(options: FromAsciiBytesOptions) {
107
- const packageAddress =
108
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
109
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
110
- return (tx: Transaction) =>
111
- tx.moveCall({
112
- package: packageAddress,
113
- module: 'address',
114
- function: 'from_ascii_bytes',
115
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
116
- });
117
- }
118
- export interface LengthOptions {
119
- package?: string;
120
- arguments?: [];
121
- }
122
- export function length(options: LengthOptions = {}) {
123
- const packageAddress =
124
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
125
- return (tx: Transaction) =>
126
- tx.moveCall({
127
- package: packageAddress,
128
- module: 'address',
129
- function: 'length',
130
- });
131
- }
132
- export interface MaxOptions {
133
- package?: string;
134
- arguments?: [];
135
- }
136
- export function max(options: MaxOptions = {}) {
137
- const packageAddress =
138
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
139
- return (tx: Transaction) =>
140
- tx.moveCall({
141
- package: packageAddress,
142
- module: 'address',
143
- function: 'max',
144
- });
145
- }
@@ -1,92 +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
- import * as vec_set from './vec_set.js';
8
- const $moduleName = '0x2::address_alias';
9
- export const AddressAliasState = new MoveStruct({
10
- name: `${$moduleName}::AddressAliasState`,
11
- fields: {
12
- id: bcs.Address,
13
- version: bcs.u64(),
14
- },
15
- });
16
- export const AddressAliases = new MoveStruct({
17
- name: `${$moduleName}::AddressAliases`,
18
- fields: {
19
- id: bcs.Address,
20
- aliases: vec_set.VecSet(bcs.Address),
21
- },
22
- });
23
- export const AliasKey = new MoveStruct({
24
- name: `${$moduleName}::AliasKey`,
25
- fields: {
26
- pos0: bcs.Address,
27
- },
28
- });
29
- export interface EnableOptions {
30
- package?: string;
31
- arguments: [RawTransactionArgument<string>];
32
- }
33
- export function enable(options: EnableOptions) {
34
- const packageAddress =
35
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
36
- const argumentsTypes = [null] satisfies (string | null)[];
37
- return (tx: Transaction) =>
38
- tx.moveCall({
39
- package: packageAddress,
40
- module: 'address_alias',
41
- function: 'enable',
42
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
43
- });
44
- }
45
- export interface AddOptions {
46
- package?: string;
47
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
48
- }
49
- export function add(options: AddOptions) {
50
- const packageAddress =
51
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
52
- const argumentsTypes = [null, 'address'] satisfies (string | null)[];
53
- return (tx: Transaction) =>
54
- tx.moveCall({
55
- package: packageAddress,
56
- module: 'address_alias',
57
- function: 'add',
58
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
59
- });
60
- }
61
- export interface ReplaceAllOptions {
62
- package?: string;
63
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string[]>];
64
- }
65
- export function replaceAll(options: ReplaceAllOptions) {
66
- const packageAddress =
67
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
68
- const argumentsTypes = [null, 'vector<address>'] satisfies (string | null)[];
69
- return (tx: Transaction) =>
70
- tx.moveCall({
71
- package: packageAddress,
72
- module: 'address_alias',
73
- function: 'replace_all',
74
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
75
- });
76
- }
77
- export interface RemoveOptions {
78
- package?: string;
79
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
80
- }
81
- export function remove(options: RemoveOptions) {
82
- const packageAddress =
83
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
84
- const argumentsTypes = [null, 'address'] satisfies (string | null)[];
85
- return (tx: Transaction) =>
86
- tx.moveCall({
87
- package: packageAddress,
88
- module: 'address_alias',
89
- function: 'remove',
90
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
91
- });
92
- }
@@ -1,44 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveStruct } from '../utils/index.js';
5
- import { bcs } from '@mysten/sui/bcs';
6
- const $moduleName = '0x2::authenticator_state';
7
- export const AuthenticatorState = new MoveStruct({
8
- name: `${$moduleName}::AuthenticatorState`,
9
- fields: {
10
- id: bcs.Address,
11
- version: bcs.u64(),
12
- },
13
- });
14
- export const JwkId = new MoveStruct({
15
- name: `${$moduleName}::JwkId`,
16
- fields: {
17
- iss: bcs.string(),
18
- kid: bcs.string(),
19
- },
20
- });
21
- export const JWK = new MoveStruct({
22
- name: `${$moduleName}::JWK`,
23
- fields: {
24
- kty: bcs.string(),
25
- e: bcs.string(),
26
- n: bcs.string(),
27
- alg: bcs.string(),
28
- },
29
- });
30
- export const ActiveJwk = new MoveStruct({
31
- name: `${$moduleName}::ActiveJwk`,
32
- fields: {
33
- jwk_id: JwkId,
34
- jwk: JWK,
35
- epoch: bcs.u64(),
36
- },
37
- });
38
- export const AuthenticatorStateInner = new MoveStruct({
39
- name: `${$moduleName}::AuthenticatorStateInner`,
40
- fields: {
41
- version: bcs.u64(),
42
- active_jwks: bcs.vector(ActiveJwk),
43
- },
44
- });