@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.
- package/dist/_generated/index.js +6 -0
- package/dist/_generated/utils/index.d.ts +12 -0
- package/dist/_generated/utils/index.js +135 -0
- package/dist/_generated/zing_framework/coin_utils.d.ts +15 -0
- package/dist/_generated/zing_framework/coin_utils.js +19 -0
- package/dist/_generated/zing_framework/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_governance/deps/sui/object.ts → dist/_generated/zing_framework/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_framework/derived_object_bag.d.ts +166 -0
- package/dist/_generated/zing_framework/derived_object_bag.js +221 -0
- package/dist/_generated/zing_framework/derived_table.d.ts +153 -0
- package/dist/_generated/zing_framework/derived_table.js +200 -0
- package/dist/_generated/zing_governance/admin.d.ts +20 -0
- package/dist/_generated/zing_governance/admin.js +26 -0
- package/dist/_generated/zing_governance/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_identity/deps/sui/object.ts → dist/_generated/zing_governance/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_governance/treasury.d.ts +56 -0
- package/dist/_generated/zing_governance/treasury.js +78 -0
- package/dist/_generated/zing_identity/config.d.ts +87 -0
- package/dist/_generated/zing_identity/config.js +98 -0
- package/{src/_generated/zing_studio/deps/std/type_name.ts → dist/_generated/zing_identity/deps/std/type_name.d.ts} +3 -11
- package/dist/_generated/zing_identity/deps/std/type_name.js +22 -0
- package/dist/_generated/zing_identity/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_studio/deps/sui/object.ts → dist/_generated/zing_identity/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_identity/deps/sui/object_table.d.ts +12 -0
- package/{src/_generated/zing_identity/deps/sui/object_table.ts → dist/_generated/zing_identity/deps/sui/object_table.js} +7 -10
- package/dist/_generated/zing_identity/deps/sui/table.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/table.ts → dist/_generated/zing_identity/deps/sui/table.js} +7 -10
- package/{src/_generated/zing_identity/deps/sui/vec_set.ts → dist/_generated/zing_identity/deps/sui/vec_set.d.ts} +3 -14
- package/dist/_generated/zing_identity/deps/sui/vec_set.js +22 -0
- package/dist/_generated/zing_identity/ecdsa.d.ts +81 -0
- package/dist/_generated/zing_identity/ecdsa.js +87 -0
- package/dist/_generated/zing_identity/identity.d.ts +262 -0
- package/dist/_generated/zing_identity/identity.js +294 -0
- package/dist/_generated/zing_identity/reclaim.d.ts +356 -0
- package/dist/_generated/zing_identity/reclaim.js +414 -0
- package/dist/_generated/zing_studio/app.d.ts +351 -0
- package/dist/_generated/zing_studio/app.js +451 -0
- package/dist/_generated/zing_studio/article.d.ts +331 -0
- package/dist/_generated/zing_studio/article.js +331 -0
- package/dist/_generated/zing_studio/config.d.ts +203 -0
- package/dist/_generated/zing_studio/config.js +233 -0
- package/{src/_generated/zing_identity/deps/std/type_name.ts → dist/_generated/zing_studio/deps/std/type_name.d.ts} +3 -11
- package/dist/_generated/zing_studio/deps/std/type_name.js +22 -0
- package/dist/_generated/zing_studio/deps/sui/bag.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/bag.ts → dist/_generated/zing_studio/deps/sui/bag.js} +7 -10
- package/dist/_generated/zing_studio/deps/sui/balance.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/balance.ts → dist/_generated/zing_studio/deps/sui/balance.js} +4 -7
- package/dist/_generated/zing_studio/deps/sui/coin.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/sui/coin.ts → dist/_generated/zing_studio/deps/sui/coin.js} +5 -8
- package/dist/_generated/zing_studio/deps/sui/dynamic_field.d.ts +126 -0
- package/dist/_generated/zing_studio/deps/sui/dynamic_field.js +140 -0
- package/dist/_generated/zing_studio/deps/sui/object.d.ts +8 -0
- package/{src/_generated/zing_framework/deps/sui/object.ts → dist/_generated/zing_studio/deps/sui/object.js} +4 -7
- package/dist/_generated/zing_studio/deps/sui/table.d.ts +12 -0
- package/{src/_generated/zing_identity/deps/sui/table.ts → dist/_generated/zing_studio/deps/sui/table.js} +7 -10
- package/dist/_generated/zing_studio/deps/sui/vec_map.d.ts +30 -0
- package/{src/_generated/zing_studio/deps/sui/vec_map.ts → dist/_generated/zing_studio/deps/sui/vec_map.js} +15 -21
- package/{src/_generated/zing_studio/deps/sui/vec_set.ts → dist/_generated/zing_studio/deps/sui/vec_set.d.ts} +3 -14
- package/dist/_generated/zing_studio/deps/sui/vec_set.js +22 -0
- package/dist/_generated/zing_studio/deps/walrus/blob.d.ts +20 -0
- package/{src/_generated/zing_studio/deps/walrus/blob.ts → dist/_generated/zing_studio/deps/walrus/blob.js} +11 -12
- package/dist/_generated/zing_studio/deps/walrus/events.d.ts +83 -0
- package/dist/_generated/zing_studio/deps/walrus/events.js +122 -0
- package/dist/_generated/zing_studio/deps/walrus/metadata.d.ts +71 -0
- package/dist/_generated/zing_studio/deps/walrus/metadata.js +73 -0
- package/dist/_generated/zing_studio/deps/walrus/storage_resource.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/walrus/storage_resource.ts → dist/_generated/zing_studio/deps/walrus/storage_resource.js} +7 -8
- package/dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/zing_framework/derived_object_bag.ts → dist/_generated/zing_studio/deps/zing_framework/derived_object_bag.js} +7 -8
- package/dist/_generated/zing_studio/deps/zing_framework/derived_table.d.ts +12 -0
- package/{src/_generated/zing_studio/deps/zing_framework/derived_table.ts → dist/_generated/zing_studio/deps/zing_framework/derived_table.js} +7 -8
- package/dist/_generated/zing_studio/donation.d.ts +24 -0
- package/{src/_generated/zing_studio/donation.ts → dist/_generated/zing_studio/donation.js} +7 -8
- package/dist/_generated/zing_studio/enclave.d.ts +187 -0
- package/dist/_generated/zing_studio/enclave.js +231 -0
- package/dist/_generated/zing_studio/nitro_attestation.d.ts +148 -0
- package/dist/_generated/zing_studio/nitro_attestation.js +183 -0
- package/dist/_generated/zing_studio/referral.d.ts +166 -0
- package/dist/_generated/zing_studio/referral.js +224 -0
- package/dist/_generated/zing_studio/storage.d.ts +327 -0
- package/dist/_generated/zing_studio/storage.js +365 -0
- package/dist/_generated/zing_studio/studio.d.ts +282 -0
- package/dist/_generated/zing_studio/studio.js +360 -0
- package/dist/bcs.d.ts +61 -0
- package/dist/bcs.js +109 -0
- package/dist/client/index.d.ts +228 -0
- package/dist/client/index.js +296 -0
- package/dist/client/types.d.ts +23 -0
- package/dist/client/types.js +1 -0
- package/dist/components/index.js +3 -0
- package/dist/components/wallet-provider.d.ts +7 -0
- package/dist/components/wallet-provider.js +33 -0
- package/dist/components/walrus-provider.d.ts +31 -0
- package/dist/components/walrus-provider.js +71 -0
- package/dist/components/zing-provider.d.ts +15 -0
- package/dist/components/zing-provider.js +22 -0
- package/dist/config/common.d.ts +23 -0
- package/dist/config/common.js +61 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.js +28 -0
- package/dist/config/mainnet.d.ts +6 -0
- package/dist/config/mainnet.js +80 -0
- package/dist/config/testnet.d.ts +6 -0
- package/dist/config/testnet.js +81 -0
- package/dist/config/types.d.ts +49 -0
- package/dist/config/types.js +1 -0
- package/dist/const.d.ts +4 -0
- package/dist/const.js +25 -0
- package/dist/getters.d.ts +228 -0
- package/dist/getters.js +317 -0
- package/{src/hooks/index.ts → dist/hooks/index.d.ts} +2 -3
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/useGetStudio.d.ts +26 -0
- package/dist/hooks/useGetStudio.js +17 -0
- package/dist/hooks/useGetTierPlan.d.ts +7 -0
- package/dist/hooks/useGetTierPlan.js +85 -0
- package/dist/hooks/useReclaim.d.ts +12 -0
- package/dist/hooks/useReclaim.js +87 -0
- package/dist/hooks/useSignAndExecuteTransaction.d.ts +6 -0
- package/dist/hooks/useSignAndExecuteTransaction.js +40 -0
- package/dist/hooks/useSignPersonalMessage.d.ts +8 -0
- package/dist/hooks/useSignPersonalMessage.js +21 -0
- package/dist/hooks/useZingInfiniteQueries.d.ts +75 -0
- package/dist/hooks/useZingInfiniteQueries.js +28 -0
- package/dist/hooks/useZingMutation.d.ts +35 -0
- package/dist/hooks/useZingMutation.js +37 -0
- package/dist/hooks/useZingQueries.d.ts +127 -0
- package/dist/hooks/useZingQueries.js +37 -0
- package/dist/hooks/useZingQuery.d.ts +147 -0
- package/dist/hooks/useZingQuery.js +34 -0
- package/{src/index.ts → dist/index.d.ts} +2 -3
- package/dist/index.js +9 -0
- package/dist/lib/utils/colorful-logger.d.ts +2 -0
- package/dist/lib/utils/colorful-logger.js +23 -0
- package/dist/lib/utils/const.d.ts +25 -0
- package/dist/lib/utils/const.js +25 -0
- package/dist/lib/utils/helpers.d.ts +10 -0
- package/dist/lib/utils/helpers.js +49 -0
- package/dist/lib/utils/index.js +4 -0
- package/dist/lib/utils/init-app-with-shadow.d.ts +6 -0
- package/dist/lib/utils/init-app-with-shadow.js +28 -0
- package/dist/lib/utils/quilt.d.ts +61 -0
- package/dist/lib/utils/quilt.js +194 -0
- package/dist/lib/utils/reclaim.d.ts +29 -0
- package/dist/lib/utils/reclaim.js +88 -0
- package/dist/lib/utils/types.d.ts +5 -0
- package/dist/lib/utils/types.js +1 -0
- package/dist/mutations/index.js +3 -0
- package/dist/mutations/seal.d.ts +12 -0
- package/dist/mutations/seal.js +41 -0
- package/dist/mutations/signer.d.ts +10 -0
- package/dist/mutations/signer.js +176 -0
- package/dist/mutations/walrus.d.ts +98 -0
- package/dist/mutations/walrus.js +488 -0
- package/dist/stores/index.js +3 -0
- package/dist/stores/walletStore.d.ts +48 -0
- package/dist/stores/walletStore.js +232 -0
- package/dist/stores/walrusStore.d.ts +28 -0
- package/dist/stores/walrusStore.js +61 -0
- package/dist/stores/zkloginStore.d.ts +28 -0
- package/dist/stores/zkloginStore.js +27 -0
- package/dist/types.d.ts +99 -0
- package/dist/types.js +1 -0
- package/package.json +18 -10
- package/src/_generated/utils/index.ts +0 -181
- package/src/_generated/zing_framework/coin_utils.ts +0 -41
- package/src/_generated/zing_framework/derived_object_bag.ts +0 -400
- package/src/_generated/zing_framework/derived_table.ts +0 -366
- package/src/_generated/zing_governance/admin.ts +0 -47
- package/src/_generated/zing_governance/treasury.ts +0 -134
- package/src/_generated/zing_identity/config.ts +0 -191
- package/src/_generated/zing_identity/ecdsa.ts +0 -166
- package/src/_generated/zing_identity/identity.ts +0 -661
- package/src/_generated/zing_identity/reclaim.ts +0 -803
- package/src/_generated/zing_studio/app.ts +0 -855
- package/src/_generated/zing_studio/article.ts +0 -598
- package/src/_generated/zing_studio/config.ts +0 -475
- package/src/_generated/zing_studio/deps/sui/dynamic_field.ts +0 -272
- package/src/_generated/zing_studio/deps/walrus/events.ts +0 -124
- package/src/_generated/zing_studio/deps/walrus/metadata.ts +0 -137
- package/src/_generated/zing_studio/enclave.ts +0 -466
- package/src/_generated/zing_studio/nitro_attestation.ts +0 -308
- package/src/_generated/zing_studio/referral.ts +0 -447
- package/src/_generated/zing_studio/storage.ts +0 -664
- package/src/_generated/zing_studio/studio.ts +0 -682
- package/src/bcs.ts +0 -139
- package/src/client/index.ts +0 -557
- package/src/client/types.ts +0 -28
- package/src/components/wallet-provider.tsx +0 -53
- package/src/components/walrus-provider.tsx +0 -212
- package/src/components/zing-provider.tsx +0 -54
- package/src/config/common.ts +0 -82
- package/src/config/index.ts +0 -45
- package/src/config/mainnet.ts +0 -109
- package/src/config/testnet.ts +0 -111
- package/src/config/types.ts +0 -69
- package/src/const.ts +0 -32
- package/src/getters.ts +0 -523
- package/src/hooks/useGetStudio.ts +0 -22
- package/src/hooks/useGetTierPlan.ts +0 -115
- package/src/hooks/useReclaim.ts +0 -165
- package/src/hooks/useSignAndExecuteTransaction.ts +0 -57
- package/src/hooks/useSignPersonalMessage.ts +0 -28
- package/src/hooks/useZingInfiniteQueries.ts +0 -92
- package/src/hooks/useZingMutation.ts +0 -66
- package/src/hooks/useZingQueries.ts +0 -107
- package/src/hooks/useZingQuery.ts +0 -88
- package/src/lib/utils/colorful-logger.ts +0 -27
- package/src/lib/utils/const.ts +0 -25
- package/src/lib/utils/helpers.ts +0 -78
- package/src/lib/utils/init-app-with-shadow.ts +0 -42
- package/src/lib/utils/quilt.ts +0 -317
- package/src/lib/utils/reclaim.ts +0 -148
- package/src/lib/utils/types.ts +0 -14
- package/src/mutations/seal.ts +0 -78
- package/src/mutations/signer.ts +0 -241
- package/src/mutations/walrus.ts +0 -862
- package/src/stores/walletStore.ts +0 -360
- package/src/stores/walrusStore.ts +0 -118
- package/src/stores/zkloginStore.ts +0 -53
- package/src/types.ts +0 -120
- package/tsconfig.json +0 -12
- /package/{src/_generated/index.js → dist/_generated/index.d.ts} +0 -0
- /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
- /package/{src/lib/utils/index.ts → dist/lib/utils/index.d.ts} +0 -0
- /package/{src/mutations/index.ts → dist/mutations/index.d.ts} +0 -0
- /package/{src/stores/index.ts → dist/stores/index.d.ts} +0 -0
|
@@ -0,0 +1,414 @@
|
|
|
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
|
+
}
|