@sparkdreamnft/sparkdreamjs 0.0.45 → 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.
- package/akash/bundle.d.ts +134 -134
- package/akash/bundle.js +150 -150
- package/amino-schema.d.ts +5741 -0
- package/amino-schema.js +8 -0
- package/chain-amino.d.ts +61 -0
- package/chain-amino.js +670 -0
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/akash/bundle.js +150 -150
- package/esm/amino-schema.js +5 -0
- package/esm/chain-amino.js +665 -0
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +116 -116
- package/esm/nested-amino.js +12 -4
- package/esm/sparkdream/artifact/v1/genesis.js +217 -3
- package/esm/sparkdream/artifact/v1/params.js +146 -2
- package/esm/sparkdream/artifact/v1/query.js +3767 -5
- package/esm/sparkdream/artifact/v1/query.lcd.js +173 -0
- package/esm/sparkdream/artifact/v1/query.rpc.Query.js +195 -1
- package/esm/sparkdream/artifact/v1/tx.amino.js +16 -158
- package/esm/sparkdream/artifact/v1/tx.js +7498 -5
- package/esm/sparkdream/artifact/v1/tx.registry.js +704 -2
- package/esm/sparkdream/artifact/v1/tx.rpc.msg.js +241 -1
- package/esm/sparkdream/artifact/v1/types.js +4312 -1120
- package/esm/sparkdream/blog/v1/tx.amino.js +15 -115
- package/esm/sparkdream/bundle.js +329 -291
- package/esm/sparkdream/client.js +5 -2
- package/esm/sparkdream/collect/v1/tx.amino.js +15 -239
- package/esm/sparkdream/commons/v1/tx.amino.js +12 -226
- package/esm/sparkdream/commons/v1/tx.js +25 -1
- package/esm/sparkdream/ecosystem/v1/tx.amino.js +15 -26
- package/esm/sparkdream/federation/v1/tx.amino.js +16 -128
- package/esm/sparkdream/forum/v1/tx.amino.js +15 -211
- package/esm/sparkdream/futarchy/v1/tx.amino.js +16 -38
- package/esm/sparkdream/guardian/v1/tx.amino.js +17 -8
- package/esm/sparkdream/lcd.js +5 -0
- package/esm/sparkdream/name/v1/tx.amino.js +16 -63
- package/esm/sparkdream/rep/v1/genesis.js +74 -1
- package/esm/sparkdream/rep/v1/member.js +110 -1
- package/esm/sparkdream/rep/v1/migration.js +957 -0
- package/esm/sparkdream/rep/v1/params.js +181 -1
- package/esm/sparkdream/rep/v1/query.js +1060 -0
- package/esm/sparkdream/rep/v1/query.lcd.js +48 -0
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +65 -1
- package/esm/sparkdream/rep/v1/tx.amino.js +12 -414
- package/esm/sparkdream/rep/v1/tx.js +1741 -1
- package/esm/sparkdream/rep/v1/tx.registry.js +200 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +67 -1
- package/esm/sparkdream/reveal/v1/tx.amino.js +15 -73
- package/esm/sparkdream/rpc.query.js +3 -0
- package/esm/sparkdream/rpc.tx.js +3 -0
- package/esm/sparkdream/season/v1/tx.amino.js +16 -218
- package/esm/sparkdream/service/v1/tx.amino.js +16 -78
- package/esm/sparkdream/session/v1/tx.amino.js +16 -271
- package/esm/sparkdream/session/v1/tx.js +38 -2
- package/esm/sparkdream/shield/v1/tx.amino.js +15 -80
- package/esm/sparkdream/sparkdream/v1/tx.amino.js +16 -8
- package/esm/sparkdream/split/v1/tx.amino.js +16 -8
- package/esm/sparkdream/vault/module/v1/module.js +71 -0
- package/esm/sparkdream/vault/v1/genesis.js +104 -0
- package/esm/sparkdream/vault/v1/params.js +90 -0
- package/esm/sparkdream/vault/v1/query.js +1535 -0
- package/esm/sparkdream/vault/v1/query.lcd.js +100 -0
- package/esm/sparkdream/vault/v1/query.rpc.Query.js +111 -0
- package/esm/sparkdream/vault/v1/tx.amino.js +18 -0
- package/esm/sparkdream/vault/v1/tx.js +1393 -0
- package/esm/sparkdream/vault/v1/tx.registry.js +159 -0
- package/esm/sparkdream/vault/v1/tx.rpc.msg.js +60 -0
- package/esm/sparkdream/vault/v1/vault.js +163 -0
- package/esm/sparkdream/vault/v1/vault_proposal.js +277 -0
- package/esm/sparkdream/vault/v1/vault_signer.js +85 -0
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +99 -99
- package/ibc/bundle.js +116 -116
- package/nested-amino.d.ts +7 -2
- package/nested-amino.js +13 -4
- package/package.json +1 -13
- package/sparkdream/artifact/v1/genesis.d.ts +37 -4
- package/sparkdream/artifact/v1/genesis.js +216 -2
- package/sparkdream/artifact/v1/params.d.ts +92 -0
- package/sparkdream/artifact/v1/params.js +146 -2
- package/sparkdream/artifact/v1/query.d.ts +2373 -168
- package/sparkdream/artifact/v1/query.js +3768 -5
- package/sparkdream/artifact/v1/query.lcd.d.ts +22 -1
- package/sparkdream/artifact/v1/query.lcd.js +173 -0
- package/sparkdream/artifact/v1/query.rpc.Query.d.ts +98 -1
- package/sparkdream/artifact/v1/query.rpc.Query.js +194 -0
- package/sparkdream/artifact/v1/tx.amino.d.ts +1 -158
- package/sparkdream/artifact/v1/tx.amino.js +49 -158
- package/sparkdream/artifact/v1/tx.d.ts +5188 -930
- package/sparkdream/artifact/v1/tx.js +7499 -5
- package/sparkdream/artifact/v1/tx.registry.d.ts +469 -1
- package/sparkdream/artifact/v1/tx.registry.js +703 -1
- package/sparkdream/artifact/v1/tx.rpc.msg.d.ts +136 -1
- package/sparkdream/artifact/v1/tx.rpc.msg.js +240 -0
- package/sparkdream/artifact/v1/types.d.ts +1797 -25
- package/sparkdream/artifact/v1/types.js +4322 -1121
- package/sparkdream/blog/v1/tx.amino.d.ts +1 -83
- package/sparkdream/blog/v1/tx.amino.js +50 -117
- package/sparkdream/bundle.d.ts +12983 -10912
- package/sparkdream/bundle.js +329 -291
- package/sparkdream/client.d.ts +1 -1629
- package/sparkdream/client.js +5 -2
- package/sparkdream/collect/v1/tx.amino.d.ts +1 -138
- package/sparkdream/collect/v1/tx.amino.js +50 -241
- package/sparkdream/commons/v1/tx.amino.d.ts +1 -103
- package/sparkdream/commons/v1/tx.amino.js +49 -230
- package/sparkdream/commons/v1/tx.d.ts +18 -0
- package/sparkdream/commons/v1/tx.js +25 -1
- package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -13
- package/sparkdream/ecosystem/v1/tx.amino.js +50 -28
- package/sparkdream/federation/v1/tx.amino.d.ts +1 -128
- package/sparkdream/federation/v1/tx.amino.js +49 -128
- package/sparkdream/forum/v1/tx.amino.d.ts +1 -183
- package/sparkdream/forum/v1/tx.amino.js +50 -213
- package/sparkdream/futarchy/v1/tx.amino.d.ts +1 -38
- package/sparkdream/futarchy/v1/tx.amino.js +49 -38
- package/sparkdream/guardian/v1/tx.amino.d.ts +2 -8
- package/sparkdream/guardian/v1/tx.amino.js +52 -9
- package/sparkdream/lcd.d.ts +3 -0
- package/sparkdream/lcd.js +5 -0
- package/sparkdream/name/v1/tx.amino.d.ts +1 -63
- package/sparkdream/name/v1/tx.amino.js +49 -63
- package/sparkdream/rep/v1/genesis.d.ts +19 -0
- package/sparkdream/rep/v1/genesis.js +74 -1
- package/sparkdream/rep/v1/member.d.ts +92 -0
- package/sparkdream/rep/v1/member.js +110 -1
- package/sparkdream/rep/v1/migration.d.ts +587 -0
- package/sparkdream/rep/v1/migration.js +964 -0
- package/sparkdream/rep/v1/params.d.ts +174 -0
- package/sparkdream/rep/v1/params.js +181 -1
- package/sparkdream/rep/v1/query.d.ts +679 -0
- package/sparkdream/rep/v1/query.js +1061 -1
- package/sparkdream/rep/v1/query.lcd.d.ts +8 -1
- package/sparkdream/rep/v1/query.lcd.js +48 -0
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +32 -1
- package/sparkdream/rep/v1/query.rpc.Query.js +64 -0
- package/sparkdream/rep/v1/tx.amino.d.ts +1 -283
- package/sparkdream/rep/v1/tx.amino.js +47 -416
- package/sparkdream/rep/v1/tx.d.ts +1185 -0
- package/sparkdream/rep/v1/tx.js +1742 -2
- package/sparkdream/rep/v1/tx.registry.d.ts +133 -1
- package/sparkdream/rep/v1/tx.registry.js +199 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +34 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +66 -0
- package/sparkdream/reveal/v1/tx.amino.d.ts +1 -53
- package/sparkdream/reveal/v1/tx.amino.js +50 -75
- package/sparkdream/rpc.query.d.ts +42 -0
- package/sparkdream/rpc.query.js +3 -0
- package/sparkdream/rpc.tx.d.ts +3 -0
- package/sparkdream/rpc.tx.js +3 -0
- package/sparkdream/season/v1/tx.amino.d.ts +1 -218
- package/sparkdream/season/v1/tx.amino.js +49 -218
- package/sparkdream/service/v1/tx.amino.d.ts +1 -78
- package/sparkdream/service/v1/tx.amino.js +49 -78
- package/sparkdream/session/v1/tx.amino.d.ts +1 -93
- package/sparkdream/session/v1/tx.amino.js +48 -270
- package/sparkdream/session/v1/tx.d.ts +30 -0
- package/sparkdream/session/v1/tx.js +38 -2
- package/sparkdream/shield/v1/tx.amino.d.ts +1 -28
- package/sparkdream/shield/v1/tx.amino.js +50 -82
- package/sparkdream/sparkdream/v1/tx.amino.d.ts +1 -8
- package/sparkdream/sparkdream/v1/tx.amino.js +49 -8
- package/sparkdream/split/v1/tx.amino.d.ts +1 -8
- package/sparkdream/split/v1/tx.amino.js +49 -8
- package/sparkdream/vault/module/v1/module.d.ts +54 -0
- package/sparkdream/vault/module/v1/module.js +74 -0
- package/sparkdream/vault/v1/genesis.d.ts +59 -0
- package/sparkdream/vault/v1/genesis.js +107 -0
- package/sparkdream/vault/v1/params.d.ts +68 -0
- package/sparkdream/vault/v1/params.js +93 -0
- package/sparkdream/vault/v1/query.d.ts +935 -0
- package/sparkdream/vault/v1/query.js +1538 -0
- package/sparkdream/vault/v1/query.lcd.d.ts +18 -0
- package/sparkdream/vault/v1/query.lcd.js +104 -0
- package/sparkdream/vault/v1/query.rpc.Query.d.ts +56 -0
- package/sparkdream/vault/v1/query.rpc.Query.js +116 -0
- package/sparkdream/vault/v1/tx.amino.d.ts +2 -0
- package/sparkdream/vault/v1/tx.amino.js +55 -0
- package/sparkdream/vault/v1/tx.d.ts +826 -0
- package/sparkdream/vault/v1/tx.js +1399 -0
- package/sparkdream/vault/v1/tx.registry.d.ts +109 -0
- package/sparkdream/vault/v1/tx.registry.js +163 -0
- package/sparkdream/vault/v1/tx.rpc.msg.d.ts +37 -0
- package/sparkdream/vault/v1/tx.rpc.msg.js +65 -0
- package/sparkdream/vault/v1/vault.d.ts +117 -0
- package/sparkdream/vault/v1/vault.js +166 -0
- package/sparkdream/vault/v1/vault_proposal.d.ts +158 -0
- package/sparkdream/vault/v1/vault_proposal.js +285 -0
- package/sparkdream/vault/v1/vault_signer.d.ts +54 -0
- package/sparkdream/vault/v1/vault_signer.js +88 -0
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
- package/varint.d.ts +1 -1
|
@@ -1,219 +1,17 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"/sparkdream.season.v1.MsgSetUsername": {
|
|
20
|
-
aminoType: "sparkdream/x/season/MsgSetUsername",
|
|
21
|
-
toAmino: MsgSetUsername.toAmino,
|
|
22
|
-
fromAmino: MsgSetUsername.fromAmino
|
|
23
|
-
},
|
|
24
|
-
"/sparkdream.season.v1.MsgSetDisplayTitle": {
|
|
25
|
-
aminoType: "sparkdream/x/season/MsgSetDisplayTitle",
|
|
26
|
-
toAmino: MsgSetDisplayTitle.toAmino,
|
|
27
|
-
fromAmino: MsgSetDisplayTitle.fromAmino
|
|
28
|
-
},
|
|
29
|
-
"/sparkdream.season.v1.MsgCreateGuild": {
|
|
30
|
-
aminoType: "sparkdream/x/season/MsgCreateGuild",
|
|
31
|
-
toAmino: MsgCreateGuild.toAmino,
|
|
32
|
-
fromAmino: MsgCreateGuild.fromAmino
|
|
33
|
-
},
|
|
34
|
-
"/sparkdream.season.v1.MsgJoinGuild": {
|
|
35
|
-
aminoType: "sparkdream/x/season/MsgJoinGuild",
|
|
36
|
-
toAmino: MsgJoinGuild.toAmino,
|
|
37
|
-
fromAmino: MsgJoinGuild.fromAmino
|
|
38
|
-
},
|
|
39
|
-
"/sparkdream.season.v1.MsgLeaveGuild": {
|
|
40
|
-
aminoType: "sparkdream/x/season/MsgLeaveGuild",
|
|
41
|
-
toAmino: MsgLeaveGuild.toAmino,
|
|
42
|
-
fromAmino: MsgLeaveGuild.fromAmino
|
|
43
|
-
},
|
|
44
|
-
"/sparkdream.season.v1.MsgTransferGuildFounder": {
|
|
45
|
-
aminoType: "sparkdream/x/season/MsgTransferGuildFounder",
|
|
46
|
-
toAmino: MsgTransferGuildFounder.toAmino,
|
|
47
|
-
fromAmino: MsgTransferGuildFounder.fromAmino
|
|
48
|
-
},
|
|
49
|
-
"/sparkdream.season.v1.MsgDissolveGuild": {
|
|
50
|
-
aminoType: "sparkdream/x/season/MsgDissolveGuild",
|
|
51
|
-
toAmino: MsgDissolveGuild.toAmino,
|
|
52
|
-
fromAmino: MsgDissolveGuild.fromAmino
|
|
53
|
-
},
|
|
54
|
-
"/sparkdream.season.v1.MsgPromoteToOfficer": {
|
|
55
|
-
aminoType: "sparkdream/x/season/MsgPromoteToOfficer",
|
|
56
|
-
toAmino: MsgPromoteToOfficer.toAmino,
|
|
57
|
-
fromAmino: MsgPromoteToOfficer.fromAmino
|
|
58
|
-
},
|
|
59
|
-
"/sparkdream.season.v1.MsgDemoteOfficer": {
|
|
60
|
-
aminoType: "sparkdream/x/season/MsgDemoteOfficer",
|
|
61
|
-
toAmino: MsgDemoteOfficer.toAmino,
|
|
62
|
-
fromAmino: MsgDemoteOfficer.fromAmino
|
|
63
|
-
},
|
|
64
|
-
"/sparkdream.season.v1.MsgInviteToGuild": {
|
|
65
|
-
aminoType: "sparkdream/x/season/MsgInviteToGuild",
|
|
66
|
-
toAmino: MsgInviteToGuild.toAmino,
|
|
67
|
-
fromAmino: MsgInviteToGuild.fromAmino
|
|
68
|
-
},
|
|
69
|
-
"/sparkdream.season.v1.MsgAcceptGuildInvite": {
|
|
70
|
-
aminoType: "sparkdream/x/season/MsgAcceptGuildInvite",
|
|
71
|
-
toAmino: MsgAcceptGuildInvite.toAmino,
|
|
72
|
-
fromAmino: MsgAcceptGuildInvite.fromAmino
|
|
73
|
-
},
|
|
74
|
-
"/sparkdream.season.v1.MsgRevokeGuildInvite": {
|
|
75
|
-
aminoType: "sparkdream/x/season/MsgRevokeGuildInvite",
|
|
76
|
-
toAmino: MsgRevokeGuildInvite.toAmino,
|
|
77
|
-
fromAmino: MsgRevokeGuildInvite.fromAmino
|
|
78
|
-
},
|
|
79
|
-
"/sparkdream.season.v1.MsgSetGuildInviteOnly": {
|
|
80
|
-
aminoType: "sparkdream/x/season/MsgSetGuildInviteOnly",
|
|
81
|
-
toAmino: MsgSetGuildInviteOnly.toAmino,
|
|
82
|
-
fromAmino: MsgSetGuildInviteOnly.fromAmino
|
|
83
|
-
},
|
|
84
|
-
"/sparkdream.season.v1.MsgUpdateGuildDescription": {
|
|
85
|
-
aminoType: "sparkdream/x/season/MsgUpdateGuildDescription",
|
|
86
|
-
toAmino: MsgUpdateGuildDescription.toAmino,
|
|
87
|
-
fromAmino: MsgUpdateGuildDescription.fromAmino
|
|
88
|
-
},
|
|
89
|
-
"/sparkdream.season.v1.MsgKickFromGuild": {
|
|
90
|
-
aminoType: "sparkdream/x/season/MsgKickFromGuild",
|
|
91
|
-
toAmino: MsgKickFromGuild.toAmino,
|
|
92
|
-
fromAmino: MsgKickFromGuild.fromAmino
|
|
93
|
-
},
|
|
94
|
-
"/sparkdream.season.v1.MsgClaimGuildFounder": {
|
|
95
|
-
aminoType: "sparkdream/x/season/MsgClaimGuildFounder",
|
|
96
|
-
toAmino: MsgClaimGuildFounder.toAmino,
|
|
97
|
-
fromAmino: MsgClaimGuildFounder.fromAmino
|
|
98
|
-
},
|
|
99
|
-
"/sparkdream.season.v1.MsgStartQuest": {
|
|
100
|
-
aminoType: "sparkdream/x/season/MsgStartQuest",
|
|
101
|
-
toAmino: MsgStartQuest.toAmino,
|
|
102
|
-
fromAmino: MsgStartQuest.fromAmino
|
|
103
|
-
},
|
|
104
|
-
"/sparkdream.season.v1.MsgClaimQuestReward": {
|
|
105
|
-
aminoType: "sparkdream/x/season/MsgClaimQuestReward",
|
|
106
|
-
toAmino: MsgClaimQuestReward.toAmino,
|
|
107
|
-
fromAmino: MsgClaimQuestReward.fromAmino
|
|
108
|
-
},
|
|
109
|
-
"/sparkdream.season.v1.MsgAbandonQuest": {
|
|
110
|
-
aminoType: "sparkdream/x/season/MsgAbandonQuest",
|
|
111
|
-
toAmino: MsgAbandonQuest.toAmino,
|
|
112
|
-
fromAmino: MsgAbandonQuest.fromAmino
|
|
113
|
-
},
|
|
114
|
-
"/sparkdream.season.v1.MsgCreateQuest": {
|
|
115
|
-
aminoType: "sparkdream/x/season/MsgCreateQuest",
|
|
116
|
-
toAmino: MsgCreateQuest.toAmino,
|
|
117
|
-
fromAmino: MsgCreateQuest.fromAmino
|
|
118
|
-
},
|
|
119
|
-
"/sparkdream.season.v1.MsgDeactivateQuest": {
|
|
120
|
-
aminoType: "sparkdream/x/season/MsgDeactivateQuest",
|
|
121
|
-
toAmino: MsgDeactivateQuest.toAmino,
|
|
122
|
-
fromAmino: MsgDeactivateQuest.fromAmino
|
|
123
|
-
},
|
|
124
|
-
"/sparkdream.season.v1.MsgExtendSeason": {
|
|
125
|
-
aminoType: "sparkdream/x/season/MsgExtendSeason",
|
|
126
|
-
toAmino: MsgExtendSeason.toAmino,
|
|
127
|
-
fromAmino: MsgExtendSeason.fromAmino
|
|
128
|
-
},
|
|
129
|
-
"/sparkdream.season.v1.MsgSetNextSeasonInfo": {
|
|
130
|
-
aminoType: "sparkdream/x/season/MsgSetNextSeasonInfo",
|
|
131
|
-
toAmino: MsgSetNextSeasonInfo.toAmino,
|
|
132
|
-
fromAmino: MsgSetNextSeasonInfo.fromAmino
|
|
133
|
-
},
|
|
134
|
-
"/sparkdream.season.v1.MsgAbortSeasonTransition": {
|
|
135
|
-
aminoType: "sparkdream/x/season/MsgAbortSeasonTransition",
|
|
136
|
-
toAmino: MsgAbortSeasonTransition.toAmino,
|
|
137
|
-
fromAmino: MsgAbortSeasonTransition.fromAmino
|
|
138
|
-
},
|
|
139
|
-
"/sparkdream.season.v1.MsgRetrySeasonTransition": {
|
|
140
|
-
aminoType: "sparkdream/x/season/MsgRetrySeasonTransition",
|
|
141
|
-
toAmino: MsgRetrySeasonTransition.toAmino,
|
|
142
|
-
fromAmino: MsgRetrySeasonTransition.fromAmino
|
|
143
|
-
},
|
|
144
|
-
"/sparkdream.season.v1.MsgSkipTransitionPhase": {
|
|
145
|
-
aminoType: "sparkdream/x/season/MsgSkipTransitionPhase",
|
|
146
|
-
toAmino: MsgSkipTransitionPhase.toAmino,
|
|
147
|
-
fromAmino: MsgSkipTransitionPhase.fromAmino
|
|
148
|
-
},
|
|
149
|
-
"/sparkdream.season.v1.MsgReportDisplayName": {
|
|
150
|
-
aminoType: "sparkdream/x/season/MsgReportDisplayName",
|
|
151
|
-
toAmino: MsgReportDisplayName.toAmino,
|
|
152
|
-
fromAmino: MsgReportDisplayName.fromAmino
|
|
153
|
-
},
|
|
154
|
-
"/sparkdream.season.v1.MsgAppealDisplayNameModeration": {
|
|
155
|
-
aminoType: "sparkdream/x/season/MsgAppealDisplayNameModeration",
|
|
156
|
-
toAmino: MsgAppealDisplayNameModeration.toAmino,
|
|
157
|
-
fromAmino: MsgAppealDisplayNameModeration.fromAmino
|
|
158
|
-
},
|
|
159
|
-
"/sparkdream.season.v1.MsgCreateAchievement": {
|
|
160
|
-
aminoType: "sparkdream/x/season/MsgCreateAchievement",
|
|
161
|
-
toAmino: MsgCreateAchievement.toAmino,
|
|
162
|
-
fromAmino: MsgCreateAchievement.fromAmino
|
|
163
|
-
},
|
|
164
|
-
"/sparkdream.season.v1.MsgUpdateAchievement": {
|
|
165
|
-
aminoType: "sparkdream/x/season/MsgUpdateAchievement",
|
|
166
|
-
toAmino: MsgUpdateAchievement.toAmino,
|
|
167
|
-
fromAmino: MsgUpdateAchievement.fromAmino
|
|
168
|
-
},
|
|
169
|
-
"/sparkdream.season.v1.MsgDeleteAchievement": {
|
|
170
|
-
aminoType: "sparkdream/x/season/MsgDeleteAchievement",
|
|
171
|
-
toAmino: MsgDeleteAchievement.toAmino,
|
|
172
|
-
fromAmino: MsgDeleteAchievement.fromAmino
|
|
173
|
-
},
|
|
174
|
-
"/sparkdream.season.v1.MsgCreateTitle": {
|
|
175
|
-
aminoType: "sparkdream/x/season/MsgCreateTitle",
|
|
176
|
-
toAmino: MsgCreateTitle.toAmino,
|
|
177
|
-
fromAmino: MsgCreateTitle.fromAmino
|
|
178
|
-
},
|
|
179
|
-
"/sparkdream.season.v1.MsgUpdateTitle": {
|
|
180
|
-
aminoType: "sparkdream/x/season/MsgUpdateTitle",
|
|
181
|
-
toAmino: MsgUpdateTitle.toAmino,
|
|
182
|
-
fromAmino: MsgUpdateTitle.fromAmino
|
|
183
|
-
},
|
|
184
|
-
"/sparkdream.season.v1.MsgDeleteTitle": {
|
|
185
|
-
aminoType: "sparkdream/x/season/MsgDeleteTitle",
|
|
186
|
-
toAmino: MsgDeleteTitle.toAmino,
|
|
187
|
-
fromAmino: MsgDeleteTitle.fromAmino
|
|
188
|
-
},
|
|
189
|
-
"/sparkdream.season.v1.MsgUpdateQuest": {
|
|
190
|
-
aminoType: "sparkdream/x/season/MsgUpdateQuest",
|
|
191
|
-
toAmino: MsgUpdateQuest.toAmino,
|
|
192
|
-
fromAmino: MsgUpdateQuest.fromAmino
|
|
193
|
-
},
|
|
194
|
-
"/sparkdream.season.v1.MsgResolveDisplayNameAppeal": {
|
|
195
|
-
aminoType: "sparkdream/x/season/MsgResolveDisplayNameAppeal",
|
|
196
|
-
toAmino: MsgResolveDisplayNameAppeal.toAmino,
|
|
197
|
-
fromAmino: MsgResolveDisplayNameAppeal.fromAmino
|
|
198
|
-
},
|
|
199
|
-
"/sparkdream.season.v1.MsgResolveUnappealedModeration": {
|
|
200
|
-
aminoType: "sparkdream/x/season/MsgResolveUnappealedModeration",
|
|
201
|
-
toAmino: MsgResolveUnappealedModeration.toAmino,
|
|
202
|
-
fromAmino: MsgResolveUnappealedModeration.fromAmino
|
|
203
|
-
},
|
|
204
|
-
"/sparkdream.season.v1.MsgNominate": {
|
|
205
|
-
aminoType: "sparkdream/x/season/MsgNominate",
|
|
206
|
-
toAmino: MsgNominate.toAmino,
|
|
207
|
-
fromAmino: MsgNominate.fromAmino
|
|
208
|
-
},
|
|
209
|
-
"/sparkdream.season.v1.MsgStakeNomination": {
|
|
210
|
-
aminoType: "sparkdream/x/season/MsgStakeNomination",
|
|
211
|
-
toAmino: MsgStakeNomination.toAmino,
|
|
212
|
-
fromAmino: MsgStakeNomination.fromAmino
|
|
213
|
-
},
|
|
214
|
-
"/sparkdream.season.v1.MsgUnstakeNomination": {
|
|
215
|
-
aminoType: "sparkdream/x/season/MsgUnstakeNomination",
|
|
216
|
-
toAmino: MsgUnstakeNomination.toAmino,
|
|
217
|
-
fromAmino: MsgUnstakeNomination.fromAmino
|
|
218
|
-
}
|
|
219
|
-
};
|
|
2
|
+
// HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
|
|
3
|
+
// by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
|
|
4
|
+
//
|
|
5
|
+
// Why: Telescope's generated converters (and the per-message overrides that
|
|
6
|
+
// used to patch them) disagree with the chain's aminojson on empty lists,
|
|
7
|
+
// empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
|
|
8
|
+
// whenever a proto changed. Every Msg of x/season is converted by the
|
|
9
|
+
// schema-driven engine in chain-amino.ts instead, which renders amino JSON
|
|
10
|
+
// from the protobuf bytes exactly as the chain does.
|
|
11
|
+
//
|
|
12
|
+
// MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
|
|
13
|
+
// the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
|
|
14
|
+
// checks them all against the chain's encoder.
|
|
15
|
+
import * as tx from "./tx";
|
|
16
|
+
import { chainAminoConverters } from "../../../chain-amino";
|
|
17
|
+
export const AminoConverter = chainAminoConverters("sparkdream.season.v1", tx);
|
|
@@ -1,79 +1,17 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"/sparkdream.service.v1.MsgUpdateMetadata": {
|
|
20
|
-
aminoType: "sparkdream/x/service/MsgUpdateMetadata",
|
|
21
|
-
toAmino: MsgUpdateMetadata.toAmino,
|
|
22
|
-
fromAmino: MsgUpdateMetadata.fromAmino
|
|
23
|
-
},
|
|
24
|
-
"/sparkdream.service.v1.MsgUnbondOperator": {
|
|
25
|
-
aminoType: "sparkdream/x/service/MsgUnbondOperator",
|
|
26
|
-
toAmino: MsgUnbondOperator.toAmino,
|
|
27
|
-
fromAmino: MsgUnbondOperator.fromAmino
|
|
28
|
-
},
|
|
29
|
-
"/sparkdream.service.v1.MsgClaimUnbondedBond": {
|
|
30
|
-
aminoType: "sparkdream/x/service/MsgClaimUnbondedBond",
|
|
31
|
-
toAmino: MsgClaimUnbondedBond.toAmino,
|
|
32
|
-
fromAmino: MsgClaimUnbondedBond.fromAmino
|
|
33
|
-
},
|
|
34
|
-
"/sparkdream.service.v1.MsgTopUpBond": {
|
|
35
|
-
aminoType: "sparkdream/x/service/MsgTopUpBond",
|
|
36
|
-
toAmino: MsgTopUpBond.toAmino,
|
|
37
|
-
fromAmino: MsgTopUpBond.fromAmino
|
|
38
|
-
},
|
|
39
|
-
"/sparkdream.service.v1.MsgWithdrawBond": {
|
|
40
|
-
aminoType: "sparkdream/x/service/MsgWithdrawBond",
|
|
41
|
-
toAmino: MsgWithdrawBond.toAmino,
|
|
42
|
-
fromAmino: MsgWithdrawBond.fromAmino
|
|
43
|
-
},
|
|
44
|
-
"/sparkdream.service.v1.MsgReportOperator": {
|
|
45
|
-
aminoType: "sparkdream/x/service/MsgReportOperator",
|
|
46
|
-
toAmino: MsgReportOperator.toAmino,
|
|
47
|
-
fromAmino: MsgReportOperator.fromAmino
|
|
48
|
-
},
|
|
49
|
-
"/sparkdream.service.v1.MsgResolveReport": {
|
|
50
|
-
aminoType: "sparkdream/x/service/MsgResolveReport",
|
|
51
|
-
toAmino: MsgResolveReport.toAmino,
|
|
52
|
-
fromAmino: MsgResolveReport.fromAmino
|
|
53
|
-
},
|
|
54
|
-
"/sparkdream.service.v1.MsgContestSlash": {
|
|
55
|
-
aminoType: "sparkdream/x/service/MsgContestSlash",
|
|
56
|
-
toAmino: MsgContestSlash.toAmino,
|
|
57
|
-
fromAmino: MsgContestSlash.fromAmino
|
|
58
|
-
},
|
|
59
|
-
"/sparkdream.service.v1.MsgResolveReportByJury": {
|
|
60
|
-
aminoType: "sparkdream/x/service/MsgResolveReportByJury",
|
|
61
|
-
toAmino: MsgResolveReportByJury.toAmino,
|
|
62
|
-
fromAmino: MsgResolveReportByJury.fromAmino
|
|
63
|
-
},
|
|
64
|
-
"/sparkdream.service.v1.MsgOpenControllerTransferCase": {
|
|
65
|
-
aminoType: "sparkdream/x/service/MsgOpenControllerTransferCase",
|
|
66
|
-
toAmino: MsgOpenControllerTransferCase.toAmino,
|
|
67
|
-
fromAmino: MsgOpenControllerTransferCase.fromAmino
|
|
68
|
-
},
|
|
69
|
-
"/sparkdream.service.v1.MsgFinalizeControllerTransfer": {
|
|
70
|
-
aminoType: "sparkdream/x/service/MsgFinalizeControllerTransfer",
|
|
71
|
-
toAmino: MsgFinalizeControllerTransfer.toAmino,
|
|
72
|
-
fromAmino: MsgFinalizeControllerTransfer.fromAmino
|
|
73
|
-
},
|
|
74
|
-
"/sparkdream.service.v1.MsgSubmitCheckpoint": {
|
|
75
|
-
aminoType: "sparkdream/x/service/MsgSubmitCheckpoint",
|
|
76
|
-
toAmino: MsgSubmitCheckpoint.toAmino,
|
|
77
|
-
fromAmino: MsgSubmitCheckpoint.fromAmino
|
|
78
|
-
}
|
|
79
|
-
};
|
|
2
|
+
// HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
|
|
3
|
+
// by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
|
|
4
|
+
//
|
|
5
|
+
// Why: Telescope's generated converters (and the per-message overrides that
|
|
6
|
+
// used to patch them) disagree with the chain's aminojson on empty lists,
|
|
7
|
+
// empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
|
|
8
|
+
// whenever a proto changed. Every Msg of x/service is converted by the
|
|
9
|
+
// schema-driven engine in chain-amino.ts instead, which renders amino JSON
|
|
10
|
+
// from the protobuf bytes exactly as the chain does.
|
|
11
|
+
//
|
|
12
|
+
// MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
|
|
13
|
+
// the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
|
|
14
|
+
// checks them all against the chain's encoder.
|
|
15
|
+
import * as tx from "./tx";
|
|
16
|
+
import { chainAminoConverters } from "../../../chain-amino";
|
|
17
|
+
export const AminoConverter = chainAminoConverters("sparkdream.service.v1", tx);
|
|
@@ -1,272 +1,17 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
// HAND-WRITTEN OVERRIDE — overlaid
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// "<CamelCase oneof name>": {"type": "<oneof_name>", "value": {"<field>": {...}}}
|
|
19
|
-
//
|
|
20
|
-
// e.g. "Payload": {"type": "sparkdream/session/RecurringPullPayload",
|
|
21
|
-
// "value": {"recurring_pull": {...}}}
|
|
22
|
-
//
|
|
23
|
-
// while telescope emits the bare member ("recurring_pull": {...}).
|
|
24
|
-
// 3. Repeated fields must be omitted when empty (omitempty), never `[]`.
|
|
25
|
-
//
|
|
26
|
-
// cosmjs rebuilds the TxBody from fromAmino(signed msgs), so each fromAmino
|
|
27
|
-
// below must exactly invert its toAmino.
|
|
28
|
-
//
|
|
29
|
-
// 64-bit ints are coerced here rather than trusting callers to pass BigInt:
|
|
30
|
-
// cosmjs hands toAmino the caller's raw value (no fromPartial), and a Number
|
|
31
|
-
// 0 would otherwise sign a key the chain omits.
|
|
32
|
-
import { MsgUpdateParams, MsgUpdateOperationalParams, MsgCreateSession, MsgRevokeSession, } from "./tx";
|
|
33
|
-
import { Coin } from "../../../cosmos/base/v1beta1/coin";
|
|
34
|
-
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
35
|
-
import { toTimestamp, fromTimestamp } from "../../../helpers";
|
|
36
|
-
import { anyToAmino, aminoToAny } from "../../../nested-amino";
|
|
37
|
-
const str = (v) => (v === "" || v === undefined || v === null ? undefined : v);
|
|
38
|
-
const int64 = (v) => {
|
|
39
|
-
if (v === undefined || v === null || v === "")
|
|
40
|
-
return undefined;
|
|
41
|
-
const b = BigInt(v);
|
|
42
|
-
return b === BigInt(0) ? undefined : b.toString();
|
|
43
|
-
};
|
|
44
|
-
const bool = (v) => (v ? true : undefined);
|
|
45
|
-
const list = (v) => ((v?.length ?? 0) > 0 ? v.map((e) => e) : undefined);
|
|
46
|
-
const coin = (v) => (v ? Coin.toAmino(Coin.fromPartial(v)) : undefined);
|
|
47
|
-
const time = (v) => (v ? Timestamp.toAmino(toTimestamp(v)) : undefined);
|
|
48
|
-
const toBig = (v) => (v === undefined || v === null ? BigInt(0) : BigInt(v));
|
|
49
|
-
const fromCoin = (v) => (v ? Coin.fromAmino(v) : undefined);
|
|
50
|
-
const fromTime = (v) => (v ? fromTimestamp(Timestamp.fromAmino(v)) : undefined);
|
|
51
|
-
// ── Payloads ────────────────────────────────────────────────────────────
|
|
52
|
-
const sessionKeyToAmino = (p) => ({
|
|
53
|
-
allowed_msg_types: list(p.allowedMsgTypes),
|
|
54
|
-
spend_limit: coin(p.spendLimit),
|
|
55
|
-
spent: coin(p.spent),
|
|
56
|
-
max_exec_count: int64(p.maxExecCount),
|
|
57
|
-
exec_count: int64(p.execCount),
|
|
58
|
-
last_used_at: time(p.lastUsedAt),
|
|
59
|
-
allow_self_revoke: bool(p.allowSelfRevoke),
|
|
60
|
-
});
|
|
61
|
-
const sessionKeyFromAmino = (o) => ({
|
|
62
|
-
allowedMsgTypes: o.allowed_msg_types ?? [],
|
|
63
|
-
spendLimit: fromCoin(o.spend_limit),
|
|
64
|
-
spent: fromCoin(o.spent),
|
|
65
|
-
maxExecCount: toBig(o.max_exec_count),
|
|
66
|
-
execCount: toBig(o.exec_count),
|
|
67
|
-
lastUsedAt: fromTime(o.last_used_at),
|
|
68
|
-
allowSelfRevoke: o.allow_self_revoke ?? false,
|
|
69
|
-
});
|
|
70
|
-
const recurringPullToAmino = (p) => ({
|
|
71
|
-
amount_per_period: coin(p.amountPerPeriod),
|
|
72
|
-
period_seconds: int64(p.periodSeconds),
|
|
73
|
-
start_time: int64(p.startTime),
|
|
74
|
-
last_claim_advance: int64(p.lastClaimAdvance),
|
|
75
|
-
claims_made: int64(p.claimsMade),
|
|
76
|
-
max_per_epoch: str(p.maxPerEpoch),
|
|
77
|
-
});
|
|
78
|
-
const recurringPullFromAmino = (o) => ({
|
|
79
|
-
amountPerPeriod: fromCoin(o.amount_per_period),
|
|
80
|
-
periodSeconds: toBig(o.period_seconds),
|
|
81
|
-
startTime: toBig(o.start_time),
|
|
82
|
-
lastClaimAdvance: toBig(o.last_claim_advance),
|
|
83
|
-
claimsMade: toBig(o.claims_made),
|
|
84
|
-
maxPerEpoch: o.max_per_epoch ?? "",
|
|
85
|
-
});
|
|
86
|
-
const spendingAllowanceToAmino = (p) => ({
|
|
87
|
-
max_per_period: coin(p.maxPerPeriod),
|
|
88
|
-
period_seconds: int64(p.periodSeconds),
|
|
89
|
-
current_period_start: int64(p.currentPeriodStart),
|
|
90
|
-
spent_in_current_period: coin(p.spentInCurrentPeriod),
|
|
91
|
-
allowed_recipients: list(p.allowedRecipients),
|
|
92
|
-
denom: str(p.denom),
|
|
93
|
-
});
|
|
94
|
-
const spendingAllowanceFromAmino = (o) => ({
|
|
95
|
-
maxPerPeriod: fromCoin(o.max_per_period),
|
|
96
|
-
periodSeconds: toBig(o.period_seconds),
|
|
97
|
-
currentPeriodStart: toBig(o.current_period_start),
|
|
98
|
-
spentInCurrentPeriod: fromCoin(o.spent_in_current_period),
|
|
99
|
-
allowedRecipients: o.allowed_recipients ?? [],
|
|
100
|
-
denom: o.denom ?? "",
|
|
101
|
-
});
|
|
102
|
-
const scheduledOneshotToAmino = (p) => {
|
|
103
|
-
let action = undefined;
|
|
104
|
-
if (p.transfer) {
|
|
105
|
-
action = {
|
|
106
|
-
type: "sparkdream/session/OneshotTransfer",
|
|
107
|
-
value: { transfer: { recipient: str(p.transfer.recipient), amount: coin(p.transfer.amount) } },
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
else if (p.exec) {
|
|
111
|
-
action = {
|
|
112
|
-
type: "sparkdream/session/OneshotExec",
|
|
113
|
-
value: {
|
|
114
|
-
exec: {
|
|
115
|
-
msg: p.exec.msg ? anyToAmino(p.exec.msg) : undefined,
|
|
116
|
-
gas_limit: int64(p.exec.gasLimit),
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
// aminojson writes `null` for an unset oneof rather than omitting it.
|
|
123
|
-
Action: action ?? null,
|
|
124
|
-
fire_at: int64(p.fireAt),
|
|
125
|
-
fire_error: str(p.fireError),
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
const scheduledOneshotFromAmino = (o) => {
|
|
129
|
-
const v = o.Action?.value ?? {};
|
|
130
|
-
return {
|
|
131
|
-
transfer: v.transfer
|
|
132
|
-
? { recipient: v.transfer.recipient ?? "", amount: fromCoin(v.transfer.amount) }
|
|
133
|
-
: undefined,
|
|
134
|
-
exec: v.exec
|
|
135
|
-
? { msg: v.exec.msg ? aminoToAny(v.exec.msg) : undefined, gasLimit: toBig(v.exec.gas_limit) }
|
|
136
|
-
: undefined,
|
|
137
|
-
fireAt: toBig(o.fire_at),
|
|
138
|
-
fireError: o.fire_error ?? "",
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
const signInToAmino = (p) => ({ service: str(p.service) });
|
|
142
|
-
const signInFromAmino = (o) => ({ service: o.service ?? "" });
|
|
143
|
-
const PAYLOADS = [
|
|
144
|
-
["sessionKey", "session_key", "sparkdream/session/SessionKeyPayload", sessionKeyToAmino, sessionKeyFromAmino],
|
|
145
|
-
["recurringPull", "recurring_pull", "sparkdream/session/RecurringPullPayload", recurringPullToAmino, recurringPullFromAmino],
|
|
146
|
-
["spendingAllowance", "spending_allowance", "sparkdream/session/SpendingAllowancePayload", spendingAllowanceToAmino, spendingAllowanceFromAmino],
|
|
147
|
-
["scheduledOneshot", "scheduled_oneshot", "sparkdream/session/ScheduledOneshotPayload", scheduledOneshotToAmino, scheduledOneshotFromAmino],
|
|
148
|
-
["signIn", "sign_in", "sparkdream/session/SignInPayload", signInToAmino, signInFromAmino],
|
|
149
|
-
];
|
|
150
|
-
// ── Messages ────────────────────────────────────────────────────────────
|
|
151
|
-
// {<signer>, grant_id} messages; each signer field name is a single word, so
|
|
152
|
-
// the proto and amino spellings coincide.
|
|
153
|
-
const grantIdMsg = (signer) => ({
|
|
154
|
-
toAmino: (m) => ({ [signer]: str(m[signer]), grant_id: int64(m.grantId) }),
|
|
155
|
-
fromAmino: (o) => ({ [signer]: o[signer] ?? "", grantId: toBig(o.grant_id) }),
|
|
156
|
-
});
|
|
157
|
-
export const AminoConverter = {
|
|
158
|
-
"/sparkdream.session.v1.MsgUpdateParams": {
|
|
159
|
-
aminoType: "sparkdream/x/session/MsgUpdateParams",
|
|
160
|
-
toAmino: MsgUpdateParams.toAmino,
|
|
161
|
-
fromAmino: MsgUpdateParams.fromAmino,
|
|
162
|
-
},
|
|
163
|
-
"/sparkdream.session.v1.MsgUpdateOperationalParams": {
|
|
164
|
-
aminoType: "sparkdream/x/session/MsgUpdateOperationalParams",
|
|
165
|
-
toAmino: MsgUpdateOperationalParams.toAmino,
|
|
166
|
-
fromAmino: MsgUpdateOperationalParams.fromAmino,
|
|
167
|
-
},
|
|
168
|
-
// `allowed_msg_types` is the repeated string field that gets emitted as `[]`
|
|
169
|
-
// when a session is created with no type allowlist (i.e. allow-all).
|
|
170
|
-
"/sparkdream.session.v1.MsgCreateSession": {
|
|
171
|
-
aminoType: "sparkdream/x/session/MsgCreateSession",
|
|
172
|
-
toAmino(message) {
|
|
173
|
-
const obj = {};
|
|
174
|
-
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
175
|
-
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
176
|
-
obj.allowed_msg_types = (message.allowedMsgTypes?.length ?? 0) > 0
|
|
177
|
-
? message.allowedMsgTypes.map((e) => e)
|
|
178
|
-
: undefined;
|
|
179
|
-
obj.spend_limit = message.spendLimit ? Coin.toAmino(message.spendLimit) : undefined;
|
|
180
|
-
obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined;
|
|
181
|
-
obj.max_exec_count = message.maxExecCount !== BigInt(0) ? message.maxExecCount?.toString() : undefined;
|
|
182
|
-
return obj;
|
|
183
|
-
},
|
|
184
|
-
fromAmino: MsgCreateSession.fromAmino,
|
|
185
|
-
},
|
|
186
|
-
"/sparkdream.session.v1.MsgRevokeSession": {
|
|
187
|
-
aminoType: "sparkdream/x/session/MsgRevokeSession",
|
|
188
|
-
toAmino: MsgRevokeSession.toAmino,
|
|
189
|
-
fromAmino: MsgRevokeSession.fromAmino,
|
|
190
|
-
},
|
|
191
|
-
"/sparkdream.session.v1.MsgExecSession": {
|
|
192
|
-
aminoType: "sparkdream/x/session/MsgExecSession",
|
|
193
|
-
toAmino(message) {
|
|
194
|
-
const obj = {};
|
|
195
|
-
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
196
|
-
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
197
|
-
// Omit when empty to match the chain's aminojson default for
|
|
198
|
-
// repeated fields.
|
|
199
|
-
obj.msgs = (message.msgs?.length ?? 0) > 0
|
|
200
|
-
? message.msgs.map((a) => anyToAmino(a))
|
|
201
|
-
: undefined;
|
|
202
|
-
return obj;
|
|
203
|
-
},
|
|
204
|
-
fromAmino(object) {
|
|
205
|
-
return {
|
|
206
|
-
grantee: object.grantee ?? "",
|
|
207
|
-
granter: object.granter ?? "",
|
|
208
|
-
msgs: (object.msgs ?? []).map((e) => aminoToAny(e)),
|
|
209
|
-
};
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
"/sparkdream.session.v1.MsgCreateGrant": {
|
|
213
|
-
aminoType: "sparkdream/x/session/MsgCreateGrant",
|
|
214
|
-
toAmino(message) {
|
|
215
|
-
const set = PAYLOADS.find(([key]) => message[key]);
|
|
216
|
-
return {
|
|
217
|
-
granter: str(message.granter),
|
|
218
|
-
grantee: str(message.grantee),
|
|
219
|
-
expires_at: time(message.expiresAt),
|
|
220
|
-
note: str(message.note),
|
|
221
|
-
Payload: set
|
|
222
|
-
? { type: set[2], value: { [set[1]]: set[3](message[set[0]]) } }
|
|
223
|
-
: null,
|
|
224
|
-
};
|
|
225
|
-
},
|
|
226
|
-
fromAmino(object) {
|
|
227
|
-
const out = {
|
|
228
|
-
granter: object.granter ?? "",
|
|
229
|
-
grantee: object.grantee ?? "",
|
|
230
|
-
expiresAt: fromTime(object.expires_at),
|
|
231
|
-
note: object.note ?? "",
|
|
232
|
-
};
|
|
233
|
-
const inner = object.Payload?.value ?? {};
|
|
234
|
-
for (const [key, field, , , fromAmino] of PAYLOADS) {
|
|
235
|
-
if (inner[field])
|
|
236
|
-
out[key] = fromAmino(inner[field]);
|
|
237
|
-
}
|
|
238
|
-
return out;
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
"/sparkdream.session.v1.MsgClaimRecurringPull": {
|
|
242
|
-
aminoType: "sparkdream/x/session/MsgClaimRecurringPull",
|
|
243
|
-
...grantIdMsg("grantee"),
|
|
244
|
-
},
|
|
245
|
-
"/sparkdream.session.v1.MsgPullAllowance": {
|
|
246
|
-
aminoType: "sparkdream/x/session/MsgPullAllowance",
|
|
247
|
-
toAmino: (m) => ({
|
|
248
|
-
grantee: str(m.grantee),
|
|
249
|
-
grant_id: int64(m.grantId),
|
|
250
|
-
recipient: str(m.recipient),
|
|
251
|
-
amount: coin(m.amount),
|
|
252
|
-
}),
|
|
253
|
-
fromAmino: (o) => ({
|
|
254
|
-
grantee: o.grantee ?? "",
|
|
255
|
-
grantId: toBig(o.grant_id),
|
|
256
|
-
recipient: o.recipient ?? "",
|
|
257
|
-
amount: fromCoin(o.amount),
|
|
258
|
-
}),
|
|
259
|
-
},
|
|
260
|
-
"/sparkdream.session.v1.MsgRetryScheduledOneshot": {
|
|
261
|
-
aminoType: "sparkdream/x/session/MsgRetryScheduledOneshot",
|
|
262
|
-
...grantIdMsg("caller"),
|
|
263
|
-
},
|
|
264
|
-
"/sparkdream.session.v1.MsgRevokeGrant": {
|
|
265
|
-
aminoType: "sparkdream/x/session/MsgRevokeGrant",
|
|
266
|
-
...grantIdMsg("granter"),
|
|
267
|
-
},
|
|
268
|
-
"/sparkdream.session.v1.MsgDeclineGrant": {
|
|
269
|
-
aminoType: "sparkdream/x/session/MsgDeclineGrant",
|
|
270
|
-
...grantIdMsg("grantee"),
|
|
271
|
-
},
|
|
272
|
-
};
|
|
2
|
+
// HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
|
|
3
|
+
// by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
|
|
4
|
+
//
|
|
5
|
+
// Why: Telescope's generated converters (and the per-message overrides that
|
|
6
|
+
// used to patch them) disagree with the chain's aminojson on empty lists,
|
|
7
|
+
// empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
|
|
8
|
+
// whenever a proto changed. Every Msg of x/session is converted by the
|
|
9
|
+
// schema-driven engine in chain-amino.ts instead, which renders amino JSON
|
|
10
|
+
// from the protobuf bytes exactly as the chain does.
|
|
11
|
+
//
|
|
12
|
+
// MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
|
|
13
|
+
// the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
|
|
14
|
+
// checks them all against the chain's encoder.
|
|
15
|
+
import * as tx from "./tx";
|
|
16
|
+
import { chainAminoConverters } from "../../../chain-amino";
|
|
17
|
+
export const AminoConverter = chainAminoConverters("sparkdream.session.v1", tx);
|