@verana-labs/verana-types 0.10.1-dev.12 → 0.10.1-dev.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/amino-converter/co.d.ts +3 -0
  2. package/dist/amino-converter/co.js +164 -0
  3. package/dist/amino-converter/cs.js +2 -2
  4. package/dist/amino-converter/ec.d.ts +4 -0
  5. package/dist/amino-converter/ec.js +63 -0
  6. package/dist/amino-converter/{tr.d.ts → gf.d.ts} +0 -3
  7. package/dist/amino-converter/gf.js +48 -0
  8. package/dist/amino-converter/group.d.ts +3 -0
  9. package/dist/amino-converter/group.js +91 -0
  10. package/dist/amino-converter/pp.d.ts +12 -0
  11. package/dist/amino-converter/{perm.js → pp.js} +95 -79
  12. package/dist/codec/verana/cs/v1/query.d.ts +2 -2
  13. package/dist/codec/verana/cs/v1/query.js +21 -21
  14. package/dist/codec/verana/cs/v1/tx.d.ts +1 -1
  15. package/dist/codec/verana/cs/v1/tx.js +22 -22
  16. package/dist/codec/verana/cs/v1/types.d.ts +6 -2
  17. package/dist/codec/verana/cs/v1/types.js +30 -30
  18. package/dist/codec/verana/de/v1/query.d.ts +72 -4
  19. package/dist/codec/verana/de/v1/query.js +261 -19
  20. package/dist/codec/verana/de/v1/types.d.ts +124 -34
  21. package/dist/codec/verana/de/v1/types.js +361 -109
  22. package/dist/codec/verana/{tr → ec}/module/module.d.ts +1 -1
  23. package/dist/codec/verana/{tr → ec}/module/module.js +2 -2
  24. package/dist/codec/verana/{tr → ec}/v1/genesis.d.ts +10 -12
  25. package/dist/codec/verana/{tr → ec}/v1/genesis.js +16 -56
  26. package/dist/codec/verana/{tr → ec}/v1/params.d.ts +1 -1
  27. package/dist/codec/verana/{tr → ec}/v1/params.js +2 -2
  28. package/dist/codec/verana/ec/v1/query.d.ts +109 -0
  29. package/dist/codec/verana/{tr → ec}/v1/query.js +69 -71
  30. package/dist/codec/verana/ec/v1/tx.d.ts +152 -0
  31. package/dist/codec/verana/{tr → ec}/v1/tx.js +85 -403
  32. package/dist/codec/verana/ec/v1/types.d.ts +67 -0
  33. package/dist/codec/verana/ec/v1/types.js +422 -0
  34. package/dist/codec/verana/{perm → pp}/module/module.d.ts +1 -1
  35. package/dist/codec/verana/{perm → pp}/module/module.js +2 -2
  36. package/dist/codec/verana/{perm → pp}/v1/genesis.d.ts +9 -9
  37. package/dist/codec/verana/{perm → pp}/v1/genesis.js +26 -26
  38. package/dist/codec/verana/{perm → pp}/v1/params.d.ts +1 -1
  39. package/dist/codec/verana/{perm → pp}/v1/params.js +2 -2
  40. package/dist/codec/verana/pp/v1/query.d.ts +208 -0
  41. package/dist/codec/verana/{perm → pp}/v1/query.js +148 -148
  42. package/dist/codec/verana/pp/v1/tx.d.ts +447 -0
  43. package/dist/codec/verana/{perm → pp}/v1/tx.js +412 -302
  44. package/dist/codec/verana/pp/v1/types.d.ts +137 -0
  45. package/dist/codec/verana/{perm → pp}/v1/types.js +270 -345
  46. package/dist/helpers/aminoConverters.d.ts +6 -4
  47. package/dist/helpers/aminoConverters.js +6 -4
  48. package/dist/index.d.ts +4 -2
  49. package/dist/index.js +4 -2
  50. package/dist/signing.d.ts +36 -32
  51. package/dist/signing.js +85 -68
  52. package/package.json +1 -1
  53. package/dist/amino-converter/perm.d.ts +0 -12
  54. package/dist/amino-converter/tr.js +0 -107
  55. package/dist/codec/verana/perm/v1/query.d.ts +0 -208
  56. package/dist/codec/verana/perm/v1/tx.d.ts +0 -441
  57. package/dist/codec/verana/perm/v1/types.d.ts +0 -134
  58. package/dist/codec/verana/tr/v1/query.d.ts +0 -117
  59. package/dist/codec/verana/tr/v1/tx.d.ts +0 -255
  60. package/dist/codec/verana/tr/v1/types.d.ts +0 -105
  61. package/dist/codec/verana/tr/v1/types.js +0 -809
@@ -3,7 +3,7 @@
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
5
  // protoc unknown
6
- // source: verana/perm/v1/types.proto
6
+ // source: verana/pp/v1/types.proto
7
7
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
8
  if (k2 === undefined) k2 = k;
9
9
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -38,132 +38,128 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  };
39
39
  })();
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.OptionalUInt64 = exports.PermissionSessionRecord = exports.PermissionSession = exports.Permission = exports.ValidationState = exports.PermissionType = exports.protobufPackage = void 0;
42
- exports.permissionTypeFromJSON = permissionTypeFromJSON;
43
- exports.permissionTypeToJSON = permissionTypeToJSON;
44
- exports.validationStateFromJSON = validationStateFromJSON;
45
- exports.validationStateToJSON = validationStateToJSON;
41
+ exports.OptionalUInt64 = exports.ParticipantSessionRecord = exports.ParticipantSession = exports.Participant = exports.OnboardingState = exports.ParticipantRole = exports.protobufPackage = void 0;
42
+ exports.participantRoleFromJSON = participantRoleFromJSON;
43
+ exports.participantRoleToJSON = participantRoleToJSON;
44
+ exports.onboardingStateFromJSON = onboardingStateFromJSON;
45
+ exports.onboardingStateToJSON = onboardingStateToJSON;
46
46
  /* eslint-disable */
47
47
  const _m0 = __importStar(require("protobufjs/minimal"));
48
- const coin_1 = require("../../../cosmos/base/v1beta1/coin");
49
- const duration_1 = require("../../../google/protobuf/duration");
50
48
  const timestamp_1 = require("../../../google/protobuf/timestamp");
51
49
  const Long = require("long");
