@verana-labs/verana-types 0.9.5 → 0.10.1-dev.10

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 (130) hide show
  1. package/README.md +1 -2
  2. package/dist/amino-converter/cs.d.ts +7 -88
  3. package/dist/amino-converter/cs.js +141 -70
  4. package/dist/amino-converter/de.d.ts +3 -0
  5. package/dist/amino-converter/de.js +53 -0
  6. package/dist/amino-converter/di.d.ts +2 -0
  7. package/dist/amino-converter/di.js +23 -0
  8. package/dist/amino-converter/perm.d.ts +12 -153
  9. package/dist/amino-converter/perm.js +299 -203
  10. package/dist/amino-converter/td.d.ts +2 -19
  11. package/dist/amino-converter/td.js +32 -35
  12. package/dist/amino-converter/tr.d.ts +6 -67
  13. package/dist/amino-converter/tr.js +89 -83
  14. package/dist/amino-converter/util/helpers.d.ts +16 -22
  15. package/dist/amino-converter/util/helpers.js +28 -33
  16. package/dist/amino-converter/xr.d.ts +4 -0
  17. package/dist/amino-converter/xr.js +74 -0
  18. package/dist/codec/cosmos/app/v1alpha1/module.d.ts +2 -3
  19. package/dist/codec/cosmos/app/v1alpha1/module.js +40 -15
  20. package/dist/codec/cosmos/base/query/v1beta1/pagination.d.ts +5 -6
  21. package/dist/codec/cosmos/base/query/v1beta1/pagination.js +75 -38
  22. package/dist/codec/cosmos/base/v1beta1/coin.d.ts +79 -0
  23. package/dist/codec/cosmos/base/v1beta1/coin.js +283 -0
  24. package/dist/codec/cosmos_proto/cosmos.d.ts +2 -3
  25. package/dist/codec/cosmos_proto/cosmos.js +38 -13
  26. package/dist/codec/google/api/http.d.ts +2 -3
  27. package/dist/codec/google/api/http.js +40 -15
  28. package/dist/codec/google/protobuf/descriptor.d.ts +11 -5
  29. package/dist/codec/google/protobuf/descriptor.js +156 -100
  30. package/dist/codec/google/protobuf/duration.d.ts +98 -0
  31. package/dist/codec/google/protobuf/duration.js +128 -0
  32. package/dist/codec/google/protobuf/timestamp.d.ts +12 -12
  33. package/dist/codec/google/protobuf/timestamp.js +58 -21
  34. package/dist/codec/verana/cs/module/module.d.ts +2 -3
  35. package/dist/codec/verana/cs/module/module.js +36 -11
  36. package/dist/codec/verana/cs/v1/genesis.d.ts +4 -5
  37. package/dist/codec/verana/cs/v1/genesis.js +57 -20
  38. package/dist/codec/verana/cs/v1/params.d.ts +3 -5
  39. package/dist/codec/verana/cs/v1/params.js +63 -47
  40. package/dist/codec/verana/cs/v1/query.d.ts +13 -10
  41. package/dist/codec/verana/cs/v1/query.js +164 -56
  42. package/dist/codec/verana/cs/v1/tx.d.ts +132 -24
  43. package/dist/codec/verana/cs/v1/tx.js +750 -137
  44. package/dist/codec/verana/cs/v1/types.d.ts +93 -23
  45. package/dist/codec/verana/cs/v1/types.js +560 -109
  46. package/dist/codec/verana/{dd/module → de/module/v1}/module.d.ts +7 -5
  47. package/dist/codec/verana/{dd/module → de/module/v1}/module.js +38 -13
  48. package/dist/codec/verana/de/v1/genesis.d.ts +36 -0
  49. package/dist/codec/verana/de/v1/genesis.js +178 -0
  50. package/dist/codec/verana/de/v1/params.d.ts +24 -0
  51. package/dist/codec/verana/de/v1/params.js +81 -0
  52. package/dist/codec/verana/de/v1/query.d.ts +132 -0
  53. package/dist/codec/verana/de/v1/query.js +440 -0
  54. package/dist/codec/verana/de/v1/tx.d.ts +192 -0
  55. package/dist/codec/verana/de/v1/tx.js +581 -0
  56. package/dist/codec/verana/de/v1/types.d.ts +133 -0
  57. package/dist/codec/verana/de/v1/types.js +554 -0
  58. package/dist/codec/verana/di/module/v1/module.d.ts +29 -0
  59. package/dist/codec/verana/di/module/v1/module.js +98 -0
  60. package/dist/codec/verana/{dd → di}/v1/genesis.d.ts +8 -8
  61. package/dist/codec/verana/di/v1/genesis.js +119 -0
  62. package/dist/codec/verana/di/v1/params.d.ts +24 -0
  63. package/dist/codec/verana/di/v1/params.js +81 -0
  64. package/dist/codec/verana/di/v1/query.d.ts +99 -0
  65. package/dist/codec/verana/di/v1/query.js +349 -0
  66. package/dist/codec/verana/di/v1/tx.d.ts +120 -0
  67. package/dist/codec/verana/di/v1/tx.js +409 -0
  68. package/dist/codec/verana/perm/module/module.d.ts +2 -3
  69. package/dist/codec/verana/perm/module/module.js +36 -11
  70. package/dist/codec/verana/perm/v1/genesis.d.ts +4 -5
  71. package/dist/codec/verana/perm/v1/genesis.js +57 -20
  72. package/dist/codec/verana/perm/v1/params.d.ts +3 -4
  73. package/dist/codec/verana/perm/v1/params.js +58 -21
  74. package/dist/codec/verana/perm/v1/query.d.ts +12 -14
  75. package/dist/codec/verana/perm/v1/query.js +112 -94
  76. package/dist/codec/verana/perm/v1/tx.d.ts +149 -98
  77. package/dist/codec/verana/perm/v1/tx.js +940 -544
  78. package/dist/codec/verana/perm/v1/types.d.ts +60 -61
  79. package/dist/codec/verana/perm/v1/types.js +402 -366
  80. package/dist/codec/verana/td/module/module.d.ts +2 -3
  81. package/dist/codec/verana/td/module/module.js +36 -11
  82. package/dist/codec/verana/td/v1/genesis.d.ts +8 -7
  83. package/dist/codec/verana/td/v1/genesis.js +89 -40
  84. package/dist/codec/verana/td/v1/params.d.ts +4 -3
  85. package/dist/codec/verana/td/v1/params.js +54 -12
  86. package/dist/codec/verana/td/v1/query.d.ts +5 -6
  87. package/dist/codec/verana/td/v1/query.js +52 -27
  88. package/dist/codec/verana/td/v1/tx.d.ts +30 -45
  89. package/dist/codec/verana/td/v1/tx.js +154 -233
  90. package/dist/codec/verana/td/v1/types.d.ts +13 -16
  91. package/dist/codec/verana/td/v1/types.js +114 -103
  92. package/dist/codec/verana/tr/module/module.d.ts +2 -3
  93. package/dist/codec/verana/tr/module/module.js +36 -11
  94. package/dist/codec/verana/tr/v1/genesis.d.ts +4 -5
  95. package/dist/codec/verana/tr/v1/genesis.js +59 -20
  96. package/dist/codec/verana/tr/v1/params.d.ts +3 -5
  97. package/dist/codec/verana/tr/v1/params.js +57 -40
  98. package/dist/codec/verana/tr/v1/query.d.ts +7 -9
  99. package/dist/codec/verana/tr/v1/query.js +81 -45
  100. package/dist/codec/verana/tr/v1/tx.d.ts +66 -22
  101. package/dist/codec/verana/tr/v1/tx.js +271 -162
  102. package/dist/codec/verana/tr/v1/types.d.ts +23 -27
  103. package/dist/codec/verana/tr/v1/types.js +158 -156
  104. package/dist/codec/verana/xr/module/v1/module.d.ts +29 -0
  105. package/dist/codec/verana/xr/module/v1/module.js +98 -0
  106. package/dist/codec/verana/xr/v1/genesis.d.ts +32 -0
  107. package/dist/codec/verana/xr/v1/genesis.js +149 -0
  108. package/dist/codec/verana/{dd → xr}/v1/params.d.ts +6 -6
  109. package/dist/codec/verana/xr/v1/params.js +104 -0
  110. package/dist/codec/verana/xr/v1/query.d.ts +162 -0
  111. package/dist/codec/verana/xr/v1/query.js +775 -0
  112. package/dist/codec/verana/xr/v1/tx.d.ts +195 -0
  113. package/dist/codec/verana/xr/v1/tx.js +939 -0
  114. package/dist/helpers/aminoConverters.d.ts +8 -0
  115. package/dist/helpers/aminoConverters.js +24 -0
  116. package/dist/index.d.ts +3 -1
  117. package/dist/index.js +3 -1
  118. package/dist/signing.d.ts +38 -7
  119. package/dist/signing.js +45 -36
  120. package/package.json +4 -2
  121. package/dist/amino-converter/dd.d.ts +0 -17
  122. package/dist/amino-converter/dd.js +0 -65
  123. package/dist/codec/verana/dd/v1/genesis.js +0 -96
  124. package/dist/codec/verana/dd/v1/params.js +0 -98
  125. package/dist/codec/verana/dd/v1/query.d.ts +0 -109
  126. package/dist/codec/verana/dd/v1/query.js +0 -428
  127. package/dist/codec/verana/dd/v1/tx.d.ts +0 -174
  128. package/dist/codec/verana/dd/v1/tx.js +0 -611
  129. package/dist/codec/verana/dd/v1/types.d.ts +0 -31
  130. package/dist/codec/verana/dd/v1/types.js +0 -172
