@zing-protocol/zing-sdk 0.0.1 → 0.0.3
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/dist/_generated/index.js +6 -0
- package/dist/_generated/utils/index.d.ts +12 -0
- package/dist/_generated/utils/index.js +135 -0
- package/dist/_generated/zing_framework/coin_utils.d.ts +15 -0
- package/dist/_generated/zing_framework/coin_utils.js +19 -0
- package/dist/_generated/zing_framework/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_governance/deps/sui/object.ts → dist/_generated/zing_framework/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_framework/derived_object_bag.d.ts +166 -0
- package/dist/_generated/zing_framework/derived_object_bag.js +221 -0
- package/dist/_generated/zing_framework/derived_table.d.ts +153 -0
- package/dist/_generated/zing_framework/derived_table.js +200 -0
- package/dist/_generated/zing_governance/admin.d.ts +20 -0
- package/dist/_generated/zing_governance/admin.js +26 -0
- package/dist/_generated/zing_governance/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_identity/deps/sui/object.ts → dist/_generated/zing_governance/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_governance/treasury.d.ts +56 -0
- package/dist/_generated/zing_governance/treasury.js +78 -0
- package/dist/_generated/zing_identity/config.d.ts +87 -0
- package/dist/_generated/zing_identity/config.js +98 -0
- package/{src/_generated/zing_studio/deps/std/type_name.ts → dist/_generated/zing_identity/deps/std/type_name.d.ts} +3 -11
- package/dist/_generated/zing_identity/deps/std/type_name.js +22 -0
- package/dist/_generated/zing_identity/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_studio/deps/sui/object.ts → dist/_generated/zing_identity/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_identity/deps/sui/object_table.d.ts +12 -0
- package/{src/_generated/zing_identity/deps/sui/object_table.ts → dist/_generated/zing_identity/deps/sui/object_table.js} +7 -10
- package/dist/_generated/zing_identity/deps/sui/table.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/table.ts → dist/_generated/zing_identity/deps/sui/table.js} +7 -10
- package/{src/_generated/zing_identity/deps/sui/vec_set.ts → dist/_generated/zing_identity/deps/sui/vec_set.d.ts} +3 -14
- package/dist/_generated/zing_identity/deps/sui/vec_set.js +22 -0
- package/dist/_generated/zing_identity/ecdsa.d.ts +81 -0
- package/dist/_generated/zing_identity/ecdsa.js +87 -0
- package/dist/_generated/zing_identity/identity.d.ts +262 -0
- package/dist/_generated/zing_identity/identity.js +294 -0
- package/dist/_generated/zing_identity/reclaim.d.ts +356 -0
- package/dist/_generated/zing_identity/reclaim.js +414 -0
- package/dist/_generated/zing_studio/app.d.ts +351 -0
- package/dist/_generated/zing_studio/app.js +451 -0
- package/dist/_generated/zing_studio/article.d.ts +331 -0
- package/dist/_generated/zing_studio/article.js +331 -0
- package/dist/_generated/zing_studio/config.d.ts +203 -0
- package/dist/_generated/zing_studio/config.js +233 -0
- package/{src/_generated/zing_identity/deps/std/type_name.ts → dist/_generated/zing_studio/deps/std/type_name.d.ts} +3 -11
- package/dist/_generated/zing_studio/deps/std/type_name.js +22 -0
- package/dist/_generated/zing_studio/deps/sui/bag.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/bag.ts → dist/_generated/zing_studio/deps/sui/bag.js} +7 -10
- package/dist/_generated/zing_studio/deps/sui/balance.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/balance.ts → dist/_generated/zing_studio/deps/sui/balance.js} +4 -7
- package/dist/_generated/zing_studio/deps/sui/coin.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/coin.ts → dist/_generated/zing_studio/deps/sui/coin.js} +5 -8
- package/dist/_generated/zing_studio/deps/sui/dynamic_field.d.ts +126 -0
- package/dist/_generated/zing_studio/deps/sui/dynamic_field.js +140 -0
- package/dist/_generated/zing_studio/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_framework/deps/sui/object.ts → dist/_generated/zing_studio/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_studio/deps/sui/table.d.ts +12 -0
- package/{src/_generated/zing_identity/deps/sui/table.ts → dist/_generated/zing_studio/deps/sui/table.js} +7 -10
- package/dist/_generated/zing_studio/deps/sui/vec_map.d.ts +30 -0
- package/{src/_generated/zing_studio/deps/sui/vec_map.ts → dist/_generated/zing_studio/deps/sui/vec_map.js} +15 -21
- package/{src/_generated/zing_studio/deps/sui/vec_set.ts → dist/_generated/zing_studio/deps/sui/vec_set.d.ts} +3 -14
- package/dist/_generated/zing_studio/deps/sui/vec_set.js +22 -0
- package/dist/_generated/zing_studio/deps/walrus/blob.d.ts +20 -0
- package/{src/_generated/zing_studio/deps/walrus/blob.ts → dist/_generated/zing_studio/deps/walrus/blob.js} +11 -12
- package/dist/_generated/zing_studio/deps/walrus/events.d.ts +83 -0
- package/dist/_generated/zing_studio/deps/walrus/events.js +122 -0
- package/dist/_generated/zing_studio/deps/walrus/metadata.d.ts +71 -0
- package/dist/_generated/zing_studio/deps/walrus/metadata.js +73 -0
- package/dist/_generated/zing_studio/deps/walrus/storage_resource.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/walrus/storage_resource.ts → dist/_generated/zing_studio/deps/walrus/storage_resource.js} +7 -8
- package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/zing_framework/derived_object_bag.ts → dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.js} +7 -8
- package/dist/_generated/zing_studio/deps/zing_framework/derived_table.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/zing_framework/derived_table.ts → dist/_generated/zing_studio/deps/zing_framework/derived_table.js} +7 -8
- package/dist/_generated/zing_studio/donation.d.ts +24 -0
- package/{src/_generated/zing_studio/donation.ts → dist/_generated/zing_studio/donation.js} +7 -8
- package/dist/_generated/zing_studio/enclave.d.ts +187 -0
- package/dist/_generated/zing_studio/enclave.js +231 -0
- package/dist/_generated/zing_studio/nitro_attestation.d.ts +148 -0
- package/dist/_generated/zing_studio/nitro_attestation.js +183 -0
- package/dist/_generated/zing_studio/referral.d.ts +166 -0
- package/dist/_generated/zing_studio/referral.js +224 -0
- package/dist/_generated/zing_studio/storage.d.ts +327 -0
- package/dist/_generated/zing_studio/storage.js +365 -0
- package/dist/_generated/zing_studio/studio.d.ts +282 -0
- package/dist/_generated/zing_studio/studio.js +360 -0
- package/dist/bcs.d.ts +61 -0
- package/dist/bcs.js +109 -0
- package/dist/client/index.d.ts +228 -0
- package/dist/client/index.js +296 -0
- package/dist/client/types.d.ts +23 -0
- package/dist/client/types.js +1 -0
- package/dist/components/index.js +3 -0
- package/dist/components/wallet-provider.d.ts +7 -0
- package/dist/components/wallet-provider.js +33 -0
- package/dist/components/walrus-provider.d.ts +31 -0
- package/dist/components/walrus-provider.js +71 -0
- package/dist/components/zing-provider.d.ts +15 -0
- package/dist/components/zing-provider.js +22 -0
- package/dist/config/common.d.ts +23 -0
- package/dist/config/common.js +61 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.js +28 -0
- package/dist/config/mainnet.d.ts +6 -0
- package/dist/config/mainnet.js +80 -0
- package/dist/config/testnet.d.ts +6 -0
- package/dist/config/testnet.js +81 -0
- package/dist/config/types.d.ts +49 -0
- package/dist/config/types.js +1 -0
- package/dist/const.d.ts +4 -0
- package/dist/const.js +25 -0
- package/dist/getters.d.ts +228 -0
- package/dist/getters.js +317 -0
- package/{src/hooks/index.ts → dist/hooks/index.d.ts} +2 -3
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/useGetStudio.d.ts +26 -0
- package/dist/hooks/useGetStudio.js +17 -0
- package/dist/hooks/useGetTierPlan.d.ts +7 -0
- package/dist/hooks/useGetTierPlan.js +85 -0
- package/dist/hooks/useReclaim.d.ts +12 -0
- package/dist/hooks/useReclaim.js +87 -0
- package/dist/hooks/useSignAndExecuteTransaction.d.ts +6 -0
- package/dist/hooks/useSignAndExecuteTransaction.js +40 -0
- package/dist/hooks/useSignPersonalMessage.d.ts +8 -0
- package/dist/hooks/useSignPersonalMessage.js +21 -0
- package/dist/hooks/useZingInfiniteQueries.d.ts +75 -0
- package/dist/hooks/useZingInfiniteQueries.js +28 -0
- package/dist/hooks/useZingMutation.d.ts +35 -0
- package/dist/hooks/useZingMutation.js +37 -0
- package/dist/hooks/useZingQueries.d.ts +127 -0
- package/dist/hooks/useZingQueries.js +37 -0
- package/dist/hooks/useZingQuery.d.ts +147 -0
- package/dist/hooks/useZingQuery.js +34 -0
- package/{src/index.ts → dist/index.d.ts} +2 -3
- package/dist/index.js +9 -0
- package/dist/lib/utils/colorful-logger.d.ts +2 -0
- package/dist/lib/utils/colorful-logger.js +23 -0
- package/dist/lib/utils/const.d.ts +25 -0
- package/dist/lib/utils/const.js +25 -0
- package/dist/lib/utils/helpers.d.ts +10 -0
- package/dist/lib/utils/helpers.js +49 -0
- package/dist/lib/utils/index.js +4 -0
- package/dist/lib/utils/init-app-with-shadow.d.ts +6 -0
- package/dist/lib/utils/init-app-with-shadow.js +28 -0
- package/dist/lib/utils/quilt.d.ts +61 -0
- package/dist/lib/utils/quilt.js +194 -0
- package/dist/lib/utils/reclaim.d.ts +29 -0
- package/dist/lib/utils/reclaim.js +88 -0
- package/dist/lib/utils/types.d.ts +5 -0
- package/dist/lib/utils/types.js +1 -0
- package/dist/mutations/index.js +3 -0
- package/dist/mutations/seal.d.ts +12 -0
- package/dist/mutations/seal.js +41 -0
- package/dist/mutations/signer.d.ts +10 -0
- package/dist/mutations/signer.js +176 -0
- package/dist/mutations/walrus.d.ts +98 -0
- package/dist/mutations/walrus.js +488 -0
- package/dist/stores/index.js +3 -0
- package/dist/stores/walletStore.d.ts +48 -0
- package/dist/stores/walletStore.js +232 -0
- package/dist/stores/walrusStore.d.ts +28 -0
- package/dist/stores/walrusStore.js +61 -0
- package/dist/stores/zkloginStore.d.ts +28 -0
- package/dist/stores/zkloginStore.js +27 -0
- package/dist/types.d.ts +99 -0
- package/dist/types.js +1 -0
- package/package.json +18 -10
- package/src/_generated/utils/index.ts +0 -181
- package/src/_generated/zing_framework/coin_utils.ts +0 -41
- package/src/_generated/zing_framework/derived_object_bag.ts +0 -400
- package/src/_generated/zing_framework/derived_table.ts +0 -366
- package/src/_generated/zing_governance/admin.ts +0 -47
- package/src/_generated/zing_governance/treasury.ts +0 -134
- package/src/_generated/zing_identity/config.ts +0 -191
- package/src/_generated/zing_identity/ecdsa.ts +0 -166
- package/src/_generated/zing_identity/identity.ts +0 -661
- package/src/_generated/zing_identity/reclaim.ts +0 -803
- package/src/_generated/zing_studio/app.ts +0 -855
- package/src/_generated/zing_studio/article.ts +0 -598
- package/src/_generated/zing_studio/config.ts +0 -475
- package/src/_generated/zing_studio/deps/sui/dynamic_field.ts +0 -272
- package/src/_generated/zing_studio/deps/walrus/events.ts +0 -124
- package/src/_generated/zing_studio/deps/walrus/metadata.ts +0 -137
- package/src/_generated/zing_studio/enclave.ts +0 -466
- package/src/_generated/zing_studio/nitro_attestation.ts +0 -308
- package/src/_generated/zing_studio/referral.ts +0 -447
- package/src/_generated/zing_studio/storage.ts +0 -664
- package/src/_generated/zing_studio/studio.ts +0 -682
- package/src/bcs.ts +0 -139
- package/src/client/index.ts +0 -557
- package/src/client/types.ts +0 -28
- package/src/components/wallet-provider.tsx +0 -53
- package/src/components/walrus-provider.tsx +0 -212
- package/src/components/zing-provider.tsx +0 -54
- package/src/config/common.ts +0 -82
- package/src/config/index.ts +0 -45
- package/src/config/mainnet.ts +0 -109
- package/src/config/testnet.ts +0 -111
- package/src/config/types.ts +0 -69
- package/src/const.ts +0 -32
- package/src/getters.ts +0 -523
- package/src/hooks/useGetStudio.ts +0 -22
- package/src/hooks/useGetTierPlan.ts +0 -115
- package/src/hooks/useReclaim.ts +0 -165
- package/src/hooks/useSignAndExecuteTransaction.ts +0 -57
- package/src/hooks/useSignPersonalMessage.ts +0 -28
- package/src/hooks/useZingInfiniteQueries.ts +0 -92
- package/src/hooks/useZingMutation.ts +0 -66
- package/src/hooks/useZingQueries.ts +0 -107
- package/src/hooks/useZingQuery.ts +0 -88
- package/src/lib/utils/colorful-logger.ts +0 -27
- package/src/lib/utils/const.ts +0 -25
- package/src/lib/utils/helpers.ts +0 -78
- package/src/lib/utils/init-app-with-shadow.ts +0 -42
- package/src/lib/utils/quilt.ts +0 -317
- package/src/lib/utils/reclaim.ts +0 -148
- package/src/lib/utils/types.ts +0 -14
- package/src/mutations/seal.ts +0 -78
- package/src/mutations/signer.ts +0 -241
- package/src/mutations/walrus.ts +0 -862
- package/src/stores/walletStore.ts +0 -360
- package/src/stores/walrusStore.ts +0 -118
- package/src/stores/zkloginStore.ts +0 -53
- package/src/types.ts +0 -120
- package/tsconfig.json +0 -12
- /package/{src/_generated/index.js → dist/_generated/index.d.ts} +0 -0
- /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
- /package/{src/lib/utils/index.ts → dist/lib/utils/index.d.ts} +0 -0
- /package/{src/mutations/index.ts → dist/mutations/index.d.ts} +0 -0
- /package/{src/stores/index.ts → dist/stores/index.d.ts} +0 -0
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
import * as type_name from "./deps/std/type_name.js";
|
|
5
|
-
import * as object from "./deps/sui/object.js";
|
|
6
|
-
import * as vec_set from "./deps/sui/vec_set.js";
|
|
7
|
-
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
8
|
-
import { bcs } from "@mysten/sui/bcs";
|
|
9
|
-
import type { RawTransactionArgument } from "../utils/index.js";
|
|
10
|
-
import type { Transaction } from "@mysten/sui/transactions";
|
|
11
|
-
|
|
12
|
-
const $moduleName = "@local-pkg/zing_studio::config";
|
|
13
|
-
export const Config = new MoveStruct({
|
|
14
|
-
name: `${$moduleName}::Config`,
|
|
15
|
-
fields: {
|
|
16
|
-
id: object.UID,
|
|
17
|
-
versions: vec_set.VecSet(bcs.u64()),
|
|
18
|
-
managers: vec_set.VecSet(bcs.Address),
|
|
19
|
-
allowed_works: vec_set.VecSet(type_name.TypeName),
|
|
20
|
-
platform_fee_bps: bcs.u64(),
|
|
21
|
-
allowed_stablecoins: vec_set.VecSet(type_name.TypeName),
|
|
22
|
-
max_num_of_subscription_level: bcs.u8(),
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
export interface PackageVersionOptions {
|
|
26
|
-
package?: string;
|
|
27
|
-
arguments?: [];
|
|
28
|
-
}
|
|
29
|
-
export function packageVersion(options: PackageVersionOptions = {}) {
|
|
30
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
31
|
-
return (tx: Transaction) =>
|
|
32
|
-
tx.moveCall({
|
|
33
|
-
package: packageAddress,
|
|
34
|
-
module: "config",
|
|
35
|
-
function: "package_version",
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export interface FeeScalingOptions {
|
|
39
|
-
package?: string;
|
|
40
|
-
arguments?: [];
|
|
41
|
-
}
|
|
42
|
-
export function feeScaling(options: FeeScalingOptions = {}) {
|
|
43
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
44
|
-
return (tx: Transaction) =>
|
|
45
|
-
tx.moveCall({
|
|
46
|
-
package: packageAddress,
|
|
47
|
-
module: "config",
|
|
48
|
-
function: "fee_scaling",
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
export interface MonthDurationInWalrusEpochOptions {
|
|
52
|
-
package?: string;
|
|
53
|
-
arguments?: [];
|
|
54
|
-
}
|
|
55
|
-
export function monthDurationInWalrusEpoch(
|
|
56
|
-
options: MonthDurationInWalrusEpochOptions = {},
|
|
57
|
-
) {
|
|
58
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
59
|
-
return (tx: Transaction) =>
|
|
60
|
-
tx.moveCall({
|
|
61
|
-
package: packageAddress,
|
|
62
|
-
module: "config",
|
|
63
|
-
function: "month_duration_in_walrus_epoch",
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
export interface DayInMilliesecondOptions {
|
|
67
|
-
package?: string;
|
|
68
|
-
arguments?: [];
|
|
69
|
-
}
|
|
70
|
-
export function dayInMilliesecond(options: DayInMilliesecondOptions = {}) {
|
|
71
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
72
|
-
return (tx: Transaction) =>
|
|
73
|
-
tx.moveCall({
|
|
74
|
-
package: packageAddress,
|
|
75
|
-
module: "config",
|
|
76
|
-
function: "day_in_milliesecond",
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
export interface BlobExtendedDurationOptions {
|
|
80
|
-
package?: string;
|
|
81
|
-
arguments?: [];
|
|
82
|
-
}
|
|
83
|
-
export function blobExtendedDuration(
|
|
84
|
-
options: BlobExtendedDurationOptions = {},
|
|
85
|
-
) {
|
|
86
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
87
|
-
return (tx: Transaction) =>
|
|
88
|
-
tx.moveCall({
|
|
89
|
-
package: packageAddress,
|
|
90
|
-
module: "config",
|
|
91
|
-
function: "blob_extended_duration",
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
export interface ManagersArguments {
|
|
95
|
-
self: RawTransactionArgument<string>;
|
|
96
|
-
}
|
|
97
|
-
export interface ManagersOptions {
|
|
98
|
-
package?: string;
|
|
99
|
-
arguments: ManagersArguments | [self: RawTransactionArgument<string>];
|
|
100
|
-
}
|
|
101
|
-
export function managers(options: ManagersOptions) {
|
|
102
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
103
|
-
const argumentsTypes = [
|
|
104
|
-
`${packageAddress}::config::Config`,
|
|
105
|
-
] satisfies string[];
|
|
106
|
-
const parameterNames = ["self"];
|
|
107
|
-
return (tx: Transaction) =>
|
|
108
|
-
tx.moveCall({
|
|
109
|
-
package: packageAddress,
|
|
110
|
-
module: "config",
|
|
111
|
-
function: "managers",
|
|
112
|
-
arguments: normalizeMoveArguments(
|
|
113
|
-
options.arguments,
|
|
114
|
-
argumentsTypes,
|
|
115
|
-
parameterNames,
|
|
116
|
-
),
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
export interface AllowedWorksArguments {
|
|
120
|
-
self: RawTransactionArgument<string>;
|
|
121
|
-
}
|
|
122
|
-
export interface AllowedWorksOptions {
|
|
123
|
-
package?: string;
|
|
124
|
-
arguments: AllowedWorksArguments | [self: RawTransactionArgument<string>];
|
|
125
|
-
}
|
|
126
|
-
export function allowedWorks(options: AllowedWorksOptions) {
|
|
127
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
128
|
-
const argumentsTypes = [
|
|
129
|
-
`${packageAddress}::config::Config`,
|
|
130
|
-
] satisfies string[];
|
|
131
|
-
const parameterNames = ["self"];
|
|
132
|
-
return (tx: Transaction) =>
|
|
133
|
-
tx.moveCall({
|
|
134
|
-
package: packageAddress,
|
|
135
|
-
module: "config",
|
|
136
|
-
function: "allowed_works",
|
|
137
|
-
arguments: normalizeMoveArguments(
|
|
138
|
-
options.arguments,
|
|
139
|
-
argumentsTypes,
|
|
140
|
-
parameterNames,
|
|
141
|
-
),
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
export interface PlatformFeeBpsArguments {
|
|
145
|
-
self: RawTransactionArgument<string>;
|
|
146
|
-
}
|
|
147
|
-
export interface PlatformFeeBpsOptions {
|
|
148
|
-
package?: string;
|
|
149
|
-
arguments: PlatformFeeBpsArguments | [self: RawTransactionArgument<string>];
|
|
150
|
-
}
|
|
151
|
-
export function platformFeeBps(options: PlatformFeeBpsOptions) {
|
|
152
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
153
|
-
const argumentsTypes = [
|
|
154
|
-
`${packageAddress}::config::Config`,
|
|
155
|
-
] satisfies string[];
|
|
156
|
-
const parameterNames = ["self"];
|
|
157
|
-
return (tx: Transaction) =>
|
|
158
|
-
tx.moveCall({
|
|
159
|
-
package: packageAddress,
|
|
160
|
-
module: "config",
|
|
161
|
-
function: "platform_fee_bps",
|
|
162
|
-
arguments: normalizeMoveArguments(
|
|
163
|
-
options.arguments,
|
|
164
|
-
argumentsTypes,
|
|
165
|
-
parameterNames,
|
|
166
|
-
),
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
export interface AllowedStablecoinsArguments {
|
|
170
|
-
self: RawTransactionArgument<string>;
|
|
171
|
-
}
|
|
172
|
-
export interface AllowedStablecoinsOptions {
|
|
173
|
-
package?: string;
|
|
174
|
-
arguments:
|
|
175
|
-
| AllowedStablecoinsArguments
|
|
176
|
-
| [self: RawTransactionArgument<string>];
|
|
177
|
-
}
|
|
178
|
-
export function allowedStablecoins(options: AllowedStablecoinsOptions) {
|
|
179
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
180
|
-
const argumentsTypes = [
|
|
181
|
-
`${packageAddress}::config::Config`,
|
|
182
|
-
] satisfies string[];
|
|
183
|
-
const parameterNames = ["self"];
|
|
184
|
-
return (tx: Transaction) =>
|
|
185
|
-
tx.moveCall({
|
|
186
|
-
package: packageAddress,
|
|
187
|
-
module: "config",
|
|
188
|
-
function: "allowed_stablecoins",
|
|
189
|
-
arguments: normalizeMoveArguments(
|
|
190
|
-
options.arguments,
|
|
191
|
-
argumentsTypes,
|
|
192
|
-
parameterNames,
|
|
193
|
-
),
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
export interface AddVersionArguments {
|
|
197
|
-
self: RawTransactionArgument<string>;
|
|
198
|
-
Cap: RawTransactionArgument<string>;
|
|
199
|
-
version: RawTransactionArgument<number | bigint>;
|
|
200
|
-
}
|
|
201
|
-
export interface AddVersionOptions {
|
|
202
|
-
package?: string;
|
|
203
|
-
arguments:
|
|
204
|
-
| AddVersionArguments
|
|
205
|
-
| [
|
|
206
|
-
self: RawTransactionArgument<string>,
|
|
207
|
-
Cap: RawTransactionArgument<string>,
|
|
208
|
-
version: RawTransactionArgument<number | bigint>,
|
|
209
|
-
];
|
|
210
|
-
}
|
|
211
|
-
export function addVersion(options: AddVersionOptions) {
|
|
212
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
213
|
-
const argumentsTypes = [
|
|
214
|
-
`${packageAddress}::config::Config`,
|
|
215
|
-
`${packageAddress}::admin::AdminCap`,
|
|
216
|
-
"u64",
|
|
217
|
-
] satisfies string[];
|
|
218
|
-
const parameterNames = ["self", "Cap", "version"];
|
|
219
|
-
return (tx: Transaction) =>
|
|
220
|
-
tx.moveCall({
|
|
221
|
-
package: packageAddress,
|
|
222
|
-
module: "config",
|
|
223
|
-
function: "add_version",
|
|
224
|
-
arguments: normalizeMoveArguments(
|
|
225
|
-
options.arguments,
|
|
226
|
-
argumentsTypes,
|
|
227
|
-
parameterNames,
|
|
228
|
-
),
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
export interface RemoveVersionArguments {
|
|
232
|
-
self: RawTransactionArgument<string>;
|
|
233
|
-
Cap: RawTransactionArgument<string>;
|
|
234
|
-
version: RawTransactionArgument<number | bigint>;
|
|
235
|
-
}
|
|
236
|
-
export interface RemoveVersionOptions {
|
|
237
|
-
package?: string;
|
|
238
|
-
arguments:
|
|
239
|
-
| RemoveVersionArguments
|
|
240
|
-
| [
|
|
241
|
-
self: RawTransactionArgument<string>,
|
|
242
|
-
Cap: RawTransactionArgument<string>,
|
|
243
|
-
version: RawTransactionArgument<number | bigint>,
|
|
244
|
-
];
|
|
245
|
-
}
|
|
246
|
-
export function removeVersion(options: RemoveVersionOptions) {
|
|
247
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
248
|
-
const argumentsTypes = [
|
|
249
|
-
`${packageAddress}::config::Config`,
|
|
250
|
-
`${packageAddress}::admin::AdminCap`,
|
|
251
|
-
"u64",
|
|
252
|
-
] satisfies string[];
|
|
253
|
-
const parameterNames = ["self", "Cap", "version"];
|
|
254
|
-
return (tx: Transaction) =>
|
|
255
|
-
tx.moveCall({
|
|
256
|
-
package: packageAddress,
|
|
257
|
-
module: "config",
|
|
258
|
-
function: "remove_version",
|
|
259
|
-
arguments: normalizeMoveArguments(
|
|
260
|
-
options.arguments,
|
|
261
|
-
argumentsTypes,
|
|
262
|
-
parameterNames,
|
|
263
|
-
),
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
export interface AddAllowedWorksArguments {
|
|
267
|
-
self: RawTransactionArgument<string>;
|
|
268
|
-
Cap: RawTransactionArgument<string>;
|
|
269
|
-
}
|
|
270
|
-
export interface AddAllowedWorksOptions {
|
|
271
|
-
package?: string;
|
|
272
|
-
arguments:
|
|
273
|
-
| AddAllowedWorksArguments
|
|
274
|
-
| [
|
|
275
|
-
self: RawTransactionArgument<string>,
|
|
276
|
-
Cap: RawTransactionArgument<string>,
|
|
277
|
-
];
|
|
278
|
-
typeArguments: [string];
|
|
279
|
-
}
|
|
280
|
-
export function addAllowedWorks(options: AddAllowedWorksOptions) {
|
|
281
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
282
|
-
const argumentsTypes = [
|
|
283
|
-
`${packageAddress}::config::Config`,
|
|
284
|
-
`${packageAddress}::admin::AdminCap`,
|
|
285
|
-
] satisfies string[];
|
|
286
|
-
const parameterNames = ["self", "Cap"];
|
|
287
|
-
return (tx: Transaction) =>
|
|
288
|
-
tx.moveCall({
|
|
289
|
-
package: packageAddress,
|
|
290
|
-
module: "config",
|
|
291
|
-
function: "add_allowed_works",
|
|
292
|
-
arguments: normalizeMoveArguments(
|
|
293
|
-
options.arguments,
|
|
294
|
-
argumentsTypes,
|
|
295
|
-
parameterNames,
|
|
296
|
-
),
|
|
297
|
-
typeArguments: options.typeArguments,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
export interface RemoveAllowedWorksArguments {
|
|
301
|
-
self: RawTransactionArgument<string>;
|
|
302
|
-
Cap: RawTransactionArgument<string>;
|
|
303
|
-
}
|
|
304
|
-
export interface RemoveAllowedWorksOptions {
|
|
305
|
-
package?: string;
|
|
306
|
-
arguments:
|
|
307
|
-
| RemoveAllowedWorksArguments
|
|
308
|
-
| [
|
|
309
|
-
self: RawTransactionArgument<string>,
|
|
310
|
-
Cap: RawTransactionArgument<string>,
|
|
311
|
-
];
|
|
312
|
-
typeArguments: [string];
|
|
313
|
-
}
|
|
314
|
-
export function removeAllowedWorks(options: RemoveAllowedWorksOptions) {
|
|
315
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
316
|
-
const argumentsTypes = [
|
|
317
|
-
`${packageAddress}::config::Config`,
|
|
318
|
-
`${packageAddress}::admin::AdminCap`,
|
|
319
|
-
] satisfies string[];
|
|
320
|
-
const parameterNames = ["self", "Cap"];
|
|
321
|
-
return (tx: Transaction) =>
|
|
322
|
-
tx.moveCall({
|
|
323
|
-
package: packageAddress,
|
|
324
|
-
module: "config",
|
|
325
|
-
function: "remove_allowed_works",
|
|
326
|
-
arguments: normalizeMoveArguments(
|
|
327
|
-
options.arguments,
|
|
328
|
-
argumentsTypes,
|
|
329
|
-
parameterNames,
|
|
330
|
-
),
|
|
331
|
-
typeArguments: options.typeArguments,
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
export interface UpdatePlatformFeeBpsArguments {
|
|
335
|
-
self: RawTransactionArgument<string>;
|
|
336
|
-
Cap: RawTransactionArgument<string>;
|
|
337
|
-
platformFeeBps: RawTransactionArgument<number | bigint>;
|
|
338
|
-
}
|
|
339
|
-
export interface UpdatePlatformFeeBpsOptions {
|
|
340
|
-
package?: string;
|
|
341
|
-
arguments:
|
|
342
|
-
| UpdatePlatformFeeBpsArguments
|
|
343
|
-
| [
|
|
344
|
-
self: RawTransactionArgument<string>,
|
|
345
|
-
Cap: RawTransactionArgument<string>,
|
|
346
|
-
platformFeeBps: RawTransactionArgument<number | bigint>,
|
|
347
|
-
];
|
|
348
|
-
}
|
|
349
|
-
export function updatePlatformFeeBps(options: UpdatePlatformFeeBpsOptions) {
|
|
350
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
351
|
-
const argumentsTypes = [
|
|
352
|
-
`${packageAddress}::config::Config`,
|
|
353
|
-
`${packageAddress}::admin::AdminCap`,
|
|
354
|
-
"u64",
|
|
355
|
-
] satisfies string[];
|
|
356
|
-
const parameterNames = ["self", "Cap", "platformFeeBps"];
|
|
357
|
-
return (tx: Transaction) =>
|
|
358
|
-
tx.moveCall({
|
|
359
|
-
package: packageAddress,
|
|
360
|
-
module: "config",
|
|
361
|
-
function: "update_platform_fee_bps",
|
|
362
|
-
arguments: normalizeMoveArguments(
|
|
363
|
-
options.arguments,
|
|
364
|
-
argumentsTypes,
|
|
365
|
-
parameterNames,
|
|
366
|
-
),
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
export interface AddAllowedStablecoinsArguments {
|
|
370
|
-
self: RawTransactionArgument<string>;
|
|
371
|
-
Cap: RawTransactionArgument<string>;
|
|
372
|
-
}
|
|
373
|
-
export interface AddAllowedStablecoinsOptions {
|
|
374
|
-
package?: string;
|
|
375
|
-
arguments:
|
|
376
|
-
| AddAllowedStablecoinsArguments
|
|
377
|
-
| [
|
|
378
|
-
self: RawTransactionArgument<string>,
|
|
379
|
-
Cap: RawTransactionArgument<string>,
|
|
380
|
-
];
|
|
381
|
-
typeArguments: [string];
|
|
382
|
-
}
|
|
383
|
-
export function addAllowedStablecoins(options: AddAllowedStablecoinsOptions) {
|
|
384
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
385
|
-
const argumentsTypes = [
|
|
386
|
-
`${packageAddress}::config::Config`,
|
|
387
|
-
`${packageAddress}::admin::AdminCap`,
|
|
388
|
-
] satisfies string[];
|
|
389
|
-
const parameterNames = ["self", "Cap"];
|
|
390
|
-
return (tx: Transaction) =>
|
|
391
|
-
tx.moveCall({
|
|
392
|
-
package: packageAddress,
|
|
393
|
-
module: "config",
|
|
394
|
-
function: "add_allowed_stablecoins",
|
|
395
|
-
arguments: normalizeMoveArguments(
|
|
396
|
-
options.arguments,
|
|
397
|
-
argumentsTypes,
|
|
398
|
-
parameterNames,
|
|
399
|
-
),
|
|
400
|
-
typeArguments: options.typeArguments,
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
export interface RemoveAllowedStablecoinsArguments {
|
|
404
|
-
self: RawTransactionArgument<string>;
|
|
405
|
-
Cap: RawTransactionArgument<string>;
|
|
406
|
-
}
|
|
407
|
-
export interface RemoveAllowedStablecoinsOptions {
|
|
408
|
-
package?: string;
|
|
409
|
-
arguments:
|
|
410
|
-
| RemoveAllowedStablecoinsArguments
|
|
411
|
-
| [
|
|
412
|
-
self: RawTransactionArgument<string>,
|
|
413
|
-
Cap: RawTransactionArgument<string>,
|
|
414
|
-
];
|
|
415
|
-
typeArguments: [string];
|
|
416
|
-
}
|
|
417
|
-
export function removeAllowedStablecoins(
|
|
418
|
-
options: RemoveAllowedStablecoinsOptions,
|
|
419
|
-
) {
|
|
420
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
421
|
-
const argumentsTypes = [
|
|
422
|
-
`${packageAddress}::config::Config`,
|
|
423
|
-
`${packageAddress}::admin::AdminCap`,
|
|
424
|
-
] satisfies string[];
|
|
425
|
-
const parameterNames = ["self", "Cap"];
|
|
426
|
-
return (tx: Transaction) =>
|
|
427
|
-
tx.moveCall({
|
|
428
|
-
package: packageAddress,
|
|
429
|
-
module: "config",
|
|
430
|
-
function: "remove_allowed_stablecoins",
|
|
431
|
-
arguments: normalizeMoveArguments(
|
|
432
|
-
options.arguments,
|
|
433
|
-
argumentsTypes,
|
|
434
|
-
parameterNames,
|
|
435
|
-
),
|
|
436
|
-
typeArguments: options.typeArguments,
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
export interface UpdaqteMaxNumOfSubscriptionLevelArguments {
|
|
440
|
-
self: RawTransactionArgument<string>;
|
|
441
|
-
Cap: RawTransactionArgument<string>;
|
|
442
|
-
num: RawTransactionArgument<number>;
|
|
443
|
-
}
|
|
444
|
-
export interface UpdaqteMaxNumOfSubscriptionLevelOptions {
|
|
445
|
-
package?: string;
|
|
446
|
-
arguments:
|
|
447
|
-
| UpdaqteMaxNumOfSubscriptionLevelArguments
|
|
448
|
-
| [
|
|
449
|
-
self: RawTransactionArgument<string>,
|
|
450
|
-
Cap: RawTransactionArgument<string>,
|
|
451
|
-
num: RawTransactionArgument<number>,
|
|
452
|
-
];
|
|
453
|
-
}
|
|
454
|
-
export function updaqteMaxNumOfSubscriptionLevel(
|
|
455
|
-
options: UpdaqteMaxNumOfSubscriptionLevelOptions,
|
|
456
|
-
) {
|
|
457
|
-
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
458
|
-
const argumentsTypes = [
|
|
459
|
-
`${packageAddress}::config::Config`,
|
|
460
|
-
`${packageAddress}::admin::AdminCap`,
|
|
461
|
-
"u8",
|
|
462
|
-
] satisfies string[];
|
|
463
|
-
const parameterNames = ["self", "Cap", "num"];
|
|
464
|
-
return (tx: Transaction) =>
|
|
465
|
-
tx.moveCall({
|
|
466
|
-
package: packageAddress,
|
|
467
|
-
module: "config",
|
|
468
|
-
function: "updaqte_max_num_of_subscription_level",
|
|
469
|
-
arguments: normalizeMoveArguments(
|
|
470
|
-
options.arguments,
|
|
471
|
-
argumentsTypes,
|
|
472
|
-
parameterNames,
|
|
473
|
-
),
|
|
474
|
-
});
|
|
475
|
-
}
|