@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.
Files changed (74) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/contracts/0x2/bag.mjs.map +1 -1
  3. package/dist/contracts/0x2/balance.mjs +1 -5
  4. package/dist/contracts/0x2/balance.mjs.map +1 -1
  5. package/dist/contracts/0x2/kiosk.mjs +4 -4
  6. package/dist/contracts/0x2/kiosk.mjs.map +1 -1
  7. package/dist/contracts/0x2/kiosk_extension.mjs +1 -1
  8. package/dist/contracts/0x2/kiosk_extension.mjs.map +1 -1
  9. package/dist/contracts/0x2/transfer_policy.mjs +6 -6
  10. package/dist/contracts/0x2/transfer_policy.mjs.map +1 -1
  11. package/dist/contracts/0x2/vec_set.mjs.map +1 -1
  12. package/package.json +8 -7
  13. package/src/contracts/0x2/bag.ts +2 -181
  14. package/src/contracts/0x2/balance.ts +3 -260
  15. package/src/contracts/0x2/kiosk.ts +4 -4
  16. package/src/contracts/0x2/kiosk_extension.ts +1 -1
  17. package/src/contracts/0x2/transfer_policy.ts +6 -6
  18. package/src/contracts/0x2/vec_set.ts +1 -198
  19. package/src/contracts/kiosk/witness_rule.ts +1 -1
  20. package/src/contracts/0x2/accumulator.ts +0 -24
  21. package/src/contracts/0x2/accumulator_metadata.ts +0 -38
  22. package/src/contracts/0x2/accumulator_settlement.ts +0 -14
  23. package/src/contracts/0x2/address.ts +0 -145
  24. package/src/contracts/0x2/address_alias.ts +0 -92
  25. package/src/contracts/0x2/authenticator_state.ts +0 -44
  26. package/src/contracts/0x2/bcs.ts +0 -495
  27. package/src/contracts/0x2/bls12381.ts +0 -717
  28. package/src/contracts/0x2/borrow.ts +0 -99
  29. package/src/contracts/0x2/clock.ts +0 -30
  30. package/src/contracts/0x2/coin.ts +0 -977
  31. package/src/contracts/0x2/coin_registry.ts +0 -874
  32. package/src/contracts/0x2/config.ts +0 -30
  33. package/src/contracts/0x2/deny_list.ts +0 -55
  34. package/src/contracts/0x2/derived_object.ts +0 -95
  35. package/src/contracts/0x2/display.ts +0 -258
  36. package/src/contracts/0x2/dynamic_field.ts +0 -171
  37. package/src/contracts/0x2/dynamic_object_field.ts +0 -167
  38. package/src/contracts/0x2/ecdsa_k1.ts +0 -65
  39. package/src/contracts/0x2/ecdsa_r1.ts +0 -49
  40. package/src/contracts/0x2/ecvrf.ts +0 -29
  41. package/src/contracts/0x2/ed25519.ts +0 -25
  42. package/src/contracts/0x2/event.ts +0 -42
  43. package/src/contracts/0x2/funds_accumulator.ts +0 -86
  44. package/src/contracts/0x2/groth16.ts +0 -171
  45. package/src/contracts/0x2/group_ops.ts +0 -49
  46. package/src/contracts/0x2/hash.ts +0 -37
  47. package/src/contracts/0x2/hex.ts +0 -37
  48. package/src/contracts/0x2/hmac.ts +0 -21
  49. package/src/contracts/0x2/linked_table.ts +0 -354
  50. package/src/contracts/0x2/math.ts +0 -117
  51. package/src/contracts/0x2/nitro_attestation.ts +0 -186
  52. package/src/contracts/0x2/object.ts +0 -249
  53. package/src/contracts/0x2/object_bag.ts +0 -210
  54. package/src/contracts/0x2/object_table.ts +0 -200
  55. package/src/contracts/0x2/package.ts +0 -414
  56. package/src/contracts/0x2/party.ts +0 -37
  57. package/src/contracts/0x2/pay.ts +0 -153
  58. package/src/contracts/0x2/poseidon.ts +0 -21
  59. package/src/contracts/0x2/priority_queue.ts +0 -139
  60. package/src/contracts/0x2/random.ts +0 -294
  61. package/src/contracts/0x2/sui.ts +0 -29
  62. package/src/contracts/0x2/table.ts +0 -200
  63. package/src/contracts/0x2/table_vec.ts +0 -232
  64. package/src/contracts/0x2/token.ts +0 -873
  65. package/src/contracts/0x2/transfer.ts +0 -216
  66. package/src/contracts/0x2/tx_context.ts +0 -129
  67. package/src/contracts/0x2/types.ts +0 -24
  68. package/src/contracts/0x2/url.ts +0 -77
  69. package/src/contracts/0x2/vdf.ts +0 -45
  70. package/src/contracts/0x2/vec_map.ts +0 -401
  71. package/src/contracts/0x2/versioned.ts +0 -153
  72. package/src/contracts/0x2/zklogin_verified_id.ts +0 -172
  73. package/src/contracts/0x2/zklogin_verified_issuer.ts +0 -99
  74. package/src/contracts/kiosk/deps/sui/object.ts +0 -15