package/README.md CHANGED
@@ -48,7 +48,7 @@ npm run build # Build the package (emits dist/)
48
48
  ### What Gets Generated
49
49
 
50
50
  The generator creates TypeScript files for:
51
- - **Verana modules**: `tr`, `cs`, `dd`, `perm`, `td` (Trust Registry, Credential Schema, DID Directory, Permission, Trust Deposit)
51
+ - **Verana modules**: `tr`, `cs`, `dd`, `perm`, `td`, `de` (Trust Registry, Credential Schema, DID Directory, Permission, Trust Deposit, Delegation Engine)
52
52
  - **Cosmos SDK types**: Base types, queries, messages
53
53
  - **Google protobuf types**: Timestamps, durations, etc.
54
54
 
@@ -138,7 +138,6 @@ See `ts-proto/test/README.md` for complete examples.
138
138
 
139
139
  ## Publish
140
140
  1. Bump the version in `package.json` to match the chain tag you are releasing (e.g. `v0.7.0` -> `0.7.0`).
141
- The release workflow stamps the published tarball version from the Git tag, but the checked-in `package.json` should still be kept aligned with the latest intended release version so local `npm pack` output and repo metadata stay honest.
142
141
  2. Regenerate and build as above.
143
142
  3. `npm publish` (or `npm pack` and upload the tarball to the GitHub release assets).
