@verana-labs/verana-types 0.10.1-dev.2 → 0.10.1-dev.21

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 (140) hide show
  1. package/README.md +1 -1
  2. package/dist/amino-converter/co.d.ts +3 -0
  3. package/dist/amino-converter/co.js +164 -0
  4. package/dist/amino-converter/cs.d.ts +7 -0
  5. package/dist/amino-converter/cs.js +169 -0
  6. package/dist/amino-converter/de.d.ts +3 -0
  7. package/dist/amino-converter/de.js +51 -0
  8. package/dist/amino-converter/di.d.ts +2 -0
  9. package/dist/amino-converter/di.js +23 -0
  10. package/dist/amino-converter/ec.d.ts +4 -0
  11. package/dist/amino-converter/ec.js +63 -0
  12. package/dist/amino-converter/gf.d.ts +3 -0
  13. package/dist/amino-converter/gf.js +48 -0
  14. package/dist/amino-converter/group.d.ts +3 -0
  15. package/dist/amino-converter/group.js +91 -0
  16. package/dist/amino-converter/pp.d.ts +13 -0
  17. package/dist/amino-converter/pp.js +347 -0
  18. package/dist/amino-converter/td.d.ts +4 -0
  19. package/dist/amino-converter/td.js +46 -0
  20. package/dist/amino-converter/util/helpers.d.ts +30 -0
  21. package/dist/amino-converter/util/helpers.js +88 -0
  22. package/dist/amino-converter/xr.d.ts +6 -0
  23. package/dist/amino-converter/xr.js +106 -0
  24. package/dist/codec/cosmos/base/v1beta1/coin.d.ts +1 -1
  25. package/dist/codec/google/protobuf/any.d.ts +143 -0
  26. package/dist/codec/{verana/dd/v1/params.js → google/protobuf/any.js} +46 -39
  27. package/dist/codec/google/protobuf/descriptor.d.ts +5 -0
  28. package/dist/codec/google/protobuf/descriptor.js +16 -2
  29. package/dist/codec/google/protobuf/timestamp.d.ts +3 -3
  30. package/dist/codec/verana/{perm/module → co/module/v1}/module.d.ts +5 -2
  31. package/dist/codec/verana/{perm/module → co/module/v1}/module.js +2 -2
  32. package/dist/codec/verana/co/v1/genesis.d.ts +28 -0
  33. package/dist/codec/verana/{dd → co}/v1/genesis.js +11 -11
  34. package/dist/codec/verana/co/v1/params.d.ts +29 -0
  35. package/dist/codec/verana/co/v1/params.js +81 -0
  36. package/dist/codec/verana/co/v1/query.d.ts +111 -0
  37. package/dist/codec/verana/{dd → co}/v1/query.js +151 -117
  38. package/dist/codec/verana/co/v1/tx.d.ts +172 -0
  39. package/dist/codec/verana/co/v1/tx.js +639 -0
  40. package/dist/codec/verana/co/v1/types.d.ts +60 -0
  41. package/dist/codec/verana/co/v1/types.js +384 -0
  42. package/dist/codec/verana/cs/v1/query.d.ts +57 -5
  43. package/dist/codec/verana/cs/v1/query.js +297 -38
  44. package/dist/codec/verana/cs/v1/tx.d.ts +107 -12
  45. package/dist/codec/verana/cs/v1/tx.js +548 -64
  46. package/dist/codec/verana/cs/v1/types.d.ts +75 -16
  47. package/dist/codec/verana/cs/v1/types.js +419 -82
  48. package/dist/codec/verana/de/v1/genesis.d.ts +7 -0
  49. package/dist/codec/verana/de/v1/genesis.js +57 -2
  50. package/dist/codec/verana/de/v1/query.d.ts +109 -3
  51. package/dist/codec/verana/de/v1/query.js +396 -10
  52. package/dist/codec/verana/de/v1/tx.d.ts +22 -10
  53. package/dist/codec/verana/de/v1/tx.js +16 -16
  54. package/dist/codec/verana/de/v1/types.d.ts +104 -21
  55. package/dist/codec/verana/de/v1/types.js +313 -83
  56. package/dist/codec/verana/di/module/v1/module.d.ts +29 -0
  57. package/dist/codec/verana/di/module/v1/module.js +98 -0
  58. package/dist/codec/verana/{dd → di}/v1/genesis.d.ts +5 -4
  59. package/dist/codec/verana/di/v1/genesis.js +119 -0
  60. package/dist/codec/verana/di/v1/params.d.ts +24 -0
  61. package/dist/codec/verana/di/v1/params.js +81 -0
  62. package/dist/codec/verana/di/v1/query.d.ts +99 -0
  63. package/dist/codec/verana/di/v1/query.js +349 -0
  64. package/dist/codec/verana/di/v1/tx.d.ts +120 -0
  65. package/dist/codec/verana/di/v1/tx.js +409 -0
  66. package/dist/codec/verana/{dd → ec}/module/module.d.ts +1 -1
  67. package/dist/codec/verana/{dd → ec}/module/module.js +2 -2
  68. package/dist/codec/verana/{tr → ec}/v1/genesis.d.ts +10 -12
  69. package/dist/codec/verana/{tr → ec}/v1/genesis.js +16 -56
  70. package/dist/codec/verana/{tr → ec}/v1/params.d.ts +1 -1
  71. package/dist/codec/verana/{tr → ec}/v1/params.js +2 -2
  72. package/dist/codec/verana/ec/v1/query.d.ts +109 -0
  73. package/dist/codec/verana/{tr → ec}/v1/query.js +69 -71
  74. package/dist/codec/verana/ec/v1/tx.d.ts +152 -0
  75. package/dist/codec/verana/{dd → ec}/v1/tx.js +218 -216
  76. package/dist/codec/verana/ec/v1/types.d.ts +67 -0
  77. package/dist/codec/verana/ec/v1/types.js +422 -0
  78. package/dist/codec/verana/gf/module/v1/module.d.ts +29 -0
  79. package/dist/codec/verana/gf/module/v1/module.js +98 -0
  80. package/dist/codec/verana/gf/v1/genesis.d.ts +29 -0
  81. package/dist/codec/verana/gf/v1/genesis.js +137 -0
  82. package/dist/codec/verana/gf/v1/params.d.ts +28 -0
  83. package/dist/codec/verana/gf/v1/params.js +81 -0
  84. package/dist/codec/verana/gf/v1/query.d.ts +108 -0
  85. package/dist/codec/verana/gf/v1/query.js +462 -0
  86. package/dist/codec/verana/gf/v1/tx.d.ts +142 -0
  87. package/dist/codec/verana/gf/v1/tx.js +486 -0
  88. package/dist/codec/verana/{tr → gf}/v1/types.d.ts +18 -51
  89. package/dist/codec/verana/gf/v1/types.js +477 -0
  90. package/dist/codec/verana/{tr → pp}/module/module.d.ts +1 -1
  91. package/dist/codec/verana/{tr → pp}/module/module.js +2 -2
  92. package/dist/codec/verana/{perm → pp}/v1/genesis.d.ts +9 -9
  93. package/dist/codec/verana/{perm → pp}/v1/genesis.js +26 -26
  94. package/dist/codec/verana/{perm → pp}/v1/params.d.ts +1 -1
  95. package/dist/codec/verana/{perm → pp}/v1/params.js +2 -2
  96. package/dist/codec/verana/pp/v1/query.d.ts +220 -0
  97. package/dist/codec/verana/{perm → pp}/v1/query.js +305 -166
  98. package/dist/codec/verana/pp/v1/tx.d.ts +479 -0
  99. package/dist/codec/verana/pp/v1/tx.js +2574 -0
  100. package/dist/codec/verana/pp/v1/types.d.ts +137 -0
  101. package/dist/codec/verana/{perm → pp}/v1/types.js +312 -354
  102. package/dist/codec/verana/td/v1/genesis.d.ts +13 -3
  103. package/dist/codec/verana/td/v1/genesis.js +151 -35
  104. package/dist/codec/verana/td/v1/params.d.ts +2 -0
  105. package/dist/codec/verana/td/v1/params.js +18 -1
  106. package/dist/codec/verana/td/v1/query.d.ts +1 -1
  107. package/dist/codec/verana/td/v1/query.js +24 -10
  108. package/dist/codec/verana/td/v1/tx.d.ts +26 -40
  109. package/dist/codec/verana/td/v1/tx.js +80 -190
  110. package/dist/codec/verana/td/v1/types.d.ts +8 -8
  111. package/dist/codec/verana/td/v1/types.js +54 -69
  112. package/dist/codec/verana/xr/module/v1/module.d.ts +29 -0
  113. package/dist/codec/verana/xr/module/v1/module.js +98 -0
  114. package/dist/codec/verana/xr/v1/genesis.d.ts +34 -0
  115. package/dist/codec/verana/xr/v1/genesis.js +166 -0
  116. package/dist/codec/verana/{dd → xr}/v1/params.d.ts +4 -3
  117. package/dist/codec/verana/xr/v1/params.js +104 -0
  118. package/dist/codec/verana/xr/v1/query.d.ts +166 -0
  119. package/dist/codec/verana/xr/v1/query.js +817 -0
  120. package/dist/codec/verana/xr/v1/tx.d.ts +284 -0
  121. package/dist/codec/verana/xr/v1/tx.js +1298 -0
  122. package/dist/helpers/aminoConverters.d.ts +10 -32
  123. package/dist/helpers/aminoConverters.js +23 -589
  124. package/dist/index.d.ts +11 -1
  125. package/dist/index.js +11 -1
  126. package/dist/signing.d.ts +75 -0
  127. package/dist/signing.js +147 -0
  128. package/package.json +32 -6
  129. package/dist/codec/verana/dd/v1/query.d.ts +0 -108
  130. package/dist/codec/verana/dd/v1/tx.d.ts +0 -173
  131. package/dist/codec/verana/dd/v1/types.d.ts +0 -30
  132. package/dist/codec/verana/dd/v1/types.js +0 -206
  133. package/dist/codec/verana/perm/v1/query.d.ts +0 -209
  134. package/dist/codec/verana/perm/v1/tx.d.ts +0 -395
  135. package/dist/codec/verana/perm/v1/tx.js +0 -1995
  136. package/dist/codec/verana/perm/v1/types.d.ts +0 -134
  137. package/dist/codec/verana/tr/v1/query.d.ts +0 -118
  138. package/dist/codec/verana/tr/v1/tx.d.ts +0 -255
  139. package/dist/codec/verana/tr/v1/tx.js +0 -956
  140. package/dist/codec/verana/tr/v1/types.js +0 -839
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,3 @@
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgCreateCorporationAminoConverter: AminoConverter;
3
+ export declare const MsgUpdateCorporationAminoConverter: AminoConverter;
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgUpdateCorporationAminoConverter = exports.MsgCreateCorporationAminoConverter = void 0;
4
+ const any_1 = require("../codec/google/protobuf/any");
5
+ const tx_1 = require("../codec/verana/co/v1/tx");
6
+ const types_1 = require("cosmjs-types/cosmos/group/v1/types");
7
+ const helpers_1 = require("./util/helpers");
8
+ // Members serialize as plain objects in amino.
9
+ function memberToAmino(m) {
10
+ return (0, helpers_1.clean)({
11
+ address: m.address || undefined,
12
+ weight: m.weight || undefined,
13
+ metadata: m.metadata || undefined,
14
+ });
15
+ }
16
+ function memberFromAmino(a) {
17
+ var _a, _b, _c;
18
+ return tx_1.Member.fromPartial({
19
+ address: (_a = a.address) !== null && _a !== void 0 ? _a : "",
20
+ weight: (_b = a.weight) !== null && _b !== void 0 ? _b : "",
21
+ metadata: (_c = a.metadata) !== null && _c !== void 0 ? _c : "",
22
+ });
23
+ }
24
+ // Convert a proto Duration ({ seconds: bigint, nanos: number }) to the amino
25
+ // nanosecond integer string that Go amino produces for time.Duration fields.
26
+ function durationToNanosStr(d) {
27
+ var _a, _b;
28
+ if (!d)
29
+ return "0";
30
+ const secs = (_a = d.seconds) !== null && _a !== void 0 ? _a : BigInt(0);
31
+ const nanos = (_b = d.nanos) !== null && _b !== void 0 ? _b : 0;
32
+ return String(secs * BigInt(1000000000) + BigInt(nanos));
33
+ }
34
+ function nanosStrToDuration(ns) {
35
+ const n = BigInt(ns !== null && ns !== void 0 ? ns : "0");
36
+ return { seconds: n / BigInt(1000000000), nanos: Number(n % BigInt(1000000000)) };
37
+ }
38
+ // decision_policy is a google.protobuf.Any wrapping a cosmos x/group decision
39
+ // policy. The Go amino codec encodes it as:
40
+ // {"type": "cosmos-sdk/ThresholdDecisionPolicy", "value": { ... amino fields ... }}
41
+ // where Duration fields are encoded as nanosecond integer strings.
42
+ function anyToAmino(a) {
43
+ if (!a)
44
+ return undefined;
45
+ if (a.typeUrl === "/cosmos.group.v1.ThresholdDecisionPolicy") {
46
+ const dp = types_1.ThresholdDecisionPolicy.decode(a.value);
47
+ return (0, helpers_1.clean)({
48
+ type: "cosmos-sdk/ThresholdDecisionPolicy",
49
+ value: (0, helpers_1.clean)({
50
+ threshold: dp.threshold || undefined,
51
+ windows: dp.windows
52
+ ? {
53
+ voting_period: durationToNanosStr(dp.windows.votingPeriod),
54
+ min_execution_period: durationToNanosStr(dp.windows.minExecutionPeriod),
55
+ }
56
+ : undefined,
57
+ }),
58
+ });
59
+ }
60
+ if (a.typeUrl === "/cosmos.group.v1.PercentageDecisionPolicy") {
61
+ const dp = types_1.PercentageDecisionPolicy.decode(a.value);
62
+ return (0, helpers_1.clean)({
63
+ type: "cosmos-sdk/PercentageDecisionPolicy",
64
+ value: (0, helpers_1.clean)({
65
+ percentage: dp.percentage || undefined,
66
+ windows: dp.windows
67
+ ? {
68
+ voting_period: durationToNanosStr(dp.windows.votingPeriod),
69
+ min_execution_period: durationToNanosStr(dp.windows.minExecutionPeriod),
70
+ }
71
+ : undefined,
72
+ }),
73
+ });
74
+ }
75
+ // Fallback for unknown Any types.
76
+ return (0, helpers_1.clean)({
77
+ type: a.typeUrl || undefined,
78
+ value: a.value && a.value.length > 0 ? Buffer.from(a.value).toString("base64") : undefined,
79
+ });
80
+ }
81
+ function anyFromAmino(v) {
82
+ var _a, _b, _c, _d, _e;
83
+ if (!v)
84
+ return any_1.Any.fromPartial({ typeUrl: "", value: new Uint8Array() });
85
+ if (v.type === "cosmos-sdk/ThresholdDecisionPolicy") {
86
+ const val = (_a = v.value) !== null && _a !== void 0 ? _a : {};
87
+ const dp = types_1.ThresholdDecisionPolicy.fromPartial({
88
+ threshold: (_b = val.threshold) !== null && _b !== void 0 ? _b : "",
89
+ windows: val.windows
90
+ ? {
91
+ votingPeriod: nanosStrToDuration(val.windows.voting_period),
92
+ minExecutionPeriod: nanosStrToDuration(val.windows.min_execution_period),
93
+ }
94
+ : undefined,
95
+ });
96
+ return any_1.Any.fromPartial({
97
+ typeUrl: "/cosmos.group.v1.ThresholdDecisionPolicy",
98
+ value: types_1.ThresholdDecisionPolicy.encode(dp).finish(),
99
+ });
100
+ }
101
+ if (v.type === "cosmos-sdk/PercentageDecisionPolicy") {
102
+ const val = (_c = v.value) !== null && _c !== void 0 ? _c : {};
103
+ const dp = types_1.PercentageDecisionPolicy.fromPartial({
104
+ percentage: (_d = val.percentage) !== null && _d !== void 0 ? _d : "",
105
+ windows: val.windows
106
+ ? {
107
+ votingPeriod: nanosStrToDuration(val.windows.voting_period),
108
+ minExecutionPeriod: nanosStrToDuration(val.windows.min_execution_period),
109
+ }
110
+ : undefined,
111
+ });
112
+ return any_1.Any.fromPartial({
113
+ typeUrl: "/cosmos.group.v1.PercentageDecisionPolicy",
114
+ value: types_1.PercentageDecisionPolicy.encode(dp).finish(),
115
+ });
116
+ }
117
+ // Fallback: treat value as base64-encoded proto bytes.
118
+ const bytes = v.value ? new Uint8Array(Buffer.from(v.value, "base64")) : new Uint8Array();
119
+ return any_1.Any.fromPartial({ typeUrl: (_e = v.type) !== null && _e !== void 0 ? _e : "", value: bytes });
120
+ }
121
+ exports.MsgCreateCorporationAminoConverter = {
122
+ aminoType: "verana/x/co/MsgCreateCorporation",
123
+ toAmino: (m) => (0, helpers_1.clean)({
124
+ signer: m.signer || undefined,
125
+ members: m.members && m.members.length > 0 ? m.members.map(memberToAmino) : undefined,
126
+ group_metadata: m.groupMetadata || undefined,
127
+ group_policy_metadata: m.groupPolicyMetadata || undefined,
128
+ decision_policy: anyToAmino(m.decisionPolicy),
129
+ did: m.did || undefined,
130
+ language: m.language || undefined,
131
+ doc_url: m.docUrl || undefined,
132
+ doc_digest_sri: m.docDigestSri || undefined,
133
+ }),
134
+ fromAmino: (a) => {
135
+ var _a, _b, _c, _d, _e, _f, _g;
136
+ return tx_1.MsgCreateCorporation.fromPartial({
137
+ signer: (_a = a.signer) !== null && _a !== void 0 ? _a : "",
138
+ members: Array.isArray(a.members) ? a.members.map(memberFromAmino) : [],
139
+ groupMetadata: (_b = a.group_metadata) !== null && _b !== void 0 ? _b : "",
140
+ groupPolicyMetadata: (_c = a.group_policy_metadata) !== null && _c !== void 0 ? _c : "",
141
+ decisionPolicy: anyFromAmino(a.decision_policy),
142
+ did: (_d = a.did) !== null && _d !== void 0 ? _d : "",
143
+ language: (_e = a.language) !== null && _e !== void 0 ? _e : "",
144
+ docUrl: (_f = a.doc_url) !== null && _f !== void 0 ? _f : "",
145
+ docDigestSri: (_g = a.doc_digest_sri) !== null && _g !== void 0 ? _g : "",
146
+ });
147
+ },
148
+ };
149
+ exports.MsgUpdateCorporationAminoConverter = {
150
+ aminoType: "verana/x/co/MsgUpdateCorporation",
151
+ toAmino: ({ corporation, operator, did }) => (0, helpers_1.clean)({
152
+ corporation: corporation || undefined,
153
+ operator: operator || undefined,
154
+ did: did || undefined,
155
+ }),
156
+ fromAmino: (value) => {
157
+ var _a, _b, _c;
158
+ return tx_1.MsgUpdateCorporation.fromPartial({
159
+ corporation: (_a = value.corporation) !== null && _a !== void 0 ? _a : "",
160
+ operator: (_b = value.operator) !== null && _b !== void 0 ? _b : "",
161
+ did: (_c = value.did) !== null && _c !== void 0 ? _c : "",
162
+ });
163
+ },
164
+ };
@@ -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
+ ecosystem_id: (0, helpers_1.u64ToStr)(m.ecosystemId),
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
+ ecosystemId: (0, helpers_1.strToU64)(a.ecosystem_id) != null ? Number((0, helpers_1.strToU64)(a.ecosystem_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,51 @@
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;
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
+ });
22
+ },
23
+ fromAmino: (a) => {
24
+ var _a, _b, _c, _d, _e, _f, _g;
25
+ return tx_1.MsgGrantOperatorAuthorization.fromPartial({
26
+ corporation: (_a = a.corporation) !== null && _a !== void 0 ? _a : "",
27
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
28
+ grantee: (_c = a.grantee) !== null && _c !== void 0 ? _c : "",
29
+ msgTypes: (_d = a.msg_types) !== null && _d !== void 0 ? _d : [],
30
+ expiration: (0, helpers_1.isoToDate)(a.expiration),
31
+ authzSpendLimit: (_e = a.authz_spend_limit) !== null && _e !== void 0 ? _e : [],
32
+ authzSpendLimitPeriod: (0, helpers_1.aminoToDuration)(a.authz_spend_limit_period),
33
+ withFeegrant: (_f = a.with_feegrant) !== null && _f !== void 0 ? _f : false,
34
+ feegrantSpendLimit: (_g = a.feegrant_spend_limit) !== null && _g !== void 0 ? _g : [],
35
+ feegrantSpendLimitPeriod: (0, helpers_1.aminoToDuration)(a.feegrant_spend_limit_period),
36
+ });
37
+ },
38
+ };
39
+ exports.MsgRevokeOperatorAuthorizationAminoConverter = {
40
+ aminoType: "verana/x/de/MsgRevokeOpAuthorization",
41
+ toAmino: ({ corporation, operator, grantee }) => (0, helpers_1.clean)({
42
+ corporation: corporation || undefined,
43
+ operator: operator || undefined,
44
+ grantee: grantee || undefined,
45
+ }),
46
+ fromAmino: (value) => tx_1.MsgRevokeOperatorAuthorization.fromPartial({
47
+ corporation: value.corporation,
48
+ operator: value.operator,
49
+ grantee: value.grantee,
50
+ }),
51
+ };
@@ -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,4 @@
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgCreateEcosystemAminoConverter: AminoConverter;
3
+ export declare const MsgUpdateEcosystemAminoConverter: AminoConverter;
4
+ export declare const MsgArchiveEcosystemAminoConverter: AminoConverter;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgArchiveEcosystemAminoConverter = exports.MsgUpdateEcosystemAminoConverter = exports.MsgCreateEcosystemAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/ec/v1/tx");
5
+ const helpers_1 = require("./util/helpers");
6
+ exports.MsgCreateEcosystemAminoConverter = {
7
+ aminoType: "verana/x/ec/MsgCreateEcosystem",
8
+ toAmino: ({ corporation, operator, did, language, docUrl, docDigestSri }) => (0, helpers_1.clean)({
9
+ corporation: corporation || undefined,
10
+ operator: operator || undefined,
11
+ did: did || undefined,
12
+ language: language || undefined,
13
+ doc_url: docUrl || undefined,
14
+ doc_digest_sri: docDigestSri || undefined,
15
+ }),
16
+ fromAmino: (value) => {
17
+ var _a, _b, _c, _d, _e, _f;
18
+ return tx_1.MsgCreateEcosystem.fromPartial({
19
+ corporation: (_a = value.corporation) !== null && _a !== void 0 ? _a : "",
20
+ operator: (_b = value.operator) !== null && _b !== void 0 ? _b : "",
21
+ did: (_c = value.did) !== null && _c !== void 0 ? _c : "",
22
+ language: (_d = value.language) !== null && _d !== void 0 ? _d : "",
23
+ docUrl: (_e = value.doc_url) !== null && _e !== void 0 ? _e : "",
24
+ docDigestSri: (_f = value.doc_digest_sri) !== null && _f !== void 0 ? _f : "",
25
+ });
26
+ },
27
+ };
28
+ exports.MsgUpdateEcosystemAminoConverter = {
29
+ aminoType: "verana/x/ec/MsgUpdateEcosystem",
30
+ toAmino: ({ corporation, operator, id, did }) => (0, helpers_1.clean)({
31
+ corporation: corporation || undefined,
32
+ operator: operator || undefined,
33
+ id: (0, helpers_1.u64ToStr)(id),
34
+ did: did || undefined,
35
+ }),
36
+ fromAmino: (value) => {
37
+ var _a, _b, _c;
38
+ return tx_1.MsgUpdateEcosystem.fromPartial({
39
+ corporation: (_a = value.corporation) !== null && _a !== void 0 ? _a : "",
40
+ operator: (_b = value.operator) !== null && _b !== void 0 ? _b : "",
41
+ id: value.id != null ? Number(value.id) : 0,
42
+ did: (_c = value.did) !== null && _c !== void 0 ? _c : "",
43
+ });
44
+ },
45
+ };
46
+ exports.MsgArchiveEcosystemAminoConverter = {
47
+ aminoType: "verana/x/ec/MsgArchiveEcosystem",
48
+ toAmino: ({ corporation, operator, id, archive }) => (0, helpers_1.clean)({
49
+ corporation: corporation || undefined,
50
+ operator: operator || undefined,
51
+ id: (0, helpers_1.u64ToStr)(id),
52
+ archive: archive,
53
+ }),
54
+ fromAmino: (value) => {
55
+ var _a, _b, _c;
56
+ return tx_1.MsgArchiveEcosystem.fromPartial({
57
+ corporation: (_a = value.corporation) !== null && _a !== void 0 ? _a : "",
58
+ operator: (_b = value.operator) !== null && _b !== void 0 ? _b : "",
59
+ id: value.id != null ? Number(value.id) : 0,
60
+ archive: (_c = value.archive) !== null && _c !== void 0 ? _c : false,
61
+ });
62
+ },
63
+ };
@@ -0,0 +1,3 @@
1
+ import type { AminoConverter } from "@cosmjs/stargate";
2
+ export declare const MsgAddGovernanceFrameworkDocumentAminoConverter: AminoConverter;
3
+ export declare const MsgIncreaseActiveGovernanceFrameworkVersionAminoConverter: AminoConverter;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgIncreaseActiveGovernanceFrameworkVersionAminoConverter = exports.MsgAddGovernanceFrameworkDocumentAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/gf/v1/tx");
5
+ const helpers_1 = require("./util/helpers");
6
+ // MOD-GF Msgs extracted from x/tr in v4-rc2. ecosystem_id is the optional
7
+ // polymorphic subject discriminator: when zero/absent, the target is the
8
+ // signing corporation's own CGF; when set, the target is that Ecosystem.
9
+ exports.MsgAddGovernanceFrameworkDocumentAminoConverter = {
10
+ aminoType: "verana/x/gf/MsgAddGovernanceFrameworkDocument",
11
+ toAmino: ({ corporation, operator, ecosystemId, docLanguage, docUrl, docDigestSri, version, }) => (0, helpers_1.clean)({
12
+ corporation: corporation || undefined,
13
+ operator: operator || undefined,
14
+ ecosystem_id: (0, helpers_1.u64ToStr)(ecosystemId),
15
+ doc_language: docLanguage || undefined,
16
+ doc_url: docUrl || undefined,
17
+ doc_digest_sri: docDigestSri || undefined,
18
+ version: version || undefined,
19
+ }),
20
+ fromAmino: (value) => {
21
+ var _a, _b, _c, _d, _e, _f;
22
+ return tx_1.MsgAddGovernanceFrameworkDocument.fromPartial({
23
+ corporation: (_a = value.corporation) !== null && _a !== void 0 ? _a : "",
24
+ operator: (_b = value.operator) !== null && _b !== void 0 ? _b : "",
25
+ ecosystemId: value.ecosystem_id != null ? Number(value.ecosystem_id) : 0,
26
+ docLanguage: (_c = value.doc_language) !== null && _c !== void 0 ? _c : "",
27
+ docUrl: (_d = value.doc_url) !== null && _d !== void 0 ? _d : "",
28
+ docDigestSri: (_e = value.doc_digest_sri) !== null && _e !== void 0 ? _e : "",
29
+ version: (_f = value.version) !== null && _f !== void 0 ? _f : 0,
30
+ });
31
+ },
32
+ };
33
+ exports.MsgIncreaseActiveGovernanceFrameworkVersionAminoConverter = {
34
+ aminoType: "verana/x/gf/MsgIncreaseActiveGovernanceFrameworkVersion",
35
+ toAmino: ({ corporation, operator, ecosystemId }) => (0, helpers_1.clean)({
36
+ corporation: corporation || undefined,
37
+ operator: operator || undefined,
38
+ ecosystem_id: (0, helpers_1.u64ToStr)(ecosystemId),
39
+ }),
40
+ fromAmino: (value) => {
41
+ var _a, _b;
42
+ return tx_1.MsgIncreaseActiveGovernanceFrameworkVersion.fromPartial({
43
+ corporation: (_a = value.corporation) !== null && _a !== void 0 ? _a : "",
44
+ operator: (_b = value.operator) !== null && _b !== void 0 ? _b : "",
45
+ ecosystemId: value.ecosystem_id != null ? Number(value.ecosystem_id) : 0,
46
+ });
47
+ },
48
+ };
@@ -0,0 +1,3 @@
1
+ import type { AminoConverter, AminoTypes } from "@cosmjs/stargate";
2
+ import type { Registry } from "@cosmjs/proto-signing";
3
+ export declare function createGroupAminoConverters(getAminoTypes: () => AminoTypes, registry: Registry): Record<string, AminoConverter>;