@sparkdreamnft/sparkdreamjs 0.0.46 → 0.0.47

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 (70) hide show
  1. package/amino-schema.d.ts +5741 -0
  2. package/amino-schema.js +8 -0
  3. package/chain-amino.d.ts +61 -0
  4. package/chain-amino.js +670 -0
  5. package/esm/amino-schema.js +5 -0
  6. package/esm/chain-amino.js +665 -0
  7. package/esm/nested-amino.js +7 -1
  8. package/esm/sparkdream/artifact/v1/tx.amino.js +12 -473
  9. package/esm/sparkdream/blog/v1/tx.amino.js +15 -135
  10. package/esm/sparkdream/collect/v1/tx.amino.js +15 -254
  11. package/esm/sparkdream/commons/v1/tx.amino.js +12 -258
  12. package/esm/sparkdream/ecosystem/v1/tx.amino.js +15 -26
  13. package/esm/sparkdream/federation/v1/tx.amino.js +12 -174
  14. package/esm/sparkdream/forum/v1/tx.amino.js +15 -231
  15. package/esm/sparkdream/futarchy/v1/tx.amino.js +16 -38
  16. package/esm/sparkdream/guardian/v1/tx.amino.js +12 -33
  17. package/esm/sparkdream/name/v1/tx.amino.js +16 -63
  18. package/esm/sparkdream/rep/v1/tx.amino.js +12 -484
  19. package/esm/sparkdream/reveal/v1/tx.amino.js +15 -73
  20. package/esm/sparkdream/season/v1/tx.amino.js +12 -276
  21. package/esm/sparkdream/service/v1/tx.amino.js +16 -78
  22. package/esm/sparkdream/session/v1/tx.amino.js +16 -271
  23. package/esm/sparkdream/shield/v1/tx.amino.js +15 -80
  24. package/esm/sparkdream/sparkdream/v1/tx.amino.js +16 -8
  25. package/esm/sparkdream/split/v1/tx.amino.js +16 -8
  26. package/esm/sparkdream/vault/v1/tx.amino.js +12 -105
  27. package/nested-amino.d.ts +5 -1
  28. package/nested-amino.js +8 -1
  29. package/package.json +1 -1
  30. package/sparkdream/artifact/v1/tx.amino.d.ts +1 -353
  31. package/sparkdream/artifact/v1/tx.amino.js +47 -475
  32. package/sparkdream/blog/v1/tx.amino.d.ts +1 -103
  33. package/sparkdream/blog/v1/tx.amino.js +50 -137
  34. package/sparkdream/bundle.d.ts +19 -2047
  35. package/sparkdream/client.d.ts +1 -2009
  36. package/sparkdream/collect/v1/tx.amino.d.ts +1 -153
  37. package/sparkdream/collect/v1/tx.amino.js +50 -256
  38. package/sparkdream/commons/v1/tx.amino.d.ts +1 -123
  39. package/sparkdream/commons/v1/tx.amino.js +49 -262
  40. package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -13
  41. package/sparkdream/ecosystem/v1/tx.amino.js +50 -28
  42. package/sparkdream/federation/v1/tx.amino.d.ts +1 -128
  43. package/sparkdream/federation/v1/tx.amino.js +47 -176
  44. package/sparkdream/forum/v1/tx.amino.d.ts +1 -203
  45. package/sparkdream/forum/v1/tx.amino.js +50 -233
  46. package/sparkdream/futarchy/v1/tx.amino.d.ts +1 -38
  47. package/sparkdream/futarchy/v1/tx.amino.js +49 -38
  48. package/sparkdream/guardian/v1/tx.amino.d.ts +1 -7
  49. package/sparkdream/guardian/v1/tx.amino.js +49 -37
  50. package/sparkdream/name/v1/tx.amino.d.ts +1 -63
  51. package/sparkdream/name/v1/tx.amino.js +49 -63
  52. package/sparkdream/rep/v1/tx.amino.d.ts +1 -353
  53. package/sparkdream/rep/v1/tx.amino.js +47 -486
  54. package/sparkdream/reveal/v1/tx.amino.d.ts +1 -53
  55. package/sparkdream/reveal/v1/tx.amino.js +50 -75
  56. package/sparkdream/season/v1/tx.amino.d.ts +1 -218
  57. package/sparkdream/season/v1/tx.amino.js +47 -278
  58. package/sparkdream/service/v1/tx.amino.d.ts +1 -78
  59. package/sparkdream/service/v1/tx.amino.js +49 -78
  60. package/sparkdream/session/v1/tx.amino.d.ts +1 -93
  61. package/sparkdream/session/v1/tx.amino.js +48 -270
  62. package/sparkdream/shield/v1/tx.amino.d.ts +1 -28
  63. package/sparkdream/shield/v1/tx.amino.js +50 -82
  64. package/sparkdream/sparkdream/v1/tx.amino.d.ts +1 -8
  65. package/sparkdream/sparkdream/v1/tx.amino.js +49 -8
  66. package/sparkdream/split/v1/tx.amino.d.ts +1 -8
  67. package/sparkdream/split/v1/tx.amino.js +49 -8
  68. package/sparkdream/vault/v1/tx.amino.d.ts +1 -43
  69. package/sparkdream/vault/v1/tx.amino.js +49 -109
  70. package/varint.d.ts +1 -1