144
143
 
@@ -1,88 +1,7 @@
1
- import { MsgCreateCredentialSchema, MsgUpdateCredentialSchema, MsgArchiveCredentialSchema } from '../codec/verana/cs/v1/tx';
2
- /**
3
- * Amino converter for MsgCreateCredentialSchema
4
- */
5
- export declare const MsgCreateCredentialSchemaAminoConverter: {
6
- aminoType: string;
7
- toAmino: (msg: MsgCreateCredentialSchema) => {
8
- creator: string;
9
- tr_id: string | undefined;
10
- json_schema: string;
11
- issuer_grantor_validation_validity_period: {
12
- value?: undefined;
13
- } | {
14
- value: number;
15
- } | undefined;
16
- verifier_grantor_validation_validity_period: {
17
- value?: undefined;
18
- } | {
19
- value: number;
20
- } | undefined;
21
- issuer_validation_validity_period: {
22
- value?: undefined;
23
- } | {
24
- value: number;
25
- } | undefined;
26
- verifier_validation_validity_period: {
27
- value?: undefined;
28
- } | {
29
- value: number;
30
- } | undefined;
31
- holder_validation_validity_period: {
32
- value?: undefined;
33
- } | {
34
- value: number;
35
- } | undefined;
36
- issuer_perm_management_mode: number | undefined;
37
- verifier_perm_management_mode: number | undefined;
38
- };
39
- fromAmino: (value: any) => MsgCreateCredentialSchema;
40
- };
41
- /**
42
- * Amino converter for MsgUpdateCredentialSchema
43
- */
44
- export declare const MsgUpdateCredentialSchemaAminoConverter: {
45
- aminoType: string;
46
- toAmino: (msg: MsgUpdateCredentialSchema) => {
47
- creator: string;
48
- id: string | undefined;
49
- issuer_grantor_validation_validity_period: {
50
- value?: undefined;
51
- } | {
52
- value: number;
53
- } | undefined;
54
- verifier_grantor_validation_validity_period: {
55
- value?: undefined;
56
- } | {
57
- value: number;
58
- } | undefined;
59
- issuer_validation_validity_period: {
60
- value?: undefined;
61
- } | {
62
- value: number;
63
- } | undefined;
64
- verifier_validation_validity_period: {
65
- value?: undefined;
66
- } | {
67
- value: number;
68
- } | undefined;
69
- holder_validation_validity_period: {
70
- value?: undefined;
71
- } | {
72
- value: number;
73
- } | undefined;
74
- };
75
- fromAmino: (value: any) => MsgUpdateCredentialSchema;
76
- };
77
- /**
78
- * Amino converter for MsgArchiveCredentialSchema
79
- */
80
- export declare const MsgArchiveCredentialSchemaAminoConverter: {
81
- aminoType: string;
82
- toAmino: (msg: MsgArchiveCredentialSchema) => {
83
- creator: string;
84
- id: string | undefined;
85
- archive: boolean | undefined;
86
- };
87
- fromAmino: (value: any) => MsgArchiveCredentialSchema;
88
- };
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgCreateCredentialSchemaAminoConverter: AminoConverter;
3
+ export declare const MsgUpdateCredentialSchemaAminoConverter: AminoConverter;
4
+ export declare const MsgArchiveCredentialSchemaAminoConverter: AminoConverter;
5
+ export declare const MsgCreateSchemaAuthorizationPolicyAminoConverter: AminoConverter;
6
+ export declare const MsgIncreaseActiveSchemaAuthorizationPolicyVersionAminoConverter: AminoConverter;
7
+ export declare const MsgRevokeSchemaAuthorizationPolicyAminoConverter: AminoConverter;
@@ -1,98 +1,169 @@
1
1
  "use strict";
2
- 'use client';
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.MsgArchiveCredentialSchemaAminoConverter = exports.MsgUpdateCredentialSchemaAminoConverter = exports.MsgCreateCredentialSchemaAminoConverter = void 0;
3
+ exports.MsgRevokeSchemaAuthorizationPolicyAminoConverter = exports.MsgIncreaseActiveSchemaAuthorizationPolicyVersionAminoConverter = exports.MsgCreateSchemaAuthorizationPolicyAminoConverter = exports.MsgArchiveCredentialSchemaAminoConverter = exports.MsgUpdateCredentialSchemaAminoConverter = exports.MsgCreateCredentialSchemaAminoConverter = void 0;
5
4
  const tx_1 = require("../codec/verana/cs/v1/tx");
