@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,236 +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
- // Telescope emits `[]` for empty repeated fields; aminojson on the chain omits
7
- // them. In forum the offending messages are MsgCreatePost and MsgEditPost,
8
- // both of which have a repeated `tags` field that's commonly empty.
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
+ })();
9
35
  Object.defineProperty(exports, "__esModule", { value: true });
10
36
  exports.AminoConverter = void 0;
11
- const tx_1 = require("./tx");
12
- exports.AminoConverter = {
13
- "/sparkdream.forum.v1.MsgUpdateParams": {
14
- aminoType: "sparkdream/x/forum/MsgUpdateParams",
15
- toAmino: tx_1.MsgUpdateParams.toAmino,
16
- fromAmino: tx_1.MsgUpdateParams.fromAmino,
17
- },
18
- "/sparkdream.forum.v1.MsgUpdateOperationalParams": {
19
- aminoType: "sparkdream/x/forum/MsgUpdateOperationalParams",
20
- toAmino: tx_1.MsgUpdateOperationalParams.toAmino,
21
- fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino,
22
- },
23
- "/sparkdream.forum.v1.MsgCreatePost": {
24
- aminoType: "sparkdream/x/forum/MsgCreatePost",
25
- toAmino(message) {
26
- const obj = {};
27
- obj.creator = message.creator === "" ? undefined : message.creator;
28
- obj.category_id = message.categoryId !== BigInt(0) ? message.categoryId?.toString() : undefined;
29
- obj.parent_id = message.parentId !== BigInt(0) ? message.parentId?.toString() : undefined;
30
- obj.content = message.content === "" ? undefined : message.content;
31
- obj.tags = (message.tags?.length ?? 0) > 0
32
- ? message.tags.map((e) => e)
33
- : undefined;
34
- obj.content_type = message.contentType === 0 ? undefined : message.contentType;
35
- obj.author_bond = message.authorBond === null ? undefined : message.authorBond;
36
- obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
37
- return obj;
38
- },
39
- fromAmino: tx_1.MsgCreatePost.fromAmino,
40
- },
41
- "/sparkdream.forum.v1.MsgEditPost": {
42
- aminoType: "sparkdream/x/forum/MsgEditPost",
43
- toAmino(message) {
44
- const obj = {};
45
- obj.creator = message.creator === "" ? undefined : message.creator;
46
- obj.post_id = message.postId !== BigInt(0) ? message.postId?.toString() : undefined;
47
- obj.new_content = message.newContent === "" ? undefined : message.newContent;
48
- obj.tags = (message.tags?.length ?? 0) > 0
49
- ? message.tags.map((e) => e)
50
- : undefined;
51
- obj.content_type = message.contentType === 0 ? undefined : message.contentType;
52
- return obj;
53
- },
54
- fromAmino: tx_1.MsgEditPost.fromAmino,
55
- },
56
- "/sparkdream.forum.v1.MsgDeletePost": {
57
- aminoType: "sparkdream/x/forum/MsgDeletePost",
58
- toAmino: tx_1.MsgDeletePost.toAmino,
59
- fromAmino: tx_1.MsgDeletePost.fromAmino,
60
- },
61
- "/sparkdream.forum.v1.MsgFreezeThread": {
62
- aminoType: "sparkdream/x/forum/MsgFreezeThread",
63
- toAmino: tx_1.MsgFreezeThread.toAmino,
64
- fromAmino: tx_1.MsgFreezeThread.fromAmino,
65
- },
66
- "/sparkdream.forum.v1.MsgUnarchiveThread": {
67
- aminoType: "sparkdream/x/forum/MsgUnarchiveThread",
68
- toAmino: tx_1.MsgUnarchiveThread.toAmino,
69
- fromAmino: tx_1.MsgUnarchiveThread.fromAmino,
70
- },
71
- "/sparkdream.forum.v1.MsgPinPost": {
72
- aminoType: "sparkdream/x/forum/MsgPinPost",
73
- toAmino: tx_1.MsgPinPost.toAmino,
74
- fromAmino: tx_1.MsgPinPost.fromAmino,
75
- },
76
- "/sparkdream.forum.v1.MsgUnpinPost": {
77
- aminoType: "sparkdream/x/forum/MsgUnpinPost",
78
- toAmino: tx_1.MsgUnpinPost.toAmino,
79
- fromAmino: tx_1.MsgUnpinPost.fromAmino,
80
- },
81
- "/sparkdream.forum.v1.MsgLockThread": {
82
- aminoType: "sparkdream/x/forum/MsgLockThread",
83
- toAmino: tx_1.MsgLockThread.toAmino,
84
- fromAmino: tx_1.MsgLockThread.fromAmino,
85
- },
86
- "/sparkdream.forum.v1.MsgUnlockThread": {
87
- aminoType: "sparkdream/x/forum/MsgUnlockThread",
88
- toAmino: tx_1.MsgUnlockThread.toAmino,
89
- fromAmino: tx_1.MsgUnlockThread.fromAmino,
90
- },
91
- "/sparkdream.forum.v1.MsgMoveThread": {
92
- aminoType: "sparkdream/x/forum/MsgMoveThread",
93
- toAmino: tx_1.MsgMoveThread.toAmino,
94
- fromAmino: tx_1.MsgMoveThread.fromAmino,
95
- },
96
- "/sparkdream.forum.v1.MsgFollowThread": {
97
- aminoType: "sparkdream/x/forum/MsgFollowThread",
98
- toAmino: tx_1.MsgFollowThread.toAmino,
99
- fromAmino: tx_1.MsgFollowThread.fromAmino,
100
- },
101
- "/sparkdream.forum.v1.MsgUnfollowThread": {
102
- aminoType: "sparkdream/x/forum/MsgUnfollowThread",
103
- toAmino: tx_1.MsgUnfollowThread.toAmino,
104
- fromAmino: tx_1.MsgUnfollowThread.fromAmino,
105
- },
106
- "/sparkdream.forum.v1.MsgUpvotePost": {
107
- aminoType: "sparkdream/x/forum/MsgUpvotePost",
108
- toAmino: tx_1.MsgUpvotePost.toAmino,
109
- fromAmino: tx_1.MsgUpvotePost.fromAmino,
110
- },
111
- "/sparkdream.forum.v1.MsgDownvotePost": {
112
- aminoType: "sparkdream/x/forum/MsgDownvotePost",
113
- toAmino: tx_1.MsgDownvotePost.toAmino,
114
- fromAmino: tx_1.MsgDownvotePost.fromAmino,
115
- },
116
- "/sparkdream.forum.v1.MsgFlagPost": {
117
- aminoType: "sparkdream/x/forum/MsgFlagPost",
118
- toAmino: tx_1.MsgFlagPost.toAmino,
119
- fromAmino: tx_1.MsgFlagPost.fromAmino,
120
- },
121
- "/sparkdream.forum.v1.MsgDismissFlags": {
122
- aminoType: "sparkdream/x/forum/MsgDismissFlags",
123
- toAmino: tx_1.MsgDismissFlags.toAmino,
124
- fromAmino: tx_1.MsgDismissFlags.fromAmino,
125
- },
126
- "/sparkdream.forum.v1.MsgHidePost": {
127
- aminoType: "sparkdream/x/forum/MsgHidePost",
128
- toAmino: tx_1.MsgHidePost.toAmino,
129
- fromAmino: tx_1.MsgHidePost.fromAmino,
130
- },
131
- "/sparkdream.forum.v1.MsgUnhidePost": {
132
- aminoType: "sparkdream/x/forum/MsgUnhidePost",
133
- toAmino: tx_1.MsgUnhidePost.toAmino,
134
- fromAmino: tx_1.MsgUnhidePost.fromAmino,
135
- },
136
- "/sparkdream.forum.v1.MsgAppealPost": {
137
- aminoType: "sparkdream/x/forum/MsgAppealPost",
138
- toAmino: tx_1.MsgAppealPost.toAmino,
139
- fromAmino: tx_1.MsgAppealPost.fromAmino,
140
- },
141
- "/sparkdream.forum.v1.MsgAppealThreadLock": {
142
- aminoType: "sparkdream/x/forum/MsgAppealThreadLock",
143
- toAmino: tx_1.MsgAppealThreadLock.toAmino,
144
- fromAmino: tx_1.MsgAppealThreadLock.fromAmino,
145
- },
146
- "/sparkdream.forum.v1.MsgAppealThreadMove": {
147
- aminoType: "sparkdream/x/forum/MsgAppealThreadMove",
148
- toAmino: tx_1.MsgAppealThreadMove.toAmino,
149
- fromAmino: tx_1.MsgAppealThreadMove.fromAmino,
150
- },
151
- "/sparkdream.forum.v1.MsgCreateBounty": {
152
- aminoType: "sparkdream/x/forum/MsgCreateBounty",
153
- toAmino: tx_1.MsgCreateBounty.toAmino,
154
- fromAmino: tx_1.MsgCreateBounty.fromAmino,
155
- },
156
- "/sparkdream.forum.v1.MsgAwardBounty": {
157
- aminoType: "sparkdream/x/forum/MsgAwardBounty",
158
- toAmino: tx_1.MsgAwardBounty.toAmino,
159
- fromAmino: tx_1.MsgAwardBounty.fromAmino,
160
- },
161
- "/sparkdream.forum.v1.MsgIncreaseBounty": {
162
- aminoType: "sparkdream/x/forum/MsgIncreaseBounty",
163
- toAmino: tx_1.MsgIncreaseBounty.toAmino,
164
- fromAmino: tx_1.MsgIncreaseBounty.fromAmino,
165
- },
166
- "/sparkdream.forum.v1.MsgCancelBounty": {
167
- aminoType: "sparkdream/x/forum/MsgCancelBounty",
168
- toAmino: tx_1.MsgCancelBounty.toAmino,
169
- fromAmino: tx_1.MsgCancelBounty.fromAmino,
170
- },
171
- "/sparkdream.forum.v1.MsgAssignBountyToReply": {
172
- aminoType: "sparkdream/x/forum/MsgAssignBountyToReply",
173
- toAmino: tx_1.MsgAssignBountyToReply.toAmino,
174
- fromAmino: tx_1.MsgAssignBountyToReply.fromAmino,
175
- },
176
- "/sparkdream.forum.v1.MsgPinReply": {
177
- aminoType: "sparkdream/x/forum/MsgPinReply",
178
- toAmino: tx_1.MsgPinReply.toAmino,
179
- fromAmino: tx_1.MsgPinReply.fromAmino,
180
- },
181
- "/sparkdream.forum.v1.MsgUnpinReply": {
182
- aminoType: "sparkdream/x/forum/MsgUnpinReply",
183
- toAmino: tx_1.MsgUnpinReply.toAmino,
184
- fromAmino: tx_1.MsgUnpinReply.fromAmino,
185
- },
186
- "/sparkdream.forum.v1.MsgDisputePin": {
187
- aminoType: "sparkdream/x/forum/MsgDisputePin",
188
- toAmino: tx_1.MsgDisputePin.toAmino,
189
- fromAmino: tx_1.MsgDisputePin.fromAmino,
190
- },
191
- "/sparkdream.forum.v1.MsgMarkAcceptedReply": {
192
- aminoType: "sparkdream/x/forum/MsgMarkAcceptedReply",
193
- toAmino: tx_1.MsgMarkAcceptedReply.toAmino,
194
- fromAmino: tx_1.MsgMarkAcceptedReply.fromAmino,
195
- },
196
- "/sparkdream.forum.v1.MsgConfirmProposedReply": {
197
- aminoType: "sparkdream/x/forum/MsgConfirmProposedReply",
198
- toAmino: tx_1.MsgConfirmProposedReply.toAmino,
199
- fromAmino: tx_1.MsgConfirmProposedReply.fromAmino,
200
- },
201
- "/sparkdream.forum.v1.MsgRejectProposedReply": {
202
- aminoType: "sparkdream/x/forum/MsgRejectProposedReply",
203
- toAmino: tx_1.MsgRejectProposedReply.toAmino,
204
- fromAmino: tx_1.MsgRejectProposedReply.fromAmino,
205
- },
206
- "/sparkdream.forum.v1.MsgSetForumPaused": {
207
- aminoType: "sparkdream/x/forum/MsgSetForumPaused",
208
- toAmino: tx_1.MsgSetForumPaused.toAmino,
209
- fromAmino: tx_1.MsgSetForumPaused.fromAmino,
210
- },
211
- "/sparkdream.forum.v1.MsgSetModerationPaused": {
212
- aminoType: "sparkdream/x/forum/MsgSetModerationPaused",
213
- toAmino: tx_1.MsgSetModerationPaused.toAmino,
214
- fromAmino: tx_1.MsgSetModerationPaused.fromAmino,
215
- },
216
- "/sparkdream.forum.v1.MsgMakePostPermanent": {
217
- aminoType: "sparkdream/x/forum/MsgMakePostPermanent",
218
- toAmino: tx_1.MsgMakePostPermanent.toAmino,
219
- fromAmino: tx_1.MsgMakePostPermanent.fromAmino,
220
- },
221
- "/sparkdream.forum.v1.MsgStakePostConviction": {
222
- aminoType: "sparkdream/x/forum/MsgStakePostConviction",
223
- toAmino: tx_1.MsgStakePostConviction.toAmino,
224
- fromAmino: tx_1.MsgStakePostConviction.fromAmino,
225
- },
226
- "/sparkdream.forum.v1.MsgReleasePostConviction": {
227
- aminoType: "sparkdream/x/forum/MsgReleasePostConviction",
228
- toAmino: tx_1.MsgReleasePostConviction.toAmino,
229
- fromAmino: tx_1.MsgReleasePostConviction.fromAmino,
230
- },
231
- "/sparkdream.forum.v1.MsgSetThreadProposalsLock": {
232
- aminoType: "sparkdream/x/forum/MsgSetThreadProposalsLock",
233
- toAmino: tx_1.MsgSetThreadProposalsLock.toAmino,
234
- fromAmino: tx_1.MsgSetThreadProposalsLock.fromAmino,
235
- },
236
- };
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/forum 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.forum.v1", tx);
@@ -1,38 +1 @@
1
- import { MsgUpdateParams, MsgUpdateOperationalParams, MsgCreateMarket, MsgTrade, MsgRedeem, MsgCancelMarket, MsgWithdrawLiquidity } from "./tx";
2
- export declare const AminoConverter: {
3
- "/sparkdream.futarchy.v1.MsgUpdateParams": {
4
- aminoType: string;
5
- toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
6
- fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
7
- };
8
- "/sparkdream.futarchy.v1.MsgUpdateOperationalParams": {
9
- aminoType: string;
10
- toAmino: (message: MsgUpdateOperationalParams) => import("./tx").MsgUpdateOperationalParamsAmino;
11
- fromAmino: (object: import("./tx").MsgUpdateOperationalParamsAmino) => MsgUpdateOperationalParams;
12
- };
13
- "/sparkdream.futarchy.v1.MsgCreateMarket": {
14
- aminoType: string;
15
- toAmino: (message: MsgCreateMarket) => import("./tx").MsgCreateMarketAmino;
16
- fromAmino: (object: import("./tx").MsgCreateMarketAmino) => MsgCreateMarket;
17
- };
18
- "/sparkdream.futarchy.v1.MsgTrade": {
19
- aminoType: string;
20
- toAmino: (message: MsgTrade) => import("./tx").MsgTradeAmino;
21
- fromAmino: (object: import("./tx").MsgTradeAmino) => MsgTrade;
22
- };
23
- "/sparkdream.futarchy.v1.MsgRedeem": {
24
- aminoType: string;
25
- toAmino: (message: MsgRedeem) => import("./tx").MsgRedeemAmino;
26
- fromAmino: (object: import("./tx").MsgRedeemAmino) => MsgRedeem;
27
- };
28
- "/sparkdream.futarchy.v1.MsgCancelMarket": {
29
- aminoType: string;
30
- toAmino: (message: MsgCancelMarket) => import("./tx").MsgCancelMarketAmino;
31
- fromAmino: (object: import("./tx").MsgCancelMarketAmino) => MsgCancelMarket;
32
- };
33
- "/sparkdream.futarchy.v1.MsgWithdrawLiquidity": {
34
- aminoType: string;
35
- toAmino: (message: MsgWithdrawLiquidity) => import("./tx").MsgWithdrawLiquidityAmino;
36
- fromAmino: (object: import("./tx").MsgWithdrawLiquidityAmino) => MsgWithdrawLiquidity;
37
- };
38
- };
1
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;
@@ -1,42 +1,53 @@
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
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.AminoConverter = void 0;
4
37
  //@ts-nocheck