@@ -1,167 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { type BcsType } 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::dynamic_object_field';
8
- export function Wrapper<T0 extends BcsType<any>>(...typeParameters: [T0]) {
9
- return new MoveStruct({
10
- name: `${$moduleName}::Wrapper<${typeParameters[0].name as T0['name']}>`,
11
- fields: {
12
- name: typeParameters[0],
13
- },
14
- });
15
- }
16
- export interface AddOptions<T0 extends BcsType<any>, T1 extends BcsType<any>> {
17
- package?: string;
18
- arguments: [
19
- RawTransactionArgument<string>,
20
- RawTransactionArgument<T0>,
21
- RawTransactionArgument<T1>,
22
- ];
23
- typeArguments: [string, string];
24
- }
25
- export function add<T0 extends BcsType<any>, T1 extends BcsType<any>>(options: AddOptions<T0, T1>) {
26
- const packageAddress =
27
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
28
- const argumentsTypes = [
29
- '0x2::object::ID',
30
- `${options.typeArguments[0]}`,
31
- `${options.typeArguments[1]}`,
32
- ] satisfies (string | null)[];
33
- return (tx: Transaction) =>
34
- tx.moveCall({
35
- package: packageAddress,
36
- module: 'dynamic_object_field',
37
- function: 'add',
38
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
39
- typeArguments: options.typeArguments,
40
- });
41
- }
42
- export interface BorrowOptions<T0 extends BcsType<any>> {
43
- package?: string;
44
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
45
- typeArguments: [string, string];
46
- }
47
- export function borrow<T0 extends BcsType<any>>(options: BorrowOptions<T0>) {
48
- const packageAddress =
49
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
50
- const argumentsTypes = ['0x2::object::ID', `${options.typeArguments[0]}`] satisfies (
51
- | string
52
- | null
53
- )[];
54
- return (tx: Transaction) =>
55
- tx.moveCall({
56
- package: packageAddress,
57
- module: 'dynamic_object_field',
58
- function: 'borrow',
59
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
60
- typeArguments: options.typeArguments,
61
- });
62
- }
63
- export interface BorrowMutOptions<T0 extends BcsType<any>> {
64
- package?: string;
65
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
66
- typeArguments: [string, string];
67
- }
68
- export function borrowMut<T0 extends BcsType<any>>(options: BorrowMutOptions<T0>) {
69
- const packageAddress =
70
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
71
- const argumentsTypes = ['0x2::object::ID', `${options.typeArguments[0]}`] satisfies (
72
- | string
73
- | null
74
- )[];
75
- return (tx: Transaction) =>
76
- tx.moveCall({
77
- package: packageAddress,
78
- module: 'dynamic_object_field',
79
- function: 'borrow_mut',
80
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
81
- typeArguments: options.typeArguments,
82
- });
83
- }
84
- export interface RemoveOptions<T0 extends BcsType<any>> {
85
- package?: string;
86
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
87
- typeArguments: [string, string];
88
- }
89
- export function remove<T0 extends BcsType<any>>(options: RemoveOptions<T0>) {
90
- const packageAddress =
91
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
92
- const argumentsTypes = ['0x2::object::ID', `${options.typeArguments[0]}`] satisfies (
93
- | string
94
- | null
95
- )[];
96
- return (tx: Transaction) =>
97
- tx.moveCall({
98
- package: packageAddress,
99
- module: 'dynamic_object_field',
100
- function: 'remove',
101
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
102
- typeArguments: options.typeArguments,
103
- });
104
- }
105
- export interface Exists_Options<T0 extends BcsType<any>> {
106
- package?: string;
107
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
108
- typeArguments: [string];
109
- }
110
- export function exists_<T0 extends BcsType<any>>(options: Exists_Options<T0>) {
111
- const packageAddress =
112
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
113
- const argumentsTypes = ['0x2::object::ID', `${options.typeArguments[0]}`] satisfies (
114
- | string
115
- | null
116
- )[];
117
- return (tx: Transaction) =>
118
- tx.moveCall({
119
- package: packageAddress,
120
- module: 'dynamic_object_field',
121
- function: 'exists_',
122
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
123
- typeArguments: options.typeArguments,
124
- });
125
- }
126
- export interface ExistsWithTypeOptions<T0 extends BcsType<any>> {
127
- package?: string;
128
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
129
- typeArguments: [string, string];
130
- }
131
- export function existsWithType<T0 extends BcsType<any>>(options: ExistsWithTypeOptions<T0>) {
132
- const packageAddress =
133
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
134
- const argumentsTypes = ['0x2::object::ID', `${options.typeArguments[0]}`] satisfies (
135
- | string
136
- | null
137
- )[];
138
- return (tx: Transaction) =>
139
- tx.moveCall({
140
- package: packageAddress,
141
- module: 'dynamic_object_field',
142
- function: 'exists_with_type',
143
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
144
- typeArguments: options.typeArguments,
145
- });
146
- }
147
- export interface IdOptions<T0 extends BcsType<any>> {
148
- package?: string;
149
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<T0>];
150
- typeArguments: [string];
151
- }
152
- export function id<T0 extends BcsType<any>>(options: IdOptions<T0>) {
153
- const packageAddress =
154
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
155
- const argumentsTypes = ['0x2::object::ID', `${options.typeArguments[0]}`] satisfies (
156
- | string
157
- | null
158
- )[];
159
- return (tx: Transaction) =>
160
- tx.moveCall({
161
- package: packageAddress,
162
- module: 'dynamic_object_field',
163
- function: 'id',
164
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
165
- typeArguments: options.typeArguments,
166
- });
167
- }
@@ -1,65 +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 Secp256k1EcrecoverOptions {
7
- package?: string;
8
- arguments: [
9
- RawTransactionArgument<number[]>,
10
- RawTransactionArgument<number[]>,
11
- RawTransactionArgument<number>,
12
- ];
13
- }
14
- export function secp256k1Ecrecover(options: Secp256k1EcrecoverOptions) {
15
- const packageAddress =
16
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
17
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'u8'] satisfies (string | null)[];
18
- return (tx: Transaction) =>
19
- tx.moveCall({
20
- package: packageAddress,
21
- module: 'ecdsa_k1',
22
- function: 'secp256k1_ecrecover',
23
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
24
- });
25
- }
26
- export interface DecompressPubkeyOptions {
27
- package?: string;
28
- arguments: [RawTransactionArgument<number[]>];
29
- }
30
- export function decompressPubkey(options: DecompressPubkeyOptions) {
31
- const packageAddress =
32
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
33
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
34
- return (tx: Transaction) =>
35
- tx.moveCall({
36
- package: packageAddress,
37
- module: 'ecdsa_k1',
38
- function: 'decompress_pubkey',
39
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
40
- });
41
- }
42
- export interface Secp256k1VerifyOptions {
43
- package?: string;
44
- arguments: [
45
- RawTransactionArgument<number[]>,
46
- RawTransactionArgument<number[]>,
47
- RawTransactionArgument<number[]>,
48
- RawTransactionArgument<number>,
49
- ];
50
- }
51
- export function secp256k1Verify(options: Secp256k1VerifyOptions) {
52
- const packageAddress =
53
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
54
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'u8'] satisfies (
55
- | string
56
- | null
57
- )[];
58
- return (tx: Transaction) =>
59
- tx.moveCall({
60
- package: packageAddress,
61
- module: 'ecdsa_k1',
62
- function: 'secp256k1_verify',
63
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
64
- });
65
- }
@@ -1,49 +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 Secp256r1EcrecoverOptions {
7
- package?: string;
8
- arguments: [
9
- RawTransactionArgument<number[]>,
10
- RawTransactionArgument<number[]>,
11
- RawTransactionArgument<number>,
12
- ];
13
- }
14
- export function secp256r1Ecrecover(options: Secp256r1EcrecoverOptions) {
15
- const packageAddress =
16
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
17
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'u8'] satisfies (string | null)[];
18
- return (tx: Transaction) =>
19
- tx.moveCall({
20
- package: packageAddress,
21
- module: 'ecdsa_r1',
22
- function: 'secp256r1_ecrecover',
23
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
24
- });
25
- }
26
- export interface Secp256r1VerifyOptions {
27
- package?: string;
28
- arguments: [
29
- RawTransactionArgument<number[]>,
30
- RawTransactionArgument<number[]>,
31
- RawTransactionArgument<number[]>,
32
- RawTransactionArgument<number>,
33
- ];
34
- }
35
- export function secp256r1Verify(options: Secp256r1VerifyOptions) {
36
- const packageAddress =
37
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
38
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'u8'] satisfies (
39
- | string
40
- | null
41
- )[];
42
- return (tx: Transaction) =>
43
- tx.moveCall({
44
- package: packageAddress,
45
- module: 'ecdsa_r1',
46
- function: 'secp256r1_verify',
47
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
48
- });
49
- }
@@ -1,29 +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 EcvrfVerifyOptions {
7
- package?: string;
8
- arguments: [
9
- RawTransactionArgument<number[]>,
10
- RawTransactionArgument<number[]>,
11
- RawTransactionArgument<number[]>,
12
- RawTransactionArgument<number[]>,
13
- ];
14
- }
15
- export function ecvrfVerify(options: EcvrfVerifyOptions) {
16
- const packageAddress =
17
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
18
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'vector<u8>'] satisfies (
19
- | string
20
- | null
21
- )[];
22
- return (tx: Transaction) =>
23
- tx.moveCall({
24
- package: packageAddress,
25
- module: 'ecvrf',
26
- function: 'ecvrf_verify',
27
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
28
- });
29
- }
@@ -1,25 +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 Ed25519VerifyOptions {
7
- package?: string;
8
- arguments: [
9
- RawTransactionArgument<number[]>,
10
- RawTransactionArgument<number[]>,
11
- RawTransactionArgument<number[]>,
12
- ];
13
- }
14
- export function ed25519Verify(options: Ed25519VerifyOptions) {
15
- const packageAddress =
16
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
17
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>'] satisfies (string | null)[];
18
- return (tx: Transaction) =>
19
- tx.moveCall({
20
- package: packageAddress,
21
- module: 'ed25519',
22
- function: 'ed25519_verify',
23
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
24
- });
25
- }
@@ -1,42 +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 EmitOptions<T0 extends BcsType<any>> {
8
- package?: string;
9
- arguments: [RawTransactionArgument<T0>];
10
- typeArguments: [string];
11
- }
12
- export function emit<T0 extends BcsType<any>>(options: EmitOptions<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: 'event',
20
- function: 'emit',
21
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
22
- typeArguments: options.typeArguments,
23
- });
24
- }
25
- export interface EmitAuthenticatedOptions<T0 extends BcsType<any>> {
26
- package?: string;
27
- arguments: [RawTransactionArgument<T0>];
28
- typeArguments: [string];
29
- }
30
- export function emitAuthenticated<T0 extends BcsType<any>>(options: EmitAuthenticatedOptions<T0>) {
31
- const packageAddress =
32
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
33
- const argumentsTypes = [`${options.typeArguments[0]}`] satisfies (string | null)[];
34
- return (tx: Transaction) =>
35
- tx.moveCall({
36
- package: packageAddress,
37
- module: 'event',
38
- function: 'emit_authenticated',
39
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
40
- typeArguments: options.typeArguments,
41
- });
42
- }
@@ -1,86 +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::funds_accumulator';
8
- export const Withdrawal = new MoveStruct({
9
- name: `${$moduleName}::Withdrawal`,
10
- fields: {
11
- owner: bcs.Address,
12
- limit: bcs.u256(),
13
- },
14
- });
15
- export interface WithdrawalOwnerOptions {
16
- package?: string;
17
- arguments: [RawTransactionArgument<string>];
18
- typeArguments: [string];
19
- }
20
- export function withdrawalOwner(options: WithdrawalOwnerOptions) {
21
- const packageAddress =
22
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
23
- const argumentsTypes = [null] satisfies (string | null)[];
24
- return (tx: Transaction) =>
25
- tx.moveCall({
26
- package: packageAddress,
27
- module: 'funds_accumulator',
28
- function: 'withdrawal_owner',
29
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
30
- typeArguments: options.typeArguments,
31
- });
32
- }
33
- export interface WithdrawalLimitOptions {
34
- package?: string;
35
- arguments: [RawTransactionArgument<string>];
36
- typeArguments: [string];
37
- }
38
- export function withdrawalLimit(options: WithdrawalLimitOptions) {
39
- const packageAddress =
40
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
41
- const argumentsTypes = [null] satisfies (string | null)[];
42
- return (tx: Transaction) =>
43
- tx.moveCall({
44
- package: packageAddress,
45
- module: 'funds_accumulator',
46
- function: 'withdrawal_limit',
47
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
48
- typeArguments: options.typeArguments,
49
- });
50
- }
51
- export interface WithdrawalSplitOptions {
52
- package?: string;
53
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number | bigint>];
54
- typeArguments: [string];
55
- }
56
- export function withdrawalSplit(options: WithdrawalSplitOptions) {
57
- const packageAddress =
58
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
59
- const argumentsTypes = [null, 'u256'] satisfies (string | null)[];
60
- return (tx: Transaction) =>
61
- tx.moveCall({
62
- package: packageAddress,
63
- module: 'funds_accumulator',
64
- function: 'withdrawal_split',
65
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
66
- typeArguments: options.typeArguments,
67
- });
68
- }
69
- export interface WithdrawalJoinOptions {
70
- package?: string;
71
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
72
- typeArguments: [string];
73
- }
74
- export function withdrawalJoin(options: WithdrawalJoinOptions) {
75
- const packageAddress =
76
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
77
- const argumentsTypes = [null, null] satisfies (string | null)[];
78
- return (tx: Transaction) =>
79
- tx.moveCall({
80
- package: packageAddress,
81
- module: 'funds_accumulator',
82
- function: 'withdrawal_join',
83
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
84
- typeArguments: options.typeArguments,
85
- });
86
- }
@@ -1,171 +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::groth16';
8
- export const Curve = new MoveStruct({
9
- name: `${$moduleName}::Curve`,
10
- fields: {
11
- id: bcs.u8(),
12
- },
13
- });
14
- export const PreparedVerifyingKey = new MoveStruct({
15
- name: `${$moduleName}::PreparedVerifyingKey`,
16
- fields: {
17
- vk_gamma_abc_g1_bytes: bcs.vector(bcs.u8()),
18
- alpha_g1_beta_g2_bytes: bcs.vector(bcs.u8()),
19
- gamma_g2_neg_pc_bytes: bcs.vector(bcs.u8()),
20
- delta_g2_neg_pc_bytes: bcs.vector(bcs.u8()),
21
- },
22
- });
23
- export const PublicProofInputs = new MoveStruct({
24
- name: `${$moduleName}::PublicProofInputs`,
25
- fields: {
26
- bytes: bcs.vector(bcs.u8()),
27
- },
28
- });
29
- export const ProofPoints = new MoveStruct({
30
- name: `${$moduleName}::ProofPoints`,
31
- fields: {
32
- bytes: bcs.vector(bcs.u8()),
33
- },
34
- });
35
- export interface Bls12381Options {
36
- package?: string;
37
- arguments?: [];
38
- }
39
- export function bls12381(options: Bls12381Options = {}) {
40
- const packageAddress =
41
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
42
- return (tx: Transaction) =>
43
- tx.moveCall({
44
- package: packageAddress,
45
- module: 'groth16',
46
- function: 'bls12381',
47
- });
48
- }
49
- export interface Bn254Options {
50
- package?: string;
51
- arguments?: [];
52
- }
53
- export function bn254(options: Bn254Options = {}) {
54
- const packageAddress =
55
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
56
- return (tx: Transaction) =>
57
- tx.moveCall({
58
- package: packageAddress,
59
- module: 'groth16',
60
- function: 'bn254',
61
- });
62
- }
63
- export interface PvkFromBytesOptions {
64
- package?: string;
65
- arguments: [
66
- RawTransactionArgument<number[]>,
67
- RawTransactionArgument<number[]>,
68
- RawTransactionArgument<number[]>,
69
- RawTransactionArgument<number[]>,
70
- ];
71
- }
72
- export function pvkFromBytes(options: PvkFromBytesOptions) {
73
- const packageAddress =
74
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
75
- const argumentsTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'vector<u8>'] satisfies (
76
- | string
77
- | null
78
- )[];
79
- return (tx: Transaction) =>
80
- tx.moveCall({
81
- package: packageAddress,
82
- module: 'groth16',
83
- function: 'pvk_from_bytes',
84
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
85
- });
86
- }
87
- export interface PvkToBytesOptions {
88
- package?: string;
89
- arguments: [RawTransactionArgument<string>];
90
- }
91
- export function pvkToBytes(options: PvkToBytesOptions) {
92
- const packageAddress =
93
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
94
- const argumentsTypes = [null] satisfies (string | null)[];
95
- return (tx: Transaction) =>
96
- tx.moveCall({
97
- package: packageAddress,
98
- module: 'groth16',
99
- function: 'pvk_to_bytes',
100
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
101
- });
102
- }
103
- export interface PublicProofInputsFromBytesOptions {
104
- package?: string;
105
- arguments: [RawTransactionArgument<number[]>];
106
- }
107
- export function publicProofInputsFromBytes(options: PublicProofInputsFromBytesOptions) {
108
- const packageAddress =
109
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
110
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
111
- return (tx: Transaction) =>
112
- tx.moveCall({
113
- package: packageAddress,
114
- module: 'groth16',
115
- function: 'public_proof_inputs_from_bytes',
116
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
117
- });
118
- }
119
- export interface ProofPointsFromBytesOptions {
120
- package?: string;
121
- arguments: [RawTransactionArgument<number[]>];
122
- }
123
- export function proofPointsFromBytes(options: ProofPointsFromBytesOptions) {
124
- const packageAddress =
125
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
126
- const argumentsTypes = ['vector<u8>'] satisfies (string | null)[];
127
- return (tx: Transaction) =>
128
- tx.moveCall({
129
- package: packageAddress,
130
- module: 'groth16',
131
- function: 'proof_points_from_bytes',
132
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
133
- });
134
- }
135
- export interface PrepareVerifyingKeyOptions {
136
- package?: string;
137
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<number[]>];
138
- }
139
- export function prepareVerifyingKey(options: PrepareVerifyingKeyOptions) {
140
- const packageAddress =
141
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
142
- const argumentsTypes = [null, 'vector<u8>'] satisfies (string | null)[];
143
- return (tx: Transaction) =>
144
- tx.moveCall({
145
- package: packageAddress,
146
- module: 'groth16',
147
- function: 'prepare_verifying_key',
148
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
149
- });
150
- }
151
- export interface VerifyGroth16ProofOptions {
152
- package?: string;
153
- arguments: [
154
- RawTransactionArgument<string>,
155
- RawTransactionArgument<string>,
156
- RawTransactionArgument<string>,
157
- RawTransactionArgument<string>,
158
- ];
159
- }
160
- export function verifyGroth16Proof(options: VerifyGroth16ProofOptions) {
161
- const packageAddress =
162
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
163
- const argumentsTypes = [null, null, null, null] satisfies (string | null)[];
164
- return (tx: Transaction) =>
165
- tx.moveCall({
166
- package: packageAddress,
167
- module: 'groth16',
168
- function: 'verify_groth16_proof',
169
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
170
- });
171
- }
@@ -1,49 +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::group_ops';
8
- export const Element = new MoveStruct({
9
- name: `${$moduleName}::Element`,
10
- fields: {
11
- bytes: bcs.vector(bcs.u8()),
12
- },
13
- });
14
- export interface BytesOptions {
15
- package?: string;
16
- arguments: [RawTransactionArgument<string>];
17
- typeArguments: [string];
18
- }
19
- export function bytes(options: BytesOptions) {
20
- const packageAddress =
21
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
22
- const argumentsTypes = [null] satisfies (string | null)[];
23
- return (tx: Transaction) =>
24
- tx.moveCall({
25
- package: packageAddress,
26
- module: 'group_ops',
27
- function: 'bytes',
28
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
29
- typeArguments: options.typeArguments,
30
- });
31
- }
32
- export interface EqualOptions {
33
- package?: string;
34
- arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
35
- typeArguments: [string];
36
- }
37
- export function equal(options: EqualOptions) {
38
- const packageAddress =
39
- options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
40
- const argumentsTypes = [null, null] satisfies (string | null)[];
41
- return (tx: Transaction) =>
42
- tx.moveCall({
43
- package: packageAddress,
44
- module: 'group_ops',
45
- function: 'equal',
46
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
47
- typeArguments: options.typeArguments,
48
- });
49
- }