@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.
Files changed (57) 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} +56 -56
  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/{tr → ec}/module/module.d.ts +1 -1
  19. package/dist/codec/verana/{tr → ec}/module/module.js +2 -2
  20. package/dist/codec/verana/{tr → ec}/v1/genesis.d.ts +10 -12
  21. package/dist/codec/verana/{tr → ec}/v1/genesis.js +16 -56
  22. package/dist/codec/verana/{tr → ec}/v1/params.d.ts +1 -1
  23. package/dist/codec/verana/{tr → ec}/v1/params.js +2 -2
  24. package/dist/codec/verana/ec/v1/query.d.ts +109 -0
  25. package/dist/codec/verana/{tr → ec}/v1/query.js +69 -71
  26. package/dist/codec/verana/ec/v1/tx.d.ts +152 -0
  27. package/dist/codec/verana/{tr → ec}/v1/tx.js +85 -403
  28. package/dist/codec/verana/ec/v1/types.d.ts +67 -0
  29. package/dist/codec/verana/ec/v1/types.js +422 -0
  30. package/dist/codec/verana/{perm → pp}/module/module.d.ts +1 -1
  31. package/dist/codec/verana/{perm → pp}/module/module.js +2 -2
  32. package/dist/codec/verana/{perm → pp}/v1/genesis.d.ts +9 -9
  33. package/dist/codec/verana/{perm → pp}/v1/genesis.js +26 -26
  34. package/dist/codec/verana/{perm → pp}/v1/params.d.ts +1 -1
  35. package/dist/codec/verana/{perm → pp}/v1/params.js +2 -2
  36. package/dist/codec/verana/pp/v1/query.d.ts +208 -0
  37. package/dist/codec/verana/{perm → pp}/v1/query.js +148 -148
  38. package/dist/codec/verana/pp/v1/tx.d.ts +437 -0
  39. package/dist/codec/verana/{perm → pp}/v1/tx.js +255 -249
  40. package/dist/codec/verana/pp/v1/types.d.ts +140 -0
  41. package/dist/codec/verana/{perm → pp}/v1/types.js +278 -262
  42. package/dist/helpers/aminoConverters.d.ts +6 -4
  43. package/dist/helpers/aminoConverters.js +6 -4
  44. package/dist/index.d.ts +4 -2
  45. package/dist/index.js +4 -2
  46. package/dist/signing.d.ts +36 -32
  47. package/dist/signing.js +85 -68
  48. package/package.json +1 -1
  49. package/dist/amino-converter/perm.d.ts +0 -12
  50. package/dist/amino-converter/tr.js +0 -107
  51. package/dist/codec/verana/perm/v1/query.d.ts +0 -208
  52. package/dist/codec/verana/perm/v1/tx.d.ts +0 -441
  53. package/dist/codec/verana/perm/v1/types.d.ts +0 -134
  54. package/dist/codec/verana/tr/v1/query.d.ts +0 -117
  55. package/dist/codec/verana/tr/v1/tx.d.ts +0 -255
  56. package/dist/codec/verana/tr/v1/types.d.ts +0 -105
  57. 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,130 @@ 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
48
  const coin_1 = require("../../../cosmos/base/v1beta1/coin");
49
49
  const duration_1 = require("../../../google/protobuf/duration");
50
50
  const timestamp_1 = require("../../../google/protobuf/timestamp");