6
5
  const helpers_1 = require("./util/helpers");
7
- /**
8
- * Amino converter for MsgCreateCredentialSchema
9
- */
10
6
  exports.MsgCreateCredentialSchemaAminoConverter = {
11
- aminoType: '/verana.cs.v1.MsgCreateCredentialSchema',
12
- // Proto Amino JSON
13
- toAmino: (msg) => {
14
- var _a, _b;
7
+ aminoType: "verana/x/cs/MsgCreateCredentialSchema",
8
+ toAmino: (m) => {
9
+ var _a, _b, _c, _d, _e, _f;
15
10
  return (0, helpers_1.clean)({
16
- creator: (_a = msg.creator) !== null && _a !== void 0 ? _a : '',
17
- tr_id: (0, helpers_1.u64ToStr)(msg.trId), // uint64 -> string
18
- json_schema: (_b = msg.jsonSchema) !== null && _b !== void 0 ? _b : '',
19
- issuer_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.issuerGrantorValidationValidityPeriod),
20
- verifier_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.verifierGrantorValidationValidityPeriod),
21
- issuer_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.issuerValidationValidityPeriod),
22
- verifier_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.verifierValidationValidityPeriod),
23
- holder_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.holderValidationValidityPeriod),
24
- issuer_perm_management_mode: (0, helpers_1.u32ToAmino)(msg.issuerPermManagementMode), // uint32 -> number
25
- verifier_perm_management_mode: (0, helpers_1.u32ToAmino)(msg.verifierPermManagementMode), // uint32 -> number
11
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
12
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
13
+ tr_id: (0, helpers_1.u64ToStr)(m.trId),
14
+ json_schema: (_c = m.jsonSchema) !== null && _c !== void 0 ? _c : "",
15
+ issuer_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.issuerGrantorValidationValidityPeriod),
16
+ verifier_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.verifierGrantorValidationValidityPeriod),
17
+ issuer_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.issuerValidationValidityPeriod),
18
+ verifier_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.verifierValidationValidityPeriod),
19
+ holder_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.holderValidationValidityPeriod),
20
+ issuer_onboarding_mode: (0, helpers_1.u32ToAmino)(m.issuerOnboardingMode),
21
+ verifier_onboarding_mode: (0, helpers_1.u32ToAmino)(m.verifierOnboardingMode),
22
+ holder_onboarding_mode: (0, helpers_1.u32ToAmino)(m.holderOnboardingMode),
23
+ pricing_asset_type: (_d = m.pricingAssetType) !== null && _d !== void 0 ? _d : 0,
24
+ pricing_asset: (_e = m.pricingAsset) !== null && _e !== void 0 ? _e : "",
25
+ digest_algorithm: (_f = m.digestAlgorithm) !== null && _f !== void 0 ? _f : "",
26
26
  });
27
27
  },
28
- // Amino JSON → Proto
29
- fromAmino: (value) => {
30
- var _a, _b;
28
+ fromAmino: (a) => {
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
31
30
  return tx_1.MsgCreateCredentialSchema.fromPartial({
32
- creator: (_a = value.creator) !== null && _a !== void 0 ? _a : '',
33
- trId: (0, helpers_1.strToU64)(value.tr_id),
34
- jsonSchema: (_b = value.json_schema) !== null && _b !== void 0 ? _b : '',
35
- issuerGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.issuer_grantor_validation_validity_period),
36
- verifierGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.verifier_grantor_validation_validity_period),
37
- issuerValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.issuer_validation_validity_period),
38
- verifierValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.verifier_validation_validity_period),
39
- holderValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.holder_validation_validity_period),
40
- issuerPermManagementMode: (value.issuer_perm_management_mode),
41
- verifierPermManagementMode: (value.verifier_perm_management_mode),
31
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
32
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
33
+ trId: (0, helpers_1.strToU64)(a.tr_id) != null ? Number((0, helpers_1.strToU64)(a.tr_id).toString()) : 0,
34
+ jsonSchema: (_c = a.json_schema) !== null && _c !== void 0 ? _c : "",
35
+ issuerGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.issuer_grantor_validation_validity_period),
36
+ verifierGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.verifier_grantor_validation_validity_period),
37
+ issuerValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.issuer_validation_validity_period),
38
+ verifierValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.verifier_validation_validity_period),
39
+ holderValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.holder_validation_validity_period),
40
+ issuerOnboardingMode: (_d = a.issuer_onboarding_mode) !== null && _d !== void 0 ? _d : 0,
41
+ verifierOnboardingMode: (_e = a.verifier_onboarding_mode) !== null && _e !== void 0 ? _e : 0,
42
+ holderOnboardingMode: (_f = a.holder_onboarding_mode) !== null && _f !== void 0 ? _f : 0,
43
+ pricingAssetType: (_g = a.pricing_asset_type) !== null && _g !== void 0 ? _g : 0,
44
+ pricingAsset: (_h = a.pricing_asset) !== null && _h !== void 0 ? _h : "",
45
+ digestAlgorithm: (_j = a.digest_algorithm) !== null && _j !== void 0 ? _j : "",
42
46
  });
