@mysten/kiosk 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -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/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/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,216 +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::transfer';
|
|
8
|
-
export const Receiving = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::Receiving`,
|
|
10
|
-
fields: {
|
|
11
|
-
id: bcs.Address,
|
|
12
|
-
version: bcs.u64(),
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export interface TransferOptions<T0 extends BcsType<any>> {
|
|
16
|
-
package?: string;
|
|
17
|
-
arguments: [RawTransactionArgument<T0>, RawTransactionArgument<string>];
|
|
18
|
-
typeArguments: [string];
|
|
19
|
-
}
|
|
20
|
-
export function transfer<T0 extends BcsType<any>>(options: TransferOptions<T0>) {
|
|
21
|
-
const packageAddress =
|
|
22
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
23
|
-
const argumentsTypes = [`${options.typeArguments[0]}`, 'address'] satisfies (string | null)[];
|
|
24
|
-
return (tx: Transaction) =>
|
|
25
|
-
tx.moveCall({
|
|
26
|
-
package: packageAddress,
|
|
27
|
-
module: 'transfer',
|
|
28
|
-
function: 'transfer',
|
|
29
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
30
|
-
typeArguments: options.typeArguments,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
export interface PublicTransferOptions<T0 extends BcsType<any>> {
|
|
34
|
-
package?: string;
|
|
35
|
-
arguments: [RawTransactionArgument<T0>, RawTransactionArgument<string>];
|
|
36
|
-
typeArguments: [string];
|
|
37
|
-
}
|
|
38
|
-
export function publicTransfer<T0 extends BcsType<any>>(options: PublicTransferOptions<T0>) {
|
|
39
|
-
const packageAddress =
|
|
40
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
41
|
-
const argumentsTypes = [`${options.typeArguments[0]}`, 'address'] satisfies (string | null)[];
|
|
42
|
-
return (tx: Transaction) =>
|
|
43
|
-
tx.moveCall({
|
|
44
|
-
package: packageAddress,
|
|
45
|
-
module: 'transfer',
|
|
46
|
-
function: 'public_transfer',
|
|
47
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
48
|
-
typeArguments: options.typeArguments,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
export interface PartyTransferOptions<T0 extends BcsType<any>> {
|
|
52
|
-
package?: string;
|
|
53
|
-
arguments: [RawTransactionArgument<T0>, RawTransactionArgument<string>];
|
|
54
|
-
typeArguments: [string];
|
|
55
|
-
}
|
|
56
|
-
export function partyTransfer<T0 extends BcsType<any>>(options: PartyTransferOptions<T0>) {
|
|
57
|
-
const packageAddress =
|
|
58
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
59
|
-
const argumentsTypes = [`${options.typeArguments[0]}`, null] satisfies (string | null)[];
|
|
60
|
-
return (tx: Transaction) =>
|
|
61
|
-
tx.moveCall({
|
|
62
|
-
package: packageAddress,
|
|
63
|
-
module: 'transfer',
|
|
64
|
-
function: 'party_transfer',
|
|
65
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
66
|
-
typeArguments: options.typeArguments,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
export interface PublicPartyTransferOptions<T0 extends BcsType<any>> {
|
|
70
|
-
package?: string;
|
|
71
|
-
arguments: [RawTransactionArgument<T0>, RawTransactionArgument<string>];
|
|
72
|
-
typeArguments: [string];
|
|
73
|
-
}
|
|
74
|
-
export function publicPartyTransfer<T0 extends BcsType<any>>(
|
|
75
|
-
options: PublicPartyTransferOptions<T0>,
|
|
76
|
-
) {
|
|
77
|
-
const packageAddress =
|
|
78
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
79
|
-
const argumentsTypes = [`${options.typeArguments[0]}`, null] satisfies (string | null)[];
|
|
80
|
-
return (tx: Transaction) =>
|
|
81
|
-
tx.moveCall({
|
|
82
|
-
package: packageAddress,
|
|
83
|
-
module: 'transfer',
|
|
84
|
-
function: 'public_party_transfer',
|
|
85
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
86
|
-
typeArguments: options.typeArguments,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
export interface FreezeObjectOptions<T0 extends BcsType<any>> {
|
|
90
|
-
package?: string;
|
|
91
|
-
arguments: [RawTransactionArgument<T0>];
|
|
92
|
-
typeArguments: [string];
|
|
93
|
-
}
|
|
94
|
-
export function freezeObject<T0 extends BcsType<any>>(options: FreezeObjectOptions<T0>) {
|
|
95
|
-
const packageAddress =
|
|
96
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
97
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
98
|
-
return (tx: Transaction) =>
|
|
99
|
-
tx.moveCall({
|
|
100
|
-
package: packageAddress,
|
|
101
|
-
module: 'transfer',
|
|
102
|
-
function: 'freeze_object',
|
|
103
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
104
|
-
typeArguments: options.typeArguments,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
export interface PublicFreezeObjectOptions<T0 extends BcsType<any>> {
|
|
108
|
-
package?: string;
|
|
109
|
-
arguments: [RawTransactionArgument<T0>];
|
|
110
|
-
typeArguments: [string];
|
|
111
|
-
}
|
|
112
|
-
export function publicFreezeObject<T0 extends BcsType<any>>(
|
|
113
|
-
options: PublicFreezeObjectOptions<T0>,
|
|
114
|
-
) {
|
|
115
|
-
const packageAddress =
|
|
116
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
117
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
118
|
-
return (tx: Transaction) =>
|
|
119
|
-
tx.moveCall({
|
|
120
|
-
package: packageAddress,
|
|
121
|
-
module: 'transfer',
|
|
122
|
-
function: 'public_freeze_object',
|
|
123
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
124
|
-
typeArguments: options.typeArguments,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
export interface ShareObjectOptions<T0 extends BcsType<any>> {
|
|
128
|
-
package?: string;
|
|
129
|
-
arguments: [RawTransactionArgument<T0>];
|
|
130
|
-
typeArguments: [string];
|
|
131
|
-
}
|
|
132
|
-
export function shareObject<T0 extends BcsType<any>>(options: ShareObjectOptions<T0>) {
|
|
133
|
-
const packageAddress =
|
|
134
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
135
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
136
|
-
return (tx: Transaction) =>
|
|
137
|
-
tx.moveCall({
|
|
138
|
-
package: packageAddress,
|
|
139
|
-
module: 'transfer',
|
|
140
|
-
function: 'share_object',
|
|
141
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
142
|
-
typeArguments: options.typeArguments,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
export interface PublicShareObjectOptions<T0 extends BcsType<any>> {
|
|
146
|
-
package?: string;
|
|
147
|
-
arguments: [RawTransactionArgument<T0>];
|
|
148
|
-
typeArguments: [string];
|
|
149
|
-
}
|
|
150
|
-
export function publicShareObject<T0 extends BcsType<any>>(options: PublicShareObjectOptions<T0>) {
|
|
151
|
-
const packageAddress =
|
|
152
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
153
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
154
|
-
return (tx: Transaction) =>
|
|
155
|
-
tx.moveCall({
|
|
156
|
-
package: packageAddress,
|
|
157
|
-
module: 'transfer',
|
|
158
|
-
function: 'public_share_object',
|
|
159
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
160
|
-
typeArguments: options.typeArguments,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
export interface ReceiveOptions {
|
|
164
|
-
package?: string;
|
|
165
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
166
|
-
typeArguments: [string];
|
|
167
|
-
}
|
|
168
|
-
export function receive(options: ReceiveOptions) {
|
|
169
|
-
const packageAddress =
|
|
170
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
171
|
-
const argumentsTypes = ['0x2::object::ID', null] satisfies (string | null)[];
|
|
172
|
-
return (tx: Transaction) =>
|
|
173
|
-
tx.moveCall({
|
|
174
|
-
package: packageAddress,
|
|
175
|
-
module: 'transfer',
|
|
176
|
-
function: 'receive',
|
|
177
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
178
|
-
typeArguments: options.typeArguments,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
export interface PublicReceiveOptions {
|
|
182
|
-
package?: string;
|
|
183
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
184
|
-
typeArguments: [string];
|
|
185
|
-
}
|
|
186
|
-
export function publicReceive(options: PublicReceiveOptions) {
|
|
187
|
-
const packageAddress =
|
|
188
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
189
|
-
const argumentsTypes = ['0x2::object::ID', null] satisfies (string | null)[];
|
|
190
|
-
return (tx: Transaction) =>
|
|
191
|
-
tx.moveCall({
|
|
192
|
-
package: packageAddress,
|
|
193
|
-
module: 'transfer',
|
|
194
|
-
function: 'public_receive',
|
|
195
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
196
|
-
typeArguments: options.typeArguments,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
export interface ReceivingObjectIdOptions {
|
|
200
|
-
package?: string;
|
|
201
|
-
arguments: [RawTransactionArgument<string>];
|
|
202
|
-
typeArguments: [string];
|
|
203
|
-
}
|
|
204
|
-
export function receivingObjectId(options: ReceivingObjectIdOptions) {
|
|
205
|
-
const packageAddress =
|
|
206
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
207
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
208
|
-
return (tx: Transaction) =>
|
|
209
|
-
tx.moveCall({
|
|
210
|
-
package: packageAddress,
|
|
211
|
-
module: 'transfer',
|
|
212
|
-
function: 'receiving_object_id',
|
|
213
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
214
|
-
typeArguments: options.typeArguments,
|
|
215
|
-
});
|
|
216
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
import { MoveStruct } from '../utils/index.js';
|
|
5
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
7
|
-
const $moduleName = '0x2::tx_context';
|
|
8
|
-
export const TxContext = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::TxContext`,
|
|
10
|
-
fields: {
|
|
11
|
-
sender: bcs.Address,
|
|
12
|
-
tx_hash: bcs.vector(bcs.u8()),
|
|
13
|
-
epoch: bcs.u64(),
|
|
14
|
-
epoch_timestamp_ms: bcs.u64(),
|
|
15
|
-
ids_created: bcs.u64(),
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
export interface SenderOptions {
|
|
19
|
-
package?: string;
|
|
20
|
-
arguments?: [];
|
|
21
|
-
}
|
|
22
|
-
export function sender(options: SenderOptions = {}) {
|
|
23
|
-
const packageAddress =
|
|
24
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
25
|
-
return (tx: Transaction) =>
|
|
26
|
-
tx.moveCall({
|
|
27
|
-
package: packageAddress,
|
|
28
|
-
module: 'tx_context',
|
|
29
|
-
function: 'sender',
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export interface DigestOptions {
|
|
33
|
-
package?: string;
|
|
34
|
-
arguments?: [];
|
|
35
|
-
}
|
|
36
|
-
export function digest(options: DigestOptions = {}) {
|
|
37
|
-
const packageAddress =
|
|
38
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
39
|
-
return (tx: Transaction) =>
|
|
40
|
-
tx.moveCall({
|
|
41
|
-
package: packageAddress,
|
|
42
|
-
module: 'tx_context',
|
|
43
|
-
function: 'digest',
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export interface EpochOptions {
|
|
47
|
-
package?: string;
|
|
48
|
-
arguments?: [];
|
|
49
|
-
}
|
|
50
|
-
export function epoch(options: EpochOptions = {}) {
|
|
51
|
-
const packageAddress =
|
|
52
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
53
|
-
return (tx: Transaction) =>
|
|
54
|
-
tx.moveCall({
|
|
55
|
-
package: packageAddress,
|
|
56
|
-
module: 'tx_context',
|
|
57
|
-
function: 'epoch',
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
export interface EpochTimestampMsOptions {
|
|
61
|
-
package?: string;
|
|
62
|
-
arguments?: [];
|
|
63
|
-
}
|
|
64
|
-
export function epochTimestampMs(options: EpochTimestampMsOptions = {}) {
|
|
65
|
-
const packageAddress =
|
|
66
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
67
|
-
return (tx: Transaction) =>
|
|
68
|
-
tx.moveCall({
|
|
69
|
-
package: packageAddress,
|
|
70
|
-
module: 'tx_context',
|
|
71
|
-
function: 'epoch_timestamp_ms',
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
export interface SponsorOptions {
|
|
75
|
-
package?: string;
|
|
76
|
-
arguments?: [];
|
|
77
|
-
}
|
|
78
|
-
export function sponsor(options: SponsorOptions = {}) {
|
|
79
|
-
const packageAddress =
|
|
80
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
81
|
-
return (tx: Transaction) =>
|
|
82
|
-
tx.moveCall({
|
|
83
|
-
package: packageAddress,
|
|
84
|
-
module: 'tx_context',
|
|
85
|
-
function: 'sponsor',
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
export interface FreshObjectAddressOptions {
|
|
89
|
-
package?: string;
|
|
90
|
-
arguments?: [];
|
|
91
|
-
}
|
|
92
|
-
export function freshObjectAddress(options: FreshObjectAddressOptions = {}) {
|
|
93
|
-
const packageAddress =
|
|
94
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
95
|
-
return (tx: Transaction) =>
|
|
96
|
-
tx.moveCall({
|
|
97
|
-
package: packageAddress,
|
|
98
|
-
module: 'tx_context',
|
|
99
|
-
function: 'fresh_object_address',
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
export interface ReferenceGasPriceOptions {
|
|
103
|
-
package?: string;
|
|
104
|
-
arguments?: [];
|
|
105
|
-
}
|
|
106
|
-
export function referenceGasPrice(options: ReferenceGasPriceOptions = {}) {
|
|
107
|
-
const packageAddress =
|
|
108
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
109
|
-
return (tx: Transaction) =>
|
|
110
|
-
tx.moveCall({
|
|
111
|
-
package: packageAddress,
|
|
112
|
-
module: 'tx_context',
|
|
113
|
-
function: 'reference_gas_price',
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
export interface GasPriceOptions {
|
|
117
|
-
package?: string;
|
|
118
|
-
arguments?: [];
|
|
119
|
-
}
|
|
120
|
-
export function gasPrice(options: GasPriceOptions = {}) {
|
|
121
|
-
const packageAddress =
|
|
122
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
123
|
-
return (tx: Transaction) =>
|
|
124
|
-
tx.moveCall({
|
|
125
|
-
package: packageAddress,
|
|
126
|
-
module: 'tx_context',
|
|
127
|
-
function: 'gas_price',
|
|
128
|
-
});
|
|
129
|
-
}
|
|
@@ -1,24 +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
|
-
import { type BcsType } from '@mysten/sui/bcs';
|
|
7
|
-
export interface IsOneTimeWitnessOptions<T0 extends BcsType<any>> {
|
|
8
|
-
package?: string;
|
|
9
|
-
arguments: [RawTransactionArgument<T0>];
|
|
10
|
-
typeArguments: [string];
|
|
11
|
-
}
|
|
12
|
-
export function isOneTimeWitness<T0 extends BcsType<any>>(options: IsOneTimeWitnessOptions<T0>) {
|
|
13
|
-
const packageAddress =
|
|
14
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
15
|
-
const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
|
|
16
|
-
return (tx: Transaction) =>
|
|
17
|
-
tx.moveCall({
|
|
18
|
-
package: packageAddress,
|
|
19
|
-
module: 'types',
|
|
20
|
-
function: 'is_one_time_witness',
|
|
21
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
22
|
-
typeArguments: options.typeArguments,
|
|
23
|
-
});
|
|
24
|
-
}
|
package/src/contracts/0x2/url.ts
DELETED
|
@@ -1,77 +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::url';
|
|
8
|
-
export const Url = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::Url`,
|
|
10
|
-
fields: {
|
|
11
|
-
url: bcs.string(),
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
export interface NewUnsafeOptions {
|
|
15
|
-
package?: string;
|
|
16
|
-
arguments: [RawTransactionArgument<string>];
|
|
17
|
-
}
|
|
18
|
-
export function newUnsafe(options: NewUnsafeOptions) {
|
|
19
|
-
const packageAddress =
|
|
20
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
21
|
-
const argumentsTypes = ['0x1::string::String'] satisfies (string | null)[];
|
|
22
|
-
return (tx: Transaction) =>
|
|
23
|
-
tx.moveCall({
|
|
24
|
-
package: packageAddress,
|
|
25
|
-
module: 'url',
|
|
26
|
-
function: 'new_unsafe',
|
|
27
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
export interface NewUnsafeFromBytesOptions {
|
|
31
|
-
package?: string;
|
|
32
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
33
|
-
}
|
|
34
|
-
export function newUnsafeFromBytes(options: NewUnsafeFromBytesOptions) {
|
|
35
|
-
const packageAddress =
|
|
36
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
37
|
-
const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
|
|
38
|
-
return (tx: Transaction) =>
|
|
39
|
-
tx.moveCall({
|
|
40
|
-
package: packageAddress,
|
|
41
|
-
module: 'url',
|
|
42
|
-
function: 'new_unsafe_from_bytes',
|
|
43
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export interface InnerUrlOptions {
|
|
47
|
-
package?: string;
|
|
48
|
-
arguments: [RawTransactionArgument<string>];
|
|
49
|
-
}
|
|
50
|
-
export function innerUrl(options: InnerUrlOptions) {
|
|
51
|
-
const packageAddress =
|
|
52
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
53
|
-
const argumentsTypes = [null] satisfies (string | null)[];
|
|
54
|
-
return (tx: Transaction) =>
|
|
55
|
-
tx.moveCall({
|
|
56
|
-
package: packageAddress,
|
|
57
|
-
module: 'url',
|
|
58
|
-
function: 'inner_url',
|
|
59
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
export interface UpdateOptions {
|
|
63
|
-
package?: string;
|
|
64
|
-
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
65
|
-
}
|
|
66
|
-
export function update(options: UpdateOptions) {
|
|
67
|
-
const packageAddress =
|
|
68
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
69
|
-
const argumentsTypes = [null, '0x1::string::String'] satisfies (string | null)[];
|
|
70
|
-
return (tx: Transaction) =>
|
|
71
|
-
tx.moveCall({
|
|
72
|
-
package: packageAddress,
|
|
73
|
-
module: 'url',
|
|
74
|
-
function: 'update',
|
|
75
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
76
|
-
});
|
|
77
|
-
}
|
package/src/contracts/0x2/vdf.ts
DELETED
|
@@ -1,45 +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 HashToInputOptions {
|
|
7
|
-
package?: string;
|
|
8
|
-
arguments: [RawTransactionArgument<number[]>];
|
|
9
|
-
}
|
|
10
|
-
export function hashToInput(options: HashToInputOptions) {
|
|
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: 'vdf',
|
|
18
|
-
function: 'hash_to_input',
|
|
19
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export interface VdfVerifyOptions {
|
|
23
|
-
package?: string;
|
|
24
|
-
arguments: [
|
|
25
|
-
RawTransactionArgument<number[]>,
|
|
26
|
-
RawTransactionArgument<number[]>,
|
|
27
|
-
RawTransactionArgument<number[]>,
|
|
28
|
-
RawTransactionArgument<number | bigint>,
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
export function vdfVerify(options: VdfVerifyOptions) {
|
|
32
|
-
const packageAddress =
|
|
33
|
-
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
34
|
-
const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'u64'] satisfies (
|
|
35
|
-
| string
|
|
36
|
-
| null
|
|
37
|
-
)[];
|
|
38
|
-
return (tx: Transaction) =>
|
|
39
|
-
tx.moveCall({
|
|
40
|
-
package: packageAddress,
|
|
41
|
-
module: 'vdf',
|
|
42
|
-
function: 'vdf_verify',
|
|
43
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
44
|
-
});
|
|
45
|
-
}
|