@verana-labs/verana-types 0.10.1-dev.12 → 0.10.1-dev.13
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/amino-converter/co.d.ts +3 -0
- package/dist/amino-converter/co.js +164 -0
- package/dist/amino-converter/cs.js +2 -2
- package/dist/amino-converter/ec.d.ts +4 -0
- package/dist/amino-converter/ec.js +63 -0
- package/dist/amino-converter/{tr.d.ts → gf.d.ts} +0 -3
- package/dist/amino-converter/gf.js +48 -0
- package/dist/amino-converter/group.d.ts +3 -0
- package/dist/amino-converter/group.js +91 -0
- package/dist/amino-converter/pp.d.ts +12 -0
- package/dist/amino-converter/{perm.js → pp.js} +56 -56
- package/dist/codec/verana/cs/v1/query.d.ts +2 -2
- package/dist/codec/verana/cs/v1/query.js +21 -21
- package/dist/codec/verana/cs/v1/tx.d.ts +1 -1
- package/dist/codec/verana/cs/v1/tx.js +22 -22
- package/dist/codec/verana/cs/v1/types.d.ts +6 -2
- package/dist/codec/verana/cs/v1/types.js +30 -30
- package/dist/codec/verana/{tr → ec}/module/module.d.ts +1 -1
- package/dist/codec/verana/{tr → ec}/module/module.js +2 -2
- package/dist/codec/verana/{tr → ec}/v1/genesis.d.ts +10 -12
- package/dist/codec/verana/{tr → ec}/v1/genesis.js +16 -56
- package/dist/codec/verana/{tr → ec}/v1/params.d.ts +1 -1
- package/dist/codec/verana/{tr → ec}/v1/params.js +2 -2
- package/dist/codec/verana/ec/v1/query.d.ts +109 -0
- package/dist/codec/verana/{tr → ec}/v1/query.js +69 -71
- package/dist/codec/verana/ec/v1/tx.d.ts +152 -0
- package/dist/codec/verana/{tr → ec}/v1/tx.js +85 -403
- package/dist/codec/verana/ec/v1/types.d.ts +67 -0
- package/dist/codec/verana/ec/v1/types.js +422 -0
- package/dist/codec/verana/{perm → pp}/module/module.d.ts +1 -1
- package/dist/codec/verana/{perm → pp}/module/module.js +2 -2
- package/dist/codec/verana/{perm → pp}/v1/genesis.d.ts +9 -9
- package/dist/codec/verana/{perm → pp}/v1/genesis.js +26 -26
- package/dist/codec/verana/{perm → pp}/v1/params.d.ts +1 -1
- package/dist/codec/verana/{perm → pp}/v1/params.js +2 -2
- package/dist/codec/verana/pp/v1/query.d.ts +208 -0
- package/dist/codec/verana/{perm → pp}/v1/query.js +148 -148
- package/dist/codec/verana/pp/v1/tx.d.ts +437 -0
- package/dist/codec/verana/{perm → pp}/v1/tx.js +255 -249
- package/dist/codec/verana/pp/v1/types.d.ts +140 -0
- package/dist/codec/verana/{perm → pp}/v1/types.js +278 -262
- package/dist/helpers/aminoConverters.d.ts +6 -4
- package/dist/helpers/aminoConverters.js +6 -4
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/signing.d.ts +36 -32
- package/dist/signing.js +85 -68
- package/package.json +1 -1
- package/dist/amino-converter/perm.d.ts +0 -12
- package/dist/amino-converter/tr.js +0 -107
- package/dist/codec/verana/perm/v1/query.d.ts +0 -208
- package/dist/codec/verana/perm/v1/tx.d.ts +0 -441
- package/dist/codec/verana/perm/v1/types.d.ts +0 -134
- package/dist/codec/verana/tr/v1/query.d.ts +0 -117
- package/dist/codec/verana/tr/v1/tx.d.ts +0 -255
- package/dist/codec/verana/tr/v1/types.d.ts +0 -105
- package/dist/codec/verana/tr/v1/types.js +0 -809
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const tx_1 = require("../codec/verana/
|
|
5
|
-
const types_1 = require("../codec/verana/
|
|
3
|
+
exports.MsgSelfCreateParticipantAminoConverter = exports.MsgRepayParticipantSlashedTrustDepositAminoConverter = exports.MsgSlashParticipantTrustDepositAminoConverter = exports.MsgCreateOrUpdateParticipantSessionAminoConverter = exports.MsgCancelParticipantOPLastRequestAminoConverter = exports.MsgSetParticipantOPToValidatedAminoConverter = exports.MsgRenewParticipantOPAminoConverter = exports.MsgStartParticipantOPAminoConverter = exports.MsgRevokeParticipantAminoConverter = exports.MsgSetParticipantEffectiveUntilAminoConverter = exports.MsgCreateRootParticipantAminoConverter = void 0;
|
|
4
|
+
const tx_1 = require("../codec/verana/pp/v1/tx");
|
|
5
|
+
const types_1 = require("../codec/verana/pp/v1/types");
|
|
6
6
|
const helpers_1 = require("./util/helpers");
|
|
7
|
-
exports.
|
|
8
|
-
aminoType: "verana/x/
|
|
9
|
-
// [MOD-PERM-MSG-7-3] spec v4 draft 13: perm.
|
|
7
|
+
exports.MsgCreateRootParticipantAminoConverter = {
|
|
8
|
+
aminoType: "verana/x/pp/MsgCreateRootParticipant",
|
|
9
|
+
// [MOD-PERM-MSG-7-3] spec v4 draft 13: perm.role is hardcoded to ECOSYSTEM;
|
|
10
10
|
// vs_operator is not set on root permissions.
|
|
11
11
|
toAmino: (m) => {
|
|
12
12
|
var _a, _b, _c;
|
|
@@ -24,7 +24,7 @@ exports.MsgCreateRootPermissionAminoConverter = {
|
|
|
24
24
|
},
|
|
25
25
|
fromAmino: (a) => {
|
|
26
26
|
var _a, _b, _c;
|
|
27
|
-
return tx_1.
|
|
27
|
+
return tx_1.MsgCreateRootParticipant.fromPartial({
|
|
28
28
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
29
29
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
30
30
|
schemaId: (0, helpers_1.strToU64)(a.schema_id) != null ? Number((0, helpers_1.strToU64)(a.schema_id).toString()) : 0,
|
|
@@ -37,8 +37,8 @@ exports.MsgCreateRootPermissionAminoConverter = {
|
|
|
37
37
|
});
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
|
-
exports.
|
|
41
|
-
aminoType: "verana/x/
|
|
40
|
+
exports.MsgSetParticipantEffectiveUntilAminoConverter = {
|
|
41
|
+
aminoType: "verana/x/pp/MsgSetPartEffectiveUntil",
|
|
42
42
|
toAmino: (m) => {
|
|
43
43
|
var _a, _b;
|
|
44
44
|
return (0, helpers_1.clean)({
|
|
@@ -50,7 +50,7 @@ exports.MsgAdjustPermissionAminoConverter = {
|
|
|
50
50
|
},
|
|
51
51
|
fromAmino: (a) => {
|
|
52
52
|
var _a, _b;
|
|
53
|
-
return tx_1.
|
|
53
|
+
return tx_1.MsgSetParticipantEffectiveUntil.fromPartial({
|
|
54
54
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
55
55
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
56
56
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
@@ -58,8 +58,8 @@ exports.MsgAdjustPermissionAminoConverter = {
|
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
|
-
exports.
|
|
62
|
-
aminoType: "verana/x/
|
|
61
|
+
exports.MsgRevokeParticipantAminoConverter = {
|
|
62
|
+
aminoType: "verana/x/pp/MsgRevokeParticipant",
|
|
63
63
|
toAmino: (m) => {
|
|
64
64
|
var _a, _b;
|
|
65
65
|
return (0, helpers_1.clean)({
|
|
@@ -70,22 +70,22 @@ exports.MsgRevokePermissionAminoConverter = {
|
|
|
70
70
|
},
|
|
71
71
|
fromAmino: (a) => {
|
|
72
72
|
var _a, _b;
|
|
73
|
-
return tx_1.
|
|
73
|
+
return tx_1.MsgRevokeParticipant.fromPartial({
|
|
74
74
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
75
75
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
76
76
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
|
-
exports.
|
|
81
|
-
aminoType: "verana/x/
|
|
80
|
+
exports.MsgStartParticipantOPAminoConverter = {
|
|
81
|
+
aminoType: "verana/x/pp/MsgStartParticipantOP",
|
|
82
82
|
toAmino: (m) => {
|
|
83
83
|
var _a, _b, _c, _d, _e, _f;
|
|
84
84
|
return (0, helpers_1.clean)({
|
|
85
85
|
corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
|
|
86
86
|
operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
role: (_c = m.role) !== null && _c !== void 0 ? _c : types_1.ParticipantRole.UNSPECIFIED,
|
|
88
|
+
validator_participant_id: (0, helpers_1.u64ToStr)(m.validatorParticipantId),
|
|
89
89
|
did: (_d = m.did) !== null && _d !== void 0 ? _d : "",
|
|
90
90
|
validation_fees: m.validationFees ? { value: (0, helpers_1.u64ToStr)(m.validationFees.value) } : undefined,
|
|
91
91
|
issuance_fees: m.issuanceFees ? { value: (0, helpers_1.u64ToStr)(m.issuanceFees.value) } : undefined,
|
|
@@ -100,11 +100,11 @@ exports.MsgStartPermissionVPAminoConverter = {
|
|
|
100
100
|
},
|
|
101
101
|
fromAmino: (a) => {
|
|
102
102
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
103
|
-
return tx_1.
|
|
103
|
+
return tx_1.MsgStartParticipantOP.fromPartial({
|
|
104
104
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
105
105
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
role: (_c = a.role) !== null && _c !== void 0 ? _c : types_1.ParticipantRole.UNSPECIFIED,
|
|
107
|
+
validatorParticipantId: (0, helpers_1.strToU64)(a.validator_participant_id) != null ? Number((0, helpers_1.strToU64)(a.validator_participant_id).toString()) : 0,
|
|
108
108
|
did: (_d = a.did) !== null && _d !== void 0 ? _d : "",
|
|
109
109
|
validationFees: a.validation_fees ? { value: Number((_e = a.validation_fees.value) !== null && _e !== void 0 ? _e : a.validation_fees) } : undefined,
|
|
110
110
|
issuanceFees: a.issuance_fees ? { value: Number((_f = a.issuance_fees.value) !== null && _f !== void 0 ? _f : a.issuance_fees) } : undefined,
|
|
@@ -118,8 +118,8 @@ exports.MsgStartPermissionVPAminoConverter = {
|
|
|
118
118
|
});
|
|
119
119
|
},
|
|
120
120
|
};
|
|
121
|
-
exports.
|
|
122
|
-
aminoType: "verana/x/
|
|
121
|
+
exports.MsgRenewParticipantOPAminoConverter = {
|
|
122
|
+
aminoType: "verana/x/pp/MsgRenewParticipantOP",
|
|
123
123
|
// [MOD-PERM-MSG-2-1] spec v4 draft 13 parameters: corporation, operator, id.
|
|
124
124
|
toAmino: (m) => {
|
|
125
125
|
var _a, _b;
|
|
@@ -131,15 +131,15 @@ exports.MsgRenewPermissionVPAminoConverter = {
|
|
|
131
131
|
},
|
|
132
132
|
fromAmino: (a) => {
|
|
133
133
|
var _a, _b;
|
|
134
|
-
return tx_1.
|
|
134
|
+
return tx_1.MsgRenewParticipantOP.fromPartial({
|
|
135
135
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
136
136
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
137
137
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
138
138
|
});
|
|
139
139
|
},
|
|
140
140
|
};
|
|
141
|
-
exports.
|
|
142
|
-
aminoType: "verana/x/
|
|
141
|
+
exports.MsgSetParticipantOPToValidatedAminoConverter = {
|
|
142
|
+
aminoType: "verana/x/pp/MsgSetPartOPValidated",
|
|
143
143
|
toAmino: (m) => {
|
|
144
144
|
var _a, _b, _c;
|
|
145
145
|
return (0, helpers_1.clean)({
|
|
@@ -150,14 +150,14 @@ exports.MsgSetPermissionVPToValidatedAminoConverter = {
|
|
|
150
150
|
validation_fees: (0, helpers_1.u64ToStr)(m.validationFees),
|
|
151
151
|
issuance_fees: (0, helpers_1.u64ToStr)(m.issuanceFees),
|
|
152
152
|
verification_fees: (0, helpers_1.u64ToStr)(m.verificationFees),
|
|
153
|
-
|
|
153
|
+
op_summary_digest: (_c = m.opSummaryDigest) !== null && _c !== void 0 ? _c : "",
|
|
154
154
|
issuance_fee_discount: (0, helpers_1.u64ToStr)(m.issuanceFeeDiscount),
|
|
155
155
|
verification_fee_discount: (0, helpers_1.u64ToStr)(m.verificationFeeDiscount),
|
|
156
156
|
});
|
|
157
157
|
},
|
|
158
158
|
fromAmino: (a) => {
|
|
159
159
|
var _a, _b, _c;
|
|
160
|
-
return tx_1.
|
|
160
|
+
return tx_1.MsgSetParticipantOPToValidated.fromPartial({
|
|
161
161
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
162
162
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
163
163
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
@@ -165,7 +165,7 @@ exports.MsgSetPermissionVPToValidatedAminoConverter = {
|
|
|
165
165
|
validationFees: (0, helpers_1.strToU64)(a.validation_fees) != null ? Number((0, helpers_1.strToU64)(a.validation_fees).toString()) : 0,
|
|
166
166
|
issuanceFees: (0, helpers_1.strToU64)(a.issuance_fees) != null ? Number((0, helpers_1.strToU64)(a.issuance_fees).toString()) : 0,
|
|
167
167
|
verificationFees: (0, helpers_1.strToU64)(a.verification_fees) != null ? Number((0, helpers_1.strToU64)(a.verification_fees).toString()) : 0,
|
|
168
|
-
|
|
168
|
+
opSummaryDigest: (_c = a.op_summary_digest) !== null && _c !== void 0 ? _c : "",
|
|
169
169
|
issuanceFeeDiscount: (0, helpers_1.strToU64)(a.issuance_fee_discount) != null
|
|
170
170
|
? Number((0, helpers_1.strToU64)(a.issuance_fee_discount).toString())
|
|
171
171
|
: 0,
|
|
@@ -175,8 +175,8 @@ exports.MsgSetPermissionVPToValidatedAminoConverter = {
|
|
|
175
175
|
});
|
|
176
176
|
},
|
|
177
177
|
};
|
|
178
|
-
exports.
|
|
179
|
-
aminoType: "verana/x/
|
|
178
|
+
exports.MsgCancelParticipantOPLastRequestAminoConverter = {
|
|
179
|
+
aminoType: "verana/x/pp/MsgCancelPartOPLastReq",
|
|
180
180
|
toAmino: (m) => {
|
|
181
181
|
var _a, _b;
|
|
182
182
|
return (0, helpers_1.clean)({
|
|
@@ -187,46 +187,46 @@ exports.MsgCancelPermissionVPLastRequestAminoConverter = {
|
|
|
187
187
|
},
|
|
188
188
|
fromAmino: (a) => {
|
|
189
189
|
var _a, _b;
|
|
190
|
-
return tx_1.
|
|
190
|
+
return tx_1.MsgCancelParticipantOPLastRequest.fromPartial({
|
|
191
191
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
192
192
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
193
193
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
194
194
|
});
|
|
195
195
|
},
|
|
196
196
|
};
|
|
197
|
-
exports.
|
|
198
|
-
aminoType: "verana/x/
|
|
197
|
+
exports.MsgCreateOrUpdateParticipantSessionAminoConverter = {
|
|
198
|
+
aminoType: "verana/x/pp/MsgCreateOrUpdatePartSess",
|
|
199
199
|
toAmino: (m) => {
|
|
200
200
|
var _a, _b, _c, _d;
|
|
201
201
|
return (0, helpers_1.clean)({
|
|
202
202
|
corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
|
|
203
203
|
operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
|
|
204
204
|
id: (_c = m.id) !== null && _c !== void 0 ? _c : "",
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
issuer_participant_id: (0, helpers_1.u64ToStr)(m.issuerParticipantId),
|
|
206
|
+
verifier_participant_id: (0, helpers_1.u64ToStr)(m.verifierParticipantId),
|
|
207
|
+
agent_participant_id: (0, helpers_1.u64ToStr)(m.agentParticipantId),
|
|
208
|
+
wallet_agent_participant_id: (0, helpers_1.u64ToStr)(m.walletAgentParticipantId),
|
|
209
209
|
digest: (_d = m.digest) !== null && _d !== void 0 ? _d : undefined,
|
|
210
210
|
});
|
|
211
211
|
},
|
|
212
212
|
fromAmino: (a) => {
|
|
213
213
|
var _a, _b, _c, _d;
|
|
214
|
-
return tx_1.
|
|
214
|
+
return tx_1.MsgCreateOrUpdateParticipantSession.fromPartial({
|
|
215
215
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
216
216
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
217
217
|
id: (_c = a.id) !== null && _c !== void 0 ? _c : "",
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
? Number((0, helpers_1.strToU64)(a.
|
|
218
|
+
issuerParticipantId: (0, helpers_1.strToU64)(a.issuer_participant_id) != null ? Number((0, helpers_1.strToU64)(a.issuer_participant_id).toString()) : 0,
|
|
219
|
+
verifierParticipantId: (0, helpers_1.strToU64)(a.verifier_participant_id) != null ? Number((0, helpers_1.strToU64)(a.verifier_participant_id).toString()) : 0,
|
|
220
|
+
agentParticipantId: (0, helpers_1.strToU64)(a.agent_participant_id) != null ? Number((0, helpers_1.strToU64)(a.agent_participant_id).toString()) : 0,
|
|
221
|
+
walletAgentParticipantId: (0, helpers_1.strToU64)(a.wallet_agent_participant_id) != null
|
|
222
|
+
? Number((0, helpers_1.strToU64)(a.wallet_agent_participant_id).toString())
|
|
223
223
|
: 0,
|
|
224
224
|
digest: (_d = a.digest) !== null && _d !== void 0 ? _d : "",
|
|
225
225
|
});
|
|
226
226
|
},
|
|
227
227
|
};
|
|
228
|
-
exports.
|
|
229
|
-
aminoType: "verana/x/
|
|
228
|
+
exports.MsgSlashParticipantTrustDepositAminoConverter = {
|
|
229
|
+
aminoType: "verana/x/pp/MsgSlashParticipantTD",
|
|
230
230
|
// [MOD-PERM-MSG-12-1] spec v4 draft 13 adds mandatory reason.
|
|
231
231
|
toAmino: (m) => {
|
|
232
232
|
var _a, _b, _c;
|
|
@@ -240,7 +240,7 @@ exports.MsgSlashPermissionTrustDepositAminoConverter = {
|
|
|
240
240
|
},
|
|
241
241
|
fromAmino: (a) => {
|
|
242
242
|
var _a, _b, _c;
|
|
243
|
-
return tx_1.
|
|
243
|
+
return tx_1.MsgSlashParticipantTrustDeposit.fromPartial({
|
|
244
244
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
245
245
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
246
246
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
@@ -249,8 +249,8 @@ exports.MsgSlashPermissionTrustDepositAminoConverter = {
|
|
|
249
249
|
});
|
|
250
250
|
},
|
|
251
251
|
};
|
|
252
|
-
exports.
|
|
253
|
-
aminoType: "verana/x/
|
|
252
|
+
exports.MsgRepayParticipantSlashedTrustDepositAminoConverter = {
|
|
253
|
+
aminoType: "verana/x/pp/MsgRepayPartSlashedTD",
|
|
254
254
|
toAmino: (m) => {
|
|
255
255
|
var _a, _b;
|
|
256
256
|
return (0, helpers_1.clean)({
|
|
@@ -261,22 +261,22 @@ exports.MsgRepayPermissionSlashedTrustDepositAminoConverter = {
|
|
|
261
261
|
},
|
|
262
262
|
fromAmino: (a) => {
|
|
263
263
|
var _a, _b;
|
|
264
|
-
return tx_1.
|
|
264
|
+
return tx_1.MsgRepayParticipantSlashedTrustDeposit.fromPartial({
|
|
265
265
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
266
266
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
267
267
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
268
268
|
});
|
|
269
269
|
},
|
|
270
270
|
};
|
|
271
|
-
exports.
|
|
272
|
-
aminoType: "verana/x/
|
|
271
|
+
exports.MsgSelfCreateParticipantAminoConverter = {
|
|
272
|
+
aminoType: "verana/x/pp/MsgSelfCreateParticipant",
|
|
273
273
|
toAmino: (m) => {
|
|
274
274
|
var _a, _b, _c, _d, _e, _f;
|
|
275
275
|
return (0, helpers_1.clean)({
|
|
276
276
|
corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
|
|
277
277
|
operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
role: (_c = m.role) !== null && _c !== void 0 ? _c : 0,
|
|
279
|
+
validator_participant_id: (0, helpers_1.u64ToStr)(m.validatorParticipantId),
|
|
280
280
|
did: (_d = m.did) !== null && _d !== void 0 ? _d : "",
|
|
281
281
|
effective_from: (0, helpers_1.dateToIsoAmino)(m.effectiveFrom),
|
|
282
282
|
effective_until: (0, helpers_1.dateToIsoAmino)(m.effectiveUntil),
|
|
@@ -292,11 +292,11 @@ exports.MsgSelfCreatePermissionAminoConverter = {
|
|
|
292
292
|
},
|
|
293
293
|
fromAmino: (a) => {
|
|
294
294
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
295
|
-
return tx_1.
|
|
295
|
+
return tx_1.MsgSelfCreateParticipant.fromPartial({
|
|
296
296
|
corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
|
|
297
297
|
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
role: (_c = a.role) !== null && _c !== void 0 ? _c : 0,
|
|
299
|
+
validatorParticipantId: (0, helpers_1.strToU64)(a.validator_participant_id) != null ? Number((0, helpers_1.strToU64)(a.validator_participant_id).toString()) : 0,
|
|
300
300
|
did: (_d = a.did) !== null && _d !== void 0 ? _d : "",
|
|
301
301
|
effectiveFrom: (0, helpers_1.isoToDate)(a.effective_from),
|
|
302
302
|
effectiveUntil: (0, helpers_1.isoToDate)(a.effective_until),
|
|
@@ -11,14 +11,14 @@ export interface QueryParamsResponse {
|
|
|
11
11
|
params: Params | undefined;
|
|
12
12
|
}
|
|
13
13
|
export interface QueryListCredentialSchemasRequest {
|
|
14
|
-
/** optional */
|
|
15
|
-
trId: number;
|
|
16
14
|
modifiedAfter: Date | undefined;
|
|
17
15
|
responseMaxSize: number;
|
|
18
16
|
onlyActive: boolean;
|
|
19
17
|
issuerOnboardingMode: IssuerOnboardingMode;
|
|
20
18
|
verifierOnboardingMode: VerifierOnboardingMode;
|
|
21
19
|
holderOnboardingMode: HolderOnboardingMode;
|
|
20
|
+
/** optional filter (replaces tr_id) */
|
|
21
|
+
ecosystemId: number;
|
|
22
22
|
}
|
|
23
23
|
export interface QueryListCredentialSchemasResponse {
|
|
24
24
|
schemas: CredentialSchema[];
|
|
@@ -137,20 +137,17 @@ exports.QueryParamsResponse = {
|
|
|
137
137
|
};
|
|
138
138
|
function createBaseQueryListCredentialSchemasRequest() {
|
|
139
139
|
return {
|
|
140
|
-
trId: 0,
|
|
141
140
|
modifiedAfter: undefined,
|
|
142
141
|
responseMaxSize: 0,
|
|
143
142
|
onlyActive: false,
|
|
144
143
|
issuerOnboardingMode: 0,
|
|
145
144
|
verifierOnboardingMode: 0,
|
|
146
145
|
holderOnboardingMode: 0,
|
|
146
|
+
ecosystemId: 0,
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
exports.QueryListCredentialSchemasRequest = {
|
|
150
150
|
encode(message, writer = _m0.Writer.create()) {
|
|
151
|
-
if (message.trId !== 0) {
|
|
152
|
-
writer.uint32(8).uint64(message.trId);
|
|
153
|
-
}
|
|
154
151
|
if (message.modifiedAfter !== undefined) {
|
|
155
152
|
timestamp_1.Timestamp.encode(toTimestamp(message.modifiedAfter), writer.uint32(18).fork()).ldelim();
|
|
156
153
|
}
|
|
@@ -169,6 +166,9 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
169
166
|
if (message.holderOnboardingMode !== 0) {
|
|
170
167
|
writer.uint32(56).int32(message.holderOnboardingMode);
|
|
171
168
|
}
|
|
169
|
+
if (message.ecosystemId !== 0) {
|
|
170
|
+
writer.uint32(64).uint64(message.ecosystemId);
|
|
171
|
+
}
|
|
172
172
|
return writer;
|
|
173
173
|
},
|
|
174
174
|
decode(input, length) {
|
|
@@ -178,12 +178,6 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
178
178
|
while (reader.pos < end) {
|
|
179
179
|
const tag = reader.uint32();
|
|
180
180
|
switch (tag >>> 3) {
|
|
181
|
-
case 1:
|
|
182
|
-
if (tag !== 8) {
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
message.trId = longToNumber(reader.uint64());
|
|
186
|
-
continue;
|
|
187
181
|
case 2:
|
|
188
182
|
if (tag !== 18) {
|
|
189
183
|
break;
|
|
@@ -220,6 +214,12 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
220
214
|
}
|
|
221
215
|
message.holderOnboardingMode = reader.int32();
|
|
222
216
|
continue;
|
|
217
|
+
case 8:
|
|
218
|
+
if (tag !== 64) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
message.ecosystemId = longToNumber(reader.uint64());
|
|
222
|
+
continue;
|
|
223
223
|
}
|
|
224
224
|
if ((tag & 7) === 4 || tag === 0) {
|
|
225
225
|
break;
|
|
@@ -230,7 +230,6 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
230
230
|
},
|
|
231
231
|
fromJSON(object) {
|
|
232
232
|
return {
|
|
233
|
-
trId: isSet(object.trId) ? globalThis.Number(object.trId) : 0,
|
|
234
233
|
modifiedAfter: isSet(object.modifiedAfter) ? fromJsonTimestamp(object.modifiedAfter) : undefined,
|
|
235
234
|
responseMaxSize: isSet(object.responseMaxSize) ? globalThis.Number(object.responseMaxSize) : 0,
|
|
236
235
|
onlyActive: isSet(object.onlyActive) ? globalThis.Boolean(object.onlyActive) : false,
|
|
@@ -243,13 +242,11 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
243
242
|
holderOnboardingMode: isSet(object.holderOnboardingMode)
|
|
244
243
|
? (0, types_1.holderOnboardingModeFromJSON)(object.holderOnboardingMode)
|
|
245
244
|
: 0,
|
|
245
|
+
ecosystemId: isSet(object.ecosystemId) ? globalThis.Number(object.ecosystemId) : 0,
|
|
246
246
|
};
|
|
247
247
|
},
|
|
248
248
|
toJSON(message) {
|
|
249
249
|
const obj = {};
|
|
250
|
-
if (message.trId !== 0) {
|
|
251
|
-
obj.trId = Math.round(message.trId);
|
|
252
|
-
}
|
|
253
250
|
if (message.modifiedAfter !== undefined) {
|
|
254
251
|
obj.modifiedAfter = message.modifiedAfter.toISOString();
|
|
255
252
|
}
|
|
@@ -268,6 +265,9 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
268
265
|
if (message.holderOnboardingMode !== 0) {
|
|
269
266
|
obj.holderOnboardingMode = (0, types_1.holderOnboardingModeToJSON)(message.holderOnboardingMode);
|
|
270
267
|
}
|
|
268
|
+
if (message.ecosystemId !== 0) {
|
|
269
|
+
obj.ecosystemId = Math.round(message.ecosystemId);
|
|
270
|
+
}
|
|
271
271
|
return obj;
|
|
272
272
|
},
|
|
273
273
|
create(base) {
|
|
@@ -276,13 +276,13 @@ exports.QueryListCredentialSchemasRequest = {
|
|
|
276
276
|
fromPartial(object) {
|
|
277
277
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
278
278
|
const message = createBaseQueryListCredentialSchemasRequest();
|
|
279
|
-
message.
|
|
280
|
-
message.
|
|
281
|
-
message.
|
|
282
|
-
message.
|
|
283
|
-
message.
|
|
284
|
-
message.
|
|
285
|
-
message.
|
|
279
|
+
message.modifiedAfter = (_a = object.modifiedAfter) !== null && _a !== void 0 ? _a : undefined;
|
|
280
|
+
message.responseMaxSize = (_b = object.responseMaxSize) !== null && _b !== void 0 ? _b : 0;
|
|
281
|
+
message.onlyActive = (_c = object.onlyActive) !== null && _c !== void 0 ? _c : false;
|
|
282
|
+
message.issuerOnboardingMode = (_d = object.issuerOnboardingMode) !== null && _d !== void 0 ? _d : 0;
|
|
283
|
+
message.verifierOnboardingMode = (_e = object.verifierOnboardingMode) !== null && _e !== void 0 ? _e : 0;
|
|
284
|
+
message.holderOnboardingMode = (_f = object.holderOnboardingMode) !== null && _f !== void 0 ? _f : 0;
|
|
285
|
+
message.ecosystemId = (_g = object.ecosystemId) !== null && _g !== void 0 ? _g : 0;
|
|
286
286
|
return message;
|
|
287
287
|
},
|
|
288
288
|
};
|
|
@@ -25,7 +25,6 @@ export interface MsgCreateCredentialSchema {
|
|
|
25
25
|
corporation: string;
|
|
26
26
|
/** operator is the account authorized by the corporation to run this Msg */
|
|
27
27
|
operator: string;
|
|
28
|
-
trId: number;
|
|
29
28
|
jsonSchema: string;
|
|
30
29
|
issuerGrantorValidationValidityPeriod: OptionalUInt32 | undefined;
|
|
31
30
|
verifierGrantorValidationValidityPeriod: OptionalUInt32 | undefined;
|
|
@@ -38,6 +37,7 @@ export interface MsgCreateCredentialSchema {
|
|
|
38
37
|
pricingAsset: string;
|
|
39
38
|
digestAlgorithm: string;
|
|
40
39
|
holderOnboardingMode: number;
|
|
40
|
+
ecosystemId: number;
|
|
41
41
|
}
|
|
42
42
|
export interface MsgCreateCredentialSchemaResponse {
|
|
43
43
|
/** ID of the created credential schema for confirmation */
|
|
@@ -155,7 +155,6 @@ function createBaseMsgCreateCredentialSchema() {
|
|
|
155
155
|
return {
|
|
156
156
|
corporation: "",
|
|
157
157
|
operator: "",
|
|
158
|
-
trId: 0,
|
|
159
158
|
jsonSchema: "",
|
|
160
159
|
issuerGrantorValidationValidityPeriod: undefined,
|
|
161
160
|
verifierGrantorValidationValidityPeriod: undefined,
|
|
@@ -168,6 +167,7 @@ function createBaseMsgCreateCredentialSchema() {
|
|
|
168
167
|
pricingAsset: "",
|
|
169
168
|
digestAlgorithm: "",
|
|
170
169
|
holderOnboardingMode: 0,
|
|
170
|
+
ecosystemId: 0,
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
exports.MsgCreateCredentialSchema = {
|
|
@@ -178,9 +178,6 @@ exports.MsgCreateCredentialSchema = {
|
|
|
178
178
|
if (message.operator !== "") {
|
|
179
179
|
writer.uint32(18).string(message.operator);
|
|
180
180
|
}
|
|
181
|
-
if (message.trId !== 0) {
|
|
182
|
-
writer.uint32(24).uint64(message.trId);
|
|
183
|
-
}
|
|
184
181
|
if (message.jsonSchema !== "") {
|
|
185
182
|
writer.uint32(34).string(message.jsonSchema);
|
|
186
183
|
}
|
|
@@ -217,6 +214,9 @@ exports.MsgCreateCredentialSchema = {
|
|
|
217
214
|
if (message.holderOnboardingMode !== 0) {
|
|
218
215
|
writer.uint32(120).uint32(message.holderOnboardingMode);
|
|
219
216
|
}
|
|
217
|
+
if (message.ecosystemId !== 0) {
|
|
218
|
+
writer.uint32(128).uint64(message.ecosystemId);
|
|
219
|
+
}
|
|
220
220
|
return writer;
|
|
221
221
|
},
|
|
222
222
|
decode(input, length) {
|
|
@@ -238,12 +238,6 @@ exports.MsgCreateCredentialSchema = {
|
|
|
238
238
|
}
|
|
239
239
|
message.operator = reader.string();
|
|
240
240
|
continue;
|
|
241
|
-
case 3:
|
|
242
|
-
if (tag !== 24) {
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
message.trId = longToNumber(reader.uint64());
|
|
246
|
-
continue;
|
|
247
241
|
case 4:
|
|
248
242
|
if (tag !== 34) {
|
|
249
243
|
break;
|
|
@@ -316,6 +310,12 @@ exports.MsgCreateCredentialSchema = {
|
|
|
316
310
|
}
|
|
317
311
|
message.holderOnboardingMode = reader.uint32();
|
|
318
312
|
continue;
|
|
313
|
+
case 16:
|
|
314
|
+
if (tag !== 128) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
message.ecosystemId = longToNumber(reader.uint64());
|
|
318
|
+
continue;
|
|
319
319
|
}
|
|
320
320
|
if ((tag & 7) === 4 || tag === 0) {
|
|
321
321
|
break;
|
|
@@ -328,7 +328,6 @@ exports.MsgCreateCredentialSchema = {
|
|
|
328
328
|
return {
|
|
329
329
|
corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
|
|
330
330
|
operator: isSet(object.operator) ? globalThis.String(object.operator) : "",
|
|
331
|
-
trId: isSet(object.trId) ? globalThis.Number(object.trId) : 0,
|
|
332
331
|
jsonSchema: isSet(object.jsonSchema) ? globalThis.String(object.jsonSchema) : "",
|
|
333
332
|
issuerGrantorValidationValidityPeriod: isSet(object.issuerGrantorValidationValidityPeriod)
|
|
334
333
|
? exports.OptionalUInt32.fromJSON(object.issuerGrantorValidationValidityPeriod)
|
|
@@ -353,6 +352,7 @@ exports.MsgCreateCredentialSchema = {
|
|
|
353
352
|
pricingAsset: isSet(object.pricingAsset) ? globalThis.String(object.pricingAsset) : "",
|
|
354
353
|
digestAlgorithm: isSet(object.digestAlgorithm) ? globalThis.String(object.digestAlgorithm) : "",
|
|
355
354
|
holderOnboardingMode: isSet(object.holderOnboardingMode) ? globalThis.Number(object.holderOnboardingMode) : 0,
|
|
355
|
+
ecosystemId: isSet(object.ecosystemId) ? globalThis.Number(object.ecosystemId) : 0,
|
|
356
356
|
};
|
|
357
357
|
},
|
|
358
358
|
toJSON(message) {
|
|
@@ -363,9 +363,6 @@ exports.MsgCreateCredentialSchema = {
|
|
|
363
363
|
if (message.operator !== "") {
|
|
364
364
|
obj.operator = message.operator;
|
|
365
365
|
}
|
|
366
|
-
if (message.trId !== 0) {
|
|
367
|
-
obj.trId = Math.round(message.trId);
|
|
368
|
-
}
|
|
369
366
|
if (message.jsonSchema !== "") {
|
|
370
367
|
obj.jsonSchema = message.jsonSchema;
|
|
371
368
|
}
|
|
@@ -402,6 +399,9 @@ exports.MsgCreateCredentialSchema = {
|
|
|
402
399
|
if (message.holderOnboardingMode !== 0) {
|
|
403
400
|
obj.holderOnboardingMode = Math.round(message.holderOnboardingMode);
|
|
404
401
|
}
|
|
402
|
+
if (message.ecosystemId !== 0) {
|
|
403
|
+
obj.ecosystemId = Math.round(message.ecosystemId);
|
|
404
|
+
}
|
|
405
405
|
return obj;
|
|
406
406
|
},
|
|
407
407
|
create(base) {
|
|
@@ -412,8 +412,7 @@ exports.MsgCreateCredentialSchema = {
|
|
|
412
412
|
const message = createBaseMsgCreateCredentialSchema();
|
|
413
413
|
message.corporation = (_a = object.corporation) !== null && _a !== void 0 ? _a : "";
|
|
414
414
|
message.operator = (_b = object.operator) !== null && _b !== void 0 ? _b : "";
|
|
415
|
-
message.
|
|
416
|
-
message.jsonSchema = (_d = object.jsonSchema) !== null && _d !== void 0 ? _d : "";
|
|
415
|
+
message.jsonSchema = (_c = object.jsonSchema) !== null && _c !== void 0 ? _c : "";
|
|
417
416
|
message.issuerGrantorValidationValidityPeriod =
|
|
418
417
|
(object.issuerGrantorValidationValidityPeriod !== undefined &&
|
|
419
418
|
object.issuerGrantorValidationValidityPeriod !== null)
|
|
@@ -436,12 +435,13 @@ exports.MsgCreateCredentialSchema = {
|
|
|
436
435
|
(object.holderValidationValidityPeriod !== undefined && object.holderValidationValidityPeriod !== null)
|
|
437
436
|
? exports.OptionalUInt32.fromPartial(object.holderValidationValidityPeriod)
|
|
438
437
|
: undefined;
|
|
439
|
-
message.issuerOnboardingMode = (
|
|
440
|
-
message.verifierOnboardingMode = (
|
|
441
|
-
message.pricingAssetType = (
|
|
442
|
-
message.pricingAsset = (
|
|
443
|
-
message.digestAlgorithm = (
|
|
444
|
-
message.holderOnboardingMode = (
|
|
438
|
+
message.issuerOnboardingMode = (_d = object.issuerOnboardingMode) !== null && _d !== void 0 ? _d : 0;
|
|
439
|
+
message.verifierOnboardingMode = (_e = object.verifierOnboardingMode) !== null && _e !== void 0 ? _e : 0;
|
|
440
|
+
message.pricingAssetType = (_f = object.pricingAssetType) !== null && _f !== void 0 ? _f : 0;
|
|
441
|
+
message.pricingAsset = (_g = object.pricingAsset) !== null && _g !== void 0 ? _g : "";
|
|
442
|
+
message.digestAlgorithm = (_h = object.digestAlgorithm) !== null && _h !== void 0 ? _h : "";
|
|
443
|
+
message.holderOnboardingMode = (_j = object.holderOnboardingMode) !== null && _j !== void 0 ? _j : 0;
|
|
444
|
+
message.ecosystemId = (_k = object.ecosystemId) !== null && _k !== void 0 ? _k : 0;
|
|
445
445
|
return message;
|
|
446
446
|
},
|
|
447
447
|
};
|
|
@@ -74,10 +74,13 @@ export interface SchemaAuthorizationPolicy {
|
|
|
74
74
|
created: Date | undefined;
|
|
75
75
|
version: number;
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* CredentialSchema defines the structure for a credential schema.
|
|
79
|
+
* `ecosystem_id` is the v4-rc2 replacement for the legacy `tr_id` field (issue
|
|
80
|
+
* #305): the owning subject is now an Ecosystem, identified by its uint64 id.
|
|
81
|
+
*/
|
|
78
82
|
export interface CredentialSchema {
|
|
79
83
|
id: number;
|
|
80
|
-
trId: number;
|
|
81
84
|
created: Date | undefined;
|
|
82
85
|
modified: Date | undefined;
|
|
83
86
|
archived: Date | undefined;
|
|
@@ -93,6 +96,7 @@ export interface CredentialSchema {
|
|
|
93
96
|
pricingAsset: string;
|
|
94
97
|
digestAlgorithm: string;
|
|
95
98
|
holderOnboardingMode: HolderOnboardingMode;
|
|
99
|
+
ecosystemId: number;
|
|
96
100
|
}
|
|
97
101
|
export declare const SchemaAuthorizationPolicy: {
|
|
98
102
|
encode(message: SchemaAuthorizationPolicy, writer?: _m0.Writer): _m0.Writer;
|