@mysten/kiosk 1.0.1 → 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.
- package/CHANGELOG.md +16 -0
- package/dist/client/kiosk-client.d.mts +4 -4
- package/dist/client/kiosk-client.d.mts.map +1 -1
- package/dist/client/kiosk-client.mjs.map +1 -1
- package/dist/contracts/0x2/bag.mjs.map +1 -1
- package/dist/contracts/0x2/balance.mjs +1 -5
- package/dist/contracts/0x2/balance.mjs.map +1 -1
- package/dist/contracts/0x2/kiosk.mjs +5 -5
- package/dist/contracts/0x2/kiosk.mjs.map +1 -1
- package/dist/contracts/0x2/kiosk_extension.mjs +1 -1
- package/dist/contracts/0x2/kiosk_extension.mjs.map +1 -1
- package/dist/contracts/0x2/transfer_policy.mjs +6 -6
- package/dist/contracts/0x2/transfer_policy.mjs.map +1 -1
- package/dist/contracts/0x2/vec_set.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/query/client-utils.mjs +186 -1
- package/dist/query/client-utils.mjs.map +1 -1
- package/dist/query/kiosk.mjs +2 -1
- package/dist/query/kiosk.mjs.map +1 -1
- package/dist/query/transfer-policy.mjs +1 -1
- package/dist/query/transfer-policy.mjs.map +1 -1
- package/dist/types/index.d.mts +7 -4
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/kiosk.d.mts +13 -3
- package/dist/types/kiosk.d.mts.map +1 -1
- package/dist/types/kiosk.mjs.map +1 -1
- package/dist/utils.d.mts +3 -9
- package/dist/utils.d.mts.map +1 -1
- package/dist/utils.mjs +5 -24
- package/dist/utils.mjs.map +1 -1
- package/package.json +8 -7
- package/src/client/kiosk-client.ts +4 -3
- package/src/contracts/0x2/bag.ts +2 -181
- package/src/contracts/0x2/balance.ts +3 -260
- package/src/contracts/0x2/kiosk.ts +4 -4
- package/src/contracts/0x2/kiosk_extension.ts +1 -1
- package/src/contracts/0x2/transfer_policy.ts +6 -6
- package/src/contracts/0x2/vec_set.ts +1 -198
- package/src/contracts/kiosk/witness_rule.ts +1 -1
- package/src/query/client-utils.ts +253 -2
- package/src/query/kiosk.ts +3 -2
- package/src/query/transfer-policy.ts +4 -5
- package/src/types/index.ts +6 -2
- package/src/types/kiosk.ts +15 -3
- package/src/utils.ts +8 -38
- package/src/contracts/0x2/accumulator.ts +0 -24
- package/src/contracts/0x2/accumulator_metadata.ts +0 -38
- package/src/contracts/0x2/accumulator_settlement.ts +0 -14
- package/src/contracts/0x2/address.ts +0 -145
- package/src/contracts/0x2/address_alias.ts +0 -92
- package/src/contracts/0x2/authenticator_state.ts +0 -44
- package/src/contracts/0x2/bcs.ts +0 -495
- package/src/contracts/0x2/bls12381.ts +0 -717
- package/src/contracts/0x2/borrow.ts +0 -99
- package/src/contracts/0x2/clock.ts +0 -30
- package/src/contracts/0x2/coin.ts +0 -977
- package/src/contracts/0x2/coin_registry.ts +0 -874
- package/src/contracts/0x2/config.ts +0 -30
- package/src/contracts/0x2/deny_list.ts +0 -55
- package/src/contracts/0x2/derived_object.ts +0 -95
- package/src/contracts/0x2/display.ts +0 -258
- package/src/contracts/0x2/dynamic_field.ts +0 -171
- package/src/contracts/0x2/dynamic_object_field.ts +0 -167
- package/src/contracts/0x2/ecdsa_k1.ts +0 -65
- package/src/contracts/0x2/ecdsa_r1.ts +0 -49
- package/src/contracts/0x2/ecvrf.ts +0 -29
- package/src/contracts/0x2/ed25519.ts +0 -25
- package/src/contracts/0x2/event.ts +0 -42
- package/src/contracts/0x2/funds_accumulator.ts +0 -86
- package/src/contracts/0x2/groth16.ts +0 -171
- package/src/contracts/0x2/group_ops.ts +0 -49
- package/src/contracts/0x2/hash.ts +0 -37
- package/src/contracts/0x2/hex.ts +0 -37
- package/src/contracts/0x2/hmac.ts +0 -21
- package/src/contracts/0x2/linked_table.ts +0 -354
- package/src/contracts/0x2/math.ts +0 -117
- package/src/contracts/0x2/nitro_attestation.ts +0 -186
- package/src/contracts/0x2/object.ts +0 -249
- package/src/contracts/0x2/object_bag.ts +0 -210
- package/src/contracts/0x2/object_table.ts +0 -200
- package/src/contracts/0x2/package.ts +0 -414
- package/src/contracts/0x2/party.ts +0 -37
- package/src/contracts/0x2/pay.ts +0 -153
- package/src/contracts/0x2/poseidon.ts +0 -21
- package/src/contracts/0x2/priority_queue.ts +0 -139
- package/src/contracts/0x2/random.ts +0 -294
- package/src/contracts/0x2/sui.ts +0 -29
- package/src/contracts/0x2/table.ts +0 -200
- package/src/contracts/0x2/table_vec.ts +0 -232
- package/src/contracts/0x2/token.ts +0 -873
- package/src/contracts/0x2/transfer.ts +0 -216
- package/src/contracts/0x2/tx_context.ts +0 -129
- package/src/contracts/0x2/types.ts +0 -24
- package/src/contracts/0x2/url.ts +0 -77
- package/src/contracts/0x2/vdf.ts +0 -45
- package/src/contracts/0x2/vec_map.ts +0 -401
- package/src/contracts/0x2/versioned.ts +0 -153
- package/src/contracts/0x2/zklogin_verified_id.ts +0 -172
- package/src/contracts/0x2/zklogin_verified_issuer.ts +0 -99
- package/src/contracts/kiosk/deps/sui/object.ts +0 -15
|
@@ -1,200 +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
|
-
const $moduleName = '0x2::object_table';
|
|
8
|
-
export const ObjectTable = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::ObjectTable`,
|
|
10
|
-
fields: {
|
|
11
|
-
id: bcs.Address,
|
|
12
|
-
size: bcs.u64(),
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export interface NewOptions {
|
|
16
|
-
package?: string;
|
|
17
|
-
arguments?: [];
|
|
18
|
-
typeArguments: [string, string];
|
|
19
|
-
}
|
|
20
|
-
export function _new(options: NewOptions) {
|
|
21
|
-
const packageAddress =
|
|
22
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
23
|
-
return (tx: Transaction) =>
|
|
24
|
-
tx.moveCall({
|
|
25
|
-
package: packageAddress,
|
|
26
|
-
module: 'object_table',
|
|
27
|
-
function: 'new',
|
|
28
|
-
typeArguments: options.typeArguments,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export interface AddOptions<T0 extends BcsType<any>, T1 extends BcsType<any>> {
|
|
32
|
-
package?: string;
|
|
33
|
-
arguments: [
|
|
34
|
-
RawTransactionArgument<string>,
|
|
35
|
-
RawTransactionArgument<T0>,
|
|
36
|
-
RawTransactionArgument<T1>,
|
|
37
|
-
];
|
|
38
|
-
typeArguments: [string, string];
|
|
39
|
-
}
|
|
40
|
-
export function add<T0 extends BcsType<any>, T1 extends BcsType<any>>(options: AddOptions<T0, T1>) {
|
|
41
|
-
const packageAddress =
|
|
42
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
43
|
-
const argumentsTypes = [
|
|
44
|
-
null,
|
|
45
|
-
`${options.typeArguments[0]}`,
|
|
46
|
-
`${options.typeArguments[1]}`,
|
|
47
|
-
] satisfies (string | null)[];
|
|
48
|
-
return (tx: Transaction) =>
|
|
49
|
-
tx.moveCall({
|
|
50
|
-
package: packageAddress,
|
|
51
|
-
module: 'object_table',
|
|
52
|
-
function: 'add',
|
|
53
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
54
|
-
typeArguments: options.typeArguments,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
export interface BorrowOptions<T0 extends BcsType<any>> {
|
|
58
|
-
package?: string;
|
|
59
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
60
|
-
typeArguments: [string, string];
|
|
61
|
-
}
|
|
62
|
-
export function borrow<T0 extends BcsType<any>>(options: BorrowOptions<T0>) {
|
|
63
|
-
const packageAddress =
|
|
64
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
65
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
66
|
-
return (tx: Transaction) =>
|
|
67
|
-
tx.moveCall({
|
|
68
|
-
package: packageAddress,
|
|
69
|
-
module: 'object_table',
|
|
70
|
-
function: 'borrow',
|
|
71
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
72
|
-
typeArguments: options.typeArguments,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
export interface BorrowMutOptions<T0 extends BcsType<any>> {
|
|
76
|
-
package?: string;
|
|
77
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
78
|
-
typeArguments: [string, string];
|
|
79
|
-
}
|
|
80
|
-
export function borrowMut<T0 extends BcsType<any>>(options: BorrowMutOptions<T0>) {
|
|
81
|
-
const packageAddress =
|
|
82
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
83
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
84
|
-
return (tx: Transaction) =>
|
|
85
|
-
tx.moveCall({
|
|
86
|
-
package: packageAddress,
|
|
87
|
-
module: 'object_table',
|
|
88
|
-
function: 'borrow_mut',
|
|
89
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
90
|
-
typeArguments: options.typeArguments,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
export interface RemoveOptions<T0 extends BcsType<any>> {
|
|
94
|
-
package?: string;
|
|
95
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
96
|
-
typeArguments: [string, string];
|
|
97
|
-
}
|
|
98
|
-
export function remove<T0 extends BcsType<any>>(options: RemoveOptions<T0>) {
|
|
99
|
-
const packageAddress =
|
|
100
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
101
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
102
|
-
return (tx: Transaction) =>
|
|
103
|
-
tx.moveCall({
|
|
104
|
-
package: packageAddress,
|
|
105
|
-
module: 'object_table',
|
|
106
|
-
function: 'remove',
|
|
107
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
108
|
-
typeArguments: options.typeArguments,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
export interface ContainsOptions<T0 extends BcsType<any>> {
|
|
112
|
-
package?: string;
|
|
113
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
114
|
-
typeArguments: [string, string];
|
|
115
|
-
}
|
|
116
|
-
export function contains<T0 extends BcsType<any>>(options: ContainsOptions<T0>) {
|
|
117
|
-
const packageAddress =
|
|
118
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
119
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
120
|
-
return (tx: Transaction) =>
|
|
121
|
-
tx.moveCall({
|
|
122
|
-
package: packageAddress,
|
|
123
|
-
module: 'object_table',
|
|
124
|
-
function: 'contains',
|
|
125
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
126
|
-
typeArguments: options.typeArguments,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
export interface LengthOptions {
|
|
130
|
-
package?: string;
|
|
131
|
-
arguments: [RawTransactionArgument<string>];
|
|
132
|
-
typeArguments: [string, string];
|
|
133
|
-
}
|
|
134
|
-
export function length(options: LengthOptions) {
|
|
135
|
-
const packageAddress =
|
|
136
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
137
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
138
|
-
return (tx: Transaction) =>
|
|
139
|
-
tx.moveCall({
|
|
140
|
-
package: packageAddress,
|
|
141
|
-
module: 'object_table',
|
|
142
|
-
function: 'length',
|
|
143
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
144
|
-
typeArguments: options.typeArguments,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
export interface IsEmptyOptions {
|
|
148
|
-
package?: string;
|
|
149
|
-
arguments: [RawTransactionArgument<string>];
|
|
150
|
-
typeArguments: [string, string];
|
|
151
|
-
}
|
|
152
|
-
export function isEmpty(options: IsEmptyOptions) {
|
|
153
|
-
const packageAddress =
|
|
154
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
155
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
156
|
-
return (tx: Transaction) =>
|
|
157
|
-
tx.moveCall({
|
|
158
|
-
package: packageAddress,
|
|
159
|
-
module: 'object_table',
|
|
160
|
-
function: 'is_empty',
|
|
161
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
162
|
-
typeArguments: options.typeArguments,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
export interface DestroyEmptyOptions {
|
|
166
|
-
package?: string;
|
|
167
|
-
arguments: [RawTransactionArgument<string>];
|
|
168
|
-
typeArguments: [string, string];
|
|
169
|
-
}
|
|
170
|
-
export function destroyEmpty(options: DestroyEmptyOptions) {
|
|
171
|
-
const packageAddress =
|
|
172
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
173
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
174
|
-
return (tx: Transaction) =>
|
|
175
|
-
tx.moveCall({
|
|
176
|
-
package: packageAddress,
|
|
177
|
-
module: 'object_table',
|
|
178
|
-
function: 'destroy_empty',
|
|
179
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
180
|
-
typeArguments: options.typeArguments,
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
export interface ValueIdOptions<T0 extends BcsType<any>> {
|
|
184
|
-
package?: string;
|
|
185
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
186
|
-
typeArguments: [string, string];
|
|
187
|
-
}
|
|
188
|
-
export function valueId<T0 extends BcsType<any>>(options: ValueIdOptions<T0>) {
|
|
189
|
-
const packageAddress =
|
|
190
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
191
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
192
|
-
return (tx: Transaction) =>
|
|
193
|
-
tx.moveCall({
|
|
194
|
-
package: packageAddress,
|
|
195
|
-
module: 'object_table',
|
|
196
|
-
function: 'value_id',
|
|
197
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
198
|
-
typeArguments: options.typeArguments,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
@@ -1,414 +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
|
-
const $moduleName = '0x2::package';
|
|
8
|
-
export const Publisher = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::Publisher`,
|
|
10
|
-
fields: {
|
|
11
|
-
id: bcs.Address,
|
|
12
|
-
package: bcs.string(),
|
|
13
|
-
module_name: bcs.string(),
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
export const UpgradeCap = new MoveStruct({
|
|
17
|
-
name: `${$moduleName}::UpgradeCap`,
|
|
18
|
-
fields: {
|
|
19
|
-
id: bcs.Address,
|
|
20
|
-
package: bcs.Address,
|
|
21
|
-
version: bcs.u64(),
|
|
22
|
-
policy: bcs.u8(),
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
export const UpgradeTicket = new MoveStruct({
|
|
26
|
-
name: `${$moduleName}::UpgradeTicket`,
|
|
27
|
-
fields: {
|
|
28
|
-
cap: bcs.Address,
|
|
29
|
-
package: bcs.Address,
|
|
30
|
-
policy: bcs.u8(),
|
|
31
|
-
digest: bcs.vector(bcs.u8()),
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
export const UpgradeReceipt = new MoveStruct({
|
|
35
|
-
name: `${$moduleName}::UpgradeReceipt`,
|
|
36
|
-
fields: {
|
|
37
|
-
cap: bcs.Address,
|
|
38
|
-
package: bcs.Address,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
export interface ClaimOptions<T0 extends BcsType<any>> {
|
|
42
|
-
package?: string;
|
|
43
|
-
arguments: [RawTransactionArgument<T0>];
|
|
44
|
-
typeArguments: [string];
|
|
45
|
-
}
|
|
46
|
-
export function claim<T0 extends BcsType<any>>(options: ClaimOptions<T0>) {
|
|
47
|
-
const packageAddress =
|
|
48
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
49
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
50
|
-
return (tx: Transaction) =>
|
|
51
|
-
tx.moveCall({
|
|
52
|
-
package: packageAddress,
|
|
53
|
-
module: 'package',
|
|
54
|
-
function: 'claim',
|
|
55
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
56
|
-
typeArguments: options.typeArguments,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
export interface ClaimAndKeepOptions<T0 extends BcsType<any>> {
|
|
60
|
-
package?: string;
|
|
61
|
-
arguments: [RawTransactionArgument<T0>];
|
|
62
|
-
typeArguments: [string];
|
|
63
|
-
}
|
|
64
|
-
export function claimAndKeep<T0 extends BcsType<any>>(options: ClaimAndKeepOptions<T0>) {
|
|
65
|
-
const packageAddress =
|
|
66
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
67
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
68
|
-
return (tx: Transaction) =>
|
|
69
|
-
tx.moveCall({
|
|
70
|
-
package: packageAddress,
|
|
71
|
-
module: 'package',
|
|
72
|
-
function: 'claim_and_keep',
|
|
73
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
74
|
-
typeArguments: options.typeArguments,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
export interface BurnPublisherOptions {
|
|
78
|
-
package?: string;
|
|
79
|
-
arguments: [RawTransactionArgument<string>];
|
|
80
|
-
}
|
|
81
|
-
export function burnPublisher(options: BurnPublisherOptions) {
|
|
82
|
-
const packageAddress =
|
|
83
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
84
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
85
|
-
return (tx: Transaction) =>
|
|
86
|
-
tx.moveCall({
|
|
87
|
-
package: packageAddress,
|
|
88
|
-
module: 'package',
|
|
89
|
-
function: 'burn_publisher',
|
|
90
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
export interface FromPackageOptions {
|
|
94
|
-
package?: string;
|
|
95
|
-
arguments: [RawTransactionArgument<string>];
|
|
96
|
-
typeArguments: [string];
|
|
97
|
-
}
|
|
98
|
-
export function fromPackage(options: FromPackageOptions) {
|
|
99
|
-
const packageAddress =
|
|
100
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
101
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
102
|
-
return (tx: Transaction) =>
|
|
103
|
-
tx.moveCall({
|
|
104
|
-
package: packageAddress,
|
|
105
|
-
module: 'package',
|
|
106
|
-
function: 'from_package',
|
|
107
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
108
|
-
typeArguments: options.typeArguments,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
export interface FromModuleOptions {
|
|
112
|
-
package?: string;
|
|
113
|
-
arguments: [RawTransactionArgument<string>];
|
|
114
|
-
typeArguments: [string];
|
|
115
|
-
}
|
|
116
|
-
export function fromModule(options: FromModuleOptions) {
|
|
117
|
-
const packageAddress =
|
|
118
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
119
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
120
|
-
return (tx: Transaction) =>
|
|
121
|
-
tx.moveCall({
|
|
122
|
-
package: packageAddress,
|
|
123
|
-
module: 'package',
|
|
124
|
-
function: 'from_module',
|
|
125
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
126
|
-
typeArguments: options.typeArguments,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
export interface PublishedModuleOptions {
|
|
130
|
-
package?: string;
|
|
131
|
-
arguments: [RawTransactionArgument<string>];
|
|
132
|
-
}
|
|
133
|
-
export function publishedModule(options: PublishedModuleOptions) {
|
|
134
|
-
const packageAddress =
|
|
135
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
136
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
137
|
-
return (tx: Transaction) =>
|
|
138
|
-
tx.moveCall({
|
|
139
|
-
package: packageAddress,
|
|
140
|
-
module: 'package',
|
|
141
|
-
function: 'published_module',
|
|
142
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
export interface PublishedPackageOptions {
|
|
146
|
-
package?: string;
|
|
147
|
-
arguments: [RawTransactionArgument<string>];
|
|
148
|
-
}
|
|
149
|
-
export function publishedPackage(options: PublishedPackageOptions) {
|
|
150
|
-
const packageAddress =
|
|
151
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
152
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
153
|
-
return (tx: Transaction) =>
|
|
154
|
-
tx.moveCall({
|
|
155
|
-
package: packageAddress,
|
|
156
|
-
module: 'package',
|
|
157
|
-
function: 'published_package',
|
|
158
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
export interface UpgradePackageOptions {
|
|
162
|
-
package?: string;
|
|
163
|
-
arguments: [RawTransactionArgument<string>];
|
|
164
|
-
}
|
|
165
|
-
export function upgradePackage(options: UpgradePackageOptions) {
|
|
166
|
-
const packageAddress =
|
|
167
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
168
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
169
|
-
return (tx: Transaction) =>
|
|
170
|
-
tx.moveCall({
|
|
171
|
-
package: packageAddress,
|
|
172
|
-
module: 'package',
|
|
173
|
-
function: 'upgrade_package',
|
|
174
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
export interface VersionOptions {
|
|
178
|
-
package?: string;
|
|
179
|
-
arguments: [RawTransactionArgument<string>];
|
|
180
|
-
}
|
|
181
|
-
export function version(options: VersionOptions) {
|
|
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: 'package',
|
|
189
|
-
function: 'version',
|
|
190
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
export interface UpgradePolicyOptions {
|
|
194
|
-
package?: string;
|
|
195
|
-
arguments: [RawTransactionArgument<string>];
|
|
196
|
-
}
|
|
197
|
-
export function upgradePolicy(options: UpgradePolicyOptions) {
|
|
198
|
-
const packageAddress =
|
|
199
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
200
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
201
|
-
return (tx: Transaction) =>
|
|
202
|
-
tx.moveCall({
|
|
203
|
-
package: packageAddress,
|
|
204
|
-
module: 'package',
|
|
205
|
-
function: 'upgrade_policy',
|
|
206
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
export interface TicketPackageOptions {
|
|
210
|
-
package?: string;
|
|
211
|
-
arguments: [RawTransactionArgument<string>];
|
|
212
|
-
}
|
|
213
|
-
export function ticketPackage(options: TicketPackageOptions) {
|
|
214
|
-
const packageAddress =
|
|
215
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
216
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
217
|
-
return (tx: Transaction) =>
|
|
218
|
-
tx.moveCall({
|
|
219
|
-
package: packageAddress,
|
|
220
|
-
module: 'package',
|
|
221
|
-
function: 'ticket_package',
|
|
222
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
export interface TicketPolicyOptions {
|
|
226
|
-
package?: string;
|
|
227
|
-
arguments: [RawTransactionArgument<string>];
|
|
228
|
-
}
|
|
229
|
-
export function ticketPolicy(options: TicketPolicyOptions) {
|
|
230
|
-
const packageAddress =
|
|
231
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
232
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
233
|
-
return (tx: Transaction) =>
|
|
234
|
-
tx.moveCall({
|
|
235
|
-
package: packageAddress,
|
|
236
|
-
module: 'package',
|
|
237
|
-
function: 'ticket_policy',
|
|
238
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
export interface ReceiptCapOptions {
|
|
242
|
-
package?: string;
|
|
243
|
-
arguments: [RawTransactionArgument<string>];
|
|
244
|
-
}
|
|
245
|
-
export function receiptCap(options: ReceiptCapOptions) {
|
|
246
|
-
const packageAddress =
|
|
247
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
248
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
249
|
-
return (tx: Transaction) =>
|
|
250
|
-
tx.moveCall({
|
|
251
|
-
package: packageAddress,
|
|
252
|
-
module: 'package',
|
|
253
|
-
function: 'receipt_cap',
|
|
254
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
export interface ReceiptPackageOptions {
|
|
258
|
-
package?: string;
|
|
259
|
-
arguments: [RawTransactionArgument<string>];
|
|
260
|
-
}
|
|
261
|
-
export function receiptPackage(options: ReceiptPackageOptions) {
|
|
262
|
-
const packageAddress =
|
|
263
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
264
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
265
|
-
return (tx: Transaction) =>
|
|
266
|
-
tx.moveCall({
|
|
267
|
-
package: packageAddress,
|
|
268
|
-
module: 'package',
|
|
269
|
-
function: 'receipt_package',
|
|
270
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
export interface TicketDigestOptions {
|
|
274
|
-
package?: string;
|
|
275
|
-
arguments: [RawTransactionArgument<string>];
|
|
276
|
-
}
|
|
277
|
-
export function ticketDigest(options: TicketDigestOptions) {
|
|
278
|
-
const packageAddress =
|
|
279
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
280
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
281
|
-
return (tx: Transaction) =>
|
|
282
|
-
tx.moveCall({
|
|
283
|
-
package: packageAddress,
|
|
284
|
-
module: 'package',
|
|
285
|
-
function: 'ticket_digest',
|
|
286
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
export interface CompatiblePolicyOptions {
|
|
290
|
-
package?: string;
|
|
291
|
-
arguments?: [];
|
|
292
|
-
}
|
|
293
|
-
export function compatiblePolicy(options: CompatiblePolicyOptions = {}) {
|
|
294
|
-
const packageAddress =
|
|
295
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
296
|
-
return (tx: Transaction) =>
|
|
297
|
-
tx.moveCall({
|
|
298
|
-
package: packageAddress,
|
|
299
|
-
module: 'package',
|
|
300
|
-
function: 'compatible_policy',
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
export interface AdditivePolicyOptions {
|
|
304
|
-
package?: string;
|
|
305
|
-
arguments?: [];
|
|
306
|
-
}
|
|
307
|
-
export function additivePolicy(options: AdditivePolicyOptions = {}) {
|
|
308
|
-
const packageAddress =
|
|
309
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
310
|
-
return (tx: Transaction) =>
|
|
311
|
-
tx.moveCall({
|
|
312
|
-
package: packageAddress,
|
|
313
|
-
module: 'package',
|
|
314
|
-
function: 'additive_policy',
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
export interface DepOnlyPolicyOptions {
|
|
318
|
-
package?: string;
|
|
319
|
-
arguments?: [];
|
|
320
|
-
}
|
|
321
|
-
export function depOnlyPolicy(options: DepOnlyPolicyOptions = {}) {
|
|
322
|
-
const packageAddress =
|
|
323
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
324
|
-
return (tx: Transaction) =>
|
|
325
|
-
tx.moveCall({
|
|
326
|
-
package: packageAddress,
|
|
327
|
-
module: 'package',
|
|
328
|
-
function: 'dep_only_policy',
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
export interface OnlyAdditiveUpgradesOptions {
|
|
332
|
-
package?: string;
|
|
333
|
-
arguments: [RawTransactionArgument<string>];
|
|
334
|
-
}
|
|
335
|
-
export function onlyAdditiveUpgrades(options: OnlyAdditiveUpgradesOptions) {
|
|
336
|
-
const packageAddress =
|
|
337
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
338
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
339
|
-
return (tx: Transaction) =>
|
|
340
|
-
tx.moveCall({
|
|
341
|
-
package: packageAddress,
|
|
342
|
-
module: 'package',
|
|
343
|
-
function: 'only_additive_upgrades',
|
|
344
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
export interface OnlyDepUpgradesOptions {
|
|
348
|
-
package?: string;
|
|
349
|
-
arguments: [RawTransactionArgument<string>];
|
|
350
|
-
}
|
|
351
|
-
export function onlyDepUpgrades(options: OnlyDepUpgradesOptions) {
|
|
352
|
-
const packageAddress =
|
|
353
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
354
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
355
|
-
return (tx: Transaction) =>
|
|
356
|
-
tx.moveCall({
|
|
357
|
-
package: packageAddress,
|
|
358
|
-
module: 'package',
|
|
359
|
-
function: 'only_dep_upgrades',
|
|
360
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
export interface MakeImmutableOptions {
|
|
364
|
-
package?: string;
|
|
365
|
-
arguments: [RawTransactionArgument<string>];
|
|
366
|
-
}
|
|
367
|
-
export function makeImmutable(options: MakeImmutableOptions) {
|
|
368
|
-
const packageAddress =
|
|
369
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
370
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
371
|
-
return (tx: Transaction) =>
|
|
372
|
-
tx.moveCall({
|
|
373
|
-
package: packageAddress,
|
|
374
|
-
module: 'package',
|
|
375
|
-
function: 'make_immutable',
|
|
376
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
export interface AuthorizeUpgradeOptions {
|
|
380
|
-
package?: string;
|
|
381
|
-
arguments: [
|
|
382
|
-
RawTransactionArgument<string>,
|
|
383
|
-
RawTransactionArgument<number>,
|
|
384
|
-
RawTransactionArgument<number[]>,
|
|
385
|
-
];
|
|
386
|
-
}
|
|
387
|
-
export function authorizeUpgrade(options: AuthorizeUpgradeOptions) {
|
|
388
|
-
const packageAddress =
|
|
389
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
390
|
-
const argumentsTypes = [null, 'u8', 'vector<u8>'] satisfies (string | null)[];
|
|
391
|
-
return (tx: Transaction) =>
|
|
392
|
-
tx.moveCall({
|
|
393
|
-
package: packageAddress,
|
|
394
|
-
module: 'package',
|
|
395
|
-
function: 'authorize_upgrade',
|
|
396
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
export interface CommitUpgradeOptions {
|
|
400
|
-
package?: string;
|
|
401
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
402
|
-
}
|
|
403
|
-
export function commitUpgrade(options: CommitUpgradeOptions) {
|
|
404
|
-
const packageAddress =
|
|
405
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
406
|
-
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
407
|
-
return (tx: Transaction) =>
|
|
408
|
-
tx.moveCall({
|
|
409
|
-
package: packageAddress,
|
|
410
|
-
module: 'package',
|
|
411
|
-
function: 'commit_upgrade',
|
|
412
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
413
|
-
});
|
|
414
|
-
}
|
|
@@ -1,37 +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_map from './vec_map.js';
|
|
8
|
-
const $moduleName = '0x2::party';
|
|
9
|
-
export const Permissions = new MoveStruct({
|
|
10
|
-
name: `${$moduleName}::Permissions`,
|
|
11
|
-
fields: {
|
|
12
|
-
pos0: bcs.u64(),
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export const Party = new MoveStruct({
|
|
16
|
-
name: `${$moduleName}::Party`,
|
|
17
|
-
fields: {
|
|
18
|
-
default: Permissions,
|
|
19
|
-
members: vec_map.VecMap(bcs.Address, Permissions),
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
export interface SingleOwnerOptions {
|
|
23
|
-
package?: string;
|
|
24
|
-
arguments: [RawTransactionArgument<string>];
|
|
25
|
-
}
|
|
26
|
-
export function singleOwner(options: SingleOwnerOptions) {
|
|
27
|
-
const packageAddress =
|
|
28
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
29
|
-
const argumentsTypes = ['address'] satisfies (string | null)[];
|
|
30
|
-
return (tx: Transaction) =>
|
|
31
|
-
tx.moveCall({
|
|
32
|
-
package: packageAddress,
|
|
33
|
-
module: 'party',
|
|
34
|
-
function: 'single_owner',
|
|
35
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
36
|
-
});
|
|
37
|
-
}
|