@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.
Files changed (227) hide show
  1. package/dist/_generated/index.js +6 -0
  2. package/dist/_generated/utils/index.d.ts +12 -0
  3. package/dist/_generated/utils/index.js +135 -0
  4. package/dist/_generated/zing_framework/coin_utils.d.ts +15 -0
  5. package/dist/_generated/zing_framework/coin_utils.js +19 -0
  6. package/dist/_generated/zing_framework/deps/sui/object.d.ts +8 -0
  7. package/{src/_generated/zing_governance/deps/sui/object.ts → dist/_generated/zing_framework/deps/sui/object.js} +4 -7
  8. package/dist/_generated/zing_framework/derived_object_bag.d.ts +166 -0
  9. package/dist/_generated/zing_framework/derived_object_bag.js +221 -0
  10. package/dist/_generated/zing_framework/derived_table.d.ts +153 -0
  11. package/dist/_generated/zing_framework/derived_table.js +200 -0
  12. package/dist/_generated/zing_governance/admin.d.ts +20 -0
  13. package/dist/_generated/zing_governance/admin.js +26 -0
  14. package/dist/_generated/zing_governance/deps/sui/object.d.ts +8 -0
  15. package/{src/_generated/zing_identity/deps/sui/object.ts → dist/_generated/zing_governance/deps/sui/object.js} +4 -7
  16. package/dist/_generated/zing_governance/treasury.d.ts +56 -0
  17. package/dist/_generated/zing_governance/treasury.js +78 -0
  18. package/dist/_generated/zing_identity/config.d.ts +87 -0
  19. package/dist/_generated/zing_identity/config.js +98 -0
  20. package/{src/_generated/zing_studio/deps/std/type_name.ts → dist/_generated/zing_identity/deps/std/type_name.d.ts} +3 -11
  21. package/dist/_generated/zing_identity/deps/std/type_name.js +22 -0
  22. package/dist/_generated/zing_identity/deps/sui/object.d.ts +8 -0
  23. package/{src/_generated/zing_studio/deps/sui/object.ts → dist/_generated/zing_identity/deps/sui/object.js} +4 -7
  24. package/dist/_generated/zing_identity/deps/sui/object_table.d.ts +12 -0
  25. package/{src/_generated/zing_identity/deps/sui/object_table.ts → dist/_generated/zing_identity/deps/sui/object_table.js} +7 -10
  26. package/dist/_generated/zing_identity/deps/sui/table.d.ts +12 -0
  27. package/{src/_generated/zing_studio/deps/sui/table.ts → dist/_generated/zing_identity/deps/sui/table.js} +7 -10
  28. package/{src/_generated/zing_identity/deps/sui/vec_set.ts → dist/_generated/zing_identity/deps/sui/vec_set.d.ts} +3 -14
  29. package/dist/_generated/zing_identity/deps/sui/vec_set.js +22 -0
  30. package/dist/_generated/zing_identity/ecdsa.d.ts +81 -0
  31. package/dist/_generated/zing_identity/ecdsa.js +87 -0
  32. package/dist/_generated/zing_identity/identity.d.ts +262 -0
  33. package/dist/_generated/zing_identity/identity.js +294 -0
  34. package/dist/_generated/zing_identity/reclaim.d.ts +356 -0
  35. package/dist/_generated/zing_identity/reclaim.js +414 -0
  36. package/dist/_generated/zing_studio/app.d.ts +351 -0
  37. package/dist/_generated/zing_studio/app.js +451 -0
  38. package/dist/_generated/zing_studio/article.d.ts +331 -0
  39. package/dist/_generated/zing_studio/article.js +331 -0
  40. package/dist/_generated/zing_studio/config.d.ts +203 -0
  41. package/dist/_generated/zing_studio/config.js +233 -0
  42. package/{src/_generated/zing_identity/deps/std/type_name.ts → dist/_generated/zing_studio/deps/std/type_name.d.ts} +3 -11
  43. package/dist/_generated/zing_studio/deps/std/type_name.js +22 -0
  44. package/dist/_generated/zing_studio/deps/sui/bag.d.ts +12 -0
  45. package/{src/_generated/zing_studio/deps/sui/bag.ts → dist/_generated/zing_studio/deps/sui/bag.js} +7 -10
  46. package/dist/_generated/zing_studio/deps/sui/balance.d.ts +12 -0
  47. package/{src/_generated/zing_studio/deps/sui/balance.ts → dist/_generated/zing_studio/deps/sui/balance.js} +4 -7
  48. package/dist/_generated/zing_studio/deps/sui/coin.d.ts +12 -0
  49. package/{src/_generated/zing_studio/deps/sui/coin.ts → dist/_generated/zing_studio/deps/sui/coin.js} +5 -8
  50. package/dist/_generated/zing_studio/deps/sui/dynamic_field.d.ts +126 -0
  51. package/dist/_generated/zing_studio/deps/sui/dynamic_field.js +140 -0
  52. package/dist/_generated/zing_studio/deps/sui/object.d.ts +8 -0
  53. package/{src/_generated/zing_framework/deps/sui/object.ts → dist/_generated/zing_studio/deps/sui/object.js} +4 -7
  54. package/dist/_generated/zing_studio/deps/sui/table.d.ts +12 -0
  55. package/{src/_generated/zing_identity/deps/sui/table.ts → dist/_generated/zing_studio/deps/sui/table.js} +7 -10
  56. package/dist/_generated/zing_studio/deps/sui/vec_map.d.ts +30 -0
  57. package/{src/_generated/zing_studio/deps/sui/vec_map.ts → dist/_generated/zing_studio/deps/sui/vec_map.js} +15 -21
  58. package/{src/_generated/zing_studio/deps/sui/vec_set.ts → dist/_generated/zing_studio/deps/sui/vec_set.d.ts} +3 -14
  59. package/dist/_generated/zing_studio/deps/sui/vec_set.js +22 -0
  60. package/dist/_generated/zing_studio/deps/walrus/blob.d.ts +20 -0
  61. package/{src/_generated/zing_studio/deps/walrus/blob.ts → dist/_generated/zing_studio/deps/walrus/blob.js} +11 -12
  62. package/dist/_generated/zing_studio/deps/walrus/events.d.ts +83 -0
  63. package/dist/_generated/zing_studio/deps/walrus/events.js +122 -0
  64. package/dist/_generated/zing_studio/deps/walrus/metadata.d.ts +71 -0
  65. package/dist/_generated/zing_studio/deps/walrus/metadata.js +73 -0
  66. package/dist/_generated/zing_studio/deps/walrus/storage_resource.d.ts +12 -0
  67. package/{src/_generated/zing_studio/deps/walrus/storage_resource.ts → dist/_generated/zing_studio/deps/walrus/storage_resource.js} +7 -8
  68. package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.d.ts +12 -0
  69. 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
  70. package/dist/_generated/zing_studio/deps/zing_framework/derived_table.d.ts +12 -0
  71. package/{src/_generated/zing_studio/deps/zing_framework/derived_table.ts → dist/_generated/zing_studio/deps/zing_framework/derived_table.js} +7 -8
  72. package/dist/_generated/zing_studio/donation.d.ts +24 -0
  73. package/{src/_generated/zing_studio/donation.ts → dist/_generated/zing_studio/donation.js} +7 -8
  74. package/dist/_generated/zing_studio/enclave.d.ts +187 -0
  75. package/dist/_generated/zing_studio/enclave.js +231 -0
  76. package/dist/_generated/zing_studio/nitro_attestation.d.ts +148 -0
  77. package/dist/_generated/zing_studio/nitro_attestation.js +183 -0
  78. package/dist/_generated/zing_studio/referral.d.ts +166 -0
  79. package/dist/_generated/zing_studio/referral.js +224 -0
  80. package/dist/_generated/zing_studio/storage.d.ts +327 -0
  81. package/dist/_generated/zing_studio/storage.js +365 -0
  82. package/dist/_generated/zing_studio/studio.d.ts +282 -0
  83. package/dist/_generated/zing_studio/studio.js +360 -0
  84. package/dist/bcs.d.ts +61 -0
  85. package/dist/bcs.js +109 -0
  86. package/dist/client/index.d.ts +228 -0
  87. package/dist/client/index.js +296 -0
  88. package/dist/client/types.d.ts +23 -0
  89. package/dist/client/types.js +1 -0
  90. package/dist/components/index.js +3 -0
  91. package/dist/components/wallet-provider.d.ts +7 -0
  92. package/dist/components/wallet-provider.js +33 -0
  93. package/dist/components/walrus-provider.d.ts +31 -0
  94. package/dist/components/walrus-provider.js +71 -0
  95. package/dist/components/zing-provider.d.ts +15 -0
  96. package/dist/components/zing-provider.js +22 -0
  97. package/dist/config/common.d.ts +23 -0
  98. package/dist/config/common.js +61 -0
  99. package/dist/config/index.d.ts +8 -0
  100. package/dist/config/index.js +28 -0
  101. package/dist/config/mainnet.d.ts +6 -0
  102. package/dist/config/mainnet.js +80 -0
  103. package/dist/config/testnet.d.ts +6 -0
  104. package/dist/config/testnet.js +81 -0
  105. package/dist/config/types.d.ts +49 -0
  106. package/dist/config/types.js +1 -0
  107. package/dist/const.d.ts +4 -0
  108. package/dist/const.js +25 -0
  109. package/dist/getters.d.ts +228 -0
  110. package/dist/getters.js +317 -0
  111. package/{src/hooks/index.ts → dist/hooks/index.d.ts} +2 -3
  112. package/dist/hooks/index.js +9 -0
  113. package/dist/hooks/useGetStudio.d.ts +26 -0
  114. package/dist/hooks/useGetStudio.js +17 -0
  115. package/dist/hooks/useGetTierPlan.d.ts +7 -0
  116. package/dist/hooks/useGetTierPlan.js +85 -0
  117. package/dist/hooks/useReclaim.d.ts +12 -0
  118. package/dist/hooks/useReclaim.js +87 -0
  119. package/dist/hooks/useSignAndExecuteTransaction.d.ts +6 -0
  120. package/dist/hooks/useSignAndExecuteTransaction.js +40 -0
  121. package/dist/hooks/useSignPersonalMessage.d.ts +8 -0
  122. package/dist/hooks/useSignPersonalMessage.js +21 -0
  123. package/dist/hooks/useZingInfiniteQueries.d.ts +75 -0
  124. package/dist/hooks/useZingInfiniteQueries.js +28 -0
  125. package/dist/hooks/useZingMutation.d.ts +35 -0
  126. package/dist/hooks/useZingMutation.js +37 -0
  127. package/dist/hooks/useZingQueries.d.ts +127 -0
  128. package/dist/hooks/useZingQueries.js +37 -0
  129. package/dist/hooks/useZingQuery.d.ts +147 -0
  130. package/dist/hooks/useZingQuery.js +34 -0
  131. package/{src/index.ts → dist/index.d.ts} +2 -3
  132. package/dist/index.js +9 -0
  133. package/dist/lib/utils/colorful-logger.d.ts +2 -0
  134. package/dist/lib/utils/colorful-logger.js +23 -0
  135. package/dist/lib/utils/const.d.ts +25 -0
  136. package/dist/lib/utils/const.js +25 -0
  137. package/dist/lib/utils/helpers.d.ts +10 -0
  138. package/dist/lib/utils/helpers.js +49 -0
  139. package/dist/lib/utils/index.js +4 -0
  140. package/dist/lib/utils/init-app-with-shadow.d.ts +6 -0
  141. package/dist/lib/utils/init-app-with-shadow.js +28 -0
  142. package/dist/lib/utils/quilt.d.ts +61 -0
  143. package/dist/lib/utils/quilt.js +194 -0
  144. package/dist/lib/utils/reclaim.d.ts +29 -0
  145. package/dist/lib/utils/reclaim.js +88 -0
  146. package/dist/lib/utils/types.d.ts +5 -0
  147. package/dist/lib/utils/types.js +1 -0
  148. package/dist/mutations/index.js +3 -0
  149. package/dist/mutations/seal.d.ts +12 -0
  150. package/dist/mutations/seal.js +41 -0
  151. package/dist/mutations/signer.d.ts +10 -0
  152. package/dist/mutations/signer.js +176 -0
  153. package/dist/mutations/walrus.d.ts +98 -0
  154. package/dist/mutations/walrus.js +488 -0
  155. package/dist/stores/index.js +3 -0
  156. package/dist/stores/walletStore.d.ts +48 -0
  157. package/dist/stores/walletStore.js +232 -0
  158. package/dist/stores/walrusStore.d.ts +28 -0
  159. package/dist/stores/walrusStore.js +61 -0
  160. package/dist/stores/zkloginStore.d.ts +28 -0
  161. package/dist/stores/zkloginStore.js +27 -0
  162. package/dist/types.d.ts +99 -0
  163. package/dist/types.js +1 -0
  164. package/package.json +18 -10
  165. package/src/_generated/utils/index.ts +0 -181
  166. package/src/_generated/zing_framework/coin_utils.ts +0 -41
  167. package/src/_generated/zing_framework/derived_object_bag.ts +0 -400
  168. package/src/_generated/zing_framework/derived_table.ts +0 -366
  169. package/src/_generated/zing_governance/admin.ts +0 -47
  170. package/src/_generated/zing_governance/treasury.ts +0 -134
  171. package/src/_generated/zing_identity/config.ts +0 -191
  172. package/src/_generated/zing_identity/ecdsa.ts +0 -166
  173. package/src/_generated/zing_identity/identity.ts +0 -661
  174. package/src/_generated/zing_identity/reclaim.ts +0 -803
  175. package/src/_generated/zing_studio/app.ts +0 -855
  176. package/src/_generated/zing_studio/article.ts +0 -598
  177. package/src/_generated/zing_studio/config.ts +0 -475
  178. package/src/_generated/zing_studio/deps/sui/dynamic_field.ts +0 -272
  179. package/src/_generated/zing_studio/deps/walrus/events.ts +0 -124
  180. package/src/_generated/zing_studio/deps/walrus/metadata.ts +0 -137
  181. package/src/_generated/zing_studio/enclave.ts +0 -466
  182. package/src/_generated/zing_studio/nitro_attestation.ts +0 -308
  183. package/src/_generated/zing_studio/referral.ts +0 -447
  184. package/src/_generated/zing_studio/storage.ts +0 -664
  185. package/src/_generated/zing_studio/studio.ts +0 -682
  186. package/src/bcs.ts +0 -139
  187. package/src/client/index.ts +0 -557
  188. package/src/client/types.ts +0 -28
  189. package/src/components/wallet-provider.tsx +0 -53
  190. package/src/components/walrus-provider.tsx +0 -212
  191. package/src/components/zing-provider.tsx +0 -54
  192. package/src/config/common.ts +0 -82
  193. package/src/config/index.ts +0 -45
  194. package/src/config/mainnet.ts +0 -109
  195. package/src/config/testnet.ts +0 -111
  196. package/src/config/types.ts +0 -69
  197. package/src/const.ts +0 -32
  198. package/src/getters.ts +0 -523
  199. package/src/hooks/useGetStudio.ts +0 -22
  200. package/src/hooks/useGetTierPlan.ts +0 -115
  201. package/src/hooks/useReclaim.ts +0 -165
  202. package/src/hooks/useSignAndExecuteTransaction.ts +0 -57
  203. package/src/hooks/useSignPersonalMessage.ts +0 -28
  204. package/src/hooks/useZingInfiniteQueries.ts +0 -92
  205. package/src/hooks/useZingMutation.ts +0 -66
  206. package/src/hooks/useZingQueries.ts +0 -107
  207. package/src/hooks/useZingQuery.ts +0 -88
  208. package/src/lib/utils/colorful-logger.ts +0 -27
  209. package/src/lib/utils/const.ts +0 -25
  210. package/src/lib/utils/helpers.ts +0 -78
  211. package/src/lib/utils/init-app-with-shadow.ts +0 -42
  212. package/src/lib/utils/quilt.ts +0 -317
  213. package/src/lib/utils/reclaim.ts +0 -148
  214. package/src/lib/utils/types.ts +0 -14
  215. package/src/mutations/seal.ts +0 -78
  216. package/src/mutations/signer.ts +0 -241
  217. package/src/mutations/walrus.ts +0 -862
  218. package/src/stores/walletStore.ts +0 -360
  219. package/src/stores/walrusStore.ts +0 -118
  220. package/src/stores/zkloginStore.ts +0 -53
  221. package/src/types.ts +0 -120
  222. package/tsconfig.json +0 -12
  223. /package/{src/_generated/index.js → dist/_generated/index.d.ts} +0 -0
  224. /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
  225. /package/{src/lib/utils/index.ts → dist/lib/utils/index.d.ts} +0 -0
  226. /package/{src/mutations/index.ts → dist/mutations/index.d.ts} +0 -0
  227. /package/{src/stores/index.ts → dist/stores/index.d.ts} +0 -0
