@mysten/kiosk 0.14.6 → 1.0.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 +114 -2
- package/dist/client/kiosk-client.d.mts +126 -0
- package/dist/client/kiosk-client.d.mts.map +1 -0
- package/dist/client/kiosk-client.mjs +124 -0
- package/dist/client/kiosk-client.mjs.map +1 -0
- package/dist/client/kiosk-transaction.d.mts +236 -0
- package/dist/client/kiosk-transaction.d.mts.map +1 -0
- package/dist/client/kiosk-transaction.mjs +472 -0
- package/dist/client/kiosk-transaction.mjs.map +1 -0
- package/dist/client/tp-transaction.d.mts +139 -0
- package/dist/client/tp-transaction.d.mts.map +1 -0
- package/dist/client/tp-transaction.mjs +273 -0
- package/dist/client/tp-transaction.mjs.map +1 -0
- package/dist/constants.d.mts +42 -0
- package/dist/constants.d.mts.map +1 -0
- package/dist/constants.mjs +62 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/contracts/0x2/bag.mjs +19 -0
- package/dist/contracts/0x2/bag.mjs.map +1 -0
- package/dist/contracts/0x2/balance.mjs +20 -0
- package/dist/contracts/0x2/balance.mjs.map +1 -0
- package/dist/contracts/0x2/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.mjs +16 -0
- package/dist/contracts/0x2/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.mjs.map +1 -0
- package/dist/contracts/0x2/kiosk.mjs +244 -0
- package/dist/contracts/0x2/kiosk.mjs.map +1 -0
- package/dist/contracts/0x2/kiosk_extension.mjs +25 -0
- package/dist/contracts/0x2/kiosk_extension.mjs.map +1 -0
- package/dist/contracts/0x2/transfer_policy.mjs +99 -0
- package/dist/contracts/0x2/transfer_policy.mjs.map +1 -0
- package/dist/contracts/0x2/vec_set.mjs +18 -0
- package/dist/contracts/0x2/vec_set.mjs.map +1 -0
- package/dist/contracts/kiosk/deps/sui/kiosk.mjs +98 -0
- package/dist/contracts/kiosk/deps/sui/kiosk.mjs.map +1 -0
- package/dist/contracts/kiosk/floor_price_rule.mjs +70 -0
- package/dist/contracts/kiosk/floor_price_rule.mjs.map +1 -0
- package/dist/contracts/kiosk/kiosk_lock_rule.mjs +72 -0
- package/dist/contracts/kiosk/kiosk_lock_rule.mjs.map +1 -0
- package/dist/contracts/kiosk/personal_kiosk.mjs +102 -0
- package/dist/contracts/kiosk/personal_kiosk.mjs.map +1 -0
- package/dist/contracts/kiosk/personal_kiosk_rule.mjs +66 -0
- package/dist/contracts/kiosk/personal_kiosk_rule.mjs.map +1 -0
- package/dist/contracts/kiosk/royalty_rule.mjs +115 -0
- package/dist/contracts/kiosk/royalty_rule.mjs.map +1 -0
- package/dist/contracts/utils/index.mjs +118 -0
- package/dist/contracts/utils/index.mjs.map +1 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +9 -0
- package/dist/query/client-utils.mjs +30 -0
- package/dist/query/client-utils.mjs.map +1 -0
- package/dist/query/kiosk.mjs +154 -0
- package/dist/query/kiosk.mjs.map +1 -0
- package/dist/query/transfer-policy.mjs +110 -0
- package/dist/query/transfer-policy.mjs.map +1 -0
- package/dist/tx/kiosk.mjs +20 -0
- package/dist/tx/kiosk.mjs.map +1 -0
- package/dist/tx/rules/resolve.mjs +114 -0
- package/dist/tx/rules/resolve.mjs.map +1 -0
- package/dist/tx/transfer-policy.mjs +38 -0
- package/dist/tx/transfer-policy.mjs.map +1 -0
- package/dist/types/index.d.mts +23 -0
- package/dist/types/index.d.mts.map +1 -0
- package/dist/types/kiosk.d.mts +165 -0
- package/dist/types/kiosk.d.mts.map +1 -0
- package/dist/types/kiosk.mjs +21 -0
- package/dist/types/kiosk.mjs.map +1 -0
- package/dist/types/transfer-policy.d.mts +56 -0
- package/dist/types/transfer-policy.d.mts.map +1 -0
- package/dist/types/transfer-policy.mjs +19 -0
- package/dist/types/transfer-policy.mjs.map +1 -0
- package/dist/utils.d.mts +45 -0
- package/dist/utils.d.mts.map +1 -0
- package/dist/utils.mjs +156 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +31 -20
- package/src/client/kiosk-client.ts +42 -5
- package/src/client/kiosk-transaction.ts +144 -65
- package/src/client/tp-transaction.ts +149 -95
- package/src/constants.ts +19 -24
- package/src/contracts/0x2/accumulator.ts +24 -0
- package/src/contracts/0x2/accumulator_metadata.ts +38 -0
- package/src/contracts/0x2/accumulator_settlement.ts +14 -0
- package/src/contracts/0x2/address.ts +145 -0
- package/src/contracts/0x2/address_alias.ts +92 -0
- package/src/contracts/0x2/authenticator_state.ts +44 -0
- package/src/contracts/0x2/bag.ts +192 -0
- package/src/contracts/0x2/balance.ts +269 -0
- package/src/contracts/0x2/bcs.ts +495 -0
- package/src/contracts/0x2/bls12381.ts +717 -0
- package/src/contracts/0x2/borrow.ts +99 -0
- package/src/contracts/0x2/clock.ts +30 -0
- package/src/contracts/0x2/coin.ts +977 -0
- package/src/contracts/0x2/coin_registry.ts +874 -0
- package/src/contracts/0x2/config.ts +30 -0
- package/src/contracts/0x2/deny_list.ts +55 -0
- package/src/contracts/0x2/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.ts +12 -0
- package/src/contracts/0x2/derived_object.ts +95 -0
- package/src/contracts/0x2/display.ts +258 -0
- package/src/contracts/0x2/dynamic_field.ts +171 -0
- package/src/contracts/0x2/dynamic_object_field.ts +167 -0
- package/src/contracts/0x2/ecdsa_k1.ts +65 -0
- package/src/contracts/0x2/ecdsa_r1.ts +49 -0
- package/src/contracts/0x2/ecvrf.ts +29 -0
- package/src/contracts/0x2/ed25519.ts +25 -0
- package/src/contracts/0x2/event.ts +42 -0
- package/src/contracts/0x2/funds_accumulator.ts +86 -0
- package/src/contracts/0x2/groth16.ts +171 -0
- package/src/contracts/0x2/group_ops.ts +49 -0
- package/src/contracts/0x2/hash.ts +37 -0
- package/src/contracts/0x2/hex.ts +37 -0
- package/src/contracts/0x2/hmac.ts +21 -0
- package/src/contracts/0x2/kiosk.ts +797 -0
- package/src/contracts/0x2/kiosk_extension.ts +270 -0
- package/src/contracts/0x2/linked_table.ts +354 -0
- package/src/contracts/0x2/math.ts +117 -0
- package/src/contracts/0x2/nitro_attestation.ts +186 -0
- package/src/contracts/0x2/object.ts +249 -0
- package/src/contracts/0x2/object_bag.ts +210 -0
- package/src/contracts/0x2/object_table.ts +200 -0
- package/src/contracts/0x2/package.ts +414 -0
- package/src/contracts/0x2/party.ts +37 -0
- package/src/contracts/0x2/pay.ts +153 -0
- package/src/contracts/0x2/poseidon.ts +21 -0
- package/src/contracts/0x2/priority_queue.ts +139 -0
- package/src/contracts/0x2/random.ts +294 -0
- package/src/contracts/0x2/sui.ts +29 -0
- package/src/contracts/0x2/table.ts +200 -0
- package/src/contracts/0x2/table_vec.ts +232 -0
- package/src/contracts/0x2/token.ts +873 -0
- package/src/contracts/0x2/transfer.ts +216 -0
- package/src/contracts/0x2/transfer_policy.ts +400 -0
- package/src/contracts/0x2/tx_context.ts +129 -0
- package/src/contracts/0x2/types.ts +24 -0
- package/src/contracts/0x2/url.ts +77 -0
- package/src/contracts/0x2/vdf.ts +45 -0
- package/src/contracts/0x2/vec_map.ts +401 -0
- package/src/contracts/0x2/vec_set.ts +211 -0
- package/src/contracts/0x2/versioned.ts +153 -0
- package/src/contracts/0x2/zklogin_verified_id.ts +172 -0
- package/src/contracts/0x2/zklogin_verified_issuer.ts +99 -0
- package/src/contracts/kiosk/deps/sui/kiosk.ts +94 -0
- package/src/contracts/kiosk/deps/sui/object.ts +15 -0
- package/src/contracts/kiosk/floor_price_rule.ts +92 -0
- package/src/contracts/kiosk/kiosk_lock_rule.ts +97 -0
- package/src/contracts/kiosk/personal_kiosk.ts +295 -0
- package/src/contracts/kiosk/personal_kiosk_rule.ts +89 -0
- package/src/contracts/kiosk/royalty_rule.ts +144 -0
- package/src/contracts/kiosk/witness_rule.ts +92 -0
- package/src/contracts/utils/index.ts +234 -0
- package/src/query/client-utils.ts +51 -0
- package/src/query/kiosk.ts +128 -100
- package/src/query/transfer-policy.ts +112 -78
- package/src/tx/kiosk.ts +7 -231
- package/src/tx/rules/resolve.ts +97 -48
- package/src/tx/transfer-policy.ts +25 -86
- package/src/types/index.ts +3 -14
- package/src/types/kiosk.ts +10 -12
- package/src/types/transfer-policy.ts +4 -4
- package/src/utils.ts +90 -128
- package/dist/cjs/bcs.d.ts +0 -23
- package/dist/cjs/bcs.js +0 -50
- package/dist/cjs/bcs.js.map +0 -7
- package/dist/cjs/client/kiosk-client.d.ts +0 -76
- package/dist/cjs/client/kiosk-client.js +0 -123
- package/dist/cjs/client/kiosk-client.js.map +0 -7
- package/dist/cjs/client/kiosk-transaction.d.ts +0 -186
- package/dist/cjs/client/kiosk-transaction.js +0 -462
- package/dist/cjs/client/kiosk-transaction.js.map +0 -7
- package/dist/cjs/client/tp-transaction.d.ts +0 -114
- package/dist/cjs/client/tp-transaction.js +0 -307
- package/dist/cjs/client/tp-transaction.js.map +0 -7
- package/dist/cjs/constants.d.ts +0 -31
- package/dist/cjs/constants.js +0 -102
- package/dist/cjs/constants.js.map +0 -7
- package/dist/cjs/index.d.ts +0 -6
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/package.json +0 -5
- package/dist/cjs/query/kiosk.d.ts +0 -8
- package/dist/cjs/query/kiosk.js +0 -181
- package/dist/cjs/query/kiosk.js.map +0 -7
- package/dist/cjs/query/transfer-policy.d.ts +0 -29
- package/dist/cjs/query/transfer-policy.js +0 -92
- package/dist/cjs/query/transfer-policy.js.map +0 -7
- package/dist/cjs/tx/kiosk.d.ts +0 -71
- package/dist/cjs/tx/kiosk.js +0 -130
- package/dist/cjs/tx/kiosk.js.map +0 -7
- package/dist/cjs/tx/personal-kiosk.d.ts +0 -7
- package/dist/cjs/tx/personal-kiosk.js +0 -38
- package/dist/cjs/tx/personal-kiosk.js.map +0 -7
- package/dist/cjs/tx/rules/attach.d.ts +0 -7
- package/dist/cjs/tx/rules/attach.js +0 -62
- package/dist/cjs/tx/rules/attach.js.map +0 -7
- package/dist/cjs/tx/rules/resolve.d.ts +0 -15
- package/dist/cjs/tx/rules/resolve.js +0 -109
- package/dist/cjs/tx/rules/resolve.js.map +0 -7
- package/dist/cjs/tx/transfer-policy.d.ts +0 -29
- package/dist/cjs/tx/transfer-policy.js +0 -78
- package/dist/cjs/tx/transfer-policy.js.map +0 -7
- package/dist/cjs/types/index.d.ts +0 -27
- package/dist/cjs/types/index.js +0 -33
- package/dist/cjs/types/index.js.map +0 -7
- package/dist/cjs/types/kiosk.d.ts +0 -160
- package/dist/cjs/types/kiosk.js +0 -37
- package/dist/cjs/types/kiosk.js.map +0 -7
- package/dist/cjs/types/transfer-policy.d.ts +0 -53
- package/dist/cjs/types/transfer-policy.js +0 -35
- package/dist/cjs/types/transfer-policy.js.map +0 -7
- package/dist/cjs/utils.d.ts +0 -51
- package/dist/cjs/utils.js +0 -198
- package/dist/cjs/utils.js.map +0 -7
- package/dist/esm/bcs.d.ts +0 -23
- package/dist/esm/bcs.js +0 -35
- package/dist/esm/bcs.js.map +0 -7
- package/dist/esm/client/kiosk-client.d.ts +0 -76
- package/dist/esm/client/kiosk-client.js +0 -114
- package/dist/esm/client/kiosk-client.js.map +0 -7
- package/dist/esm/client/kiosk-transaction.d.ts +0 -186
- package/dist/esm/client/kiosk-transaction.js +0 -432
- package/dist/esm/client/kiosk-transaction.js.map +0 -7
- package/dist/esm/client/tp-transaction.d.ts +0 -114
- package/dist/esm/client/tp-transaction.js +0 -298
- package/dist/esm/client/tp-transaction.js.map +0 -7
- package/dist/esm/constants.d.ts +0 -31
- package/dist/esm/constants.js +0 -87
- package/dist/esm/constants.js.map +0 -7
- package/dist/esm/index.d.ts +0 -6
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/package.json +0 -5
- package/dist/esm/query/kiosk.d.ts +0 -8
- package/dist/esm/query/kiosk.js +0 -169
- package/dist/esm/query/kiosk.js.map +0 -7
- package/dist/esm/query/transfer-policy.d.ts +0 -29
- package/dist/esm/query/transfer-policy.js +0 -76
- package/dist/esm/query/transfer-policy.js.map +0 -7
- package/dist/esm/tx/kiosk.d.ts +0 -71
- package/dist/esm/tx/kiosk.js +0 -110
- package/dist/esm/tx/kiosk.js.map +0 -7
- package/dist/esm/tx/personal-kiosk.d.ts +0 -7
- package/dist/esm/tx/personal-kiosk.js +0 -18
- package/dist/esm/tx/personal-kiosk.js.map +0 -7
- package/dist/esm/tx/rules/attach.d.ts +0 -7
- package/dist/esm/tx/rules/attach.js +0 -42
- package/dist/esm/tx/rules/attach.js.map +0 -7
- package/dist/esm/tx/rules/resolve.d.ts +0 -15
- package/dist/esm/tx/rules/resolve.js +0 -89
- package/dist/esm/tx/rules/resolve.js.map +0 -7
- package/dist/esm/tx/transfer-policy.d.ts +0 -29
- package/dist/esm/tx/transfer-policy.js +0 -58
- package/dist/esm/tx/transfer-policy.js.map +0 -7
- package/dist/esm/types/index.d.ts +0 -27
- package/dist/esm/types/index.js +0 -12
- package/dist/esm/types/index.js.map +0 -7
- package/dist/esm/types/kiosk.d.ts +0 -160
- package/dist/esm/types/kiosk.js +0 -17
- package/dist/esm/types/kiosk.js.map +0 -7
- package/dist/esm/types/transfer-policy.d.ts +0 -53
- package/dist/esm/types/transfer-policy.js +0 -15
- package/dist/esm/types/transfer-policy.js.map +0 -7
- package/dist/esm/utils.d.ts +0 -51
- package/dist/esm/utils.js +0 -183
- package/dist/esm/utils.js.map +0 -7
- package/dist/tsconfig.esm.tsbuildinfo +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/bcs.ts +0 -39
- package/src/tx/personal-kiosk.ts +0 -34
- package/src/tx/rules/attach.ts +0 -73
|
@@ -0,0 +1,874 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import {
|
|
5
|
+
MoveStruct,
|
|
6
|
+
MoveEnum,
|
|
7
|
+
normalizeMoveArguments,
|
|
8
|
+
type RawTransactionArgument,
|
|
9
|
+
} from '../utils/index.js';
|
|
10
|
+
import { bcs, type BcsType } from '@mysten/sui/bcs';
|
|
11
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
12
|
+
import * as type_name from './deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.js';
|
|
13
|
+
import * as balance from './balance.js';
|
|
14
|
+
import * as vec_map from './vec_map.js';
|
|
15
|
+
import * as bag from './bag.js';
|
|
16
|
+
const $moduleName = '0x2::coin_registry';
|
|
17
|
+
export const CoinRegistry = new MoveStruct({
|
|
18
|
+
name: `${$moduleName}::CoinRegistry`,
|
|
19
|
+
fields: {
|
|
20
|
+
id: bcs.Address,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
export const ExtraField = new MoveStruct({
|
|
24
|
+
name: `${$moduleName}::ExtraField`,
|
|
25
|
+
fields: {
|
|
26
|
+
pos0: type_name.TypeName,
|
|
27
|
+
pos1: bcs.vector(bcs.u8()),
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const CurrencyKey = new MoveStruct({
|
|
31
|
+
name: `${$moduleName}::CurrencyKey`,
|
|
32
|
+
fields: {
|
|
33
|
+
dummy_field: bcs.bool(),
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
export const LegacyMetadataKey = new MoveStruct({
|
|
37
|
+
name: `${$moduleName}::LegacyMetadataKey`,
|
|
38
|
+
fields: {
|
|
39
|
+
dummy_field: bcs.bool(),
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
export const MetadataCap = new MoveStruct({
|
|
43
|
+
name: `${$moduleName}::MetadataCap`,
|
|
44
|
+
fields: {
|
|
45
|
+
id: bcs.Address,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const Borrow = new MoveStruct({
|
|
49
|
+
name: `${$moduleName}::Borrow`,
|
|
50
|
+
fields: {
|
|
51
|
+
dummy_field: bcs.bool(),
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
export const SupplyState = new MoveEnum({
|
|
55
|
+
name: `${$moduleName}::SupplyState`,
|
|
56
|
+
fields: {
|
|
57
|
+
Fixed: balance.Supply,
|
|
58
|
+
BurnOnly: balance.Supply,
|
|
59
|
+
Unknown: null,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
export const RegulatedState = new MoveEnum({
|
|
63
|
+
name: `${$moduleName}::RegulatedState`,
|
|
64
|
+
fields: {
|
|
65
|
+
Regulated: new MoveStruct({
|
|
66
|
+
name: `RegulatedState.Regulated`,
|
|
67
|
+
fields: {
|
|
68
|
+
cap: bcs.Address,
|
|
69
|
+
allow_global_pause: bcs.option(bcs.bool()),
|
|
70
|
+
variant: bcs.u8(),
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
Unregulated: null,
|
|
74
|
+
Unknown: null,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
export const MetadataCapState = new MoveEnum({
|
|
78
|
+
name: `${$moduleName}::MetadataCapState`,
|
|
79
|
+
fields: {
|
|
80
|
+
Claimed: bcs.Address,
|
|
81
|
+
Unclaimed: null,
|
|
82
|
+
Deleted: null,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
export const Currency = new MoveStruct({
|
|
86
|
+
name: `${$moduleName}::Currency`,
|
|
87
|
+
fields: {
|
|
88
|
+
id: bcs.Address,
|
|
89
|
+
decimals: bcs.u8(),
|
|
90
|
+
name: bcs.string(),
|
|
91
|
+
symbol: bcs.string(),
|
|
92
|
+
description: bcs.string(),
|
|
93
|
+
icon_url: bcs.string(),
|
|
94
|
+
supply: bcs.option(SupplyState),
|
|
95
|
+
regulated: RegulatedState,
|
|
96
|
+
treasury_cap_id: bcs.option(bcs.Address),
|
|
97
|
+
metadata_cap_id: MetadataCapState,
|
|
98
|
+
extra_fields: vec_map.VecMap(bcs.string(), ExtraField),
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
export const CurrencyInitializer = new MoveStruct({
|
|
102
|
+
name: `${$moduleName}::CurrencyInitializer`,
|
|
103
|
+
fields: {
|
|
104
|
+
currency: Currency,
|
|
105
|
+
extra_fields: bag.Bag,
|
|
106
|
+
is_otw: bcs.bool(),
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
export interface NewCurrencyOptions {
|
|
110
|
+
package?: string;
|
|
111
|
+
arguments: [
|
|
112
|
+
RawTransactionArgument<string>,
|
|
113
|
+
RawTransactionArgument<number>,
|
|
114
|
+
RawTransactionArgument<string>,
|
|
115
|
+
RawTransactionArgument<string>,
|
|
116
|
+
RawTransactionArgument<string>,
|
|
117
|
+
RawTransactionArgument<string>,
|
|
118
|
+
];
|
|
119
|
+
typeArguments: [string];
|
|
120
|
+
}
|
|
121
|
+
export function newCurrency(options: NewCurrencyOptions) {
|
|
122
|
+
const packageAddress =
|
|
123
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
124
|
+
const argumentsTypes = [
|
|
125
|
+
null,
|
|
126
|
+
'u8',
|
|
127
|
+
'0x1::string::String',
|
|
128
|
+
'0x1::string::String',
|
|
129
|
+
'0x1::string::String',
|
|
130
|
+
'0x1::string::String',
|
|
131
|
+
] satisfies (string | null)[];
|
|
132
|
+
return (tx: Transaction) =>
|
|
133
|
+
tx.moveCall({
|
|
134
|
+
package: packageAddress,
|
|
135
|
+
module: 'coin_registry',
|
|
136
|
+
function: 'new_currency',
|
|
137
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
138
|
+
typeArguments: options.typeArguments,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
export interface NewCurrencyWithOtwOptions<T0 extends BcsType<any>> {
|
|
142
|
+
package?: string;
|
|
143
|
+
arguments: [
|
|
144
|
+
RawTransactionArgument<T0>,
|
|
145
|
+
RawTransactionArgument<number>,
|
|
146
|
+
RawTransactionArgument<string>,
|
|
147
|
+
RawTransactionArgument<string>,
|
|
148
|
+
RawTransactionArgument<string>,
|
|
149
|
+
RawTransactionArgument<string>,
|
|
150
|
+
];
|
|
151
|
+
typeArguments: [string];
|
|
152
|
+
}
|
|
153
|
+
export function newCurrencyWithOtw<T0 extends BcsType<any>>(
|
|
154
|
+
options: NewCurrencyWithOtwOptions<T0>,
|
|
155
|
+
) {
|
|
156
|
+
const packageAddress =
|
|
157
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
158
|
+
const argumentsTypes = [
|
|
159
|
+
`${options.typeArguments[0]}`,
|
|
160
|
+
'u8',
|
|
161
|
+
'0x1::string::String',
|
|
162
|
+
'0x1::string::String',
|
|
163
|
+
'0x1::string::String',
|
|
164
|
+
'0x1::string::String',
|
|
165
|
+
] satisfies (string | null)[];
|
|
166
|
+
return (tx: Transaction) =>
|
|
167
|
+
tx.moveCall({
|
|
168
|
+
package: packageAddress,
|
|
169
|
+
module: 'coin_registry',
|
|
170
|
+
function: 'new_currency_with_otw',
|
|
171
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
172
|
+
typeArguments: options.typeArguments,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
export interface ClaimMetadataCapOptions {
|
|
176
|
+
package?: string;
|
|
177
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
178
|
+
typeArguments: [string];
|
|
179
|
+
}
|
|
180
|
+
export function claimMetadataCap(options: ClaimMetadataCapOptions) {
|
|
181
|
+
const packageAddress =
|
|
182
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
183
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
184
|
+
return (tx: Transaction) =>
|
|
185
|
+
tx.moveCall({
|
|
186
|
+
package: packageAddress,
|
|
187
|
+
module: 'coin_registry',
|
|
188
|
+
function: 'claim_metadata_cap',
|
|
189
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
190
|
+
typeArguments: options.typeArguments,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
export interface MakeRegulatedOptions {
|
|
194
|
+
package?: string;
|
|
195
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<boolean>];
|
|
196
|
+
typeArguments: [string];
|
|
197
|
+
}
|
|
198
|
+
export function makeRegulated(options: MakeRegulatedOptions) {
|
|
199
|
+
const packageAddress =
|
|
200
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
201
|
+
const argumentsTypes = [null, 'bool'] satisfies (string | null)[];
|
|
202
|
+
return (tx: Transaction) =>
|
|
203
|
+
tx.moveCall({
|
|
204
|
+
package: packageAddress,
|
|
205
|
+
module: 'coin_registry',
|
|
206
|
+
function: 'make_regulated',
|
|
207
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
208
|
+
typeArguments: options.typeArguments,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
export interface MakeSupplyFixedInitOptions {
|
|
212
|
+
package?: string;
|
|
213
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
214
|
+
typeArguments: [string];
|
|
215
|
+
}
|
|
216
|
+
export function makeSupplyFixedInit(options: MakeSupplyFixedInitOptions) {
|
|
217
|
+
const packageAddress =
|
|
218
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
219
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
220
|
+
return (tx: Transaction) =>
|
|
221
|
+
tx.moveCall({
|
|
222
|
+
package: packageAddress,
|
|
223
|
+
module: 'coin_registry',
|
|
224
|
+
function: 'make_supply_fixed_init',
|
|
225
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
226
|
+
typeArguments: options.typeArguments,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
export interface MakeSupplyBurnOnlyInitOptions {
|
|
230
|
+
package?: string;
|
|
231
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
232
|
+
typeArguments: [string];
|
|
233
|
+
}
|
|
234
|
+
export function makeSupplyBurnOnlyInit(options: MakeSupplyBurnOnlyInitOptions) {
|
|
235
|
+
const packageAddress =
|
|
236
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
237
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
238
|
+
return (tx: Transaction) =>
|
|
239
|
+
tx.moveCall({
|
|
240
|
+
package: packageAddress,
|
|
241
|
+
module: 'coin_registry',
|
|
242
|
+
function: 'make_supply_burn_only_init',
|
|
243
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
244
|
+
typeArguments: options.typeArguments,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
export interface MakeSupplyFixedOptions {
|
|
248
|
+
package?: string;
|
|
249
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
250
|
+
typeArguments: [string];
|
|
251
|
+
}
|
|
252
|
+
export function makeSupplyFixed(options: MakeSupplyFixedOptions) {
|
|
253
|
+
const packageAddress =
|
|
254
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
255
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
256
|
+
return (tx: Transaction) =>
|
|
257
|
+
tx.moveCall({
|
|
258
|
+
package: packageAddress,
|
|
259
|
+
module: 'coin_registry',
|
|
260
|
+
function: 'make_supply_fixed',
|
|
261
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
262
|
+
typeArguments: options.typeArguments,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
export interface MakeSupplyBurnOnlyOptions {
|
|
266
|
+
package?: string;
|
|
267
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
268
|
+
typeArguments: [string];
|
|
269
|
+
}
|
|
270
|
+
export function makeSupplyBurnOnly(options: MakeSupplyBurnOnlyOptions) {
|
|
271
|
+
const packageAddress =
|
|
272
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
273
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
274
|
+
return (tx: Transaction) =>
|
|
275
|
+
tx.moveCall({
|
|
276
|
+
package: packageAddress,
|
|
277
|
+
module: 'coin_registry',
|
|
278
|
+
function: 'make_supply_burn_only',
|
|
279
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
280
|
+
typeArguments: options.typeArguments,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
export interface FinalizeOptions {
|
|
284
|
+
package?: string;
|
|
285
|
+
arguments: [RawTransactionArgument<string>];
|
|
286
|
+
typeArguments: [string];
|
|
287
|
+
}
|
|
288
|
+
export function finalize(options: FinalizeOptions) {
|
|
289
|
+
const packageAddress =
|
|
290
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
291
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
292
|
+
return (tx: Transaction) =>
|
|
293
|
+
tx.moveCall({
|
|
294
|
+
package: packageAddress,
|
|
295
|
+
module: 'coin_registry',
|
|
296
|
+
function: 'finalize',
|
|
297
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
298
|
+
typeArguments: options.typeArguments,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
export interface FinalizeAndDeleteMetadataCapOptions {
|
|
302
|
+
package?: string;
|
|
303
|
+
arguments: [RawTransactionArgument<string>];
|
|
304
|
+
typeArguments: [string];
|
|
305
|
+
}
|
|
306
|
+
export function finalizeAndDeleteMetadataCap(options: FinalizeAndDeleteMetadataCapOptions) {
|
|
307
|
+
const packageAddress =
|
|
308
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
309
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
310
|
+
return (tx: Transaction) =>
|
|
311
|
+
tx.moveCall({
|
|
312
|
+
package: packageAddress,
|
|
313
|
+
module: 'coin_registry',
|
|
314
|
+
function: 'finalize_and_delete_metadata_cap',
|
|
315
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
316
|
+
typeArguments: options.typeArguments,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
export interface FinalizeRegistrationOptions {
|
|
320
|
+
package?: string;
|
|
321
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
322
|
+
typeArguments: [string];
|
|
323
|
+
}
|
|
324
|
+
export function finalizeRegistration(options: FinalizeRegistrationOptions) {
|
|
325
|
+
const packageAddress =
|
|
326
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
327
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
328
|
+
return (tx: Transaction) =>
|
|
329
|
+
tx.moveCall({
|
|
330
|
+
package: packageAddress,
|
|
331
|
+
module: 'coin_registry',
|
|
332
|
+
function: 'finalize_registration',
|
|
333
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
334
|
+
typeArguments: options.typeArguments,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
export interface DeleteMetadataCapOptions {
|
|
338
|
+
package?: string;
|
|
339
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
340
|
+
typeArguments: [string];
|
|
341
|
+
}
|
|
342
|
+
export function deleteMetadataCap(options: DeleteMetadataCapOptions) {
|
|
343
|
+
const packageAddress =
|
|
344
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
345
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
346
|
+
return (tx: Transaction) =>
|
|
347
|
+
tx.moveCall({
|
|
348
|
+
package: packageAddress,
|
|
349
|
+
module: 'coin_registry',
|
|
350
|
+
function: 'delete_metadata_cap',
|
|
351
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
352
|
+
typeArguments: options.typeArguments,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
export interface BurnOptions {
|
|
356
|
+
package?: string;
|
|
357
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
358
|
+
typeArguments: [string];
|
|
359
|
+
}
|
|
360
|
+
export function burn(options: BurnOptions) {
|
|
361
|
+
const packageAddress =
|
|
362
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
363
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
364
|
+
return (tx: Transaction) =>
|
|
365
|
+
tx.moveCall({
|
|
366
|
+
package: packageAddress,
|
|
367
|
+
module: 'coin_registry',
|
|
368
|
+
function: 'burn',
|
|
369
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
370
|
+
typeArguments: options.typeArguments,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
export interface BurnBalanceOptions {
|
|
374
|
+
package?: string;
|
|
375
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
376
|
+
typeArguments: [string];
|
|
377
|
+
}
|
|
378
|
+
export function burnBalance(options: BurnBalanceOptions) {
|
|
379
|
+
const packageAddress =
|
|
380
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
381
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
382
|
+
return (tx: Transaction) =>
|
|
383
|
+
tx.moveCall({
|
|
384
|
+
package: packageAddress,
|
|
385
|
+
module: 'coin_registry',
|
|
386
|
+
function: 'burn_balance',
|
|
387
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
388
|
+
typeArguments: options.typeArguments,
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
export interface SetNameOptions {
|
|
392
|
+
package?: string;
|
|
393
|
+
arguments: [
|
|
394
|
+
RawTransactionArgument<string>,
|
|
395
|
+
RawTransactionArgument<string>,
|
|
396
|
+
RawTransactionArgument<string>,
|
|
397
|
+
];
|
|
398
|
+
typeArguments: [string];
|
|
399
|
+
}
|
|
400
|
+
export function setName(options: SetNameOptions) {
|
|
401
|
+
const packageAddress =
|
|
402
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
403
|
+
const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
|
|
404
|
+
return (tx: Transaction) =>
|
|
405
|
+
tx.moveCall({
|
|
406
|
+
package: packageAddress,
|
|
407
|
+
module: 'coin_registry',
|
|
408
|
+
function: 'set_name',
|
|
409
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
410
|
+
typeArguments: options.typeArguments,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
export interface SetDescriptionOptions {
|
|
414
|
+
package?: string;
|
|
415
|
+
arguments: [
|
|
416
|
+
RawTransactionArgument<string>,
|
|
417
|
+
RawTransactionArgument<string>,
|
|
418
|
+
RawTransactionArgument<string>,
|
|
419
|
+
];
|
|
420
|
+
typeArguments: [string];
|
|
421
|
+
}
|
|
422
|
+
export function setDescription(options: SetDescriptionOptions) {
|
|
423
|
+
const packageAddress =
|
|
424
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
425
|
+
const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
|
|
426
|
+
return (tx: Transaction) =>
|
|
427
|
+
tx.moveCall({
|
|
428
|
+
package: packageAddress,
|
|
429
|
+
module: 'coin_registry',
|
|
430
|
+
function: 'set_description',
|
|
431
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
432
|
+
typeArguments: options.typeArguments,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
export interface SetIconUrlOptions {
|
|
436
|
+
package?: string;
|
|
437
|
+
arguments: [
|
|
438
|
+
RawTransactionArgument<string>,
|
|
439
|
+
RawTransactionArgument<string>,
|
|
440
|
+
RawTransactionArgument<string>,
|
|
441
|
+
];
|
|
442
|
+
typeArguments: [string];
|
|
443
|
+
}
|
|
444
|
+
export function setIconUrl(options: SetIconUrlOptions) {
|
|
445
|
+
const packageAddress =
|
|
446
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
447
|
+
const argumentsTypes = [null, null, '0x1::string::String'] satisfies (string | null)[];
|
|
448
|
+
return (tx: Transaction) =>
|
|
449
|
+
tx.moveCall({
|
|
450
|
+
package: packageAddress,
|
|
451
|
+
module: 'coin_registry',
|
|
452
|
+
function: 'set_icon_url',
|
|
453
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
454
|
+
typeArguments: options.typeArguments,
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
export interface SetTreasuryCapIdOptions {
|
|
458
|
+
package?: string;
|
|
459
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
460
|
+
typeArguments: [string];
|
|
461
|
+
}
|
|
462
|
+
export function setTreasuryCapId(options: SetTreasuryCapIdOptions) {
|
|
463
|
+
const packageAddress =
|
|
464
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
465
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
466
|
+
return (tx: Transaction) =>
|
|
467
|
+
tx.moveCall({
|
|
468
|
+
package: packageAddress,
|
|
469
|
+
module: 'coin_registry',
|
|
470
|
+
function: 'set_treasury_cap_id',
|
|
471
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
472
|
+
typeArguments: options.typeArguments,
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
export interface MigrateLegacyMetadataOptions {
|
|
476
|
+
package?: string;
|
|
477
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
478
|
+
typeArguments: [string];
|
|
479
|
+
}
|
|
480
|
+
export function migrateLegacyMetadata(options: MigrateLegacyMetadataOptions) {
|
|
481
|
+
const packageAddress =
|
|
482
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
483
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
484
|
+
return (tx: Transaction) =>
|
|
485
|
+
tx.moveCall({
|
|
486
|
+
package: packageAddress,
|
|
487
|
+
module: 'coin_registry',
|
|
488
|
+
function: 'migrate_legacy_metadata',
|
|
489
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
490
|
+
typeArguments: options.typeArguments,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
export interface UpdateFromLegacyMetadataOptions {
|
|
494
|
+
package?: string;
|
|
495
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
496
|
+
typeArguments: [string];
|
|
497
|
+
}
|
|
498
|
+
export function updateFromLegacyMetadata(options: UpdateFromLegacyMetadataOptions) {
|
|
499
|
+
const packageAddress =
|
|
500
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
501
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
502
|
+
return (tx: Transaction) =>
|
|
503
|
+
tx.moveCall({
|
|
504
|
+
package: packageAddress,
|
|
505
|
+
module: 'coin_registry',
|
|
506
|
+
function: 'update_from_legacy_metadata',
|
|
507
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
508
|
+
typeArguments: options.typeArguments,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
export interface DeleteMigratedLegacyMetadataOptions {
|
|
512
|
+
package?: string;
|
|
513
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
514
|
+
typeArguments: [string];
|
|
515
|
+
}
|
|
516
|
+
export function deleteMigratedLegacyMetadata(options: DeleteMigratedLegacyMetadataOptions) {
|
|
517
|
+
const packageAddress =
|
|
518
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
519
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
520
|
+
return (tx: Transaction) =>
|
|
521
|
+
tx.moveCall({
|
|
522
|
+
package: packageAddress,
|
|
523
|
+
module: 'coin_registry',
|
|
524
|
+
function: 'delete_migrated_legacy_metadata',
|
|
525
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
526
|
+
typeArguments: options.typeArguments,
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
export interface MigrateRegulatedStateByMetadataOptions {
|
|
530
|
+
package?: string;
|
|
531
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
532
|
+
typeArguments: [string];
|
|
533
|
+
}
|
|
534
|
+
export function migrateRegulatedStateByMetadata(options: MigrateRegulatedStateByMetadataOptions) {
|
|
535
|
+
const packageAddress =
|
|
536
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
537
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
538
|
+
return (tx: Transaction) =>
|
|
539
|
+
tx.moveCall({
|
|
540
|
+
package: packageAddress,
|
|
541
|
+
module: 'coin_registry',
|
|
542
|
+
function: 'migrate_regulated_state_by_metadata',
|
|
543
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
544
|
+
typeArguments: options.typeArguments,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
export interface MigrateRegulatedStateByCapOptions {
|
|
548
|
+
package?: string;
|
|
549
|
+
arguments: [RawTransactionArgument<string>, RawTransactionArgument<string>];
|
|
550
|
+
typeArguments: [string];
|
|
551
|
+
}
|
|
552
|
+
export function migrateRegulatedStateByCap(options: MigrateRegulatedStateByCapOptions) {
|
|
553
|
+
const packageAddress =
|
|
554
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
555
|
+
const argumentsTypes = [null, null] satisfies (string | null)[];
|
|
556
|
+
return (tx: Transaction) =>
|
|
557
|
+
tx.moveCall({
|
|
558
|
+
package: packageAddress,
|
|
559
|
+
module: 'coin_registry',
|
|
560
|
+
function: 'migrate_regulated_state_by_cap',
|
|
561
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
562
|
+
typeArguments: options.typeArguments,
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
export interface BorrowLegacyMetadataOptions {
|
|
566
|
+
package?: string;
|
|
567
|
+
arguments: [RawTransactionArgument<string>];
|
|
568
|
+
typeArguments: [string];
|
|
569
|
+
}
|
|
570
|
+
export function borrowLegacyMetadata(options: BorrowLegacyMetadataOptions) {
|
|
571
|
+
const packageAddress =
|
|
572
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
573
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
574
|
+
return (tx: Transaction) =>
|
|
575
|
+
tx.moveCall({
|
|
576
|
+
package: packageAddress,
|
|
577
|
+
module: 'coin_registry',
|
|
578
|
+
function: 'borrow_legacy_metadata',
|
|
579
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
580
|
+
typeArguments: options.typeArguments,
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
export interface ReturnBorrowedLegacyMetadataOptions {
|
|
584
|
+
package?: string;
|
|
585
|
+
arguments: [
|
|
586
|
+
RawTransactionArgument<string>,
|
|
587
|
+
RawTransactionArgument<string>,
|
|
588
|
+
RawTransactionArgument<string>,
|
|
589
|
+
];
|
|
590
|
+
typeArguments: [string];
|
|
591
|
+
}
|
|
592
|
+
export function returnBorrowedLegacyMetadata(options: ReturnBorrowedLegacyMetadataOptions) {
|
|
593
|
+
const packageAddress =
|
|
594
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
595
|
+
const argumentsTypes = [null, null, null] satisfies (string | null)[];
|
|
596
|
+
return (tx: Transaction) =>
|
|
597
|
+
tx.moveCall({
|
|
598
|
+
package: packageAddress,
|
|
599
|
+
module: 'coin_registry',
|
|
600
|
+
function: 'return_borrowed_legacy_metadata',
|
|
601
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
602
|
+
typeArguments: options.typeArguments,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
export interface DecimalsOptions {
|
|
606
|
+
package?: string;
|
|
607
|
+
arguments: [RawTransactionArgument<string>];
|
|
608
|
+
typeArguments: [string];
|
|
609
|
+
}
|
|
610
|
+
export function decimals(options: DecimalsOptions) {
|
|
611
|
+
const packageAddress =
|
|
612
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
613
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
614
|
+
return (tx: Transaction) =>
|
|
615
|
+
tx.moveCall({
|
|
616
|
+
package: packageAddress,
|
|
617
|
+
module: 'coin_registry',
|
|
618
|
+
function: 'decimals',
|
|
619
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
620
|
+
typeArguments: options.typeArguments,
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
export interface NameOptions {
|
|
624
|
+
package?: string;
|
|
625
|
+
arguments: [RawTransactionArgument<string>];
|
|
626
|
+
typeArguments: [string];
|
|
627
|
+
}
|
|
628
|
+
export function name(options: NameOptions) {
|
|
629
|
+
const packageAddress =
|
|
630
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
631
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
632
|
+
return (tx: Transaction) =>
|
|
633
|
+
tx.moveCall({
|
|
634
|
+
package: packageAddress,
|
|
635
|
+
module: 'coin_registry',
|
|
636
|
+
function: 'name',
|
|
637
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
638
|
+
typeArguments: options.typeArguments,
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
export interface SymbolOptions {
|
|
642
|
+
package?: string;
|
|
643
|
+
arguments: [RawTransactionArgument<string>];
|
|
644
|
+
typeArguments: [string];
|
|
645
|
+
}
|
|
646
|
+
export function symbol(options: SymbolOptions) {
|
|
647
|
+
const packageAddress =
|
|
648
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
649
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
650
|
+
return (tx: Transaction) =>
|
|
651
|
+
tx.moveCall({
|
|
652
|
+
package: packageAddress,
|
|
653
|
+
module: 'coin_registry',
|
|
654
|
+
function: 'symbol',
|
|
655
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
656
|
+
typeArguments: options.typeArguments,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
export interface DescriptionOptions {
|
|
660
|
+
package?: string;
|
|
661
|
+
arguments: [RawTransactionArgument<string>];
|
|
662
|
+
typeArguments: [string];
|
|
663
|
+
}
|
|
664
|
+
export function description(options: DescriptionOptions) {
|
|
665
|
+
const packageAddress =
|
|
666
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
667
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
668
|
+
return (tx: Transaction) =>
|
|
669
|
+
tx.moveCall({
|
|
670
|
+
package: packageAddress,
|
|
671
|
+
module: 'coin_registry',
|
|
672
|
+
function: 'description',
|
|
673
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
674
|
+
typeArguments: options.typeArguments,
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
export interface IconUrlOptions {
|
|
678
|
+
package?: string;
|
|
679
|
+
arguments: [RawTransactionArgument<string>];
|
|
680
|
+
typeArguments: [string];
|
|
681
|
+
}
|
|
682
|
+
export function iconUrl(options: IconUrlOptions) {
|
|
683
|
+
const packageAddress =
|
|
684
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
685
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
686
|
+
return (tx: Transaction) =>
|
|
687
|
+
tx.moveCall({
|
|
688
|
+
package: packageAddress,
|
|
689
|
+
module: 'coin_registry',
|
|
690
|
+
function: 'icon_url',
|
|
691
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
692
|
+
typeArguments: options.typeArguments,
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
export interface IsMetadataCapClaimedOptions {
|
|
696
|
+
package?: string;
|
|
697
|
+
arguments: [RawTransactionArgument<string>];
|
|
698
|
+
typeArguments: [string];
|
|
699
|
+
}
|
|
700
|
+
export function isMetadataCapClaimed(options: IsMetadataCapClaimedOptions) {
|
|
701
|
+
const packageAddress =
|
|
702
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
703
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
704
|
+
return (tx: Transaction) =>
|
|
705
|
+
tx.moveCall({
|
|
706
|
+
package: packageAddress,
|
|
707
|
+
module: 'coin_registry',
|
|
708
|
+
function: 'is_metadata_cap_claimed',
|
|
709
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
710
|
+
typeArguments: options.typeArguments,
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
export interface IsMetadataCapDeletedOptions {
|
|
714
|
+
package?: string;
|
|
715
|
+
arguments: [RawTransactionArgument<string>];
|
|
716
|
+
typeArguments: [string];
|
|
717
|
+
}
|
|
718
|
+
export function isMetadataCapDeleted(options: IsMetadataCapDeletedOptions) {
|
|
719
|
+
const packageAddress =
|
|
720
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
721
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
722
|
+
return (tx: Transaction) =>
|
|
723
|
+
tx.moveCall({
|
|
724
|
+
package: packageAddress,
|
|
725
|
+
module: 'coin_registry',
|
|
726
|
+
function: 'is_metadata_cap_deleted',
|
|
727
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
728
|
+
typeArguments: options.typeArguments,
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
export interface MetadataCapIdOptions {
|
|
732
|
+
package?: string;
|
|
733
|
+
arguments: [RawTransactionArgument<string>];
|
|
734
|
+
typeArguments: [string];
|
|
735
|
+
}
|
|
736
|
+
export function metadataCapId(options: MetadataCapIdOptions) {
|
|
737
|
+
const packageAddress =
|
|
738
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
739
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
740
|
+
return (tx: Transaction) =>
|
|
741
|
+
tx.moveCall({
|
|
742
|
+
package: packageAddress,
|
|
743
|
+
module: 'coin_registry',
|
|
744
|
+
function: 'metadata_cap_id',
|
|
745
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
746
|
+
typeArguments: options.typeArguments,
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
export interface TreasuryCapIdOptions {
|
|
750
|
+
package?: string;
|
|
751
|
+
arguments: [RawTransactionArgument<string>];
|
|
752
|
+
typeArguments: [string];
|
|
753
|
+
}
|
|
754
|
+
export function treasuryCapId(options: TreasuryCapIdOptions) {
|
|
755
|
+
const packageAddress =
|
|
756
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
757
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
758
|
+
return (tx: Transaction) =>
|
|
759
|
+
tx.moveCall({
|
|
760
|
+
package: packageAddress,
|
|
761
|
+
module: 'coin_registry',
|
|
762
|
+
function: 'treasury_cap_id',
|
|
763
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
764
|
+
typeArguments: options.typeArguments,
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
export interface DenyCapIdOptions {
|
|
768
|
+
package?: string;
|
|
769
|
+
arguments: [RawTransactionArgument<string>];
|
|
770
|
+
typeArguments: [string];
|
|
771
|
+
}
|
|
772
|
+
export function denyCapId(options: DenyCapIdOptions) {
|
|
773
|
+
const packageAddress =
|
|
774
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
775
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
776
|
+
return (tx: Transaction) =>
|
|
777
|
+
tx.moveCall({
|
|
778
|
+
package: packageAddress,
|
|
779
|
+
module: 'coin_registry',
|
|
780
|
+
function: 'deny_cap_id',
|
|
781
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
782
|
+
typeArguments: options.typeArguments,
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
export interface IsSupplyFixedOptions {
|
|
786
|
+
package?: string;
|
|
787
|
+
arguments: [RawTransactionArgument<string>];
|
|
788
|
+
typeArguments: [string];
|
|
789
|
+
}
|
|
790
|
+
export function isSupplyFixed(options: IsSupplyFixedOptions) {
|
|
791
|
+
const packageAddress =
|
|
792
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
793
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
794
|
+
return (tx: Transaction) =>
|
|
795
|
+
tx.moveCall({
|
|
796
|
+
package: packageAddress,
|
|
797
|
+
module: 'coin_registry',
|
|
798
|
+
function: 'is_supply_fixed',
|
|
799
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
800
|
+
typeArguments: options.typeArguments,
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
export interface IsSupplyBurnOnlyOptions {
|
|
804
|
+
package?: string;
|
|
805
|
+
arguments: [RawTransactionArgument<string>];
|
|
806
|
+
typeArguments: [string];
|
|
807
|
+
}
|
|
808
|
+
export function isSupplyBurnOnly(options: IsSupplyBurnOnlyOptions) {
|
|
809
|
+
const packageAddress =
|
|
810
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
811
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
812
|
+
return (tx: Transaction) =>
|
|
813
|
+
tx.moveCall({
|
|
814
|
+
package: packageAddress,
|
|
815
|
+
module: 'coin_registry',
|
|
816
|
+
function: 'is_supply_burn_only',
|
|
817
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
818
|
+
typeArguments: options.typeArguments,
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
export interface IsRegulatedOptions {
|
|
822
|
+
package?: string;
|
|
823
|
+
arguments: [RawTransactionArgument<string>];
|
|
824
|
+
typeArguments: [string];
|
|
825
|
+
}
|
|
826
|
+
export function isRegulated(options: IsRegulatedOptions) {
|
|
827
|
+
const packageAddress =
|
|
828
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
829
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
830
|
+
return (tx: Transaction) =>
|
|
831
|
+
tx.moveCall({
|
|
832
|
+
package: packageAddress,
|
|
833
|
+
module: 'coin_registry',
|
|
834
|
+
function: 'is_regulated',
|
|
835
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
836
|
+
typeArguments: options.typeArguments,
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
export interface TotalSupplyOptions {
|
|
840
|
+
package?: string;
|
|
841
|
+
arguments: [RawTransactionArgument<string>];
|
|
842
|
+
typeArguments: [string];
|
|
843
|
+
}
|
|
844
|
+
export function totalSupply(options: TotalSupplyOptions) {
|
|
845
|
+
const packageAddress =
|
|
846
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
847
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
848
|
+
return (tx: Transaction) =>
|
|
849
|
+
tx.moveCall({
|
|
850
|
+
package: packageAddress,
|
|
851
|
+
module: 'coin_registry',
|
|
852
|
+
function: 'total_supply',
|
|
853
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
854
|
+
typeArguments: options.typeArguments,
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
export interface ExistsOptions {
|
|
858
|
+
package?: string;
|
|
859
|
+
arguments: [RawTransactionArgument<string>];
|
|
860
|
+
typeArguments: [string];
|
|
861
|
+
}
|
|
862
|
+
export function exists(options: ExistsOptions) {
|
|
863
|
+
const packageAddress =
|
|
864
|
+
options.package ?? '0x0000000000000000000000000000000000000000000000000000000000000002';
|
|
865
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
866
|
+
return (tx: Transaction) =>
|
|
867
|
+
tx.moveCall({
|
|
868
|
+
package: packageAddress,
|
|
869
|
+
module: 'coin_registry',
|
|
870
|
+
function: 'exists',
|
|
871
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes),
|
|
872
|
+
typeArguments: options.typeArguments,
|
|
873
|
+
});
|
|
874
|
+
}
|