@zing-protocol/zing-sdk 0.0.17 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/_generated/index.d.ts +0 -2
  2. package/dist/_generated/index.js +0 -2
  3. package/dist/_generated/utils/index.d.ts +21 -2
  4. package/dist/_generated/utils/index.js +35 -11
  5. package/dist/_generated/zing_framework/coin_utils.js +1 -4
  6. package/dist/_generated/zing_framework/derived_object_bag.d.ts +4 -3
  7. package/dist/_generated/zing_framework/derived_object_bag.js +12 -37
  8. package/dist/_generated/zing_framework/derived_table.d.ts +5 -4
  9. package/dist/_generated/zing_framework/derived_table.js +12 -33
  10. package/dist/_generated/zing_governance/admin.d.ts +4 -17
  11. package/dist/_generated/zing_governance/admin.js +3 -17
  12. package/dist/_generated/zing_governance/treasury.d.ts +5 -4
  13. package/dist/_generated/zing_governance/treasury.js +5 -15
  14. package/dist/_generated/zing_studio/app.d.ts +70 -2
  15. package/dist/_generated/zing_studio/app.js +154 -100
  16. package/dist/_generated/zing_studio/article.d.ts +6 -52
  17. package/dist/_generated/zing_studio/article.js +23 -74
  18. package/dist/_generated/zing_studio/config.d.ts +34 -3
  19. package/dist/_generated/zing_studio/config.js +47 -50
  20. package/dist/_generated/zing_studio/deps/sui/bag.d.ts +25 -3
  21. package/dist/_generated/zing_studio/deps/sui/bag.js +1 -2
  22. package/dist/_generated/zing_studio/deps/sui/balance.d.ts +1 -1
  23. package/dist/_generated/zing_studio/deps/sui/balance.js +1 -1
  24. package/dist/_generated/zing_studio/deps/sui/coin.d.ts +3 -5
  25. package/dist/_generated/zing_studio/deps/sui/coin.js +3 -3
  26. package/dist/_generated/zing_studio/deps/sui/table.d.ts +21 -4
  27. package/dist/_generated/zing_studio/deps/sui/table.js +2 -3
  28. package/dist/_generated/zing_studio/deps/walrus/blob.d.ts +2 -6
  29. package/dist/_generated/zing_studio/deps/walrus/blob.js +1 -2
  30. package/dist/_generated/zing_studio/deps/walrus/storage_resource.d.ts +1 -3
  31. package/dist/_generated/zing_studio/deps/walrus/storage_resource.js +1 -2
  32. package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.d.ts +1 -3
  33. package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.js +1 -2
  34. package/dist/_generated/zing_studio/deps/zing_framework/derived_table.d.ts +2 -4
  35. package/dist/_generated/zing_studio/deps/zing_framework/derived_table.js +2 -3
  36. package/dist/_generated/zing_studio/donation.d.ts +6 -14
  37. package/dist/_generated/zing_studio/donation.js +2 -2
  38. package/dist/_generated/zing_studio/enclave.d.ts +17 -10
  39. package/dist/_generated/zing_studio/enclave.js +16 -41
  40. package/dist/_generated/zing_studio/referral.js +15 -46
  41. package/dist/_generated/zing_studio/storage.d.ts +13 -17
  42. package/dist/_generated/zing_studio/storage.js +46 -100
  43. package/dist/_generated/zing_studio/studio.d.ts +6 -28
  44. package/dist/_generated/zing_studio/studio.js +23 -96
  45. package/dist/client/index.d.ts +18 -55
  46. package/dist/client/index.js +1 -28
  47. package/dist/getters.d.ts +17 -62
  48. package/dist/getters.js +62 -56
  49. package/dist/hooks/index.d.ts +0 -1
  50. package/dist/hooks/index.js +1 -1
  51. package/dist/hooks/useGetStudio.d.ts +4 -10
  52. package/dist/hooks/useReclaim.d.ts +0 -10
  53. package/dist/hooks/useReclaim.js +169 -92
  54. package/dist/hooks/useSignAndExecuteTransaction.js +4 -1
  55. package/dist/hooks/useZingInfiniteQueries.d.ts +3 -9
  56. package/dist/hooks/useZingInfiniteQueries.js +1 -0
  57. package/dist/hooks/useZingQueries.d.ts +8 -27
  58. package/dist/hooks/useZingQueries.js +1 -2
  59. package/dist/hooks/useZingQuery.d.ts +11 -36
  60. package/dist/hooks/useZingQuery.js +1 -2
  61. package/dist/lib/utils/index.d.ts +0 -1
  62. package/dist/lib/utils/index.js +0 -1
  63. package/dist/lib/utils/reclaim.d.ts +1 -29
  64. package/dist/lib/utils/reclaim.js +148 -87
  65. package/dist/mutations/signer.js +1 -1
  66. package/dist/mutations/walrus.js +1 -1
  67. package/package.json +1 -1
  68. package/dist/_generated/zing_framework/deps/sui/object.d.ts +0 -8
  69. package/dist/_generated/zing_framework/deps/sui/object.js +0 -13
  70. package/dist/_generated/zing_governance/deps/sui/object.d.ts +0 -8
  71. package/dist/_generated/zing_governance/deps/sui/object.js +0 -13
  72. package/dist/_generated/zing_identity/config.d.ts +0 -87
  73. package/dist/_generated/zing_identity/config.js +0 -98
  74. package/dist/_generated/zing_identity/deps/std/type_name.d.ts +0 -17
  75. package/dist/_generated/zing_identity/deps/std/type_name.js +0 -22
  76. package/dist/_generated/zing_identity/deps/sui/object.d.ts +0 -8
  77. package/dist/_generated/zing_identity/deps/sui/object.js +0 -13
  78. package/dist/_generated/zing_identity/deps/sui/object_table.d.ts +0 -12
  79. package/dist/_generated/zing_identity/deps/sui/object_table.js +0 -23
  80. package/dist/_generated/zing_identity/deps/sui/table.d.ts +0 -12
  81. package/dist/_generated/zing_identity/deps/sui/table.js +0 -35
  82. package/dist/_generated/zing_identity/deps/sui/vec_set.d.ts +0 -17
  83. package/dist/_generated/zing_identity/deps/sui/vec_set.js +0 -22
  84. package/dist/_generated/zing_identity/ecdsa.d.ts +0 -81
  85. package/dist/_generated/zing_identity/ecdsa.js +0 -87
  86. package/dist/_generated/zing_identity/identity.d.ts +0 -262
  87. package/dist/_generated/zing_identity/identity.js +0 -294
  88. package/dist/_generated/zing_identity/reclaim.d.ts +0 -356
  89. package/dist/_generated/zing_identity/reclaim.js +0 -414
  90. package/dist/_generated/zing_studio/nitro_attestation.d.ts +0 -148
  91. package/dist/_generated/zing_studio/nitro_attestation.js +0 -183