@@ -0,0 +1,203 @@
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 Config: MoveStruct<{
5
+ id: MoveStruct<{
6
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
7
+ }, "0x2::object::UID">;
8
+ versions: MoveStruct<{
9
+ contents: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
10
+ length: number;
11
+ }, "vector<u64>">;
12
+ }, string>;
13
+ managers: MoveStruct<{
14
+ contents: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
15
+ length: number;
16
+ }, "vector<bytes[32]>">;
17
+ }, string>;
18
+ allowed_works: MoveStruct<{
19
+ contents: import("@mysten/sui/bcs").BcsType<{
20
+ name: string;
21
+ }[], Iterable<{
22
+ name: string;
23
+ }> & {
24
+ length: number;
25
+ }, "vector<std::type_name::TypeName>">;
26
+ }, string>;
27
+ platform_fee_bps: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
28
+ allowed_stablecoins: MoveStruct<{
29
+ contents: import("@mysten/sui/bcs").BcsType<{
30
+ name: string;
31
+ }[], Iterable<{
32
+ name: string;
33
+ }> & {
34
+ length: number;
35
+ }, "vector<std::type_name::TypeName>">;
36
+ }, string>;
37
+ max_num_of_subscription_level: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
38
+ }, "@local-pkg/zing_studio::config::Config">;
39
+ export interface PackageVersionOptions {
40
+ package?: string;
41
+ arguments?: [];
42
+ }
43
+ export declare function packageVersion(options?: PackageVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
44
+ export interface FeeScalingOptions {
45
+ package?: string;
46
+ arguments?: [];
47
+ }
48
+ export declare function feeScaling(options?: FeeScalingOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
49
+ export interface MonthDurationInWalrusEpochOptions {
50
+ package?: string;
51
+ arguments?: [];
52
+ }
53
+ export declare function monthDurationInWalrusEpoch(options?: MonthDurationInWalrusEpochOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
54
+ export interface DayInMilliesecondOptions {
55
+ package?: string;
56
+ arguments?: [];
57
+ }
58
+ export declare function dayInMilliesecond(options?: DayInMilliesecondOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
59
+ export interface BlobExtendedDurationOptions {
60
+ package?: string;
61
+ arguments?: [];
62
+ }
63
+ export declare function blobExtendedDuration(options?: BlobExtendedDurationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
64
+ export interface ManagersArguments {
65
+ self: RawTransactionArgument<string>;
66
+ }
67
+ export interface ManagersOptions {
68
+ package?: string;
69
+ arguments: ManagersArguments | [self: RawTransactionArgument<string>];
70
+ }
71
+ export declare function managers(options: ManagersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
72
+ export interface AllowedWorksArguments {
73
+ self: RawTransactionArgument<string>;
74
+ }
75
+ export interface AllowedWorksOptions {
76
+ package?: string;
77
+ arguments: AllowedWorksArguments | [self: RawTransactionArgument<string>];
78
+ }
79
+ export declare function allowedWorks(options: AllowedWorksOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
80
+ export interface PlatformFeeBpsArguments {
81
+ self: RawTransactionArgument<string>;
82
+ }
83
+ export interface PlatformFeeBpsOptions {
84
+ package?: string;
85
+ arguments: PlatformFeeBpsArguments | [self: RawTransactionArgument<string>];
86
+ }
87
+ export declare function platformFeeBps(options: PlatformFeeBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
88
+ export interface AllowedStablecoinsArguments {
89
+ self: RawTransactionArgument<string>;
90
+ }
91
+ export interface AllowedStablecoinsOptions {
92
+ package?: string;
93
+ arguments: AllowedStablecoinsArguments | [self: RawTransactionArgument<string>];
94
+ }
95
+ export declare function allowedStablecoins(options: AllowedStablecoinsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
96
+ export interface AddVersionArguments {
97
+ self: RawTransactionArgument<string>;
98
+ Cap: RawTransactionArgument<string>;
99
+ version: RawTransactionArgument<number | bigint>;
100
+ }
101
+ export interface AddVersionOptions {
102
+ package?: string;
103
+ arguments: AddVersionArguments | [
104
+ self: RawTransactionArgument<string>,
105
+ Cap: RawTransactionArgument<string>,
106
+ version: RawTransactionArgument<number | bigint>
107
+ ];
108
+ }
109
+ export declare function addVersion(options: AddVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
110
+ export interface RemoveVersionArguments {
111
+ self: RawTransactionArgument<string>;
112
+ Cap: RawTransactionArgument<string>;
113
+ version: RawTransactionArgument<number | bigint>;
114
+ }
115
+ export interface RemoveVersionOptions {
116
+ package?: string;
117
+ arguments: RemoveVersionArguments | [
118
+ self: RawTransactionArgument<string>,
119
+ Cap: RawTransactionArgument<string>,
120
+ version: RawTransactionArgument<number | bigint>
121
+ ];
122
+ }
123
+ export declare function removeVersion(options: RemoveVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
124
+ export interface AddAllowedWorksArguments {
125
+ self: RawTransactionArgument<string>;
126
+ Cap: RawTransactionArgument<string>;
127
+ }
128
+ export interface AddAllowedWorksOptions {
129
+ package?: string;
130
+ arguments: AddAllowedWorksArguments | [
131
+ self: RawTransactionArgument<string>,
132
+ Cap: RawTransactionArgument<string>
133
+ ];
134
+ typeArguments: [string];
135
+ }
136
+ export declare function addAllowedWorks(options: AddAllowedWorksOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
137
+ export interface RemoveAllowedWorksArguments {
138
+ self: RawTransactionArgument<string>;
139
+ Cap: RawTransactionArgument<string>;
140
+ }
141
+ export interface RemoveAllowedWorksOptions {
142
+ package?: string;
143
+ arguments: RemoveAllowedWorksArguments | [
144
+ self: RawTransactionArgument<string>,
145
+ Cap: RawTransactionArgument<string>
146
+ ];
147
+ typeArguments: [string];
148
+ }
149
+ export declare function removeAllowedWorks(options: RemoveAllowedWorksOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
150
+ export interface UpdatePlatformFeeBpsArguments {
151
+ self: RawTransactionArgument<string>;
152
+ Cap: RawTransactionArgument<string>;
153
+ platformFeeBps: RawTransactionArgument<number | bigint>;
154
+ }
155
+ export interface UpdatePlatformFeeBpsOptions {
156
+ package?: string;
157
+ arguments: UpdatePlatformFeeBpsArguments | [
158
+ self: RawTransactionArgument<string>,
159
+ Cap: RawTransactionArgument<string>,
160
+ platformFeeBps: RawTransactionArgument<number | bigint>
161
+ ];
162
+ }
163
+ export declare function updatePlatformFeeBps(options: UpdatePlatformFeeBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
164
+ export interface AddAllowedStablecoinsArguments {
165
+ self: RawTransactionArgument<string>;
166
+ Cap: RawTransactionArgument<string>;
167
+ }
168
+ export interface AddAllowedStablecoinsOptions {
169
+ package?: string;
170
+ arguments: AddAllowedStablecoinsArguments | [
171
+ self: RawTransactionArgument<string>,
172
+ Cap: RawTransactionArgument<string>
173
+ ];
174
+ typeArguments: [string];
175
+ }
176
+ export declare function addAllowedStablecoins(options: AddAllowedStablecoinsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
177
+ export interface RemoveAllowedStablecoinsArguments {
178
+ self: RawTransactionArgument<string>;
179
+ Cap: RawTransactionArgument<string>;
180
+ }
181
+ export interface RemoveAllowedStablecoinsOptions {
182
+ package?: string;
183
+ arguments: RemoveAllowedStablecoinsArguments | [
184
+ self: RawTransactionArgument<string>,
185
+ Cap: RawTransactionArgument<string>
186
+ ];
187
+ typeArguments: [string];
188
+ }
189
+ export declare function removeAllowedStablecoins(options: RemoveAllowedStablecoinsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
190
+ export interface UpdaqteMaxNumOfSubscriptionLevelArguments {
191
+ self: RawTransactionArgument<string>;
192
+ Cap: RawTransactionArgument<string>;
193
+ num: RawTransactionArgument<number>;
194
+ }
195
+ export interface UpdaqteMaxNumOfSubscriptionLevelOptions {
196
+ package?: string;
197
+ arguments: UpdaqteMaxNumOfSubscriptionLevelArguments | [
198
+ self: RawTransactionArgument<string>,
199
+ Cap: RawTransactionArgument<string>,
200
+ num: RawTransactionArgument<number>
201
+ ];
202
+ }
203
+ export declare function updaqteMaxNumOfSubscriptionLevel(options: UpdaqteMaxNumOfSubscriptionLevelOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
@@ -0,0 +1,233 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import * as type_name from "./deps/std/type_name.js";
5
+ import * as object from "./deps/sui/object.js";
6
+ import * as vec_set from "./deps/sui/vec_set.js";
7
+ import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
8
+ import { bcs } from "@mysten/sui/bcs";
9
+ const $moduleName = "@local-pkg/zing_studio::config";
10
+ export const Config = new MoveStruct({
11
+ name: `${$moduleName}::Config`,
12
+ fields: {
13
+ id: object.UID,
14
+ versions: vec_set.VecSet(bcs.u64()),
15
+ managers: vec_set.VecSet(bcs.Address),
16
+ allowed_works: vec_set.VecSet(type_name.TypeName),
17
+ platform_fee_bps: bcs.u64(),
18
+ allowed_stablecoins: vec_set.VecSet(type_name.TypeName),
19
+ max_num_of_subscription_level: bcs.u8(),
20
+ },
21
+ });
22
+ export function packageVersion(options = {}) {
23
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
24
+ return (tx) => tx.moveCall({
25
+ package: packageAddress,
26
+ module: "config",
27
+ function: "package_version",
28
+ });
29
+ }
30
+ export function feeScaling(options = {}) {
31
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
32
+ return (tx) => tx.moveCall({
33
+ package: packageAddress,
34
+ module: "config",
35
+ function: "fee_scaling",
36
+ });
37
+ }
38
+ export function monthDurationInWalrusEpoch(options = {}) {
39
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
40
+ return (tx) => tx.moveCall({
41
+ package: packageAddress,
42
+ module: "config",
43
+ function: "month_duration_in_walrus_epoch",
44
+ });
45
+ }
46
+ export function dayInMilliesecond(options = {}) {
47
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
48
+ return (tx) => tx.moveCall({
49
+ package: packageAddress,
50
+ module: "config",
51
+ function: "day_in_milliesecond",
52
+ });
53
+ }
54
+ export function blobExtendedDuration(options = {}) {
55
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
56
+ return (tx) => tx.moveCall({
57
+ package: packageAddress,
58
+ module: "config",
59
+ function: "blob_extended_duration",
60
+ });
61
+ }
62
+ export function managers(options) {
63
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
64
+ const argumentsTypes = [
65
+ `${packageAddress}::config::Config`,
66
+ ];
67
+ const parameterNames = ["self"];
68
+ return (tx) => tx.moveCall({
69
+ package: packageAddress,
70
+ module: "config",
71
+ function: "managers",
72
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
73
+ });
74
+ }
75
+ export function allowedWorks(options) {
76
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
77
+ const argumentsTypes = [
78
+ `${packageAddress}::config::Config`,
79
+ ];
80
+ const parameterNames = ["self"];
81
+ return (tx) => tx.moveCall({
82
+ package: packageAddress,
83
+ module: "config",
84
+ function: "allowed_works",
85
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
86
+ });
87
+ }
88
+ export function platformFeeBps(options) {
89
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
90
+ const argumentsTypes = [
91
+ `${packageAddress}::config::Config`,
92
+ ];
93
+ const parameterNames = ["self"];
94
+ return (tx) => tx.moveCall({
95
+ package: packageAddress,
96
+ module: "config",
97
+ function: "platform_fee_bps",
98
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
99
+ });
100
+ }
101
+ export function allowedStablecoins(options) {
102
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
103
+ const argumentsTypes = [
104
+ `${packageAddress}::config::Config`,
105
+ ];
106
+ const parameterNames = ["self"];
107
+ return (tx) => tx.moveCall({
108
+ package: packageAddress,
109
+ module: "config",
110
+ function: "allowed_stablecoins",
111
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
112
+ });
113
+ }
114
+ export function addVersion(options) {
115
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
116
+ const argumentsTypes = [
117
+ `${packageAddress}::config::Config`,
118
+ `${packageAddress}::admin::AdminCap`,
119
+ "u64",
120
+ ];
121
+ const parameterNames = ["self", "Cap", "version"];
122
+ return (tx) => tx.moveCall({
123
+ package: packageAddress,
124
+ module: "config",
125
+ function: "add_version",
126
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
127
+ });
128
+ }
129
+ export function removeVersion(options) {
130
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
131
+ const argumentsTypes = [
132
+ `${packageAddress}::config::Config`,
133
+ `${packageAddress}::admin::AdminCap`,
134
+ "u64",
135
+ ];
136
+ const parameterNames = ["self", "Cap", "version"];
137
+ return (tx) => tx.moveCall({
138
+ package: packageAddress,
139
+ module: "config",
140
+ function: "remove_version",
141
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
142
+ });
143
+ }
144
+ export function addAllowedWorks(options) {
145
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
146
+ const argumentsTypes = [
147
+ `${packageAddress}::config::Config`,
148
+ `${packageAddress}::admin::AdminCap`,
149
+ ];
150
+ const parameterNames = ["self", "Cap"];
151
+ return (tx) => tx.moveCall({
152
+ package: packageAddress,
153
+ module: "config",
154
+ function: "add_allowed_works",
155
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
156
+ typeArguments: options.typeArguments,
157
+ });
158
+ }
159
+ export function removeAllowedWorks(options) {
160
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
161
+ const argumentsTypes = [
162
+ `${packageAddress}::config::Config`,
163
+ `${packageAddress}::admin::AdminCap`,
164
+ ];
165
+ const parameterNames = ["self", "Cap"];
166
+ return (tx) => tx.moveCall({
167
+ package: packageAddress,
168
+ module: "config",
169
+ function: "remove_allowed_works",
170
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
171
+ typeArguments: options.typeArguments,
172
+ });
173
+ }
174
+ export function updatePlatformFeeBps(options) {
175
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
176
+ const argumentsTypes = [
177
+ `${packageAddress}::config::Config`,
178
+ `${packageAddress}::admin::AdminCap`,
179
+ "u64",
180
+ ];
181
+ const parameterNames = ["self", "Cap", "platformFeeBps"];
182
+ return (tx) => tx.moveCall({
183
+ package: packageAddress,
184
+ module: "config",
185
+ function: "update_platform_fee_bps",
186
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
187
+ });
188
+ }
189
+ export function addAllowedStablecoins(options) {
190
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
191
+ const argumentsTypes = [
192
+ `${packageAddress}::config::Config`,
193
+ `${packageAddress}::admin::AdminCap`,
194
+ ];
195
+ const parameterNames = ["self", "Cap"];
196
+ return (tx) => tx.moveCall({
197
+ package: packageAddress,
198
+ module: "config",
199
+ function: "add_allowed_stablecoins",
200
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
201
+ typeArguments: options.typeArguments,
202
+ });
203
+ }
204
+ export function removeAllowedStablecoins(options) {
205
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
206
+ const argumentsTypes = [
207
+ `${packageAddress}::config::Config`,
208
+ `${packageAddress}::admin::AdminCap`,
209
+ ];
210
+ const parameterNames = ["self", "Cap"];
211
+ return (tx) => tx.moveCall({
212
+ package: packageAddress,
213
+ module: "config",
214
+ function: "remove_allowed_stablecoins",
215
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
216
+ typeArguments: options.typeArguments,
217
+ });
218
+ }
219
+ export function updaqteMaxNumOfSubscriptionLevel(options) {
220
+ const packageAddress = options.package ?? "@local-pkg/zing_studio";
221
+ const argumentsTypes = [
222
+ `${packageAddress}::config::Config`,
223
+ `${packageAddress}::admin::AdminCap`,
224
+ "u8",
225
+ ];
226
+ const parameterNames = ["self", "Cap", "num"];
227
+ return (tx) => tx.moveCall({
228
+ package: packageAddress,
229
+ module: "config",
230
+ function: "updaqte_max_num_of_subscription_level",
231
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
232
+ });
233
+ }
@@ -1,16 +1,9 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
-
5
4
  /** Functionality for converting Move types into values. Use with care! */
6
-
7
5
  import { MoveStruct } from "../../../utils/index.js";
8
- import { bcs } from "@mysten/sui/bcs";
9
-
10
- const $moduleName = "std::type_name";
11
- export const TypeName = new MoveStruct({
12
- name: `${$moduleName}::TypeName`,
13
- fields: {
6
+ export declare const TypeName: MoveStruct<{
14
7
  /**
15
8
  * String representation of the type. All types are represented using their source
16
9
  * syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
@@ -20,6 +13,5 @@ export const TypeName = new MoveStruct({
20
13
  * Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
21
14
  * 32 depending on the Move platform)
22
15
  */
23
- name: bcs.string(),
24
- },
25
- });
16
+ name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
17
+ }, "std::type_name::TypeName">;
@@ -0,0 +1,22 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Functionality for converting Move types into values. Use with care! */
5
+ import { MoveStruct } from "../../../utils/index.js";
6
+ import { bcs } from "@mysten/sui/bcs";
7
+ const $moduleName = "std::type_name";
8
+ export const TypeName = new MoveStruct({
9
+ name: `${$moduleName}::TypeName`,
10
+ fields: {
11
+ /**
12
+ * String representation of the type. All types are represented using their source
13
+ * syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
14
+ * Struct types are represented as fully qualified type names; e.g.
15
+ * `00000000000000000000000000000001::string::String` or
16
+ * `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
17
+ * Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
18
+ * 32 depending on the Move platform)
19
+ */
20
+ name: bcs.string(),
21
+ },
22
+ });
@@ -0,0 +1,12 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveStruct } from "../../../utils/index.js";
5
+ export declare const Bag: MoveStruct<{
6
+ /** the ID of this bag */
7
+ id: MoveStruct<{
8
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
9
+ }, "0x2::object::UID">;
10
+ /** the number of key-value pairs in the bag */
11
+ size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
12
+ }, "0x2::bag::Bag">;
@@ -1,7 +1,6 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
-
5
4
  /**
6
5
  * A bag is a heterogeneous map-like collection. The collection is similar to
7
6
  * `sui::table` in that its keys and values are not stored within the `Bag` value,
@@ -26,18 +25,16 @@
26
25
  * `UID` can be deleted, even if it has dynamic fields associated with it, but a
27
26
  * bag, on the other hand, must be empty to be destroyed.
28
27
  */
29
-
30
28
  import * as object from "./object.js";
31
29
  import { MoveStruct } from "../../../utils/index.js";
32
30
  import { bcs } from "@mysten/sui/bcs";
33
-
34
31
  const $moduleName = "0x2::bag";
35
32
  export const Bag = new MoveStruct({
36
- name: `${$moduleName}::Bag`,
37
- fields: {
38
- /** the ID of this bag */
39
- id: object.UID,
40
- /** the number of key-value pairs in the bag */
41
- size: bcs.u64(),
42
- },
33
+ name: `${$moduleName}::Bag`,
34
+ fields: {
35
+ /** the ID of this bag */
36
+ id: object.UID,
37
+ /** the number of key-value pairs in the bag */
38
+ size: bcs.u64(),
39
+ },
43
40
  });
@@ -0,0 +1,12 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * A storable handler for Balances in general. Is used in the `Coin` module to
6
+ * allow balance operations and can be used to implement custom coins with `Supply`
7
+ * and `Balance`s.
8
+ */
9
+ import { MoveStruct } from "../../../utils/index.js";
10
+ export declare const Balance: MoveStruct<{
11
+ value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
12
+ }, "0x2::balance::Balance">;
@@ -1,20 +1,17 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
-
5
4
  /**
6
5
  * A storable handler for Balances in general. Is used in the `Coin` module to
7
6
  * allow balance operations and can be used to implement custom coins with `Supply`
8
7
  * and `Balance`s.
9
8
  */
10
-
11
9
  import { MoveStruct } from "../../../utils/index.js";
12
10
  import { bcs } from "@mysten/sui/bcs";
13
-
14
11
  const $moduleName = "0x2::balance";
15
12
  export const Balance = new MoveStruct({
16
- name: `${$moduleName}::Balance`,
17
- fields: {
18
- value: bcs.u64(),
19
- },
13
+ name: `${$moduleName}::Balance`,
14
+ fields: {
15
+ value: bcs.u64(),
16
+ },
20
17
  });
@@ -0,0 +1,12 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveStruct } from "../../../utils/index.js";
5
+ export declare const Coin: MoveStruct<{
6
+ id: MoveStruct<{
7
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
8
+ }, "0x2::object::UID">;
9
+ balance: MoveStruct<{
10
+ value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
11
+ }, "0x2::balance::Balance">;
12
+ }, "0x2::coin::Coin">;
@@ -1,21 +1,18 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
-
5
4
  /**
6
5
  * Defines the `Coin` type - platform wide representation of fungible tokens and
7
6
  * coins. `Coin` can be described as a secure wrapper around `Balance` type.
8
7
  */
9
-
10
8
  import * as balance from "./balance.js";
11
9
  import * as object from "./object.js";
12
10
  import { MoveStruct } from "../../../utils/index.js";
13
-
14
11
  const $moduleName = "0x2::coin";
15
12
  export const Coin = new MoveStruct({
16
- name: `${$moduleName}::Coin`,
17
- fields: {
18
- id: object.UID,
19
- balance: balance.Balance,
20
- },
13
+ name: `${$moduleName}::Coin`,
14
+ fields: {
15
+ id: object.UID,
16
+ balance: balance.Balance,
17
+ },
21
18
  });