@sparkdreamnft/sparkdreamjs 0.0.16 → 0.0.17
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.
- package/esm/sparkdream/blog/v1/tx.amino.js +53 -20
- package/esm/sparkdream/collect/v1/tx.amino.js +138 -36
- package/esm/sparkdream/commons/v1/tx.amino.js +76 -6
- package/esm/sparkdream/ecosystem/v1/tx.amino.js +18 -4
- package/esm/sparkdream/forum/v1/tx.amino.js +69 -40
- package/esm/sparkdream/rep/v1/tx.amino.js +177 -58
- package/esm/sparkdream/reveal/v1/tx.amino.js +34 -13
- package/esm/sparkdream/session/v1/tx.amino.js +17 -1
- package/esm/sparkdream/shield/v1/tx.amino.js +61 -8
- package/package.json +1 -1
- package/sparkdream/blog/v1/tx.amino.d.ts +2 -2
- package/sparkdream/blog/v1/tx.amino.js +53 -20
- package/sparkdream/bundle.d.ts +35 -30
- package/sparkdream/client.d.ts +35 -30
- package/sparkdream/collect/v1/tx.amino.d.ts +7 -7
- package/sparkdream/collect/v1/tx.amino.js +138 -36
- package/sparkdream/commons/v1/tx.amino.d.ts +11 -6
- package/sparkdream/commons/v1/tx.amino.js +75 -5
- package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -1
- package/sparkdream/ecosystem/v1/tx.amino.js +19 -5
- package/sparkdream/forum/v1/tx.amino.d.ts +2 -2
- package/sparkdream/forum/v1/tx.amino.js +69 -40
- package/sparkdream/rep/v1/tx.amino.d.ts +9 -9
- package/sparkdream/rep/v1/tx.amino.js +177 -58
- package/sparkdream/reveal/v1/tx.amino.d.ts +1 -1
- package/sparkdream/reveal/v1/tx.amino.js +34 -13
- package/sparkdream/session/v1/tx.amino.d.ts +1 -1
- package/sparkdream/session/v1/tx.amino.js +17 -1
- package/sparkdream/shield/v1/tx.amino.d.ts +3 -3
- package/sparkdream/shield/v1/tx.amino.js +61 -8
|
@@ -1,242 +1,361 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
//@ts-nocheck
|
|
3
|
+
// HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
|
|
4
|
+
// by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
|
|
5
|
+
//
|
|
6
|
+
// Why: Telescope's auto-generated toAmino emits `[]` for empty repeated fields
|
|
7
|
+
// (the `if (message.field)` check is truthy for `[]` in JS), but
|
|
8
|
+
// cosmossdk.io/x/tx/signing/aminojson on the chain side omits them per
|
|
9
|
+
// `omitempty`. Whenever a repeated field happens to be empty (e.g. a project
|
|
10
|
+
// proposal with no tags / no deliverables / no milestones), the JS side signs
|
|
11
|
+
// `"tags":[]` and the chain reconstructs without the key — sign bytes differ,
|
|
12
|
+
// surfacing as "signature verification failed" / "unauthorized".
|
|
13
|
+
//
|
|
14
|
+
// Every rep message with a repeated field is patched here to mirror aminojson's
|
|
15
|
+
// omitempty (return `undefined` when empty). The rest of the converters pass
|
|
16
|
+
// straight through to the auto-generated toAmino/fromAmino.
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.AminoConverter = void 0;
|
|
4
|
-
//@ts-nocheck
|
|
5
19
|
const tx_1 = require("./tx");
|
|
20
|
+
const jury_review_1 = require("./jury_review");
|
|
6
21
|
exports.AminoConverter = {
|
|
7
22
|
"/sparkdream.rep.v1.MsgUpdateParams": {
|
|
8
23
|
aminoType: "sparkdream/x/rep/MsgUpdateParams",
|
|
9
24
|
toAmino: tx_1.MsgUpdateParams.toAmino,
|
|
10
|
-
fromAmino: tx_1.MsgUpdateParams.fromAmino
|
|
25
|
+
fromAmino: tx_1.MsgUpdateParams.fromAmino,
|
|
11
26
|
},
|
|
12
27
|
"/sparkdream.rep.v1.MsgUpdateOperationalParams": {
|
|
13
28
|
aminoType: "sparkdream/x/rep/MsgUpdateOperationalParams",
|
|
14
29
|
toAmino: tx_1.MsgUpdateOperationalParams.toAmino,
|
|
15
|
-
fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino
|
|
30
|
+
fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino,
|
|
16
31
|
},
|
|
17
32
|
"/sparkdream.rep.v1.MsgInviteMember": {
|
|
18
33
|
aminoType: "sparkdream/x/rep/MsgInviteMember",
|
|
19
|
-
toAmino
|
|
20
|
-
|
|
34
|
+
toAmino(message) {
|
|
35
|
+
const obj = {};
|
|
36
|
+
obj.inviter = message.inviter === "" ? undefined : message.inviter;
|
|
37
|
+
obj.invitee_address = message.inviteeAddress === "" ? undefined : message.inviteeAddress;
|
|
38
|
+
obj.staked_dream = message.stakedDream === "" ? undefined : message.stakedDream;
|
|
39
|
+
obj.vouched_tags = (message.vouchedTags?.length ?? 0) > 0
|
|
40
|
+
? message.vouchedTags.map((e) => e)
|
|
41
|
+
: undefined;
|
|
42
|
+
return obj;
|
|
43
|
+
},
|
|
44
|
+
fromAmino: tx_1.MsgInviteMember.fromAmino,
|
|
21
45
|
},
|
|
22
46
|
"/sparkdream.rep.v1.MsgAcceptInvitation": {
|
|
23
47
|
aminoType: "sparkdream/x/rep/MsgAcceptInvitation",
|
|
24
48
|
toAmino: tx_1.MsgAcceptInvitation.toAmino,
|
|
25
|
-
fromAmino: tx_1.MsgAcceptInvitation.fromAmino
|
|
49
|
+
fromAmino: tx_1.MsgAcceptInvitation.fromAmino,
|
|
26
50
|
},
|
|
27
51
|
"/sparkdream.rep.v1.MsgTransferDream": {
|
|
28
52
|
aminoType: "sparkdream/x/rep/MsgTransferDream",
|
|
29
53
|
toAmino: tx_1.MsgTransferDream.toAmino,
|
|
30
|
-
fromAmino: tx_1.MsgTransferDream.fromAmino
|
|
54
|
+
fromAmino: tx_1.MsgTransferDream.fromAmino,
|
|
31
55
|
},
|
|
32
56
|
"/sparkdream.rep.v1.MsgCreateInterim": {
|
|
33
57
|
aminoType: "sparkdream/x/rep/MsgCreateInterim",
|
|
34
58
|
toAmino: tx_1.MsgCreateInterim.toAmino,
|
|
35
|
-
fromAmino: tx_1.MsgCreateInterim.fromAmino
|
|
59
|
+
fromAmino: tx_1.MsgCreateInterim.fromAmino,
|
|
36
60
|
},
|
|
37
61
|
"/sparkdream.rep.v1.MsgAssignInterim": {
|
|
38
62
|
aminoType: "sparkdream/x/rep/MsgAssignInterim",
|
|
39
63
|
toAmino: tx_1.MsgAssignInterim.toAmino,
|
|
40
|
-
fromAmino: tx_1.MsgAssignInterim.fromAmino
|
|
64
|
+
fromAmino: tx_1.MsgAssignInterim.fromAmino,
|
|
41
65
|
},
|
|
42
66
|
"/sparkdream.rep.v1.MsgSubmitInterimWork": {
|
|
43
67
|
aminoType: "sparkdream/x/rep/MsgSubmitInterimWork",
|
|
44
68
|
toAmino: tx_1.MsgSubmitInterimWork.toAmino,
|
|
45
|
-
fromAmino: tx_1.MsgSubmitInterimWork.fromAmino
|
|
69
|
+
fromAmino: tx_1.MsgSubmitInterimWork.fromAmino,
|
|
46
70
|
},
|
|
47
71
|
"/sparkdream.rep.v1.MsgApproveInterim": {
|
|
48
72
|
aminoType: "sparkdream/x/rep/MsgApproveInterim",
|
|
49
73
|
toAmino: tx_1.MsgApproveInterim.toAmino,
|
|
50
|
-
fromAmino: tx_1.MsgApproveInterim.fromAmino
|
|
74
|
+
fromAmino: tx_1.MsgApproveInterim.fromAmino,
|
|
51
75
|
},
|
|
52
76
|
"/sparkdream.rep.v1.MsgAbandonInterim": {
|
|
53
77
|
aminoType: "sparkdream/x/rep/MsgAbandonInterim",
|
|
54
78
|
toAmino: tx_1.MsgAbandonInterim.toAmino,
|
|
55
|
-
fromAmino: tx_1.MsgAbandonInterim.fromAmino
|
|
79
|
+
fromAmino: tx_1.MsgAbandonInterim.fromAmino,
|
|
56
80
|
},
|
|
57
81
|
"/sparkdream.rep.v1.MsgCompleteInterim": {
|
|
58
82
|
aminoType: "sparkdream/x/rep/MsgCompleteInterim",
|
|
59
83
|
toAmino: tx_1.MsgCompleteInterim.toAmino,
|
|
60
|
-
fromAmino: tx_1.MsgCompleteInterim.fromAmino
|
|
84
|
+
fromAmino: tx_1.MsgCompleteInterim.fromAmino,
|
|
61
85
|
},
|
|
86
|
+
// The UI hardcodes `deliverables: []` and `milestones: []` on every project
|
|
87
|
+
// proposal, so without this override every submission fails sigverify.
|
|
62
88
|
"/sparkdream.rep.v1.MsgProposeProject": {
|
|
63
89
|
aminoType: "sparkdream/x/rep/MsgProposeProject",
|
|
64
|
-
toAmino
|
|
65
|
-
|
|
90
|
+
toAmino(message) {
|
|
91
|
+
const obj = {};
|
|
92
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
93
|
+
obj.name = message.name === "" ? undefined : message.name;
|
|
94
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
95
|
+
obj.tags = (message.tags?.length ?? 0) > 0
|
|
96
|
+
? message.tags.map((e) => e)
|
|
97
|
+
: undefined;
|
|
98
|
+
obj.category = message.category === 0 ? undefined : message.category;
|
|
99
|
+
obj.council = message.council === "" ? undefined : message.council;
|
|
100
|
+
obj.requested_budget = message.requestedBudget === "" ? undefined : message.requestedBudget;
|
|
101
|
+
obj.requested_spark = message.requestedSpark === "" ? undefined : message.requestedSpark;
|
|
102
|
+
obj.deliverables = (message.deliverables?.length ?? 0) > 0
|
|
103
|
+
? message.deliverables.map((e) => e)
|
|
104
|
+
: undefined;
|
|
105
|
+
obj.milestones = (message.milestones?.length ?? 0) > 0
|
|
106
|
+
? message.milestones.map((e) => e)
|
|
107
|
+
: undefined;
|
|
108
|
+
return obj;
|
|
109
|
+
},
|
|
110
|
+
fromAmino: tx_1.MsgProposeProject.fromAmino,
|
|
66
111
|
},
|
|
67
112
|
"/sparkdream.rep.v1.MsgApproveProjectBudget": {
|
|
68
113
|
aminoType: "sparkdream/x/rep/MsgApproveProjectBudget",
|
|
69
114
|
toAmino: tx_1.MsgApproveProjectBudget.toAmino,
|
|
70
|
-
fromAmino: tx_1.MsgApproveProjectBudget.fromAmino
|
|
115
|
+
fromAmino: tx_1.MsgApproveProjectBudget.fromAmino,
|
|
71
116
|
},
|
|
72
117
|
"/sparkdream.rep.v1.MsgCancelProject": {
|
|
73
118
|
aminoType: "sparkdream/x/rep/MsgCancelProject",
|
|
74
119
|
toAmino: tx_1.MsgCancelProject.toAmino,
|
|
75
|
-
fromAmino: tx_1.MsgCancelProject.fromAmino
|
|
120
|
+
fromAmino: tx_1.MsgCancelProject.fromAmino,
|
|
76
121
|
},
|
|
77
122
|
"/sparkdream.rep.v1.MsgCreateInitiative": {
|
|
78
123
|
aminoType: "sparkdream/x/rep/MsgCreateInitiative",
|
|
79
|
-
toAmino
|
|
80
|
-
|
|
124
|
+
toAmino(message) {
|
|
125
|
+
const obj = {};
|
|
126
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
127
|
+
obj.project_id = message.projectId !== BigInt(0) ? message.projectId?.toString() : undefined;
|
|
128
|
+
obj.title = message.title === "" ? undefined : message.title;
|
|
129
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
130
|
+
obj.tags = (message.tags?.length ?? 0) > 0
|
|
131
|
+
? message.tags.map((e) => e)
|
|
132
|
+
: undefined;
|
|
133
|
+
obj.tier = message.tier !== BigInt(0) ? message.tier?.toString() : undefined;
|
|
134
|
+
obj.category = message.category !== BigInt(0) ? message.category?.toString() : undefined;
|
|
135
|
+
obj.template_id = message.templateId === "" ? undefined : message.templateId;
|
|
136
|
+
obj.budget = message.budget === "" ? undefined : message.budget;
|
|
137
|
+
return obj;
|
|
138
|
+
},
|
|
139
|
+
fromAmino: tx_1.MsgCreateInitiative.fromAmino,
|
|
81
140
|
},
|
|
82
141
|
"/sparkdream.rep.v1.MsgAssignInitiative": {
|
|
83
142
|
aminoType: "sparkdream/x/rep/MsgAssignInitiative",
|
|
84
143
|
toAmino: tx_1.MsgAssignInitiative.toAmino,
|
|
85
|
-
fromAmino: tx_1.MsgAssignInitiative.fromAmino
|
|
144
|
+
fromAmino: tx_1.MsgAssignInitiative.fromAmino,
|
|
86
145
|
},
|
|
87
146
|
"/sparkdream.rep.v1.MsgSubmitInitiativeWork": {
|
|
88
147
|
aminoType: "sparkdream/x/rep/MsgSubmitInitiativeWork",
|
|
89
148
|
toAmino: tx_1.MsgSubmitInitiativeWork.toAmino,
|
|
90
|
-
fromAmino: tx_1.MsgSubmitInitiativeWork.fromAmino
|
|
149
|
+
fromAmino: tx_1.MsgSubmitInitiativeWork.fromAmino,
|
|
91
150
|
},
|
|
92
151
|
"/sparkdream.rep.v1.MsgApproveInitiative": {
|
|
93
152
|
aminoType: "sparkdream/x/rep/MsgApproveInitiative",
|
|
94
|
-
toAmino
|
|
95
|
-
|
|
153
|
+
toAmino(message) {
|
|
154
|
+
const obj = {};
|
|
155
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
156
|
+
obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
|
|
157
|
+
obj.criteria_votes = (message.criteriaVotes?.length ?? 0) > 0
|
|
158
|
+
? message.criteriaVotes.map((e) => e ? jury_review_1.CriteriaVote.toAmino(e) : undefined)
|
|
159
|
+
: undefined;
|
|
160
|
+
obj.approved = message.approved === false ? undefined : message.approved;
|
|
161
|
+
obj.comments = message.comments === "" ? undefined : message.comments;
|
|
162
|
+
return obj;
|
|
163
|
+
},
|
|
164
|
+
fromAmino: tx_1.MsgApproveInitiative.fromAmino,
|
|
96
165
|
},
|
|
97
166
|
"/sparkdream.rep.v1.MsgAbandonInitiative": {
|
|
98
167
|
aminoType: "sparkdream/x/rep/MsgAbandonInitiative",
|
|
99
168
|
toAmino: tx_1.MsgAbandonInitiative.toAmino,
|
|
100
|
-
fromAmino: tx_1.MsgAbandonInitiative.fromAmino
|
|
169
|
+
fromAmino: tx_1.MsgAbandonInitiative.fromAmino,
|
|
101
170
|
},
|
|
102
171
|
"/sparkdream.rep.v1.MsgCompleteInitiative": {
|
|
103
172
|
aminoType: "sparkdream/x/rep/MsgCompleteInitiative",
|
|
104
173
|
toAmino: tx_1.MsgCompleteInitiative.toAmino,
|
|
105
|
-
fromAmino: tx_1.MsgCompleteInitiative.fromAmino
|
|
174
|
+
fromAmino: tx_1.MsgCompleteInitiative.fromAmino,
|
|
106
175
|
},
|
|
107
176
|
"/sparkdream.rep.v1.MsgStake": {
|
|
108
177
|
aminoType: "sparkdream/x/rep/MsgStake",
|
|
109
178
|
toAmino: tx_1.MsgStake.toAmino,
|
|
110
|
-
fromAmino: tx_1.MsgStake.fromAmino
|
|
179
|
+
fromAmino: tx_1.MsgStake.fromAmino,
|
|
111
180
|
},
|
|
112
181
|
"/sparkdream.rep.v1.MsgUnstake": {
|
|
113
182
|
aminoType: "sparkdream/x/rep/MsgUnstake",
|
|
114
183
|
toAmino: tx_1.MsgUnstake.toAmino,
|
|
115
|
-
fromAmino: tx_1.MsgUnstake.fromAmino
|
|
184
|
+
fromAmino: tx_1.MsgUnstake.fromAmino,
|
|
116
185
|
},
|
|
117
186
|
"/sparkdream.rep.v1.MsgClaimStakingRewards": {
|
|
118
187
|
aminoType: "sparkdream/x/rep/MsgClaimStakingRewards",
|
|
119
188
|
toAmino: tx_1.MsgClaimStakingRewards.toAmino,
|
|
120
|
-
fromAmino: tx_1.MsgClaimStakingRewards.fromAmino
|
|
189
|
+
fromAmino: tx_1.MsgClaimStakingRewards.fromAmino,
|
|
121
190
|
},
|
|
122
191
|
"/sparkdream.rep.v1.MsgCompoundStakingRewards": {
|
|
123
192
|
aminoType: "sparkdream/x/rep/MsgCompoundStakingRewards",
|
|
124
193
|
toAmino: tx_1.MsgCompoundStakingRewards.toAmino,
|
|
125
|
-
fromAmino: tx_1.MsgCompoundStakingRewards.fromAmino
|
|
194
|
+
fromAmino: tx_1.MsgCompoundStakingRewards.fromAmino,
|
|
126
195
|
},
|
|
127
196
|
"/sparkdream.rep.v1.MsgCreateChallenge": {
|
|
128
197
|
aminoType: "sparkdream/x/rep/MsgCreateChallenge",
|
|
129
|
-
toAmino
|
|
130
|
-
|
|
198
|
+
toAmino(message) {
|
|
199
|
+
const obj = {};
|
|
200
|
+
obj.challenger = message.challenger === "" ? undefined : message.challenger;
|
|
201
|
+
obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
|
|
202
|
+
obj.reason = message.reason === "" ? undefined : message.reason;
|
|
203
|
+
obj.evidence = (message.evidence?.length ?? 0) > 0
|
|
204
|
+
? message.evidence.map((e) => e)
|
|
205
|
+
: undefined;
|
|
206
|
+
obj.staked_dream = message.stakedDream === "" ? undefined : message.stakedDream;
|
|
207
|
+
return obj;
|
|
208
|
+
},
|
|
209
|
+
fromAmino: tx_1.MsgCreateChallenge.fromAmino,
|
|
131
210
|
},
|
|
132
211
|
"/sparkdream.rep.v1.MsgRespondToChallenge": {
|
|
133
212
|
aminoType: "sparkdream/x/rep/MsgRespondToChallenge",
|
|
134
|
-
toAmino
|
|
135
|
-
|
|
213
|
+
toAmino(message) {
|
|
214
|
+
const obj = {};
|
|
215
|
+
obj.assignee = message.assignee === "" ? undefined : message.assignee;
|
|
216
|
+
obj.challenge_id = message.challengeId !== BigInt(0) ? message.challengeId?.toString() : undefined;
|
|
217
|
+
obj.response = message.response === "" ? undefined : message.response;
|
|
218
|
+
obj.evidence = (message.evidence?.length ?? 0) > 0
|
|
219
|
+
? message.evidence.map((e) => e)
|
|
220
|
+
: undefined;
|
|
221
|
+
return obj;
|
|
222
|
+
},
|
|
223
|
+
fromAmino: tx_1.MsgRespondToChallenge.fromAmino,
|
|
136
224
|
},
|
|
137
225
|
"/sparkdream.rep.v1.MsgSubmitJurorVote": {
|
|
138
226
|
aminoType: "sparkdream/x/rep/MsgSubmitJurorVote",
|
|
139
|
-
toAmino
|
|
140
|
-
|
|
227
|
+
toAmino(message) {
|
|
228
|
+
const obj = {};
|
|
229
|
+
obj.juror = message.juror === "" ? undefined : message.juror;
|
|
230
|
+
obj.jury_review_id = message.juryReviewId !== BigInt(0) ? message.juryReviewId?.toString() : undefined;
|
|
231
|
+
obj.criteria_votes = (message.criteriaVotes?.length ?? 0) > 0
|
|
232
|
+
? message.criteriaVotes.map((e) => e ? jury_review_1.CriteriaVote.toAmino(e) : undefined)
|
|
233
|
+
: undefined;
|
|
234
|
+
obj.verdict = message.verdict === 0 ? undefined : message.verdict;
|
|
235
|
+
obj.confidence = message.confidence === "" ? undefined : message.confidence;
|
|
236
|
+
obj.reasoning = message.reasoning === "" ? undefined : message.reasoning;
|
|
237
|
+
return obj;
|
|
238
|
+
},
|
|
239
|
+
fromAmino: tx_1.MsgSubmitJurorVote.fromAmino,
|
|
141
240
|
},
|
|
142
241
|
"/sparkdream.rep.v1.MsgSubmitExpertTestimony": {
|
|
143
242
|
aminoType: "sparkdream/x/rep/MsgSubmitExpertTestimony",
|
|
144
243
|
toAmino: tx_1.MsgSubmitExpertTestimony.toAmino,
|
|
145
|
-
fromAmino: tx_1.MsgSubmitExpertTestimony.fromAmino
|
|
244
|
+
fromAmino: tx_1.MsgSubmitExpertTestimony.fromAmino,
|
|
146
245
|
},
|
|
147
246
|
"/sparkdream.rep.v1.MsgChallengeContent": {
|
|
148
247
|
aminoType: "sparkdream/x/rep/MsgChallengeContent",
|
|
149
|
-
toAmino
|
|
150
|
-
|
|
248
|
+
toAmino(message) {
|
|
249
|
+
const obj = {};
|
|
250
|
+
obj.challenger = message.challenger === "" ? undefined : message.challenger;
|
|
251
|
+
obj.target_type = message.targetType !== BigInt(0) ? message.targetType?.toString() : undefined;
|
|
252
|
+
obj.target_id = message.targetId !== BigInt(0) ? message.targetId?.toString() : undefined;
|
|
253
|
+
obj.reason = message.reason === "" ? undefined : message.reason;
|
|
254
|
+
obj.evidence = (message.evidence?.length ?? 0) > 0
|
|
255
|
+
? message.evidence.map((e) => e)
|
|
256
|
+
: undefined;
|
|
257
|
+
obj.staked_dream = message.stakedDream === null ? undefined : message.stakedDream;
|
|
258
|
+
return obj;
|
|
259
|
+
},
|
|
260
|
+
fromAmino: tx_1.MsgChallengeContent.fromAmino,
|
|
151
261
|
},
|
|
152
262
|
"/sparkdream.rep.v1.MsgRespondToContentChallenge": {
|
|
153
263
|
aminoType: "sparkdream/x/rep/MsgRespondToContentChallenge",
|
|
154
|
-
toAmino
|
|
155
|
-
|
|
264
|
+
toAmino(message) {
|
|
265
|
+
const obj = {};
|
|
266
|
+
obj.author = message.author === "" ? undefined : message.author;
|
|
267
|
+
obj.content_challenge_id = message.contentChallengeId !== BigInt(0) ? message.contentChallengeId?.toString() : undefined;
|
|
268
|
+
obj.response = message.response === "" ? undefined : message.response;
|
|
269
|
+
obj.evidence = (message.evidence?.length ?? 0) > 0
|
|
270
|
+
? message.evidence.map((e) => e)
|
|
271
|
+
: undefined;
|
|
272
|
+
return obj;
|
|
273
|
+
},
|
|
274
|
+
fromAmino: tx_1.MsgRespondToContentChallenge.fromAmino,
|
|
156
275
|
},
|
|
157
276
|
"/sparkdream.rep.v1.MsgRegisterZkPublicKey": {
|
|
158
277
|
aminoType: "sparkdream/x/rep/MsgRegisterZkPublicKey",
|
|
159
278
|
toAmino: tx_1.MsgRegisterZkPublicKey.toAmino,
|
|
160
|
-
fromAmino: tx_1.MsgRegisterZkPublicKey.fromAmino
|
|
279
|
+
fromAmino: tx_1.MsgRegisterZkPublicKey.fromAmino,
|
|
161
280
|
},
|
|
162
281
|
"/sparkdream.rep.v1.MsgCreateTag": {
|
|
163
282
|
aminoType: "sparkdream/x/rep/MsgCreateTag",
|
|
164
283
|
toAmino: tx_1.MsgCreateTag.toAmino,
|
|
165
|
-
fromAmino: tx_1.MsgCreateTag.fromAmino
|
|
284
|
+
fromAmino: tx_1.MsgCreateTag.fromAmino,
|
|
166
285
|
},
|
|
167
286
|
"/sparkdream.rep.v1.MsgReportTag": {
|
|
168
287
|
aminoType: "sparkdream/x/rep/MsgReportTag",
|
|
169
288
|
toAmino: tx_1.MsgReportTag.toAmino,
|
|
170
|
-
fromAmino: tx_1.MsgReportTag.fromAmino
|
|
289
|
+
fromAmino: tx_1.MsgReportTag.fromAmino,
|
|
171
290
|
},
|
|
172
291
|
"/sparkdream.rep.v1.MsgResolveTagReport": {
|
|
173
292
|
aminoType: "sparkdream/x/rep/MsgResolveTagReport",
|
|
174
293
|
toAmino: tx_1.MsgResolveTagReport.toAmino,
|
|
175
|
-
fromAmino: tx_1.MsgResolveTagReport.fromAmino
|
|
294
|
+
fromAmino: tx_1.MsgResolveTagReport.fromAmino,
|
|
176
295
|
},
|
|
177
296
|
"/sparkdream.rep.v1.MsgCreateTagBudget": {
|
|
178
297
|
aminoType: "sparkdream/x/rep/MsgCreateTagBudget",
|
|
179
298
|
toAmino: tx_1.MsgCreateTagBudget.toAmino,
|
|
180
|
-
fromAmino: tx_1.MsgCreateTagBudget.fromAmino
|
|
299
|
+
fromAmino: tx_1.MsgCreateTagBudget.fromAmino,
|
|
181
300
|
},
|
|
182
301
|
"/sparkdream.rep.v1.MsgAwardFromTagBudget": {
|
|
183
302
|
aminoType: "sparkdream/x/rep/MsgAwardFromTagBudget",
|
|
184
303
|
toAmino: tx_1.MsgAwardFromTagBudget.toAmino,
|
|
185
|
-
fromAmino: tx_1.MsgAwardFromTagBudget.fromAmino
|
|
304
|
+
fromAmino: tx_1.MsgAwardFromTagBudget.fromAmino,
|
|
186
305
|
},
|
|
187
306
|
"/sparkdream.rep.v1.MsgTopUpTagBudget": {
|
|
188
307
|
aminoType: "sparkdream/x/rep/MsgTopUpTagBudget",
|
|
189
308
|
toAmino: tx_1.MsgTopUpTagBudget.toAmino,
|
|
190
|
-
fromAmino: tx_1.MsgTopUpTagBudget.fromAmino
|
|
309
|
+
fromAmino: tx_1.MsgTopUpTagBudget.fromAmino,
|
|
191
310
|
},
|
|
192
311
|
"/sparkdream.rep.v1.MsgToggleTagBudget": {
|
|
193
312
|
aminoType: "sparkdream/x/rep/MsgToggleTagBudget",
|
|
194
313
|
toAmino: tx_1.MsgToggleTagBudget.toAmino,
|
|
195
|
-
fromAmino: tx_1.MsgToggleTagBudget.fromAmino
|
|
314
|
+
fromAmino: tx_1.MsgToggleTagBudget.fromAmino,
|
|
196
315
|
},
|
|
197
316
|
"/sparkdream.rep.v1.MsgWithdrawTagBudget": {
|
|
198
317
|
aminoType: "sparkdream/x/rep/MsgWithdrawTagBudget",
|
|
199
318
|
toAmino: tx_1.MsgWithdrawTagBudget.toAmino,
|
|
200
|
-
fromAmino: tx_1.MsgWithdrawTagBudget.fromAmino
|
|
319
|
+
fromAmino: tx_1.MsgWithdrawTagBudget.fromAmino,
|
|
201
320
|
},
|
|
202
321
|
"/sparkdream.rep.v1.MsgBondRole": {
|
|
203
322
|
aminoType: "sparkdream/x/rep/MsgBondRole",
|
|
204
323
|
toAmino: tx_1.MsgBondRole.toAmino,
|
|
205
|
-
fromAmino: tx_1.MsgBondRole.fromAmino
|
|
324
|
+
fromAmino: tx_1.MsgBondRole.fromAmino,
|
|
206
325
|
},
|
|
207
326
|
"/sparkdream.rep.v1.MsgUnbondRole": {
|
|
208
327
|
aminoType: "sparkdream/x/rep/MsgUnbondRole",
|
|
209
328
|
toAmino: tx_1.MsgUnbondRole.toAmino,
|
|
210
|
-
fromAmino: tx_1.MsgUnbondRole.fromAmino
|
|
329
|
+
fromAmino: tx_1.MsgUnbondRole.fromAmino,
|
|
211
330
|
},
|
|
212
331
|
"/sparkdream.rep.v1.MsgReportMember": {
|
|
213
332
|
aminoType: "sparkdream/x/rep/MsgReportMember",
|
|
214
333
|
toAmino: tx_1.MsgReportMember.toAmino,
|
|
215
|
-
fromAmino: tx_1.MsgReportMember.fromAmino
|
|
334
|
+
fromAmino: tx_1.MsgReportMember.fromAmino,
|
|
216
335
|
},
|
|
217
336
|
"/sparkdream.rep.v1.MsgCosignMemberReport": {
|
|
218
337
|
aminoType: "sparkdream/x/rep/MsgCosignMemberReport",
|
|
219
338
|
toAmino: tx_1.MsgCosignMemberReport.toAmino,
|
|
220
|
-
fromAmino: tx_1.MsgCosignMemberReport.fromAmino
|
|
339
|
+
fromAmino: tx_1.MsgCosignMemberReport.fromAmino,
|
|
221
340
|
},
|
|
222
341
|
"/sparkdream.rep.v1.MsgResolveMemberReport": {
|
|
223
342
|
aminoType: "sparkdream/x/rep/MsgResolveMemberReport",
|
|
224
343
|
toAmino: tx_1.MsgResolveMemberReport.toAmino,
|
|
225
|
-
fromAmino: tx_1.MsgResolveMemberReport.fromAmino
|
|
344
|
+
fromAmino: tx_1.MsgResolveMemberReport.fromAmino,
|
|
226
345
|
},
|
|
227
346
|
"/sparkdream.rep.v1.MsgDefendMemberReport": {
|
|
228
347
|
aminoType: "sparkdream/x/rep/MsgDefendMemberReport",
|
|
229
348
|
toAmino: tx_1.MsgDefendMemberReport.toAmino,
|
|
230
|
-
fromAmino: tx_1.MsgDefendMemberReport.fromAmino
|
|
349
|
+
fromAmino: tx_1.MsgDefendMemberReport.fromAmino,
|
|
231
350
|
},
|
|
232
351
|
"/sparkdream.rep.v1.MsgAppealGovAction": {
|
|
233
352
|
aminoType: "sparkdream/x/rep/MsgAppealGovAction",
|
|
234
353
|
toAmino: tx_1.MsgAppealGovAction.toAmino,
|
|
235
|
-
fromAmino: tx_1.MsgAppealGovAction.fromAmino
|
|
354
|
+
fromAmino: tx_1.MsgAppealGovAction.fromAmino,
|
|
236
355
|
},
|
|
237
356
|
"/sparkdream.rep.v1.MsgResolveGovActionAppeal": {
|
|
238
357
|
aminoType: "sparkdream/x/rep/MsgResolveGovActionAppeal",
|
|
239
358
|
toAmino: tx_1.MsgResolveGovActionAppeal.toAmino,
|
|
240
|
-
fromAmino: tx_1.MsgResolveGovActionAppeal.fromAmino
|
|
241
|
-
}
|
|
359
|
+
fromAmino: tx_1.MsgResolveGovActionAppeal.fromAmino,
|
|
360
|
+
},
|
|
242
361
|
};
|
|
@@ -7,7 +7,7 @@ export declare const AminoConverter: {
|
|
|
7
7
|
};
|
|
8
8
|
"/sparkdream.reveal.v1.MsgPropose": {
|
|
9
9
|
aminoType: string;
|
|
10
|
-
toAmino
|
|
10
|
+
toAmino(message: any): any;
|
|
11
11
|
fromAmino: (object: import("./tx").MsgProposeAmino) => MsgPropose;
|
|
12
12
|
};
|
|
13
13
|
"/sparkdream.reveal.v1.MsgApprove": {
|
|
@@ -1,57 +1,78 @@
|
|
|
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
|
+
// MsgPropose has `repeated TrancheDef tranches` which Telescope emits as `[]`
|
|
7
|
+
// when empty — fine for a normal proposal but the override still mirrors
|
|
8
|
+
// aminojson's omitempty so the JS-signed bytes match the chain's reconstruction
|
|
9
|
+
// for any edge case (e.g. a single-tranche proposal where the contributor
|
|
10
|
+
// passes `[]` then computes tranches server-side).
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.AminoConverter = void 0;
|
|
4
|
-
//@ts-nocheck
|
|
5
13
|
const tx_1 = require("./tx");
|
|
14
|
+
const types_1 = require("./types");
|
|
6
15
|
exports.AminoConverter = {
|
|
7
16
|
"/sparkdream.reveal.v1.MsgUpdateParams": {
|
|
8
17
|
aminoType: "sparkdream/x/reveal/MsgUpdateParams",
|
|
9
18
|
toAmino: tx_1.MsgUpdateParams.toAmino,
|
|
10
|
-
fromAmino: tx_1.MsgUpdateParams.fromAmino
|
|
19
|
+
fromAmino: tx_1.MsgUpdateParams.fromAmino,
|
|
11
20
|
},
|
|
12
21
|
"/sparkdream.reveal.v1.MsgPropose": {
|
|
13
22
|
aminoType: "sparkdream/x/reveal/MsgPropose",
|
|
14
|
-
toAmino
|
|
15
|
-
|
|
23
|
+
toAmino(message) {
|
|
24
|
+
const obj = {};
|
|
25
|
+
obj.contributor = message.contributor === "" ? undefined : message.contributor;
|
|
26
|
+
obj.project_name = message.projectName === "" ? undefined : message.projectName;
|
|
27
|
+
obj.description = message.description === "" ? undefined : message.description;
|
|
28
|
+
obj.total_valuation = message.totalValuation === "" ? undefined : message.totalValuation;
|
|
29
|
+
obj.tranches = (message.tranches?.length ?? 0) > 0
|
|
30
|
+
? message.tranches.map((e) => e ? types_1.TrancheDef.toAmino(e) : undefined)
|
|
31
|
+
: undefined;
|
|
32
|
+
obj.initial_license = message.initialLicense === "" ? undefined : message.initialLicense;
|
|
33
|
+
obj.final_license = message.finalLicense === "" ? undefined : message.finalLicense;
|
|
34
|
+
return obj;
|
|
35
|
+
},
|
|
36
|
+
fromAmino: tx_1.MsgPropose.fromAmino,
|
|
16
37
|
},
|
|
17
38
|
"/sparkdream.reveal.v1.MsgApprove": {
|
|
18
39
|
aminoType: "sparkdream/x/reveal/MsgApprove",
|
|
19
40
|
toAmino: tx_1.MsgApprove.toAmino,
|
|
20
|
-
fromAmino: tx_1.MsgApprove.fromAmino
|
|
41
|
+
fromAmino: tx_1.MsgApprove.fromAmino,
|
|
21
42
|
},
|
|
22
43
|
"/sparkdream.reveal.v1.MsgReject": {
|
|
23
44
|
aminoType: "sparkdream/x/reveal/MsgReject",
|
|
24
45
|
toAmino: tx_1.MsgReject.toAmino,
|
|
25
|
-
fromAmino: tx_1.MsgReject.fromAmino
|
|
46
|
+
fromAmino: tx_1.MsgReject.fromAmino,
|
|
26
47
|
},
|
|
27
48
|
"/sparkdream.reveal.v1.MsgStake": {
|
|
28
49
|
aminoType: "sparkdream/x/reveal/MsgStake",
|
|
29
50
|
toAmino: tx_1.MsgStake.toAmino,
|
|
30
|
-
fromAmino: tx_1.MsgStake.fromAmino
|
|
51
|
+
fromAmino: tx_1.MsgStake.fromAmino,
|
|
31
52
|
},
|
|
32
53
|
"/sparkdream.reveal.v1.MsgWithdraw": {
|
|
33
54
|
aminoType: "sparkdream/x/reveal/MsgWithdraw",
|
|
34
55
|
toAmino: tx_1.MsgWithdraw.toAmino,
|
|
35
|
-
fromAmino: tx_1.MsgWithdraw.fromAmino
|
|
56
|
+
fromAmino: tx_1.MsgWithdraw.fromAmino,
|
|
36
57
|
},
|
|
37
58
|
"/sparkdream.reveal.v1.MsgReveal": {
|
|
38
59
|
aminoType: "sparkdream/x/reveal/MsgReveal",
|
|
39
60
|
toAmino: tx_1.MsgReveal.toAmino,
|
|
40
|
-
fromAmino: tx_1.MsgReveal.fromAmino
|
|
61
|
+
fromAmino: tx_1.MsgReveal.fromAmino,
|
|
41
62
|
},
|
|
42
63
|
"/sparkdream.reveal.v1.MsgVerify": {
|
|
43
64
|
aminoType: "sparkdream/x/reveal/MsgVerify",
|
|
44
65
|
toAmino: tx_1.MsgVerify.toAmino,
|
|
45
|
-
fromAmino: tx_1.MsgVerify.fromAmino
|
|
66
|
+
fromAmino: tx_1.MsgVerify.fromAmino,
|
|
46
67
|
},
|
|
47
68
|
"/sparkdream.reveal.v1.MsgCancel": {
|
|
48
69
|
aminoType: "sparkdream/x/reveal/MsgCancel",
|
|
49
70
|
toAmino: tx_1.MsgCancel.toAmino,
|
|
50
|
-
fromAmino: tx_1.MsgCancel.fromAmino
|
|
71
|
+
fromAmino: tx_1.MsgCancel.fromAmino,
|
|
51
72
|
},
|
|
52
73
|
"/sparkdream.reveal.v1.MsgResolveDispute": {
|
|
53
74
|
aminoType: "sparkdream/x/reveal/MsgResolveDispute",
|
|
54
75
|
toAmino: tx_1.MsgResolveDispute.toAmino,
|
|
55
|
-
fromAmino: tx_1.MsgResolveDispute.fromAmino
|
|
56
|
-
}
|
|
76
|
+
fromAmino: tx_1.MsgResolveDispute.fromAmino,
|
|
77
|
+
},
|
|
57
78
|
};
|
|
@@ -12,7 +12,7 @@ export declare const AminoConverter: {
|
|
|
12
12
|
};
|
|
13
13
|
"/sparkdream.session.v1.MsgCreateSession": {
|
|
14
14
|
aminoType: string;
|
|
15
|
-
toAmino
|
|
15
|
+
toAmino(message: any): any;
|
|
16
16
|
fromAmino: (object: import("./tx").MsgCreateSessionAmino) => MsgCreateSession;
|
|
17
17
|
};
|
|
18
18
|
"/sparkdream.session.v1.MsgRevokeSession": {
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.AminoConverter = void 0;
|
|
10
10
|
const tx_1 = require("./tx");
|
|
11
|
+
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
12
|
+
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
13
|
+
const helpers_1 = require("../../../helpers");
|
|
11
14
|
const nested_amino_1 = require("../../../nested-amino");
|
|
12
15
|
exports.AminoConverter = {
|
|
13
16
|
"/sparkdream.session.v1.MsgUpdateParams": {
|
|
@@ -20,9 +23,22 @@ exports.AminoConverter = {
|
|
|
20
23
|
toAmino: tx_1.MsgUpdateOperationalParams.toAmino,
|
|
21
24
|
fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino,
|
|
22
25
|
},
|
|
26
|
+
// `allowed_msg_types` is the repeated string field that gets emitted as `[]`
|
|
27
|
+
// when a session is created with no type allowlist (i.e. allow-all).
|
|
23
28
|
"/sparkdream.session.v1.MsgCreateSession": {
|
|
24
29
|
aminoType: "sparkdream/x/session/MsgCreateSession",
|
|
25
|
-
toAmino
|
|
30
|
+
toAmino(message) {
|
|
31
|
+
const obj = {};
|
|
32
|
+
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
33
|
+
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
34
|
+
obj.allowed_msg_types = (message.allowedMsgTypes?.length ?? 0) > 0
|
|
35
|
+
? message.allowedMsgTypes.map((e) => e)
|
|
36
|
+
: undefined;
|
|
37
|
+
obj.spend_limit = message.spendLimit ? coin_1.Coin.toAmino(message.spendLimit) : undefined;
|
|
38
|
+
obj.expiration = message.expiration ? timestamp_1.Timestamp.toAmino((0, helpers_1.toTimestamp)(message.expiration)) : undefined;
|
|
39
|
+
obj.max_exec_count = message.maxExecCount !== BigInt(0) ? message.maxExecCount?.toString() : undefined;
|
|
40
|
+
return obj;
|
|
41
|
+
},
|
|
26
42
|
fromAmino: tx_1.MsgCreateSession.fromAmino,
|
|
27
43
|
},
|
|
28
44
|
"/sparkdream.session.v1.MsgRevokeSession": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MsgUpdateParams,
|
|
1
|
+
import { MsgUpdateParams, MsgTriggerDkg, MsgRegisterShieldedOp, MsgDeregisterShieldedOp } from "./tx";
|
|
2
2
|
export declare const AminoConverter: {
|
|
3
3
|
"/sparkdream.shield.v1.MsgUpdateParams": {
|
|
4
4
|
aminoType: string;
|
|
@@ -7,8 +7,8 @@ export declare const AminoConverter: {
|
|
|
7
7
|
};
|
|
8
8
|
"/sparkdream.shield.v1.MsgShieldedExec": {
|
|
9
9
|
aminoType: string;
|
|
10
|
-
toAmino
|
|
11
|
-
fromAmino
|
|
10
|
+
toAmino(message: any): any;
|
|
11
|
+
fromAmino(object: any): any;
|
|
12
12
|
};
|
|
13
13
|
"/sparkdream.shield.v1.MsgTriggerDkg": {
|
|
14
14
|
aminoType: string;
|