@zing-protocol/zing-sdk 0.0.1 → 0.0.2
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 +14 -6
- 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,331 @@
|
|
|
1
|
+
import { MoveStruct } from "../utils/index.js";
|
|
2
|
+
import type { RawTransactionArgument } from "../utils/index.js";
|
|
3
|
+
import type { Transaction } from "@mysten/sui/transactions";
|
|
4
|
+
export declare const File: MoveStruct<{
|
|
5
|
+
/**
|
|
6
|
+
* Whether the file is publicly accessible Index of the blob containing this file's
|
|
7
|
+
* data
|
|
8
|
+
*/
|
|
9
|
+
blob_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
10
|
+
/** MIME type of the file */
|
|
11
|
+
mime_type: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
12
|
+
/** Size of the file in bytes */
|
|
13
|
+
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
14
|
+
}, "@local-pkg/zing_studio::article::File">;
|
|
15
|
+
export declare const PublishArticleEvent: MoveStruct<{
|
|
16
|
+
article_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
17
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
18
|
+
blob_ids: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
19
|
+
length: number;
|
|
20
|
+
}, string>;
|
|
21
|
+
blob_sizes: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
22
|
+
length: number;
|
|
23
|
+
}, string>;
|
|
24
|
+
blob_storage_sizes: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
25
|
+
length: number;
|
|
26
|
+
}, string>;
|
|
27
|
+
blob_end_epochs: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
28
|
+
length: number;
|
|
29
|
+
}, string>;
|
|
30
|
+
files: MoveStruct<{
|
|
31
|
+
contents: import("@mysten/sui/bcs").BcsType<{
|
|
32
|
+
key: string;
|
|
33
|
+
value: {
|
|
34
|
+
blob_index: string;
|
|
35
|
+
mime_type: string;
|
|
36
|
+
size: string;
|
|
37
|
+
};
|
|
38
|
+
}[], Iterable<{
|
|
39
|
+
key: string;
|
|
40
|
+
value: {
|
|
41
|
+
blob_index: string | number | bigint;
|
|
42
|
+
mime_type: string;
|
|
43
|
+
size: string | number | bigint;
|
|
44
|
+
};
|
|
45
|
+
}> & {
|
|
46
|
+
length: number;
|
|
47
|
+
}, string>;
|
|
48
|
+
}, "0x2::vec_map::VecMap<string, @local-pkg/zing_studio::article::File>">;
|
|
49
|
+
timestamp_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
50
|
+
}, "@local-pkg/zing_studio::article::PublishArticleEvent">;
|
|
51
|
+
export declare const BurnArticleEvent: MoveStruct<{
|
|
52
|
+
article_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
53
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
54
|
+
current_epoch: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
55
|
+
blob_end_epochs: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
56
|
+
length: number;
|
|
57
|
+
}, string>;
|
|
58
|
+
timestamp_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
59
|
+
}, "@local-pkg/zing_studio::article::BurnArticleEvent">;
|
|
60
|
+
export declare const RenewArticleEvent: MoveStruct<{
|
|
61
|
+
article_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
62
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
63
|
+
current_epoch: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
64
|
+
prev_blob_end_epochs: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
65
|
+
length: number;
|
|
66
|
+
}, string>;
|
|
67
|
+
new_blob_end_epochs: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
68
|
+
length: number;
|
|
69
|
+
}, string>;
|
|
70
|
+
}, "@local-pkg/zing_studio::article::RenewArticleEvent">;
|
|
71
|
+
export declare const ARTICLE: MoveStruct<{
|
|
72
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
73
|
+
}, "@local-pkg/zing_studio::article::ARTICLE">;
|
|
74
|
+
export declare const Article: MoveStruct<{
|
|
75
|
+
id: MoveStruct<{
|
|
76
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
77
|
+
}, "0x2::object::UID">;
|
|
78
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
79
|
+
deleted: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
80
|
+
created_at: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
81
|
+
subscription_level: import("@mysten/sui/bcs").BcsType<number | null, number | null | undefined, "Option<u8>">;
|
|
82
|
+
/**
|
|
83
|
+
* Storage blobs containing the article content (all blobs must have compatible
|
|
84
|
+
* properties)
|
|
85
|
+
*/
|
|
86
|
+
blobs: import("@mysten/sui/bcs").BcsType<{
|
|
87
|
+
id: {
|
|
88
|
+
id: string;
|
|
89
|
+
};
|
|
90
|
+
registered_epoch: number;
|
|
91
|
+
blob_id: string;
|
|
92
|
+
size: string;
|
|
93
|
+
encoding_type: number;
|
|
94
|
+
certified_epoch: number | null;
|
|
95
|
+
storage: {
|
|
96
|
+
id: {
|
|
97
|
+
id: string;
|
|
98
|
+
};
|
|
99
|
+
start_epoch: number;
|
|
100
|
+
end_epoch: number;
|
|
101
|
+
storage_size: string;
|
|
102
|
+
};
|
|
103
|
+
deletable: boolean;
|
|
104
|
+
}[], Iterable<{
|
|
105
|
+
id: {
|
|
106
|
+
id: string | Uint8Array<ArrayBufferLike>;
|
|
107
|
+
};
|
|
108
|
+
registered_epoch: number;
|
|
109
|
+
blob_id: string | number | bigint;
|
|
110
|
+
size: string | number | bigint;
|
|
111
|
+
encoding_type: number;
|
|
112
|
+
certified_epoch: number | null | undefined;
|
|
113
|
+
storage: {
|
|
114
|
+
id: {
|
|
115
|
+
id: string | Uint8Array<ArrayBufferLike>;
|
|
116
|
+
};
|
|
117
|
+
start_epoch: number;
|
|
118
|
+
end_epoch: number;
|
|
119
|
+
storage_size: string | number | bigint;
|
|
120
|
+
};
|
|
121
|
+
deletable: boolean;
|
|
122
|
+
}> & {
|
|
123
|
+
length: number;
|
|
124
|
+
}, string>;
|
|
125
|
+
/** Maps file identifiers to their corresponding metadata */
|
|
126
|
+
files: MoveStruct<{
|
|
127
|
+
contents: import("@mysten/sui/bcs").BcsType<{
|
|
128
|
+
key: string;
|
|
129
|
+
value: {
|
|
130
|
+
blob_index: string;
|
|
131
|
+
mime_type: string;
|
|
132
|
+
size: string;
|
|
133
|
+
};
|
|
134
|
+
}[], Iterable<{
|
|
135
|
+
key: string;
|
|
136
|
+
value: {
|
|
137
|
+
blob_index: string | number | bigint;
|
|
138
|
+
mime_type: string;
|
|
139
|
+
size: string | number | bigint;
|
|
140
|
+
};
|
|
141
|
+
}> & {
|
|
142
|
+
length: number;
|
|
143
|
+
}, string>;
|
|
144
|
+
}, "0x2::vec_map::VecMap<string, @local-pkg/zing_studio::article::File>">;
|
|
145
|
+
}, "@local-pkg/zing_studio::article::Article">;
|
|
146
|
+
export interface OwnerArguments {
|
|
147
|
+
self: RawTransactionArgument<string>;
|
|
148
|
+
}
|
|
149
|
+
export interface OwnerOptions {
|
|
150
|
+
package?: string;
|
|
151
|
+
arguments: OwnerArguments | [self: RawTransactionArgument<string>];
|
|
152
|
+
}
|
|
153
|
+
export declare function owner(options: OwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
154
|
+
export interface DeletedArguments {
|
|
155
|
+
self: RawTransactionArgument<string>;
|
|
156
|
+
}
|
|
157
|
+
export interface DeletedOptions {
|
|
158
|
+
package?: string;
|
|
159
|
+
arguments: DeletedArguments | [self: RawTransactionArgument<string>];
|
|
160
|
+
}
|
|
161
|
+
export declare function deleted(options: DeletedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
162
|
+
export interface CreatedAtArguments {
|
|
163
|
+
self: RawTransactionArgument<string>;
|
|
164
|
+
}
|
|
165
|
+
export interface CreatedAtOptions {
|
|
166
|
+
package?: string;
|
|
167
|
+
arguments: CreatedAtArguments | [self: RawTransactionArgument<string>];
|
|
168
|
+
}
|
|
169
|
+
export declare function createdAt(options: CreatedAtOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
170
|
+
export interface SubscriptionLevelArguments {
|
|
171
|
+
self: RawTransactionArgument<string>;
|
|
172
|
+
}
|
|
173
|
+
export interface SubscriptionLevelOptions {
|
|
174
|
+
package?: string;
|
|
175
|
+
arguments: SubscriptionLevelArguments | [self: RawTransactionArgument<string>];
|
|
176
|
+
}
|
|
177
|
+
export declare function subscriptionLevel(options: SubscriptionLevelOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
178
|
+
export interface BlobsArguments {
|
|
179
|
+
self: RawTransactionArgument<string>;
|
|
180
|
+
}
|
|
181
|
+
export interface BlobsOptions {
|
|
182
|
+
package?: string;
|
|
183
|
+
arguments: BlobsArguments | [self: RawTransactionArgument<string>];
|
|
184
|
+
}
|
|
185
|
+
export declare function blobs(options: BlobsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
186
|
+
export interface FilesArguments {
|
|
187
|
+
self: RawTransactionArgument<string>;
|
|
188
|
+
}
|
|
189
|
+
export interface FilesOptions {
|
|
190
|
+
package?: string;
|
|
191
|
+
arguments: FilesArguments | [self: RawTransactionArgument<string>];
|
|
192
|
+
}
|
|
193
|
+
export declare function files(options: FilesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
194
|
+
export interface EndEpochArguments {
|
|
195
|
+
self: RawTransactionArgument<string>;
|
|
196
|
+
}
|
|
197
|
+
export interface EndEpochOptions {
|
|
198
|
+
package?: string;
|
|
199
|
+
arguments: EndEpochArguments | [self: RawTransactionArgument<string>];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Returns the end epoch of the article (assumes all blobs have the same end epoch)
|
|
203
|
+
* SECURITY NOTE: This function assumes blobs[0] exists and all blobs have the same
|
|
204
|
+
* end epoch
|
|
205
|
+
*/
|
|
206
|
+
export declare function endEpoch(options: EndEpochOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
207
|
+
export interface TotalBlobSizeArguments {
|
|
208
|
+
self: RawTransactionArgument<string>;
|
|
209
|
+
}
|
|
210
|
+
export interface TotalBlobSizeOptions {
|
|
211
|
+
package?: string;
|
|
212
|
+
arguments: TotalBlobSizeArguments | [self: RawTransactionArgument<string>];
|
|
213
|
+
}
|
|
214
|
+
/** Calculates the total size of all blobs in the article */
|
|
215
|
+
export declare function totalBlobSize(options: TotalBlobSizeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
216
|
+
export interface IsExpiredArguments {
|
|
217
|
+
self: RawTransactionArgument<string>;
|
|
218
|
+
walrusSystem: RawTransactionArgument<string>;
|
|
219
|
+
}
|
|
220
|
+
export interface IsExpiredOptions {
|
|
221
|
+
package?: string;
|
|
222
|
+
arguments: IsExpiredArguments | [
|
|
223
|
+
self: RawTransactionArgument<string>,
|
|
224
|
+
walrusSystem: RawTransactionArgument<string>
|
|
225
|
+
];
|
|
226
|
+
}
|
|
227
|
+
export declare function isExpired(options: IsExpiredOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
228
|
+
export interface IsPublicArguments {
|
|
229
|
+
self: RawTransactionArgument<string>;
|
|
230
|
+
}
|
|
231
|
+
export interface IsPublicOptions {
|
|
232
|
+
package?: string;
|
|
233
|
+
arguments: IsPublicArguments | [self: RawTransactionArgument<string>];
|
|
234
|
+
}
|
|
235
|
+
export declare function isPublic(options: IsPublicOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
236
|
+
export interface BlobIndexArguments {
|
|
237
|
+
file: RawTransactionArgument<string>;
|
|
238
|
+
}
|
|
239
|
+
export interface BlobIndexOptions {
|
|
240
|
+
package?: string;
|
|
241
|
+
arguments: BlobIndexArguments | [file: RawTransactionArgument<string>];
|
|
242
|
+
}
|
|
243
|
+
export declare function blobIndex(options: BlobIndexOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
244
|
+
export interface MimeTypeArguments {
|
|
245
|
+
file: RawTransactionArgument<string>;
|
|
246
|
+
}
|
|
247
|
+
export interface MimeTypeOptions {
|
|
248
|
+
package?: string;
|
|
249
|
+
arguments: MimeTypeArguments | [file: RawTransactionArgument<string>];
|
|
250
|
+
}
|
|
251
|
+
export declare function mimeType(options: MimeTypeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
252
|
+
export interface FileSizeArguments {
|
|
253
|
+
file: RawTransactionArgument<string>;
|
|
254
|
+
}
|
|
255
|
+
export interface FileSizeOptions {
|
|
256
|
+
package?: string;
|
|
257
|
+
arguments: FileSizeArguments | [file: RawTransactionArgument<string>];
|
|
258
|
+
}
|
|
259
|
+
export declare function fileSize(options: FileSizeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
260
|
+
export interface ArticleBlobAddMetadataArguments {
|
|
261
|
+
config: RawTransactionArgument<string>;
|
|
262
|
+
self: RawTransactionArgument<string>;
|
|
263
|
+
blobIndex: RawTransactionArgument<number | bigint>;
|
|
264
|
+
metadata: RawTransactionArgument<string>;
|
|
265
|
+
}
|
|
266
|
+
export interface ArticleBlobAddMetadataOptions {
|
|
267
|
+
package?: string;
|
|
268
|
+
arguments: ArticleBlobAddMetadataArguments | [
|
|
269
|
+
config: RawTransactionArgument<string>,
|
|
270
|
+
self: RawTransactionArgument<string>,
|
|
271
|
+
blobIndex: RawTransactionArgument<number | bigint>,
|
|
272
|
+
metadata: RawTransactionArgument<string>
|
|
273
|
+
];
|
|
274
|
+
}
|
|
275
|
+
export declare function articleBlobAddMetadata(options: ArticleBlobAddMetadataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
276
|
+
export interface ArticleBlobRemoveMetadataArguments {
|
|
277
|
+
config: RawTransactionArgument<string>;
|
|
278
|
+
self: RawTransactionArgument<string>;
|
|
279
|
+
blobIndex: RawTransactionArgument<number | bigint>;
|
|
280
|
+
key: RawTransactionArgument<string>;
|
|
281
|
+
}
|
|
282
|
+
export interface ArticleBlobRemoveMetadataOptions {
|
|
283
|
+
package?: string;
|
|
284
|
+
arguments: ArticleBlobRemoveMetadataArguments | [
|
|
285
|
+
config: RawTransactionArgument<string>,
|
|
286
|
+
self: RawTransactionArgument<string>,
|
|
287
|
+
blobIndex: RawTransactionArgument<number | bigint>,
|
|
288
|
+
key: RawTransactionArgument<string>
|
|
289
|
+
];
|
|
290
|
+
}
|
|
291
|
+
export declare function articleBlobRemoveMetadata(options: ArticleBlobRemoveMetadataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
292
|
+
export interface ArticleBlobInsertOrUpdateMetadataPairArguments {
|
|
293
|
+
config: RawTransactionArgument<string>;
|
|
294
|
+
self: RawTransactionArgument<string>;
|
|
295
|
+
blobIndex: RawTransactionArgument<number | bigint>;
|
|
296
|
+
key: RawTransactionArgument<string>;
|
|
297
|
+
value: RawTransactionArgument<string>;
|
|
298
|
+
}
|
|
299
|
+
export interface ArticleBlobInsertOrUpdateMetadataPairOptions {
|
|
300
|
+
package?: string;
|
|
301
|
+
arguments: ArticleBlobInsertOrUpdateMetadataPairArguments | [
|
|
302
|
+
config: RawTransactionArgument<string>,
|
|
303
|
+
self: RawTransactionArgument<string>,
|
|
304
|
+
blobIndex: RawTransactionArgument<number | bigint>,
|
|
305
|
+
key: RawTransactionArgument<string>,
|
|
306
|
+
value: RawTransactionArgument<string>
|
|
307
|
+
];
|
|
308
|
+
}
|
|
309
|
+
export declare function articleBlobInsertOrUpdateMetadataPair(options: ArticleBlobInsertOrUpdateMetadataPairOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
310
|
+
export interface CertifyArticleBlobArguments {
|
|
311
|
+
config: RawTransactionArgument<string>;
|
|
312
|
+
self: RawTransactionArgument<string>;
|
|
313
|
+
walrusSystem: RawTransactionArgument<string>;
|
|
314
|
+
blobIndex: RawTransactionArgument<number | bigint>;
|
|
315
|
+
signature: RawTransactionArgument<number[]>;
|
|
316
|
+
signersBitmap: RawTransactionArgument<number[]>;
|
|
317
|
+
message: RawTransactionArgument<number[]>;
|
|
318
|
+
}
|
|
319
|
+
export interface CertifyArticleBlobOptions {
|
|
320
|
+
package?: string;
|
|
321
|
+
arguments: CertifyArticleBlobArguments | [
|
|
322
|
+
config: RawTransactionArgument<string>,
|
|
323
|
+
self: RawTransactionArgument<string>,
|
|
324
|
+
walrusSystem: RawTransactionArgument<string>,
|
|
325
|
+
blobIndex: RawTransactionArgument<number | bigint>,
|
|
326
|
+
signature: RawTransactionArgument<number[]>,
|
|
327
|
+
signersBitmap: RawTransactionArgument<number[]>,
|
|
328
|
+
message: RawTransactionArgument<number[]>
|
|
329
|
+
];
|
|
330
|
+
}
|
|
331
|
+
export declare function certifyArticleBlob(options: CertifyArticleBlobOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import * as object from "./deps/sui/object.js";
|
|
5
|
+
import * as vec_map from "./deps/sui/vec_map.js";
|
|
6
|
+
import * as blob from "./deps/walrus/blob.js";
|
|
7
|
+
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
8
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
9
|
+
const $moduleName = "@local-pkg/zing_studio::article";
|
|
10
|
+
export const File = new MoveStruct({
|
|
11
|
+
name: `${$moduleName}::File`,
|
|
12
|
+
fields: {
|
|
13
|
+
/**
|
|
14
|
+
* Whether the file is publicly accessible Index of the blob containing this file's
|
|
15
|
+
* data
|
|
16
|
+
*/
|
|
17
|
+
blob_index: bcs.u64(),
|
|
18
|
+
/** MIME type of the file */
|
|
19
|
+
mime_type: bcs.string(),
|
|
20
|
+
/** Size of the file in bytes */
|
|
21
|
+
size: bcs.u64(),
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
export const PublishArticleEvent = new MoveStruct({
|
|
25
|
+
name: `${$moduleName}::PublishArticleEvent`,
|
|
26
|
+
fields: {
|
|
27
|
+
article_id: bcs.Address,
|
|
28
|
+
owner: bcs.Address,
|
|
29
|
+
blob_ids: bcs.vector(bcs.u256()),
|
|
30
|
+
blob_sizes: bcs.vector(bcs.u64()),
|
|
31
|
+
blob_storage_sizes: bcs.vector(bcs.u64()),
|
|
32
|
+
blob_end_epochs: bcs.vector(bcs.u32()),
|
|
33
|
+
files: vec_map.VecMap(bcs.string(), File),
|
|
34
|
+
timestamp_ms: bcs.u64(),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
export const BurnArticleEvent = new MoveStruct({
|
|
38
|
+
name: `${$moduleName}::BurnArticleEvent`,
|
|
39
|
+
fields: {
|
|
40
|
+
article_id: bcs.Address,
|
|
41
|
+
owner: bcs.Address,
|
|
42
|
+
current_epoch: bcs.u32(),
|
|
43
|
+
blob_end_epochs: bcs.vector(bcs.u32()),
|
|
44
|
+
timestamp_ms: bcs.u64(),
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
export const RenewArticleEvent = new MoveStruct({
|
|
48
|
+
name: `${$moduleName}::RenewArticleEvent`,
|
|
49
|
+
fields: {
|
|
50
|
+
article_id: bcs.Address,
|
|
51
|
+
owner: bcs.Address,
|
|
52
|
+
current_epoch: bcs.u32(),
|
|
53
|
+
prev_blob_end_epochs: bcs.vector(bcs.u32()),
|
|
54
|
+
new_blob_end_epochs: bcs.vector(bcs.u32()),
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
export const ARTICLE = new MoveStruct({
|
|
58
|
+
name: `${$moduleName}::ARTICLE`,
|
|
59
|
+
fields: {
|
|
60
|
+
dummy_field: bcs.bool(),
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
export const Article = new MoveStruct({
|
|
64
|
+
name: `${$moduleName}::Article`,
|
|
65
|
+
fields: {
|
|
66
|
+
id: object.UID,
|
|
67
|
+
owner: bcs.Address,
|
|
68
|
+
deleted: bcs.bool(),
|
|
69
|
+
created_at: bcs.u64(),
|
|
70
|
+
subscription_level: bcs.option(bcs.u8()),
|
|
71
|
+
/**
|
|
72
|
+
* Storage blobs containing the article content (all blobs must have compatible
|
|
73
|
+
* properties)
|
|
74
|
+
*/
|
|
75
|
+
blobs: bcs.vector(blob.Blob),
|
|
76
|
+
/** Maps file identifiers to their corresponding metadata */
|
|
77
|
+
files: vec_map.VecMap(bcs.string(), File),
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
export function owner(options) {
|
|
81
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
82
|
+
const argumentsTypes = [
|
|
83
|
+
`${packageAddress}::article::Article`,
|
|
84
|
+
];
|
|
85
|
+
const parameterNames = ["self"];
|
|
86
|
+
return (tx) => tx.moveCall({
|
|
87
|
+
package: packageAddress,
|
|
88
|
+
module: "article",
|
|
89
|
+
function: "owner",
|
|
90
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
export function deleted(options) {
|
|
94
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
95
|
+
const argumentsTypes = [
|
|
96
|
+
`${packageAddress}::article::Article`,
|
|
97
|
+
];
|
|
98
|
+
const parameterNames = ["self"];
|
|
99
|
+
return (tx) => tx.moveCall({
|
|
100
|
+
package: packageAddress,
|
|
101
|
+
module: "article",
|
|
102
|
+
function: "deleted",
|
|
103
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
export function createdAt(options) {
|
|
107
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
108
|
+
const argumentsTypes = [
|
|
109
|
+
`${packageAddress}::article::Article`,
|
|
110
|
+
];
|
|
111
|
+
const parameterNames = ["self"];
|
|
112
|
+
return (tx) => tx.moveCall({
|
|
113
|
+
package: packageAddress,
|
|
114
|
+
module: "article",
|
|
115
|
+
function: "created_at",
|
|
116
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
export function subscriptionLevel(options) {
|
|
120
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
121
|
+
const argumentsTypes = [
|
|
122
|
+
`${packageAddress}::article::Article`,
|
|
123
|
+
];
|
|
124
|
+
const parameterNames = ["self"];
|
|
125
|
+
return (tx) => tx.moveCall({
|
|
126
|
+
package: packageAddress,
|
|
127
|
+
module: "article",
|
|
128
|
+
function: "subscription_level",
|
|
129
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
export function blobs(options) {
|
|
133
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
134
|
+
const argumentsTypes = [
|
|
135
|
+
`${packageAddress}::article::Article`,
|
|
136
|
+
];
|
|
137
|
+
const parameterNames = ["self"];
|
|
138
|
+
return (tx) => tx.moveCall({
|
|
139
|
+
package: packageAddress,
|
|
140
|
+
module: "article",
|
|
141
|
+
function: "blobs",
|
|
142
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
export function files(options) {
|
|
146
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
147
|
+
const argumentsTypes = [
|
|
148
|
+
`${packageAddress}::article::Article`,
|
|
149
|
+
];
|
|
150
|
+
const parameterNames = ["self"];
|
|
151
|
+
return (tx) => tx.moveCall({
|
|
152
|
+
package: packageAddress,
|
|
153
|
+
module: "article",
|
|
154
|
+
function: "files",
|
|
155
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Returns the end epoch of the article (assumes all blobs have the same end epoch)
|
|
160
|
+
* SECURITY NOTE: This function assumes blobs[0] exists and all blobs have the same
|
|
161
|
+
* end epoch
|
|
162
|
+
*/
|
|
163
|
+
export function endEpoch(options) {
|
|
164
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
165
|
+
const argumentsTypes = [
|
|
166
|
+
`${packageAddress}::article::Article`,
|
|
167
|
+
];
|
|
168
|
+
const parameterNames = ["self"];
|
|
169
|
+
return (tx) => tx.moveCall({
|
|
170
|
+
package: packageAddress,
|
|
171
|
+
module: "article",
|
|
172
|
+
function: "end_epoch",
|
|
173
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/** Calculates the total size of all blobs in the article */
|
|
177
|
+
export function totalBlobSize(options) {
|
|
178
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
179
|
+
const argumentsTypes = [
|
|
180
|
+
`${packageAddress}::article::Article`,
|
|
181
|
+
];
|
|
182
|
+
const parameterNames = ["self"];
|
|
183
|
+
return (tx) => tx.moveCall({
|
|
184
|
+
package: packageAddress,
|
|
185
|
+
module: "article",
|
|
186
|
+
function: "total_blob_size",
|
|
187
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
export function isExpired(options) {
|
|
191
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
192
|
+
const argumentsTypes = [
|
|
193
|
+
`${packageAddress}::article::Article`,
|
|
194
|
+
`${packageAddress}::system::System`,
|
|
195
|
+
];
|
|
196
|
+
const parameterNames = ["self", "walrusSystem"];
|
|
197
|
+
return (tx) => tx.moveCall({
|
|
198
|
+
package: packageAddress,
|
|
199
|
+
module: "article",
|
|
200
|
+
function: "is_expired",
|
|
201
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
export function isPublic(options) {
|
|
205
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
206
|
+
const argumentsTypes = [
|
|
207
|
+
`${packageAddress}::article::Article`,
|
|
208
|
+
];
|
|
209
|
+
const parameterNames = ["self"];
|
|
210
|
+
return (tx) => tx.moveCall({
|
|
211
|
+
package: packageAddress,
|
|
212
|
+
module: "article",
|
|
213
|
+
function: "is_public",
|
|
214
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
export function blobIndex(options) {
|
|
218
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
219
|
+
const argumentsTypes = [
|
|
220
|
+
`${packageAddress}::article::File`,
|
|
221
|
+
];
|
|
222
|
+
const parameterNames = ["file"];
|
|
223
|
+
return (tx) => tx.moveCall({
|
|
224
|
+
package: packageAddress,
|
|
225
|
+
module: "article",
|
|
226
|
+
function: "blob_index",
|
|
227
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
export function mimeType(options) {
|
|
231
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
232
|
+
const argumentsTypes = [
|
|
233
|
+
`${packageAddress}::article::File`,
|
|
234
|
+
];
|
|
235
|
+
const parameterNames = ["file"];
|
|
236
|
+
return (tx) => tx.moveCall({
|
|
237
|
+
package: packageAddress,
|
|
238
|
+
module: "article",
|
|
239
|
+
function: "mime_type",
|
|
240
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
export function fileSize(options) {
|
|
244
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
245
|
+
const argumentsTypes = [
|
|
246
|
+
`${packageAddress}::article::File`,
|
|
247
|
+
];
|
|
248
|
+
const parameterNames = ["file"];
|
|
249
|
+
return (tx) => tx.moveCall({
|
|
250
|
+
package: packageAddress,
|
|
251
|
+
module: "article",
|
|
252
|
+
function: "file_size",
|
|
253
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
export function articleBlobAddMetadata(options) {
|
|
257
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
258
|
+
const argumentsTypes = [
|
|
259
|
+
`${packageAddress}::config::Config`,
|
|
260
|
+
`${packageAddress}::article::Article`,
|
|
261
|
+
"u64",
|
|
262
|
+
`${packageAddress}::metadata::Metadata`,
|
|
263
|
+
];
|
|
264
|
+
const parameterNames = ["config", "self", "blobIndex", "metadata"];
|
|
265
|
+
return (tx) => tx.moveCall({
|
|
266
|
+
package: packageAddress,
|
|
267
|
+
module: "article",
|
|
268
|
+
function: "article_blob_add_metadata",
|
|
269
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
export function articleBlobRemoveMetadata(options) {
|
|
273
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
274
|
+
const argumentsTypes = [
|
|
275
|
+
`${packageAddress}::config::Config`,
|
|
276
|
+
`${packageAddress}::article::Article`,
|
|
277
|
+
"u64",
|
|
278
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
|
|
279
|
+
];
|
|
280
|
+
const parameterNames = ["config", "self", "blobIndex", "key"];
|
|
281
|
+
return (tx) => tx.moveCall({
|
|
282
|
+
package: packageAddress,
|
|
283
|
+
module: "article",
|
|
284
|
+
function: "article_blob_remove_metadata",
|
|
285
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
export function articleBlobInsertOrUpdateMetadataPair(options) {
|
|
289
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
290
|
+
const argumentsTypes = [
|
|
291
|
+
`${packageAddress}::config::Config`,
|
|
292
|
+
`${packageAddress}::article::Article`,
|
|
293
|
+
"u64",
|
|
294
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
|
|
295
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
|
|
296
|
+
];
|
|
297
|
+
const parameterNames = ["config", "self", "blobIndex", "key", "value"];
|
|
298
|
+
return (tx) => tx.moveCall({
|
|
299
|
+
package: packageAddress,
|
|
300
|
+
module: "article",
|
|
301
|
+
function: "article_blob_insert_or_update_metadata_pair",
|
|
302
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
export function certifyArticleBlob(options) {
|
|
306
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
307
|
+
const argumentsTypes = [
|
|
308
|
+
`${packageAddress}::config::Config`,
|
|
309
|
+
`${packageAddress}::article::Article`,
|
|
310
|
+
`${packageAddress}::system::System`,
|
|
311
|
+
"u64",
|
|
312
|
+
"vector<u8>",
|
|
313
|
+
"vector<u8>",
|
|
314
|
+
"vector<u8>",
|
|
315
|
+
];
|
|
316
|
+
const parameterNames = [
|
|
317
|
+
"config",
|
|
318
|
+
"self",
|
|
319
|
+
"walrusSystem",
|
|
320
|
+
"blobIndex",
|
|
321
|
+
"signature",
|
|
322
|
+
"signersBitmap",
|
|
323
|
+
"message",
|
|
324
|
+
];
|
|
325
|
+
return (tx) => tx.moveCall({
|
|
326
|
+
package: packageAddress,
|
|
327
|
+
module: "article",
|
|
328
|
+
function: "certify_article_blob",
|
|
329
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
330
|
+
});
|
|
331
|
+
}
|