43
47
  },
44
48
  };
45
- /**
46
- * Amino converter for MsgUpdateCredentialSchema
47
- */
48
49
  exports.MsgUpdateCredentialSchemaAminoConverter = {
49
- aminoType: '/verana.cs.v1.MsgUpdateCredentialSchema',
50
- toAmino: (msg) => {
51
- var _a;
50
+ aminoType: "verana/x/cs/MsgUpdateCredentialSchema",
51
+ toAmino: (m) => {
52
+ var _a, _b;
52
53
  return (0, helpers_1.clean)({
53
- creator: (_a = msg.creator) !== null && _a !== void 0 ? _a : '',
54
- id: (0, helpers_1.u64ToStr)(msg.id),
55
- issuer_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.issuerGrantorValidationValidityPeriod),
56
- verifier_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.verifierGrantorValidationValidityPeriod),
57
- issuer_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.issuerValidationValidityPeriod),
58
- verifier_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.verifierValidationValidityPeriod),
59
- holder_validation_validity_period: (0, helpers_1.toOptU32Amino)(msg.holderValidationValidityPeriod),
54
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
55
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
56
+ id: (0, helpers_1.u64ToStr)(m.id),
57
+ issuer_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.issuerGrantorValidationValidityPeriod),
58
+ verifier_grantor_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.verifierGrantorValidationValidityPeriod),
59
+ issuer_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.issuerValidationValidityPeriod),
60
+ verifier_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.verifierValidationValidityPeriod),
61
+ holder_validation_validity_period: (0, helpers_1.toOptU32Amino)(m.holderValidationValidityPeriod),
60
62
  });
61
63
  },
62
- fromAmino: (value) => {
63
- var _a;
64
+ fromAmino: (a) => {
65
+ var _a, _b;
64
66
  return tx_1.MsgUpdateCredentialSchema.fromPartial({
65
- creator: (_a = value.creator) !== null && _a !== void 0 ? _a : '',
66
- id: (0, helpers_1.strToU64)(value.id),
67
- issuerGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.issuer_grantor_validation_validity_period),
68
- verifierGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.verifier_grantor_validation_validity_period),
69
- issuerValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.issuer_validation_validity_period),
70
- verifierValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.verifier_validation_validity_period),
71
- holderValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(value.holder_validation_validity_period),
67
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
68
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
69
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
70
+ issuerGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.issuer_grantor_validation_validity_period),
71
+ verifierGrantorValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.verifier_grantor_validation_validity_period),
72
+ issuerValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.issuer_validation_validity_period),
73
+ verifierValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.verifier_validation_validity_period),
74
+ holderValidationValidityPeriod: (0, helpers_1.fromOptU32Amino)(a.holder_validation_validity_period),
72
75
  });
73
76
  },
74
77
  };
