@verana-labs/verana-types 0.10.0 → 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 (89) hide show
  1. package/README.md +1 -1
  2. package/dist/amino-converter/cs.d.ts +7 -0
  3. package/dist/amino-converter/cs.js +169 -0
  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 -0
  9. package/dist/amino-converter/perm.js +318 -0
  10. package/dist/amino-converter/td.d.ts +4 -0
  11. package/dist/amino-converter/td.js +45 -0
  12. package/dist/amino-converter/tr.d.ts +6 -0
  13. package/dist/amino-converter/tr.js +107 -0
  14. package/dist/amino-converter/util/helpers.d.ts +30 -0
  15. package/dist/amino-converter/util/helpers.js +88 -0
  16. package/dist/amino-converter/xr.d.ts +4 -0
  17. package/dist/amino-converter/xr.js +74 -0
  18. package/dist/codec/cosmos/base/v1beta1/coin.d.ts +1 -1
  19. package/dist/codec/google/protobuf/descriptor.d.ts +5 -0
  20. package/dist/codec/google/protobuf/descriptor.js +16 -2
  21. package/dist/codec/google/protobuf/timestamp.d.ts +3 -3
  22. package/dist/codec/verana/cs/v1/query.d.ts +4 -3
  23. package/dist/codec/verana/cs/v1/query.js +36 -19
  24. package/dist/codec/verana/cs/v1/tx.d.ts +106 -11
  25. package/dist/codec/verana/cs/v1/tx.js +529 -45
  26. package/dist/codec/verana/cs/v1/types.d.ts +69 -14
  27. package/dist/codec/verana/cs/v1/types.js +392 -55
  28. package/dist/codec/verana/de/v1/genesis.d.ts +9 -0
  29. package/dist/codec/verana/de/v1/genesis.js +80 -2
  30. package/dist/codec/verana/de/v1/query.d.ts +41 -3
  31. package/dist/codec/verana/de/v1/query.js +153 -9
  32. package/dist/codec/verana/de/v1/tx.d.ts +27 -10
  33. package/dist/codec/verana/de/v1/tx.js +35 -18
  34. package/dist/codec/verana/de/v1/types.d.ts +42 -4
  35. package/dist/codec/verana/de/v1/types.js +113 -17
  36. package/dist/codec/verana/{dd/module → di/module/v1}/module.d.ts +5 -2
  37. package/dist/codec/verana/{dd/module → di/module/v1}/module.js +2 -2
  38. package/dist/codec/verana/{dd → di}/v1/genesis.d.ts +5 -4
  39. package/dist/codec/verana/{dd → di}/v1/genesis.js +11 -13
  40. package/dist/codec/verana/di/v1/params.d.ts +24 -0
  41. package/dist/codec/verana/di/v1/params.js +81 -0
  42. package/dist/codec/verana/di/v1/query.d.ts +99 -0
  43. package/dist/codec/verana/{dd → di}/v1/query.js +65 -166
  44. package/dist/codec/verana/di/v1/tx.d.ts +120 -0
  45. package/dist/codec/verana/di/v1/tx.js +409 -0
  46. package/dist/codec/verana/perm/v1/query.d.ts +0 -1
  47. package/dist/codec/verana/perm/v1/query.js +3 -17
  48. package/dist/codec/verana/perm/v1/tx.d.ts +111 -59
  49. package/dist/codec/verana/perm/v1/tx.js +676 -273
  50. package/dist/codec/verana/perm/v1/types.d.ts +30 -30
  51. package/dist/codec/verana/perm/v1/types.js +241 -208
  52. package/dist/codec/verana/td/v1/genesis.d.ts +4 -2
  53. package/dist/codec/verana/td/v1/genesis.js +31 -17
  54. package/dist/codec/verana/td/v1/params.d.ts +2 -0
  55. package/dist/codec/verana/td/v1/params.js +18 -1
  56. package/dist/codec/verana/td/v1/query.d.ts +1 -1
  57. package/dist/codec/verana/td/v1/query.js +8 -8
  58. package/dist/codec/verana/td/v1/tx.d.ts +26 -40
  59. package/dist/codec/verana/td/v1/tx.js +78 -188
  60. package/dist/codec/verana/td/v1/types.d.ts +5 -7
  61. package/dist/codec/verana/td/v1/types.js +32 -47
  62. package/dist/codec/verana/tr/v1/query.d.ts +1 -2
  63. package/dist/codec/verana/tr/v1/query.js +8 -8
  64. package/dist/codec/verana/tr/v1/tx.d.ts +32 -32
  65. package/dist/codec/verana/tr/v1/tx.js +89 -89
  66. package/dist/codec/verana/tr/v1/types.d.ts +2 -5
  67. package/dist/codec/verana/tr/v1/types.js +25 -55
  68. package/dist/codec/verana/xr/module/v1/module.d.ts +29 -0
  69. package/dist/codec/verana/xr/module/v1/module.js +98 -0
  70. package/dist/codec/verana/xr/v1/genesis.d.ts +32 -0
  71. package/dist/codec/verana/xr/v1/genesis.js +149 -0
  72. package/dist/codec/verana/{dd → xr}/v1/params.d.ts +4 -3
  73. package/dist/codec/verana/{dd → xr}/v1/params.js +16 -44
  74. package/dist/codec/verana/xr/v1/query.d.ts +162 -0
  75. package/dist/codec/verana/xr/v1/query.js +775 -0
  76. package/dist/codec/verana/xr/v1/tx.d.ts +195 -0
  77. package/dist/codec/verana/xr/v1/tx.js +939 -0
  78. package/dist/helpers/aminoConverters.d.ts +8 -32
  79. package/dist/helpers/aminoConverters.js +21 -589
  80. package/dist/index.d.ts +9 -1
  81. package/dist/index.js +9 -1
  82. package/dist/signing.d.ts +65 -0
  83. package/dist/signing.js +121 -0
  84. package/package.json +31 -5
  85. package/dist/codec/verana/dd/v1/query.d.ts +0 -108
  86. package/dist/codec/verana/dd/v1/tx.d.ts +0 -173
  87. package/dist/codec/verana/dd/v1/tx.js +0 -636
  88. package/dist/codec/verana/dd/v1/types.d.ts +0 -30
  89. package/dist/codec/verana/dd/v1/types.js +0 -206
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
 
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgRevokeSchemaAuthorizationPolicyAminoConverter = exports.MsgIncreaseActiveSchemaAuthorizationPolicyVersionAminoConverter = exports.MsgCreateSchemaAuthorizationPolicyAminoConverter = exports.MsgArchiveCredentialSchemaAminoConverter = exports.MsgUpdateCredentialSchemaAminoConverter = exports.MsgCreateCredentialSchemaAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/cs/v1/tx");
5
+ const helpers_1 = require("./util/helpers");
6
+ exports.MsgCreateCredentialSchemaAminoConverter = {
7
+ aminoType: "verana/x/cs/MsgCreateCredentialSchema",
8
+ toAmino: (m) => {
9
+ var _a, _b, _c, _d, _e, _f;
10
+ return (0, helpers_1.clean)({
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
+ });
27
+ },
28
+ fromAmino: (a) => {
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
30
+ return tx_1.MsgCreateCredentialSchema.fromPartial({
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 : "",
46
+ });
47
+ },
48
+ };
49
+ exports.MsgUpdateCredentialSchemaAminoConverter = {
50
+ aminoType: "verana/x/cs/MsgUpdateCredentialSchema",
51
+ toAmino: (m) => {
52
+ var _a, _b;
53
+ return (0, helpers_1.clean)({
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),
62
+ });
63
+ },
64
+ fromAmino: (a) => {
65
+ var _a, _b;
66
+ return tx_1.MsgUpdateCredentialSchema.fromPartial({
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),
75
+ });
76
+ },
77
+ };
78
+ exports.MsgArchiveCredentialSchemaAminoConverter = {
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
+ });
88
+ },
89
+ fromAmino: (a) => {
90
+ var _a;
91
+ return tx_1.MsgArchiveCredentialSchema.fromPartial({
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,
167
+ });
168
+ },
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
+ };
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,318 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgSelfCreatePermissionAminoConverter = exports.MsgRepayPermissionSlashedTrustDepositAminoConverter = exports.MsgSlashPermissionTrustDepositAminoConverter = exports.MsgCreateOrUpdatePermissionSessionAminoConverter = exports.MsgCancelPermissionVPLastRequestAminoConverter = exports.MsgSetPermissionVPToValidatedAminoConverter = exports.MsgRenewPermissionVPAminoConverter = exports.MsgStartPermissionVPAminoConverter = exports.MsgRevokePermissionAminoConverter = exports.MsgAdjustPermissionAminoConverter = exports.MsgCreateRootPermissionAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/perm/v1/tx");
5
+ const types_1 = require("../codec/verana/perm/v1/types");
6
+ const helpers_1 = require("./util/helpers");
7
+ exports.MsgCreateRootPermissionAminoConverter = {
8
+ aminoType: "verana/x/perm/MsgCreateRootPermission",
9
+ // [MOD-PERM-MSG-7-1] spec v4 draft 13 mandates permission_type and vs_operator.
10
+ toAmino: (m) => {
11
+ var _a, _b, _c, _d, _e;
12
+ return (0, helpers_1.clean)({
13
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
14
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
15
+ schema_id: (0, helpers_1.u64ToStr)(m.schemaId),
16
+ did: (_c = m.did) !== null && _c !== void 0 ? _c : "",
17
+ effective_from: (0, helpers_1.dateToIsoAmino)(m.effectiveFrom),
18
+ effective_until: (0, helpers_1.dateToIsoAmino)(m.effectiveUntil),
19
+ validation_fees: (0, helpers_1.u64ToStr)(m.validationFees),
20
+ issuance_fees: (0, helpers_1.u64ToStr)(m.issuanceFees),
21
+ verification_fees: (0, helpers_1.u64ToStr)(m.verificationFees),
22
+ permission_type: (_d = m.permissionType) !== null && _d !== void 0 ? _d : 0,
23
+ vs_operator: (_e = m.vsOperator) !== null && _e !== void 0 ? _e : "",
24
+ });
25
+ },
26
+ fromAmino: (a) => {
27
+ var _a, _b, _c, _d, _e;
28
+ return tx_1.MsgCreateRootPermission.fromPartial({
29
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
30
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
31
+ schemaId: (0, helpers_1.strToU64)(a.schema_id) != null ? Number((0, helpers_1.strToU64)(a.schema_id).toString()) : 0,
32
+ did: (_c = a.did) !== null && _c !== void 0 ? _c : "",
33
+ effectiveFrom: (0, helpers_1.isoToDate)(a.effective_from),
34
+ effectiveUntil: (0, helpers_1.isoToDate)(a.effective_until),
35
+ validationFees: (0, helpers_1.strToU64)(a.validation_fees) != null ? Number((0, helpers_1.strToU64)(a.validation_fees).toString()) : 0,
36
+ issuanceFees: (0, helpers_1.strToU64)(a.issuance_fees) != null ? Number((0, helpers_1.strToU64)(a.issuance_fees).toString()) : 0,
37
+ verificationFees: (0, helpers_1.strToU64)(a.verification_fees) != null ? Number((0, helpers_1.strToU64)(a.verification_fees).toString()) : 0,
38
+ permissionType: (_d = a.permission_type) !== null && _d !== void 0 ? _d : 0,
39
+ vsOperator: (_e = a.vs_operator) !== null && _e !== void 0 ? _e : "",
40
+ });
41
+ },
42
+ };
43
+ exports.MsgAdjustPermissionAminoConverter = {
44
+ aminoType: "verana/x/perm/MsgAdjustPermission",
45
+ toAmino: (m) => {
46
+ var _a, _b;
47
+ return (0, helpers_1.clean)({
48
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
49
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
50
+ id: (0, helpers_1.u64ToStr)(m.id),
51
+ effective_until: (0, helpers_1.dateToIsoAmino)(m.effectiveUntil),
52
+ });
53
+ },
54
+ fromAmino: (a) => {
55
+ var _a, _b;
56
+ return tx_1.MsgAdjustPermission.fromPartial({
57
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
58
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
59
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
60
+ effectiveUntil: (0, helpers_1.isoToDate)(a.effective_until),
61
+ });
62
+ },
63
+ };
64
+ exports.MsgRevokePermissionAminoConverter = {
65
+ aminoType: "verana/x/perm/MsgRevokePermission",
66
+ toAmino: (m) => {
67
+ var _a, _b;
68
+ return (0, helpers_1.clean)({
69
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
70
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
71
+ id: (0, helpers_1.u64ToStr)(m.id),
72
+ });
73
+ },
74
+ fromAmino: (a) => {
75
+ var _a, _b;
76
+ return tx_1.MsgRevokePermission.fromPartial({
77
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
78
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
79
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
80
+ });
81
+ },
82
+ };
83
+ exports.MsgStartPermissionVPAminoConverter = {
84
+ aminoType: "verana/x/perm/MsgStartPermissionVP",
85
+ toAmino: (m) => {
86
+ var _a, _b, _c, _d, _e, _f;
87
+ return (0, helpers_1.clean)({
88
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
89
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
90
+ type: (_c = m.type) !== null && _c !== void 0 ? _c : types_1.PermissionType.UNSPECIFIED,
91
+ validator_perm_id: (0, helpers_1.u64ToStr)(m.validatorPermId),
92
+ did: (_d = m.did) !== null && _d !== void 0 ? _d : "",
93
+ validation_fees: m.validationFees ? { value: (0, helpers_1.u64ToStr)(m.validationFees.value) } : undefined,
94
+ issuance_fees: m.issuanceFees ? { value: (0, helpers_1.u64ToStr)(m.issuanceFees.value) } : undefined,
95
+ verification_fees: m.verificationFees ? { value: (0, helpers_1.u64ToStr)(m.verificationFees.value) } : undefined,
96
+ vs_operator: m.vsOperator || undefined,
97
+ vs_operator_authz_enabled: m.vsOperatorAuthzEnabled || undefined,
98
+ vs_operator_authz_spend_limit: (_e = m.vsOperatorAuthzSpendLimit) !== null && _e !== void 0 ? _e : [],
99
+ vs_operator_authz_with_feegrant: m.vsOperatorAuthzWithFeegrant || undefined,
100
+ vs_operator_authz_fee_spend_limit: (_f = m.vsOperatorAuthzFeeSpendLimit) !== null && _f !== void 0 ? _f : [],
101
+ vs_operator_authz_spend_period: (0, helpers_1.durationToAmino)(m.vsOperatorAuthzSpendPeriod),
102
+ });
103
+ },
104
+ fromAmino: (a) => {
105
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
106
+ return tx_1.MsgStartPermissionVP.fromPartial({
107
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
108
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
109
+ type: (_c = a.type) !== null && _c !== void 0 ? _c : types_1.PermissionType.UNSPECIFIED,
110
+ validatorPermId: (0, helpers_1.strToU64)(a.validator_perm_id) != null ? Number((0, helpers_1.strToU64)(a.validator_perm_id).toString()) : 0,
111
+ did: (_d = a.did) !== null && _d !== void 0 ? _d : "",
112
+ validationFees: a.validation_fees ? { value: Number((_e = a.validation_fees.value) !== null && _e !== void 0 ? _e : a.validation_fees) } : undefined,
113
+ issuanceFees: a.issuance_fees ? { value: Number((_f = a.issuance_fees.value) !== null && _f !== void 0 ? _f : a.issuance_fees) } : undefined,
114
+ verificationFees: a.verification_fees ? { value: Number((_g = a.verification_fees.value) !== null && _g !== void 0 ? _g : a.verification_fees) } : undefined,
115
+ vsOperator: (_h = a.vs_operator) !== null && _h !== void 0 ? _h : "",
116
+ vsOperatorAuthzEnabled: (_j = a.vs_operator_authz_enabled) !== null && _j !== void 0 ? _j : false,
117
+ vsOperatorAuthzSpendLimit: (_k = a.vs_operator_authz_spend_limit) !== null && _k !== void 0 ? _k : [],
118
+ vsOperatorAuthzWithFeegrant: (_l = a.vs_operator_authz_with_feegrant) !== null && _l !== void 0 ? _l : false,
119
+ vsOperatorAuthzFeeSpendLimit: (_m = a.vs_operator_authz_fee_spend_limit) !== null && _m !== void 0 ? _m : [],
120
+ vsOperatorAuthzSpendPeriod: (0, helpers_1.aminoToDuration)(a.vs_operator_authz_spend_period),
121
+ });
122
+ },
123
+ };
124
+ exports.MsgRenewPermissionVPAminoConverter = {
125
+ aminoType: "verana/x/perm/MsgRenewPermissionVP",
126
+ // [MOD-PERM-MSG-2-1] spec v4 draft 13 adds mandatory permission_type.
127
+ toAmino: (m) => {
128
+ var _a, _b, _c;
129
+ return (0, helpers_1.clean)({
130
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
131
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
132
+ id: (0, helpers_1.u64ToStr)(m.id),
133
+ permission_type: (_c = m.permissionType) !== null && _c !== void 0 ? _c : 0,
134
+ });
135
+ },
136
+ fromAmino: (a) => {
137
+ var _a, _b, _c;
138
+ return tx_1.MsgRenewPermissionVP.fromPartial({
139
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
140
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
141
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
142
+ permissionType: (_c = a.permission_type) !== null && _c !== void 0 ? _c : 0,
143
+ });
144
+ },
145
+ };
146
+ exports.MsgSetPermissionVPToValidatedAminoConverter = {
147
+ aminoType: "verana/x/perm/MsgSetPermVPValidated",
148
+ toAmino: (m) => {
149
+ var _a, _b, _c;
150
+ return (0, helpers_1.clean)({
151
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
152
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
153
+ id: (0, helpers_1.u64ToStr)(m.id),
154
+ effective_until: (0, helpers_1.dateToIsoAmino)(m.effectiveUntil),
155
+ validation_fees: (0, helpers_1.u64ToStr)(m.validationFees),
156
+ issuance_fees: (0, helpers_1.u64ToStr)(m.issuanceFees),
157
+ verification_fees: (0, helpers_1.u64ToStr)(m.verificationFees),
158
+ vp_summary_digest: (_c = m.vpSummaryDigest) !== null && _c !== void 0 ? _c : "",
159
+ issuance_fee_discount: (0, helpers_1.u64ToStr)(m.issuanceFeeDiscount),
160
+ verification_fee_discount: (0, helpers_1.u64ToStr)(m.verificationFeeDiscount),
161
+ });
162
+ },
163
+ fromAmino: (a) => {
164
+ var _a, _b, _c;
165
+ return tx_1.MsgSetPermissionVPToValidated.fromPartial({
166
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
167
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
168
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
169
+ effectiveUntil: (0, helpers_1.isoToDate)(a.effective_until),
170
+ validationFees: (0, helpers_1.strToU64)(a.validation_fees) != null ? Number((0, helpers_1.strToU64)(a.validation_fees).toString()) : 0,
171
+ issuanceFees: (0, helpers_1.strToU64)(a.issuance_fees) != null ? Number((0, helpers_1.strToU64)(a.issuance_fees).toString()) : 0,
172
+ verificationFees: (0, helpers_1.strToU64)(a.verification_fees) != null ? Number((0, helpers_1.strToU64)(a.verification_fees).toString()) : 0,
173
+ vpSummaryDigest: (_c = a.vp_summary_digest) !== null && _c !== void 0 ? _c : "",
174
+ issuanceFeeDiscount: (0, helpers_1.strToU64)(a.issuance_fee_discount) != null
175
+ ? Number((0, helpers_1.strToU64)(a.issuance_fee_discount).toString())
176
+ : 0,
177
+ verificationFeeDiscount: (0, helpers_1.strToU64)(a.verification_fee_discount) != null
178
+ ? Number((0, helpers_1.strToU64)(a.verification_fee_discount).toString())
179
+ : 0,
180
+ });
181
+ },
182
+ };
183
+ exports.MsgCancelPermissionVPLastRequestAminoConverter = {
184
+ aminoType: "verana/x/perm/MsgCancelPermVPLastReq",
185
+ toAmino: (m) => {
186
+ var _a, _b;
187
+ return (0, helpers_1.clean)({
188
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
189
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
190
+ id: (0, helpers_1.u64ToStr)(m.id),
191
+ });
192
+ },
193
+ fromAmino: (a) => {
194
+ var _a, _b;
195
+ return tx_1.MsgCancelPermissionVPLastRequest.fromPartial({
196
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
197
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
198
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
199
+ });
200
+ },
201
+ };
202
+ exports.MsgCreateOrUpdatePermissionSessionAminoConverter = {
203
+ aminoType: "verana/x/perm/MsgCreateOrUpdatePermSess",
204
+ toAmino: (m) => {
205
+ var _a, _b, _c, _d;
206
+ return (0, helpers_1.clean)({
207
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
208
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
209
+ id: (_c = m.id) !== null && _c !== void 0 ? _c : "",
210
+ issuer_perm_id: (0, helpers_1.u64ToStr)(m.issuerPermId),
211
+ verifier_perm_id: (0, helpers_1.u64ToStr)(m.verifierPermId),
212
+ agent_perm_id: (0, helpers_1.u64ToStr)(m.agentPermId),
213
+ wallet_agent_perm_id: (0, helpers_1.u64ToStr)(m.walletAgentPermId),
214
+ digest: (_d = m.digest) !== null && _d !== void 0 ? _d : undefined,
215
+ });
216
+ },
217
+ fromAmino: (a) => {
218
+ var _a, _b, _c, _d;
219
+ return tx_1.MsgCreateOrUpdatePermissionSession.fromPartial({
220
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
221
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
222
+ id: (_c = a.id) !== null && _c !== void 0 ? _c : "",
223
+ issuerPermId: (0, helpers_1.strToU64)(a.issuer_perm_id) != null ? Number((0, helpers_1.strToU64)(a.issuer_perm_id).toString()) : 0,
224
+ verifierPermId: (0, helpers_1.strToU64)(a.verifier_perm_id) != null ? Number((0, helpers_1.strToU64)(a.verifier_perm_id).toString()) : 0,
225
+ agentPermId: (0, helpers_1.strToU64)(a.agent_perm_id) != null ? Number((0, helpers_1.strToU64)(a.agent_perm_id).toString()) : 0,
226
+ walletAgentPermId: (0, helpers_1.strToU64)(a.wallet_agent_perm_id) != null
227
+ ? Number((0, helpers_1.strToU64)(a.wallet_agent_perm_id).toString())
228
+ : 0,
229
+ digest: (_d = a.digest) !== null && _d !== void 0 ? _d : "",
230
+ });
231
+ },
232
+ };
233
+ exports.MsgSlashPermissionTrustDepositAminoConverter = {
234
+ aminoType: "verana/x/perm/MsgSlashPermTD",
235
+ // [MOD-PERM-MSG-12-1] spec v4 draft 13 adds mandatory reason.
236
+ toAmino: (m) => {
237
+ var _a, _b, _c;
238
+ return (0, helpers_1.clean)({
239
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
240
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
241
+ id: (0, helpers_1.u64ToStr)(m.id),
242
+ amount: (0, helpers_1.u64ToStr)(m.amount),
243
+ reason: (_c = m.reason) !== null && _c !== void 0 ? _c : "",
244
+ });
245
+ },
246
+ fromAmino: (a) => {
247
+ var _a, _b, _c;
248
+ return tx_1.MsgSlashPermissionTrustDeposit.fromPartial({
249
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
250
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
251
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
252
+ amount: (0, helpers_1.strToU64)(a.amount) != null ? Number((0, helpers_1.strToU64)(a.amount).toString()) : 0,
253
+ reason: (_c = a.reason) !== null && _c !== void 0 ? _c : "",
254
+ });
255
+ },
256
+ };
257
+ exports.MsgRepayPermissionSlashedTrustDepositAminoConverter = {
258
+ aminoType: "verana/x/perm/MsgRepayPermSlashedTD",
259
+ toAmino: (m) => {
260
+ var _a, _b;
261
+ return (0, helpers_1.clean)({
262
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
263
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
264
+ id: (0, helpers_1.u64ToStr)(m.id),
265
+ });
266
+ },
267
+ fromAmino: (a) => {
268
+ var _a, _b;
269
+ return tx_1.MsgRepayPermissionSlashedTrustDeposit.fromPartial({
270
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
271
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
272
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
273
+ });
274
+ },
275
+ };
276
+ exports.MsgSelfCreatePermissionAminoConverter = {
277
+ aminoType: "verana/x/perm/MsgSelfCreatePermission",
278
+ toAmino: (m) => {
279
+ var _a, _b, _c, _d, _e, _f;
280
+ return (0, helpers_1.clean)({
281
+ corporation: (_a = m.corporation) !== null && _a !== void 0 ? _a : "",
282
+ operator: (_b = m.operator) !== null && _b !== void 0 ? _b : "",
283
+ type: (_c = m.type) !== null && _c !== void 0 ? _c : 0,
284
+ validator_perm_id: (0, helpers_1.u64ToStr)(m.validatorPermId),
285
+ did: (_d = m.did) !== null && _d !== void 0 ? _d : "",
286
+ effective_from: (0, helpers_1.dateToIsoAmino)(m.effectiveFrom),
287
+ effective_until: (0, helpers_1.dateToIsoAmino)(m.effectiveUntil),
288
+ verification_fees: (0, helpers_1.u64ToStrIfNonZero)(m.verificationFees),
289
+ validation_fees: (0, helpers_1.u64ToStrIfNonZero)(m.validationFees),
290
+ vs_operator: m.vsOperator || undefined,
291
+ vs_operator_authz_enabled: m.vsOperatorAuthzEnabled || undefined,
292
+ vs_operator_authz_spend_limit: (_e = m.vsOperatorAuthzSpendLimit) !== null && _e !== void 0 ? _e : [],
293
+ vs_operator_authz_with_feegrant: m.vsOperatorAuthzWithFeegrant || undefined,
294
+ vs_operator_authz_fee_spend_limit: (_f = m.vsOperatorAuthzFeeSpendLimit) !== null && _f !== void 0 ? _f : [],
295
+ vs_operator_authz_spend_period: (0, helpers_1.durationToAmino)(m.vsOperatorAuthzSpendPeriod),
296
+ });
297
+ },
298
+ fromAmino: (a) => {
299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
300
+ return tx_1.MsgSelfCreatePermission.fromPartial({
301
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
302
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
303
+ type: (_c = a.type) !== null && _c !== void 0 ? _c : 0,
304
+ validatorPermId: (0, helpers_1.strToU64)(a.validator_perm_id) != null ? Number((0, helpers_1.strToU64)(a.validator_perm_id).toString()) : 0,
305
+ did: (_d = a.did) !== null && _d !== void 0 ? _d : "",
306
+ effectiveFrom: (0, helpers_1.isoToDate)(a.effective_from),
307
+ effectiveUntil: (0, helpers_1.isoToDate)(a.effective_until),
308
+ verificationFees: (0, helpers_1.strToU64)(a.verification_fees) != null ? Number((0, helpers_1.strToU64)(a.verification_fees).toString()) : 0,
309
+ validationFees: (0, helpers_1.strToU64)(a.validation_fees) != null ? Number((0, helpers_1.strToU64)(a.validation_fees).toString()) : 0,
310
+ vsOperator: (_e = a.vs_operator) !== null && _e !== void 0 ? _e : "",
311
+ vsOperatorAuthzEnabled: (_f = a.vs_operator_authz_enabled) !== null && _f !== void 0 ? _f : false,
312
+ vsOperatorAuthzSpendLimit: (_g = a.vs_operator_authz_spend_limit) !== null && _g !== void 0 ? _g : [],
313
+ vsOperatorAuthzWithFeegrant: (_h = a.vs_operator_authz_with_feegrant) !== null && _h !== void 0 ? _h : false,
314
+ vsOperatorAuthzFeeSpendLimit: (_j = a.vs_operator_authz_fee_spend_limit) !== null && _j !== void 0 ? _j : [],
315
+ vsOperatorAuthzSpendPeriod: (0, helpers_1.aminoToDuration)(a.vs_operator_authz_spend_period),
316
+ });
317
+ },
318
+ };
@@ -0,0 +1,4 @@
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgReclaimTrustDepositYieldAminoConverter: AminoConverter;
3
+ export declare const MsgRepaySlashedTrustDepositAminoConverter: AminoConverter;
4
+ export declare const MsgSlashTrustDepositAminoConverter: AminoConverter;