@@ -1,268 +1,55 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.AminoConverter = exports.configureNestedAminoConverter = void 0;
2
37
  //@ts-nocheck
3
38
  // HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
4
39
  // by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
5
40
  //
6
- // Why: Telescope emits a flat AminoConverter that hands each entry's toAmino
7
- // straight through to the message's auto-generated toAmino. For
8
- // MsgSubmitProposal and MsgSubmitAnonymousProposal (both have
9
- // `repeated google.protobuf.Any messages`), the auto-generated toAmino calls
10
- // Any.toAmino which just attaches the raw Uint8Array bytes — Ledger rejects
11
- // the resulting JSON ("Dictionaries are not sorted") and the chain produces
12
- // different sign bytes ("signature verification failed").
41
+ // Why: Telescope's generated converters (and the per-message overrides that
42
+ // used to patch them) disagree with the chain's aminojson on empty lists,
43
+ // empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
44
+ // whenever a proto changed. Every Msg of x/commons is converted by the
45
+ // schema-driven engine in chain-amino.ts instead, which renders amino JSON
46
+ // from the protobuf bytes exactly as the chain does.
13
47
  //
14
- // This override delegates the inner Any conversion to a consumer-supplied
15
- // proto registry + AminoTypes via `configureNestedAminoConverter`. The rest of
16
- // the converters are unchanged.
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.AminoConverter = exports.configureNestedAminoConverter = void 0;
19
- const tx_1 = require("./tx");
20
- const coin_1 = require("../../../cosmos/base/v1beta1/coin");
21
- const nested_amino_1 = require("../../../nested-amino");
22
- var nested_amino_2 = require("../../../nested-amino");
23
- Object.defineProperty(exports, "configureNestedAminoConverter", { enumerable: true, get: function () { return nested_amino_2.configureNestedAminoConverter; } });
24
- // Both proposal-submission messages share the same shape, so they share a
25
- // converter factory.
26
- function buildProposalConverter(aminoType) {
27
- return {
28
- aminoType,
29
- toAmino(message) {
30
- const obj = {};
31
- obj.proposer = message.proposer === "" ? undefined : message.proposer;
32
- obj.policy_address = message.policyAddress === "" ? undefined : message.policyAddress;
33
- // Mirror cosmossdk.io/x/tx/signing/aminojson's omitempty default for
34
- // repeated fields: omit when empty rather than emitting `[]`. Otherwise
35
- // the JS side signs `"messages":[]` and the chain reconstructs without
36
- // the key, causing signature verification to fail.
37
- obj.messages = (message.messages?.length ?? 0) > 0
38
- ? message.messages.map((a) => (0, nested_amino_1.anyToAmino)(a))
39
- : undefined;
40
- obj.metadata = message.metadata === "" ? undefined : message.metadata;
41
- return obj;
42
- },
43
- fromAmino(object) {
44
- return {
45
- proposer: object.proposer ?? "",
46
- policyAddress: object.policy_address ?? "",
47
- messages: (object.messages ?? []).map((e) => (0, nested_amino_1.aminoToAny)(e)),
48
- metadata: object.metadata ?? "",
49
- };
50
- },
51
- };
52
- }
53
- exports.AminoConverter = {
54
- "/sparkdream.commons.v1.MsgUpdateParams": {
55
- aminoType: "sparkdream/x/commons/MsgUpdateParams",
56
- toAmino: tx_1.MsgUpdateParams.toAmino,
57
- fromAmino: tx_1.MsgUpdateParams.fromAmino,
58
- },
59
- "/sparkdream.commons.v1.MsgSpendFromCommons": {
60
- aminoType: "sparkdream/x/commons/MsgSpendFromCommons",
61
- toAmino(message) {
62
- const obj = {};
63
- obj.authority = message.authority === "" ? undefined : message.authority;
64
- obj.recipient = message.recipient === "" ? undefined : message.recipient;
65
- obj.amount = (message.amount?.length ?? 0) > 0
66
- ? message.amount.map((e) => e ? coin_1.Coin.toAmino(e) : undefined)
67
- : undefined;
68
- return obj;
69
- },
70
- fromAmino: tx_1.MsgSpendFromCommons.fromAmino,
71
- },
72
- "/sparkdream.commons.v1.MsgEmergencyCancelGovProposal": {
73
- aminoType: "sparkdream/x/commons/MsgEmergencyCancelGovProposal",
74
- toAmino: tx_1.MsgEmergencyCancelGovProposal.toAmino,
75
- fromAmino: tx_1.MsgEmergencyCancelGovProposal.fromAmino,
76
- },
77
- "/sparkdream.commons.v1.MsgCreatePolicyPermissions": {
78
- aminoType: "sparkdream/x/commons/MsgCreatePolicyPermissions",
79
- toAmino(message) {
80
- const obj = {};
81
- obj.authority = message.authority === "" ? undefined : message.authority;
82
- obj.policy_address = message.policyAddress === "" ? undefined : message.policyAddress;
83
- obj.allowed_messages = (message.allowedMessages?.length ?? 0) > 0
84
- ? message.allowedMessages.map((e) => e)
85
- : undefined;
86
- return obj;
87
- },
88
- fromAmino: tx_1.MsgCreatePolicyPermissions.fromAmino,
89
- },
90
- "/sparkdream.commons.v1.MsgUpdatePolicyPermissions": {
91
- aminoType: "sparkdream/x/commons/MsgUpdatePolicyPermissions",
92
- toAmino(message) {
93
- const obj = {};
94
- obj.authority = message.authority === "" ? undefined : message.authority;
95
- obj.policy_address = message.policyAddress === "" ? undefined : message.policyAddress;
96
- obj.allowed_messages = (message.allowedMessages?.length ?? 0) > 0
97
- ? message.allowedMessages.map((e) => e)
98
- : undefined;
99
- return obj;
100
- },
101
- fromAmino: tx_1.MsgUpdatePolicyPermissions.fromAmino,
102
- },
103
- "/sparkdream.commons.v1.MsgDeletePolicyPermissions": {
104
- aminoType: "sparkdream/x/commons/MsgDeletePolicyPermissions",
105
- toAmino: tx_1.MsgDeletePolicyPermissions.toAmino,
106
- fromAmino: tx_1.MsgDeletePolicyPermissions.fromAmino,
107
- },
108
- "/sparkdream.commons.v1.MsgRegisterGroup": {
109
- aminoType: "sparkdream/x/commons/MsgRegisterGroup",
110
- toAmino(message) {
111
- const obj = {};
112
- obj.authority = message.authority === "" ? undefined : message.authority;
113
- obj.name = message.name === "" ? undefined : message.name;
114
- obj.description = message.description === "" ? undefined : message.description;
115
- obj.members = (message.members?.length ?? 0) > 0
116
- ? message.members.map((e) => e)
117
- : undefined;
118
- obj.member_weights = (message.memberWeights?.length ?? 0) > 0
119
- ? message.memberWeights.map((e) => e)
120
- : undefined;
121
- obj.funding_weight = message.fundingWeight !== BigInt(0) ? message.fundingWeight?.toString() : undefined;
122
- obj.max_spend_per_epoch = message.maxSpendPerEpoch === "" ? undefined : message.maxSpendPerEpoch;
123
- obj.update_cooldown = message.updateCooldown !== BigInt(0) ? message.updateCooldown?.toString() : undefined;
124
- obj.intended_parent_address = message.intendedParentAddress === "" ? undefined : message.intendedParentAddress;
125
- obj.min_members = message.minMembers !== BigInt(0) ? message.minMembers?.toString() : undefined;
126
- obj.max_members = message.maxMembers !== BigInt(0) ? message.maxMembers?.toString() : undefined;
127
- obj.term_duration = message.termDuration !== BigInt(0) ? message.termDuration?.toString() : undefined;
128
- obj.activation_time = message.activationTime !== BigInt(0) ? message.activationTime?.toString() : undefined;
129
- obj.voting_period = message.votingPeriod !== BigInt(0) ? message.votingPeriod?.toString() : undefined;
130
- obj.min_execution_period = message.minExecutionPeriod !== BigInt(0) ? message.minExecutionPeriod?.toString() : undefined;
131
- obj.futarchy_enabled = message.futarchyEnabled === false ? undefined : message.futarchyEnabled;
132
- obj.vote_threshold = message.voteThreshold === "" ? undefined : message.voteThreshold;
133
- obj.policy_type = message.policyType === "" ? undefined : message.policyType;
134
- obj.allowed_messages = (message.allowedMessages?.length ?? 0) > 0
135
- ? message.allowedMessages.map((e) => e)
136
- : undefined;
137
- obj.electoral_policy_address = message.electoralPolicyAddress === "" ? undefined : message.electoralPolicyAddress;
138
- return obj;
139
- },
140
- fromAmino: tx_1.MsgRegisterGroup.fromAmino,
141
- },
142
- "/sparkdream.commons.v1.MsgRenewGroup": {
143
- aminoType: "sparkdream/x/commons/MsgRenewGroup",
144
- toAmino(message) {
145
- const obj = {};
146
- obj.authority = message.authority === "" ? undefined : message.authority;
147
- obj.group_name = message.groupName === "" ? undefined : message.groupName;
148
- obj.new_members = (message.newMembers?.length ?? 0) > 0
149
- ? message.newMembers.map((e) => e)
150
- : undefined;
151
- obj.new_member_weights = (message.newMemberWeights?.length ?? 0) > 0
152
- ? message.newMemberWeights.map((e) => e)
153
- : undefined;
154
- return obj;
155
- },
156
- fromAmino: tx_1.MsgRenewGroup.fromAmino,
157
- },
158
- // Telescope's auto-generated toAmino emits `[]` for empty repeated fields
159
- // (the `if (message.membersToAdd)` check is truthy for `[]` in JS), but
160
- // aminojson on the chain side omits them. An invite has empty
161
- // `members_to_remove`, a remove has empty `members_to_add`/`weights_to_add`,
162
- // and either combination produces sign-bytes that don't match what the
163
- // chain reconstructs — surfacing as "signature verification failed" /
164
- // "unauthorized". Mirror the omitempty pattern used by the proposal
165
- // converter above.
166
- "/sparkdream.commons.v1.MsgUpdateGroupMembers": {
167
- aminoType: "sparkdream/x/commons/MsgUpdateGroupMembers",
168
- toAmino(message) {
169
- const obj = {};
170
- obj.authority = message.authority === "" ? undefined : message.authority;
171
- obj.group_policy_address = message.groupPolicyAddress === ""
172
- ? undefined
173
- : message.groupPolicyAddress;
174
- obj.members_to_add = (message.membersToAdd?.length ?? 0) > 0
175
- ? message.membersToAdd.map((e) => e)
176
- : undefined;
177
- obj.weights_to_add = (message.weightsToAdd?.length ?? 0) > 0
178
- ? message.weightsToAdd.map((e) => e)
179
- : undefined;
180
- obj.members_to_remove = (message.membersToRemove?.length ?? 0) > 0
181
- ? message.membersToRemove.map((e) => e)
182
- : undefined;
183
- return obj;
184
- },
185
- fromAmino: tx_1.MsgUpdateGroupMembers.fromAmino,
186
- },
187
- "/sparkdream.commons.v1.MsgUpdateGroupConfig": {
188
- aminoType: "sparkdream/x/commons/MsgUpdateGroupConfig",
189
- toAmino: tx_1.MsgUpdateGroupConfig.toAmino,
190
- fromAmino: tx_1.MsgUpdateGroupConfig.fromAmino,
191
- },
192
- "/sparkdream.commons.v1.MsgForceUpgrade": {
193
- aminoType: "sparkdream/x/commons/MsgForceUpgrade",
194
- toAmino: tx_1.MsgForceUpgrade.toAmino,
195
- fromAmino: tx_1.MsgForceUpgrade.fromAmino,
196
- },
197
- "/sparkdream.commons.v1.MsgDeleteGroup": {
198
- aminoType: "sparkdream/x/commons/MsgDeleteGroup",
199
- toAmino: tx_1.MsgDeleteGroup.toAmino,
200
- fromAmino: tx_1.MsgDeleteGroup.fromAmino,
201
- },
202
- "/sparkdream.commons.v1.MsgVetoGroupProposals": {
203
- aminoType: "sparkdream/x/commons/MsgVetoGroupProposals",
204
- toAmino: tx_1.MsgVetoGroupProposals.toAmino,
205
- fromAmino: tx_1.MsgVetoGroupProposals.fromAmino,
206
- },
207
- // Recursive Any handling — see top-of-file comment.
208
- "/sparkdream.commons.v1.MsgSubmitProposal": buildProposalConverter("sparkdream/x/commons/MsgSubmitProposal"),
209
- "/sparkdream.commons.v1.MsgVoteProposal": {
210
- aminoType: "sparkdream/x/commons/MsgVoteProposal",
211
- toAmino: tx_1.MsgVoteProposal.toAmino,
212
- fromAmino: tx_1.MsgVoteProposal.fromAmino,
213
- },
214
- "/sparkdream.commons.v1.MsgExecuteProposal": {
215
- aminoType: "sparkdream/x/commons/MsgExecuteProposal",
216
- toAmino: tx_1.MsgExecuteProposal.toAmino,
217
- fromAmino: tx_1.MsgExecuteProposal.fromAmino,
218
- },
219
- // Recursive Any handling — see top-of-file comment.
220
- "/sparkdream.commons.v1.MsgSubmitAnonymousProposal": buildProposalConverter("sparkdream/x/commons/MsgSubmitAnonymousProposal"),
221
- "/sparkdream.commons.v1.MsgAnonymousVoteProposal": {
222
- aminoType: "sparkdream/x/commons/MsgAnonymousVoteProposal",
223
- toAmino: tx_1.MsgAnonymousVoteProposal.toAmino,
224
- fromAmino: tx_1.MsgAnonymousVoteProposal.fromAmino,
225
- },
226
- "/sparkdream.commons.v1.MsgCreateCategory": {
227
- aminoType: "sparkdream/x/commons/MsgCreateCategory",
228
- toAmino: tx_1.MsgCreateCategory.toAmino,
229
- fromAmino: tx_1.MsgCreateCategory.fromAmino,
230
- },
231
- "/sparkdream.commons.v1.MsgDeleteCategory": {
232
- aminoType: "sparkdream/x/commons/MsgDeleteCategory",
233
- toAmino: tx_1.MsgDeleteCategory.toAmino,
234
- fromAmino: tx_1.MsgDeleteCategory.fromAmino,
235
- },
236
- "/sparkdream.commons.v1.MsgScheduleRecurringSpend": {
237
- aminoType: "sparkdream/x/commons/MsgScheduleRecurringSpend",
238
- toAmino(message) {
239
- const obj = {};
240
- obj.authority = message.authority === "" ? undefined : message.authority;
241
- obj.recipient = message.recipient === "" ? undefined : message.recipient;
242
- obj.amount_per_period = (message.amountPerPeriod?.length ?? 0) > 0
243
- ? message.amountPerPeriod.map((e) => e ? coin_1.Coin.toAmino(e) : undefined)
244
- : undefined;
245
- obj.period_seconds = message.periodSeconds !== BigInt(0) ? message.periodSeconds?.toString() : undefined;
246
- obj.start_time = message.startTime !== BigInt(0) ? message.startTime?.toString() : undefined;
247
- obj.end_time = message.endTime !== BigInt(0) ? message.endTime?.toString() : undefined;
248
- obj.note = message.note === "" ? undefined : message.note;
249
- return obj;
250
- },
251
- fromAmino: tx_1.MsgScheduleRecurringSpend.fromAmino,
252
- },
253
- "/sparkdream.commons.v1.MsgClaimRecurringSpend": {
254
- aminoType: "sparkdream/x/commons/MsgClaimRecurringSpend",
255
- toAmino: tx_1.MsgClaimRecurringSpend.toAmino,
256
- fromAmino: tx_1.MsgClaimRecurringSpend.fromAmino,
257
- },
258
- "/sparkdream.commons.v1.MsgCancelRecurringSpend": {
259
- aminoType: "sparkdream/x/commons/MsgCancelRecurringSpend",
260
- toAmino: tx_1.MsgCancelRecurringSpend.toAmino,
261
- fromAmino: tx_1.MsgCancelRecurringSpend.fromAmino,
262
- },
263
- "/sparkdream.commons.v1.MsgDeclineRecurringSpend": {
264
- aminoType: "sparkdream/x/commons/MsgDeclineRecurringSpend",
265
- toAmino: tx_1.MsgDeclineRecurringSpend.toAmino,
266
- fromAmino: tx_1.MsgDeclineRecurringSpend.fromAmino,
267
- },
268
- };
48
+ // MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
49
+ // the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
50
+ // checks them all against the chain's encoder.
51
+ const tx = __importStar(require("./tx"));
52
+ const chain_amino_1 = require("../../../chain-amino");
53
+ var nested_amino_1 = require("../../../nested-amino");
54
+ Object.defineProperty(exports, "configureNestedAminoConverter", { enumerable: true, get: function () { return nested_amino_1.configureNestedAminoConverter; } });
55
+ exports.AminoConverter = (0, chain_amino_1.chainAminoConverters)("sparkdream.commons.v1", tx);
@@ -1,13 +1 @@
1
- import { MsgUpdateParams, MsgSpend } from "./tx";
2
- export declare const AminoConverter: {
3
- "/sparkdream.ecosystem.v1.MsgUpdateParams": {
4
- aminoType: string;
5
- toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
6
- fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
7
- };
8
- "/sparkdream.ecosystem.v1.MsgSpend": {
9
- aminoType: string;
10
- toAmino(message: any): any;
11
- fromAmino: (object: import("./tx").MsgSpendAmino) => MsgSpend;
12
- };
13
- };
1
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;
@@ -1,31 +1,53 @@
1
1
  "use strict";