@@ -1,7 +1,6 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
- import * as object from "./deps/sui/object.js";
5
4
  import * as vec_map from "./deps/sui/vec_map.js";
6
5
  import * as derived_object_bag from "./deps/zing_framework/derived_object_bag.js";
7
6
  import * as derived_table from "./deps/zing_framework/derived_table.js";
@@ -28,7 +27,7 @@ export const STUDIO = new MoveStruct({
28
27
  export const Studio = new MoveStruct({
29
28
  name: `${$moduleName}::Studio`,
30
29
  fields: {
31
- id: object.UID,
30
+ id: bcs.Address,
32
31
  /** The owner of this studio - only they can add/remove works */
33
32
  owner: bcs.Address,
34
33
  period: Period,
@@ -71,9 +70,7 @@ export function membershipSubscriptionEarningKey(options = {}) {
71
70
  /** Returns the owner address of this studio */
72
71
  export function owner(options) {
73
72
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
74
- const argumentsTypes = [
75
- `${packageAddress}::studio::Studio`,
76
- ];
73
+ const argumentsTypes = [null];
77
74
  const parameterNames = ["self"];
78
75
  return (tx) => tx.moveCall({
79
76
  package: packageAddress,
@@ -84,9 +81,7 @@ export function owner(options) {
84
81
  }
85
82
  export function period(options) {
86
83
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
87
- const argumentsTypes = [
88
- `${packageAddress}::studio::Studio`,
89
- ];
84
+ const argumentsTypes = [null];
90
85
  const parameterNames = ["self"];
91
86
  return (tx) => tx.moveCall({
92
87
  package: packageAddress,
@@ -97,9 +92,7 @@ export function period(options) {
97
92
  }
98
93
  export function startAt(options) {
99
94
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
100
- const argumentsTypes = [
101
- `${packageAddress}::studio::Studio`,
102
- ];
95
+ const argumentsTypes = [null];
103
96
  const parameterNames = ["self"];
104
97
  return (tx) => tx.moveCall({
105
98
  package: packageAddress,
@@ -110,9 +103,7 @@ export function startAt(options) {
110
103
  }
111
104
  export function endAt(options) {
112
105
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
113
- const argumentsTypes = [
114
- `${packageAddress}::studio::Studio`,
115
- ];
106
+ const argumentsTypes = [null];
116
107
  const parameterNames = ["self"];
117
108
  return (tx) => tx.moveCall({
118
109
  package: packageAddress,
@@ -123,9 +114,7 @@ export function endAt(options) {
123
114
  }
124
115
  export function memberLevel(options) {
125
116
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
126
- const argumentsTypes = [
127
- `${packageAddress}::studio::Member`,
128
- ];
117
+ const argumentsTypes = [null];
129
118
  const parameterNames = ["member"];
130
119
  return (tx) => tx.moveCall({
131
120
  package: packageAddress,
@@ -136,9 +125,7 @@ export function memberLevel(options) {
136
125
  }
137
126
  export function memberExpiredAt(options) {
138
127
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
139
- const argumentsTypes = [
140
- `${packageAddress}::studio::Member`,
141
- ];
128
+ const argumentsTypes = [null];
142
129
  const parameterNames = ["member"];
143
130
  return (tx) => tx.moveCall({
144
131
  package: packageAddress,
@@ -149,9 +136,7 @@ export function memberExpiredAt(options) {
149
136
  }
150
137
  export function monthlySubscriptionFee(options) {
151
138
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
152
- const argumentsTypes = [
153
- `${packageAddress}::studio::Studio`,
154
- ];
139
+ const argumentsTypes = [null];
155
140
  const parameterNames = ["self"];
156
141
  return (tx) => tx.moveCall({
157
142
  package: packageAddress,
@@ -162,9 +147,7 @@ export function monthlySubscriptionFee(options) {
162
147
  }
163
148
  export function earnings(options) {
164
149
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
165
- const argumentsTypes = [
166
- `${packageAddress}::studio::Studio`,
167
- ];
150
+ const argumentsTypes = [null];
168
151
  const parameterNames = ["self"];
169
152
  return (tx) => tx.moveCall({
170
153
  package: packageAddress,
@@ -175,9 +158,7 @@ export function earnings(options) {
175
158
  }
176
159
  export function membership(options) {
177
160
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
178
- const argumentsTypes = [
179
- `${packageAddress}::studio::Studio`,
180
- ];
161
+ const argumentsTypes = [null];
181
162
  const parameterNames = ["self"];
182
163
  return (tx) => tx.moveCall({
183
164
  package: packageAddress,
@@ -192,10 +173,7 @@ export function membership(options) {
192
173
  */
193
174
  export function assetOf(options) {
194
175
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
195
- const argumentsTypes = [
196
- `${packageAddress}::studio::Studio`,
197
- "0x0000000000000000000000000000000000000000000000000000000000000002::object::ID",
198
- ];
176
+ const argumentsTypes = [null, "0x2::object::ID"];
199
177
  const parameterNames = ["self", "assetId"];
200
178
  return (tx) => tx.moveCall({
201
179
  package: packageAddress,
@@ -207,9 +185,7 @@ export function assetOf(options) {
207
185
  }
208
186
  export function works(options) {
209
187
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
210
- const argumentsTypes = [
211
- `${packageAddress}::studio::Studio`,
212
- ];
188
+ const argumentsTypes = [null];
213
189
  const parameterNames = ["self"];
214
190
  return (tx) => tx.moveCall({
215
191
  package: packageAddress,
@@ -220,9 +196,7 @@ export function works(options) {
220
196
  }
221
197
  export function encryptedFileKey(options) {
222
198
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
223
- const argumentsTypes = [
224
- `${packageAddress}::studio::Studio`,
225
- ];
199
+ const argumentsTypes = [null];
226
200
  const parameterNames = ["self"];
227
201
  return (tx) => tx.moveCall({
228
202
  package: packageAddress,
@@ -233,11 +207,7 @@ export function encryptedFileKey(options) {
233
207
  }
234
208
  export function sealApproveStudioOwner(options) {
235
209
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
236
- const argumentsTypes = [
237
- "vector<u8>",
238
- `${packageAddress}::config::Config`,
239
- `${packageAddress}::studio::Studio`,
240
- ];
210
+ const argumentsTypes = ["vector<u8>", null, null];
241
211
  const parameterNames = ["id", "config", "self"];
242
212
  return (tx) => tx.moveCall({
243
213
  package: packageAddress,
@@ -246,29 +216,9 @@ export function sealApproveStudioOwner(options) {
246
216
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
247
217
  });
248
218
  }
249
- export function sealApproveRegisteredEnclave(options) {
250
- const packageAddress = options.package ?? "@local-pkg/zing_studio";
251
- const argumentsTypes = [
252
- "vector<u8>",
253
- `${packageAddress}::config::Config`,
254
- `${packageAddress}::studio::Studio`,
255
- `${packageAddress}::enclave::Enclave`,
256
- ];
257
- const parameterNames = ["id", "config", "self", "enclave"];
258
- return (tx) => tx.moveCall({
259
- package: packageAddress,
260
- module: "studio",
261
- function: "seal_approve_registered_enclave",
262
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
263
- });
264
- }
265
219
  export function sealApproveManager(options) {
266
220
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
267
- const argumentsTypes = [
268
- "vector<u8>",
269
- `${packageAddress}::config::Config`,
270
- `${packageAddress}::studio::Studio`,
271
- ];
221
+ const argumentsTypes = ["vector<u8>", null, null];
272
222
  const parameterNames = ["id", "config", "self"];
273
223
  return (tx) => tx.moveCall({
274
224
  package: packageAddress,
@@ -283,10 +233,7 @@ export function sealApproveManager(options) {
283
233
  */
284
234
  export function studioOf(options) {
285
235
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
286
- const argumentsTypes = [
287
- `${packageAddress}::config::Config`,
288
- "address",
289
- ];
236
+ const argumentsTypes = [null, "address"];
290
237
  const parameterNames = ["config", "owner"];
291
238
  return (tx) => tx.moveCall({
292
239
  package: packageAddress,
@@ -301,10 +248,7 @@ export function studioOf(options) {
301
248
  */
302
249
  export function studioExists(options) {
303
250
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
304
- const argumentsTypes = [
305
- `${packageAddress}::config::Config`,
306
- "address",
307
- ];
251
+ const argumentsTypes = [null, "address"];
308
252
  const parameterNames = ["config", "owner"];
309
253
  return (tx) => tx.moveCall({
310
254
  package: packageAddress,
@@ -315,10 +259,7 @@ export function studioExists(options) {
315
259
  }
316
260
  export function isInValidPeriod(options) {
317
261
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
318
- const argumentsTypes = [
319
- `${packageAddress}::studio::Studio`,
320
- "0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
321
- ];
262
+ const argumentsTypes = [null, "0x2::clock::Clock"];
322
263
  const parameterNames = ["self"];
323
264
  return (tx) => tx.moveCall({
324
265
  package: packageAddress,
@@ -329,11 +270,7 @@ export function isInValidPeriod(options) {
329
270
  }
330
271
  export function membershipLevel(options) {
331
272
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
332
- const argumentsTypes = [
333
- `${packageAddress}::studio::Studio`,
334
- "address",
335
- "0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
336
- ];
273
+ const argumentsTypes = [null, "address", "0x2::clock::Clock"];
337
274
  const parameterNames = ["self", "member"];
338
275
  return (tx) => tx.moveCall({
339
276
  package: packageAddress,
@@ -344,11 +281,7 @@ export function membershipLevel(options) {
344
281
  }
345
282
  export function isMembership(options) {
346
283
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
347
- const argumentsTypes = [
348
- `${packageAddress}::studio::Studio`,
349
- "address",
350
- "0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
351
- ];
284
+ const argumentsTypes = [null, "address", "0x2::clock::Clock"];
352
285
  const parameterNames = ["self", "member"];
353
286
  return (tx) => tx.moveCall({
354
287
  package: packageAddress,
@@ -364,9 +297,7 @@ export function isMembership(options) {
364
297
  */
365
298
  export function _new(options) {
366
299
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
367
- const argumentsTypes = [
368
- `${packageAddress}::config::Config`,
369
- ];
300
+ const argumentsTypes = [null];
370
301
  const parameterNames = ["config"];
371
302
  return (tx) => tx.moveCall({
372
303
  package: packageAddress,
@@ -377,9 +308,7 @@ export function _new(options) {
377
308
  }
378
309
  export function shareStudio(options) {
379
310
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
380
- const argumentsTypes = [
381
- `${packageAddress}::studio::Studio`,
382
- ];
311
+ const argumentsTypes = [null];
383
312
  const parameterNames = ["self"];
384
313
  return (tx) => tx.moveCall({
385
314
  package: packageAddress,
@@ -390,9 +319,7 @@ export function shareStudio(options) {
390
319
  }
391
320
  export function totalEarning(options) {
392
321
  const packageAddress = options.package ?? "@local-pkg/zing_studio";
393
- const argumentsTypes = [
394
- `${packageAddress}::studio::Studio`,
395
- ];
322
+ const argumentsTypes = [null];
396
323
  const parameterNames = ["self"];
397
324
  return (tx) => tx.moveCall({
398
325
  package: packageAddress,
@@ -1,7 +1,7 @@
1
1
  import { SessionKey } from "@mysten/seal";
2
2
  import { Transaction } from "@mysten/sui/transactions";
3
3
  import type { PurchaseStorageTierParams, SetMonthlySubscriptionFeeParams, SubscribeParams } from "./types.js";
4
- import type { CoinSymbol, PlatformType, WorkType } from "../config/index.js";
4
+ import type { CoinSymbol, WorkType } from "../config/index.js";
5
5
  import type { Config } from "../config/types.js";
6
6
  import type { SuiNetwork, ZKLoginSignerState } from "../types.js";
7
7
  import type { SealClient } from "@mysten/seal";
@@ -24,17 +24,10 @@ export declare class ZingClient {
24
24
  getDerivedWorksID(address: string): string;
25
25
  getDerivedMembershipID(address: string): string;
26
26
  getReferralID(address: string): string;
27
- getIdentifierByAddress(platform: PlatformType, address: string): Promise<string | null>;
28
- getIdentifierInfoByIdentifier(platform: PlatformType, identifier: string): Promise<{
29
- owner: string;
30
- updated_at: string;
31
- } | null>;
32
27
  getStudio(owner: string): Promise<{
33
- id: {
34
- id: string;
35
- };
28
+ id: string;
36
29
  owner: string;
37
- period: string[];
30
+ period: [string, string];
38
31
  monthly_subscription_fee: {
39
32
  contents: {
40
33
  key: number;
@@ -42,15 +35,11 @@ export declare class ZingClient {
42
35
  }[];
43
36
  };
44
37
  membership: {
45
- id: {
46
- id: string;
47
- };
38
+ id: string;
48
39
  size: string;
49
40
  };
50
41
  works: {
51
- id: {
52
- id: string;
53
- };
42
+ id: string;
54
43
  size: string;
55
44
  };
56
45
  encrypted_file_key: number[] | null;
@@ -62,9 +51,7 @@ export declare class ZingClient {
62
51
  };
63
52
  } | null>;
64
53
  getStorageSpace(owner: string): Promise<{
65
- id: {
66
- id: string;
67
- };
54
+ id: string;
68
55
  owner: string;
69
56
  tier: number | null;
70
57
  storage_used: {
@@ -80,9 +67,7 @@ export declare class ZingClient {
80
67
  };
81
68
  } | null>;
82
69
  getStorageTreasury(): Promise<{
83
- id: {
84
- id: string;
85
- };
70
+ id: string;
86
71
  tier_plan: {
87
72
  contents: {
88
73
  key: number;
@@ -97,9 +82,7 @@ export declare class ZingClient {
97
82
  contents: {
98
83
  key: number;
99
84
  value: {
100
- id: {
101
- id: string;
102
- };
85
+ id: string;
103
86
  start_epoch: number;
104
87
  end_epoch: number;
105
88
  storage_size: string;
@@ -113,9 +96,7 @@ export declare class ZingClient {
113
96
  }[];
114
97
  };
115
98
  wal_treasury: {
116
- id: {
117
- id: string;
118
- };
99
+ id: string;
119
100
  balance: {
120
101
  value: string;
121
102
  };
@@ -149,26 +130,20 @@ export declare class ZingClient {
149
130
  expired_at: string;
150
131
  } | null>;
151
132
  getWork(workId: string, workType?: WorkType): Promise<{
152
- id: {
153
- id: string;
154
- };
133
+ id: string;
155
134
  owner: string;
156
135
  deleted: boolean;
157
136
  created_at: string;
158
137
  subscription_level: number | null;
159
138
  blobs: {
160
- id: {
161
- id: string;
162
- };
139
+ id: string;
163
140
  registered_epoch: number;
164
141
  blob_id: string;
165
142
  size: string;
166
143
  encoding_type: number;
167
144
  certified_epoch: number | null;
168
145
  storage: {
169
- id: {
170
- id: string;
171
- };
146
+ id: string;
172
147
  start_epoch: number;
173
148
  end_epoch: number;
174
149
  storage_size: string;
@@ -188,26 +163,20 @@ export declare class ZingClient {
188
163
  } | null>;
189
164
  getWorks(owner: string, workType?: WorkType, cursor?: string, limit?: number): Promise<{
190
165
  data: {
191
- id: {
192
- id: string;
193
- };
166
+ id: string;
194
167
  owner: string;
195
168
  deleted: boolean;
196
169
  created_at: string;
197
170
  subscription_level: number | null;
198
171
  blobs: {
199
- id: {
200
- id: string;
201
- };
172
+ id: string;
202
173
  registered_epoch: number;
203
174
  blob_id: string;
204
175
  size: string;
205
176
  encoding_type: number;
206
177
  certified_epoch: number | null;
207
178
  storage: {
208
- id: {
209
- id: string;
210
- };
179
+ id: string;
211
180
  start_epoch: number;
212
181
  end_epoch: number;
213
182
  storage_size: string;
@@ -229,26 +198,20 @@ export declare class ZingClient {
229
198
  hasNextPage: boolean;
230
199
  }>;
231
200
  getWorksByObjectIds(owner: string, workObjectIds: string[], workType?: WorkType): Promise<{
232
- id: {
233
- id: string;
234
- };
201
+ id: string;
235
202
  owner: string;
236
203
  deleted: boolean;
237
204
  created_at: string;
238
205
  subscription_level: number | null;
239
206
  blobs: {
240
- id: {
241
- id: string;
242
- };
207
+ id: string;
243
208
  registered_epoch: number;
244
209
  blob_id: string;
245
210
  size: string;
246
211
  encoding_type: number;
247
212
  certified_epoch: number | null;
248
213
  storage: {
249
- id: {
250
- id: string;
251
- };
214
+ id: string;
252
215
  start_epoch: number;
253
216
  end_epoch: number;
254
217
  storage_size: string;
@@ -4,7 +4,7 @@ import { addReferralToStudio } from "../_generated/zing_studio/referral.js";
4
4
  import { shareStorageSpace } from "../_generated/zing_studio/storage.js";
5
5
  import { _new as newStudio, sealApproveStudioOwner, shareStudio, } from "../_generated/zing_studio/studio.js";
6
6
  import { getConfig } from "../config/index.js";
7
- import { getDerivedMembershipID, getDerivedStorageID, getDerivedStudioID, getDerivedWorksID, getIdentifierByAddress, getIdentifierInfoByIdentifier, getMember, getMembers, getReferral, getReferralID, getStorageSpace, getStorageTreasury, getStudio, getWork, getWorks, getWorksByObjectIds, } from "../getters.js";
7
+ import { getDerivedMembershipID, getDerivedStorageID, getDerivedStudioID, getDerivedWorksID, getMember, getMembers, getReferral, getReferralID, getStorageSpace, getStorageTreasury, getStudio, getWork, getWorks, getWorksByObjectIds, } from "../getters.js";
8
8
  import { importFileKey } from "../mutations/seal.js";
9
9
  import { signPersonalMessage } from "../mutations/signer.js";
10
10
  import { SessionKey } from "@mysten/seal";
@@ -36,33 +36,6 @@ export class ZingClient {
36
36
  getReferralID(address) {
37
37
  return getReferralID(this.config.zing.ZING_STUDIO_CONFIG_SHARED_OBJECT_REF.objectId, address);
38
38
  }
39
- async getIdentifierByAddress(platform, address) {
40
- return getIdentifierByAddress(this.suiGrpcClient, this.config.zing.IDENTITY_PLATFORMS[platform]
41
- .IDENTITY_MANAGER_ADDRESS_TO_IDENTIFIER_DF_ID, address);
42
- }
43
- async getIdentifierInfoByIdentifier(platform, identifier) {
44
- return getIdentifierInfoByIdentifier(this.suiGrpcClient, this.config.zing.IDENTITY_PLATFORMS[platform]
45
- .IDENTITY_MANAGER_IDENTIFIER_INFO_DF_ID, identifier);
46
- }
47
- // async getDonationByIdentifier(identifier: string) {
48
- // const donations = await getDonationByIdentifier(
49
- // this.suiGrpcClient,
50
- // this.config.zing.DONATIONS_TABLE_DF_ID,
51
- // identifier,
52
- // );
53
- //
54
- // return Object.keys(this.config.coins).reduce(
55
- // (acc, coinSymbol) => {
56
- // const symbol = coinSymbol as CoinSymbol;
57
- // const donation = donations?.contents.find(
58
- // (c) => c.key.name === this.config.coins[symbol],
59
- // );
60
- // if (donation) acc[symbol] = donation.value;
61
- // return acc;
62
- // },
63
- // {} as Record<CoinSymbol, string>,
64
- // );
65
- // }
66
39
  async getStudio(owner) {
67
40
  return getStudio(this.suiGrpcClient, this.getDerivedStudioID(owner));
68
41
  }
package/dist/getters.d.ts CHANGED
@@ -6,25 +6,10 @@ export declare function getDerivedStorageID(studioConfigId: string, address: str
6
6
  export declare function getDerivedWorksID(studioConfigId: string, address: string): string;
7
7
  export declare function getDerivedMembershipID(studioConfigId: string, address: string): string;
8
8
  export declare function getReferralID(studioConfigId: string, address: string): string;
9
- export declare function getIdentifierByAddress(suiGrpcClient: SuiGrpcClient, addressToIdentifierDynamicFieldId: string, address: string): Promise<string | null>;
10
- export declare function getIdentifierInfoByIdentifier(suiGrpcClient: SuiGrpcClient, identifierInfoDynamicFieldId: string, identifier: string): Promise<{
11
- owner: string;
12
- updated_at: string;
13
- } | null>;
14
- export declare function getDonationByIdentifier(suiGrpcClient: SuiGrpcClient, donationTableId: string, identifier: string): Promise<{
15
- contents: {
16
- key: {
17
- name: string;
18
- };
19
- value: string;
20
- }[];
21
- } | null>;
22
9
  export declare function getStudio(suiGrpcClient: SuiGrpcClient, studioId: string): Promise<{
23
- id: {
24
- id: string;
25
- };
10
+ id: string;
26
11
  owner: string;
27
- period: string[];
12
+ period: [string, string];
28
13
  monthly_subscription_fee: {
29
14
  contents: {
30
15
  key: number;
@@ -32,15 +17,11 @@ export declare function getStudio(suiGrpcClient: SuiGrpcClient, studioId: string
32
17
  }[];
33
18
  };
34
19
  membership: {
35
- id: {
36
- id: string;
37
- };
20
+ id: string;
38
21
  size: string;
39
22
  };
40
23
  works: {
41
- id: {
42
- id: string;
43
- };
24
+ id: string;
44
25
  size: string;
45
26
  };
46
27
  encrypted_file_key: number[] | null;
@@ -52,9 +33,7 @@ export declare function getStudio(suiGrpcClient: SuiGrpcClient, studioId: string
52
33
  };
53
34
  } | null>;
54
35
  export declare function getStorageSpace(suiGrpcClient: SuiGrpcClient, storageSpaceId: string): Promise<{
55
- id: {
56
- id: string;
57
- };
36
+ id: string;
58
37
  owner: string;
59
38
  tier: number | null;
60
39
  storage_used: {
@@ -70,9 +49,7 @@ export declare function getStorageSpace(suiGrpcClient: SuiGrpcClient, storageSpa
70
49
  };
71
50
  } | null>;
72
51
  export declare function getStorageTreasury(suiGrpcClient: SuiGrpcClient, storageTreasuryId: string): Promise<{
73
- id: {
74
- id: string;
75
- };
52
+ id: string;
76
53
  tier_plan: {
77
54
  contents: {
78
55
  key: number;
@@ -87,9 +64,7 @@ export declare function getStorageTreasury(suiGrpcClient: SuiGrpcClient, storage
87
64
  contents: {
88
65
  key: number;
89
66
  value: {
90
- id: {
91
- id: string;
92
- };
67
+ id: string;
93
68
  start_epoch: number;
94
69
  end_epoch: number;
95
70
  storage_size: string;
@@ -103,9 +78,7 @@ export declare function getStorageTreasury(suiGrpcClient: SuiGrpcClient, storage
103
78
  }[];
104
79
  };
105
80
  wal_treasury: {
106
- id: {
107
- id: string;
108
- };
81
+ id: string;
109
82
  balance: {
110
83
  value: string;
111
84
  };
@@ -139,26 +112,20 @@ export declare function getReferral(suiGrpcClient: SuiGrpcClient, referralID: st
139
112
  expired_at: string;
140
113
  } | null>;
141
114
  export declare function getWork(suiGrpcClient: SuiGrpcClient, workId: string, workType?: string): Promise<{
142
- id: {
143
- id: string;
144
- };
115
+ id: string;
145
116
  owner: string;
146
117
  deleted: boolean;
147
118
  created_at: string;
148
119
  subscription_level: number | null;
149
120
  blobs: {
150
- id: {
151
- id: string;
152
- };
121
+ id: string;
153
122
  registered_epoch: number;
154
123
  blob_id: string;
155
124
  size: string;
156
125
  encoding_type: number;
157
126
  certified_epoch: number | null;
158
127
  storage: {
159
- id: {
160
- id: string;
161
- };
128
+ id: string;
162
129
  start_epoch: number;
163
130
  end_epoch: number;
164
131
  storage_size: string;
@@ -178,26 +145,20 @@ export declare function getWork(suiGrpcClient: SuiGrpcClient, workId: string, wo
178
145
  } | null>;
179
146
  export declare function getWorks(suiGrpcClient: SuiGrpcClient, workTableId: string, workType?: string, cursor?: string, limit?: number): Promise<{
180
147
  data: {
181
- id: {
182
- id: string;
183
- };
148
+ id: string;
184
149
  owner: string;
185
150
  deleted: boolean;
186
151
  created_at: string;
187
152
  subscription_level: number | null;
188
153
  blobs: {
189
- id: {
190
- id: string;
191
- };
154
+ id: string;
192
155
  registered_epoch: number;
193
156
  blob_id: string;
194
157
  size: string;
195
158
  encoding_type: number;
196
159
  certified_epoch: number | null;
197
160
  storage: {
198
- id: {
199
- id: string;
200
- };
161
+ id: string;
201
162
  start_epoch: number;
202
163
  end_epoch: number;
203
164
  storage_size: string;
@@ -219,26 +180,20 @@ export declare function getWorks(suiGrpcClient: SuiGrpcClient, workTableId: stri
219
180
  hasNextPage: boolean;
220
181
  }>;
221
182
  export declare function getWorksByObjectIds(suiGrpcClient: SuiGrpcClient, workObjectIds: string[], workType?: string): Promise<{
222
- id: {
223
- id: string;
224
- };
183
+ id: string;
225
184
  owner: string;
226
185
  deleted: boolean;
227
186
  created_at: string;
228
187
  subscription_level: number | null;
229
188
  blobs: {
230
- id: {
231
- id: string;
232
- };
189
+ id: string;
233
190
  registered_epoch: number;
234
191
  blob_id: string;
235
192
  size: string;
236
193
  encoding_type: number;
237
194
  certified_epoch: number | null;
238
195
  storage: {
239
- id: {
240
- id: string;
241
- };
196
+ id: string;
242
197
  start_epoch: number;
243
198
  end_epoch: number;
244
199
  storage_size: string;