@verana-labs/verana-types 0.10.1-dev.3 → 0.10.1-dev.5

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.
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.MsgRevokeOperatorAuthorizationAminoConverter = exports.MsgGrantOperatorAuthorizationAminoConverter = exports.MsgCreateOrUpdatePermissionSessionAminoConverter = exports.MsgCancelPermissionVPLastRequestAminoConverter = exports.MsgSetPermissionVPToValidatedAminoConverter = exports.MsgRenewPermissionVPAminoConverter = exports.MsgStartPermissionVPAminoConverter = exports.MsgRevokePermissionAminoConverter = exports.MsgExtendPermissionAminoConverter = exports.MsgCreatePermissionAminoConverter = exports.MsgCreateRootPermissionAminoConverter = exports.MsgReclaimTrustDepositYieldAminoConverter = exports.MsgReclaimTrustDepositAminoConverter = exports.MsgArchiveCredentialSchemaAminoConverter = exports.MsgUpdateCredentialSchemaAminoConverter = exports.MsgCreateCredentialSchemaAminoConverter = exports.MsgRemoveDIDAminoConverter = exports.MsgTouchDIDAminoConverter = exports.MsgRenewDIDAminoConverter = exports.MsgAddDIDAminoConverter = exports.MsgIncreaseActiveGovernanceFrameworkVersionAminoConverter = exports.MsgAddGovernanceFrameworkDocumentAminoConverter = exports.MsgArchiveTrustRegistryAminoConverter = exports.MsgUpdateTrustRegistryAminoConverter = exports.MsgCreateTrustRegistryAminoConverter = void 0;
12
+ exports.MsgRevokeOperatorAuthorizationAminoConverter = exports.MsgGrantOperatorAuthorizationAminoConverter = exports.MsgCreatePermissionAminoConverter = exports.MsgRepayPermissionSlashedTrustDepositAminoConverter = exports.MsgSlashPermissionTrustDepositAminoConverter = exports.MsgCreateOrUpdatePermissionSessionAminoConverter = exports.MsgCancelPermissionVPLastRequestAminoConverter = exports.MsgSetPermissionVPToValidatedAminoConverter = exports.MsgRenewPermissionVPAminoConverter = exports.MsgStartPermissionVPAminoConverter = exports.MsgRevokePermissionAminoConverter = exports.MsgAdjustPermissionAminoConverter = exports.MsgCreateRootPermissionAminoConverter = exports.MsgReclaimTrustDepositYieldAminoConverter = exports.MsgReclaimTrustDepositAminoConverter = exports.MsgArchiveCredentialSchemaAminoConverter = exports.MsgUpdateCredentialSchemaAminoConverter = exports.MsgCreateCredentialSchemaAminoConverter = exports.MsgRemoveDIDAminoConverter = exports.MsgTouchDIDAminoConverter = exports.MsgRenewDIDAminoConverter = exports.MsgAddDIDAminoConverter = exports.MsgIncreaseActiveGovernanceFrameworkVersionAminoConverter = exports.MsgAddGovernanceFrameworkDocumentAminoConverter = exports.MsgArchiveTrustRegistryAminoConverter = exports.MsgUpdateTrustRegistryAminoConverter = exports.MsgCreateTrustRegistryAminoConverter = void 0;
13
13
  const long_1 = __importDefault(require("long"));
14
14
  const tx_1 = require("../codec/verana/tr/v1/tx");
15
15
  const tx_2 = require("../codec/verana/de/v1/tx");