75
- /**
76
- * Amino converter for MsgArchiveCredentialSchema
77
- */
78
78
  exports.MsgArchiveCredentialSchemaAminoConverter = {
79
- aminoType: '/verana.cs.v1.MsgArchiveCredentialSchema',
80
- // Proto Amino JSON
81
- toAmino: (msg) => {
82
- var _a;
83
- return (0, helpers_1.clean)({
84
- creator: (_a = msg.creator) !== null && _a !== void 0 ? _a : '',
85
- id: (0, helpers_1.u64ToStr)(msg.id),
86
- archive: msg.archive ? true : undefined, // omit if false
79
+ aminoType: "verana/x/cs/MsgArchiveCredentialSchema",
80
+ toAmino: (m) => {
81
+ var _a, _b, _c;
82
+ return ({
83
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
84
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
85
+ id: (0, helpers_1.u64ToStr)(m.id),
86
+ archive: (_c = m.archive) !== null && _c !== void 0 ? _c : false,
87
87
  });
88
88
  },
89
- // Amino JSON → Proto
90
- fromAmino: (value) => {
89
+ fromAmino: (a) => {
91
90
  var _a;
92
91
  return tx_1.MsgArchiveCredentialSchema.fromPartial({
93
- creator: value.creator,
94
- id: (0, helpers_1.strToU64)(value.id),
95
- archive: (_a = value.archive) !== null && _a !== void 0 ? _a : false,
92
+ corporation: a.corporation,
93
+ operator: a.operator,
94
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
95
+ archive: (_a = a.archive) !== null && _a !== void 0 ? _a : false,
96
+ });
97
+ },
98
+ };
99
+ exports.MsgCreateSchemaAuthorizationPolicyAminoConverter = {
100
+ aminoType: "verana/x/cs/MsgCreateSchemaAuthPolicy",
101
+ // [MOD-CS-MSG-5-1] Spec v4 draft 13: parameters are corporation, operator,
102
+ // schema_id, role, url, digest_sri. effective_from/until are set to null at creation.
103
+ toAmino: (m) => {
104
+ var _a, _b, _c, _d, _e;
105
+ return (0, helpers_1.clean)({
106
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
107
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
108
+ schema_id: (0, helpers_1.u64ToStr)(m.schemaId),
109
+ role: (_c = m.role) !== null && _c !== void 0 ? _c : 0,
110
+ url: (_d = m.url) !== null && _d !== void 0 ? _d : "",
111
+ digest_sri: (_e = m.digestSri) !== null && _e !== void 0 ? _e : "",
112
+ });
113
+ },
114
+ fromAmino: (a) => {
115
+ var _a, _b, _c, _d, _e;
116
+ return tx_1.MsgCreateSchemaAuthorizationPolicy.fromPartial({
117
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
118
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
119
+ schemaId: (0, helpers_1.strToU64)(a.schema_id) != null ? Number((0, helpers_1.strToU64)(a.schema_id).toString()) : 0,
120
+ role: (_c = a.role) !== null && _c !== void 0 ? _c : 0,
121
+ url: (_d = a.url) !== null && _d !== void 0 ? _d : "",
122
+ digestSri: (_e = a.digest_sri) !== null && _e !== void 0 ? _e : "",
123
+ });
124
+ },
125
+ };
126
+ exports.MsgIncreaseActiveSchemaAuthorizationPolicyVersionAminoConverter = {
127
+ aminoType: "verana/x/cs/MsgIncSchemaAuthPolicyVer",
128
+ toAmino: (m) => {
129
+ var _a, _b, _c;
130
+ return ({
131
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
132
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
133
+ schema_id: (0, helpers_1.u64ToStr)(m.schemaId),
134
+ role: (_c = m.role) !== null && _c !== void 0 ? _c : 0,
135
+ });
136
+ },
137
+ fromAmino: (a) => {
138
+ var _a, _b, _c;
139
+ return tx_1.MsgIncreaseActiveSchemaAuthorizationPolicyVersion.fromPartial({
140
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
141
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
142
+ schemaId: (0, helpers_1.strToU64)(a.schema_id) != null ? Number((0, helpers_1.strToU64)(a.schema_id).toString()) : 0,
143
+ role: (_c = a.role) !== null && _c !== void 0 ? _c : 0,
144
+ });
145
+ },
146
+ };
147
+ exports.MsgRevokeSchemaAuthorizationPolicyAminoConverter = {
148
+ aminoType: "verana/x/cs/MsgRevokeSchemaAuthPolicy",
149
+ toAmino: (m) => {
150
+ var _a, _b, _c, _d;
151
+ return ({
152
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
153
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
154
+ schema_id: (0, helpers_1.u64ToStr)(m.schemaId),
155
+ role: (_c = m.role) !== null && _c !== void 0 ? _c : 0,
156
+ version: (_d = m.version) !== null && _d !== void 0 ? _d : 0,
157
+ });
158
+ },
159
+ fromAmino: (a) => {
160
+ var _a, _b, _c, _d;
161
+ return tx_1.MsgRevokeSchemaAuthorizationPolicy.fromPartial({
162
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
163
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
164
+ schemaId: (0, helpers_1.strToU64)(a.schema_id) != null ? Number((0, helpers_1.strToU64)(a.schema_id).toString()) : 0,
165
+ role: (_c = a.role) !== null && _c !== void 0 ? _c : 0,
166
+ version: (_d = a.version) !== null && _d !== void 0 ? _d : 0,
96
167
  });
97
168
  },
98
169
  };
@@ -0,0 +1,3 @@
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgGrantOperatorAuthorizationAminoConverter: AminoConverter;
3
+ export declare const MsgRevokeOperatorAuthorizationAminoConverter: AminoConverter;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgRevokeOperatorAuthorizationAminoConverter = exports.MsgGrantOperatorAuthorizationAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/de/v1/tx");
5
+ const helpers_1 = require("./util/helpers");
6
+ exports.MsgGrantOperatorAuthorizationAminoConverter = {
7
+ aminoType: "verana/x/de/MsgGrantOpAuthorization",
8
+ toAmino: (m) => {
9
+ var _a, _b, _c, _d;
10
+ return (0, helpers_1.clean)({
11
+ corporation: m.corporation || undefined,
12
+ operator: m.operator || undefined,
13
+ grantee: m.grantee || undefined,
14
+ msg_types: ((_a = m.msgTypes) === null || _a === void 0 ? void 0 : _a.length) ? m.msgTypes : undefined,
15
+ expiration: (0, helpers_1.dateToIsoAmino)(m.expiration),
16
+ authz_spend_limit: ((_b = m.authzSpendLimit) === null || _b === void 0 ? void 0 : _b.length) ? m.authzSpendLimit : undefined,
17
+ authz_spend_limit_period: (0, helpers_1.durationToAmino)(m.authzSpendLimitPeriod),
18
+ with_feegrant: m.withFeegrant || undefined,
19
+ feegrant_spend_limit: ((_c = m.feegrantSpendLimit) === null || _c === void 0 ? void 0 : _c.length) ? m.feegrantSpendLimit : undefined,
20
+ feegrant_spend_limit_period: (0, helpers_1.durationToAmino)(m.feegrantSpendLimitPeriod),
21
+ fee_spend_limit: ((_d = m.feeSpendLimit) === null || _d === void 0 ? void 0 : _d.length) ? m.feeSpendLimit : undefined,
22
+ });
23
+ },
24
+ fromAmino: (a) => {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26
+ return tx_1.MsgGrantOperatorAuthorization.fromPartial({
27
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
28
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
29
+ grantee: (_c = a.grantee) !== null && _c !== void 0 ? _c : "",
30
+ msgTypes: (_d = a.msg_types) !== null && _d !== void 0 ? _d : [],
31
+ expiration: (0, helpers_1.isoToDate)(a.expiration),
32
+ authzSpendLimit: (_e = a.authz_spend_limit) !== null && _e !== void 0 ? _e : [],
33
+ authzSpendLimitPeriod: (0, helpers_1.aminoToDuration)(a.authz_spend_limit_period),
34
+ withFeegrant: (_f = a.with_feegrant) !== null && _f !== void 0 ? _f : false,
35
+ feegrantSpendLimit: (_g = a.feegrant_spend_limit) !== null && _g !== void 0 ? _g : [],
36
+ feegrantSpendLimitPeriod: (0, helpers_1.aminoToDuration)(a.feegrant_spend_limit_period),
37
+ feeSpendLimit: (_h = a.fee_spend_limit) !== null && _h !== void 0 ? _h : [],
38
+ });
39
+ },
40
+ };
41
+ exports.MsgRevokeOperatorAuthorizationAminoConverter = {
42
+ aminoType: "verana/x/de/MsgRevokeOpAuthorization",
43
+ toAmino: ({ corporation, operator, grantee }) => (0, helpers_1.clean)({
44
+ corporation: corporation || undefined,
45
+ operator: operator || undefined,
46
+ grantee: grantee || undefined,
47
+ }),
48
+ fromAmino: (value) => tx_1.MsgRevokeOperatorAuthorization.fromPartial({
49
+ corporation: value.corporation,
50
+ operator: value.operator,
51
+ grantee: value.grantee,
52
+ }),
53
+ };
@@ -0,0 +1,2 @@
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgStoreDigestAminoConverter: AminoConverter;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgStoreDigestAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/di/v1/tx");
5
+ const helpers_1 = require("./util/helpers");
6
+ exports.MsgStoreDigestAminoConverter = {
7
+ aminoType: "verana/x/di/MsgStoreDigest",
8
+ toAmino: (m) => (0, helpers_1.clean)({
9
+ authority: m.authority || undefined,
10
+ operator: m.operator || undefined,
11
+ digest: m.digest || undefined,
12
+ digest_algorithm: m.digestAlgorithm || undefined,
13
+ }),
14
+ fromAmino: (a) => {
15
+ var _a, _b, _c, _d;
16
+ return tx_1.MsgStoreDigest.fromPartial({
17
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
18
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
19
+ digest: (_c = a.digest) !== null && _c !== void 0 ? _c : "",
20
+ digestAlgorithm: (_d = a.digest_algorithm) !== null && _d !== void 0 ? _d : "",
21
+ });
22
+ },
23
+ };
@@ -1,153 +1,12 @@
1
- import { MsgStartPermissionVP, MsgRenewPermissionVP, MsgSetPermissionVPToValidated, MsgCancelPermissionVPLastRequest, MsgCreateRootPermission, MsgExtendPermission, MsgRevokePermission, MsgCreateOrUpdatePermissionSession, MsgSlashPermissionTrustDeposit, MsgRepayPermissionSlashedTrustDeposit, MsgCreatePermission } from '../codec/verana/perm/v1/tx';
2
- /**
3
- * Amino converter for MsgStartPermissionVP
4
- */
5
- export declare const MsgStartPermissionVPAminoConverter: {
6
- aminoType: string;
7
- toAmino: (msg: MsgStartPermissionVP) => {
8
- creator: string;
9
- type: import("../codec/verana/perm/v1/types").PermissionType;
10
- validator_perm_id: string | undefined;
11
- country: string;
12
- did: string;
13
- };
14
- fromAmino: (value: any) => MsgStartPermissionVP;
15
- };
16
- /**
17
- * Amino converter for MsgRenewPermissionVP
18
- */
19
- export declare const MsgRenewPermissionVPAminoConverter: {
20
- aminoType: string;
21
- toAmino: (msg: MsgRenewPermissionVP) => {
22
- creator: string;
23
- id: string | undefined;
24
- };
25
- fromAmino: (value: any) => MsgRenewPermissionVP;
26
- };
27
- /**
28
- * Amino converter for MsgSetPermissionVPToValidated
29
- */
30
- export declare const MsgSetPermissionVPToValidatedAminoConverter: {
31
- aminoType: string;
32
- toAmino: (msg: MsgSetPermissionVPToValidated) => {
33
- creator: string;
34
- id: string | undefined;
35
- effective_until: string | undefined;
36
- validation_fees: string | undefined;
37
- issuance_fees: string | undefined;
38
- verification_fees: string | undefined;
39
- country: string;
40
- vp_summary_digest_sri: string;
41
- issuance_fee_discount: string | undefined;
42
- verification_fee_discount: string | undefined;
43
- };
44
- fromAmino: (value: any) => MsgSetPermissionVPToValidated;
45
- };
46
- /**
47
- * Amino converter for MsgCancelPermissionVPLastRequest
48
- */
49
- export declare const MsgCancelPermissionVPLastRequestAminoConverter: {
50
- aminoType: string;
51
- toAmino: (msg: MsgCancelPermissionVPLastRequest) => {
52
- creator: string;
53
- id: string | undefined;
54
- };
55
- fromAmino: (value: any) => MsgCancelPermissionVPLastRequest;
56
- };
57
- /**
58
- * Amino converter for MsgCreateRootPermission
59
- */
60
- export declare const MsgCreateRootPermissionAminoConverter: {
61
- aminoType: string;
62
- toAmino: (msg: MsgCreateRootPermission) => {
63
- creator: string;
64
- schema_id: string | undefined;
65
- did: string;
66
- country: string;
67
- effective_from: string | undefined;
68
- effective_until: string | undefined;
69
- validation_fees: string | undefined;
70
- issuance_fees: string | undefined;
71
- verification_fees: string | undefined;
72
- };
73
- fromAmino: (value: any) => MsgCreateRootPermission;
74
- };
75
- /**
76
- * Amino converter for MsgExtendPermission
77
- */
78
- export declare const MsgExtendPermissionAminoConverter: {
79
- aminoType: string;
80
- toAmino: (msg: MsgExtendPermission) => {
81
- creator: string;
82
- id: string | undefined;
83
- effective_until: string | undefined;
84
- };
85
- fromAmino: (value: any) => MsgExtendPermission;
86
- };
87
- /**
88
- * Amino converter for MsgRevokePermission
89
- */
90
- export declare const MsgRevokePermissionAminoConverter: {
91
- aminoType: string;
92
- toAmino: (msg: MsgRevokePermission) => {
93
- creator: string;
94
- id: string | undefined;
95
- };
96
- fromAmino: (value: any) => MsgRevokePermission;
97
- };
98
- /**
99
- * Amino converter for MsgCreateOrUpdatePermissionSession
100
- */
101
- export declare const MsgCreateOrUpdatePermissionSessionAminoConverter: {
102
- aminoType: string;
103
- toAmino: (msg: MsgCreateOrUpdatePermissionSession) => {
104
- creator: string;
105
- id: string;
106
- issuer_perm_id: string | undefined;
107
- verifier_perm_id: string | undefined;
108
- agent_perm_id: string | undefined;
109
- wallet_agent_perm_id: string | undefined;
110
- };
111
- fromAmino: (value: any) => MsgCreateOrUpdatePermissionSession;
112
- };
113
- /**
114
- * Amino converter for MsgSlashPermissionTrustDeposit
115
- */
116
- export declare const MsgSlashPermissionTrustDepositAminoConverter: {
117
- aminoType: string;
118
- toAmino: (msg: MsgSlashPermissionTrustDeposit) => {
119
- creator: string;
120
- id: string | undefined;
121
- amount: string | undefined;
122
- };
123
- fromAmino: (value: any) => MsgSlashPermissionTrustDeposit;
124
- };
125
- /**
126
- * Amino converter for MsgRepayPermissionSlashedTrustDeposit
127
- */
128
- export declare const MsgRepayPermissionSlashedTrustDepositAminoConverter: {
129
- aminoType: string;
130
- toAmino: (msg: MsgRepayPermissionSlashedTrustDeposit) => {
131
- creator: string;
132
- id: string | undefined;
133
- };
134
- fromAmino: (value: any) => MsgRepayPermissionSlashedTrustDeposit;
135
- };
136
- /**
137
- * Amino converter for MsgCreatePermission
138
- */
139
- export declare const MsgCreatePermissionAminoConverter: {
140
- aminoType: string;
141
- toAmino: (msg: MsgCreatePermission) => {
142
- creator: string;
143
- schema_id: string | undefined;
144
- type: import("../codec/verana/perm/v1/types").PermissionType;
145
- did: string;
146
- country: string;
147
- effective_from: string | undefined;
148
- effective_until: string | undefined;
149
- verification_fees: string | undefined;
150
- validation_fees: string | undefined;
151
- };
152
- fromAmino: (value: any) => MsgCreatePermission;
153
- };
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgCreateRootPermissionAminoConverter: AminoConverter;
3
+ export declare const MsgAdjustPermissionAminoConverter: AminoConverter;
4
+ export declare const MsgRevokePermissionAminoConverter: AminoConverter;
5
+ export declare const MsgStartPermissionVPAminoConverter: AminoConverter;
6
+ export declare const MsgRenewPermissionVPAminoConverter: AminoConverter;
7
+ export declare const MsgSetPermissionVPToValidatedAminoConverter: AminoConverter;
8
+ export declare const MsgCancelPermissionVPLastRequestAminoConverter: AminoConverter;
9
+ export declare const MsgCreateOrUpdatePermissionSessionAminoConverter: AminoConverter;
10
+ export declare const MsgSlashPermissionTrustDepositAminoConverter: AminoConverter;
11
+ export declare const MsgRepayPermissionSlashedTrustDepositAminoConverter: AminoConverter;
12
+ export declare const MsgSelfCreatePermissionAminoConverter: AminoConverter;