52
- exports.protobufPackage = "verana.perm.v1";
53
- /** Permission types */
54
- var PermissionType;
55
- (function (PermissionType) {
56
- PermissionType[PermissionType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
57
- PermissionType[PermissionType["ISSUER"] = 1] = "ISSUER";
58
- PermissionType[PermissionType["VERIFIER"] = 2] = "VERIFIER";
59
- PermissionType[PermissionType["ISSUER_GRANTOR"] = 3] = "ISSUER_GRANTOR";
60
- PermissionType[PermissionType["VERIFIER_GRANTOR"] = 4] = "VERIFIER_GRANTOR";
61
- /** ECOSYSTEM - Changed from PERMISSION_TYPE_TRUST_REGISTRY */
62
- PermissionType[PermissionType["ECOSYSTEM"] = 5] = "ECOSYSTEM";
63
- PermissionType[PermissionType["HOLDER"] = 6] = "HOLDER";
64
- PermissionType[PermissionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
65
- })(PermissionType || (exports.PermissionType = PermissionType = {}));
66
- function permissionTypeFromJSON(object) {
50
+ exports.protobufPackage = "verana.pp.v1";
51
+ /** Participant roles */
52
+ var ParticipantRole;
53
+ (function (ParticipantRole) {
54
+ ParticipantRole[ParticipantRole["UNSPECIFIED"] = 0] = "UNSPECIFIED";
55
+ ParticipantRole[ParticipantRole["ISSUER"] = 1] = "ISSUER";
56
+ ParticipantRole[ParticipantRole["VERIFIER"] = 2] = "VERIFIER";
57
+ ParticipantRole[ParticipantRole["ISSUER_GRANTOR"] = 3] = "ISSUER_GRANTOR";
58
+ ParticipantRole[ParticipantRole["VERIFIER_GRANTOR"] = 4] = "VERIFIER_GRANTOR";
59
+ ParticipantRole[ParticipantRole["ECOSYSTEM"] = 5] = "ECOSYSTEM";
60
+ ParticipantRole[ParticipantRole["HOLDER"] = 6] = "HOLDER";
61
+ ParticipantRole[ParticipantRole["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
62
+ })(ParticipantRole || (exports.ParticipantRole = ParticipantRole = {}));
63
+ function participantRoleFromJSON(object) {
67
64
  switch (object) {
68
65
  case 0:
69
66
  case "UNSPECIFIED":
70
- return PermissionType.UNSPECIFIED;
67
+ return ParticipantRole.UNSPECIFIED;
71
68
  case 1:
72
69
  case "ISSUER":
73
- return PermissionType.ISSUER;
70
+ return ParticipantRole.ISSUER;
74
71
  case 2:
75
72
  case "VERIFIER":
76
- return PermissionType.VERIFIER;
73
+ return ParticipantRole.VERIFIER;
77
74
  case 3:
78
75
  case "ISSUER_GRANTOR":
79
- return PermissionType.ISSUER_GRANTOR;
76
+ return ParticipantRole.ISSUER_GRANTOR;
80
77
  case 4:
81
78
  case "VERIFIER_GRANTOR":
82
- return PermissionType.VERIFIER_GRANTOR;
79
+ return ParticipantRole.VERIFIER_GRANTOR;
83
80
  case 5:
84
81
  case "ECOSYSTEM":
85
- return PermissionType.ECOSYSTEM;
82
+ return ParticipantRole.ECOSYSTEM;
86
83
  case 6:
87
84
  case "HOLDER":
88
- return PermissionType.HOLDER;
85
+ return ParticipantRole.HOLDER;
89
86
  case -1:
90
87
  case "UNRECOGNIZED":
91
88
  default:
92
- return PermissionType.UNRECOGNIZED;
89
+ return ParticipantRole.UNRECOGNIZED;
93
90
  }
94
91
  }
95
- function permissionTypeToJSON(object) {
92
+ function participantRoleToJSON(object) {
96
93
  switch (object) {
97
- case PermissionType.UNSPECIFIED:
94
+ case ParticipantRole.UNSPECIFIED:
98
95
  return "UNSPECIFIED";
99
- case PermissionType.ISSUER:
96
+ case ParticipantRole.ISSUER:
100
97
  return "ISSUER";
101
- case PermissionType.VERIFIER:
98
+ case ParticipantRole.VERIFIER:
102
99
  return "VERIFIER";
103
- case PermissionType.ISSUER_GRANTOR:
100
+ case ParticipantRole.ISSUER_GRANTOR:
104
101
  return "ISSUER_GRANTOR";
105
- case PermissionType.VERIFIER_GRANTOR:
102
+ case ParticipantRole.VERIFIER_GRANTOR:
106
103
  return "VERIFIER_GRANTOR";
107
- case PermissionType.ECOSYSTEM:
104
+ case ParticipantRole.ECOSYSTEM:
108
105
  return "ECOSYSTEM";
109
- case PermissionType.HOLDER:
106
+ case ParticipantRole.HOLDER:
110
107
  return "HOLDER";
111
- case PermissionType.UNRECOGNIZED:
108
+ case ParticipantRole.UNRECOGNIZED:
112
109
  default:
113
110
  return "UNRECOGNIZED";
114
111
  }
115
112
  }
116
- /** Validation process states */
117
- var ValidationState;
118
- (function (ValidationState) {
119
- ValidationState[ValidationState["VALIDATION_STATE_UNSPECIFIED"] = 0] = "VALIDATION_STATE_UNSPECIFIED";
120
- ValidationState[ValidationState["PENDING"] = 1] = "PENDING";
121
- ValidationState[ValidationState["VALIDATED"] = 2] = "VALIDATED";
122
- ValidationState[ValidationState["TERMINATED"] = 3] = "TERMINATED";
123
- ValidationState[ValidationState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
124
- })(ValidationState || (exports.ValidationState = ValidationState = {}));
125
- function validationStateFromJSON(object) {
113
+ /** Participant onboarding-process states */
114
+ var OnboardingState;
115
+ (function (OnboardingState) {
116
+ OnboardingState[OnboardingState["ONBOARDING_STATE_UNSPECIFIED"] = 0] = "ONBOARDING_STATE_UNSPECIFIED";
117
+ OnboardingState[OnboardingState["PENDING"] = 1] = "PENDING";
118
+ OnboardingState[OnboardingState["VALIDATED"] = 2] = "VALIDATED";
119
+ OnboardingState[OnboardingState["TERMINATED"] = 3] = "TERMINATED";
120
+ OnboardingState[OnboardingState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
121
+ })(OnboardingState || (exports.OnboardingState = OnboardingState = {}));
122
+ function onboardingStateFromJSON(object) {
126
123
  switch (object) {
127
124
  case 0:
128
- case "VALIDATION_STATE_UNSPECIFIED":
129
- return ValidationState.VALIDATION_STATE_UNSPECIFIED;
125
+ case "ONBOARDING_STATE_UNSPECIFIED":
126
+ return OnboardingState.ONBOARDING_STATE_UNSPECIFIED;
130
127
  case 1:
131
128
  case "PENDING":
132
- return ValidationState.PENDING;
129
+ return OnboardingState.PENDING;
133
130
  case 2:
134
131
  case "VALIDATED":
135
- return ValidationState.VALIDATED;
132
+ return OnboardingState.VALIDATED;
136
133
  case 3:
137
134
  case "TERMINATED":
138
- return ValidationState.TERMINATED;
135
+ return OnboardingState.TERMINATED;
139
136
  case -1:
140
137
  case "UNRECOGNIZED":
141
138
  default:
142
- return ValidationState.UNRECOGNIZED;
139
+ return OnboardingState.UNRECOGNIZED;
143
140
  }
144
141
  }
145
- function validationStateToJSON(object) {
142
+ function onboardingStateToJSON(object) {
146
143
  switch (object) {
147
- case ValidationState.VALIDATION_STATE_UNSPECIFIED:
148
- return "VALIDATION_STATE_UNSPECIFIED";
149
- case ValidationState.PENDING:
144
+ case OnboardingState.ONBOARDING_STATE_UNSPECIFIED:
145
+ return "ONBOARDING_STATE_UNSPECIFIED";
146
+ case OnboardingState.PENDING:
150
147
  return "PENDING";
151
- case ValidationState.VALIDATED:
148
+ case OnboardingState.VALIDATED:
152
149
  return "VALIDATED";
153
- case ValidationState.TERMINATED:
150
+ case OnboardingState.TERMINATED:
154
151
  return "TERMINATED";
155
- case ValidationState.UNRECOGNIZED:
152
+ case OnboardingState.UNRECOGNIZED:
156
153
  default:
157
154
  return "UNRECOGNIZED";
158
155
  }
159
156
  }
160
- function createBasePermission() {
157
+ function createBaseParticipant() {
161
158
  return {
162
159
  id: 0,
163
160
  schemaId: 0,
164
- type: 0,
161
+ role: 0,
165
162
  did: "",
166
- corporation: "",
167
163
  created: undefined,
168
164
  adjusted: undefined,
169
165
  slashed: undefined,
@@ -178,25 +174,21 @@ function createBasePermission() {
178
174
  slashedDeposit: 0,
179
175
  repaidDeposit: 0,
180
176
  revoked: undefined,
181
- validatorPermId: 0,
182
- vpState: 0,
183
- vpExp: undefined,
184
- vpLastStateChange: undefined,
185
- vpValidatorDeposit: 0,
186
- vpCurrentFees: 0,
187
- vpCurrentDeposit: 0,
188
- vpSummaryDigest: "",
177
+ validatorParticipantId: 0,
178
+ opState: 0,
179
+ opExp: undefined,
180
+ opLastStateChange: undefined,
181
+ opValidatorDeposit: 0,
182
+ opCurrentFees: 0,
183
+ opCurrentDeposit: 0,
184
+ opSummaryDigest: "",
189
185
  issuanceFeeDiscount: 0,
190
186
  verificationFeeDiscount: 0,
191
187
  vsOperator: "",
192
- vsOperatorAuthzEnabled: false,
193
- vsOperatorAuthzSpendLimit: [],
194
- vsOperatorAuthzWithFeegrant: false,
195
- vsOperatorAuthzFeeSpendLimit: [],
196
- vsOperatorAuthzSpendPeriod: undefined,
188
+ corporationId: 0,
197
189
  };
198
190
  }
199
- exports.Permission = {
191
+ exports.Participant = {
200
192
  encode(message, writer = _m0.Writer.create()) {
201
193
  if (message.id !== 0) {
202
194
  writer.uint32(8).uint64(message.id);
@@ -204,15 +196,12 @@ exports.Permission = {
204
196
  if (message.schemaId !== 0) {
205
197
  writer.uint32(16).uint64(message.schemaId);
206
198
  }
207
- if (message.type !== 0) {
208
- writer.uint32(24).int32(message.type);
199
+ if (message.role !== 0) {
200
+ writer.uint32(24).int32(message.role);
209
201
  }
210
202
  if (message.did !== "") {
211
203
  writer.uint32(34).string(message.did);
212
204
  }
213
- if (message.corporation !== "") {
214
- writer.uint32(42).string(message.corporation);
215
- }
216
205
  if (message.created !== undefined) {
217
206
  timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(50).fork()).ldelim();
218
207
  }
@@ -255,29 +244,29 @@ exports.Permission = {
255
244
  if (message.revoked !== undefined) {
256
245
  timestamp_1.Timestamp.encode(toTimestamp(message.revoked), writer.uint32(186).fork()).ldelim();
257
246
  }
258
- if (message.validatorPermId !== 0) {
259
- writer.uint32(208).uint64(message.validatorPermId);
247
+ if (message.validatorParticipantId !== 0) {
248
+ writer.uint32(208).uint64(message.validatorParticipantId);
260
249
  }
261
- if (message.vpState !== 0) {
262
- writer.uint32(216).int32(message.vpState);
250
+ if (message.opState !== 0) {
251
+ writer.uint32(216).int32(message.opState);
263
252
  }
264
- if (message.vpExp !== undefined) {
265
- timestamp_1.Timestamp.encode(toTimestamp(message.vpExp), writer.uint32(226).fork()).ldelim();
253
+ if (message.opExp !== undefined) {
254
+ timestamp_1.Timestamp.encode(toTimestamp(message.opExp), writer.uint32(226).fork()).ldelim();
266
255
  }
267
- if (message.vpLastStateChange !== undefined) {
268
- timestamp_1.Timestamp.encode(toTimestamp(message.vpLastStateChange), writer.uint32(234).fork()).ldelim();
256
+ if (message.opLastStateChange !== undefined) {
257
+ timestamp_1.Timestamp.encode(toTimestamp(message.opLastStateChange), writer.uint32(234).fork()).ldelim();
269
258
  }
270
- if (message.vpValidatorDeposit !== 0) {
271
- writer.uint32(240).uint64(message.vpValidatorDeposit);
259
+ if (message.opValidatorDeposit !== 0) {
260
+ writer.uint32(240).uint64(message.opValidatorDeposit);
272
261
  }
273
- if (message.vpCurrentFees !== 0) {
274
- writer.uint32(248).uint64(message.vpCurrentFees);
262
+ if (message.opCurrentFees !== 0) {
263
+ writer.uint32(248).uint64(message.opCurrentFees);
275
264
  }
276
- if (message.vpCurrentDeposit !== 0) {
277
- writer.uint32(256).uint64(message.vpCurrentDeposit);
265
+ if (message.opCurrentDeposit !== 0) {
266
+ writer.uint32(256).uint64(message.opCurrentDeposit);
278
267
  }
279
- if (message.vpSummaryDigest !== "") {
280
- writer.uint32(266).string(message.vpSummaryDigest);
268
+ if (message.opSummaryDigest !== "") {
269
+ writer.uint32(266).string(message.opSummaryDigest);
281
270
  }
282
271
  if (message.issuanceFeeDiscount !== 0) {
283
272
  writer.uint32(280).uint64(message.issuanceFeeDiscount);
@@ -288,27 +277,15 @@ exports.Permission = {
288
277
  if (message.vsOperator !== "") {
289
278
  writer.uint32(298).string(message.vsOperator);
290
279
  }
291
- if (message.vsOperatorAuthzEnabled !== false) {
292
- writer.uint32(304).bool(message.vsOperatorAuthzEnabled);
293
- }
294
- for (const v of message.vsOperatorAuthzSpendLimit) {
295
- coin_1.Coin.encode(v, writer.uint32(314).fork()).ldelim();
296
- }
297
- if (message.vsOperatorAuthzWithFeegrant !== false) {
298
- writer.uint32(320).bool(message.vsOperatorAuthzWithFeegrant);
299
- }
300
- for (const v of message.vsOperatorAuthzFeeSpendLimit) {
301
- coin_1.Coin.encode(v, writer.uint32(330).fork()).ldelim();
302
- }
303
- if (message.vsOperatorAuthzSpendPeriod !== undefined) {
304
- duration_1.Duration.encode(message.vsOperatorAuthzSpendPeriod, writer.uint32(338).fork()).ldelim();
280
+ if (message.corporationId !== 0) {
281
+ writer.uint32(344).uint64(message.corporationId);
305
282
  }
306
283
  return writer;
307
284
  },
308
285
  decode(input, length) {
309
286
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
310
287
  let end = length === undefined ? reader.len : reader.pos + length;
311
- const message = createBasePermission();
288
+ const message = createBaseParticipant();
312
289
  while (reader.pos < end) {
313
290
  const tag = reader.uint32();
314
291
  switch (tag >>> 3) {
@@ -328,7 +305,7 @@ exports.Permission = {
328
305
  if (tag !== 24) {
329
306
  break;
330
307
  }
331
- message.type = reader.int32();
308
+ message.role = reader.int32();
332
309
  continue;
333
310
  case 4:
334
311
  if (tag !== 34) {
@@ -336,12 +313,6 @@ exports.Permission = {
336
313
  }
337
314
  message.did = reader.string();
338
315
  continue;
339
- case 5:
340
- if (tag !== 42) {
341
- break;
342
- }
343
- message.corporation = reader.string();
344
- continue;
345
316
  case 6:
346
317
  if (tag !== 50) {
347
318
  break;
@@ -430,49 +401,49 @@ exports.Permission = {
430
401
  if (tag !== 208) {
431
402
  break;
432
403
  }
433
- message.validatorPermId = longToNumber(reader.uint64());
404
+ message.validatorParticipantId = longToNumber(reader.uint64());
434
405
  continue;
435
406
  case 27:
436
407
  if (tag !== 216) {
437
408
  break;
438
409
  }
439
- message.vpState = reader.int32();
410
+ message.opState = reader.int32();
440
411
  continue;
441
412
  case 28:
442
413
  if (tag !== 226) {
443
414
  break;
444
415
  }
445
- message.vpExp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
416
+ message.opExp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
446
417
  continue;
447
418
  case 29:
448
419
  if (tag !== 234) {
449
420
  break;
450
421
  }
451
- message.vpLastStateChange = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
422
+ message.opLastStateChange = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
452
423
  continue;
453
424
  case 30:
454
425
  if (tag !== 240) {
455
426
  break;
456
427
  }
457
- message.vpValidatorDeposit = longToNumber(reader.uint64());
428
+ message.opValidatorDeposit = longToNumber(reader.uint64());
458
429
  continue;
459
430
  case 31:
460
431
  if (tag !== 248) {
461
432
  break;
462
433
  }
463
- message.vpCurrentFees = longToNumber(reader.uint64());
434
+ message.opCurrentFees = longToNumber(reader.uint64());
464
435
  continue;
465
436
  case 32:
466
437
  if (tag !== 256) {
467
438
  break;
468
439
  }
469
- message.vpCurrentDeposit = longToNumber(reader.uint64());
440
+ message.opCurrentDeposit = longToNumber(reader.uint64());
470
441
  continue;
471
442
  case 33:
472
443
  if (tag !== 266) {
473
444
  break;
474
445
  }
475
- message.vpSummaryDigest = reader.string();
446
+ message.opSummaryDigest = reader.string();
476
447
  continue;
477
448
  case 35:
478
449
  if (tag !== 280) {
@@ -492,35 +463,11 @@ exports.Permission = {
492
463
  }
493
464
  message.vsOperator = reader.string();
494
465
  continue;
495
- case 38:
496
- if (tag !== 304) {
466
+ case 43:
467
+ if (tag !== 344) {
497
468
  break;
498
469
  }
499
- message.vsOperatorAuthzEnabled = reader.bool();
500
- continue;
501
- case 39:
502
- if (tag !== 314) {
503
- break;
504
- }
505
- message.vsOperatorAuthzSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
506
- continue;
507
- case 40:
508
- if (tag !== 320) {
509
- break;
510
- }
511
- message.vsOperatorAuthzWithFeegrant = reader.bool();
512
- continue;
513
- case 41:
514
- if (tag !== 330) {
515
- break;
516
- }
517
- message.vsOperatorAuthzFeeSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
518
- continue;
519
- case 42:
520
- if (tag !== 338) {
521
- break;
522
- }
523
- message.vsOperatorAuthzSpendPeriod = duration_1.Duration.decode(reader, reader.uint32());
470
+ message.corporationId = longToNumber(reader.uint64());
524
471
  continue;
525
472
  }
526
473
  if ((tag & 7) === 4 || tag === 0) {
@@ -534,9 +481,8 @@ exports.Permission = {
534
481
  return {
535
482
  id: isSet(object.id) ? globalThis.Number(object.id) : 0,
536
483
  schemaId: isSet(object.schemaId) ? globalThis.Number(object.schemaId) : 0,
537
- type: isSet(object.type) ? permissionTypeFromJSON(object.type) : 0,
484
+ role: isSet(object.role) ? participantRoleFromJSON(object.role) : 0,
538
485
  did: isSet(object.did) ? globalThis.String(object.did) : "",
539
- corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
540
486
  created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
541
487
  adjusted: isSet(object.adjusted) ? fromJsonTimestamp(object.adjusted) : undefined,
542
488
  slashed: isSet(object.slashed) ? fromJsonTimestamp(object.slashed) : undefined,
@@ -551,38 +497,25 @@ exports.Permission = {
551
497
  slashedDeposit: isSet(object.slashedDeposit) ? globalThis.Number(object.slashedDeposit) : 0,
552
498
  repaidDeposit: isSet(object.repaidDeposit) ? globalThis.Number(object.repaidDeposit) : 0,
553
499
  revoked: isSet(object.revoked) ? fromJsonTimestamp(object.revoked) : undefined,
554
- validatorPermId: isSet(object.validatorPermId) ? globalThis.Number(object.validatorPermId) : 0,
555
- vpState: isSet(object.vpState) ? validationStateFromJSON(object.vpState) : 0,
556
- vpExp: isSet(object.vpExp) ? fromJsonTimestamp(object.vpExp) : undefined,
557
- vpLastStateChange: isSet(object.vpLastStateChange) ? fromJsonTimestamp(object.vpLastStateChange) : undefined,
558
- vpValidatorDeposit: isSet(object.vpValidatorDeposit) ? globalThis.Number(object.vpValidatorDeposit) : 0,
559
- vpCurrentFees: isSet(object.vpCurrentFees) ? globalThis.Number(object.vpCurrentFees) : 0,
560
- vpCurrentDeposit: isSet(object.vpCurrentDeposit) ? globalThis.Number(object.vpCurrentDeposit) : 0,
561
- vpSummaryDigest: isSet(object.vpSummaryDigest) ? globalThis.String(object.vpSummaryDigest) : "",
500
+ validatorParticipantId: isSet(object.validatorParticipantId)
501
+ ? globalThis.Number(object.validatorParticipantId)
502
+ : 0,
503
+ opState: isSet(object.opState) ? onboardingStateFromJSON(object.opState) : 0,
504
+ opExp: isSet(object.opExp) ? fromJsonTimestamp(object.opExp) : undefined,
505
+ opLastStateChange: isSet(object.opLastStateChange) ? fromJsonTimestamp(object.opLastStateChange) : undefined,
506
+ opValidatorDeposit: isSet(object.opValidatorDeposit) ? globalThis.Number(object.opValidatorDeposit) : 0,
507
+ opCurrentFees: isSet(object.opCurrentFees) ? globalThis.Number(object.opCurrentFees) : 0,
508
+ opCurrentDeposit: isSet(object.opCurrentDeposit) ? globalThis.Number(object.opCurrentDeposit) : 0,
509
+ opSummaryDigest: isSet(object.opSummaryDigest) ? globalThis.String(object.opSummaryDigest) : "",
562
510
  issuanceFeeDiscount: isSet(object.issuanceFeeDiscount) ? globalThis.Number(object.issuanceFeeDiscount) : 0,
563
511
  verificationFeeDiscount: isSet(object.verificationFeeDiscount)
564
512
  ? globalThis.Number(object.verificationFeeDiscount)
565
513
  : 0,
566
514
  vsOperator: isSet(object.vsOperator) ? globalThis.String(object.vsOperator) : "",
567
- vsOperatorAuthzEnabled: isSet(object.vsOperatorAuthzEnabled)
568
- ? globalThis.Boolean(object.vsOperatorAuthzEnabled)
569
- : false,
570
- vsOperatorAuthzSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.vsOperatorAuthzSpendLimit)
571
- ? object.vsOperatorAuthzSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
572
- : [],
573
- vsOperatorAuthzWithFeegrant: isSet(object.vsOperatorAuthzWithFeegrant)
574
- ? globalThis.Boolean(object.vsOperatorAuthzWithFeegrant)
575
- : false,
576
- vsOperatorAuthzFeeSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.vsOperatorAuthzFeeSpendLimit)
577
- ? object.vsOperatorAuthzFeeSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
578
- : [],
579
- vsOperatorAuthzSpendPeriod: isSet(object.vsOperatorAuthzSpendPeriod)
580
- ? duration_1.Duration.fromJSON(object.vsOperatorAuthzSpendPeriod)
581
- : undefined,
515
+ corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
582
516
  };
583
517
  },
584
518
  toJSON(message) {
585
- var _a, _b;
586
519
  const obj = {};
587
520
  if (message.id !== 0) {
588
521
  obj.id = Math.round(message.id);
@@ -590,15 +523,12 @@ exports.Permission = {
590
523
  if (message.schemaId !== 0) {
591
524
  obj.schemaId = Math.round(message.schemaId);
592
525
  }
593
- if (message.type !== 0) {
594
- obj.type = permissionTypeToJSON(message.type);
526
+ if (message.role !== 0) {
527
+ obj.role = participantRoleToJSON(message.role);
595
528
  }
596
529
  if (message.did !== "") {
597
530
  obj.did = message.did;
598
531
  }
599
- if (message.corporation !== "") {
600
- obj.corporation = message.corporation;
601
- }
602
532
  if (message.created !== undefined) {
603
533
  obj.created = message.created.toISOString();
604
534
  }
@@ -641,29 +571,29 @@ exports.Permission = {
641
571
  if (message.revoked !== undefined) {
642
572
  obj.revoked = message.revoked.toISOString();
643
573
  }
644
- if (message.validatorPermId !== 0) {
645
- obj.validatorPermId = Math.round(message.validatorPermId);
574
+ if (message.validatorParticipantId !== 0) {
575
+ obj.validatorParticipantId = Math.round(message.validatorParticipantId);
646
576
  }
647
- if (message.vpState !== 0) {
648
- obj.vpState = validationStateToJSON(message.vpState);
577
+ if (message.opState !== 0) {
578
+ obj.opState = onboardingStateToJSON(message.opState);
649
579
  }
650
- if (message.vpExp !== undefined) {
651
- obj.vpExp = message.vpExp.toISOString();
580
+ if (message.opExp !== undefined) {
581
+ obj.opExp = message.opExp.toISOString();
652
582
  }
653
- if (message.vpLastStateChange !== undefined) {
654
- obj.vpLastStateChange = message.vpLastStateChange.toISOString();
583
+ if (message.opLastStateChange !== undefined) {
584
+ obj.opLastStateChange = message.opLastStateChange.toISOString();
655
585
  }
656
- if (message.vpValidatorDeposit !== 0) {
657
- obj.vpValidatorDeposit = Math.round(message.vpValidatorDeposit);
586
+ if (message.opValidatorDeposit !== 0) {
587
+ obj.opValidatorDeposit = Math.round(message.opValidatorDeposit);
658
588
  }
659
- if (message.vpCurrentFees !== 0) {
660
- obj.vpCurrentFees = Math.round(message.vpCurrentFees);
589
+ if (message.opCurrentFees !== 0) {
590
+ obj.opCurrentFees = Math.round(message.opCurrentFees);
661
591
  }
662
- if (message.vpCurrentDeposit !== 0) {
663
- obj.vpCurrentDeposit = Math.round(message.vpCurrentDeposit);
592
+ if (message.opCurrentDeposit !== 0) {
593
+ obj.opCurrentDeposit = Math.round(message.opCurrentDeposit);
664
594
  }
665
- if (message.vpSummaryDigest !== "") {
666
- obj.vpSummaryDigest = message.vpSummaryDigest;
595
+ if (message.opSummaryDigest !== "") {
596
+ obj.opSummaryDigest = message.opSummaryDigest;
667
597
  }
668
598
  if (message.issuanceFeeDiscount !== 0) {
669
599
  obj.issuanceFeeDiscount = Math.round(message.issuanceFeeDiscount);
@@ -674,110 +604,79 @@ exports.Permission = {
674
604
  if (message.vsOperator !== "") {
675
605
  obj.vsOperator = message.vsOperator;
676
606
  }
677
- if (message.vsOperatorAuthzEnabled !== false) {
678
- obj.vsOperatorAuthzEnabled = message.vsOperatorAuthzEnabled;
679
- }
680
- if ((_a = message.vsOperatorAuthzSpendLimit) === null || _a === void 0 ? void 0 : _a.length) {
681
- obj.vsOperatorAuthzSpendLimit = message.vsOperatorAuthzSpendLimit.map((e) => coin_1.Coin.toJSON(e));
682
- }
683
- if (message.vsOperatorAuthzWithFeegrant !== false) {
684
- obj.vsOperatorAuthzWithFeegrant = message.vsOperatorAuthzWithFeegrant;
685
- }
686
- if ((_b = message.vsOperatorAuthzFeeSpendLimit) === null || _b === void 0 ? void 0 : _b.length) {
687
- obj.vsOperatorAuthzFeeSpendLimit = message.vsOperatorAuthzFeeSpendLimit.map((e) => coin_1.Coin.toJSON(e));
688
- }
689
- if (message.vsOperatorAuthzSpendPeriod !== undefined) {
690
- obj.vsOperatorAuthzSpendPeriod = duration_1.Duration.toJSON(message.vsOperatorAuthzSpendPeriod);
607
+ if (message.corporationId !== 0) {
608
+ obj.corporationId = Math.round(message.corporationId);
691
609
  }
692
610
  return obj;
693
611
  },
694
612
  create(base) {
695
- return exports.Permission.fromPartial(base !== null && base !== void 0 ? base : {});
613
+ return exports.Participant.fromPartial(base !== null && base !== void 0 ? base : {});
696
614
  },
697
615
  fromPartial(object) {
698
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
699
- const message = createBasePermission();
616
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
617
+ const message = createBaseParticipant();
700
618
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
701
619
  message.schemaId = (_b = object.schemaId) !== null && _b !== void 0 ? _b : 0;
702
- message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
620
+ message.role = (_c = object.role) !== null && _c !== void 0 ? _c : 0;
703
621
  message.did = (_d = object.did) !== null && _d !== void 0 ? _d : "";
704
- message.corporation = (_e = object.corporation) !== null && _e !== void 0 ? _e : "";
705
- message.created = (_f = object.created) !== null && _f !== void 0 ? _f : undefined;
706
- message.adjusted = (_g = object.adjusted) !== null && _g !== void 0 ? _g : undefined;
707
- message.slashed = (_h = object.slashed) !== null && _h !== void 0 ? _h : undefined;
708
- message.repaid = (_j = object.repaid) !== null && _j !== void 0 ? _j : undefined;
709
- message.effectiveFrom = (_k = object.effectiveFrom) !== null && _k !== void 0 ? _k : undefined;
710
- message.effectiveUntil = (_l = object.effectiveUntil) !== null && _l !== void 0 ? _l : undefined;
711
- message.modified = (_m = object.modified) !== null && _m !== void 0 ? _m : undefined;
712
- message.validationFees = (_o = object.validationFees) !== null && _o !== void 0 ? _o : 0;
713
- message.issuanceFees = (_p = object.issuanceFees) !== null && _p !== void 0 ? _p : 0;
714
- message.verificationFees = (_q = object.verificationFees) !== null && _q !== void 0 ? _q : 0;
715
- message.deposit = (_r = object.deposit) !== null && _r !== void 0 ? _r : 0;
716
- message.slashedDeposit = (_s = object.slashedDeposit) !== null && _s !== void 0 ? _s : 0;
717
- message.repaidDeposit = (_t = object.repaidDeposit) !== null && _t !== void 0 ? _t : 0;
718
- message.revoked = (_u = object.revoked) !== null && _u !== void 0 ? _u : undefined;
719
- message.validatorPermId = (_v = object.validatorPermId) !== null && _v !== void 0 ? _v : 0;
720
- message.vpState = (_w = object.vpState) !== null && _w !== void 0 ? _w : 0;
721
- message.vpExp = (_x = object.vpExp) !== null && _x !== void 0 ? _x : undefined;
722
- message.vpLastStateChange = (_y = object.vpLastStateChange) !== null && _y !== void 0 ? _y : undefined;
723
- message.vpValidatorDeposit = (_z = object.vpValidatorDeposit) !== null && _z !== void 0 ? _z : 0;
724
- message.vpCurrentFees = (_0 = object.vpCurrentFees) !== null && _0 !== void 0 ? _0 : 0;
725
- message.vpCurrentDeposit = (_1 = object.vpCurrentDeposit) !== null && _1 !== void 0 ? _1 : 0;
726
- message.vpSummaryDigest = (_2 = object.vpSummaryDigest) !== null && _2 !== void 0 ? _2 : "";
727
- message.issuanceFeeDiscount = (_3 = object.issuanceFeeDiscount) !== null && _3 !== void 0 ? _3 : 0;
728
- message.verificationFeeDiscount = (_4 = object.verificationFeeDiscount) !== null && _4 !== void 0 ? _4 : 0;
729
- message.vsOperator = (_5 = object.vsOperator) !== null && _5 !== void 0 ? _5 : "";
730
- message.vsOperatorAuthzEnabled = (_6 = object.vsOperatorAuthzEnabled) !== null && _6 !== void 0 ? _6 : false;
731
- message.vsOperatorAuthzSpendLimit = ((_7 = object.vsOperatorAuthzSpendLimit) === null || _7 === void 0 ? void 0 : _7.map((e) => coin_1.Coin.fromPartial(e))) || [];
732
- message.vsOperatorAuthzWithFeegrant = (_8 = object.vsOperatorAuthzWithFeegrant) !== null && _8 !== void 0 ? _8 : false;
733
- message.vsOperatorAuthzFeeSpendLimit = ((_9 = object.vsOperatorAuthzFeeSpendLimit) === null || _9 === void 0 ? void 0 : _9.map((e) => coin_1.Coin.fromPartial(e))) || [];
734
- message.vsOperatorAuthzSpendPeriod =
735
- (object.vsOperatorAuthzSpendPeriod !== undefined && object.vsOperatorAuthzSpendPeriod !== null)
736
- ? duration_1.Duration.fromPartial(object.vsOperatorAuthzSpendPeriod)
737
- : undefined;
622
+ message.created = (_e = object.created) !== null && _e !== void 0 ? _e : undefined;
623
+ message.adjusted = (_f = object.adjusted) !== null && _f !== void 0 ? _f : undefined;
624
+ message.slashed = (_g = object.slashed) !== null && _g !== void 0 ? _g : undefined;
625
+ message.repaid = (_h = object.repaid) !== null && _h !== void 0 ? _h : undefined;
626
+ message.effectiveFrom = (_j = object.effectiveFrom) !== null && _j !== void 0 ? _j : undefined;
627
+ message.effectiveUntil = (_k = object.effectiveUntil) !== null && _k !== void 0 ? _k : undefined;
628
+ message.modified = (_l = object.modified) !== null && _l !== void 0 ? _l : undefined;
629
+ message.validationFees = (_m = object.validationFees) !== null && _m !== void 0 ? _m : 0;
630
+ message.issuanceFees = (_o = object.issuanceFees) !== null && _o !== void 0 ? _o : 0;
631
+ message.verificationFees = (_p = object.verificationFees) !== null && _p !== void 0 ? _p : 0;
632
+ message.deposit = (_q = object.deposit) !== null && _q !== void 0 ? _q : 0;
633
+ message.slashedDeposit = (_r = object.slashedDeposit) !== null && _r !== void 0 ? _r : 0;
634
+ message.repaidDeposit = (_s = object.repaidDeposit) !== null && _s !== void 0 ? _s : 0;
635
+ message.revoked = (_t = object.revoked) !== null && _t !== void 0 ? _t : undefined;
636
+ message.validatorParticipantId = (_u = object.validatorParticipantId) !== null && _u !== void 0 ? _u : 0;
637
+ message.opState = (_v = object.opState) !== null && _v !== void 0 ? _v : 0;
638
+ message.opExp = (_w = object.opExp) !== null && _w !== void 0 ? _w : undefined;
639
+ message.opLastStateChange = (_x = object.opLastStateChange) !== null && _x !== void 0 ? _x : undefined;
640
+ message.opValidatorDeposit = (_y = object.opValidatorDeposit) !== null && _y !== void 0 ? _y : 0;
641
+ message.opCurrentFees = (_z = object.opCurrentFees) !== null && _z !== void 0 ? _z : 0;
642
+ message.opCurrentDeposit = (_0 = object.opCurrentDeposit) !== null && _0 !== void 0 ? _0 : 0;
643
+ message.opSummaryDigest = (_1 = object.opSummaryDigest) !== null && _1 !== void 0 ? _1 : "";
644
+ message.issuanceFeeDiscount = (_2 = object.issuanceFeeDiscount) !== null && _2 !== void 0 ? _2 : 0;
645
+ message.verificationFeeDiscount = (_3 = object.verificationFeeDiscount) !== null && _3 !== void 0 ? _3 : 0;
646
+ message.vsOperator = (_4 = object.vsOperator) !== null && _4 !== void 0 ? _4 : "";
647
+ message.corporationId = (_5 = object.corporationId) !== null && _5 !== void 0 ? _5 : 0;
738
648
  return message;
739
649
  },
740
650
  };
741
- function createBasePermissionSession() {
742
- return {
743
- id: "",
744
- corporation: "",
745
- vsOperator: "",
746
- agentPermId: 0,
747
- sessionRecords: [],
748
- created: undefined,
749
- modified: undefined,
750
- };
651
+ function createBaseParticipantSession() {
652
+ return { id: "", corporationId: 0, vsOperator: "", created: undefined, modified: undefined, sessionRecords: [] };
751
653
  }
752
- exports.PermissionSession = {
654
+ exports.ParticipantSession = {
753
655
  encode(message, writer = _m0.Writer.create()) {
754
656
  if (message.id !== "") {
755
657
  writer.uint32(10).string(message.id);
756
658
  }
757
- if (message.corporation !== "") {
758
- writer.uint32(18).string(message.corporation);
659
+ if (message.corporationId !== 0) {
660
+ writer.uint32(16).uint64(message.corporationId);
759
661
  }
760
662
  if (message.vsOperator !== "") {
761
663
  writer.uint32(26).string(message.vsOperator);
762
664
  }
763
- if (message.agentPermId !== 0) {
764
- writer.uint32(32).uint64(message.agentPermId);
765
- }
766
- for (const v of message.sessionRecords) {
767
- exports.PermissionSessionRecord.encode(v, writer.uint32(42).fork()).ldelim();
768
- }
769
665
  if (message.created !== undefined) {
770
- timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(50).fork()).ldelim();
666
+ timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(34).fork()).ldelim();
771
667
  }
772
668
  if (message.modified !== undefined) {
773
- timestamp_1.Timestamp.encode(toTimestamp(message.modified), writer.uint32(58).fork()).ldelim();
669
+ timestamp_1.Timestamp.encode(toTimestamp(message.modified), writer.uint32(42).fork()).ldelim();
670
+ }
671
+ for (const v of message.sessionRecords) {
672
+ exports.ParticipantSessionRecord.encode(v, writer.uint32(50).fork()).ldelim();
774
673
  }
775
674
  return writer;
776
675
  },
777
676
  decode(input, length) {
778
677
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
779
678
  let end = length === undefined ? reader.len : reader.pos + length;
780
- const message = createBasePermissionSession();
679
+ const message = createBaseParticipantSession();
781
680
  while (reader.pos < end) {
782
681
  const tag = reader.uint32();
783
682
  switch (tag >>> 3) {
@@ -788,10 +687,10 @@ exports.PermissionSession = {
788
687
  message.id = reader.string();
789
688
  continue;
790
689
  case 2:
791
- if (tag !== 18) {
690
+ if (tag !== 16) {
792
691
  break;
793
692
  }
794
- message.corporation = reader.string();
693
+ message.corporationId = longToNumber(reader.uint64());
795
694
  continue;
796
695
  case 3:
797
696
  if (tag !== 26) {
@@ -800,28 +699,22 @@ exports.PermissionSession = {
800
699
  message.vsOperator = reader.string();
801
700
  continue;
802
701
  case 4:
803
- if (tag !== 32) {
702
+ if (tag !== 34) {
804
703
  break;
805
704
  }
806
- message.agentPermId = longToNumber(reader.uint64());
705
+ message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
807
706
  continue;
808
707
  case 5:
809
708
  if (tag !== 42) {
810
709
  break;
811
710
  }
812
- message.sessionRecords.push(exports.PermissionSessionRecord.decode(reader, reader.uint32()));
711
+ message.modified = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
813
712
  continue;
814
713
  case 6:
815
714
  if (tag !== 50) {
816
715
  break;
817
716
  }
818
- message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
819
- continue;
820
- case 7:
821
- if (tag !== 58) {
822
- break;
823
- }
824
- message.modified = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
717
+ message.sessionRecords.push(exports.ParticipantSessionRecord.decode(reader, reader.uint32()));
825
718
  continue;
826
719
  }
827
720
  if ((tag & 7) === 4 || tag === 0) {
@@ -834,14 +727,13 @@ exports.PermissionSession = {
834
727
  fromJSON(object) {
835
728
  return {
836
729
  id: isSet(object.id) ? globalThis.String(object.id) : "",
837
- corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
730
+ corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
838
731
  vsOperator: isSet(object.vsOperator) ? globalThis.String(object.vsOperator) : "",
839
- agentPermId: isSet(object.agentPermId) ? globalThis.Number(object.agentPermId) : 0,
840
- sessionRecords: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sessionRecords)
841
- ? object.sessionRecords.map((e) => exports.PermissionSessionRecord.fromJSON(e))
842
- : [],
843
732
  created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
844
733
  modified: isSet(object.modified) ? fromJsonTimestamp(object.modified) : undefined,
734
+ sessionRecords: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sessionRecords)
735
+ ? object.sessionRecords.map((e) => exports.ParticipantSessionRecord.fromJSON(e))
736
+ : [],
845
737
  };
846
738
  },
847
739
  toJSON(message) {
@@ -850,91 +742,112 @@ exports.PermissionSession = {
850
742
  if (message.id !== "") {
851
743
  obj.id = message.id;
852
744
  }
853
- if (message.corporation !== "") {
854
- obj.corporation = message.corporation;
745
+ if (message.corporationId !== 0) {
746
+ obj.corporationId = Math.round(message.corporationId);
855
747
  }
856
748
  if (message.vsOperator !== "") {
857
749
  obj.vsOperator = message.vsOperator;
858
750
  }
859
- if (message.agentPermId !== 0) {
860
- obj.agentPermId = Math.round(message.agentPermId);
861
- }
862
- if ((_a = message.sessionRecords) === null || _a === void 0 ? void 0 : _a.length) {
863
- obj.sessionRecords = message.sessionRecords.map((e) => exports.PermissionSessionRecord.toJSON(e));
864
- }
865
751
  if (message.created !== undefined) {
866
752
  obj.created = message.created.toISOString();
867
753
  }
868
754
  if (message.modified !== undefined) {
869
755
  obj.modified = message.modified.toISOString();
870
756
  }
757
+ if ((_a = message.sessionRecords) === null || _a === void 0 ? void 0 : _a.length) {
758
+ obj.sessionRecords = message.sessionRecords.map((e) => exports.ParticipantSessionRecord.toJSON(e));
759
+ }
871
760
  return obj;
872
761
  },
873
762
  create(base) {
874
- return exports.PermissionSession.fromPartial(base !== null && base !== void 0 ? base : {});
763
+ return exports.ParticipantSession.fromPartial(base !== null && base !== void 0 ? base : {});
875
764
  },
876
765
  fromPartial(object) {
877
- var _a, _b, _c, _d, _e, _f, _g;
878
- const message = createBasePermissionSession();
766
+ var _a, _b, _c, _d, _e, _f;
767
+ const message = createBaseParticipantSession();
879
768
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
880
- message.corporation = (_b = object.corporation) !== null && _b !== void 0 ? _b : "";
769
+ message.corporationId = (_b = object.corporationId) !== null && _b !== void 0 ? _b : 0;
881
770
  message.vsOperator = (_c = object.vsOperator) !== null && _c !== void 0 ? _c : "";
882
- message.agentPermId = (_d = object.agentPermId) !== null && _d !== void 0 ? _d : 0;
883
- message.sessionRecords = ((_e = object.sessionRecords) === null || _e === void 0 ? void 0 : _e.map((e) => exports.PermissionSessionRecord.fromPartial(e))) || [];
884
- message.created = (_f = object.created) !== null && _f !== void 0 ? _f : undefined;
885
- message.modified = (_g = object.modified) !== null && _g !== void 0 ? _g : undefined;
771
+ message.created = (_d = object.created) !== null && _d !== void 0 ? _d : undefined;
772
+ message.modified = (_e = object.modified) !== null && _e !== void 0 ? _e : undefined;
773
+ message.sessionRecords = ((_f = object.sessionRecords) === null || _f === void 0 ? void 0 : _f.map((e) => exports.ParticipantSessionRecord.fromPartial(e))) || [];
886
774
  return message;
887
775
  },
888
776
  };
889
- function createBasePermissionSessionRecord() {
890
- return { created: undefined, issuerPermId: 0, verifierPermId: 0, walletAgentPermId: 0 };
777
+ function createBaseParticipantSessionRecord() {
778
+ return {
779
+ id: 0,
780
+ created: undefined,
781
+ issuerParticipantId: 0,
782
+ verifierParticipantId: 0,
783
+ walletAgentParticipantId: 0,
784
+ agentParticipantId: 0,
785
+ };
891
786
  }
892
- exports.PermissionSessionRecord = {
787
+ exports.ParticipantSessionRecord = {
893
788
  encode(message, writer = _m0.Writer.create()) {
789
+ if (message.id !== 0) {
790
+ writer.uint32(8).uint64(message.id);
791
+ }
894
792
  if (message.created !== undefined) {
895
- timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(10).fork()).ldelim();
793
+ timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(18).fork()).ldelim();
794
+ }
795
+ if (message.issuerParticipantId !== 0) {
796
+ writer.uint32(24).uint64(message.issuerParticipantId);
896
797
  }
897
- if (message.issuerPermId !== 0) {
898
- writer.uint32(16).uint64(message.issuerPermId);
798
+ if (message.verifierParticipantId !== 0) {
799
+ writer.uint32(32).uint64(message.verifierParticipantId);
899
800
  }
900
- if (message.verifierPermId !== 0) {
901
- writer.uint32(24).uint64(message.verifierPermId);
801
+ if (message.walletAgentParticipantId !== 0) {
802
+ writer.uint32(40).uint64(message.walletAgentParticipantId);
902
803
  }
903
- if (message.walletAgentPermId !== 0) {
904
- writer.uint32(32).uint64(message.walletAgentPermId);
804
+ if (message.agentParticipantId !== 0) {
805
+ writer.uint32(48).uint64(message.agentParticipantId);
905
806
  }
906
807
  return writer;
907
808
  },
908
809
  decode(input, length) {
909
810
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
910
811
  let end = length === undefined ? reader.len : reader.pos + length;
911
- const message = createBasePermissionSessionRecord();
812
+ const message = createBaseParticipantSessionRecord();
912
813
  while (reader.pos < end) {
913
814
  const tag = reader.uint32();
914
815
  switch (tag >>> 3) {
915
816
  case 1:
916
- if (tag !== 10) {
817
+ if (tag !== 8) {
917
818
  break;
918
819
  }
919
- message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
820
+ message.id = longToNumber(reader.uint64());
920
821
  continue;
921
822
  case 2:
922
- if (tag !== 16) {
823
+ if (tag !== 18) {
923
824
  break;
924
825
  }
925
- message.issuerPermId = longToNumber(reader.uint64());
826
+ message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
926
827
  continue;
927
828
  case 3:
928
829
  if (tag !== 24) {
929
830
  break;
930
831
  }
931
- message.verifierPermId = longToNumber(reader.uint64());
832
+ message.issuerParticipantId = longToNumber(reader.uint64());
932
833
  continue;
933
834
  case 4:
934
835
  if (tag !== 32) {
935
836
  break;
936
837
  }
937
- message.walletAgentPermId = longToNumber(reader.uint64());
838
+ message.verifierParticipantId = longToNumber(reader.uint64());
839
+ continue;
840
+ case 5:
841
+ if (tag !== 40) {
842
+ break;
843
+ }
844
+ message.walletAgentParticipantId = longToNumber(reader.uint64());
845
+ continue;
846
+ case 6:
847
+ if (tag !== 48) {
848
+ break;
849
+ }
850
+ message.agentParticipantId = longToNumber(reader.uint64());
938
851
  continue;
939
852
  }
940
853
  if ((tag & 7) === 4 || tag === 0) {
@@ -946,38 +859,50 @@ exports.PermissionSessionRecord = {
946
859
  },
947
860
  fromJSON(object) {
948
861
  return {
862
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
949
863
  created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
950
- issuerPermId: isSet(object.issuerPermId) ? globalThis.Number(object.issuerPermId) : 0,
951
- verifierPermId: isSet(object.verifierPermId) ? globalThis.Number(object.verifierPermId) : 0,
952
- walletAgentPermId: isSet(object.walletAgentPermId) ? globalThis.Number(object.walletAgentPermId) : 0,
864
+ issuerParticipantId: isSet(object.issuerParticipantId) ? globalThis.Number(object.issuerParticipantId) : 0,
865
+ verifierParticipantId: isSet(object.verifierParticipantId) ? globalThis.Number(object.verifierParticipantId) : 0,
866
+ walletAgentParticipantId: isSet(object.walletAgentParticipantId)
867
+ ? globalThis.Number(object.walletAgentParticipantId)
868
+ : 0,
869
+ agentParticipantId: isSet(object.agentParticipantId) ? globalThis.Number(object.agentParticipantId) : 0,
953
870
  };
954
871
  },
955
872
  toJSON(message) {
956
873
  const obj = {};
874
+ if (message.id !== 0) {
875
+ obj.id = Math.round(message.id);
876
+ }
957
877
  if (message.created !== undefined) {
958
878
  obj.created = message.created.toISOString();
959
879
  }
960
- if (message.issuerPermId !== 0) {
961
- obj.issuerPermId = Math.round(message.issuerPermId);
880
+ if (message.issuerParticipantId !== 0) {
881
+ obj.issuerParticipantId = Math.round(message.issuerParticipantId);
962
882
  }
963
- if (message.verifierPermId !== 0) {
964
- obj.verifierPermId = Math.round(message.verifierPermId);
883
+ if (message.verifierParticipantId !== 0) {
884
+ obj.verifierParticipantId = Math.round(message.verifierParticipantId);
965
885
  }
966
- if (message.walletAgentPermId !== 0) {
967
- obj.walletAgentPermId = Math.round(message.walletAgentPermId);
886
+ if (message.walletAgentParticipantId !== 0) {
887
+ obj.walletAgentParticipantId = Math.round(message.walletAgentParticipantId);
888
+ }
889
+ if (message.agentParticipantId !== 0) {
890
+ obj.agentParticipantId = Math.round(message.agentParticipantId);
968
891
  }
969
892
  return obj;
970
893
  },
971
894
  create(base) {
972
- return exports.PermissionSessionRecord.fromPartial(base !== null && base !== void 0 ? base : {});
895
+ return exports.ParticipantSessionRecord.fromPartial(base !== null && base !== void 0 ? base : {});
973
896
  },
974
897
  fromPartial(object) {
975
- var _a, _b, _c, _d;
976
- const message = createBasePermissionSessionRecord();
977
- message.created = (_a = object.created) !== null && _a !== void 0 ? _a : undefined;
978
- message.issuerPermId = (_b = object.issuerPermId) !== null && _b !== void 0 ? _b : 0;
979
- message.verifierPermId = (_c = object.verifierPermId) !== null && _c !== void 0 ? _c : 0;
980
- message.walletAgentPermId = (_d = object.walletAgentPermId) !== null && _d !== void 0 ? _d : 0;
898
+ var _a, _b, _c, _d, _e, _f;
899
+ const message = createBaseParticipantSessionRecord();
900
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
901
+ message.created = (_b = object.created) !== null && _b !== void 0 ? _b : undefined;
902
+ message.issuerParticipantId = (_c = object.issuerParticipantId) !== null && _c !== void 0 ? _c : 0;
903
+ message.verifierParticipantId = (_d = object.verifierParticipantId) !== null && _d !== void 0 ? _d : 0;
904
+ message.walletAgentParticipantId = (_e = object.walletAgentParticipantId) !== null && _e !== void 0 ? _e : 0;
905
+ message.agentParticipantId = (_f = object.agentParticipantId) !== null && _f !== void 0 ? _f : 0;
981
906
  return message;
982
907
  },
983
908
  };