@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.
- package/CHANGELOG.md +16 -0
- 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 +4 -4
- 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/contracts/utils/index.mjs.map +1 -1
- package/package.json +8 -7
- 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/contracts/utils/index.ts +1 -1
- 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,37 +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 Blake2b256Options {
|
|
7
|
-
package?: string;
|
|
8
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
9
|
-
}
|
|
10
|
-
export function blake2b256(options: Blake2b256Options) {
|
|
11
|
-
const packageAddress =
|
|
12
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
13
|
-
const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
|
|
14
|
-
return (tx: Transaction) =>
|
|
15
|
-
tx.moveCall({
|
|
16
|
-
package: packageAddress,
|
|
17
|
-
module: 'hash',
|
|
18
|
-
function: 'blake2b256',
|
|
19
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export interface Keccak256Options {
|
|
23
|
-
package?: string;
|
|
24
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
25
|
-
}
|
|
26
|
-
export function keccak256(options: Keccak256Options) {
|
|
27
|
-
const packageAddress =
|
|
28
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
29
|
-
const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
|
|
30
|
-
return (tx: Transaction) =>
|
|
31
|
-
tx.moveCall({
|
|
32
|
-
package: packageAddress,
|
|
33
|
-
module: 'hash',
|
|
34
|
-
function: 'keccak256',
|
|
35
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
36
|
-
});
|
|
37
|
-
}
|
package/src/contracts/0x2/hex.ts
DELETED
|
@@ -1,37 +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 EncodeOptions {
|
|
7
|
-
package?: string;
|
|
8
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
9
|
-
}
|
|
10
|
-
export function encode(options: EncodeOptions) {
|
|
11
|
-
const packageAddress =
|
|
12
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
13
|
-
const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
|
|
14
|
-
return (tx: Transaction) =>
|
|
15
|
-
tx.moveCall({
|
|
16
|
-
package: packageAddress,
|
|
17
|
-
module: 'hex',
|
|
18
|
-
function: 'encode',
|
|
19
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export interface DecodeOptions {
|
|
23
|
-
package?: string;
|
|
24
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
25
|
-
}
|
|
26
|
-
export function decode(options: DecodeOptions) {
|
|
27
|
-
const packageAddress =
|
|
28
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
29
|
-
const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
|
|
30
|
-
return (tx: Transaction) =>
|
|
31
|
-
tx.moveCall({
|
|
32
|
-
package: packageAddress,
|
|
33
|
-
module: 'hex',
|
|
34
|
-
function: 'decode',
|
|
35
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
@@ -1,21 +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 HmacSha3_256Options {
|
|
7
|
-
package?: string;
|
|
8
|
-
arguments: [RawTransactionArgument<number[]>, RawTransactionArgument<number[]>];
|
|
9
|
-
}
|
|
10
|
-
export function hmacSha3_256(options: HmacSha3_256Options) {
|
|
11
|
-
const packageAddress =
|
|
12
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
13
|
-
const argumentsTypes = ['vector<u8>', 'vector<u8>'] satisfies (string | null)[];
|
|
14
|
-
return (tx: Transaction) =>
|
|
15
|
-
tx.moveCall({
|
|
16
|
-
package: packageAddress,
|
|
17
|
-
module: 'hmac',
|
|
18
|
-
function: 'hmac_sha3_256',
|
|
19
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
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';
|
|
7
|
-
const $moduleName = '0x2::linked_table';
|
|
8
|
-
export function LinkedTable<T0 extends BcsType<any>>(...typeParameters: [T0]) {
|
|
9
|
-
return new MoveStruct({
|
|
10
|
-
name: `${$moduleName}::LinkedTable<${typeParameters[0].name as T0['name']}>`,
|
|
11
|
-
fields: {
|
|
12
|
-
id: bcs.Address,
|
|
13
|
-
size: bcs.u64(),
|
|
14
|
-
head: bcs.option(typeParameters[0]),
|
|
15
|
-
tail: bcs.option(typeParameters[0]),
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
export function Node<T0 extends BcsType<any>, T1 extends BcsType<any>>(
|
|
20
|
-
...typeParameters: [T0, T1]
|
|
21
|
-
) {
|
|
22
|
-
return new MoveStruct({
|
|
23
|
-
name: `${$moduleName}::Node<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,
|
|
24
|
-
fields: {
|
|
25
|
-
prev: bcs.option(typeParameters[0]),
|
|
26
|
-
next: bcs.option(typeParameters[0]),
|
|
27
|
-
value: typeParameters[1],
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export interface NewOptions {
|
|
32
|
-
package?: string;
|
|
33
|
-
arguments?: [];
|
|
34
|
-
typeArguments: [string, string];
|
|
35
|
-
}
|
|
36
|
-
export function _new(options: NewOptions) {
|
|
37
|
-
const packageAddress =
|
|
38
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
39
|
-
return (tx: Transaction) =>
|
|
40
|
-
tx.moveCall({
|
|
41
|
-
package: packageAddress,
|
|
42
|
-
module: 'linked_table',
|
|
43
|
-
function: 'new',
|
|
44
|
-
typeArguments: options.typeArguments,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
export interface FrontOptions {
|
|
48
|
-
package?: string;
|
|
49
|
-
arguments: [RawTransactionArgument<string>];
|
|
50
|
-
typeArguments: [string, string];
|
|
51
|
-
}
|
|
52
|
-
export function front(options: FrontOptions) {
|
|
53
|
-
const packageAddress =
|
|
54
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
55
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
56
|
-
return (tx: Transaction) =>
|
|
57
|
-
tx.moveCall({
|
|
58
|
-
package: packageAddress,
|
|
59
|
-
module: 'linked_table',
|
|
60
|
-
function: 'front',
|
|
61
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
62
|
-
typeArguments: options.typeArguments,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
export interface BackOptions {
|
|
66
|
-
package?: string;
|
|
67
|
-
arguments: [RawTransactionArgument<string>];
|
|
68
|
-
typeArguments: [string, string];
|
|
69
|
-
}
|
|
70
|
-
export function back(options: BackOptions) {
|
|
71
|
-
const packageAddress =
|
|
72
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
73
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
74
|
-
return (tx: Transaction) =>
|
|
75
|
-
tx.moveCall({
|
|
76
|
-
package: packageAddress,
|
|
77
|
-
module: 'linked_table',
|
|
78
|
-
function: 'back',
|
|
79
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
80
|
-
typeArguments: options.typeArguments,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
export interface PushFrontOptions<T0 extends BcsType<any>, T1 extends BcsType<any>> {
|
|
84
|
-
package?: string;
|
|
85
|
-
arguments: [
|
|
86
|
-
RawTransactionArgument<string>,
|
|
87
|
-
RawTransactionArgument<T0>,
|
|
88
|
-
RawTransactionArgument<T1>,
|
|
89
|
-
];
|
|
90
|
-
typeArguments: [string, string];
|
|
91
|
-
}
|
|
92
|
-
export function pushFront<T0 extends BcsType<any>, T1 extends BcsType<any>>(
|
|
93
|
-
options: PushFrontOptions<T0, T1>,
|
|
94
|
-
) {
|
|
95
|
-
const packageAddress =
|
|
96
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
97
|
-
const argumentsTypes = [
|
|
98
|
-
null,
|
|
99
|
-
`${options.typeArguments[0]}`,
|
|
100
|
-
`${options.typeArguments[1]}`,
|
|
101
|
-
] satisfies (string | null)[];
|
|
102
|
-
return (tx: Transaction) =>
|
|
103
|
-
tx.moveCall({
|
|
104
|
-
package: packageAddress,
|
|
105
|
-
module: 'linked_table',
|
|
106
|
-
function: 'push_front',
|
|
107
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
108
|
-
typeArguments: options.typeArguments,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
export interface PushBackOptions<T0 extends BcsType<any>, T1 extends BcsType<any>> {
|
|
112
|
-
package?: string;
|
|
113
|
-
arguments: [
|
|
114
|
-
RawTransactionArgument<string>,
|
|
115
|
-
RawTransactionArgument<T0>,
|
|
116
|
-
RawTransactionArgument<T1>,
|
|
117
|
-
];
|
|
118
|
-
typeArguments: [string, string];
|
|
119
|
-
}
|
|
120
|
-
export function pushBack<T0 extends BcsType<any>, T1 extends BcsType<any>>(
|
|
121
|
-
options: PushBackOptions<T0, T1>,
|
|
122
|
-
) {
|
|
123
|
-
const packageAddress =
|
|
124
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
125
|
-
const argumentsTypes = [
|
|
126
|
-
null,
|
|
127
|
-
`${options.typeArguments[0]}`,
|
|
128
|
-
`${options.typeArguments[1]}`,
|
|
129
|
-
] satisfies (string | null)[];
|
|
130
|
-
return (tx: Transaction) =>
|
|
131
|
-
tx.moveCall({
|
|
132
|
-
package: packageAddress,
|
|
133
|
-
module: 'linked_table',
|
|
134
|
-
function: 'push_back',
|
|
135
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
136
|
-
typeArguments: options.typeArguments,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
export interface BorrowOptions<T0 extends BcsType<any>> {
|
|
140
|
-
package?: string;
|
|
141
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
142
|
-
typeArguments: [string, string];
|
|
143
|
-
}
|
|
144
|
-
export function borrow<T0 extends BcsType<any>>(options: BorrowOptions<T0>) {
|
|
145
|
-
const packageAddress =
|
|
146
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
147
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
148
|
-
return (tx: Transaction) =>
|
|
149
|
-
tx.moveCall({
|
|
150
|
-
package: packageAddress,
|
|
151
|
-
module: 'linked_table',
|
|
152
|
-
function: 'borrow',
|
|
153
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
154
|
-
typeArguments: options.typeArguments,
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
export interface BorrowMutOptions<T0 extends BcsType<any>> {
|
|
158
|
-
package?: string;
|
|
159
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
160
|
-
typeArguments: [string, string];
|
|
161
|
-
}
|
|
162
|
-
export function borrowMut<T0 extends BcsType<any>>(options: BorrowMutOptions<T0>) {
|
|
163
|
-
const packageAddress =
|
|
164
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
165
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
166
|
-
return (tx: Transaction) =>
|
|
167
|
-
tx.moveCall({
|
|
168
|
-
package: packageAddress,
|
|
169
|
-
module: 'linked_table',
|
|
170
|
-
function: 'borrow_mut',
|
|
171
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
172
|
-
typeArguments: options.typeArguments,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
export interface PrevOptions<T0 extends BcsType<any>> {
|
|
176
|
-
package?: string;
|
|
177
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
178
|
-
typeArguments: [string, string];
|
|
179
|
-
}
|
|
180
|
-
export function prev<T0 extends BcsType<any>>(options: PrevOptions<T0>) {
|
|
181
|
-
const packageAddress =
|
|
182
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
183
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
184
|
-
return (tx: Transaction) =>
|
|
185
|
-
tx.moveCall({
|
|
186
|
-
package: packageAddress,
|
|
187
|
-
module: 'linked_table',
|
|
188
|
-
function: 'prev',
|
|
189
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
190
|
-
typeArguments: options.typeArguments,
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
export interface NextOptions<T0 extends BcsType<any>> {
|
|
194
|
-
package?: string;
|
|
195
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
196
|
-
typeArguments: [string, string];
|
|
197
|
-
}
|
|
198
|
-
export function next<T0 extends BcsType<any>>(options: NextOptions<T0>) {
|
|
199
|
-
const packageAddress =
|
|
200
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
201
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
202
|
-
return (tx: Transaction) =>
|
|
203
|
-
tx.moveCall({
|
|
204
|
-
package: packageAddress,
|
|
205
|
-
module: 'linked_table',
|
|
206
|
-
function: 'next',
|
|
207
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
208
|
-
typeArguments: options.typeArguments,
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
export interface RemoveOptions<T0 extends BcsType<any>> {
|
|
212
|
-
package?: string;
|
|
213
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
214
|
-
typeArguments: [string, string];
|
|
215
|
-
}
|
|
216
|
-
export function remove<T0 extends BcsType<any>>(options: RemoveOptions<T0>) {
|
|
217
|
-
const packageAddress =
|
|
218
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
219
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
220
|
-
return (tx: Transaction) =>
|
|
221
|
-
tx.moveCall({
|
|
222
|
-
package: packageAddress,
|
|
223
|
-
module: 'linked_table',
|
|
224
|
-
function: 'remove',
|
|
225
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
226
|
-
typeArguments: options.typeArguments,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
export interface PopFrontOptions {
|
|
230
|
-
package?: string;
|
|
231
|
-
arguments: [RawTransactionArgument<string>];
|
|
232
|
-
typeArguments: [string, string];
|
|
233
|
-
}
|
|
234
|
-
export function popFront(options: PopFrontOptions) {
|
|
235
|
-
const packageAddress =
|
|
236
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
237
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
238
|
-
return (tx: Transaction) =>
|
|
239
|
-
tx.moveCall({
|
|
240
|
-
package: packageAddress,
|
|
241
|
-
module: 'linked_table',
|
|
242
|
-
function: 'pop_front',
|
|
243
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
244
|
-
typeArguments: options.typeArguments,
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
export interface PopBackOptions {
|
|
248
|
-
package?: string;
|
|
249
|
-
arguments: [RawTransactionArgument<string>];
|
|
250
|
-
typeArguments: [string, string];
|
|
251
|
-
}
|
|
252
|
-
export function popBack(options: PopBackOptions) {
|
|
253
|
-
const packageAddress =
|
|
254
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
255
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
256
|
-
return (tx: Transaction) =>
|
|
257
|
-
tx.moveCall({
|
|
258
|
-
package: packageAddress,
|
|
259
|
-
module: 'linked_table',
|
|
260
|
-
function: 'pop_back',
|
|
261
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
262
|
-
typeArguments: options.typeArguments,
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
export interface ContainsOptions<T0 extends BcsType<any>> {
|
|
266
|
-
package?: string;
|
|
267
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
268
|
-
typeArguments: [string, string];
|
|
269
|
-
}
|
|
270
|
-
export function contains<T0 extends BcsType<any>>(options: ContainsOptions<T0>) {
|
|
271
|
-
const packageAddress =
|
|
272
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
273
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
274
|
-
return (tx: Transaction) =>
|
|
275
|
-
tx.moveCall({
|
|
276
|
-
package: packageAddress,
|
|
277
|
-
module: 'linked_table',
|
|
278
|
-
function: 'contains',
|
|
279
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
280
|
-
typeArguments: options.typeArguments,
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
export interface LengthOptions {
|
|
284
|
-
package?: string;
|
|
285
|
-
arguments: [RawTransactionArgument<string>];
|
|
286
|
-
typeArguments: [string, string];
|
|
287
|
-
}
|
|
288
|
-
export function length(options: LengthOptions) {
|
|
289
|
-
const packageAddress =
|
|
290
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
291
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
292
|
-
return (tx: Transaction) =>
|
|
293
|
-
tx.moveCall({
|
|
294
|
-
package: packageAddress,
|
|
295
|
-
module: 'linked_table',
|
|
296
|
-
function: 'length',
|
|
297
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
298
|
-
typeArguments: options.typeArguments,
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
export interface IsEmptyOptions {
|
|
302
|
-
package?: string;
|
|
303
|
-
arguments: [RawTransactionArgument<string>];
|
|
304
|
-
typeArguments: [string, string];
|
|
305
|
-
}
|
|
306
|
-
export function isEmpty(options: IsEmptyOptions) {
|
|
307
|
-
const packageAddress =
|
|
308
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
309
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
310
|
-
return (tx: Transaction) =>
|
|
311
|
-
tx.moveCall({
|
|
312
|
-
package: packageAddress,
|
|
313
|
-
module: 'linked_table',
|
|
314
|
-
function: 'is_empty',
|
|
315
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
316
|
-
typeArguments: options.typeArguments,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
export interface DestroyEmptyOptions {
|
|
320
|
-
package?: string;
|
|
321
|
-
arguments: [RawTransactionArgument<string>];
|
|
322
|
-
typeArguments: [string, string];
|
|
323
|
-
}
|
|
324
|
-
export function destroyEmpty(options: DestroyEmptyOptions) {
|
|
325
|
-
const packageAddress =
|
|
326
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
327
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
328
|
-
return (tx: Transaction) =>
|
|
329
|
-
tx.moveCall({
|
|
330
|
-
package: packageAddress,
|
|
331
|
-
module: 'linked_table',
|
|
332
|
-
function: 'destroy_empty',
|
|
333
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
334
|
-
typeArguments: options.typeArguments,
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
export interface DropOptions {
|
|
338
|
-
package?: string;
|
|
339
|
-
arguments: [RawTransactionArgument<string>];
|
|
340
|
-
typeArguments: [string, string];
|
|
341
|
-
}
|
|
342
|
-
export function drop(options: DropOptions) {
|
|
343
|
-
const packageAddress =
|
|
344
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
345
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
346
|
-
return (tx: Transaction) =>
|
|
347
|
-
tx.moveCall({
|
|
348
|
-
package: packageAddress,
|
|
349
|
-
module: 'linked_table',
|
|
350
|
-
function: 'drop',
|
|
351
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
352
|
-
typeArguments: options.typeArguments,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
@@ -1,117 +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 MaxOptions {
|
|
7
|
-
package?: string;
|
|
8
|
-
arguments: [RawTransactionArgument<number | bigint>, RawTransactionArgument<number | bigint>];
|
|
9
|
-
}
|
|
10
|
-
export function max(options: MaxOptions) {
|
|
11
|
-
const packageAddress =
|
|
12
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
13
|
-
const argumentsTypes = ['u64', 'u64'] satisfies (string | null)[];
|
|
14
|
-
return (tx: Transaction) =>
|
|
15
|
-
tx.moveCall({
|
|
16
|
-
package: packageAddress,
|
|
17
|
-
module: 'math',
|
|
18
|
-
function: 'max',
|
|
19
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export interface MinOptions {
|
|
23
|
-
package?: string;
|
|
24
|
-
arguments: [RawTransactionArgument<number | bigint>, RawTransactionArgument<number | bigint>];
|
|
25
|
-
}
|
|
26
|
-
export function min(options: MinOptions) {
|
|
27
|
-
const packageAddress =
|
|
28
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
29
|
-
const argumentsTypes = ['u64', 'u64'] satisfies (string | null)[];
|
|
30
|
-
return (tx: Transaction) =>
|
|
31
|
-
tx.moveCall({
|
|
32
|
-
package: packageAddress,
|
|
33
|
-
module: 'math',
|
|
34
|
-
function: 'min',
|
|
35
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export interface DiffOptions {
|
|
39
|
-
package?: string;
|
|
40
|
-
arguments: [RawTransactionArgument<number | bigint>, RawTransactionArgument<number | bigint>];
|
|
41
|
-
}
|
|
42
|
-
export function diff(options: DiffOptions) {
|
|
43
|
-
const packageAddress =
|
|
44
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
45
|
-
const argumentsTypes = ['u64', 'u64'] satisfies (string | null)[];
|
|
46
|
-
return (tx: Transaction) =>
|
|
47
|
-
tx.moveCall({
|
|
48
|
-
package: packageAddress,
|
|
49
|
-
module: 'math',
|
|
50
|
-
function: 'diff',
|
|
51
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
export interface PowOptions {
|
|
55
|
-
package?: string;
|
|
56
|
-
arguments: [RawTransactionArgument<number | bigint>, RawTransactionArgument<number>];
|
|
57
|
-
}
|
|
58
|
-
export function pow(options: PowOptions) {
|
|
59
|
-
const packageAddress =
|
|
60
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
61
|
-
const argumentsTypes = ['u64', 'u8'] satisfies (string | null)[];
|
|
62
|
-
return (tx: Transaction) =>
|
|
63
|
-
tx.moveCall({
|
|
64
|
-
package: packageAddress,
|
|
65
|
-
module: 'math',
|
|
66
|
-
function: 'pow',
|
|
67
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
export interface SqrtOptions {
|
|
71
|
-
package?: string;
|
|
72
|
-
arguments: [RawTransactionArgument<number | bigint>];
|
|
73
|
-
}
|
|
74
|
-
export function sqrt(options: SqrtOptions) {
|
|
75
|
-
const packageAddress =
|
|
76
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
77
|
-
const argumentsTypes = ['u64'] satisfies (string | null)[];
|
|
78
|
-
return (tx: Transaction) =>
|
|
79
|
-
tx.moveCall({
|
|
80
|
-
package: packageAddress,
|
|
81
|
-
module: 'math',
|
|
82
|
-
function: 'sqrt',
|
|
83
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
export interface SqrtU128Options {
|
|
87
|
-
package?: string;
|
|
88
|
-
arguments: [RawTransactionArgument<number | bigint>];
|
|
89
|
-
}
|
|
90
|
-
export function sqrtU128(options: SqrtU128Options) {
|
|
91
|
-
const packageAddress =
|
|
92
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
93
|
-
const argumentsTypes = ['u128'] satisfies (string | null)[];
|
|
94
|
-
return (tx: Transaction) =>
|
|
95
|
-
tx.moveCall({
|
|
96
|
-
package: packageAddress,
|
|
97
|
-
module: 'math',
|
|
98
|
-
function: 'sqrt_u128',
|
|
99
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
export interface DivideAndRoundUpOptions {
|
|
103
|
-
package?: string;
|
|
104
|
-
arguments: [RawTransactionArgument<number | bigint>, RawTransactionArgument<number | bigint>];
|
|
105
|
-
}
|
|
106
|
-
export function divideAndRoundUp(options: DivideAndRoundUpOptions) {
|
|
107
|
-
const packageAddress =
|
|
108
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
109
|
-
const argumentsTypes = ['u64', 'u64'] satisfies (string | null)[];
|
|
110
|
-
return (tx: Transaction) =>
|
|
111
|
-
tx.moveCall({
|
|
112
|
-
package: packageAddress,
|
|
113
|
-
module: 'math',
|
|
114
|
-
function: 'divide_and_round_up',
|
|
115
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
116
|
-
});
|
|
117
|
-
}
|