51
51
  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) {
52
+ exports.protobufPackage = "verana.pp.v1";
53
+ /** Participant roles */
54
+ var ParticipantRole;
55
+ (function (ParticipantRole) {
56
+ ParticipantRole[ParticipantRole["UNSPECIFIED"] = 0] = "UNSPECIFIED";
57
+ ParticipantRole[ParticipantRole["ISSUER"] = 1] = "ISSUER";
58
+ ParticipantRole[ParticipantRole["VERIFIER"] = 2] = "VERIFIER";
59
+ ParticipantRole[ParticipantRole["ISSUER_GRANTOR"] = 3] = "ISSUER_GRANTOR";
60
+ ParticipantRole[ParticipantRole["VERIFIER_GRANTOR"] = 4] = "VERIFIER_GRANTOR";
61
+ ParticipantRole[ParticipantRole["ECOSYSTEM"] = 5] = "ECOSYSTEM";
62
+ ParticipantRole[ParticipantRole["HOLDER"] = 6] = "HOLDER";
63
+ ParticipantRole[ParticipantRole["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
64
+ })(ParticipantRole || (exports.ParticipantRole = ParticipantRole = {}));
65
+ function participantRoleFromJSON(object) {
67
66
  switch (object) {
68
67
  case 0:
69
68
  case "UNSPECIFIED":
70
- return PermissionType.UNSPECIFIED;
69
+ return ParticipantRole.UNSPECIFIED;
71
70
  case 1:
72
71
  case "ISSUER":
73
- return PermissionType.ISSUER;
72
+ return ParticipantRole.ISSUER;
74
73
  case 2:
75
74
  case "VERIFIER":
76
- return PermissionType.VERIFIER;
75
+ return ParticipantRole.VERIFIER;
77
76
  case 3:
78
77
  case "ISSUER_GRANTOR":
79
- return PermissionType.ISSUER_GRANTOR;
78
+ return ParticipantRole.ISSUER_GRANTOR;
80
79
  case 4:
81
80
  case "VERIFIER_GRANTOR":
82
- return PermissionType.VERIFIER_GRANTOR;
81
+ return ParticipantRole.VERIFIER_GRANTOR;
83
82
  case 5:
84
83
  case "ECOSYSTEM":
85
- return PermissionType.ECOSYSTEM;
84
+ return ParticipantRole.ECOSYSTEM;
86
85
  case 6:
87
86
  case "HOLDER":
88
- return PermissionType.HOLDER;
87
+ return ParticipantRole.HOLDER;
89
88
  case -1:
90
89
  case "UNRECOGNIZED":
91
90
  default:
92
- return PermissionType.UNRECOGNIZED;
91
+ return ParticipantRole.UNRECOGNIZED;
93
92
  }
94
93
  }
95
- function permissionTypeToJSON(object) {
94
+ function participantRoleToJSON(object) {
96
95
  switch (object) {
97
- case PermissionType.UNSPECIFIED:
96
+ case ParticipantRole.UNSPECIFIED:
98
97
  return "UNSPECIFIED";
99
- case PermissionType.ISSUER:
98
+ case ParticipantRole.ISSUER:
100
99
  return "ISSUER";
101
- case PermissionType.VERIFIER:
100
+ case ParticipantRole.VERIFIER:
102
101
  return "VERIFIER";
103
- case PermissionType.ISSUER_GRANTOR:
102
+ case ParticipantRole.ISSUER_GRANTOR:
104
103
  return "ISSUER_GRANTOR";
105
- case PermissionType.VERIFIER_GRANTOR:
104
+ case ParticipantRole.VERIFIER_GRANTOR:
106
105
  return "VERIFIER_GRANTOR";
107
- case PermissionType.ECOSYSTEM:
106
+ case ParticipantRole.ECOSYSTEM:
108
107
  return "ECOSYSTEM";
109
- case PermissionType.HOLDER:
108
+ case ParticipantRole.HOLDER:
110
109
  return "HOLDER";
111
- case PermissionType.UNRECOGNIZED:
110
+ case ParticipantRole.UNRECOGNIZED:
112
111
  default:
113
112
  return "UNRECOGNIZED";
114
113
  }
115
114
  }
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) {
115
+ /** Participant onboarding-process states */
116
+ var OnboardingState;
117
+ (function (OnboardingState) {
118
+ OnboardingState[OnboardingState["ONBOARDING_STATE_UNSPECIFIED"] = 0] = "ONBOARDING_STATE_UNSPECIFIED";
119
+ OnboardingState[OnboardingState["PENDING"] = 1] = "PENDING";
120
+ OnboardingState[OnboardingState["VALIDATED"] = 2] = "VALIDATED";
121
+ OnboardingState[OnboardingState["TERMINATED"] = 3] = "TERMINATED";
122
+ OnboardingState[OnboardingState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
123
+ })(OnboardingState || (exports.OnboardingState = OnboardingState = {}));
124
+ function onboardingStateFromJSON(object) {
126
125
  switch (object) {
127
126
  case 0:
128
- case "VALIDATION_STATE_UNSPECIFIED":
129
- return ValidationState.VALIDATION_STATE_UNSPECIFIED;
127
+ case "ONBOARDING_STATE_UNSPECIFIED":
128
+ return OnboardingState.ONBOARDING_STATE_UNSPECIFIED;
130
129
  case 1:
131
130
  case "PENDING":
132
- return ValidationState.PENDING;
131
+ return OnboardingState.PENDING;
133
132
  case 2:
134
133
  case "VALIDATED":
135
- return ValidationState.VALIDATED;
134
+ return OnboardingState.VALIDATED;
136
135
  case 3:
137
136
  case "TERMINATED":
138
- return ValidationState.TERMINATED;
137
+ return OnboardingState.TERMINATED;
139
138
  case -1:
140
139
  case "UNRECOGNIZED":
141
140
  default:
142
- return ValidationState.UNRECOGNIZED;
141
+ return OnboardingState.UNRECOGNIZED;
143
142
  }
144
143
  }
145
- function validationStateToJSON(object) {
144
+ function onboardingStateToJSON(object) {
146
145
  switch (object) {
147
- case ValidationState.VALIDATION_STATE_UNSPECIFIED:
148
- return "VALIDATION_STATE_UNSPECIFIED";
149
- case ValidationState.PENDING:
146
+ case OnboardingState.ONBOARDING_STATE_UNSPECIFIED:
147
+ return "ONBOARDING_STATE_UNSPECIFIED";
148
+ case OnboardingState.PENDING:
150
149
  return "PENDING";
151
- case ValidationState.VALIDATED:
150
+ case OnboardingState.VALIDATED:
152
151
  return "VALIDATED";
153
- case ValidationState.TERMINATED:
152
+ case OnboardingState.TERMINATED:
154
153
  return "TERMINATED";
155
- case ValidationState.UNRECOGNIZED:
154
+ case OnboardingState.UNRECOGNIZED:
156
155
  default:
157
156
  return "UNRECOGNIZED";
158
157
  }
159
158
  }
160
- function createBasePermission() {
159
+ function createBaseParticipant() {
161
160
  return {
162
161
  id: 0,
163
162
  schemaId: 0,
164
- type: 0,
163
+ role: 0,
165
164
  did: "",
166
- corporation: "",
167
165
  created: undefined,
168
166
  adjusted: undefined,
169
167
  slashed: undefined,
@@ -178,14 +176,14 @@ function createBasePermission() {
178
176
  slashedDeposit: 0,
179
177
  repaidDeposit: 0,
180
178
  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: "",
179
+ validatorParticipantId: 0,
180
+ opState: 0,
181
+ opExp: undefined,
182
+ opLastStateChange: undefined,
183
+ opValidatorDeposit: 0,
184
+ opCurrentFees: 0,
185
+ opCurrentDeposit: 0,
186
+ opSummaryDigest: "",
189
187
  issuanceFeeDiscount: 0,
190
188
  verificationFeeDiscount: 0,
191
189
  vsOperator: "",
@@ -194,9 +192,10 @@ function createBasePermission() {
194
192
  vsOperatorAuthzWithFeegrant: false,
195
193
  vsOperatorAuthzFeeSpendLimit: [],
196
194
  vsOperatorAuthzSpendPeriod: undefined,
195
+ corporationId: 0,
197
196
  };
198
197
  }
199
- exports.Permission = {
198
+ exports.Participant = {
200
199
  encode(message, writer = _m0.Writer.create()) {
201
200
  if (message.id !== 0) {
202
201
  writer.uint32(8).uint64(message.id);
@@ -204,15 +203,12 @@ exports.Permission = {
204
203
  if (message.schemaId !== 0) {
205
204
  writer.uint32(16).uint64(message.schemaId);
206
205
  }
207
- if (message.type !== 0) {
208
- writer.uint32(24).int32(message.type);
206
+ if (message.role !== 0) {
207
+ writer.uint32(24).int32(message.role);
209
208
  }
210
209
  if (message.did !== "") {
211
210
  writer.uint32(34).string(message.did);
212
211
  }
213
- if (message.corporation !== "") {
214
- writer.uint32(42).string(message.corporation);
215
- }
216
212
  if (message.created !== undefined) {
217
213
  timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(50).fork()).ldelim();
218
214
  }
@@ -255,29 +251,29 @@ exports.Permission = {
255
251
  if (message.revoked !== undefined) {
256
252
  timestamp_1.Timestamp.encode(toTimestamp(message.revoked), writer.uint32(186).fork()).ldelim();
257
253
  }
258
- if (message.validatorPermId !== 0) {
259
- writer.uint32(208).uint64(message.validatorPermId);
254
+ if (message.validatorParticipantId !== 0) {
255
+ writer.uint32(208).uint64(message.validatorParticipantId);
260
256
  }
261
- if (message.vpState !== 0) {
262
- writer.uint32(216).int32(message.vpState);
257
+ if (message.opState !== 0) {
258
+ writer.uint32(216).int32(message.opState);
263
259
  }
264
- if (message.vpExp !== undefined) {
265
- timestamp_1.Timestamp.encode(toTimestamp(message.vpExp), writer.uint32(226).fork()).ldelim();
260
+ if (message.opExp !== undefined) {
261
+ timestamp_1.Timestamp.encode(toTimestamp(message.opExp), writer.uint32(226).fork()).ldelim();
266
262
  }
267
- if (message.vpLastStateChange !== undefined) {
268
- timestamp_1.Timestamp.encode(toTimestamp(message.vpLastStateChange), writer.uint32(234).fork()).ldelim();
263
+ if (message.opLastStateChange !== undefined) {
264
+ timestamp_1.Timestamp.encode(toTimestamp(message.opLastStateChange), writer.uint32(234).fork()).ldelim();
269
265
  }
270
- if (message.vpValidatorDeposit !== 0) {
271
- writer.uint32(240).uint64(message.vpValidatorDeposit);
266
+ if (message.opValidatorDeposit !== 0) {
267
+ writer.uint32(240).uint64(message.opValidatorDeposit);
272
268
  }
273
- if (message.vpCurrentFees !== 0) {
274
- writer.uint32(248).uint64(message.vpCurrentFees);
269
+ if (message.opCurrentFees !== 0) {
270
+ writer.uint32(248).uint64(message.opCurrentFees);
275
271
  }
276
- if (message.vpCurrentDeposit !== 0) {
277
- writer.uint32(256).uint64(message.vpCurrentDeposit);
272
+ if (message.opCurrentDeposit !== 0) {
273
+ writer.uint32(256).uint64(message.opCurrentDeposit);
278
274
  }
279
- if (message.vpSummaryDigest !== "") {
280
- writer.uint32(266).string(message.vpSummaryDigest);
275
+ if (message.opSummaryDigest !== "") {
276
+ writer.uint32(266).string(message.opSummaryDigest);
281
277
  }
282
278
  if (message.issuanceFeeDiscount !== 0) {
283
279
  writer.uint32(280).uint64(message.issuanceFeeDiscount);
@@ -303,12 +299,15 @@ exports.Permission = {
303
299
  if (message.vsOperatorAuthzSpendPeriod !== undefined) {
304
300
  duration_1.Duration.encode(message.vsOperatorAuthzSpendPeriod, writer.uint32(338).fork()).ldelim();
305
301
  }
302
+ if (message.corporationId !== 0) {
303
+ writer.uint32(344).uint64(message.corporationId);
304
+ }
306
305
  return writer;
307
306
  },
308
307
  decode(input, length) {
309
308
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
310
309
  let end = length === undefined ? reader.len : reader.pos + length;
311
- const message = createBasePermission();
310
+ const message = createBaseParticipant();
312
311
  while (reader.pos < end) {
313
312
  const tag = reader.uint32();
314
313
  switch (tag >>> 3) {
@@ -328,7 +327,7 @@ exports.Permission = {
328
327
  if (tag !== 24) {
329
328
  break;
330
329
  }
331
- message.type = reader.int32();
330
+ message.role = reader.int32();
332
331
  continue;
333
332
  case 4:
334
333
  if (tag !== 34) {
@@ -336,12 +335,6 @@ exports.Permission = {
336
335
  }
337
336
  message.did = reader.string();
338
337
  continue;
339
- case 5:
340
- if (tag !== 42) {
341
- break;
342
- }
343
- message.corporation = reader.string();
344
- continue;
345
338
  case 6:
346
339
  if (tag !== 50) {
347
340
  break;
@@ -430,49 +423,49 @@ exports.Permission = {
430
423
  if (tag !== 208) {
431
424
  break;
432
425
  }
433
- message.validatorPermId = longToNumber(reader.uint64());
426
+ message.validatorParticipantId = longToNumber(reader.uint64());
434
427
  continue;
435
428
  case 27:
436
429
  if (tag !== 216) {
437
430
  break;
438
431
  }
439
- message.vpState = reader.int32();
432
+ message.opState = reader.int32();
440
433
  continue;
441
434
  case 28:
442
435
  if (tag !== 226) {
443
436
  break;
444
437
  }
445
- message.vpExp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
438
+ message.opExp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
446
439
  continue;
447
440
  case 29:
448
441
  if (tag !== 234) {
449
442
  break;
450
443
  }
451
- message.vpLastStateChange = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
444
+ message.opLastStateChange = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
452
445
  continue;
453
446
  case 30:
454
447
  if (tag !== 240) {
455
448
  break;
456
449
  }
457
- message.vpValidatorDeposit = longToNumber(reader.uint64());
450
+ message.opValidatorDeposit = longToNumber(reader.uint64());
458
451
  continue;
459
452
  case 31:
460
453
  if (tag !== 248) {
461
454
  break;
462
455
  }
463
- message.vpCurrentFees = longToNumber(reader.uint64());
456
+ message.opCurrentFees = longToNumber(reader.uint64());
464
457
  continue;
465
458
  case 32:
466
459
  if (tag !== 256) {
467
460
  break;
468
461
  }
469
- message.vpCurrentDeposit = longToNumber(reader.uint64());
462
+ message.opCurrentDeposit = longToNumber(reader.uint64());
470
463
  continue;
471
464
  case 33:
472
465
  if (tag !== 266) {
473
466
  break;
474
467
  }
475
- message.vpSummaryDigest = reader.string();
468
+ message.opSummaryDigest = reader.string();
476
469
  continue;
477
470
  case 35:
478
471
  if (tag !== 280) {
@@ -522,6 +515,12 @@ exports.Permission = {
522
515
  }
523
516
  message.vsOperatorAuthzSpendPeriod = duration_1.Duration.decode(reader, reader.uint32());
524
517
  continue;
518
+ case 43:
519
+ if (tag !== 344) {
520
+ break;
521
+ }
522
+ message.corporationId = longToNumber(reader.uint64());
523
+ continue;
525
524
  }
526
525
  if ((tag & 7) === 4 || tag === 0) {
527
526
  break;
@@ -534,9 +533,8 @@ exports.Permission = {
534
533
  return {
535
534
  id: isSet(object.id) ? globalThis.Number(object.id) : 0,
536
535
  schemaId: isSet(object.schemaId) ? globalThis.Number(object.schemaId) : 0,
537
- type: isSet(object.type) ? permissionTypeFromJSON(object.type) : 0,
536
+ role: isSet(object.role) ? participantRoleFromJSON(object.role) : 0,
538
537
  did: isSet(object.did) ? globalThis.String(object.did) : "",
539
- corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
540
538
  created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
541
539
  adjusted: isSet(object.adjusted) ? fromJsonTimestamp(object.adjusted) : undefined,
542
540
  slashed: isSet(object.slashed) ? fromJsonTimestamp(object.slashed) : undefined,
@@ -551,14 +549,16 @@ exports.Permission = {
551
549
  slashedDeposit: isSet(object.slashedDeposit) ? globalThis.Number(object.slashedDeposit) : 0,
552
550
  repaidDeposit: isSet(object.repaidDeposit) ? globalThis.Number(object.repaidDeposit) : 0,
553
551
  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) : "",
552
+ validatorParticipantId: isSet(object.validatorParticipantId)
553
+ ? globalThis.Number(object.validatorParticipantId)
554
+ : 0,
555
+ opState: isSet(object.opState) ? onboardingStateFromJSON(object.opState) : 0,
556
+ opExp: isSet(object.opExp) ? fromJsonTimestamp(object.opExp) : undefined,
557
+ opLastStateChange: isSet(object.opLastStateChange) ? fromJsonTimestamp(object.opLastStateChange) : undefined,
558
+ opValidatorDeposit: isSet(object.opValidatorDeposit) ? globalThis.Number(object.opValidatorDeposit) : 0,
559
+ opCurrentFees: isSet(object.opCurrentFees) ? globalThis.Number(object.opCurrentFees) : 0,
560
+ opCurrentDeposit: isSet(object.opCurrentDeposit) ? globalThis.Number(object.opCurrentDeposit) : 0,
561
+ opSummaryDigest: isSet(object.opSummaryDigest) ? globalThis.String(object.opSummaryDigest) : "",
562
562
  issuanceFeeDiscount: isSet(object.issuanceFeeDiscount) ? globalThis.Number(object.issuanceFeeDiscount) : 0,
563
563
  verificationFeeDiscount: isSet(object.verificationFeeDiscount)
564
564
  ? globalThis.Number(object.verificationFeeDiscount)
@@ -579,6 +579,7 @@ exports.Permission = {
579
579
  vsOperatorAuthzSpendPeriod: isSet(object.vsOperatorAuthzSpendPeriod)
580
580
  ? duration_1.Duration.fromJSON(object.vsOperatorAuthzSpendPeriod)
581
581
  : undefined,
582
+ corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
582
583
  };
583
584
  },
584
585
  toJSON(message) {
@@ -590,15 +591,12 @@ exports.Permission = {
590
591
  if (message.schemaId !== 0) {
591
592
  obj.schemaId = Math.round(message.schemaId);
592
593
  }
593
- if (message.type !== 0) {
594
- obj.type = permissionTypeToJSON(message.type);
594
+ if (message.role !== 0) {
595
+ obj.role = participantRoleToJSON(message.role);
595
596
  }
596
597
  if (message.did !== "") {
597
598
  obj.did = message.did;
598
599
  }
599
- if (message.corporation !== "") {
600
- obj.corporation = message.corporation;
601
- }
602
600
  if (message.created !== undefined) {
603
601
  obj.created = message.created.toISOString();
604
602
  }
@@ -641,29 +639,29 @@ exports.Permission = {
641
639
  if (message.revoked !== undefined) {
642
640
  obj.revoked = message.revoked.toISOString();
643
641
  }
644
- if (message.validatorPermId !== 0) {
645
- obj.validatorPermId = Math.round(message.validatorPermId);
642
+ if (message.validatorParticipantId !== 0) {
643
+ obj.validatorParticipantId = Math.round(message.validatorParticipantId);
646
644
  }
647
- if (message.vpState !== 0) {
648
- obj.vpState = validationStateToJSON(message.vpState);
645
+ if (message.opState !== 0) {
646
+ obj.opState = onboardingStateToJSON(message.opState);
649
647
  }
650
- if (message.vpExp !== undefined) {
651
- obj.vpExp = message.vpExp.toISOString();
648
+ if (message.opExp !== undefined) {
649
+ obj.opExp = message.opExp.toISOString();
652
650
  }
653
- if (message.vpLastStateChange !== undefined) {
654
- obj.vpLastStateChange = message.vpLastStateChange.toISOString();
651
+ if (message.opLastStateChange !== undefined) {
652
+ obj.opLastStateChange = message.opLastStateChange.toISOString();
655
653
  }
656
- if (message.vpValidatorDeposit !== 0) {
657
- obj.vpValidatorDeposit = Math.round(message.vpValidatorDeposit);
654
+ if (message.opValidatorDeposit !== 0) {
655
+ obj.opValidatorDeposit = Math.round(message.opValidatorDeposit);
658
656
  }
659
- if (message.vpCurrentFees !== 0) {
660
- obj.vpCurrentFees = Math.round(message.vpCurrentFees);
657
+ if (message.opCurrentFees !== 0) {
658
+ obj.opCurrentFees = Math.round(message.opCurrentFees);
661
659
  }
662
- if (message.vpCurrentDeposit !== 0) {
663
- obj.vpCurrentDeposit = Math.round(message.vpCurrentDeposit);
660
+ if (message.opCurrentDeposit !== 0) {
661
+ obj.opCurrentDeposit = Math.round(message.opCurrentDeposit);
664
662
  }
665
- if (message.vpSummaryDigest !== "") {
666
- obj.vpSummaryDigest = message.vpSummaryDigest;
663
+ if (message.opSummaryDigest !== "") {
664
+ obj.opSummaryDigest = message.opSummaryDigest;
667
665
  }
668
666
  if (message.issuanceFeeDiscount !== 0) {
669
667
  obj.issuanceFeeDiscount = Math.round(message.issuanceFeeDiscount);
@@ -689,95 +687,87 @@ exports.Permission = {
689
687
  if (message.vsOperatorAuthzSpendPeriod !== undefined) {
690
688
  obj.vsOperatorAuthzSpendPeriod = duration_1.Duration.toJSON(message.vsOperatorAuthzSpendPeriod);
691
689
  }
690
+ if (message.corporationId !== 0) {
691
+ obj.corporationId = Math.round(message.corporationId);
692
+ }
692
693
  return obj;
693
694
  },
694
695
  create(base) {
695
- return exports.Permission.fromPartial(base !== null && base !== void 0 ? base : {});
696
+ return exports.Participant.fromPartial(base !== null && base !== void 0 ? base : {});
696
697
  },
697
698
  fromPartial(object) {
698
699
  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();
700
+ const message = createBaseParticipant();
700
701
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
701
702
  message.schemaId = (_b = object.schemaId) !== null && _b !== void 0 ? _b : 0;
702
- message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
703
+ message.role = (_c = object.role) !== null && _c !== void 0 ? _c : 0;
703
704
  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))) || [];
705
+ message.created = (_e = object.created) !== null && _e !== void 0 ? _e : undefined;
706
+ message.adjusted = (_f = object.adjusted) !== null && _f !== void 0 ? _f : undefined;
707
+ message.slashed = (_g = object.slashed) !== null && _g !== void 0 ? _g : undefined;
708
+ message.repaid = (_h = object.repaid) !== null && _h !== void 0 ? _h : undefined;
709
+ message.effectiveFrom = (_j = object.effectiveFrom) !== null && _j !== void 0 ? _j : undefined;
710
+ message.effectiveUntil = (_k = object.effectiveUntil) !== null && _k !== void 0 ? _k : undefined;
711
+ message.modified = (_l = object.modified) !== null && _l !== void 0 ? _l : undefined;
712
+ message.validationFees = (_m = object.validationFees) !== null && _m !== void 0 ? _m : 0;
713
+ message.issuanceFees = (_o = object.issuanceFees) !== null && _o !== void 0 ? _o : 0;
714
+ message.verificationFees = (_p = object.verificationFees) !== null && _p !== void 0 ? _p : 0;
715
+ message.deposit = (_q = object.deposit) !== null && _q !== void 0 ? _q : 0;
716
+ message.slashedDeposit = (_r = object.slashedDeposit) !== null && _r !== void 0 ? _r : 0;
717
+ message.repaidDeposit = (_s = object.repaidDeposit) !== null && _s !== void 0 ? _s : 0;
718
+ message.revoked = (_t = object.revoked) !== null && _t !== void 0 ? _t : undefined;
719
+ message.validatorParticipantId = (_u = object.validatorParticipantId) !== null && _u !== void 0 ? _u : 0;
720
+ message.opState = (_v = object.opState) !== null && _v !== void 0 ? _v : 0;
721
+ message.opExp = (_w = object.opExp) !== null && _w !== void 0 ? _w : undefined;
722
+ message.opLastStateChange = (_x = object.opLastStateChange) !== null && _x !== void 0 ? _x : undefined;
723
+ message.opValidatorDeposit = (_y = object.opValidatorDeposit) !== null && _y !== void 0 ? _y : 0;
724
+ message.opCurrentFees = (_z = object.opCurrentFees) !== null && _z !== void 0 ? _z : 0;
725
+ message.opCurrentDeposit = (_0 = object.opCurrentDeposit) !== null && _0 !== void 0 ? _0 : 0;
726
+ message.opSummaryDigest = (_1 = object.opSummaryDigest) !== null && _1 !== void 0 ? _1 : "";
727
+ message.issuanceFeeDiscount = (_2 = object.issuanceFeeDiscount) !== null && _2 !== void 0 ? _2 : 0;
728
+ message.verificationFeeDiscount = (_3 = object.verificationFeeDiscount) !== null && _3 !== void 0 ? _3 : 0;
729
+ message.vsOperator = (_4 = object.vsOperator) !== null && _4 !== void 0 ? _4 : "";
730
+ message.vsOperatorAuthzEnabled = (_5 = object.vsOperatorAuthzEnabled) !== null && _5 !== void 0 ? _5 : false;
731
+ message.vsOperatorAuthzSpendLimit = ((_6 = object.vsOperatorAuthzSpendLimit) === null || _6 === void 0 ? void 0 : _6.map((e) => coin_1.Coin.fromPartial(e))) || [];
732
+ message.vsOperatorAuthzWithFeegrant = (_7 = object.vsOperatorAuthzWithFeegrant) !== null && _7 !== void 0 ? _7 : false;
733
+ message.vsOperatorAuthzFeeSpendLimit = ((_8 = object.vsOperatorAuthzFeeSpendLimit) === null || _8 === void 0 ? void 0 : _8.map((e) => coin_1.Coin.fromPartial(e))) || [];
734
734
  message.vsOperatorAuthzSpendPeriod =
735
735
  (object.vsOperatorAuthzSpendPeriod !== undefined && object.vsOperatorAuthzSpendPeriod !== null)
736
736
  ? duration_1.Duration.fromPartial(object.vsOperatorAuthzSpendPeriod)
737
737
  : undefined;
738
+ message.corporationId = (_9 = object.corporationId) !== null && _9 !== void 0 ? _9 : 0;
738
739
  return message;
739
740
  },
740
741
  };
741
- function createBasePermissionSession() {
742
- return {
743
- id: "",
744
- corporation: "",
745
- vsOperator: "",
746
- agentPermId: 0,
747
- sessionRecords: [],
748
- created: undefined,
749
- modified: undefined,
750
- };
742
+ function createBaseParticipantSession() {
743
+ return { id: "", corporationId: 0, vsOperator: "", created: undefined, modified: undefined, sessionRecords: [] };
751
744
  }
752
- exports.PermissionSession = {
745
+ exports.ParticipantSession = {
753
746
  encode(message, writer = _m0.Writer.create()) {
754
747
  if (message.id !== "") {
755
748
  writer.uint32(10).string(message.id);
756
749
  }
757
- if (message.corporation !== "") {
758
- writer.uint32(18).string(message.corporation);
750
+ if (message.corporationId !== 0) {
751
+ writer.uint32(16).uint64(message.corporationId);
759
752
  }
760
753
  if (message.vsOperator !== "") {
761
754
  writer.uint32(26).string(message.vsOperator);
762
755
  }
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
756
  if (message.created !== undefined) {
770
- timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(50).fork()).ldelim();
757
+ timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(34).fork()).ldelim();
771
758
  }
772
759
  if (message.modified !== undefined) {
773
- timestamp_1.Timestamp.encode(toTimestamp(message.modified), writer.uint32(58).fork()).ldelim();
760
+ timestamp_1.Timestamp.encode(toTimestamp(message.modified), writer.uint32(42).fork()).ldelim();
761
+ }
762
+ for (const v of message.sessionRecords) {
763
+ exports.ParticipantSessionRecord.encode(v, writer.uint32(50).fork()).ldelim();
774
764
  }
775
765
  return writer;
776
766
  },
777
767
  decode(input, length) {
778
768
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
779
769
  let end = length === undefined ? reader.len : reader.pos + length;
780
- const message = createBasePermissionSession();
770
+ const message = createBaseParticipantSession();
781
771
  while (reader.pos < end) {
782
772
  const tag = reader.uint32();
783
773
  switch (tag >>> 3) {
@@ -788,10 +778,10 @@ exports.PermissionSession = {
788
778
  message.id = reader.string();
789
779
  continue;
790
780
  case 2:
791
- if (tag !== 18) {
781
+ if (tag !== 16) {
792
782
  break;
793
783
  }
794
- message.corporation = reader.string();
784
+ message.corporationId = longToNumber(reader.uint64());
795
785
  continue;
796
786
  case 3:
797
787
  if (tag !== 26) {
@@ -800,28 +790,22 @@ exports.PermissionSession = {
800
790
  message.vsOperator = reader.string();
801
791
  continue;
802
792
  case 4:
803
- if (tag !== 32) {
793
+ if (tag !== 34) {
804
794
  break;
805
795
  }
806
- message.agentPermId = longToNumber(reader.uint64());
796
+ message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
807
797
  continue;
808
798
  case 5:
809
799
  if (tag !== 42) {
810
800
  break;
811
801
  }
812
- message.sessionRecords.push(exports.PermissionSessionRecord.decode(reader, reader.uint32()));
802
+ message.modified = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
813
803
  continue;
814
804
  case 6:
815
805
  if (tag !== 50) {
816
806
  break;
817
807
  }
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()));
808
+ message.sessionRecords.push(exports.ParticipantSessionRecord.decode(reader, reader.uint32()));
825
809
  continue;
826
810
  }
827
811
  if ((tag & 7) === 4 || tag === 0) {
@@ -834,14 +818,13 @@ exports.PermissionSession = {
834
818
  fromJSON(object) {
835
819
  return {
836
820
  id: isSet(object.id) ? globalThis.String(object.id) : "",
837
- corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
821
+ corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
838
822
  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
823
  created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
844
824
  modified: isSet(object.modified) ? fromJsonTimestamp(object.modified) : undefined,
825
+ sessionRecords: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sessionRecords)
826
+ ? object.sessionRecords.map((e) => exports.ParticipantSessionRecord.fromJSON(e))
827
+ : [],
845
828
  };
846
829
  },
847
830
  toJSON(message) {
@@ -850,91 +833,112 @@ exports.PermissionSession = {
850
833
  if (message.id !== "") {
851
834
  obj.id = message.id;
852
835
  }
853
- if (message.corporation !== "") {
854
- obj.corporation = message.corporation;
836
+ if (message.corporationId !== 0) {
837
+ obj.corporationId = Math.round(message.corporationId);
855
838
  }
856
839
  if (message.vsOperator !== "") {
857
840
  obj.vsOperator = message.vsOperator;
858
841
  }
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
842
  if (message.created !== undefined) {
866
843
  obj.created = message.created.toISOString();
867
844
  }
868
845
  if (message.modified !== undefined) {
869
846
  obj.modified = message.modified.toISOString();
870
847
  }
848
+ if ((_a = message.sessionRecords) === null || _a === void 0 ? void 0 : _a.length) {
849
+ obj.sessionRecords = message.sessionRecords.map((e) => exports.ParticipantSessionRecord.toJSON(e));
850
+ }
871
851
  return obj;
872
852
  },
873
853
  create(base) {
874
- return exports.PermissionSession.fromPartial(base !== null && base !== void 0 ? base : {});
854
+ return exports.ParticipantSession.fromPartial(base !== null && base !== void 0 ? base : {});
875
855
  },
876
856
  fromPartial(object) {
877
- var _a, _b, _c, _d, _e, _f, _g;
878
- const message = createBasePermissionSession();
857
+ var _a, _b, _c, _d, _e, _f;
858
+ const message = createBaseParticipantSession();
879
859
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
880
- message.corporation = (_b = object.corporation) !== null && _b !== void 0 ? _b : "";
860
+ message.corporationId = (_b = object.corporationId) !== null && _b !== void 0 ? _b : 0;
881
861
  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;
862
+ message.created = (_d = object.created) !== null && _d !== void 0 ? _d : undefined;
863
+ message.modified = (_e = object.modified) !== null && _e !== void 0 ? _e : undefined;
864
+ message.sessionRecords = ((_f = object.sessionRecords) === null || _f === void 0 ? void 0 : _f.map((e) => exports.ParticipantSessionRecord.fromPartial(e))) || [];
886
865
  return message;
887
866
  },
888
867
  };
889
- function createBasePermissionSessionRecord() {
890
- return { created: undefined, issuerPermId: 0, verifierPermId: 0, walletAgentPermId: 0 };
868
+ function createBaseParticipantSessionRecord() {
869
+ return {
870
+ id: 0,
871
+ created: undefined,
872
+ issuerParticipantId: 0,
873
+ verifierParticipantId: 0,
874
+ walletAgentParticipantId: 0,
875
+ agentParticipantId: 0,
876
+ };
891
877
  }
892
- exports.PermissionSessionRecord = {
878
+ exports.ParticipantSessionRecord = {
893
879
  encode(message, writer = _m0.Writer.create()) {
880
+ if (message.id !== 0) {
881
+ writer.uint32(8).uint64(message.id);
882
+ }
894
883
  if (message.created !== undefined) {
895
- timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(10).fork()).ldelim();
884
+ timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(18).fork()).ldelim();
885
+ }
886
+ if (message.issuerParticipantId !== 0) {
887
+ writer.uint32(24).uint64(message.issuerParticipantId);
896
888
  }
897
- if (message.issuerPermId !== 0) {
898
- writer.uint32(16).uint64(message.issuerPermId);
889
+ if (message.verifierParticipantId !== 0) {
890
+ writer.uint32(32).uint64(message.verifierParticipantId);
899
891
  }
900
- if (message.verifierPermId !== 0) {
901
- writer.uint32(24).uint64(message.verifierPermId);
892
+ if (message.walletAgentParticipantId !== 0) {
893
+ writer.uint32(40).uint64(message.walletAgentParticipantId);
902
894
  }
903
- if (message.walletAgentPermId !== 0) {
904
- writer.uint32(32).uint64(message.walletAgentPermId);
895
+ if (message.agentParticipantId !== 0) {
896
+ writer.uint32(48).uint64(message.agentParticipantId);
905
897
  }
906
898
  return writer;
907
899
  },
908
900
  decode(input, length) {
909
901
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
910
902
  let end = length === undefined ? reader.len : reader.pos + length;
911
- const message = createBasePermissionSessionRecord();
903
+ const message = createBaseParticipantSessionRecord();
912
904
  while (reader.pos < end) {
913
905
  const tag = reader.uint32();
914
906
  switch (tag >>> 3) {
915
907
  case 1:
916
- if (tag !== 10) {
908
+ if (tag !== 8) {
917
909
  break;
918
910
  }
919
- message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
911
+ message.id = longToNumber(reader.uint64());
920
912
  continue;
921
913
  case 2:
922
- if (tag !== 16) {
914
+ if (tag !== 18) {
923
915
  break;
924
916
  }
925
- message.issuerPermId = longToNumber(reader.uint64());
917
+ message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
926
918
  continue;
927
919
  case 3:
928
920
  if (tag !== 24) {
929
921
  break;
930
922
  }
931
- message.verifierPermId = longToNumber(reader.uint64());
923
+ message.issuerParticipantId = longToNumber(reader.uint64());
932
924
  continue;
933
925
  case 4:
934
926
  if (tag !== 32) {
935
927
  break;
936
928
  }
937
- message.walletAgentPermId = longToNumber(reader.uint64());
929
+ message.verifierParticipantId = longToNumber(reader.uint64());
930
+ continue;
931
+ case 5:
932
+ if (tag !== 40) {
933
+ break;
934
+ }
935
+ message.walletAgentParticipantId = longToNumber(reader.uint64());
936
+ continue;
937
+ case 6:
938
+ if (tag !== 48) {
939
+ break;
940
+ }
941
+ message.agentParticipantId = longToNumber(reader.uint64());
938
942
  continue;
939
943
  }
940
944
  if ((tag & 7) === 4 || tag === 0) {
@@ -946,38 +950,50 @@ exports.PermissionSessionRecord = {
946
950
  },
947
951
  fromJSON(object) {
948
952
  return {
953
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
949
954
  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,
955
+ issuerParticipantId: isSet(object.issuerParticipantId) ? globalThis.Number(object.issuerParticipantId) : 0,
956
+ verifierParticipantId: isSet(object.verifierParticipantId) ? globalThis.Number(object.verifierParticipantId) : 0,
957
+ walletAgentParticipantId: isSet(object.walletAgentParticipantId)
958
+ ? globalThis.Number(object.walletAgentParticipantId)
959
+ : 0,
960
+ agentParticipantId: isSet(object.agentParticipantId) ? globalThis.Number(object.agentParticipantId) : 0,
953
961
  };
954
962
  },
955
963
  toJSON(message) {
956
964
  const obj = {};
965
+ if (message.id !== 0) {
966
+ obj.id = Math.round(message.id);
967
+ }
957
968
  if (message.created !== undefined) {
958
969
  obj.created = message.created.toISOString();
959
970
  }
960
- if (message.issuerPermId !== 0) {
961
- obj.issuerPermId = Math.round(message.issuerPermId);
971
+ if (message.issuerParticipantId !== 0) {
972
+ obj.issuerParticipantId = Math.round(message.issuerParticipantId);
962
973
  }
963
- if (message.verifierPermId !== 0) {
964
- obj.verifierPermId = Math.round(message.verifierPermId);
974
+ if (message.verifierParticipantId !== 0) {
975
+ obj.verifierParticipantId = Math.round(message.verifierParticipantId);
965
976
  }
966
- if (message.walletAgentPermId !== 0) {
967
- obj.walletAgentPermId = Math.round(message.walletAgentPermId);
977
+ if (message.walletAgentParticipantId !== 0) {
978
+ obj.walletAgentParticipantId = Math.round(message.walletAgentParticipantId);
979
+ }
980
+ if (message.agentParticipantId !== 0) {
981
+ obj.agentParticipantId = Math.round(message.agentParticipantId);
968
982
  }
969
983
  return obj;
970
984
  },
971
985
  create(base) {
972
- return exports.PermissionSessionRecord.fromPartial(base !== null && base !== void 0 ? base : {});
986
+ return exports.ParticipantSessionRecord.fromPartial(base !== null && base !== void 0 ? base : {});
973
987
  },
974
988
  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;
989
+ var _a, _b, _c, _d, _e, _f;
990
+ const message = createBaseParticipantSessionRecord();
991
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
992
+ message.created = (_b = object.created) !== null && _b !== void 0 ? _b : undefined;
993
+ message.issuerParticipantId = (_c = object.issuerParticipantId) !== null && _c !== void 0 ? _c : 0;
994
+ message.verifierParticipantId = (_d = object.verifierParticipantId) !== null && _d !== void 0 ? _d : 0;
995
+ message.walletAgentParticipantId = (_e = object.walletAgentParticipantId) !== null && _e !== void 0 ? _e : 0;
996
+ message.agentParticipantId = (_f = object.agentParticipantId) !== null && _f !== void 0 ? _f : 0;
981
997
  return message;
982
998
  },
983
999
  };