@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
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct } from "../utils/index.js";
|
|
5
|
+
import type { RawTransactionArgument } from "../utils/index.js";
|
|
6
|
+
import type { Transaction } from "@mysten/sui/transactions";
|
|
7
|
+
export declare const ReferralCreatedEvent: MoveStruct<{
|
|
8
|
+
referrer: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
9
|
+
referee: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
|
+
timestamp_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
11
|
+
}, "@local-pkg/zing_studio::referral::ReferralCreatedEvent">;
|
|
12
|
+
export declare const ReferralConfig: MoveStruct<{
|
|
13
|
+
share_percentage_bps: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
14
|
+
program_duration: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
15
|
+
max_cap: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
16
|
+
}, "@local-pkg/zing_studio::referral::ReferralConfig">;
|
|
17
|
+
export declare const Referral: MoveStruct<{
|
|
18
|
+
/** total earning count the value without deducted fee */
|
|
19
|
+
total_earning: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
20
|
+
referrer: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
expired_at: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
22
|
+
}, "@local-pkg/zing_studio::referral::Referral">;
|
|
23
|
+
export interface AddReferralToConfigArguments {
|
|
24
|
+
config: RawTransactionArgument<string>;
|
|
25
|
+
Cap: RawTransactionArgument<string>;
|
|
26
|
+
}
|
|
27
|
+
export interface AddReferralToConfigOptions {
|
|
28
|
+
package?: string;
|
|
29
|
+
arguments: AddReferralToConfigArguments | [
|
|
30
|
+
config: RawTransactionArgument<string>,
|
|
31
|
+
Cap: RawTransactionArgument<string>
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
export declare function addReferralToConfig(options: AddReferralToConfigOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
35
|
+
export interface SharePercentageBpsArguments {
|
|
36
|
+
config: RawTransactionArgument<string>;
|
|
37
|
+
}
|
|
38
|
+
export interface SharePercentageBpsOptions {
|
|
39
|
+
package?: string;
|
|
40
|
+
arguments: SharePercentageBpsArguments | [config: RawTransactionArgument<string>];
|
|
41
|
+
}
|
|
42
|
+
export declare function sharePercentageBps(options: SharePercentageBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
43
|
+
export interface ProgramDurationArguments {
|
|
44
|
+
config: RawTransactionArgument<string>;
|
|
45
|
+
}
|
|
46
|
+
export interface ProgramDurationOptions {
|
|
47
|
+
package?: string;
|
|
48
|
+
arguments: ProgramDurationArguments | [config: RawTransactionArgument<string>];
|
|
49
|
+
}
|
|
50
|
+
export declare function programDuration(options: ProgramDurationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
51
|
+
export interface MaxCapArguments {
|
|
52
|
+
config: RawTransactionArgument<string>;
|
|
53
|
+
}
|
|
54
|
+
export interface MaxCapOptions {
|
|
55
|
+
package?: string;
|
|
56
|
+
arguments: MaxCapArguments | [config: RawTransactionArgument<string>];
|
|
57
|
+
}
|
|
58
|
+
export declare function maxCap(options: MaxCapOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
59
|
+
export interface UpdateSharePercentageBpsArguments {
|
|
60
|
+
config: RawTransactionArgument<string>;
|
|
61
|
+
Cap: RawTransactionArgument<string>;
|
|
62
|
+
sharePercentageBps: RawTransactionArgument<number | bigint>;
|
|
63
|
+
}
|
|
64
|
+
export interface UpdateSharePercentageBpsOptions {
|
|
65
|
+
package?: string;
|
|
66
|
+
arguments: UpdateSharePercentageBpsArguments | [
|
|
67
|
+
config: RawTransactionArgument<string>,
|
|
68
|
+
Cap: RawTransactionArgument<string>,
|
|
69
|
+
sharePercentageBps: RawTransactionArgument<number | bigint>
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
export declare function updateSharePercentageBps(options: UpdateSharePercentageBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
73
|
+
export interface UpdateProgramDurationArguments {
|
|
74
|
+
config: RawTransactionArgument<string>;
|
|
75
|
+
Cap: RawTransactionArgument<string>;
|
|
76
|
+
programDuration: RawTransactionArgument<number | bigint>;
|
|
77
|
+
}
|
|
78
|
+
export interface UpdateProgramDurationOptions {
|
|
79
|
+
package?: string;
|
|
80
|
+
arguments: UpdateProgramDurationArguments | [
|
|
81
|
+
config: RawTransactionArgument<string>,
|
|
82
|
+
Cap: RawTransactionArgument<string>,
|
|
83
|
+
programDuration: RawTransactionArgument<number | bigint>
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
export declare function updateProgramDuration(options: UpdateProgramDurationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
87
|
+
export interface UpdateMaxCapArguments {
|
|
88
|
+
config: RawTransactionArgument<string>;
|
|
89
|
+
Cap: RawTransactionArgument<string>;
|
|
90
|
+
maxCap: RawTransactionArgument<number | bigint>;
|
|
91
|
+
}
|
|
92
|
+
export interface UpdateMaxCapOptions {
|
|
93
|
+
package?: string;
|
|
94
|
+
arguments: UpdateMaxCapArguments | [
|
|
95
|
+
config: RawTransactionArgument<string>,
|
|
96
|
+
Cap: RawTransactionArgument<string>,
|
|
97
|
+
maxCap: RawTransactionArgument<number | bigint>
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
export declare function updateMaxCap(options: UpdateMaxCapOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
101
|
+
export interface ReferralArguments {
|
|
102
|
+
studio: RawTransactionArgument<string>;
|
|
103
|
+
}
|
|
104
|
+
export interface ReferralOptions {
|
|
105
|
+
package?: string;
|
|
106
|
+
arguments: ReferralArguments | [studio: RawTransactionArgument<string>];
|
|
107
|
+
}
|
|
108
|
+
export declare function referral(options: ReferralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
109
|
+
export interface IsReferralExistsArguments {
|
|
110
|
+
studio: RawTransactionArgument<string>;
|
|
111
|
+
}
|
|
112
|
+
export interface IsReferralExistsOptions {
|
|
113
|
+
package?: string;
|
|
114
|
+
arguments: IsReferralExistsArguments | [studio: RawTransactionArgument<string>];
|
|
115
|
+
}
|
|
116
|
+
export declare function isReferralExists(options: IsReferralExistsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
117
|
+
export interface TotalEarningArguments {
|
|
118
|
+
self: RawTransactionArgument<string>;
|
|
119
|
+
}
|
|
120
|
+
export interface TotalEarningOptions {
|
|
121
|
+
package?: string;
|
|
122
|
+
arguments: TotalEarningArguments | [self: RawTransactionArgument<string>];
|
|
123
|
+
}
|
|
124
|
+
export declare function totalEarning(options: TotalEarningOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
125
|
+
export interface ReferrerArguments {
|
|
126
|
+
self: RawTransactionArgument<string>;
|
|
127
|
+
}
|
|
128
|
+
export interface ReferrerOptions {
|
|
129
|
+
package?: string;
|
|
130
|
+
arguments: ReferrerArguments | [self: RawTransactionArgument<string>];
|
|
131
|
+
}
|
|
132
|
+
export declare function referrer(options: ReferrerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
133
|
+
export interface ExpiredAtArguments {
|
|
134
|
+
self: RawTransactionArgument<string>;
|
|
135
|
+
}
|
|
136
|
+
export interface ExpiredAtOptions {
|
|
137
|
+
package?: string;
|
|
138
|
+
arguments: ExpiredAtArguments | [self: RawTransactionArgument<string>];
|
|
139
|
+
}
|
|
140
|
+
export declare function expiredAt(options: ExpiredAtOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
141
|
+
export interface AddTotalEarningArguments {
|
|
142
|
+
self: RawTransactionArgument<string>;
|
|
143
|
+
value: RawTransactionArgument<number | bigint>;
|
|
144
|
+
}
|
|
145
|
+
export interface AddTotalEarningOptions {
|
|
146
|
+
package?: string;
|
|
147
|
+
arguments: AddTotalEarningArguments | [
|
|
148
|
+
self: RawTransactionArgument<string>,
|
|
149
|
+
value: RawTransactionArgument<number | bigint>
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
export declare function addTotalEarning(options: AddTotalEarningOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
153
|
+
export interface AddReferralToStudioArguments {
|
|
154
|
+
studio: RawTransactionArgument<string>;
|
|
155
|
+
config: RawTransactionArgument<string>;
|
|
156
|
+
referrer: RawTransactionArgument<string>;
|
|
157
|
+
}
|
|
158
|
+
export interface AddReferralToStudioOptions {
|
|
159
|
+
package?: string;
|
|
160
|
+
arguments: AddReferralToStudioArguments | [
|
|
161
|
+
studio: RawTransactionArgument<string>,
|
|
162
|
+
config: RawTransactionArgument<string>,
|
|
163
|
+
referrer: RawTransactionArgument<string>
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
export declare function addReferralToStudio(options: AddReferralToStudioOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
5
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
6
|
+
const $moduleName = "@local-pkg/zing_studio::referral";
|
|
7
|
+
export const ReferralCreatedEvent = new MoveStruct({
|
|
8
|
+
name: `${$moduleName}::ReferralCreatedEvent`,
|
|
9
|
+
fields: {
|
|
10
|
+
referrer: bcs.Address,
|
|
11
|
+
referee: bcs.Address,
|
|
12
|
+
timestamp_ms: bcs.u64(),
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
export const ReferralConfig = new MoveStruct({
|
|
16
|
+
name: `${$moduleName}::ReferralConfig`,
|
|
17
|
+
fields: {
|
|
18
|
+
share_percentage_bps: bcs.u64(),
|
|
19
|
+
program_duration: bcs.u64(),
|
|
20
|
+
max_cap: bcs.u64(),
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
export const Referral = new MoveStruct({
|
|
24
|
+
name: `${$moduleName}::Referral`,
|
|
25
|
+
fields: {
|
|
26
|
+
/** total earning count the value without deducted fee */
|
|
27
|
+
total_earning: bcs.u64(),
|
|
28
|
+
referrer: bcs.Address,
|
|
29
|
+
expired_at: bcs.u64(),
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
export function addReferralToConfig(options) {
|
|
33
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
34
|
+
const argumentsTypes = [
|
|
35
|
+
`${packageAddress}::config::Config`,
|
|
36
|
+
`${packageAddress}::admin::AdminCap`,
|
|
37
|
+
];
|
|
38
|
+
const parameterNames = ["config", "Cap"];
|
|
39
|
+
return (tx) => tx.moveCall({
|
|
40
|
+
package: packageAddress,
|
|
41
|
+
module: "referral",
|
|
42
|
+
function: "add_referral_to_config",
|
|
43
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export function sharePercentageBps(options) {
|
|
47
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
48
|
+
const argumentsTypes = [
|
|
49
|
+
`${packageAddress}::config::Config`,
|
|
50
|
+
];
|
|
51
|
+
const parameterNames = ["config"];
|
|
52
|
+
return (tx) => tx.moveCall({
|
|
53
|
+
package: packageAddress,
|
|
54
|
+
module: "referral",
|
|
55
|
+
function: "share_percentage_bps",
|
|
56
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export function programDuration(options) {
|
|
60
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
61
|
+
const argumentsTypes = [
|
|
62
|
+
`${packageAddress}::config::Config`,
|
|
63
|
+
];
|
|
64
|
+
const parameterNames = ["config"];
|
|
65
|
+
return (tx) => tx.moveCall({
|
|
66
|
+
package: packageAddress,
|
|
67
|
+
module: "referral",
|
|
68
|
+
function: "program_duration",
|
|
69
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
export function maxCap(options) {
|
|
73
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
74
|
+
const argumentsTypes = [
|
|
75
|
+
`${packageAddress}::config::Config`,
|
|
76
|
+
];
|
|
77
|
+
const parameterNames = ["config"];
|
|
78
|
+
return (tx) => tx.moveCall({
|
|
79
|
+
package: packageAddress,
|
|
80
|
+
module: "referral",
|
|
81
|
+
function: "max_cap",
|
|
82
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export function updateSharePercentageBps(options) {
|
|
86
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
87
|
+
const argumentsTypes = [
|
|
88
|
+
`${packageAddress}::config::Config`,
|
|
89
|
+
`${packageAddress}::admin::AdminCap`,
|
|
90
|
+
"u64",
|
|
91
|
+
];
|
|
92
|
+
const parameterNames = ["config", "Cap", "sharePercentageBps"];
|
|
93
|
+
return (tx) => tx.moveCall({
|
|
94
|
+
package: packageAddress,
|
|
95
|
+
module: "referral",
|
|
96
|
+
function: "update_share_percentage_bps",
|
|
97
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
export function updateProgramDuration(options) {
|
|
101
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
102
|
+
const argumentsTypes = [
|
|
103
|
+
`${packageAddress}::config::Config`,
|
|
104
|
+
`${packageAddress}::admin::AdminCap`,
|
|
105
|
+
"u64",
|
|
106
|
+
];
|
|
107
|
+
const parameterNames = ["config", "Cap", "programDuration"];
|
|
108
|
+
return (tx) => tx.moveCall({
|
|
109
|
+
package: packageAddress,
|
|
110
|
+
module: "referral",
|
|
111
|
+
function: "update_program_duration",
|
|
112
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
export function updateMaxCap(options) {
|
|
116
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
117
|
+
const argumentsTypes = [
|
|
118
|
+
`${packageAddress}::config::Config`,
|
|
119
|
+
`${packageAddress}::admin::AdminCap`,
|
|
120
|
+
"u64",
|
|
121
|
+
];
|
|
122
|
+
const parameterNames = ["config", "Cap", "maxCap"];
|
|
123
|
+
return (tx) => tx.moveCall({
|
|
124
|
+
package: packageAddress,
|
|
125
|
+
module: "referral",
|
|
126
|
+
function: "update_max_cap",
|
|
127
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
export function referral(options) {
|
|
131
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
132
|
+
const argumentsTypes = [
|
|
133
|
+
`${packageAddress}::studio::Studio`,
|
|
134
|
+
];
|
|
135
|
+
const parameterNames = ["studio"];
|
|
136
|
+
return (tx) => tx.moveCall({
|
|
137
|
+
package: packageAddress,
|
|
138
|
+
module: "referral",
|
|
139
|
+
function: "referral",
|
|
140
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
export function isReferralExists(options) {
|
|
144
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
145
|
+
const argumentsTypes = [
|
|
146
|
+
`${packageAddress}::studio::Studio`,
|
|
147
|
+
];
|
|
148
|
+
const parameterNames = ["studio"];
|
|
149
|
+
return (tx) => tx.moveCall({
|
|
150
|
+
package: packageAddress,
|
|
151
|
+
module: "referral",
|
|
152
|
+
function: "is_referral_exists",
|
|
153
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
export function totalEarning(options) {
|
|
157
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
158
|
+
const argumentsTypes = [
|
|
159
|
+
`${packageAddress}::referral::Referral`,
|
|
160
|
+
];
|
|
161
|
+
const parameterNames = ["self"];
|
|
162
|
+
return (tx) => tx.moveCall({
|
|
163
|
+
package: packageAddress,
|
|
164
|
+
module: "referral",
|
|
165
|
+
function: "total_earning",
|
|
166
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
export function referrer(options) {
|
|
170
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
171
|
+
const argumentsTypes = [
|
|
172
|
+
`${packageAddress}::referral::Referral`,
|
|
173
|
+
];
|
|
174
|
+
const parameterNames = ["self"];
|
|
175
|
+
return (tx) => tx.moveCall({
|
|
176
|
+
package: packageAddress,
|
|
177
|
+
module: "referral",
|
|
178
|
+
function: "referrer",
|
|
179
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
export function expiredAt(options) {
|
|
183
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
184
|
+
const argumentsTypes = [
|
|
185
|
+
`${packageAddress}::referral::Referral`,
|
|
186
|
+
];
|
|
187
|
+
const parameterNames = ["self"];
|
|
188
|
+
return (tx) => tx.moveCall({
|
|
189
|
+
package: packageAddress,
|
|
190
|
+
module: "referral",
|
|
191
|
+
function: "expired_at",
|
|
192
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
export function addTotalEarning(options) {
|
|
196
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
197
|
+
const argumentsTypes = [
|
|
198
|
+
`${packageAddress}::referral::Referral`,
|
|
199
|
+
"u64",
|
|
200
|
+
];
|
|
201
|
+
const parameterNames = ["self", "value"];
|
|
202
|
+
return (tx) => tx.moveCall({
|
|
203
|
+
package: packageAddress,
|
|
204
|
+
module: "referral",
|
|
205
|
+
function: "add_total_earning",
|
|
206
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
export function addReferralToStudio(options) {
|
|
210
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
211
|
+
const argumentsTypes = [
|
|
212
|
+
`${packageAddress}::studio::Studio`,
|
|
213
|
+
`${packageAddress}::config::Config`,
|
|
214
|
+
"address",
|
|
215
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
216
|
+
];
|
|
217
|
+
const parameterNames = ["studio", "config", "referrer"];
|
|
218
|
+
return (tx) => tx.moveCall({
|
|
219
|
+
package: packageAddress,
|
|
220
|
+
module: "referral",
|
|
221
|
+
function: "add_referral_to_studio",
|
|
222
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
223
|
+
});
|
|
224
|
+
}
|