2
- //@ts-nocheck
3
- // HAND-WRITTEN OVERRIDE — overlaid by scripts/codegen.ts after telescope.
4
- // See ../../commons/v1/tx.amino.ts for the broader rationale.
5
- //
6
- // MsgSpend has `repeated cosmos.base.v1beta1.Coin amount` which the
7
- // auto-generated toAmino emits as `[]` when empty, mismatching the chain.
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
8
35
  Object.defineProperty(exports, "__esModule", { value: true });
9
36
  exports.AminoConverter = void 0;
10
- const tx_1 = require("./tx");
11
- const coin_1 = require("../../../cosmos/base/v1beta1/coin");
12
- exports.AminoConverter = {
13
- "/sparkdream.ecosystem.v1.MsgUpdateParams": {
14
- aminoType: "sparkdream/x/ecosystem/MsgUpdateParams",
15
- toAmino: tx_1.MsgUpdateParams.toAmino,
16
- fromAmino: tx_1.MsgUpdateParams.fromAmino,
17
- },
18
- "/sparkdream.ecosystem.v1.MsgSpend": {
19
- aminoType: "sparkdream/x/ecosystem/MsgSpend",
20
- toAmino(message) {
21
- const obj = {};
22
- obj.authority = message.authority === "" ? undefined : message.authority;
23
- obj.recipient = message.recipient === "" ? undefined : message.recipient;
24
- obj.amount = (message.amount?.length ?? 0) > 0
25
- ? message.amount.map((e) => e ? coin_1.Coin.toAmino(e) : undefined)
26
- : undefined;
27
- return obj;
28
- },
29
- fromAmino: tx_1.MsgSpend.fromAmino,
30
- },
31
- };
37
+ //@ts-nocheck
38
+ // HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
39
+ // by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
40
+ //
41
+ // Why: Telescope's generated converters (and the per-message overrides that
42
+ // used to patch them) disagree with the chain's aminojson on empty lists,
43
+ // empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
44
+ // whenever a proto changed. Every Msg of x/ecosystem is converted by the
45
+ // schema-driven engine in chain-amino.ts instead, which renders amino JSON
46
+ // from the protobuf bytes exactly as the chain does.
47
+ //
48
+ // MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
49
+ // the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
50
+ // checks them all against the chain's encoder.
51
+ const tx = __importStar(require("./tx"));
52
+ const chain_amino_1 = require("../../../chain-amino");
53
+ exports.AminoConverter = (0, chain_amino_1.chainAminoConverters)("sparkdream.ecosystem.v1", tx);
@@ -1,128 +1 @@
1
- import { MsgUpdateParams, MsgRegisterPeer, MsgRemovePeer, MsgSuspendPeer, MsgResumePeer, MsgUpdatePeerPolicy, MsgRegisterBridge, MsgUpdateBridge, MsgSubmitFederatedContent, MsgFederateContent, MsgAttestOutbound, MsgModerateContent, MsgLinkIdentity, MsgUnlinkIdentity, MsgConfirmIdentityLink, MsgRequestReputationAttestation, MsgVerifyContent, MsgChallengeVerification, MsgSubmitArbiterHash, MsgEscalateChallenge, MsgResolveEscalatedChallenge, MsgUpdateOperationalParams, MsgUpdatePeerController, MsgResyncBridgeCount, MsgPruneOrphanBindings } from "./tx";
2
- export declare const AminoConverter: {
3
- "/sparkdream.federation.v1.MsgUpdateParams": {
4
- aminoType: string;
5
- toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
6
- fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
7
- };
8
- "/sparkdream.federation.v1.MsgRegisterPeer": {
9
- aminoType: string;
10
- toAmino: (message: MsgRegisterPeer) => import("./tx").MsgRegisterPeerAmino;
11
- fromAmino: (object: import("./tx").MsgRegisterPeerAmino) => MsgRegisterPeer;
12
- };
13
- "/sparkdream.federation.v1.MsgRemovePeer": {
14
- aminoType: string;
15
- toAmino: (message: MsgRemovePeer) => import("./tx").MsgRemovePeerAmino;
16
- fromAmino: (object: import("./tx").MsgRemovePeerAmino) => MsgRemovePeer;
17
- };
18
- "/sparkdream.federation.v1.MsgSuspendPeer": {
19
- aminoType: string;
20
- toAmino: (message: MsgSuspendPeer) => import("./tx").MsgSuspendPeerAmino;
21
- fromAmino: (object: import("./tx").MsgSuspendPeerAmino) => MsgSuspendPeer;
22
- };
23
- "/sparkdream.federation.v1.MsgResumePeer": {
24
- aminoType: string;
25
- toAmino: (message: MsgResumePeer) => import("./tx").MsgResumePeerAmino;
26
- fromAmino: (object: import("./tx").MsgResumePeerAmino) => MsgResumePeer;
27
- };
28
- "/sparkdream.federation.v1.MsgUpdatePeerPolicy": {
29
- aminoType: string;
30
- toAmino(message: any): any;
31
- fromAmino: (object: import("./tx").MsgUpdatePeerPolicyAmino) => MsgUpdatePeerPolicy;
32
- };
33
- "/sparkdream.federation.v1.MsgRegisterBridge": {
34
- aminoType: string;
35
- toAmino: (message: MsgRegisterBridge) => import("./tx").MsgRegisterBridgeAmino;
36
- fromAmino: (object: import("./tx").MsgRegisterBridgeAmino) => MsgRegisterBridge;
37
- };
38
- "/sparkdream.federation.v1.MsgUpdateBridge": {
39
- aminoType: string;
40
- toAmino: (message: MsgUpdateBridge) => import("./tx").MsgUpdateBridgeAmino;
41
- fromAmino: (object: import("./tx").MsgUpdateBridgeAmino) => MsgUpdateBridge;
42
- };
43
- "/sparkdream.federation.v1.MsgSubmitFederatedContent": {
44
- aminoType: string;
45
- toAmino: (message: MsgSubmitFederatedContent) => import("./tx").MsgSubmitFederatedContentAmino;
46
- fromAmino: (object: import("./tx").MsgSubmitFederatedContentAmino) => MsgSubmitFederatedContent;
47
- };
48
- "/sparkdream.federation.v1.MsgFederateContent": {
49
- aminoType: string;
50
- toAmino: (message: MsgFederateContent) => import("./tx").MsgFederateContentAmino;
51
- fromAmino: (object: import("./tx").MsgFederateContentAmino) => MsgFederateContent;
52
- };
53
- "/sparkdream.federation.v1.MsgAttestOutbound": {
54
- aminoType: string;
55
- toAmino: (message: MsgAttestOutbound) => import("./tx").MsgAttestOutboundAmino;
56
- fromAmino: (object: import("./tx").MsgAttestOutboundAmino) => MsgAttestOutbound;
57
- };
58
- "/sparkdream.federation.v1.MsgModerateContent": {
59
- aminoType: string;
60
- toAmino: (message: MsgModerateContent) => import("./tx").MsgModerateContentAmino;
61
- fromAmino: (object: import("./tx").MsgModerateContentAmino) => MsgModerateContent;
62
- };
63
- "/sparkdream.federation.v1.MsgLinkIdentity": {
64
- aminoType: string;
65
- toAmino: (message: MsgLinkIdentity) => import("./tx").MsgLinkIdentityAmino;
66
- fromAmino: (object: import("./tx").MsgLinkIdentityAmino) => MsgLinkIdentity;
67
- };
68
- "/sparkdream.federation.v1.MsgUnlinkIdentity": {
69
- aminoType: string;
70
- toAmino: (message: MsgUnlinkIdentity) => import("./tx").MsgUnlinkIdentityAmino;
71
- fromAmino: (object: import("./tx").MsgUnlinkIdentityAmino) => MsgUnlinkIdentity;
72
- };
73
- "/sparkdream.federation.v1.MsgConfirmIdentityLink": {
74
- aminoType: string;
75
- toAmino: (message: MsgConfirmIdentityLink) => import("./tx").MsgConfirmIdentityLinkAmino;
76
- fromAmino: (object: import("./tx").MsgConfirmIdentityLinkAmino) => MsgConfirmIdentityLink;
77
- };
78
- "/sparkdream.federation.v1.MsgRequestReputationAttestation": {
79
- aminoType: string;
80
- toAmino: (message: MsgRequestReputationAttestation) => import("./tx").MsgRequestReputationAttestationAmino;
81
- fromAmino: (object: import("./tx").MsgRequestReputationAttestationAmino) => MsgRequestReputationAttestation;
82
- };
83
- "/sparkdream.federation.v1.MsgVerifyContent": {
84
- aminoType: string;
85
- toAmino: (message: MsgVerifyContent) => import("./tx").MsgVerifyContentAmino;
86
- fromAmino: (object: import("./tx").MsgVerifyContentAmino) => MsgVerifyContent;
87
- };
88
- "/sparkdream.federation.v1.MsgChallengeVerification": {
89
- aminoType: string;
90
- toAmino: (message: MsgChallengeVerification) => import("./tx").MsgChallengeVerificationAmino;
91
- fromAmino: (object: import("./tx").MsgChallengeVerificationAmino) => MsgChallengeVerification;
92
- };
93
- "/sparkdream.federation.v1.MsgSubmitArbiterHash": {
94
- aminoType: string;
95
- toAmino: (message: MsgSubmitArbiterHash) => import("./tx").MsgSubmitArbiterHashAmino;
96
- fromAmino: (object: import("./tx").MsgSubmitArbiterHashAmino) => MsgSubmitArbiterHash;
97
- };
98
- "/sparkdream.federation.v1.MsgEscalateChallenge": {
99
- aminoType: string;
100
- toAmino: (message: MsgEscalateChallenge) => import("./tx").MsgEscalateChallengeAmino;
101
- fromAmino: (object: import("./tx").MsgEscalateChallengeAmino) => MsgEscalateChallenge;
102
- };
103
- "/sparkdream.federation.v1.MsgResolveEscalatedChallenge": {
104
- aminoType: string;
105
- toAmino: (message: MsgResolveEscalatedChallenge) => import("./tx").MsgResolveEscalatedChallengeAmino;
106
- fromAmino: (object: import("./tx").MsgResolveEscalatedChallengeAmino) => MsgResolveEscalatedChallenge;
107
- };
108
- "/sparkdream.federation.v1.MsgUpdateOperationalParams": {
109
- aminoType: string;
110
- toAmino: (message: MsgUpdateOperationalParams) => import("./tx").MsgUpdateOperationalParamsAmino;
111
- fromAmino: (object: import("./tx").MsgUpdateOperationalParamsAmino) => MsgUpdateOperationalParams;
112
- };
113
- "/sparkdream.federation.v1.MsgUpdatePeerController": {
114
- aminoType: string;
115
- toAmino: (message: MsgUpdatePeerController) => import("./tx").MsgUpdatePeerControllerAmino;
116
- fromAmino: (object: import("./tx").MsgUpdatePeerControllerAmino) => MsgUpdatePeerController;
117
- };
118
- "/sparkdream.federation.v1.MsgResyncBridgeCount": {
119
- aminoType: string;
120
- toAmino: (message: MsgResyncBridgeCount) => import("./tx").MsgResyncBridgeCountAmino;
121
- fromAmino: (object: import("./tx").MsgResyncBridgeCountAmino) => MsgResyncBridgeCount;
122
- };
123
- "/sparkdream.federation.v1.MsgPruneOrphanBindings": {
124
- aminoType: string;
125
- toAmino: (message: MsgPruneOrphanBindings) => import("./tx").MsgPruneOrphanBindingsAmino;
126
- fromAmino: (object: import("./tx").MsgPruneOrphanBindingsAmino) => MsgPruneOrphanBindings;
127
- };
128
- };
1
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;