5
- const tx_1 = require("./tx");
6
- exports.AminoConverter = {
7
- "/sparkdream.futarchy.v1.MsgUpdateParams": {
8
- aminoType: "sparkdream/x/futarchy/MsgUpdateParams",
9
- toAmino: tx_1.MsgUpdateParams.toAmino,
10
- fromAmino: tx_1.MsgUpdateParams.fromAmino
11
- },
12
- "/sparkdream.futarchy.v1.MsgUpdateOperationalParams": {
13
- aminoType: "sparkdream/x/futarchy/MsgUpdateOperationalParams",
14
- toAmino: tx_1.MsgUpdateOperationalParams.toAmino,
15
- fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino
16
- },
17
- "/sparkdream.futarchy.v1.MsgCreateMarket": {
18
- aminoType: "sparkdream/x/futarchy/MsgCreateMarket",
19
- toAmino: tx_1.MsgCreateMarket.toAmino,
20
- fromAmino: tx_1.MsgCreateMarket.fromAmino
21
- },
22
- "/sparkdream.futarchy.v1.MsgTrade": {
23
- aminoType: "sparkdream/x/futarchy/MsgTrade",
24
- toAmino: tx_1.MsgTrade.toAmino,
25
- fromAmino: tx_1.MsgTrade.fromAmino
26
- },
27
- "/sparkdream.futarchy.v1.MsgRedeem": {
28
- aminoType: "sparkdream/x/futarchy/MsgRedeem",
29
- toAmino: tx_1.MsgRedeem.toAmino,
30
- fromAmino: tx_1.MsgRedeem.fromAmino
31
- },
32
- "/sparkdream.futarchy.v1.MsgCancelMarket": {
33
- aminoType: "sparkdream/x/futarchy/MsgCancelMarket",
34
- toAmino: tx_1.MsgCancelMarket.toAmino,
35
- fromAmino: tx_1.MsgCancelMarket.fromAmino
36
- },
37
- "/sparkdream.futarchy.v1.MsgWithdrawLiquidity": {
38
- aminoType: "sparkdream/x/futarchy/MsgWithdrawLiquidity",
39
- toAmino: tx_1.MsgWithdrawLiquidity.toAmino,
40
- fromAmino: tx_1.MsgWithdrawLiquidity.fromAmino
41
- }
42
- };
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/futarchy 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.futarchy.v1", tx);
@@ -1,8 +1,2 @@
1
1
  export { configureNestedAminoConverter } from "../../../nested-amino";
