@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,122 @@
1
+ import { MoveStruct } from "../../../utils/index.js";
2
+ import { bcs } from "@mysten/sui/bcs";
3
+ const $moduleName = "@local-pkg/walrus::events";
4
+ export const BlobRegistered = new MoveStruct({
5
+ name: `${$moduleName}::BlobRegistered`,
6
+ fields: {
7
+ epoch: bcs.u32(),
8
+ blob_id: bcs.u256(),
9
+ size: bcs.u64(),
10
+ encoding_type: bcs.u8(),
11
+ end_epoch: bcs.u32(),
12
+ deletable: bcs.bool(),
13
+ object_id: bcs.Address,
14
+ },
15
+ });
16
+ export const BlobCertified = new MoveStruct({
17
+ name: `${$moduleName}::BlobCertified`,
18
+ fields: {
19
+ epoch: bcs.u32(),
20
+ blob_id: bcs.u256(),
21
+ end_epoch: bcs.u32(),
22
+ deletable: bcs.bool(),
23
+ object_id: bcs.Address,
24
+ is_extension: bcs.bool(),
25
+ },
26
+ });
27
+ export const BlobDeleted = new MoveStruct({
28
+ name: `${$moduleName}::BlobDeleted`,
29
+ fields: {
30
+ epoch: bcs.u32(),
31
+ blob_id: bcs.u256(),
32
+ end_epoch: bcs.u32(),
33
+ object_id: bcs.Address,
34
+ was_certified: bcs.bool(),
35
+ },
36
+ });
37
+ export const InvalidBlobID = new MoveStruct({
38
+ name: `${$moduleName}::InvalidBlobID`,
39
+ fields: {
40
+ epoch: bcs.u32(),
41
+ blob_id: bcs.u256(),
42
+ },
43
+ });
44
+ export const EpochChangeStart = new MoveStruct({
45
+ name: `${$moduleName}::EpochChangeStart`,
46
+ fields: {
47
+ epoch: bcs.u32(),
48
+ },
49
+ });
50
+ export const EpochChangeDone = new MoveStruct({
51
+ name: `${$moduleName}::EpochChangeDone`,
52
+ fields: {
53
+ epoch: bcs.u32(),
54
+ },
55
+ });
56
+ export const ShardsReceived = new MoveStruct({
57
+ name: `${$moduleName}::ShardsReceived`,
58
+ fields: {
59
+ epoch: bcs.u32(),
60
+ shards: bcs.vector(bcs.u16()),
61
+ },
62
+ });
63
+ export const EpochParametersSelected = new MoveStruct({
64
+ name: `${$moduleName}::EpochParametersSelected`,
65
+ fields: {
66
+ next_epoch: bcs.u32(),
67
+ },
68
+ });
69
+ export const ShardRecoveryStart = new MoveStruct({
70
+ name: `${$moduleName}::ShardRecoveryStart`,
71
+ fields: {
72
+ epoch: bcs.u32(),
73
+ shards: bcs.vector(bcs.u16()),
74
+ },
75
+ });
76
+ export const ContractUpgraded = new MoveStruct({
77
+ name: `${$moduleName}::ContractUpgraded`,
78
+ fields: {
79
+ epoch: bcs.u32(),
80
+ package_id: bcs.Address,
81
+ version: bcs.u64(),
82
+ },
83
+ });
84
+ export const RegisterDenyListUpdate = new MoveStruct({
85
+ name: `${$moduleName}::RegisterDenyListUpdate`,
86
+ fields: {
87
+ epoch: bcs.u32(),
88
+ root: bcs.u256(),
89
+ sequence_number: bcs.u64(),
90
+ node_id: bcs.Address,
91
+ },
92
+ });
93
+ export const DenyListUpdate = new MoveStruct({
94
+ name: `${$moduleName}::DenyListUpdate`,
95
+ fields: {
96
+ epoch: bcs.u32(),
97
+ root: bcs.u256(),
98
+ sequence_number: bcs.u64(),
99
+ node_id: bcs.Address,
100
+ },
101
+ });
102
+ export const DenyListBlobDeleted = new MoveStruct({
103
+ name: `${$moduleName}::DenyListBlobDeleted`,
104
+ fields: {
105
+ epoch: bcs.u32(),
106
+ blob_id: bcs.u256(),
107
+ },
108
+ });
109
+ export const ContractUpgradeProposed = new MoveStruct({
110
+ name: `${$moduleName}::ContractUpgradeProposed`,
111
+ fields: {
112
+ epoch: bcs.u32(),
113
+ package_digest: bcs.vector(bcs.u8()),
114
+ },
115
+ });
116
+ export const ContractUpgradeQuorumReached = new MoveStruct({
117
+ name: `${$moduleName}::ContractUpgradeQuorumReached`,
118
+ fields: {
119
+ epoch: bcs.u32(),
120
+ package_digest: bcs.vector(bcs.u8()),
121
+ },
122
+ });
@@ -0,0 +1,71 @@
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 Metadata: MoveStruct<{
5
+ metadata: MoveStruct<{
6
+ contents: import("@mysten/sui/bcs").BcsType<{
7
+ key: string;
8
+ value: string;
9
+ }[], Iterable<{
10
+ key: string;
11
+ value: string;
12
+ }> & {
13
+ length: number;
14
+ }, string>;
15
+ }, "0x2::vec_map::VecMap<string, string>">;
16
+ }, "@local-pkg/walrus::metadata::Metadata">;
17
+ export interface NewOptions {
18
+ package?: string;
19
+ arguments?: [];
20
+ }
21
+ /** Creates a new instance of Metadata. */
22
+ export declare function _new(options?: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
23
+ export interface InsertOrUpdateArguments {
24
+ self: RawTransactionArgument<string>;
25
+ key: RawTransactionArgument<string>;
26
+ value: RawTransactionArgument<string>;
27
+ }
28
+ export interface InsertOrUpdateOptions {
29
+ package?: string;
30
+ arguments: InsertOrUpdateArguments | [
31
+ self: RawTransactionArgument<string>,
32
+ key: RawTransactionArgument<string>,
33
+ value: RawTransactionArgument<string>
34
+ ];
35
+ }
36
+ /**
37
+ * Inserts a key-value pair into the metadata.
38
+ *
39
+ * If the key is already present, the value is updated.
40
+ */
41
+ export declare function insertOrUpdate(options: InsertOrUpdateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
42
+ export interface RemoveArguments {
43
+ self: RawTransactionArgument<string>;
44
+ key: RawTransactionArgument<string>;
45
+ }
46
+ export interface RemoveOptions {
47
+ package?: string;
48
+ arguments: RemoveArguments | [
49
+ self: RawTransactionArgument<string>,
50
+ key: RawTransactionArgument<string>
51
+ ];
52
+ }
53
+ /** Removes the metadata associated with the given key. */
54
+ export declare function remove(options: RemoveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
55
+ export interface RemoveIfExistsArguments {
56
+ self: RawTransactionArgument<string>;
57
+ key: RawTransactionArgument<string>;
58
+ }
59
+ export interface RemoveIfExistsOptions {
60
+ package?: string;
61
+ arguments: RemoveIfExistsArguments | [
62
+ self: RawTransactionArgument<string>,
63
+ key: RawTransactionArgument<string>
64
+ ];
65
+ }
66
+ /**
67
+ * Removes the metadata associated with the given key, if it exists.
68
+ *
69
+ * Optionally returns the previous value associated with the key.
70
+ */
71
+ export declare function removeIfExists(options: RemoveIfExistsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
@@ -0,0 +1,73 @@
1
+ import { MoveStruct, normalizeMoveArguments } from "../../../utils/index.js";
2
+ import * as vec_map from "../sui/vec_map.js";
3
+ import { bcs } from "@mysten/sui/bcs";
4
+ const $moduleName = "@local-pkg/walrus::metadata";
5
+ export const Metadata = new MoveStruct({
6
+ name: `${$moduleName}::Metadata`,
7
+ fields: {
8
+ metadata: vec_map.VecMap(bcs.string(), bcs.string()),
9
+ },
10
+ });
11
+ /** Creates a new instance of Metadata. */
12
+ export function _new(options = {}) {
13
+ const packageAddress = options.package ?? "@local-pkg/walrus";
14
+ return (tx) => tx.moveCall({
15
+ package: packageAddress,
16
+ module: "metadata",
17
+ function: "new",
18
+ });
19
+ }
20
+ /**
21
+ * Inserts a key-value pair into the metadata.
22
+ *
23
+ * If the key is already present, the value is updated.
24
+ */
25
+ export function insertOrUpdate(options) {
26
+ const packageAddress = options.package ?? "@local-pkg/walrus";
27
+ const argumentsTypes = [
28
+ `${packageAddress}::metadata::Metadata`,
29
+ "0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
30
+ "0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
31
+ ];
32
+ const parameterNames = ["self", "key", "value"];
33
+ return (tx) => tx.moveCall({
34
+ package: packageAddress,
35
+ module: "metadata",
36
+ function: "insert_or_update",
37
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
38
+ });
39
+ }
40
+ /** Removes the metadata associated with the given key. */
41
+ export function remove(options) {
42
+ const packageAddress = options.package ?? "@local-pkg/walrus";
43
+ const argumentsTypes = [
44
+ `${packageAddress}::metadata::Metadata`,
45
+ "0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
46
+ ];
47
+ const parameterNames = ["self", "key"];
48
+ return (tx) => tx.moveCall({
49
+ package: packageAddress,
50
+ module: "metadata",
51
+ function: "remove",
52
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
53
+ });
54
+ }
55
+ /**
56
+ * Removes the metadata associated with the given key, if it exists.
57
+ *
58
+ * Optionally returns the previous value associated with the key.
59
+ */
60
+ export function removeIfExists(options) {
61
+ const packageAddress = options.package ?? "@local-pkg/walrus";
62
+ const argumentsTypes = [
63
+ `${packageAddress}::metadata::Metadata`,
64
+ "0x0000000000000000000000000000000000000000000000000000000000000001::string::String",
65
+ ];
66
+ const parameterNames = ["self", "key"];
67
+ return (tx) => tx.moveCall({
68
+ package: packageAddress,
69
+ module: "metadata",
70
+ function: "remove_if_exists",
71
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
72
+ });
73
+ }
@@ -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 Storage: MoveStruct<{
6
+ id: MoveStruct<{
7
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
8
+ }, "0x2::object::UID">;
9
+ start_epoch: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
10
+ end_epoch: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
11
+ storage_size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
12
+ }, "walrus::storage_resource::Storage">;
@@ -4,14 +4,13 @@
4
4
  import { MoveStruct } from "../../../utils/index.js";
5
5
  import * as object from "../sui/object.js";
6
6
  import { bcs } from "@mysten/sui/bcs";
7
-
8
7
  const $moduleName = "walrus::storage_resource";
9
8
  export const Storage = new MoveStruct({
10
- name: `${$moduleName}::Storage`,
11
- fields: {
12
- id: object.UID,
13
- start_epoch: bcs.u32(),
14
- end_epoch: bcs.u32(),
15
- storage_size: bcs.u64(),
16
- },
9
+ name: `${$moduleName}::Storage`,
10
+ fields: {
11
+ id: object.UID,
12
+ start_epoch: bcs.u32(),
13
+ end_epoch: bcs.u32(),
14
+ storage_size: bcs.u64(),
15
+ },
17
16
  });
@@ -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 DerivedObjectBag: 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
+ }, "zing_framework::derived_object_bag::DerivedObjectBag">;
@@ -4,14 +4,13 @@
4
4
  import { MoveStruct } from "../../../utils/index.js";
5
5
  import * as object from "../sui/object.js";
6
6
  import { bcs } from "@mysten/sui/bcs";
7
-
8
7
  const $moduleName = "zing_framework::derived_object_bag";
9
8
  export const DerivedObjectBag = new MoveStruct({
10
- name: `${$moduleName}::DerivedObjectBag`,
11
- fields: {
12
- /** the ID of this bag */
13
- id: object.UID,
14
- /** the number of key-value pairs in the bag */
15
- size: bcs.u64(),
16
- },
9
+ name: `${$moduleName}::DerivedObjectBag`,
10
+ fields: {
11
+ /** the ID of this bag */
12
+ id: object.UID,
13
+ /** the number of key-value pairs in the bag */
14
+ size: bcs.u64(),
15
+ },
17
16
  });
@@ -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 DerivedTable: MoveStruct<{
6
+ /** the ID of this table */
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 table */
11
+ size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
12
+ }, "zing_framework::derived_table::DerivedTable">;
@@ -4,14 +4,13 @@
4
4
  import { MoveStruct } from "../../../utils/index.js";
5
5
  import * as object from "../sui/object.js";
6
6
  import { bcs } from "@mysten/sui/bcs";
7
-
8
7
  const $moduleName = "zing_framework::derived_table";
9
8
  export const DerivedTable = new MoveStruct({
10
- name: `${$moduleName}::DerivedTable`,
11
- fields: {
12
- /** the ID of this table */
13
- id: object.UID,
14
- /** the number of key-value pairs in the table */
15
- size: bcs.u64(),
16
- },
9
+ name: `${$moduleName}::DerivedTable`,
10
+ fields: {
11
+ /** the ID of this table */
12
+ id: object.UID,
13
+ /** the number of key-value pairs in the table */
14
+ size: bcs.u64(),
15
+ },
17
16
  });
@@ -0,0 +1,24 @@
1
+ import { MoveStruct } from "../utils/index.js";
2
+ export declare const Donation: MoveStruct<{
3
+ id: MoveStruct<{
4
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
5
+ }, "0x2::object::UID">;
6
+ donations: MoveStruct<{
7
+ id: MoveStruct<{
8
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
9
+ }, "0x2::object::UID">;
10
+ size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
11
+ }, "0x2::table::Table">;
12
+ accumulated_donations: MoveStruct<{
13
+ id: MoveStruct<{
14
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
15
+ }, "0x2::object::UID">;
16
+ size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
17
+ }, "0x2::table::Table">;
18
+ balances: MoveStruct<{
19
+ id: MoveStruct<{
20
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
21
+ }, "0x2::object::UID">;
22
+ size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
23
+ }, "0x2::bag::Bag">;
24
+ }, "@local-pkg/zing_studio::donation::Donation">;
@@ -5,14 +5,13 @@ import * as bag from "./deps/sui/bag.js";
5
5
  import * as object from "./deps/sui/object.js";
6
6
  import * as table from "./deps/sui/table.js";
7
7
  import { MoveStruct } from "../utils/index.js";
8
-
9
8
  const $moduleName = "@local-pkg/zing_studio::donation";
10
9
  export const Donation = new MoveStruct({
11
- name: `${$moduleName}::Donation`,
12
- fields: {
13
- id: object.UID,
14
- donations: table.Table,
15
- accumulated_donations: table.Table,
16
- balances: bag.Bag,
17
- },
10
+ name: `${$moduleName}::Donation`,
11
+ fields: {
12
+ id: object.UID,
13
+ donations: table.Table,
14
+ accumulated_donations: table.Table,
15
+ balances: bag.Bag,
16
+ },
18
17
  });
@@ -0,0 +1,187 @@
1
+ import { MoveTuple, MoveStruct } from "../utils/index.js";
2
+ import type { RawTransactionArgument } from "../utils/index.js";
3
+ import type { BcsType } from "@mysten/sui/bcs";
4
+ import type { Transaction } from "@mysten/sui/transactions";
5
+ export declare const Pcrs: MoveTuple<BcsType<number[], Iterable<number> & {
6
+ length: number;
7
+ }, string>[], "@local-pkg/zing_studio::enclave::Pcrs">;
8
+ export declare const EnclaveConfig: MoveStruct<{
9
+ id: MoveStruct<{
10
+ id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
11
+ }, "0x2::object::UID">;
12
+ name: BcsType<string, string, "string">;
13
+ pcrs: MoveTuple<BcsType<number[], Iterable<number> & {
14
+ length: number;
15
+ }, string>[], "@local-pkg/zing_studio::enclave::Pcrs">;
16
+ version: BcsType<string, string | number | bigint, "u64">;
17
+ }, "@local-pkg/zing_studio::enclave::EnclaveConfig">;
18
+ export declare const Enclave: MoveStruct<{
19
+ id: MoveStruct<{
20
+ id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
21
+ }, "0x2::object::UID">;
22
+ pk: BcsType<number[], Iterable<number> & {
23
+ length: number;
24
+ }, string>;
25
+ config_version: BcsType<string, string | number | bigint, "u64">;
26
+ owner: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
27
+ }, "@local-pkg/zing_studio::enclave::Enclave">;
28
+ export declare function IntentMessage<T extends BcsType<any>>(...typeParameters: [T]): MoveStruct<{
29
+ intent: BcsType<number, number, "u8">;
30
+ timestamp_ms: BcsType<string, string | number | bigint, "u64">;
31
+ payload: T;
32
+ }, `@local-pkg/zing_studio::enclave::IntentMessage<${T["name"]}>`>;
33
+ export interface CreateEnclaveConfigArguments {
34
+ Cap: RawTransactionArgument<string>;
35
+ name: RawTransactionArgument<string>;
36
+ pcr0: RawTransactionArgument<number[]>;
37
+ pcr1: RawTransactionArgument<number[]>;
38
+ pcr2: RawTransactionArgument<number[]>;
39
+ }
40
+ export interface CreateEnclaveConfigOptions {
41
+ package?: string;
42
+ arguments: CreateEnclaveConfigArguments | [
43
+ Cap: RawTransactionArgument<string>,
44
+ name: RawTransactionArgument<string>,
45
+ pcr0: RawTransactionArgument<number[]>,
46
+ pcr1: RawTransactionArgument<number[]>,
47
+ pcr2: RawTransactionArgument<number[]>
48
+ ];
49
+ }
50
+ export declare function createEnclaveConfig(options: CreateEnclaveConfigOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
51
+ export interface RegisterEnclaveArguments {
52
+ enclaveConfig: RawTransactionArgument<string>;
53
+ document: RawTransactionArgument<string>;
54
+ }
55
+ export interface RegisterEnclaveOptions {
56
+ package?: string;
57
+ arguments: RegisterEnclaveArguments | [
58
+ enclaveConfig: RawTransactionArgument<string>,
59
+ document: RawTransactionArgument<string>
60
+ ];
61
+ }
62
+ export declare function registerEnclave(options: RegisterEnclaveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
63
+ export interface VerifySignatureArguments<P extends BcsType<any>> {
64
+ enclave: RawTransactionArgument<string>;
65
+ intentScope: RawTransactionArgument<number>;
66
+ timestampMs: RawTransactionArgument<number | bigint>;
67
+ payload: RawTransactionArgument<P>;
68
+ signature: RawTransactionArgument<number[]>;
69
+ }
70
+ export interface VerifySignatureOptions<P extends BcsType<any>> {
71
+ package?: string;
72
+ arguments: VerifySignatureArguments<P> | [
73
+ enclave: RawTransactionArgument<string>,
74
+ intentScope: RawTransactionArgument<number>,
75
+ timestampMs: RawTransactionArgument<number | bigint>,
76
+ payload: RawTransactionArgument<P>,
77
+ signature: RawTransactionArgument<number[]>
78
+ ];
79
+ typeArguments: [string];
80
+ }
81
+ export declare function verifySignature<P extends BcsType<any>>(options: VerifySignatureOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
82
+ export interface UpdatePcrsWithDocumentArguments {
83
+ config: RawTransactionArgument<string>;
84
+ Cap: RawTransactionArgument<string>;
85
+ document: RawTransactionArgument<string>;
86
+ }
87
+ export interface UpdatePcrsWithDocumentOptions {
88
+ package?: string;
89
+ arguments: UpdatePcrsWithDocumentArguments | [
90
+ config: RawTransactionArgument<string>,
91
+ Cap: RawTransactionArgument<string>,
92
+ document: RawTransactionArgument<string>
93
+ ];
94
+ }
95
+ export declare function updatePcrsWithDocument(options: UpdatePcrsWithDocumentOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
96
+ export interface UpdatePcrsArguments {
97
+ config: RawTransactionArgument<string>;
98
+ Cap: RawTransactionArgument<string>;
99
+ pcr0: RawTransactionArgument<number[]>;
100
+ pcr1: RawTransactionArgument<number[]>;
101
+ pcr2: RawTransactionArgument<number[]>;
102
+ }
103
+ export interface UpdatePcrsOptions {
104
+ package?: string;
105
+ arguments: UpdatePcrsArguments | [
106
+ config: RawTransactionArgument<string>,
107
+ Cap: RawTransactionArgument<string>,
108
+ pcr0: RawTransactionArgument<number[]>,
109
+ pcr1: RawTransactionArgument<number[]>,
110
+ pcr2: RawTransactionArgument<number[]>
111
+ ];
112
+ }
113
+ export declare function updatePcrs(options: UpdatePcrsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
114
+ export interface UpdateNameArguments {
115
+ config: RawTransactionArgument<string>;
116
+ Cap: RawTransactionArgument<string>;
117
+ name: RawTransactionArgument<string>;
118
+ }
119
+ export interface UpdateNameOptions {
120
+ package?: string;
121
+ arguments: UpdateNameArguments | [
122
+ config: RawTransactionArgument<string>,
123
+ Cap: RawTransactionArgument<string>,
124
+ name: RawTransactionArgument<string>
125
+ ];
126
+ }
127
+ export declare function updateName(options: UpdateNameOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
128
+ export interface Pcr0Arguments {
129
+ config: RawTransactionArgument<string>;
130
+ }
131
+ export interface Pcr0Options {
132
+ package?: string;
133
+ arguments: Pcr0Arguments | [config: RawTransactionArgument<string>];
134
+ }
135
+ export declare function pcr0(options: Pcr0Options): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
136
+ export interface Pcr1Arguments {
137
+ config: RawTransactionArgument<string>;
138
+ }
139
+ export interface Pcr1Options {
140
+ package?: string;
141
+ arguments: Pcr1Arguments | [config: RawTransactionArgument<string>];
142
+ }
143
+ export declare function pcr1(options: Pcr1Options): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
144
+ export interface Pcr2Arguments {
145
+ config: RawTransactionArgument<string>;
146
+ }
147
+ export interface Pcr2Options {
148
+ package?: string;
149
+ arguments: Pcr2Arguments | [config: RawTransactionArgument<string>];
150
+ }
151
+ export declare function pcr2(options: Pcr2Options): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
152
+ export interface PkArguments {
153
+ enclave: RawTransactionArgument<string>;
154
+ }
155
+ export interface PkOptions {
156
+ package?: string;
157
+ arguments: PkArguments | [enclave: RawTransactionArgument<string>];
158
+ }
159
+ export declare function pk(options: PkOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
160
+ export interface DestroyOldEnclaveArguments {
161
+ e: RawTransactionArgument<string>;
162
+ config: RawTransactionArgument<string>;
163
+ }
164
+ export interface DestroyOldEnclaveOptions {
165
+ package?: string;
166
+ arguments: DestroyOldEnclaveArguments | [
167
+ e: RawTransactionArgument<string>,
168
+ config: RawTransactionArgument<string>
169
+ ];
170
+ }
171
+ export declare function destroyOldEnclave(options: DestroyOldEnclaveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
172
+ export interface DeployOldEnclaveByOwnerArguments {
173
+ e: RawTransactionArgument<string>;
174
+ }
175
+ export interface DeployOldEnclaveByOwnerOptions {
176
+ package?: string;
177
+ arguments: DeployOldEnclaveByOwnerArguments | [e: RawTransactionArgument<string>];
178
+ }
179
+ export declare function deployOldEnclaveByOwner(options: DeployOldEnclaveByOwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
180
+ export interface PkToAddressArguments {
181
+ pk: RawTransactionArgument<number[]>;
182
+ }
183
+ export interface PkToAddressOptions {
184
+ package?: string;
185
+ arguments: PkToAddressArguments | [pk: RawTransactionArgument<number[]>];
186
+ }
187
+ export declare function pkToAddress(options: PkToAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;