@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.
- package/dist/_generated/index.d.ts +0 -2
- package/dist/_generated/index.js +0 -2
- package/dist/_generated/utils/index.d.ts +21 -2
- package/dist/_generated/utils/index.js +35 -11
- package/dist/_generated/zing_framework/coin_utils.js +1 -4
- package/dist/_generated/zing_framework/derived_object_bag.d.ts +4 -3
- package/dist/_generated/zing_framework/derived_object_bag.js +12 -37
- package/dist/_generated/zing_framework/derived_table.d.ts +5 -4
- package/dist/_generated/zing_framework/derived_table.js +12 -33
- package/dist/_generated/zing_governance/admin.d.ts +4 -17
- package/dist/_generated/zing_governance/admin.js +3 -17
- package/dist/_generated/zing_governance/treasury.d.ts +5 -4
- package/dist/_generated/zing_governance/treasury.js +5 -15
- package/dist/_generated/zing_studio/app.d.ts +70 -2
- package/dist/_generated/zing_studio/app.js +154 -100
- package/dist/_generated/zing_studio/article.d.ts +6 -52
- package/dist/_generated/zing_studio/article.js +23 -74
- package/dist/_generated/zing_studio/config.d.ts +34 -3
- package/dist/_generated/zing_studio/config.js +47 -50
- package/dist/_generated/zing_studio/deps/sui/bag.d.ts +25 -3
- package/dist/_generated/zing_studio/deps/sui/bag.js +1 -2
- package/dist/_generated/zing_studio/deps/sui/balance.d.ts +1 -1
- package/dist/_generated/zing_studio/deps/sui/balance.js +1 -1
- package/dist/_generated/zing_studio/deps/sui/coin.d.ts +3 -5
- package/dist/_generated/zing_studio/deps/sui/coin.js +3 -3
- package/dist/_generated/zing_studio/deps/sui/table.d.ts +21 -4
- package/dist/_generated/zing_studio/deps/sui/table.js +2 -3
- package/dist/_generated/zing_studio/deps/walrus/blob.d.ts +2 -6
- package/dist/_generated/zing_studio/deps/walrus/blob.js +1 -2
- package/dist/_generated/zing_studio/deps/walrus/storage_resource.d.ts +1 -3
- package/dist/_generated/zing_studio/deps/walrus/storage_resource.js +1 -2
- package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.d.ts +1 -3
- package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.js +1 -2
- package/dist/_generated/zing_studio/deps/zing_framework/derived_table.d.ts +2 -4
- package/dist/_generated/zing_studio/deps/zing_framework/derived_table.js +2 -3
- package/dist/_generated/zing_studio/donation.d.ts +6 -14
- package/dist/_generated/zing_studio/donation.js +2 -2
- package/dist/_generated/zing_studio/enclave.d.ts +17 -10
- package/dist/_generated/zing_studio/enclave.js +16 -41
- package/dist/_generated/zing_studio/referral.js +15 -46
- package/dist/_generated/zing_studio/storage.d.ts +13 -17
- package/dist/_generated/zing_studio/storage.js +46 -100
- package/dist/_generated/zing_studio/studio.d.ts +6 -28
- package/dist/_generated/zing_studio/studio.js +23 -96
- package/dist/client/index.d.ts +18 -55
- package/dist/client/index.js +1 -28
- package/dist/getters.d.ts +17 -62
- package/dist/getters.js +62 -56
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useGetStudio.d.ts +4 -10
- package/dist/hooks/useReclaim.d.ts +0 -10
- package/dist/hooks/useReclaim.js +169 -92
- package/dist/hooks/useSignAndExecuteTransaction.js +4 -1
- package/dist/hooks/useZingInfiniteQueries.d.ts +3 -9
- package/dist/hooks/useZingInfiniteQueries.js +1 -0
- package/dist/hooks/useZingQueries.d.ts +8 -27
- package/dist/hooks/useZingQueries.js +1 -2
- package/dist/hooks/useZingQuery.d.ts +11 -36
- package/dist/hooks/useZingQuery.js +1 -2
- package/dist/lib/utils/index.d.ts +0 -1
- package/dist/lib/utils/index.js +0 -1
- package/dist/lib/utils/reclaim.d.ts +1 -29
- package/dist/lib/utils/reclaim.js +148 -87
- package/dist/mutations/signer.js +1 -1
- package/dist/mutations/walrus.js +1 -1
- package/package.json +1 -1
- package/dist/_generated/zing_framework/deps/sui/object.d.ts +0 -8
- package/dist/_generated/zing_framework/deps/sui/object.js +0 -13
- package/dist/_generated/zing_governance/deps/sui/object.d.ts +0 -8
- package/dist/_generated/zing_governance/deps/sui/object.js +0 -13
- package/dist/_generated/zing_identity/config.d.ts +0 -87
- package/dist/_generated/zing_identity/config.js +0 -98
- package/dist/_generated/zing_identity/deps/std/type_name.d.ts +0 -17
- package/dist/_generated/zing_identity/deps/std/type_name.js +0 -22
- package/dist/_generated/zing_identity/deps/sui/object.d.ts +0 -8
- package/dist/_generated/zing_identity/deps/sui/object.js +0 -13
- package/dist/_generated/zing_identity/deps/sui/object_table.d.ts +0 -12
- package/dist/_generated/zing_identity/deps/sui/object_table.js +0 -23
- package/dist/_generated/zing_identity/deps/sui/table.d.ts +0 -12
- package/dist/_generated/zing_identity/deps/sui/table.js +0 -35
- package/dist/_generated/zing_identity/deps/sui/vec_set.d.ts +0 -17
- package/dist/_generated/zing_identity/deps/sui/vec_set.js +0 -22
- package/dist/_generated/zing_identity/ecdsa.d.ts +0 -81
- package/dist/_generated/zing_identity/ecdsa.js +0 -87
- package/dist/_generated/zing_identity/identity.d.ts +0 -262
- package/dist/_generated/zing_identity/identity.js +0 -294
- package/dist/_generated/zing_identity/reclaim.d.ts +0 -356
- package/dist/_generated/zing_identity/reclaim.js +0 -414
- package/dist/_generated/zing_studio/nitro_attestation.d.ts +0 -148
- package/dist/_generated/zing_studio/nitro_attestation.js +0 -183
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
import * as object from "./deps/sui/object.js";
|
|
5
|
-
import * as object_table from "./deps/sui/object_table.js";
|
|
6
|
-
import * as table from "./deps/sui/table.js";
|
|
7
|
-
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
8
|
-
import { bcs } from "@mysten/sui/bcs";
|
|
9
|
-
const $moduleName = "@local-pkg/zing_identity::reclaim";
|
|
10
|
-
export const ReclaimManager = new MoveStruct({
|
|
11
|
-
name: `${$moduleName}::ReclaimManager`,
|
|
12
|
-
fields: {
|
|
13
|
-
id: object.UID,
|
|
14
|
-
witnesses: bcs.vector(bcs.vector(bcs.u8())),
|
|
15
|
-
witnesses_num_threshold: bcs.u8(),
|
|
16
|
-
commitments: object_table.ObjectTable,
|
|
17
|
-
identifier_hash_to_commitment: table.Table,
|
|
18
|
-
max_reveal_window: bcs.u64(),
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
export const ClaimInfo = new MoveStruct({
|
|
22
|
-
name: `${$moduleName}::ClaimInfo`,
|
|
23
|
-
fields: {
|
|
24
|
-
provider: bcs.string(),
|
|
25
|
-
parameters: bcs.string(),
|
|
26
|
-
context: bcs.string(),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
export const ClaimData = new MoveStruct({
|
|
30
|
-
name: `${$moduleName}::ClaimData`,
|
|
31
|
-
fields: {
|
|
32
|
-
identifier: bcs.string(),
|
|
33
|
-
owner: bcs.string(),
|
|
34
|
-
epoch: bcs.string(),
|
|
35
|
-
timestamp_s: bcs.string(),
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
export const SignedClaim = new MoveStruct({
|
|
39
|
-
name: `${$moduleName}::SignedClaim`,
|
|
40
|
-
fields: {
|
|
41
|
-
claim: ClaimData,
|
|
42
|
-
signatures: bcs.vector(bcs.vector(bcs.u8())),
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
export const Proof = new MoveStruct({
|
|
46
|
-
name: `${$moduleName}::Proof`,
|
|
47
|
-
fields: {
|
|
48
|
-
id: object.UID,
|
|
49
|
-
claimed_at: bcs.u64(),
|
|
50
|
-
claim_info: ClaimInfo,
|
|
51
|
-
signed_claim: SignedClaim,
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
export const ProofCommitment = new MoveStruct({
|
|
55
|
-
name: `${$moduleName}::ProofCommitment`,
|
|
56
|
-
fields: {
|
|
57
|
-
id: object.UID,
|
|
58
|
-
commitment_hash: bcs.vector(bcs.u8()),
|
|
59
|
-
committer: bcs.Address,
|
|
60
|
-
commit_timestamp: bcs.u64(),
|
|
61
|
-
identifier_hash: bcs.vector(bcs.u8()),
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
export function newClaimInfo(options) {
|
|
65
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
66
|
-
const argumentsTypes = [
|
|
67
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
68
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
69
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
70
|
-
];
|
|
71
|
-
const parameterNames = ["provider", "parameters", "context"];
|
|
72
|
-
return (tx) => tx.moveCall({
|
|
73
|
-
package: packageAddress,
|
|
74
|
-
module: "reclaim",
|
|
75
|
-
function: "new_claim_info",
|
|
76
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
export function provider(options) {
|
|
80
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
81
|
-
const argumentsTypes = [
|
|
82
|
-
`${packageAddress}::reclaim::ClaimInfo`,
|
|
83
|
-
];
|
|
84
|
-
const parameterNames = ["claimInfo"];
|
|
85
|
-
return (tx) => tx.moveCall({
|
|
86
|
-
package: packageAddress,
|
|
87
|
-
module: "reclaim",
|
|
88
|
-
function: "provider",
|
|
89
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
export function parameters(options) {
|
|
93
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
94
|
-
const argumentsTypes = [
|
|
95
|
-
`${packageAddress}::reclaim::ClaimInfo`,
|
|
96
|
-
];
|
|
97
|
-
const parameterNames = ["claimInfo"];
|
|
98
|
-
return (tx) => tx.moveCall({
|
|
99
|
-
package: packageAddress,
|
|
100
|
-
module: "reclaim",
|
|
101
|
-
function: "parameters",
|
|
102
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
export function context(options) {
|
|
106
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
107
|
-
const argumentsTypes = [
|
|
108
|
-
`${packageAddress}::reclaim::ClaimInfo`,
|
|
109
|
-
];
|
|
110
|
-
const parameterNames = ["claimInfo"];
|
|
111
|
-
return (tx) => tx.moveCall({
|
|
112
|
-
package: packageAddress,
|
|
113
|
-
module: "reclaim",
|
|
114
|
-
function: "context",
|
|
115
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
export function identifier(options) {
|
|
119
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
120
|
-
const argumentsTypes = [
|
|
121
|
-
`${packageAddress}::reclaim::ClaimData`,
|
|
122
|
-
];
|
|
123
|
-
const parameterNames = ["claimData"];
|
|
124
|
-
return (tx) => tx.moveCall({
|
|
125
|
-
package: packageAddress,
|
|
126
|
-
module: "reclaim",
|
|
127
|
-
function: "identifier",
|
|
128
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
export function owner(options) {
|
|
132
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
133
|
-
const argumentsTypes = [
|
|
134
|
-
`${packageAddress}::reclaim::ClaimData`,
|
|
135
|
-
];
|
|
136
|
-
const parameterNames = ["claimData"];
|
|
137
|
-
return (tx) => tx.moveCall({
|
|
138
|
-
package: packageAddress,
|
|
139
|
-
module: "reclaim",
|
|
140
|
-
function: "owner",
|
|
141
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
export function epoch(options) {
|
|
145
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
146
|
-
const argumentsTypes = [
|
|
147
|
-
`${packageAddress}::reclaim::ClaimData`,
|
|
148
|
-
];
|
|
149
|
-
const parameterNames = ["claimData"];
|
|
150
|
-
return (tx) => tx.moveCall({
|
|
151
|
-
package: packageAddress,
|
|
152
|
-
module: "reclaim",
|
|
153
|
-
function: "epoch",
|
|
154
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
export function timestampS(options) {
|
|
158
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
159
|
-
const argumentsTypes = [
|
|
160
|
-
`${packageAddress}::reclaim::ClaimData`,
|
|
161
|
-
];
|
|
162
|
-
const parameterNames = ["claimData"];
|
|
163
|
-
return (tx) => tx.moveCall({
|
|
164
|
-
package: packageAddress,
|
|
165
|
-
module: "reclaim",
|
|
166
|
-
function: "timestamp_s",
|
|
167
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
export function newClaimData(options) {
|
|
171
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
172
|
-
const argumentsTypes = [
|
|
173
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
174
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
175
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
176
|
-
"u64",
|
|
177
|
-
];
|
|
178
|
-
const parameterNames = ["identifier", "owner", "epoch", "timestampS"];
|
|
179
|
-
return (tx) => tx.moveCall({
|
|
180
|
-
package: packageAddress,
|
|
181
|
-
module: "reclaim",
|
|
182
|
-
function: "new_claim_data",
|
|
183
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
export function claimData(options) {
|
|
187
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
188
|
-
const argumentsTypes = [
|
|
189
|
-
`${packageAddress}::reclaim::SignedClaim`,
|
|
190
|
-
];
|
|
191
|
-
const parameterNames = ["signedClaim"];
|
|
192
|
-
return (tx) => tx.moveCall({
|
|
193
|
-
package: packageAddress,
|
|
194
|
-
module: "reclaim",
|
|
195
|
-
function: "claim_data",
|
|
196
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
export function signatures(options) {
|
|
200
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
201
|
-
const argumentsTypes = [
|
|
202
|
-
`${packageAddress}::reclaim::SignedClaim`,
|
|
203
|
-
];
|
|
204
|
-
const parameterNames = ["signedClaim"];
|
|
205
|
-
return (tx) => tx.moveCall({
|
|
206
|
-
package: packageAddress,
|
|
207
|
-
module: "reclaim",
|
|
208
|
-
function: "signatures",
|
|
209
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
export function newSignedClaim(options) {
|
|
213
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
214
|
-
const argumentsTypes = [
|
|
215
|
-
`${packageAddress}::reclaim::ClaimData`,
|
|
216
|
-
"vector<vector<u8>>",
|
|
217
|
-
];
|
|
218
|
-
const parameterNames = ["claim", "signatures"];
|
|
219
|
-
return (tx) => tx.moveCall({
|
|
220
|
-
package: packageAddress,
|
|
221
|
-
module: "reclaim",
|
|
222
|
-
function: "new_signed_claim",
|
|
223
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
export function proofClaimedAt(options) {
|
|
227
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
228
|
-
const argumentsTypes = [
|
|
229
|
-
`${packageAddress}::reclaim::Proof<${options.typeArguments[0]}>`,
|
|
230
|
-
];
|
|
231
|
-
const parameterNames = ["proof"];
|
|
232
|
-
return (tx) => tx.moveCall({
|
|
233
|
-
package: packageAddress,
|
|
234
|
-
module: "reclaim",
|
|
235
|
-
function: "proof_claimed_at",
|
|
236
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
237
|
-
typeArguments: options.typeArguments,
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
export function proofClaimInfo(options) {
|
|
241
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
242
|
-
const argumentsTypes = [
|
|
243
|
-
`${packageAddress}::reclaim::Proof<${options.typeArguments[0]}>`,
|
|
244
|
-
];
|
|
245
|
-
const parameterNames = ["proof"];
|
|
246
|
-
return (tx) => tx.moveCall({
|
|
247
|
-
package: packageAddress,
|
|
248
|
-
module: "reclaim",
|
|
249
|
-
function: "proof_claim_info",
|
|
250
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
251
|
-
typeArguments: options.typeArguments,
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
export function proofSignedClaim(options) {
|
|
255
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
256
|
-
const argumentsTypes = [
|
|
257
|
-
`${packageAddress}::reclaim::Proof<${options.typeArguments[0]}>`,
|
|
258
|
-
];
|
|
259
|
-
const parameterNames = ["proof"];
|
|
260
|
-
return (tx) => tx.moveCall({
|
|
261
|
-
package: packageAddress,
|
|
262
|
-
module: "reclaim",
|
|
263
|
-
function: "proof_signed_claim",
|
|
264
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
265
|
-
typeArguments: options.typeArguments,
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
export function updateWitnesses(options) {
|
|
269
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
270
|
-
const argumentsTypes = [
|
|
271
|
-
`${packageAddress}::reclaim::ReclaimManager<${options.typeArguments[0]}>`,
|
|
272
|
-
`${packageAddress}::admin::AdminCap`,
|
|
273
|
-
"vector<vector<u8>>",
|
|
274
|
-
];
|
|
275
|
-
const parameterNames = ["self", "Cap", "witnesses"];
|
|
276
|
-
return (tx) => tx.moveCall({
|
|
277
|
-
package: packageAddress,
|
|
278
|
-
module: "reclaim",
|
|
279
|
-
function: "update_witnesses",
|
|
280
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
281
|
-
typeArguments: options.typeArguments,
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
export function updateWitnessesNumThreshold(options) {
|
|
285
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
286
|
-
const argumentsTypes = [
|
|
287
|
-
`${packageAddress}::reclaim::ReclaimManager<${options.typeArguments[0]}>`,
|
|
288
|
-
`${packageAddress}::admin::AdminCap`,
|
|
289
|
-
"u8",
|
|
290
|
-
];
|
|
291
|
-
const parameterNames = ["self", "Cap", "witnessesNumThreshold"];
|
|
292
|
-
return (tx) => tx.moveCall({
|
|
293
|
-
package: packageAddress,
|
|
294
|
-
module: "reclaim",
|
|
295
|
-
function: "update_witnesses_num_threshold",
|
|
296
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
297
|
-
typeArguments: options.typeArguments,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
export function updateMaxRevealWindow(options) {
|
|
301
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
302
|
-
const argumentsTypes = [
|
|
303
|
-
`${packageAddress}::reclaim::ReclaimManager<${options.typeArguments[0]}>`,
|
|
304
|
-
`${packageAddress}::admin::AdminCap`,
|
|
305
|
-
"u64",
|
|
306
|
-
];
|
|
307
|
-
const parameterNames = ["self", "Cap", "maxRevealWindow"];
|
|
308
|
-
return (tx) => tx.moveCall({
|
|
309
|
-
package: packageAddress,
|
|
310
|
-
module: "reclaim",
|
|
311
|
-
function: "update_max_reveal_window",
|
|
312
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
313
|
-
typeArguments: options.typeArguments,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
export function cleanupExpiredCommitments(options) {
|
|
317
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
318
|
-
const argumentsTypes = [
|
|
319
|
-
`${packageAddress}::reclaim::ReclaimManager<${options.typeArguments[0]}>`,
|
|
320
|
-
`${packageAddress}::admin::AdminCap`,
|
|
321
|
-
"vector<0x0000000000000000000000000000000000000000000000000000000000000002::object::ID>",
|
|
322
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
323
|
-
];
|
|
324
|
-
const parameterNames = ["self", "Cap", "commitmentIds"];
|
|
325
|
-
return (tx) => tx.moveCall({
|
|
326
|
-
package: packageAddress,
|
|
327
|
-
module: "reclaim",
|
|
328
|
-
function: "cleanup_expired_commitments",
|
|
329
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
330
|
-
typeArguments: options.typeArguments,
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
export function burnProof(options) {
|
|
334
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
335
|
-
const argumentsTypes = [
|
|
336
|
-
`${packageAddress}::reclaim::Proof<${options.typeArguments[0]}>`,
|
|
337
|
-
];
|
|
338
|
-
const parameterNames = ["proof"];
|
|
339
|
-
return (tx) => tx.moveCall({
|
|
340
|
-
package: packageAddress,
|
|
341
|
-
module: "reclaim",
|
|
342
|
-
function: "burn_proof",
|
|
343
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
344
|
-
typeArguments: options.typeArguments,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
export function commitProof(options) {
|
|
348
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
349
|
-
const argumentsTypes = [
|
|
350
|
-
`${packageAddress}::reclaim::ReclaimManager<${options.typeArguments[0]}>`,
|
|
351
|
-
`${packageAddress}::config::Config`,
|
|
352
|
-
"vector<u8>",
|
|
353
|
-
"vector<u8>",
|
|
354
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
355
|
-
];
|
|
356
|
-
const parameterNames = ["self", "config", "commitmentHash", "identifierHash"];
|
|
357
|
-
return (tx) => tx.moveCall({
|
|
358
|
-
package: packageAddress,
|
|
359
|
-
module: "reclaim",
|
|
360
|
-
function: "commit_proof",
|
|
361
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
362
|
-
typeArguments: options.typeArguments,
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
export function revealAndVerifyProof(options) {
|
|
366
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
367
|
-
const argumentsTypes = [
|
|
368
|
-
`${packageAddress}::reclaim::ReclaimManager<${options.typeArguments[0]}>`,
|
|
369
|
-
`${packageAddress}::config::Config`,
|
|
370
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::object::ID",
|
|
371
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
372
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
373
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
374
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
375
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
376
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
377
|
-
"u64",
|
|
378
|
-
"vector<vector<u8>>",
|
|
379
|
-
"vector<u8>",
|
|
380
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
381
|
-
];
|
|
382
|
-
const parameterNames = [
|
|
383
|
-
"self",
|
|
384
|
-
"config",
|
|
385
|
-
"commitmentId",
|
|
386
|
-
"provider",
|
|
387
|
-
"parameters",
|
|
388
|
-
"context",
|
|
389
|
-
"identifier",
|
|
390
|
-
"owner",
|
|
391
|
-
"epoch",
|
|
392
|
-
"timestampS",
|
|
393
|
-
"signatures",
|
|
394
|
-
"nonce",
|
|
395
|
-
];
|
|
396
|
-
return (tx) => tx.moveCall({
|
|
397
|
-
package: packageAddress,
|
|
398
|
-
module: "reclaim",
|
|
399
|
-
function: "reveal_and_verify_proof",
|
|
400
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
401
|
-
typeArguments: options.typeArguments,
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
export function bytesToHex(options) {
|
|
405
|
-
const packageAddress = options.package ?? "@local-pkg/zing_identity";
|
|
406
|
-
const argumentsTypes = ["vector<u8>"];
|
|
407
|
-
const parameterNames = ["bytes"];
|
|
408
|
-
return (tx) => tx.moveCall({
|
|
409
|
-
package: packageAddress,
|
|
410
|
-
module: "reclaim",
|
|
411
|
-
function: "bytes_to_hex",
|
|
412
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
413
|
-
});
|
|
414
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
import { MoveStruct } from "../utils/index.js";
|
|
5
|
-
import type { RawTransactionArgument } from "../utils/index.js";
|
|
6
|
-
import type { Transaction } from "@mysten/sui/transactions";
|
|
7
|
-
export declare const PCREntry: MoveStruct<{
|
|
8
|
-
index: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
9
|
-
value: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
10
|
-
length: number;
|
|
11
|
-
}, string>;
|
|
12
|
-
}, "@local-pkg/zing_studio::nitro_attestation::PCREntry">;
|
|
13
|
-
export declare const NitroAttestationDocument: MoveStruct<{
|
|
14
|
-
/** Issuing Nitro hypervisor module ID. */
|
|
15
|
-
module_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
16
|
-
length: number;
|
|
17
|
-
}, string>;
|
|
18
|
-
/** UTC time when document was created, in milliseconds since UNIX epoch. */
|
|
19
|
-
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
20
|
-
/** The digest function used for calculating the register values. */
|
|
21
|
-
digest: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
22
|
-
length: number;
|
|
23
|
-
}, string>;
|
|
24
|
-
/**
|
|
25
|
-
* A list of PCREntry containing the index and the PCR bytes.
|
|
26
|
-
* <https://docs.aws.amazon.com/enclaves/latest/user/set-up-attestation.html#where>.
|
|
27
|
-
*/
|
|
28
|
-
pcrs: import("@mysten/sui/bcs").BcsType<{
|
|
29
|
-
index: number;
|
|
30
|
-
value: number[];
|
|
31
|
-
}[], Iterable<{
|
|
32
|
-
index: number;
|
|
33
|
-
value: Iterable<number> & {
|
|
34
|
-
length: number;
|
|
35
|
-
};
|
|
36
|
-
}> & {
|
|
37
|
-
length: number;
|
|
38
|
-
}, string>;
|
|
39
|
-
/**
|
|
40
|
-
* An optional DER-encoded key the attestation, consumer can use to encrypt data
|
|
41
|
-
* with.
|
|
42
|
-
*/
|
|
43
|
-
public_key: import("@mysten/sui/bcs").BcsType<number[] | null, (Iterable<number> & {
|
|
44
|
-
length: number;
|
|
45
|
-
}) | null | undefined, "Option<vector<u8>>">;
|
|
46
|
-
/** Additional signed user data, defined by protocol. */
|
|
47
|
-
user_data: import("@mysten/sui/bcs").BcsType<number[] | null, (Iterable<number> & {
|
|
48
|
-
length: number;
|
|
49
|
-
}) | null | undefined, "Option<vector<u8>>">;
|
|
50
|
-
/**
|
|
51
|
-
* An optional cryptographic nonce provided by the attestation consumer as a proof
|
|
52
|
-
* of authenticity.
|
|
53
|
-
*/
|
|
54
|
-
nonce: import("@mysten/sui/bcs").BcsType<number[] | null, (Iterable<number> & {
|
|
55
|
-
length: number;
|
|
56
|
-
}) | null | undefined, "Option<vector<u8>>">;
|
|
57
|
-
}, "@local-pkg/zing_studio::nitro_attestation::NitroAttestationDocument">;
|
|
58
|
-
export interface LoadNitroAttestationArguments {
|
|
59
|
-
attestation: RawTransactionArgument<number[]>;
|
|
60
|
-
}
|
|
61
|
-
export interface LoadNitroAttestationOptions {
|
|
62
|
-
package?: string;
|
|
63
|
-
arguments: LoadNitroAttestationArguments | [attestation: RawTransactionArgument<number[]>];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* @param attestation: attesttaion documents bytes data. @param clock: the clock
|
|
67
|
-
* object.
|
|
68
|
-
*
|
|
69
|
-
* Returns the parsed NitroAttestationDocument after verifying the attestation, may
|
|
70
|
-
* abort with errors described above.
|
|
71
|
-
*/
|
|
72
|
-
export declare function loadNitroAttestation(options: LoadNitroAttestationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
73
|
-
export interface ModuleIdArguments {
|
|
74
|
-
attestation: RawTransactionArgument<string>;
|
|
75
|
-
}
|
|
76
|
-
export interface ModuleIdOptions {
|
|
77
|
-
package?: string;
|
|
78
|
-
arguments: ModuleIdArguments | [attestation: RawTransactionArgument<string>];
|
|
79
|
-
}
|
|
80
|
-
export declare function moduleId(options: ModuleIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
81
|
-
export interface TimestampArguments {
|
|
82
|
-
attestation: RawTransactionArgument<string>;
|
|
83
|
-
}
|
|
84
|
-
export interface TimestampOptions {
|
|
85
|
-
package?: string;
|
|
86
|
-
arguments: TimestampArguments | [attestation: RawTransactionArgument<string>];
|
|
87
|
-
}
|
|
88
|
-
export declare function timestamp(options: TimestampOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
89
|
-
export interface DigestArguments {
|
|
90
|
-
attestation: RawTransactionArgument<string>;
|
|
91
|
-
}
|
|
92
|
-
export interface DigestOptions {
|
|
93
|
-
package?: string;
|
|
94
|
-
arguments: DigestArguments | [attestation: RawTransactionArgument<string>];
|
|
95
|
-
}
|
|
96
|
-
export declare function digest(options: DigestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
97
|
-
export interface PcrsArguments {
|
|
98
|
-
attestation: RawTransactionArgument<string>;
|
|
99
|
-
}
|
|
100
|
-
export interface PcrsOptions {
|
|
101
|
-
package?: string;
|
|
102
|
-
arguments: PcrsArguments | [attestation: RawTransactionArgument<string>];
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Returns a list of mapping PCREntry containg the index and the PCR bytes.
|
|
106
|
-
* Currently AWS supports PCR0, PCR1, PCR2, PCR3, PCR4, PCR8.
|
|
107
|
-
*/
|
|
108
|
-
export declare function pcrs(options: PcrsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
109
|
-
export interface PublicKeyArguments {
|
|
110
|
-
attestation: RawTransactionArgument<string>;
|
|
111
|
-
}
|
|
112
|
-
export interface PublicKeyOptions {
|
|
113
|
-
package?: string;
|
|
114
|
-
arguments: PublicKeyArguments | [attestation: RawTransactionArgument<string>];
|
|
115
|
-
}
|
|
116
|
-
export declare function publicKey(options: PublicKeyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
117
|
-
export interface UserDataArguments {
|
|
118
|
-
attestation: RawTransactionArgument<string>;
|
|
119
|
-
}
|
|
120
|
-
export interface UserDataOptions {
|
|
121
|
-
package?: string;
|
|
122
|
-
arguments: UserDataArguments | [attestation: RawTransactionArgument<string>];
|
|
123
|
-
}
|
|
124
|
-
export declare function userData(options: UserDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
125
|
-
export interface NonceArguments {
|
|
126
|
-
attestation: RawTransactionArgument<string>;
|
|
127
|
-
}
|
|
128
|
-
export interface NonceOptions {
|
|
129
|
-
package?: string;
|
|
130
|
-
arguments: NonceArguments | [attestation: RawTransactionArgument<string>];
|
|
131
|
-
}
|
|
132
|
-
export declare function nonce(options: NonceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
133
|
-
export interface IndexArguments {
|
|
134
|
-
entry: RawTransactionArgument<string>;
|
|
135
|
-
}
|
|
136
|
-
export interface IndexOptions {
|
|
137
|
-
package?: string;
|
|
138
|
-
arguments: IndexArguments | [entry: RawTransactionArgument<string>];
|
|
139
|
-
}
|
|
140
|
-
export declare function index(options: IndexOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
141
|
-
export interface ValueArguments {
|
|
142
|
-
entry: RawTransactionArgument<string>;
|
|
143
|
-
}
|
|
144
|
-
export interface ValueOptions {
|
|
145
|
-
package?: string;
|
|
146
|
-
arguments: ValueArguments | [entry: RawTransactionArgument<string>];
|
|
147
|
-
}
|
|
148
|
-
export declare function value(options: ValueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|