2
- export declare const AminoConverter: {
3
- "/sparkdream.guardian.v1.MsgExec": {
4
- aminoType: string;
5
- toAmino(message: any): any;
6
- fromAmino(object: any): any;
7
- };
8
- };
2
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;
@@ -1,43 +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
- // MsgExec (`google.protobuf.Any inner`), the auto-generated toAmino calls
9
- // Any.toAmino, which just attaches the raw Uint8Array bytes — Ledger rejects
10
- // the resulting JSON ("Dictionaries are not sorted") and the chain produces
11
- // different sign bytes ("signature verification failed").
12
- //
13
- // This override delegates the inner Any conversion to a consumer-supplied
14
- // proto registry + AminoTypes via `configureNestedAminoConverter`.
15
- // The rest of the converters are unchanged.
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/guardian 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.
16
47
  //
17
- // MAINTENANCE: this map REPLACES the generated one wholesale, so it must list
18
- // every message in tx.proto. A message added to the proto but not added here
19
- // ends up with no amino converter at all, and amino (Ledger) signing for it
20
- // fails at runtime. When syncing protos, diff the message list in
21
- // protos/sparkdream/guardian/v1/tx.proto against the keys below.
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.AminoConverter = exports.configureNestedAminoConverter = void 0;
24
- const nested_amino_1 = require("../../../nested-amino");
25
- var nested_amino_2 = require("../../../nested-amino");
26
- Object.defineProperty(exports, "configureNestedAminoConverter", { enumerable: true, get: function () { return nested_amino_2.configureNestedAminoConverter; } });
27
- exports.AminoConverter = {
28
- "/sparkdream.guardian.v1.MsgExec": {
29
- aminoType: "sparkdream/x/guardian/MsgExec",
30
- toAmino(message) {
31
- const obj = {};
32
- obj.authority = message.authority === "" ? undefined : message.authority;
33
- obj.inner = message.inner ? (0, nested_amino_1.anyToAmino)(message.inner) : undefined;
34
- return obj;
35
- },
36
- fromAmino(object) {
37
- return {
38
- authority: object.authority ?? "",
39
- inner: object.inner ? (0, nested_amino_1.aminoToAny)(object.inner) : undefined,
40
- };
41
- },
42
- }
43
- };
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.guardian.v1", tx);
@@ -1,63 +1 @@
1
- import { MsgUpdateParams, MsgUpdateOperationalParams, MsgRegisterName, MsgSetPrimary, MsgFileDispute, MsgContestDispute, MsgResolveDispute, MsgUpdateName, MsgSetDisplayName, MsgSetTarget, MsgAcceptTarget, MsgTransferName } from "./tx";
2
- export declare const AminoConverter: {
3
- "/sparkdream.name.v1.MsgUpdateParams": {
4
- aminoType: string;
5
- toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
6
- fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
7
- };
8
- "/sparkdream.name.v1.MsgUpdateOperationalParams": {
9
- aminoType: string;
10
- toAmino: (message: MsgUpdateOperationalParams) => import("./tx").MsgUpdateOperationalParamsAmino;
11
- fromAmino: (object: import("./tx").MsgUpdateOperationalParamsAmino) => MsgUpdateOperationalParams;
12
- };
13
- "/sparkdream.name.v1.MsgRegisterName": {
14
- aminoType: string;
15
- toAmino: (message: MsgRegisterName) => import("./tx").MsgRegisterNameAmino;
16
- fromAmino: (object: import("./tx").MsgRegisterNameAmino) => MsgRegisterName;
17
- };
18
- "/sparkdream.name.v1.MsgSetPrimary": {
19
- aminoType: string;
20
- toAmino: (message: MsgSetPrimary) => import("./tx").MsgSetPrimaryAmino;
21
- fromAmino: (object: import("./tx").MsgSetPrimaryAmino) => MsgSetPrimary;
22
- };
23
- "/sparkdream.name.v1.MsgFileDispute": {
24
- aminoType: string;
25
- toAmino: (message: MsgFileDispute) => import("./tx").MsgFileDisputeAmino;
26
- fromAmino: (object: import("./tx").MsgFileDisputeAmino) => MsgFileDispute;
27
- };
28
- "/sparkdream.name.v1.MsgContestDispute": {
29
- aminoType: string;
30
- toAmino: (message: MsgContestDispute) => import("./tx").MsgContestDisputeAmino;
31
- fromAmino: (object: import("./tx").MsgContestDisputeAmino) => MsgContestDispute;
32
- };
33
- "/sparkdream.name.v1.MsgResolveDispute": {
34
- aminoType: string;
35
- toAmino: (message: MsgResolveDispute) => import("./tx").MsgResolveDisputeAmino;
36
- fromAmino: (object: import("./tx").MsgResolveDisputeAmino) => MsgResolveDispute;
37
- };
38
- "/sparkdream.name.v1.MsgUpdateName": {
39
- aminoType: string;
40
- toAmino: (message: MsgUpdateName) => import("./tx").MsgUpdateNameAmino;
41
- fromAmino: (object: import("./tx").MsgUpdateNameAmino) => MsgUpdateName;
42
- };
43
- "/sparkdream.name.v1.MsgSetDisplayName": {
44
- aminoType: string;
45
- toAmino: (message: MsgSetDisplayName) => import("./tx").MsgSetDisplayNameAmino;
46
- fromAmino: (object: import("./tx").MsgSetDisplayNameAmino) => MsgSetDisplayName;
47
- };
48
- "/sparkdream.name.v1.MsgSetTarget": {
49
- aminoType: string;
50
- toAmino: (message: MsgSetTarget) => import("./tx").MsgSetTargetAmino;
51
- fromAmino: (object: import("./tx").MsgSetTargetAmino) => MsgSetTarget;
52
- };
53
- "/sparkdream.name.v1.MsgAcceptTarget": {
54
- aminoType: string;
55
- toAmino: (message: MsgAcceptTarget) => import("./tx").MsgAcceptTargetAmino;
56
- fromAmino: (object: import("./tx").MsgAcceptTargetAmino) => MsgAcceptTarget;
57
- };
58
- "/sparkdream.name.v1.MsgTransferName": {
59
- aminoType: string;
60
- toAmino: (message: MsgTransferName) => import("./tx").MsgTransferNameAmino;
61
- fromAmino: (object: import("./tx").MsgTransferNameAmino) => MsgTransferName;
62
- };
63
- };
1
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;