@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,186 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
7
|
-
const $moduleName = '0x2::nitro_attestation';
|
|
8
|
-
export const PCREntry = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::PCREntry`,
|
|
10
|
-
fields: {
|
|
11
|
-
index: bcs.u8(),
|
|
12
|
-
value: bcs.vector(bcs.u8()),
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export const NitroAttestationDocument = new MoveStruct({
|
|
16
|
-
name: `${$moduleName}::NitroAttestationDocument`,
|
|
17
|
-
fields: {
|
|
18
|
-
module_id: bcs.vector(bcs.u8()),
|
|
19
|
-
timestamp: bcs.u64(),
|
|
20
|
-
digest: bcs.vector(bcs.u8()),
|
|
21
|
-
pcrs: bcs.vector(PCREntry),
|
|
22
|
-
public_key: bcs.option(bcs.vector(bcs.u8())),
|
|
23
|
-
user_data: bcs.option(bcs.vector(bcs.u8())),
|
|
24
|
-
nonce: bcs.option(bcs.vector(bcs.u8())),
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
export interface LoadNitroAttestationOptions {
|
|
28
|
-
package?: string;
|
|
29
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
30
|
-
}
|
|
31
|
-
export function loadNitroAttestation(options: LoadNitroAttestationOptions) {
|
|
32
|
-
const packageAddress =
|
|
33
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
34
|
-
const argumentsTypes = ['vector<u8>', '0x2::clock::Clock'] satisfies (string | null)[];
|
|
35
|
-
return (tx: Transaction) =>
|
|
36
|
-
tx.moveCall({
|
|
37
|
-
package: packageAddress,
|
|
38
|
-
module: 'nitro_attestation',
|
|
39
|
-
function: 'load_nitro_attestation',
|
|
40
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
export interface ModuleIdOptions {
|
|
44
|
-
package?: string;
|
|
45
|
-
arguments: [RawTransactionArgument<string>];
|
|
46
|
-
}
|
|
47
|
-
export function moduleId(options: ModuleIdOptions) {
|
|
48
|
-
const packageAddress =
|
|
49
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
50
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
51
|
-
return (tx: Transaction) =>
|
|
52
|
-
tx.moveCall({
|
|
53
|
-
package: packageAddress,
|
|
54
|
-
module: 'nitro_attestation',
|
|
55
|
-
function: 'module_id',
|
|
56
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
export interface TimestampOptions {
|
|
60
|
-
package?: string;
|
|
61
|
-
arguments: [RawTransactionArgument<string>];
|
|
62
|
-
}
|
|
63
|
-
export function timestamp(options: TimestampOptions) {
|
|
64
|
-
const packageAddress =
|
|
65
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
66
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
67
|
-
return (tx: Transaction) =>
|
|
68
|
-
tx.moveCall({
|
|
69
|
-
package: packageAddress,
|
|
70
|
-
module: 'nitro_attestation',
|
|
71
|
-
function: 'timestamp',
|
|
72
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
export interface DigestOptions {
|
|
76
|
-
package?: string;
|
|
77
|
-
arguments: [RawTransactionArgument<string>];
|
|
78
|
-
}
|
|
79
|
-
export function digest(options: DigestOptions) {
|
|
80
|
-
const packageAddress =
|
|
81
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
82
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
83
|
-
return (tx: Transaction) =>
|
|
84
|
-
tx.moveCall({
|
|
85
|
-
package: packageAddress,
|
|
86
|
-
module: 'nitro_attestation',
|
|
87
|
-
function: 'digest',
|
|
88
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
export interface PcrsOptions {
|
|
92
|
-
package?: string;
|
|
93
|
-
arguments: [RawTransactionArgument<string>];
|
|
94
|
-
}
|
|
95
|
-
export function pcrs(options: PcrsOptions) {
|
|
96
|
-
const packageAddress =
|
|
97
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
98
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
99
|
-
return (tx: Transaction) =>
|
|
100
|
-
tx.moveCall({
|
|
101
|
-
package: packageAddress,
|
|
102
|
-
module: 'nitro_attestation',
|
|
103
|
-
function: 'pcrs',
|
|
104
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
export interface PublicKeyOptions {
|
|
108
|
-
package?: string;
|
|
109
|
-
arguments: [RawTransactionArgument<string>];
|
|
110
|
-
}
|
|
111
|
-
export function publicKey(options: PublicKeyOptions) {
|
|
112
|
-
const packageAddress =
|
|
113
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
114
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
115
|
-
return (tx: Transaction) =>
|
|
116
|
-
tx.moveCall({
|
|
117
|
-
package: packageAddress,
|
|
118
|
-
module: 'nitro_attestation',
|
|
119
|
-
function: 'public_key',
|
|
120
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
export interface UserDataOptions {
|
|
124
|
-
package?: string;
|
|
125
|
-
arguments: [RawTransactionArgument<string>];
|
|
126
|
-
}
|
|
127
|
-
export function userData(options: UserDataOptions) {
|
|
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: 'nitro_attestation',
|
|
135
|
-
function: 'user_data',
|
|
136
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
export interface NonceOptions {
|
|
140
|
-
package?: string;
|
|
141
|
-
arguments: [RawTransactionArgument<string>];
|
|
142
|
-
}
|
|
143
|
-
export function nonce(options: NonceOptions) {
|
|
144
|
-
const packageAddress =
|
|
145
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
146
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
147
|
-
return (tx: Transaction) =>
|
|
148
|
-
tx.moveCall({
|
|
149
|
-
package: packageAddress,
|
|
150
|
-
module: 'nitro_attestation',
|
|
151
|
-
function: 'nonce',
|
|
152
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
export interface IndexOptions {
|
|
156
|
-
package?: string;
|
|
157
|
-
arguments: [RawTransactionArgument<string>];
|
|
158
|
-
}
|
|
159
|
-
export function index(options: IndexOptions) {
|
|
160
|
-
const packageAddress =
|
|
161
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
162
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
163
|
-
return (tx: Transaction) =>
|
|
164
|
-
tx.moveCall({
|
|
165
|
-
package: packageAddress,
|
|
166
|
-
module: 'nitro_attestation',
|
|
167
|
-
function: 'index',
|
|
168
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
export interface ValueOptions {
|
|
172
|
-
package?: string;
|
|
173
|
-
arguments: [RawTransactionArgument<string>];
|
|
174
|
-
}
|
|
175
|
-
export function value(options: ValueOptions) {
|
|
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: 'nitro_attestation',
|
|
183
|
-
function: 'value',
|
|
184
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
185
|
-
});
|
|
186
|
-
}
|
|
@@ -1,249 +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';
|
|
8
|
-
export const ID = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::ID`,
|
|
10
|
-
fields: {
|
|
11
|
-
bytes: bcs.Address,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
export const UID = new MoveStruct({
|
|
15
|
-
name: `${$moduleName}::UID`,
|
|
16
|
-
fields: {
|
|
17
|
-
id: bcs.Address,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
export interface IdToBytesOptions {
|
|
21
|
-
package?: string;
|
|
22
|
-
arguments: [RawTransactionArgument<string>];
|
|
23
|
-
}
|
|
24
|
-
export function idToBytes(options: IdToBytesOptions) {
|
|
25
|
-
const packageAddress =
|
|
26
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
27
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
28
|
-
return (tx: Transaction) =>
|
|
29
|
-
tx.moveCall({
|
|
30
|
-
package: packageAddress,
|
|
31
|
-
module: 'object',
|
|
32
|
-
function: 'id_to_bytes',
|
|
33
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
export interface IdToAddressOptions {
|
|
37
|
-
package?: string;
|
|
38
|
-
arguments: [RawTransactionArgument<string>];
|
|
39
|
-
}
|
|
40
|
-
export function idToAddress(options: IdToAddressOptions) {
|
|
41
|
-
const packageAddress =
|
|
42
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
43
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
44
|
-
return (tx: Transaction) =>
|
|
45
|
-
tx.moveCall({
|
|
46
|
-
package: packageAddress,
|
|
47
|
-
module: 'object',
|
|
48
|
-
function: 'id_to_address',
|
|
49
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
export interface IdFromBytesOptions {
|
|
53
|
-
package?: string;
|
|
54
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
55
|
-
}
|
|
56
|
-
export function idFromBytes(options: IdFromBytesOptions) {
|
|
57
|
-
const packageAddress =
|
|
58
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
59
|
-
const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
|
|
60
|
-
return (tx: Transaction) =>
|
|
61
|
-
tx.moveCall({
|
|
62
|
-
package: packageAddress,
|
|
63
|
-
module: 'object',
|
|
64
|
-
function: 'id_from_bytes',
|
|
65
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
export interface IdFromAddressOptions {
|
|
69
|
-
package?: string;
|
|
70
|
-
arguments: [RawTransactionArgument<string>];
|
|
71
|
-
}
|
|
72
|
-
export function idFromAddress(options: IdFromAddressOptions) {
|
|
73
|
-
const packageAddress =
|
|
74
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
75
|
-
const argumentsTypes = ['address'] satisfies (string | null)[];
|
|
76
|
-
return (tx: Transaction) =>
|
|
77
|
-
tx.moveCall({
|
|
78
|
-
package: packageAddress,
|
|
79
|
-
module: 'object',
|
|
80
|
-
function: 'id_from_address',
|
|
81
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
export interface UidAsInnerOptions {
|
|
85
|
-
package?: string;
|
|
86
|
-
arguments: [RawTransactionArgument<string>];
|
|
87
|
-
}
|
|
88
|
-
export function uidAsInner(options: UidAsInnerOptions) {
|
|
89
|
-
const packageAddress =
|
|
90
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
91
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
92
|
-
return (tx: Transaction) =>
|
|
93
|
-
tx.moveCall({
|
|
94
|
-
package: packageAddress,
|
|
95
|
-
module: 'object',
|
|
96
|
-
function: 'uid_as_inner',
|
|
97
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
export interface UidToInnerOptions {
|
|
101
|
-
package?: string;
|
|
102
|
-
arguments: [RawTransactionArgument<string>];
|
|
103
|
-
}
|
|
104
|
-
export function uidToInner(options: UidToInnerOptions) {
|
|
105
|
-
const packageAddress =
|
|
106
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
107
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
108
|
-
return (tx: Transaction) =>
|
|
109
|
-
tx.moveCall({
|
|
110
|
-
package: packageAddress,
|
|
111
|
-
module: 'object',
|
|
112
|
-
function: 'uid_to_inner',
|
|
113
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
export interface UidToBytesOptions {
|
|
117
|
-
package?: string;
|
|
118
|
-
arguments: [RawTransactionArgument<string>];
|
|
119
|
-
}
|
|
120
|
-
export function uidToBytes(options: UidToBytesOptions) {
|
|
121
|
-
const packageAddress =
|
|
122
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
123
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
124
|
-
return (tx: Transaction) =>
|
|
125
|
-
tx.moveCall({
|
|
126
|
-
package: packageAddress,
|
|
127
|
-
module: 'object',
|
|
128
|
-
function: 'uid_to_bytes',
|
|
129
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
export interface UidToAddressOptions {
|
|
133
|
-
package?: string;
|
|
134
|
-
arguments: [RawTransactionArgument<string>];
|
|
135
|
-
}
|
|
136
|
-
export function uidToAddress(options: UidToAddressOptions) {
|
|
137
|
-
const packageAddress =
|
|
138
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
139
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
140
|
-
return (tx: Transaction) =>
|
|
141
|
-
tx.moveCall({
|
|
142
|
-
package: packageAddress,
|
|
143
|
-
module: 'object',
|
|
144
|
-
function: 'uid_to_address',
|
|
145
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
export interface NewOptions {
|
|
149
|
-
package?: string;
|
|
150
|
-
arguments?: [];
|
|
151
|
-
}
|
|
152
|
-
export function _new(options: NewOptions = {}) {
|
|
153
|
-
const packageAddress =
|
|
154
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
155
|
-
return (tx: Transaction) =>
|
|
156
|
-
tx.moveCall({
|
|
157
|
-
package: packageAddress,
|
|
158
|
-
module: 'object',
|
|
159
|
-
function: 'new',
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
export interface DeleteOptions {
|
|
163
|
-
package?: string;
|
|
164
|
-
arguments: [RawTransactionArgument<string>];
|
|
165
|
-
}
|
|
166
|
-
export function _delete(options: DeleteOptions) {
|
|
167
|
-
const packageAddress =
|
|
168
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
169
|
-
const argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];
|
|
170
|
-
return (tx: Transaction) =>
|
|
171
|
-
tx.moveCall({
|
|
172
|
-
package: packageAddress,
|
|
173
|
-
module: 'object',
|
|
174
|
-
function: 'delete',
|
|
175
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
export interface IdOptions<T0 extends BcsType<any>> {
|
|
179
|
-
package?: string;
|
|
180
|
-
arguments: [RawTransactionArgument<T0>];
|
|
181
|
-
typeArguments: [string];
|
|
182
|
-
}
|
|
183
|
-
export function id<T0 extends BcsType<any>>(options: IdOptions<T0>) {
|
|
184
|
-
const packageAddress =
|
|
185
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
186
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
187
|
-
return (tx: Transaction) =>
|
|
188
|
-
tx.moveCall({
|
|
189
|
-
package: packageAddress,
|
|
190
|
-
module: 'object',
|
|
191
|
-
function: 'id',
|
|
192
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
193
|
-
typeArguments: options.typeArguments,
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
export interface BorrowIdOptions<T0 extends BcsType<any>> {
|
|
197
|
-
package?: string;
|
|
198
|
-
arguments: [RawTransactionArgument<T0>];
|
|
199
|
-
typeArguments: [string];
|
|
200
|
-
}
|
|
201
|
-
export function borrowId<T0 extends BcsType<any>>(options: BorrowIdOptions<T0>) {
|
|
202
|
-
const packageAddress =
|
|
203
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
204
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
205
|
-
return (tx: Transaction) =>
|
|
206
|
-
tx.moveCall({
|
|
207
|
-
package: packageAddress,
|
|
208
|
-
module: 'object',
|
|
209
|
-
function: 'borrow_id',
|
|
210
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
211
|
-
typeArguments: options.typeArguments,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
export interface IdBytesOptions<T0 extends BcsType<any>> {
|
|
215
|
-
package?: string;
|
|
216
|
-
arguments: [RawTransactionArgument<T0>];
|
|
217
|
-
typeArguments: [string];
|
|
218
|
-
}
|
|
219
|
-
export function idBytes<T0 extends BcsType<any>>(options: IdBytesOptions<T0>) {
|
|
220
|
-
const packageAddress =
|
|
221
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
222
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
223
|
-
return (tx: Transaction) =>
|
|
224
|
-
tx.moveCall({
|
|
225
|
-
package: packageAddress,
|
|
226
|
-
module: 'object',
|
|
227
|
-
function: 'id_bytes',
|
|
228
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
229
|
-
typeArguments: options.typeArguments,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
export interface IdAddressOptions<T0 extends BcsType<any>> {
|
|
233
|
-
package?: string;
|
|
234
|
-
arguments: [RawTransactionArgument<T0>];
|
|
235
|
-
typeArguments: [string];
|
|
236
|
-
}
|
|
237
|
-
export function idAddress<T0 extends BcsType<any>>(options: IdAddressOptions<T0>) {
|
|
238
|
-
const packageAddress =
|
|
239
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
240
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
241
|
-
return (tx: Transaction) =>
|
|
242
|
-
tx.moveCall({
|
|
243
|
-
package: packageAddress,
|
|
244
|
-
module: 'object',
|
|
245
|
-
function: 'id_address',
|
|
246
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
247
|
-
typeArguments: options.typeArguments,
|
|
248
|
-
});
|
|
249
|
-
}
|
|
@@ -1,210 +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_bag';
|
|
8
|
-
export const ObjectBag = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::ObjectBag`,
|
|
10
|
-
fields: {
|
|
11
|
-
id: bcs.Address,
|
|
12
|
-
size: bcs.u64(),
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export interface NewOptions {
|
|
16
|
-
package?: string;
|
|
17
|
-
arguments?: [];
|
|
18
|
-
}
|
|
19
|
-
export function _new(options: NewOptions = {}) {
|
|
20
|
-
const packageAddress =
|
|
21
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
22
|
-
return (tx: Transaction) =>
|
|
23
|
-
tx.moveCall({
|
|
24
|
-
package: packageAddress,
|
|
25
|
-
module: 'object_bag',
|
|
26
|
-
function: 'new',
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
export interface AddOptions<T0 extends BcsType<any>, T1 extends BcsType<any>> {
|
|
30
|
-
package?: string;
|
|
31
|
-
arguments: [
|
|
32
|
-
RawTransactionArgument<string>,
|
|
33
|
-
RawTransactionArgument<T0>,
|
|
34
|
-
RawTransactionArgument<T1>,
|
|
35
|
-
];
|
|
36
|
-
typeArguments: [string, string];
|
|
37
|
-
}
|
|
38
|
-
export function add<T0 extends BcsType<any>, T1 extends BcsType<any>>(options: AddOptions<T0, T1>) {
|
|
39
|
-
const packageAddress =
|
|
40
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
41
|
-
const argumentsTypes = [
|
|
42
|
-
null,
|
|
43
|
-
`${options.typeArguments[0]}`,
|
|
44
|
-
`${options.typeArguments[1]}`,
|
|
45
|
-
] satisfies (string | null)[];
|
|
46
|
-
return (tx: Transaction) =>
|
|
47
|
-
tx.moveCall({
|
|
48
|
-
package: packageAddress,
|
|
49
|
-
module: 'object_bag',
|
|
50
|
-
function: 'add',
|
|
51
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
52
|
-
typeArguments: options.typeArguments,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
export interface BorrowOptions<T0 extends BcsType<any>> {
|
|
56
|
-
package?: string;
|
|
57
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
58
|
-
typeArguments: [string, string];
|
|
59
|
-
}
|
|
60
|
-
export function borrow<T0 extends BcsType<any>>(options: BorrowOptions<T0>) {
|
|
61
|
-
const packageAddress =
|
|
62
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
63
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
64
|
-
return (tx: Transaction) =>
|
|
65
|
-
tx.moveCall({
|
|
66
|
-
package: packageAddress,
|
|
67
|
-
module: 'object_bag',
|
|
68
|
-
function: 'borrow',
|
|
69
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
70
|
-
typeArguments: options.typeArguments,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
export interface BorrowMutOptions<T0 extends BcsType<any>> {
|
|
74
|
-
package?: string;
|
|
75
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
76
|
-
typeArguments: [string, string];
|
|
77
|
-
}
|
|
78
|
-
export function borrowMut<T0 extends BcsType<any>>(options: BorrowMutOptions<T0>) {
|
|
79
|
-
const packageAddress =
|
|
80
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
81
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
82
|
-
return (tx: Transaction) =>
|
|
83
|
-
tx.moveCall({
|
|
84
|
-
package: packageAddress,
|
|
85
|
-
module: 'object_bag',
|
|
86
|
-
function: 'borrow_mut',
|
|
87
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
88
|
-
typeArguments: options.typeArguments,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
export interface RemoveOptions<T0 extends BcsType<any>> {
|
|
92
|
-
package?: string;
|
|
93
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
94
|
-
typeArguments: [string, string];
|
|
95
|
-
}
|
|
96
|
-
export function remove<T0 extends BcsType<any>>(options: RemoveOptions<T0>) {
|
|
97
|
-
const packageAddress =
|
|
98
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
99
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
100
|
-
return (tx: Transaction) =>
|
|
101
|
-
tx.moveCall({
|
|
102
|
-
package: packageAddress,
|
|
103
|
-
module: 'object_bag',
|
|
104
|
-
function: 'remove',
|
|
105
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
106
|
-
typeArguments: options.typeArguments,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
export interface ContainsOptions<T0 extends BcsType<any>> {
|
|
110
|
-
package?: string;
|
|
111
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
112
|
-
typeArguments: [string];
|
|
113
|
-
}
|
|
114
|
-
export function contains<T0 extends BcsType<any>>(options: ContainsOptions<T0>) {
|
|
115
|
-
const packageAddress =
|
|
116
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
117
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
118
|
-
return (tx: Transaction) =>
|
|
119
|
-
tx.moveCall({
|
|
120
|
-
package: packageAddress,
|
|
121
|
-
module: 'object_bag',
|
|
122
|
-
function: 'contains',
|
|
123
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
124
|
-
typeArguments: options.typeArguments,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
export interface ContainsWithTypeOptions<T0 extends BcsType<any>> {
|
|
128
|
-
package?: string;
|
|
129
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
130
|
-
typeArguments: [string, string];
|
|
131
|
-
}
|
|
132
|
-
export function containsWithType<T0 extends BcsType<any>>(options: ContainsWithTypeOptions<T0>) {
|
|
133
|
-
const packageAddress =
|
|
134
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
135
|
-
const argumentsTypes = [null, `${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
136
|
-
return (tx: Transaction) =>
|
|
137
|
-
tx.moveCall({
|
|
138
|
-
package: packageAddress,
|
|
139
|
-
module: 'object_bag',
|
|
140
|
-
function: 'contains_with_type',
|
|
141
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
142
|
-
typeArguments: options.typeArguments,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
export interface LengthOptions {
|
|
146
|
-
package?: string;
|
|
147
|
-
arguments: [RawTransactionArgument<string>];
|
|
148
|
-
}
|
|
149
|
-
export function length(options: LengthOptions) {
|
|
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: 'object_bag',
|
|
157
|
-
function: 'length',
|
|
158
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
export interface IsEmptyOptions {
|
|
162
|
-
package?: string;
|
|
163
|
-
arguments: [RawTransactionArgument<string>];
|
|
164
|
-
}
|
|
165
|
-
export function isEmpty(options: IsEmptyOptions) {
|
|
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: 'object_bag',
|
|
173
|
-
function: 'is_empty',
|
|
174
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
export interface DestroyEmptyOptions {
|
|
178
|
-
package?: string;
|
|
179
|
-
arguments: [RawTransactionArgument<string>];
|
|
180
|
-
}
|
|
181
|
-
export function destroyEmpty(options: DestroyEmptyOptions) {
|
|
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: 'object_bag',
|
|
189
|
-
function: 'destroy_empty',
|
|
190
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
export interface ValueIdOptions<T0 extends BcsType<any>> {
|
|
194
|
-
package?: string;
|
|
195
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
|
|
196
|
-
typeArguments: [string];
|
|
197
|
-
}
|
|
198
|
-
export function valueId<T0 extends BcsType<any>>(options: ValueIdOptions<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: 'object_bag',
|
|
206
|
-
function: 'value_id',
|
|
207
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
208
|
-
typeArguments: options.typeArguments,
|
|
209
|
-
});
|
|
210
|
-
}
|