@@ -333,10 +333,10 @@ exports.MsgCreateRootPermissionAminoConverter = {
333
333
  toAmino: (m) => {
334
334
  var _a, _b, _c;
335
335
  return clean({
336
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
336
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
337
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
337
338
  schema_id: u64ToStr(m.schemaId),
338
- did: (_b = m.did) !== null && _b !== void 0 ? _b : '',
339
- country: (_c = m.country) !== null && _c !== void 0 ? _c : '',
339
+ did: (_c = m.did) !== null && _c !== void 0 ? _c : '',
340
340
  effective_from: dateToAmino(m.effectiveFrom),
341
341
  effective_until: dateToAmino(m.effectiveUntil),
342
342
  validation_fees: u64ToStr(m.validationFees),
@@ -347,10 +347,10 @@ exports.MsgCreateRootPermissionAminoConverter = {
347
347
  fromAmino: (a) => {
348
348
  var _a, _b, _c;
349
349
  return tx_6.MsgCreateRootPermission.fromPartial({
350
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
350
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
351
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
351
352
  schemaId: strToU64(a.schema_id) != null ? Number(strToU64(a.schema_id).toString()) : 0,
352
- did: (_b = a.did) !== null && _b !== void 0 ? _b : '',
353
- country: (_c = a.country) !== null && _c !== void 0 ? _c : '',
353
+ did: (_c = a.did) !== null && _c !== void 0 ? _c : '',
354
354
  effectiveFrom: dateFromAmino(a.effective_from),
355
355
  effectiveUntil: dateFromAmino(a.effective_until),
356
356
  validationFees: strToU64(a.validation_fees) != null ? Number(strToU64(a.validation_fees).toString()) : 0,
@@ -359,51 +359,22 @@ exports.MsgCreateRootPermissionAminoConverter = {
359
359
  });
360
360
  },
361
361
  };
362
- exports.MsgCreatePermissionAminoConverter = {
363
- aminoType: '/verana.perm.v1.MsgCreatePermission',
364
- toAmino: (m) => {
365
- var _a, _b, _c, _d;
366
- return clean({
367
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
368
- schema_id: u64ToStr(m.schemaId),
369
- type: (_b = m.type) !== null && _b !== void 0 ? _b : types_1.PermissionType.UNSPECIFIED,
370
- did: (_c = m.did) !== null && _c !== void 0 ? _c : '',
371
- country: (_d = m.country) !== null && _d !== void 0 ? _d : '',
372
- effective_from: dateToAmino(m.effectiveFrom),
373
- effective_until: dateToAmino(m.effectiveUntil),
374
- verification_fees: u64ToStrIfNonZero(m.verificationFees),
375
- validation_fees: u64ToStrIfNonZero(m.validationFees),
376
- });
377
- },
378
- fromAmino: (a) => {
379
- var _a, _b, _c, _d;
380
- return tx_6.MsgCreatePermission.fromPartial({
381
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
382
- schemaId: strToU64(a.schema_id) != null ? Number(strToU64(a.schema_id).toString()) : 0,
383
- type: (_b = a.type) !== null && _b !== void 0 ? _b : types_1.PermissionType.UNSPECIFIED,
384
- did: (_c = a.did) !== null && _c !== void 0 ? _c : '',
385
- country: (_d = a.country) !== null && _d !== void 0 ? _d : '',
386
- effectiveFrom: dateFromAmino(a.effective_from),
387
- effectiveUntil: dateFromAmino(a.effective_until),
388
- verificationFees: strToU64(a.verification_fees) != null ? Number(strToU64(a.verification_fees).toString()) : 0,
389
- validationFees: strToU64(a.validation_fees) != null ? Number(strToU64(a.validation_fees).toString()) : 0,
390
- });
391
- },
392
- };
393
- exports.MsgExtendPermissionAminoConverter = {
394
- aminoType: '/verana.perm.v1.MsgExtendPermission',
362
+ exports.MsgAdjustPermissionAminoConverter = {
363
+ aminoType: '/verana.perm.v1.MsgAdjustPermission',
395
364
  toAmino: (m) => {
396
- var _a;
365
+ var _a, _b;
397
366
  return clean({
398
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
367
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
368
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
399
369
  id: u64ToStr(m.id),
400
370
  effective_until: dateToAmino(m.effectiveUntil),
401
371
  });
402
372
  },
403
373
  fromAmino: (a) => {
404
- var _a;
405
- return tx_6.MsgExtendPermission.fromPartial({
406
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
374
+ var _a, _b;
375
+ return tx_6.MsgAdjustPermission.fromPartial({
376
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
377
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
407
378
  id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
408
379
  effectiveUntil: dateFromAmino(a.effective_until),
409
380
  });
@@ -412,16 +383,18 @@ exports.MsgExtendPermissionAminoConverter = {
412
383
  exports.MsgRevokePermissionAminoConverter = {
413
384
  aminoType: '/verana.perm.v1.MsgRevokePermission',
414
385
  toAmino: (m) => {
415
- var _a;
386
+ var _a, _b;
416
387
  return clean({
417
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
388
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
389
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
418
390
  id: u64ToStr(m.id),
419
391
  });
420
392
  },
421
393
  fromAmino: (a) => {
422
- var _a;
394
+ var _a, _b;
423
395
  return tx_6.MsgRevokePermission.fromPartial({
424
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
396
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
397
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
425
398
  id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
426
399
  });
427
400
  },
@@ -429,39 +402,59 @@ exports.MsgRevokePermissionAminoConverter = {
429
402
  exports.MsgStartPermissionVPAminoConverter = {
430
403
  aminoType: '/verana.perm.v1.MsgStartPermissionVP',
431
404
  toAmino: (m) => {
432
- var _a, _b, _c, _d;
405
+ var _a, _b, _c, _d, _e, _f, _g;
433
406
  return clean({
434
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
435
- type: (_b = m.type) !== null && _b !== void 0 ? _b : types_1.PermissionType.UNSPECIFIED,
407
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
408
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
409
+ type: (_c = m.type) !== null && _c !== void 0 ? _c : types_1.PermissionType.UNSPECIFIED,
436
410
  validator_perm_id: u64ToStr(m.validatorPermId),
437
- country: (_c = m.country) !== null && _c !== void 0 ? _c : '',
438
411
  did: (_d = m.did) !== null && _d !== void 0 ? _d : '',
412
+ validation_fees: m.validationFees ? { value: u64ToStr(m.validationFees.value) } : undefined,
413
+ issuance_fees: m.issuanceFees ? { value: u64ToStr(m.issuanceFees.value) } : undefined,
414
+ verification_fees: m.verificationFees ? { value: u64ToStr(m.verificationFees.value) } : undefined,
415
+ vs_operator: m.vsOperator || undefined,
416
+ vs_operator_authz_enabled: m.vsOperatorAuthzEnabled || undefined,
417
+ vs_operator_authz_spend_limit: (_e = m.vsOperatorAuthzSpendLimit) !== null && _e !== void 0 ? _e : [],
418
+ vs_operator_authz_with_feegrant: m.vsOperatorAuthzWithFeegrant || undefined,
419
+ vs_operator_authz_fee_spend_limit: (_f = m.vsOperatorAuthzFeeSpendLimit) !== null && _f !== void 0 ? _f : [],
420
+ vs_operator_authz_spend_period: (_g = m.vsOperatorAuthzSpendPeriod) !== null && _g !== void 0 ? _g : undefined,
439
421
  });
440
422
  },
441
423
  fromAmino: (a) => {
442
- var _a, _b, _c, _d;
424
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
443
425
  return tx_6.MsgStartPermissionVP.fromPartial({
444
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
445
- type: (_b = a.type) !== null && _b !== void 0 ? _b : types_1.PermissionType.UNSPECIFIED,
426
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
427
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
428
+ type: (_c = a.type) !== null && _c !== void 0 ? _c : types_1.PermissionType.UNSPECIFIED,
446
429
  validatorPermId: strToU64(a.validator_perm_id) != null ? Number(strToU64(a.validator_perm_id).toString()) : 0,
447
- country: (_c = a.country) !== null && _c !== void 0 ? _c : '',
448
430
  did: (_d = a.did) !== null && _d !== void 0 ? _d : '',
431
+ validationFees: a.validation_fees ? { value: Number(a.validation_fees.value) } : undefined,
432
+ issuanceFees: a.issuance_fees ? { value: Number(a.issuance_fees.value) } : undefined,
433
+ verificationFees: a.verification_fees ? { value: Number(a.verification_fees.value) } : undefined,
434
+ vsOperator: (_e = a.vs_operator) !== null && _e !== void 0 ? _e : '',
435
+ vsOperatorAuthzEnabled: (_f = a.vs_operator_authz_enabled) !== null && _f !== void 0 ? _f : false,
436
+ vsOperatorAuthzSpendLimit: (_g = a.vs_operator_authz_spend_limit) !== null && _g !== void 0 ? _g : [],
437
+ vsOperatorAuthzWithFeegrant: (_h = a.vs_operator_authz_with_feegrant) !== null && _h !== void 0 ? _h : false,
438
+ vsOperatorAuthzFeeSpendLimit: (_j = a.vs_operator_authz_fee_spend_limit) !== null && _j !== void 0 ? _j : [],
439
+ vsOperatorAuthzSpendPeriod: (_k = a.vs_operator_authz_spend_period) !== null && _k !== void 0 ? _k : undefined,
449
440
  });
450
441
  },
451
442
  };
452
443
  exports.MsgRenewPermissionVPAminoConverter = {
453
444
  aminoType: '/verana.perm.v1.MsgRenewPermissionVP',
454
445
  toAmino: (m) => {
455
- var _a;
446
+ var _a, _b;
456
447
  return clean({
457
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
448
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
449
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
458
450
  id: u64ToStr(m.id),
459
451
  });
460
452
  },
461
453
  fromAmino: (a) => {
462
- var _a;
454
+ var _a, _b;
463
455
  return tx_6.MsgRenewPermissionVP.fromPartial({
464
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
456
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
457
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
465
458
  id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
466
459
  });
467
460
  },
@@ -471,43 +464,49 @@ exports.MsgSetPermissionVPToValidatedAminoConverter = {
471
464
  toAmino: (m) => {
472
465
  var _a, _b, _c;
473
466
  return clean({
474
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
467
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
468
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
475
469
  id: u64ToStr(m.id),
476
470
  effective_until: dateToAmino(m.effectiveUntil),
477
471
  validation_fees: u64ToStr(m.validationFees),
478
472
  issuance_fees: u64ToStr(m.issuanceFees),
479
473
  verification_fees: u64ToStr(m.verificationFees),
480
- country: (_b = m.country) !== null && _b !== void 0 ? _b : '',
481
474
  vp_summary_digest_sri: (_c = m.vpSummaryDigestSri) !== null && _c !== void 0 ? _c : '',
475
+ issuance_fee_discount: u64ToStr(m.issuanceFeeDiscount),
476
+ verification_fee_discount: u64ToStr(m.verificationFeeDiscount),
482
477
  });
483
478
  },
484
479
  fromAmino: (a) => {
485
480
  var _a, _b, _c;
486
481
  return tx_6.MsgSetPermissionVPToValidated.fromPartial({
487
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
482
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
483
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
488
484
  id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
489
485
  effectiveUntil: dateFromAmino(a.effective_until),
490
486
  validationFees: strToU64(a.validation_fees) != null ? Number(strToU64(a.validation_fees).toString()) : 0,
491
487
  issuanceFees: strToU64(a.issuance_fees) != null ? Number(strToU64(a.issuance_fees).toString()) : 0,
492
488
  verificationFees: strToU64(a.verification_fees) != null ? Number(strToU64(a.verification_fees).toString()) : 0,
493
- country: (_b = a.country) !== null && _b !== void 0 ? _b : '',
494
489
  vpSummaryDigestSri: (_c = a.vp_summary_digest_sri) !== null && _c !== void 0 ? _c : '',
490
+ issuanceFeeDiscount: strToU64(a.issuance_fee_discount) != null ? Number(strToU64(a.issuance_fee_discount).toString()) : 0,
491
+ verificationFeeDiscount: strToU64(a.verification_fee_discount) != null ? Number(strToU64(a.verification_fee_discount).toString()) : 0,
495
492
  });
496
493
  },
497
494
  };
498
495
  exports.MsgCancelPermissionVPLastRequestAminoConverter = {
499
496
  aminoType: '/verana.perm.v1.MsgCancelPermissionVPLastRequest',
500
497
  toAmino: (m) => {
501
- var _a;
498
+ var _a, _b;
502
499
  return clean({
503
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
500
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
501
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
504
502
  id: u64ToStr(m.id),
505
503
  });
506
504
  },
507
505
  fromAmino: (a) => {
508
- var _a;
506
+ var _a, _b;
509
507
  return tx_6.MsgCancelPermissionVPLastRequest.fromPartial({
510
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
508
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
509
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
511
510
  id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
512
511
  });
513
512
  },
@@ -515,25 +514,112 @@ exports.MsgCancelPermissionVPLastRequestAminoConverter = {
515
514
  exports.MsgCreateOrUpdatePermissionSessionAminoConverter = {
516
515
  aminoType: '/verana.perm.v1.MsgCreateOrUpdatePermissionSession',
517
516
  toAmino: (m) => {
518
- var _a, _b;
517
+ var _a, _b, _c, _d;
519
518
  return clean({
520
- creator: (_a = m.creator) !== null && _a !== void 0 ? _a : '',
521
- id: (_b = m.id) !== null && _b !== void 0 ? _b : '',
519
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
520
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
521
+ id: (_c = m.id) !== null && _c !== void 0 ? _c : '',
522
522
  issuer_perm_id: u64ToStr(m.issuerPermId),
523
523
  verifier_perm_id: u64ToStr(m.verifierPermId),
524
524
  agent_perm_id: u64ToStr(m.agentPermId),
525
525
  wallet_agent_perm_id: u64ToStr(m.walletAgentPermId),
526
+ digest: (_d = m.digest) !== null && _d !== void 0 ? _d : undefined,
526
527
  });
527
528
  },
528
529
  fromAmino: (a) => {
529
- var _a, _b;
530
+ var _a, _b, _c, _d;
530
531
  return tx_6.MsgCreateOrUpdatePermissionSession.fromPartial({
531
- creator: (_a = a.creator) !== null && _a !== void 0 ? _a : '',
532
- id: (_b = a.id) !== null && _b !== void 0 ? _b : '',
532
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
533
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
534
+ id: (_c = a.id) !== null && _c !== void 0 ? _c : '',
533
535
  issuerPermId: strToU64(a.issuer_perm_id) != null ? Number(strToU64(a.issuer_perm_id).toString()) : 0,
534
536
  verifierPermId: strToU64(a.verifier_perm_id) != null ? Number(strToU64(a.verifier_perm_id).toString()) : 0,
535
537
  agentPermId: strToU64(a.agent_perm_id) != null ? Number(strToU64(a.agent_perm_id).toString()) : 0,
536
538
  walletAgentPermId: strToU64(a.wallet_agent_perm_id) != null ? Number(strToU64(a.wallet_agent_perm_id).toString()) : 0,
539
+ digest: (_d = a.digest) !== null && _d !== void 0 ? _d : '',
540
+ });
541
+ },
542
+ };
543
+ exports.MsgSlashPermissionTrustDepositAminoConverter = {
544
+ aminoType: '/verana.perm.v1.MsgSlashPermissionTrustDeposit',
545
+ toAmino: (m) => {
546
+ var _a, _b;
547
+ return clean({
548
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
549
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
550
+ id: u64ToStr(m.id),
551
+ amount: u64ToStr(m.amount),
552
+ });
553
+ },
554
+ fromAmino: (a) => {
555
+ var _a, _b;
556
+ return tx_6.MsgSlashPermissionTrustDeposit.fromPartial({
557
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
558
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
559
+ id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
560
+ amount: strToU64(a.amount) != null ? Number(strToU64(a.amount).toString()) : 0,
561
+ });
562
+ },
563
+ };
564
+ exports.MsgRepayPermissionSlashedTrustDepositAminoConverter = {
565
+ aminoType: '/verana.perm.v1.MsgRepayPermissionSlashedTrustDeposit',
566
+ toAmino: (m) => {
567
+ var _a, _b;
568
+ return clean({
569
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
570
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
571
+ id: u64ToStr(m.id),
572
+ });
573
+ },
574
+ fromAmino: (a) => {
575
+ var _a, _b;
576
+ return tx_6.MsgRepayPermissionSlashedTrustDeposit.fromPartial({
577
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
578
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
579
+ id: strToU64(a.id) != null ? Number(strToU64(a.id).toString()) : 0,
580
+ });
581
+ },
582
+ };
583
+ exports.MsgCreatePermissionAminoConverter = {
584
+ aminoType: '/verana.perm.v1.MsgCreatePermission',
585
+ toAmino: (m) => {
586
+ var _a, _b, _c, _d, _e, _f, _g;
587
+ return clean({
588
+ authority: (_a = m.authority) !== null && _a !== void 0 ? _a : '',
589
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : '',
590
+ type: (_c = m.type) !== null && _c !== void 0 ? _c : 0,
591
+ validator_perm_id: u64ToStr(m.validatorPermId),
592
+ did: (_d = m.did) !== null && _d !== void 0 ? _d : '',
593
+ effective_from: dateToAmino(m.effectiveFrom),
594
+ effective_until: dateToAmino(m.effectiveUntil),
595
+ verification_fees: u64ToStrIfNonZero(m.verificationFees),
596
+ validation_fees: u64ToStrIfNonZero(m.validationFees),
597
+ vs_operator: m.vsOperator || undefined,
598
+ vs_operator_authz_enabled: m.vsOperatorAuthzEnabled || undefined,
599
+ vs_operator_authz_spend_limit: (_e = m.vsOperatorAuthzSpendLimit) !== null && _e !== void 0 ? _e : [],
600
+ vs_operator_authz_with_feegrant: m.vsOperatorAuthzWithFeegrant || undefined,
601
+ vs_operator_authz_fee_spend_limit: (_f = m.vsOperatorAuthzFeeSpendLimit) !== null && _f !== void 0 ? _f : [],
602
+ vs_operator_authz_spend_period: (_g = m.vsOperatorAuthzSpendPeriod) !== null && _g !== void 0 ? _g : undefined,
603
+ });
604
+ },
605
+ fromAmino: (a) => {
606
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
607
+ return tx_6.MsgCreatePermission.fromPartial({
608
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : '',
609
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : '',
610
+ type: (_c = a.type) !== null && _c !== void 0 ? _c : 0,
611
+ validatorPermId: strToU64(a.validator_perm_id) != null ? Number(strToU64(a.validator_perm_id).toString()) : 0,
612
+ did: (_d = a.did) !== null && _d !== void 0 ? _d : '',
613
+ effectiveFrom: dateFromAmino(a.effective_from),
614
+ effectiveUntil: dateFromAmino(a.effective_until),
615
+ verificationFees: strToU64(a.verification_fees) != null ? Number(strToU64(a.verification_fees).toString()) : 0,
616
+ validationFees: strToU64(a.validation_fees) != null ? Number(strToU64(a.validation_fees).toString()) : 0,
617
+ vsOperator: (_e = a.vs_operator) !== null && _e !== void 0 ? _e : '',
618
+ vsOperatorAuthzEnabled: (_f = a.vs_operator_authz_enabled) !== null && _f !== void 0 ? _f : false,
619
+ vsOperatorAuthzSpendLimit: (_g = a.vs_operator_authz_spend_limit) !== null && _g !== void 0 ? _g : [],
620
+ vsOperatorAuthzWithFeegrant: (_h = a.vs_operator_authz_with_feegrant) !== null && _h !== void 0 ? _h : false,
621
+ vsOperatorAuthzFeeSpendLimit: (_j = a.vs_operator_authz_fee_spend_limit) !== null && _j !== void 0 ? _j : [],
622
+ vsOperatorAuthzSpendPeriod: (_k = a.vs_operator_authz_spend_period) !== null && _k !== void 0 ? _k : undefined,
537
623
  });
538
624
  },
539
625
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verana-labs/verana-types",
3
- "version": "0.10.1-dev.3",
3
+ "version": "0.10.1-dev.5",
4
4
  "description": "Generated TypeScript protobuf codecs for the Verana blockchain.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "dist/index.js",