@zing-protocol/zing-sdk 0.0.16 → 0.1.0
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.d.ts +0 -2
- package/dist/_generated/index.js +0 -2
- package/dist/_generated/utils/index.d.ts +21 -2
- package/dist/_generated/utils/index.js +35 -11
- package/dist/_generated/zing_framework/coin_utils.js +1 -4
- package/dist/_generated/zing_framework/derived_object_bag.d.ts +4 -3
- package/dist/_generated/zing_framework/derived_object_bag.js +12 -37
- package/dist/_generated/zing_framework/derived_table.d.ts +5 -4
- package/dist/_generated/zing_framework/derived_table.js +12 -33
- package/dist/_generated/zing_governance/admin.d.ts +4 -17
- package/dist/_generated/zing_governance/admin.js +3 -17
- package/dist/_generated/zing_governance/treasury.d.ts +5 -4
- package/dist/_generated/zing_governance/treasury.js +5 -15
- package/dist/_generated/zing_studio/app.d.ts +70 -2
- package/dist/_generated/zing_studio/app.js +154 -100
- package/dist/_generated/zing_studio/article.d.ts +6 -52
- package/dist/_generated/zing_studio/article.js +23 -74
- package/dist/_generated/zing_studio/config.d.ts +34 -3
- package/dist/_generated/zing_studio/config.js +47 -50
- package/dist/_generated/zing_studio/deps/sui/bag.d.ts +25 -3
- package/dist/_generated/zing_studio/deps/sui/bag.js +1 -2
- package/dist/_generated/zing_studio/deps/sui/balance.d.ts +1 -1
- package/dist/_generated/zing_studio/deps/sui/balance.js +1 -1
- package/dist/_generated/zing_studio/deps/sui/coin.d.ts +3 -5
- package/dist/_generated/zing_studio/deps/sui/coin.js +3 -3
- package/dist/_generated/zing_studio/deps/sui/table.d.ts +21 -4
- package/dist/_generated/zing_studio/deps/sui/table.js +2 -3
- package/dist/_generated/zing_studio/deps/walrus/blob.d.ts +2 -6
- package/dist/_generated/zing_studio/deps/walrus/blob.js +1 -2
- package/dist/_generated/zing_studio/deps/walrus/storage_resource.d.ts +1 -3
- package/dist/_generated/zing_studio/deps/walrus/storage_resource.js +1 -2
- package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.d.ts +1 -3
- package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.js +1 -2
- package/dist/_generated/zing_studio/deps/zing_framework/derived_table.d.ts +2 -4
- package/dist/_generated/zing_studio/deps/zing_framework/derived_table.js +2 -3
- package/dist/_generated/zing_studio/donation.d.ts +6 -14
- package/dist/_generated/zing_studio/donation.js +2 -2
- package/dist/_generated/zing_studio/enclave.d.ts +17 -10
- package/dist/_generated/zing_studio/enclave.js +16 -41
- package/dist/_generated/zing_studio/referral.js +15 -46
- package/dist/_generated/zing_studio/storage.d.ts +13 -17
- package/dist/_generated/zing_studio/storage.js +46 -100
- package/dist/_generated/zing_studio/studio.d.ts +6 -28
- package/dist/_generated/zing_studio/studio.js +23 -96
- package/dist/client/index.d.ts +22 -56
- package/dist/client/index.js +4 -30
- package/dist/components/zing-provider.d.ts +2 -0
- package/dist/components/zing-provider.js +3 -2
- package/dist/getters.d.ts +17 -62
- package/dist/getters.js +62 -56
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useGetStudio.d.ts +4 -10
- package/dist/hooks/useReclaim.d.ts +0 -10
- package/dist/hooks/useReclaim.js +169 -92
- package/dist/hooks/useSignAndExecuteTransaction.js +4 -1
- package/dist/hooks/useZingInfiniteQueries.d.ts +3 -9
- package/dist/hooks/useZingInfiniteQueries.js +1 -0
- package/dist/hooks/useZingQueries.d.ts +8 -27
- package/dist/hooks/useZingQueries.js +1 -2
- package/dist/hooks/useZingQuery.d.ts +11 -36
- package/dist/hooks/useZingQuery.js +1 -2
- package/dist/lib/utils/index.d.ts +0 -1
- package/dist/lib/utils/index.js +0 -1
- package/dist/lib/utils/reclaim.d.ts +1 -29
- package/dist/lib/utils/reclaim.js +148 -87
- package/dist/mutations/signer.js +1 -1
- package/dist/mutations/walrus.js +1 -1
- package/package.json +1 -1
- package/dist/_generated/zing_framework/deps/sui/object.d.ts +0 -8
- package/dist/_generated/zing_framework/deps/sui/object.js +0 -13
- package/dist/_generated/zing_governance/deps/sui/object.d.ts +0 -8
- package/dist/_generated/zing_governance/deps/sui/object.js +0 -13
- package/dist/_generated/zing_identity/config.d.ts +0 -87
- package/dist/_generated/zing_identity/config.js +0 -98
- package/dist/_generated/zing_identity/deps/std/type_name.d.ts +0 -17
- package/dist/_generated/zing_identity/deps/std/type_name.js +0 -22
- package/dist/_generated/zing_identity/deps/sui/object.d.ts +0 -8
- package/dist/_generated/zing_identity/deps/sui/object.js +0 -13
- package/dist/_generated/zing_identity/deps/sui/object_table.d.ts +0 -12
- package/dist/_generated/zing_identity/deps/sui/object_table.js +0 -23
- package/dist/_generated/zing_identity/deps/sui/table.d.ts +0 -12
- package/dist/_generated/zing_identity/deps/sui/table.js +0 -35
- package/dist/_generated/zing_identity/deps/sui/vec_set.d.ts +0 -17
- package/dist/_generated/zing_identity/deps/sui/vec_set.js +0 -22
- package/dist/_generated/zing_identity/ecdsa.d.ts +0 -81
- package/dist/_generated/zing_identity/ecdsa.js +0 -87
- package/dist/_generated/zing_identity/identity.d.ts +0 -262
- package/dist/_generated/zing_identity/identity.js +0 -294
- package/dist/_generated/zing_identity/reclaim.d.ts +0 -356
- package/dist/_generated/zing_identity/reclaim.js +0 -414
- package/dist/_generated/zing_studio/nitro_attestation.d.ts +0 -148
- package/dist/_generated/zing_studio/nitro_attestation.js +0 -183
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import * as storage_resource from "./storage_resource.js";
|
|
5
5
|
import { MoveStruct } from "../../../utils/index.js";
|
|
6
|
-
import * as object from "../sui/object.js";
|
|
7
6
|
import { bcs } from "@mysten/sui/bcs";
|
|
8
7
|
const $moduleName = "walrus::blob";
|
|
9
8
|
export const Blob = new MoveStruct({
|
|
10
9
|
name: `${$moduleName}::Blob`,
|
|
11
10
|
fields: {
|
|
12
|
-
id:
|
|
11
|
+
id: bcs.Address,
|
|
13
12
|
registered_epoch: bcs.u32(),
|
|
14
13
|
blob_id: bcs.u256(),
|
|
15
14
|
size: bcs.u64(),
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct } from "../../../utils/index.js";
|
|
5
5
|
export declare const Storage: MoveStruct<{
|
|
6
|
-
id:
|
|
7
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
-
}, "0x2::object::UID">;
|
|
6
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
9
7
|
start_epoch: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
10
8
|
end_epoch: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
11
9
|
storage_size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct } from "../../../utils/index.js";
|
|
5
|
-
import * as object from "../sui/object.js";
|
|
6
5
|
import { bcs } from "@mysten/sui/bcs";
|
|
7
6
|
const $moduleName = "walrus::storage_resource";
|
|
8
7
|
export const Storage = new MoveStruct({
|
|
9
8
|
name: `${$moduleName}::Storage`,
|
|
10
9
|
fields: {
|
|
11
|
-
id:
|
|
10
|
+
id: bcs.Address,
|
|
12
11
|
start_epoch: bcs.u32(),
|
|
13
12
|
end_epoch: bcs.u32(),
|
|
14
13
|
storage_size: bcs.u64(),
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
import { MoveStruct } from "../../../utils/index.js";
|
|
5
5
|
export declare const DerivedObjectBag: MoveStruct<{
|
|
6
6
|
/** the ID of this bag */
|
|
7
|
-
id:
|
|
8
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
9
|
-
}, "0x2::object::UID">;
|
|
7
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
8
|
/** the number of key-value pairs in the bag */
|
|
11
9
|
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
10
|
}, "zing_framework::derived_object_bag::DerivedObjectBag">;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct } from "../../../utils/index.js";
|
|
5
|
-
import * as object from "../sui/object.js";
|
|
6
5
|
import { bcs } from "@mysten/sui/bcs";
|
|
7
6
|
const $moduleName = "zing_framework::derived_object_bag";
|
|
8
7
|
export const DerivedObjectBag = new MoveStruct({
|
|
9
8
|
name: `${$moduleName}::DerivedObjectBag`,
|
|
10
9
|
fields: {
|
|
11
10
|
/** the ID of this bag */
|
|
12
|
-
id:
|
|
11
|
+
id: bcs.Address,
|
|
13
12
|
/** the number of key-value pairs in the bag */
|
|
14
13
|
size: bcs.u64(),
|
|
15
14
|
},
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
import { MoveStruct } from "../../../utils/index.js";
|
|
5
5
|
export declare const DerivedTable: MoveStruct<{
|
|
6
6
|
/** the ID of this table */
|
|
7
|
-
id:
|
|
8
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
9
|
-
}, "0x2::object::UID">;
|
|
7
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
8
|
/** the number of key-value pairs in the table */
|
|
11
9
|
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
-
}, "zing_framework::derived_table::DerivedTable">;
|
|
10
|
+
}, "zing_framework::derived_table::DerivedTable<phantom K, phantom V>">;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct } from "../../../utils/index.js";
|
|
5
|
-
import * as object from "../sui/object.js";
|
|
6
5
|
import { bcs } from "@mysten/sui/bcs";
|
|
7
6
|
const $moduleName = "zing_framework::derived_table";
|
|
8
7
|
export const DerivedTable = new MoveStruct({
|
|
9
|
-
name: `${$moduleName}::DerivedTable
|
|
8
|
+
name: `${$moduleName}::DerivedTable<phantom K, phantom V>`,
|
|
10
9
|
fields: {
|
|
11
10
|
/** the ID of this table */
|
|
12
|
-
id:
|
|
11
|
+
id: bcs.Address,
|
|
13
12
|
/** the number of key-value pairs in the table */
|
|
14
13
|
size: bcs.u64(),
|
|
15
14
|
},
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.js";
|
|
2
2
|
export declare const Donation: MoveStruct<{
|
|
3
|
-
id:
|
|
4
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
5
|
-
}, "0x2::object::UID">;
|
|
3
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
6
4
|
donations: MoveStruct<{
|
|
7
|
-
id:
|
|
8
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
9
|
-
}, "0x2::object::UID">;
|
|
5
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
6
|
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
11
|
-
}, "0x2::table::Table">;
|
|
7
|
+
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
12
8
|
accumulated_donations: MoveStruct<{
|
|
13
|
-
id:
|
|
14
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
-
}, "0x2::object::UID">;
|
|
9
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
10
|
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
17
|
-
}, "0x2::table::Table">;
|
|
11
|
+
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
18
12
|
balances: MoveStruct<{
|
|
19
|
-
id:
|
|
20
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
-
}, "0x2::object::UID">;
|
|
13
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
22
14
|
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
23
15
|
}, "0x2::bag::Bag">;
|
|
24
16
|
}, "@local-pkg/zing_studio::donation::Donation">;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import * as bag from "./deps/sui/bag.js";
|
|
5
|
-
import * as object from "./deps/sui/object.js";
|
|
6
5
|
import * as table from "./deps/sui/table.js";
|
|
7
6
|
import { MoveStruct } from "../utils/index.js";
|
|
7
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
8
8
|
const $moduleName = "@local-pkg/zing_studio::donation";
|
|
9
9
|
export const Donation = new MoveStruct({
|
|
10
10
|
name: `${$moduleName}::Donation`,
|
|
11
11
|
fields: {
|
|
12
|
-
id:
|
|
12
|
+
id: bcs.Address,
|
|
13
13
|
donations: table.Table,
|
|
14
14
|
accumulated_donations: table.Table,
|
|
15
15
|
balances: bag.Bag,
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
1
4
|
import { MoveTuple, MoveStruct } from "../utils/index.js";
|
|
2
5
|
import type { RawTransactionArgument } from "../utils/index.js";
|
|
3
6
|
import type { BcsType } from "@mysten/sui/bcs";
|
|
4
7
|
import type { Transaction } from "@mysten/sui/transactions";
|
|
5
|
-
export declare const Pcrs: MoveTuple<BcsType<number[], Iterable<number> & {
|
|
8
|
+
export declare const Pcrs: MoveTuple<readonly [BcsType<number[], Iterable<number> & {
|
|
6
9
|
length: number;
|
|
7
|
-
}, string
|
|
10
|
+
}, string>, BcsType<number[], Iterable<number> & {
|
|
11
|
+
length: number;
|
|
12
|
+
}, string>, BcsType<number[], Iterable<number> & {
|
|
13
|
+
length: number;
|
|
14
|
+
}, string>], "@local-pkg/zing_studio::enclave::Pcrs">;
|
|
8
15
|
export declare const EnclaveConfig: MoveStruct<{
|
|
9
|
-
id:
|
|
10
|
-
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
-
}, "0x2::object::UID">;
|
|
16
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
17
|
name: BcsType<string, string, "string">;
|
|
13
|
-
pcrs: MoveTuple<BcsType<number[], Iterable<number> & {
|
|
18
|
+
pcrs: MoveTuple<readonly [BcsType<number[], Iterable<number> & {
|
|
19
|
+
length: number;
|
|
20
|
+
}, string>, BcsType<number[], Iterable<number> & {
|
|
21
|
+
length: number;
|
|
22
|
+
}, string>, BcsType<number[], Iterable<number> & {
|
|
14
23
|
length: number;
|
|
15
|
-
}, string>
|
|
24
|
+
}, string>], "@local-pkg/zing_studio::enclave::Pcrs">;
|
|
16
25
|
version: BcsType<string, string | number | bigint, "u64">;
|
|
17
26
|
}, "@local-pkg/zing_studio::enclave::EnclaveConfig">;
|
|
18
27
|
export declare const Enclave: MoveStruct<{
|
|
19
|
-
id:
|
|
20
|
-
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
-
}, "0x2::object::UID">;
|
|
28
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
22
29
|
pk: BcsType<number[], Iterable<number> & {
|
|
23
30
|
length: number;
|
|
24
31
|
}, string>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**************************************************************
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
|
-
import * as object from "./deps/sui/object.js";
|
|
5
4
|
import { MoveTuple, MoveStruct, normalizeMoveArguments, } from "../utils/index.js";
|
|
6
5
|
import { bcs } from "@mysten/sui/bcs";
|
|
7
6
|
const $moduleName = "@local-pkg/zing_studio::enclave";
|
|
@@ -12,7 +11,7 @@ export const Pcrs = new MoveTuple({
|
|
|
12
11
|
export const EnclaveConfig = new MoveStruct({
|
|
13
12
|
name: `${$moduleName}::EnclaveConfig`,
|
|
14
13
|
fields: {
|
|
15
|
-
id:
|
|
14
|
+
id: bcs.Address,
|
|
16
15
|
name: bcs.string(),
|
|
17
16
|
pcrs: Pcrs,
|
|
18
17
|
version: bcs.u64(),
|
|
@@ -21,7 +20,7 @@ export const EnclaveConfig = new MoveStruct({
|
|
|
21
20
|
export const Enclave = new MoveStruct({
|
|
22
21
|
name: `${$moduleName}::Enclave`,
|
|
23
22
|
fields: {
|
|
24
|
-
id:
|
|
23
|
+
id: bcs.Address,
|
|
25
24
|
pk: bcs.vector(bcs.u8()),
|
|
26
25
|
config_version: bcs.u64(),
|
|
27
26
|
owner: bcs.Address,
|
|
@@ -40,8 +39,8 @@ export function IntentMessage(...typeParameters) {
|
|
|
40
39
|
export function createEnclaveConfig(options) {
|
|
41
40
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
42
41
|
const argumentsTypes = [
|
|
43
|
-
|
|
44
|
-
"
|
|
42
|
+
null,
|
|
43
|
+
"0x1::string::String",
|
|
45
44
|
"vector<u8>",
|
|
46
45
|
"vector<u8>",
|
|
47
46
|
"vector<u8>",
|
|
@@ -56,10 +55,7 @@ export function createEnclaveConfig(options) {
|
|
|
56
55
|
}
|
|
57
56
|
export function registerEnclave(options) {
|
|
58
57
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
59
|
-
const argumentsTypes = [
|
|
60
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
61
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::nitro_attestation::NitroAttestationDocument",
|
|
62
|
-
];
|
|
58
|
+
const argumentsTypes = [null, null];
|
|
63
59
|
const parameterNames = ["enclaveConfig", "document"];
|
|
64
60
|
return (tx) => tx.moveCall({
|
|
65
61
|
package: packageAddress,
|
|
@@ -71,7 +67,7 @@ export function registerEnclave(options) {
|
|
|
71
67
|
export function verifySignature(options) {
|
|
72
68
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
73
69
|
const argumentsTypes = [
|
|
74
|
-
|
|
70
|
+
null,
|
|
75
71
|
"u8",
|
|
76
72
|
"u64",
|
|
77
73
|
`${options.typeArguments[0]}`,
|
|
@@ -94,11 +90,7 @@ export function verifySignature(options) {
|
|
|
94
90
|
}
|
|
95
91
|
export function updatePcrsWithDocument(options) {
|
|
96
92
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
97
|
-
const argumentsTypes = [
|
|
98
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
99
|
-
`${packageAddress}::admin::AdminCap`,
|
|
100
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::nitro_attestation::NitroAttestationDocument",
|
|
101
|
-
];
|
|
93
|
+
const argumentsTypes = [null, null, null];
|
|
102
94
|
const parameterNames = ["config", "Cap", "document"];
|
|
103
95
|
return (tx) => tx.moveCall({
|
|
104
96
|
package: packageAddress,
|
|
@@ -110,8 +102,8 @@ export function updatePcrsWithDocument(options) {
|
|
|
110
102
|
export function updatePcrs(options) {
|
|
111
103
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
112
104
|
const argumentsTypes = [
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
null,
|
|
106
|
+
null,
|
|
115
107
|
"vector<u8>",
|
|
116
108
|
"vector<u8>",
|
|
117
109
|
"vector<u8>",
|
|
@@ -126,11 +118,7 @@ export function updatePcrs(options) {
|
|
|
126
118
|
}
|
|
127
119
|
export function updateName(options) {
|
|
128
120
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
129
|
-
const argumentsTypes = [
|
|
130
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
131
|
-
`${packageAddress}::admin::AdminCap`,
|
|
132
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
|
|
133
|
-
];
|
|
121
|
+
const argumentsTypes = [null, null, "0x1::string::String"];
|
|
134
122
|
const parameterNames = ["config", "Cap", "name"];
|
|
135
123
|
return (tx) => tx.moveCall({
|
|
136
124
|
package: packageAddress,
|
|
@@ -141,9 +129,7 @@ export function updateName(options) {
|
|
|
141
129
|
}
|
|
142
130
|
export function pcr0(options) {
|
|
143
131
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
144
|
-
const argumentsTypes = [
|
|
145
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
146
|
-
];
|
|
132
|
+
const argumentsTypes = [null];
|
|
147
133
|
const parameterNames = ["config"];
|
|
148
134
|
return (tx) => tx.moveCall({
|
|
149
135
|
package: packageAddress,
|
|
@@ -154,9 +140,7 @@ export function pcr0(options) {
|
|
|
154
140
|
}
|
|
155
141
|
export function pcr1(options) {
|
|
156
142
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
157
|
-
const argumentsTypes = [
|
|
158
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
159
|
-
];
|
|
143
|
+
const argumentsTypes = [null];
|
|
160
144
|
const parameterNames = ["config"];
|
|
161
145
|
return (tx) => tx.moveCall({
|
|
162
146
|
package: packageAddress,
|
|
@@ -167,9 +151,7 @@ export function pcr1(options) {
|
|
|
167
151
|
}
|
|
168
152
|
export function pcr2(options) {
|
|
169
153
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
170
|
-
const argumentsTypes = [
|
|
171
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
172
|
-
];
|
|
154
|
+
const argumentsTypes = [null];
|
|
173
155
|
const parameterNames = ["config"];
|
|
174
156
|
return (tx) => tx.moveCall({
|
|
175
157
|
package: packageAddress,
|
|
@@ -180,9 +162,7 @@ export function pcr2(options) {
|
|
|
180
162
|
}
|
|
181
163
|
export function pk(options) {
|
|
182
164
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
183
|
-
const argumentsTypes = [
|
|
184
|
-
`${packageAddress}::enclave::Enclave`,
|
|
185
|
-
];
|
|
165
|
+
const argumentsTypes = [null];
|
|
186
166
|
const parameterNames = ["enclave"];
|
|
187
167
|
return (tx) => tx.moveCall({
|
|
188
168
|
package: packageAddress,
|
|
@@ -193,10 +173,7 @@ export function pk(options) {
|
|
|
193
173
|
}
|
|
194
174
|
export function destroyOldEnclave(options) {
|
|
195
175
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
196
|
-
const argumentsTypes = [
|
|
197
|
-
`${packageAddress}::enclave::Enclave`,
|
|
198
|
-
`${packageAddress}::enclave::EnclaveConfig`,
|
|
199
|
-
];
|
|
176
|
+
const argumentsTypes = [null, null];
|
|
200
177
|
const parameterNames = ["e", "config"];
|
|
201
178
|
return (tx) => tx.moveCall({
|
|
202
179
|
package: packageAddress,
|
|
@@ -207,9 +184,7 @@ export function destroyOldEnclave(options) {
|
|
|
207
184
|
}
|
|
208
185
|
export function deployOldEnclaveByOwner(options) {
|
|
209
186
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
210
|
-
const argumentsTypes = [
|
|
211
|
-
`${packageAddress}::enclave::Enclave`,
|
|
212
|
-
];
|
|
187
|
+
const argumentsTypes = [null];
|
|
213
188
|
const parameterNames = ["e"];
|
|
214
189
|
return (tx) => tx.moveCall({
|
|
215
190
|
package: packageAddress,
|
|
@@ -32,10 +32,7 @@ export const Referral = new MoveStruct({
|
|
|
32
32
|
});
|
|
33
33
|
export function addReferralToConfig(options) {
|
|
34
34
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
35
|
-
const argumentsTypes = [
|
|
36
|
-
`${packageAddress}::config::Config`,
|
|
37
|
-
`${packageAddress}::admin::AdminCap`,
|
|
38
|
-
];
|
|
35
|
+
const argumentsTypes = [null, null];
|
|
39
36
|
const parameterNames = ["config", "Cap"];
|
|
40
37
|
return (tx) => tx.moveCall({
|
|
41
38
|
package: packageAddress,
|
|
@@ -46,9 +43,7 @@ export function addReferralToConfig(options) {
|
|
|
46
43
|
}
|
|
47
44
|
export function sharePercentageBps(options) {
|
|
48
45
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
49
|
-
const argumentsTypes = [
|
|
50
|
-
`${packageAddress}::config::Config`,
|
|
51
|
-
];
|
|
46
|
+
const argumentsTypes = [null];
|
|
52
47
|
const parameterNames = ["config"];
|
|
53
48
|
return (tx) => tx.moveCall({
|
|
54
49
|
package: packageAddress,
|
|
@@ -59,9 +54,7 @@ export function sharePercentageBps(options) {
|
|
|
59
54
|
}
|
|
60
55
|
export function programDuration(options) {
|
|
61
56
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
62
|
-
const argumentsTypes = [
|
|
63
|
-
`${packageAddress}::config::Config`,
|
|
64
|
-
];
|
|
57
|
+
const argumentsTypes = [null];
|
|
65
58
|
const parameterNames = ["config"];
|
|
66
59
|
return (tx) => tx.moveCall({
|
|
67
60
|
package: packageAddress,
|
|
@@ -72,9 +65,7 @@ export function programDuration(options) {
|
|
|
72
65
|
}
|
|
73
66
|
export function maxCap(options) {
|
|
74
67
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
75
|
-
const argumentsTypes = [
|
|
76
|
-
`${packageAddress}::config::Config`,
|
|
77
|
-
];
|
|
68
|
+
const argumentsTypes = [null];
|
|
78
69
|
const parameterNames = ["config"];
|
|
79
70
|
return (tx) => tx.moveCall({
|
|
80
71
|
package: packageAddress,
|
|
@@ -85,11 +76,7 @@ export function maxCap(options) {
|
|
|
85
76
|
}
|
|
86
77
|
export function updateSharePercentageBps(options) {
|
|
87
78
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
88
|
-
const argumentsTypes = [
|
|
89
|
-
`${packageAddress}::config::Config`,
|
|
90
|
-
`${packageAddress}::admin::AdminCap`,
|
|
91
|
-
"u64",
|
|
92
|
-
];
|
|
79
|
+
const argumentsTypes = [null, null, "u64"];
|
|
93
80
|
const parameterNames = ["config", "Cap", "sharePercentageBps"];
|
|
94
81
|
return (tx) => tx.moveCall({
|
|
95
82
|
package: packageAddress,
|
|
@@ -100,11 +87,7 @@ export function updateSharePercentageBps(options) {
|
|
|
100
87
|
}
|
|
101
88
|
export function updateProgramDuration(options) {
|
|
102
89
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
103
|
-
const argumentsTypes = [
|
|
104
|
-
`${packageAddress}::config::Config`,
|
|
105
|
-
`${packageAddress}::admin::AdminCap`,
|
|
106
|
-
"u64",
|
|
107
|
-
];
|
|
90
|
+
const argumentsTypes = [null, null, "u64"];
|
|
108
91
|
const parameterNames = ["config", "Cap", "programDuration"];
|
|
109
92
|
return (tx) => tx.moveCall({
|
|
110
93
|
package: packageAddress,
|
|
@@ -115,11 +98,7 @@ export function updateProgramDuration(options) {
|
|
|
115
98
|
}
|
|
116
99
|
export function updateMaxCap(options) {
|
|
117
100
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
118
|
-
const argumentsTypes = [
|
|
119
|
-
`${packageAddress}::config::Config`,
|
|
120
|
-
`${packageAddress}::admin::AdminCap`,
|
|
121
|
-
"u64",
|
|
122
|
-
];
|
|
101
|
+
const argumentsTypes = [null, null, "u64"];
|
|
123
102
|
const parameterNames = ["config", "Cap", "maxCap"];
|
|
124
103
|
return (tx) => tx.moveCall({
|
|
125
104
|
package: packageAddress,
|
|
@@ -130,9 +109,7 @@ export function updateMaxCap(options) {
|
|
|
130
109
|
}
|
|
131
110
|
export function referral(options) {
|
|
132
111
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
133
|
-
const argumentsTypes = [
|
|
134
|
-
`${packageAddress}::studio::Studio`,
|
|
135
|
-
];
|
|
112
|
+
const argumentsTypes = [null];
|
|
136
113
|
const parameterNames = ["studio"];
|
|
137
114
|
return (tx) => tx.moveCall({
|
|
138
115
|
package: packageAddress,
|
|
@@ -143,9 +120,7 @@ export function referral(options) {
|
|
|
143
120
|
}
|
|
144
121
|
export function isReferralExists(options) {
|
|
145
122
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
146
|
-
const argumentsTypes = [
|
|
147
|
-
`${packageAddress}::studio::Studio`,
|
|
148
|
-
];
|
|
123
|
+
const argumentsTypes = [null];
|
|
149
124
|
const parameterNames = ["studio"];
|
|
150
125
|
return (tx) => tx.moveCall({
|
|
151
126
|
package: packageAddress,
|
|
@@ -156,9 +131,7 @@ export function isReferralExists(options) {
|
|
|
156
131
|
}
|
|
157
132
|
export function referrer(options) {
|
|
158
133
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
159
|
-
const argumentsTypes = [
|
|
160
|
-
`${packageAddress}::referral::Referral`,
|
|
161
|
-
];
|
|
134
|
+
const argumentsTypes = [null];
|
|
162
135
|
const parameterNames = ["self"];
|
|
163
136
|
return (tx) => tx.moveCall({
|
|
164
137
|
package: packageAddress,
|
|
@@ -169,9 +142,7 @@ export function referrer(options) {
|
|
|
169
142
|
}
|
|
170
143
|
export function expiredAt(options) {
|
|
171
144
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
172
|
-
const argumentsTypes = [
|
|
173
|
-
`${packageAddress}::referral::Referral`,
|
|
174
|
-
];
|
|
145
|
+
const argumentsTypes = [null];
|
|
175
146
|
const parameterNames = ["self"];
|
|
176
147
|
return (tx) => tx.moveCall({
|
|
177
148
|
package: packageAddress,
|
|
@@ -182,9 +153,7 @@ export function expiredAt(options) {
|
|
|
182
153
|
}
|
|
183
154
|
export function referrerEarning(options) {
|
|
184
155
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
185
|
-
const argumentsTypes = [
|
|
186
|
-
`${packageAddress}::referral::Referral`,
|
|
187
|
-
];
|
|
156
|
+
const argumentsTypes = [null];
|
|
188
157
|
const parameterNames = ["self"];
|
|
189
158
|
return (tx) => tx.moveCall({
|
|
190
159
|
package: packageAddress,
|
|
@@ -196,10 +165,10 @@ export function referrerEarning(options) {
|
|
|
196
165
|
export function addReferralToStudio(options) {
|
|
197
166
|
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
198
167
|
const argumentsTypes = [
|
|
199
|
-
|
|
200
|
-
|
|
168
|
+
null,
|
|
169
|
+
null,
|
|
201
170
|
"address",
|
|
202
|
-
"
|
|
171
|
+
"0x2::clock::Clock",
|
|
203
172
|
];
|
|
204
173
|
const parameterNames = ["studio", "config", "referrer"];
|
|
205
174
|
return (tx) => tx.moveCall({
|
|
@@ -36,9 +36,7 @@ export declare const TreasuryUsageBudget: MoveStruct<{
|
|
|
36
36
|
max_budget: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
37
37
|
}, "@local-pkg/zing_studio::storage::TreasuryUsageBudget">;
|
|
38
38
|
export declare const StorageTreasury: MoveStruct<{
|
|
39
|
-
id:
|
|
40
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
41
|
-
}, "0x2::object::UID">;
|
|
39
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
42
40
|
tier_plan: MoveStruct<{
|
|
43
41
|
contents: import("@mysten/sui/bcs").BcsType<{
|
|
44
42
|
key: number;
|
|
@@ -66,9 +64,7 @@ export declare const StorageTreasury: MoveStruct<{
|
|
|
66
64
|
contents: import("@mysten/sui/bcs").BcsType<{
|
|
67
65
|
key: number;
|
|
68
66
|
value: {
|
|
69
|
-
id:
|
|
70
|
-
id: string;
|
|
71
|
-
};
|
|
67
|
+
id: string;
|
|
72
68
|
start_epoch: number;
|
|
73
69
|
end_epoch: number;
|
|
74
70
|
storage_size: string;
|
|
@@ -76,9 +72,7 @@ export declare const StorageTreasury: MoveStruct<{
|
|
|
76
72
|
}[], Iterable<{
|
|
77
73
|
key: number;
|
|
78
74
|
value: {
|
|
79
|
-
id:
|
|
80
|
-
id: string | Uint8Array<ArrayBufferLike>;
|
|
81
|
-
};
|
|
75
|
+
id: string | Uint8Array<ArrayBufferLike>;
|
|
82
76
|
start_epoch: number;
|
|
83
77
|
end_epoch: number;
|
|
84
78
|
storage_size: string | number | bigint;
|
|
@@ -100,13 +94,11 @@ export declare const StorageTreasury: MoveStruct<{
|
|
|
100
94
|
}, string>;
|
|
101
95
|
}, "0x2::vec_map::VecMap<u32, u64>">;
|
|
102
96
|
wal_treasury: MoveStruct<{
|
|
103
|
-
id:
|
|
104
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
105
|
-
}, "0x2::object::UID">;
|
|
97
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
106
98
|
balance: MoveStruct<{
|
|
107
99
|
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
108
|
-
}, "0x2::balance::Balance">;
|
|
109
|
-
}, "0x2::coin::Coin">;
|
|
100
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
101
|
+
}, "0x2::coin::Coin<phantom T>">;
|
|
110
102
|
wal_treasury_usage_budget: MoveStruct<{
|
|
111
103
|
contents: import("@mysten/sui/bcs").BcsType<{
|
|
112
104
|
key: number;
|
|
@@ -130,9 +122,7 @@ export declare const TreasuryUsage: MoveStruct<{
|
|
|
130
122
|
start_at: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
131
123
|
}, "@local-pkg/zing_studio::storage::TreasuryUsage">;
|
|
132
124
|
export declare const StorageSpace: MoveStruct<{
|
|
133
|
-
id:
|
|
134
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
135
|
-
}, "0x2::object::UID">;
|
|
125
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
136
126
|
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
137
127
|
/** Storage tier that determines the storage limit and pricing */
|
|
138
128
|
tier: import("@mysten/sui/bcs").BcsType<number | null, number | null | undefined, "Option<u8>">;
|
|
@@ -346,6 +336,7 @@ export interface RemainingStorageOptions {
|
|
|
346
336
|
export declare function remainingStorage(options: RemainingStorageOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
347
337
|
export interface UpdateTierPlanArguments {
|
|
348
338
|
self: RawTransactionArgument<string>;
|
|
339
|
+
config: RawTransactionArgument<string>;
|
|
349
340
|
Cap: RawTransactionArgument<string>;
|
|
350
341
|
tierIndex: RawTransactionArgument<number>;
|
|
351
342
|
price: RawTransactionArgument<number | bigint>;
|
|
@@ -356,6 +347,7 @@ export interface UpdateTierPlanOptions {
|
|
|
356
347
|
package?: string;
|
|
357
348
|
arguments: UpdateTierPlanArguments | [
|
|
358
349
|
self: RawTransactionArgument<string>,
|
|
350
|
+
config: RawTransactionArgument<string>,
|
|
359
351
|
Cap: RawTransactionArgument<string>,
|
|
360
352
|
tierIndex: RawTransactionArgument<number>,
|
|
361
353
|
price: RawTransactionArgument<number | bigint>,
|
|
@@ -366,6 +358,7 @@ export interface UpdateTierPlanOptions {
|
|
|
366
358
|
export declare function updateTierPlan(options: UpdateTierPlanOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
367
359
|
export interface UpdateWalTreasuryUsageBudgetArguments {
|
|
368
360
|
self: RawTransactionArgument<string>;
|
|
361
|
+
config: RawTransactionArgument<string>;
|
|
369
362
|
Cap: RawTransactionArgument<string>;
|
|
370
363
|
tierIndex: RawTransactionArgument<number>;
|
|
371
364
|
duration: RawTransactionArgument<number | bigint>;
|
|
@@ -375,6 +368,7 @@ export interface UpdateWalTreasuryUsageBudgetOptions {
|
|
|
375
368
|
package?: string;
|
|
376
369
|
arguments: UpdateWalTreasuryUsageBudgetArguments | [
|
|
377
370
|
self: RawTransactionArgument<string>,
|
|
371
|
+
config: RawTransactionArgument<string>,
|
|
378
372
|
Cap: RawTransactionArgument<string>,
|
|
379
373
|
tierIndex: RawTransactionArgument<number>,
|
|
380
374
|
duration: RawTransactionArgument<number | bigint>,
|
|
@@ -385,6 +379,7 @@ export declare function updateWalTreasuryUsageBudget(options: UpdateWalTreasuryU
|
|
|
385
379
|
export interface RemoveStorageByAdminArguments {
|
|
386
380
|
self: RawTransactionArgument<string>;
|
|
387
381
|
walrusSystem: RawTransactionArgument<string>;
|
|
382
|
+
config: RawTransactionArgument<string>;
|
|
388
383
|
Cap: RawTransactionArgument<string>;
|
|
389
384
|
epoch: RawTransactionArgument<number>;
|
|
390
385
|
splitSize: RawTransactionArgument<number | bigint>;
|
|
@@ -394,6 +389,7 @@ export interface RemoveStorageByAdminOptions {
|
|
|
394
389
|
arguments: RemoveStorageByAdminArguments | [
|
|
395
390
|
self: RawTransactionArgument<string>,
|
|
396
391
|
walrusSystem: RawTransactionArgument<string>,
|
|
392
|
+
config: RawTransactionArgument<string>,
|
|
397
393
|
Cap: RawTransactionArgument<string>,
|
|
398
394
|
epoch: RawTransactionArgument<number>,
|
|
399
395
|
splitSize: RawTransactionArgument<number | bigint>
|