decentralcardgame-cardchain-client-ts 0.0.29 → 0.0.30

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 (56) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +420 -452
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +1495 -1570
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +78 -70
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +78 -70
  5. package/DecentralCardGame.cardchain.cardchain/rest.js +71 -0
  6. package/DecentralCardGame.cardchain.cardchain/rest.ts +132 -0
  7. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +6 -0
  8. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +6 -0
  9. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/early_access_proposal.js +81 -0
  10. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/early_access_proposal.ts +106 -0
  11. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/encounters.js +295 -0
  12. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/encounters.ts +354 -0
  13. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +16 -0
  14. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +19 -1
  15. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +447 -0
  16. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +570 -0
  17. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +504 -0
  18. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +613 -0
  19. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +50 -0
  20. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +48 -0
  21. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/zealy.js +58 -0
  22. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/zealy.ts +82 -0
  23. package/DecentralCardGame.cardchain.cardchain/types.js +5 -1
  24. package/DecentralCardGame.cardchain.cardchain/types.ts +8 -0
  25. package/DecentralCardGame.cardchain.featureflag/module.js +9 -7
  26. package/DecentralCardGame.cardchain.featureflag/module.ts +69 -65
  27. package/client.js +2 -5
  28. package/client.ts +164 -162
  29. package/cosmos.authz.v1beta1/module.js +33 -22
  30. package/cosmos.authz.v1beta1/module.ts +220 -148
  31. package/cosmos.distribution.v1beta1/module.js +65 -35
  32. package/cosmos.distribution.v1beta1/module.ts +354 -200
  33. package/cosmos.evidence.v1beta1/module.js +21 -13
  34. package/cosmos.evidence.v1beta1/module.ts +115 -86
  35. package/cosmos.gov.v1/module.js +48 -29
  36. package/cosmos.gov.v1/module.ts +275 -178
  37. package/cosmos.mint.v1beta1/module.js +9 -7
  38. package/cosmos.mint.v1beta1/module.ts +67 -63
  39. package/cosmos.nft.v1beta1/module.js +9 -7
  40. package/cosmos.nft.v1beta1/module.ts +75 -71
  41. package/cosmos.tx.v1beta1/module.js +9 -7
  42. package/cosmos.tx.v1beta1/module.ts +89 -85
  43. package/cosmos.vesting.v1beta1/module.js +52 -29
  44. package/cosmos.vesting.v1beta1/module.ts +249 -149
  45. package/ibc.applications.interchain_accounts.controller.v1/module.js +9 -7
  46. package/ibc.applications.interchain_accounts.controller.v1/module.ts +65 -61
  47. package/ibc.applications.transfer.v1/module.js +17 -12
  48. package/ibc.applications.transfer.v1/module.ts +114 -88
  49. package/ibc.core.channel.v1/module.js +1 -4
  50. package/ibc.core.channel.v1/module.ts +79 -81
  51. package/ibc.core.client.v1/module.js +1 -4
  52. package/ibc.core.client.v1/module.ts +81 -83
  53. package/ibc.core.connection.v1/module.js +6 -7
  54. package/ibc.core.connection.v1/module.ts +88 -84
  55. package/package.json +1 -1
  56. package/tsconfig.json +1 -1
@@ -1,1778 +1,1703 @@
1
1
  // Generated by Ignite ignite.com/cli
2
2
 
3
- import {StdFee} from "@cosmjs/amino";
4
- import {SigningStargateClient, DeliverTxResponse} from "@cosmjs/stargate";
5
- import {EncodeObject, GeneratedType, OfflineSigner, Registry} from "@cosmjs/proto-signing";
6
- import {msgTypes} from './registry';
7
- import {IgniteClient} from "../client"
8
- import {MissingWalletError} from "../helpers"
9
- import {Api} from "./rest";
10
- import {MsgBuyCardScheme} from "./types/cardchain/cardchain/tx";
11
- import {MsgAddArtwork} from "./types/cardchain/cardchain/tx";
12
- import {MsgSetSetName} from "./types/cardchain/cardchain/tx";
13
- import {MsgConfirmMatch} from "./types/cardchain/cardchain/tx";
14
- import {MsgTransferBoosterPack} from "./types/cardchain/cardchain/tx";
15
- import {MsgMultiVoteCard} from "./types/cardchain/cardchain/tx";
16
- import {MsgFinalizeSet} from "./types/cardchain/cardchain/tx";
17
- import {MsgOpenBoosterPack} from "./types/cardchain/cardchain/tx";
18
- import {MsgTransferCard} from "./types/cardchain/cardchain/tx";
19
- import {MsgRemoveContributorFromSet} from "./types/cardchain/cardchain/tx";
20
- import {MsgChangeAlias} from "./types/cardchain/cardchain/tx";
21
- import {MsgRemoveSellOffer} from "./types/cardchain/cardchain/tx";
22
- import {MsgApointMatchReporter} from "./types/cardchain/cardchain/tx";
23
- import {MsgAddArtworkToSet} from "./types/cardchain/cardchain/tx";
24
- import {MsgAddStoryToSet} from "./types/cardchain/cardchain/tx";
25
- import {MsgRevealCouncilResponse} from "./types/cardchain/cardchain/tx";
26
- import {MsgSetSetArtist} from "./types/cardchain/cardchain/tx";
27
- import {MsgReportMatch} from "./types/cardchain/cardchain/tx";
28
- import {MsgCreateCouncil} from "./types/cardchain/cardchain/tx";
29
- import {MsgSaveCardContent} from "./types/cardchain/cardchain/tx";
30
- import {MsgSetUserBiography} from "./types/cardchain/cardchain/tx";
31
- import {MsgAddCardToSet} from "./types/cardchain/cardchain/tx";
32
- import {MsgCreateSet} from "./types/cardchain/cardchain/tx";
33
- import {MsgDisinviteEarlyAccess} from "./types/cardchain/cardchain/tx";
34
- import {MsgVoteCard} from "./types/cardchain/cardchain/tx";
35
- import {MsgSetUserWebsite} from "./types/cardchain/cardchain/tx";
36
- import {MsgSetSetStoryWriter} from "./types/cardchain/cardchain/tx";
37
- import {MsgRewokeCouncilRegistration} from "./types/cardchain/cardchain/tx";
38
- import {MsgCommitCouncilResponse} from "./types/cardchain/cardchain/tx";
39
- import {MsgBuyBoosterPack} from "./types/cardchain/cardchain/tx";
40
- import {MsgAddContributorToSet} from "./types/cardchain/cardchain/tx";
41
- import {MsgRegisterForCouncil} from "./types/cardchain/cardchain/tx";
42
- import {MsgOpenMatch} from "./types/cardchain/cardchain/tx";
43
- import {MsgSetProfileCard} from "./types/cardchain/cardchain/tx";
44
- import {MsgChangeArtist} from "./types/cardchain/cardchain/tx";
45
- import {MsgDonateToCard} from "./types/cardchain/cardchain/tx";
46
- import {MsgBuyCard} from "./types/cardchain/cardchain/tx";
47
- import {MsgCreateuser} from "./types/cardchain/cardchain/tx";
48
- import {MsgRemoveCardFromSet} from "./types/cardchain/cardchain/tx";
49
- import {MsgCreateSellOffer} from "./types/cardchain/cardchain/tx";
50
- import {MsgRestartCouncil} from "./types/cardchain/cardchain/tx";
51
- import {MsgSetCardRarity} from "./types/cardchain/cardchain/tx";
52
- import {MsgInviteEarlyAccess} from "./types/cardchain/cardchain/tx";
53
-
54
- import {Card as typeCard} from "./types"
55
- import {TimeStamp as typeTimeStamp} from "./types"
56
- import {CopyrightProposal as typeCopyrightProposal} from "./types"
57
- import {WrapClearResponse as typeWrapClearResponse} from "./types"
58
- import {WrapHashResponse as typeWrapHashResponse} from "./types"
59
- import {Image as typeImage} from "./types"
60
- import {MatchPlayer as typeMatchPlayer} from "./types"
61
- import {MatchReporterProposal as typeMatchReporterProposal} from "./types"
62
- import {Num as typeNum} from "./types"
63
- import {Params as typeParams} from "./types"
64
- import {IgnoreMatches as typeIgnoreMatches} from "./types"
65
- import {IgnoreSellOffers as typeIgnoreSellOffers} from "./types"
66
- import {QueryQServerResponse as typeQueryQServerResponse} from "./types"
67
- import {RunningAverage as typeRunningAverage} from "./types"
68
- import {Set as typeSet} from "./types"
69
- import {InnerRarities as typeInnerRarities} from "./types"
70
- import {AddrWithQuantity as typeAddrWithQuantity} from "./types"
71
- import {SetProposal as typeSetProposal} from "./types"
72
- import {EarlyAccess as typeEarlyAccess} from "./types"
73
- import {BoosterPack as typeBoosterPack} from "./types"
74
- import {AirDrops as typeAirDrops} from "./types"
75
- import {VotingResults as typeVotingResults} from "./types"
76
- import {VotingResult as typeVotingResult} from "./types"
77
- import {SingleVote as typeSingleVote} from "./types"
78
-
79
- export {
80
- MsgBuyCardScheme,
81
- MsgAddArtwork,
82
- MsgSetSetName,
83
- MsgConfirmMatch,
84
- MsgTransferBoosterPack,
85
- MsgMultiVoteCard,
86
- MsgFinalizeSet,
87
- MsgOpenBoosterPack,
88
- MsgTransferCard,
89
- MsgRemoveContributorFromSet,
90
- MsgChangeAlias,
91
- MsgRemoveSellOffer,
92
- MsgApointMatchReporter,
93
- MsgAddArtworkToSet,
94
- MsgAddStoryToSet,
95
- MsgRevealCouncilResponse,
96
- MsgSetSetArtist,
97
- MsgReportMatch,
98
- MsgCreateCouncil,
99
- MsgSaveCardContent,
100
- MsgSetUserBiography,
101
- MsgAddCardToSet,
102
- MsgCreateSet,
103
- MsgDisinviteEarlyAccess,
104
- MsgVoteCard,
105
- MsgSetUserWebsite,
106
- MsgSetSetStoryWriter,
107
- MsgRewokeCouncilRegistration,
108
- MsgCommitCouncilResponse,
109
- MsgBuyBoosterPack,
110
- MsgAddContributorToSet,
111
- MsgRegisterForCouncil,
112
- MsgOpenMatch,
113
- MsgSetProfileCard,
114
- MsgChangeArtist,
115
- MsgDonateToCard,
116
- MsgBuyCard,
117
- MsgCreateuser,
118
- MsgRemoveCardFromSet,
119
- MsgCreateSellOffer,
120
- MsgRestartCouncil,
121
- MsgSetCardRarity,
122
- MsgInviteEarlyAccess
123
- };
3
+ import { StdFee } from "@cosmjs/amino";
4
+ import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
5
+ import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
6
+ import { msgTypes } from './registry';
7
+ import { IgniteClient } from "../client"
8
+ import { MissingWalletError } from "../helpers"
9
+ import { Api } from "./rest";
10
+ import { MsgCommitCouncilResponse } from "./types/cardchain/cardchain/tx";
11
+ import { MsgAddArtwork } from "./types/cardchain/cardchain/tx";
12
+ import { MsgRestartCouncil } from "./types/cardchain/cardchain/tx";
13
+ import { MsgDonateToCard } from "./types/cardchain/cardchain/tx";
14
+ import { MsgAddArtworkToSet } from "./types/cardchain/cardchain/tx";
15
+ import { MsgRewokeCouncilRegistration } from "./types/cardchain/cardchain/tx";
16
+ import { MsgAddContributorToSet } from "./types/cardchain/cardchain/tx";
17
+ import { MsgInviteEarlyAccess } from "./types/cardchain/cardchain/tx";
18
+ import { MsgBuyBoosterPack } from "./types/cardchain/cardchain/tx";
19
+ import { MsgConnectZealyAccount } from "./types/cardchain/cardchain/tx";
20
+ import { MsgApointMatchReporter } from "./types/cardchain/cardchain/tx";
21
+ import { MsgSetProfileCard } from "./types/cardchain/cardchain/tx";
22
+ import { MsgAddStoryToSet } from "./types/cardchain/cardchain/tx";
23
+ import { MsgCreateCouncil } from "./types/cardchain/cardchain/tx";
24
+ import { MsgSetCardRarity } from "./types/cardchain/cardchain/tx";
25
+ import { MsgOpenMatch } from "./types/cardchain/cardchain/tx";
26
+ import { MsgTransferBoosterPack } from "./types/cardchain/cardchain/tx";
27
+ import { MsgSetSetName } from "./types/cardchain/cardchain/tx";
28
+ import { MsgFinalizeSet } from "./types/cardchain/cardchain/tx";
29
+ import { MsgSetSetStoryWriter } from "./types/cardchain/cardchain/tx";
30
+ import { MsgChangeArtist } from "./types/cardchain/cardchain/tx";
31
+ import { MsgCreateSellOffer } from "./types/cardchain/cardchain/tx";
32
+ import { MsgRevealCouncilResponse } from "./types/cardchain/cardchain/tx";
33
+ import { MsgRemoveCardFromSet } from "./types/cardchain/cardchain/tx";
34
+ import { MsgCreateSet } from "./types/cardchain/cardchain/tx";
35
+ import { MsgCreateuser } from "./types/cardchain/cardchain/tx";
36
+ import { MsgMultiVoteCard } from "./types/cardchain/cardchain/tx";
37
+ import { MsgSetUserWebsite } from "./types/cardchain/cardchain/tx";
38
+ import { MsgConfirmMatch } from "./types/cardchain/cardchain/tx";
39
+ import { MsgEncounterClose } from "./types/cardchain/cardchain/tx";
40
+ import { MsgRemoveContributorFromSet } from "./types/cardchain/cardchain/tx";
41
+ import { MsgEncounterDo } from "./types/cardchain/cardchain/tx";
42
+ import { MsgAddCardToSet } from "./types/cardchain/cardchain/tx";
43
+ import { MsgEncounterCreate } from "./types/cardchain/cardchain/tx";
44
+ import { MsgSaveCardContent } from "./types/cardchain/cardchain/tx";
45
+ import { MsgBuyCardScheme } from "./types/cardchain/cardchain/tx";
46
+ import { MsgOpenBoosterPack } from "./types/cardchain/cardchain/tx";
47
+ import { MsgReportMatch } from "./types/cardchain/cardchain/tx";
48
+ import { MsgRemoveSellOffer } from "./types/cardchain/cardchain/tx";
49
+ import { MsgChangeAlias } from "./types/cardchain/cardchain/tx";
50
+ import { MsgTransferCard } from "./types/cardchain/cardchain/tx";
51
+ import { MsgSetUserBiography } from "./types/cardchain/cardchain/tx";
52
+ import { MsgVoteCard } from "./types/cardchain/cardchain/tx";
53
+ import { MsgBuyCard } from "./types/cardchain/cardchain/tx";
54
+ import { MsgSetSetArtist } from "./types/cardchain/cardchain/tx";
55
+ import { MsgDisinviteEarlyAccess } from "./types/cardchain/cardchain/tx";
56
+ import { MsgRegisterForCouncil } from "./types/cardchain/cardchain/tx";
57
+
58
+ import { Card as typeCard} from "./types"
59
+ import { TimeStamp as typeTimeStamp} from "./types"
60
+ import { CopyrightProposal as typeCopyrightProposal} from "./types"
61
+ import { WrapClearResponse as typeWrapClearResponse} from "./types"
62
+ import { WrapHashResponse as typeWrapHashResponse} from "./types"
63
+ import { EarlyAccessProposal as typeEarlyAccessProposal} from "./types"
64
+ import { Encounter as typeEncounter} from "./types"
65
+ import { EncounterWithImage as typeEncounterWithImage} from "./types"
66
+ import { Image as typeImage} from "./types"
67
+ import { MatchPlayer as typeMatchPlayer} from "./types"
68
+ import { MatchReporterProposal as typeMatchReporterProposal} from "./types"
69
+ import { Num as typeNum} from "./types"
70
+ import { Params as typeParams} from "./types"
71
+ import { IgnoreMatches as typeIgnoreMatches} from "./types"
72
+ import { IgnoreSellOffers as typeIgnoreSellOffers} from "./types"
73
+ import { QueryQServerResponse as typeQueryQServerResponse} from "./types"
74
+ import { RunningAverage as typeRunningAverage} from "./types"
75
+ import { Set as typeSet} from "./types"
76
+ import { InnerRarities as typeInnerRarities} from "./types"
77
+ import { AddrWithQuantity as typeAddrWithQuantity} from "./types"
78
+ import { SetProposal as typeSetProposal} from "./types"
79
+ import { EarlyAccess as typeEarlyAccess} from "./types"
80
+ import { BoosterPack as typeBoosterPack} from "./types"
81
+ import { AirDrops as typeAirDrops} from "./types"
82
+ import { VotingResults as typeVotingResults} from "./types"
83
+ import { VotingResult as typeVotingResult} from "./types"
84
+ import { SingleVote as typeSingleVote} from "./types"
85
+ import { Zealy as typeZealy} from "./types"
86
+
87
+ export { MsgCommitCouncilResponse, MsgAddArtwork, MsgRestartCouncil, MsgDonateToCard, MsgAddArtworkToSet, MsgRewokeCouncilRegistration, MsgAddContributorToSet, MsgInviteEarlyAccess, MsgBuyBoosterPack, MsgConnectZealyAccount, MsgApointMatchReporter, MsgSetProfileCard, MsgAddStoryToSet, MsgCreateCouncil, MsgSetCardRarity, MsgOpenMatch, MsgTransferBoosterPack, MsgSetSetName, MsgFinalizeSet, MsgSetSetStoryWriter, MsgChangeArtist, MsgCreateSellOffer, MsgRevealCouncilResponse, MsgRemoveCardFromSet, MsgCreateSet, MsgCreateuser, MsgMultiVoteCard, MsgSetUserWebsite, MsgConfirmMatch, MsgEncounterClose, MsgRemoveContributorFromSet, MsgEncounterDo, MsgAddCardToSet, MsgEncounterCreate, MsgSaveCardContent, MsgBuyCardScheme, MsgOpenBoosterPack, MsgReportMatch, MsgRemoveSellOffer, MsgChangeAlias, MsgTransferCard, MsgSetUserBiography, MsgVoteCard, MsgBuyCard, MsgSetSetArtist, MsgDisinviteEarlyAccess, MsgRegisterForCouncil };
124
88
 
125
- type sendMsgBuyCardSchemeParams = {
126
- value: MsgBuyCardScheme,
127
- fee?: StdFee,
128
- memo?: string
89
+ type sendMsgCommitCouncilResponseParams = {
90
+ value: MsgCommitCouncilResponse,
91
+ fee?: StdFee,
92
+ memo?: string
129
93
  };
130
94
 
131
95
  type sendMsgAddArtworkParams = {
132
- value: MsgAddArtwork,
133
- fee?: StdFee,
134
- memo?: string
96
+ value: MsgAddArtwork,
97
+ fee?: StdFee,
98
+ memo?: string
135
99
  };
136
100
 
137
- type sendMsgSetSetNameParams = {
138
- value: MsgSetSetName,
139
- fee?: StdFee,
140
- memo?: string
101
+ type sendMsgRestartCouncilParams = {
102
+ value: MsgRestartCouncil,
103
+ fee?: StdFee,
104
+ memo?: string
141
105
  };
142
106
 
143
- type sendMsgConfirmMatchParams = {
144
- value: MsgConfirmMatch,
145
- fee?: StdFee,
146
- memo?: string
107
+ type sendMsgDonateToCardParams = {
108
+ value: MsgDonateToCard,
109
+ fee?: StdFee,
110
+ memo?: string
147
111
  };
148
112
 
149
- type sendMsgTransferBoosterPackParams = {
150
- value: MsgTransferBoosterPack,
151
- fee?: StdFee,
152
- memo?: string
113
+ type sendMsgAddArtworkToSetParams = {
114
+ value: MsgAddArtworkToSet,
115
+ fee?: StdFee,
116
+ memo?: string
153
117
  };
154
118
 
155
- type sendMsgMultiVoteCardParams = {
156
- value: MsgMultiVoteCard,
157
- fee?: StdFee,
158
- memo?: string
119
+ type sendMsgRewokeCouncilRegistrationParams = {
120
+ value: MsgRewokeCouncilRegistration,
121
+ fee?: StdFee,
122
+ memo?: string
159
123
  };
160
124
 
161
- type sendMsgFinalizeSetParams = {
162
- value: MsgFinalizeSet,
163
- fee?: StdFee,
164
- memo?: string
125
+ type sendMsgAddContributorToSetParams = {
126
+ value: MsgAddContributorToSet,
127
+ fee?: StdFee,
128
+ memo?: string
165
129
  };
166
130
 
167
- type sendMsgOpenBoosterPackParams = {
168
- value: MsgOpenBoosterPack,
169
- fee?: StdFee,
170
- memo?: string
131
+ type sendMsgInviteEarlyAccessParams = {
132
+ value: MsgInviteEarlyAccess,
133
+ fee?: StdFee,
134
+ memo?: string
171
135
  };
172
136
 
173
- type sendMsgTransferCardParams = {
174
- value: MsgTransferCard,
175
- fee?: StdFee,
176
- memo?: string
137
+ type sendMsgBuyBoosterPackParams = {
138
+ value: MsgBuyBoosterPack,
139
+ fee?: StdFee,
140
+ memo?: string
177
141
  };
178
142
 
179
- type sendMsgRemoveContributorFromSetParams = {
180
- value: MsgRemoveContributorFromSet,
181
- fee?: StdFee,
182
- memo?: string
143
+ type sendMsgConnectZealyAccountParams = {
144
+ value: MsgConnectZealyAccount,
145
+ fee?: StdFee,
146
+ memo?: string
183
147
  };
184
148
 
185
- type sendMsgChangeAliasParams = {
186
- value: MsgChangeAlias,
187
- fee?: StdFee,
188
- memo?: string
149
+ type sendMsgApointMatchReporterParams = {
150
+ value: MsgApointMatchReporter,
151
+ fee?: StdFee,
152
+ memo?: string
189
153
  };
190
154
 
191
- type sendMsgRemoveSellOfferParams = {
192
- value: MsgRemoveSellOffer,
193
- fee?: StdFee,
194
- memo?: string
155
+ type sendMsgSetProfileCardParams = {
156
+ value: MsgSetProfileCard,
157
+ fee?: StdFee,
158
+ memo?: string
195
159
  };
196
160
 
197
- type sendMsgApointMatchReporterParams = {
198
- value: MsgApointMatchReporter,
199
- fee?: StdFee,
200
- memo?: string
161
+ type sendMsgAddStoryToSetParams = {
162
+ value: MsgAddStoryToSet,
163
+ fee?: StdFee,
164
+ memo?: string
201
165
  };
202
166
 
203
- type sendMsgAddArtworkToSetParams = {
204
- value: MsgAddArtworkToSet,
205
- fee?: StdFee,
206
- memo?: string
167
+ type sendMsgCreateCouncilParams = {
168
+ value: MsgCreateCouncil,
169
+ fee?: StdFee,
170
+ memo?: string
207
171
  };
208
172
 
209
- type sendMsgAddStoryToSetParams = {
210
- value: MsgAddStoryToSet,
211
- fee?: StdFee,
212
- memo?: string
173
+ type sendMsgSetCardRarityParams = {
174
+ value: MsgSetCardRarity,
175
+ fee?: StdFee,
176
+ memo?: string
213
177
  };
214
178
 
215
- type sendMsgRevealCouncilResponseParams = {
216
- value: MsgRevealCouncilResponse,
217
- fee?: StdFee,
218
- memo?: string
179
+ type sendMsgOpenMatchParams = {
180
+ value: MsgOpenMatch,
181
+ fee?: StdFee,
182
+ memo?: string
219
183
  };
220
184
 
221
- type sendMsgSetSetArtistParams = {
222
- value: MsgSetSetArtist,
223
- fee?: StdFee,
224
- memo?: string
185
+ type sendMsgTransferBoosterPackParams = {
186
+ value: MsgTransferBoosterPack,
187
+ fee?: StdFee,
188
+ memo?: string
225
189
  };
226
190
 
227
- type sendMsgReportMatchParams = {
228
- value: MsgReportMatch,
229
- fee?: StdFee,
230
- memo?: string
191
+ type sendMsgSetSetNameParams = {
192
+ value: MsgSetSetName,
193
+ fee?: StdFee,
194
+ memo?: string
231
195
  };
232
196
 
233
- type sendMsgCreateCouncilParams = {
234
- value: MsgCreateCouncil,
235
- fee?: StdFee,
236
- memo?: string
197
+ type sendMsgFinalizeSetParams = {
198
+ value: MsgFinalizeSet,
199
+ fee?: StdFee,
200
+ memo?: string
237
201
  };
238
202
 
239
- type sendMsgSaveCardContentParams = {
240
- value: MsgSaveCardContent,
241
- fee?: StdFee,
242
- memo?: string
203
+ type sendMsgSetSetStoryWriterParams = {
204
+ value: MsgSetSetStoryWriter,
205
+ fee?: StdFee,
206
+ memo?: string
243
207
  };
244
208
 
245
- type sendMsgSetUserBiographyParams = {
246
- value: MsgSetUserBiography,
247
- fee?: StdFee,
248
- memo?: string
209
+ type sendMsgChangeArtistParams = {
210
+ value: MsgChangeArtist,
211
+ fee?: StdFee,
212
+ memo?: string
249
213
  };
250
214
 
251
- type sendMsgAddCardToSetParams = {
252
- value: MsgAddCardToSet,
253
- fee?: StdFee,
254
- memo?: string
215
+ type sendMsgCreateSellOfferParams = {
216
+ value: MsgCreateSellOffer,
217
+ fee?: StdFee,
218
+ memo?: string
219
+ };
220
+
221
+ type sendMsgRevealCouncilResponseParams = {
222
+ value: MsgRevealCouncilResponse,
223
+ fee?: StdFee,
224
+ memo?: string
225
+ };
226
+
227
+ type sendMsgRemoveCardFromSetParams = {
228
+ value: MsgRemoveCardFromSet,
229
+ fee?: StdFee,
230
+ memo?: string
255
231
  };
256
232
 
257
233
  type sendMsgCreateSetParams = {
258
- value: MsgCreateSet,
259
- fee?: StdFee,
260
- memo?: string
234
+ value: MsgCreateSet,
235
+ fee?: StdFee,
236
+ memo?: string
261
237
  };
262
238
 
263
- type sendMsgDisinviteEarlyAccessParams = {
264
- value: MsgDisinviteEarlyAccess,
265
- fee?: StdFee,
266
- memo?: string
239
+ type sendMsgCreateuserParams = {
240
+ value: MsgCreateuser,
241
+ fee?: StdFee,
242
+ memo?: string
267
243
  };
268
244
 
269
- type sendMsgVoteCardParams = {
270
- value: MsgVoteCard,
271
- fee?: StdFee,
272
- memo?: string
245
+ type sendMsgMultiVoteCardParams = {
246
+ value: MsgMultiVoteCard,
247
+ fee?: StdFee,
248
+ memo?: string
273
249
  };
274
250
 
275
251
  type sendMsgSetUserWebsiteParams = {
276
- value: MsgSetUserWebsite,
277
- fee?: StdFee,
278
- memo?: string
252
+ value: MsgSetUserWebsite,
253
+ fee?: StdFee,
254
+ memo?: string
279
255
  };
280
256
 
281
- type sendMsgSetSetStoryWriterParams = {
282
- value: MsgSetSetStoryWriter,
283
- fee?: StdFee,
284
- memo?: string
257
+ type sendMsgConfirmMatchParams = {
258
+ value: MsgConfirmMatch,
259
+ fee?: StdFee,
260
+ memo?: string
285
261
  };
286
262
 
287
- type sendMsgRewokeCouncilRegistrationParams = {
288
- value: MsgRewokeCouncilRegistration,
289
- fee?: StdFee,
290
- memo?: string
263
+ type sendMsgEncounterCloseParams = {
264
+ value: MsgEncounterClose,
265
+ fee?: StdFee,
266
+ memo?: string
291
267
  };
292
268
 
293
- type sendMsgCommitCouncilResponseParams = {
294
- value: MsgCommitCouncilResponse,
295
- fee?: StdFee,
296
- memo?: string
269
+ type sendMsgRemoveContributorFromSetParams = {
270
+ value: MsgRemoveContributorFromSet,
271
+ fee?: StdFee,
272
+ memo?: string
297
273
  };
298
274
 
299
- type sendMsgBuyBoosterPackParams = {
300
- value: MsgBuyBoosterPack,
301
- fee?: StdFee,
302
- memo?: string
275
+ type sendMsgEncounterDoParams = {
276
+ value: MsgEncounterDo,
277
+ fee?: StdFee,
278
+ memo?: string
303
279
  };
304
280
 
305
- type sendMsgAddContributorToSetParams = {
306
- value: MsgAddContributorToSet,
307
- fee?: StdFee,
308
- memo?: string
281
+ type sendMsgAddCardToSetParams = {
282
+ value: MsgAddCardToSet,
283
+ fee?: StdFee,
284
+ memo?: string
309
285
  };
310
286
 
311
- type sendMsgRegisterForCouncilParams = {
312
- value: MsgRegisterForCouncil,
313
- fee?: StdFee,
314
- memo?: string
287
+ type sendMsgEncounterCreateParams = {
288
+ value: MsgEncounterCreate,
289
+ fee?: StdFee,
290
+ memo?: string
315
291
  };
316
292
 
317
- type sendMsgOpenMatchParams = {
318
- value: MsgOpenMatch,
319
- fee?: StdFee,
320
- memo?: string
293
+ type sendMsgSaveCardContentParams = {
294
+ value: MsgSaveCardContent,
295
+ fee?: StdFee,
296
+ memo?: string
321
297
  };
322
298
 
323
- type sendMsgSetProfileCardParams = {
324
- value: MsgSetProfileCard,
325
- fee?: StdFee,
326
- memo?: string
299
+ type sendMsgBuyCardSchemeParams = {
300
+ value: MsgBuyCardScheme,
301
+ fee?: StdFee,
302
+ memo?: string
327
303
  };
328
304
 
329
- type sendMsgChangeArtistParams = {
330
- value: MsgChangeArtist,
331
- fee?: StdFee,
332
- memo?: string
305
+ type sendMsgOpenBoosterPackParams = {
306
+ value: MsgOpenBoosterPack,
307
+ fee?: StdFee,
308
+ memo?: string
333
309
  };
334
310
 
335
- type sendMsgDonateToCardParams = {
336
- value: MsgDonateToCard,
337
- fee?: StdFee,
338
- memo?: string
311
+ type sendMsgReportMatchParams = {
312
+ value: MsgReportMatch,
313
+ fee?: StdFee,
314
+ memo?: string
339
315
  };
340
316
 
341
- type sendMsgBuyCardParams = {
342
- value: MsgBuyCard,
343
- fee?: StdFee,
344
- memo?: string
317
+ type sendMsgRemoveSellOfferParams = {
318
+ value: MsgRemoveSellOffer,
319
+ fee?: StdFee,
320
+ memo?: string
345
321
  };
346
322
 
347
- type sendMsgCreateuserParams = {
348
- value: MsgCreateuser,
349
- fee?: StdFee,
350
- memo?: string
323
+ type sendMsgChangeAliasParams = {
324
+ value: MsgChangeAlias,
325
+ fee?: StdFee,
326
+ memo?: string
351
327
  };
352
328
 
353
- type sendMsgRemoveCardFromSetParams = {
354
- value: MsgRemoveCardFromSet,
355
- fee?: StdFee,
356
- memo?: string
329
+ type sendMsgTransferCardParams = {
330
+ value: MsgTransferCard,
331
+ fee?: StdFee,
332
+ memo?: string
357
333
  };
358
334
 
359
- type sendMsgCreateSellOfferParams = {
360
- value: MsgCreateSellOffer,
361
- fee?: StdFee,
362
- memo?: string
335
+ type sendMsgSetUserBiographyParams = {
336
+ value: MsgSetUserBiography,
337
+ fee?: StdFee,
338
+ memo?: string
363
339
  };
364
340
 
365
- type sendMsgRestartCouncilParams = {
366
- value: MsgRestartCouncil,
367
- fee?: StdFee,
368
- memo?: string
341
+ type sendMsgVoteCardParams = {
342
+ value: MsgVoteCard,
343
+ fee?: StdFee,
344
+ memo?: string
369
345
  };
370
346
 
371
- type sendMsgSetCardRarityParams = {
372
- value: MsgSetCardRarity,
373
- fee?: StdFee,
374
- memo?: string
347
+ type sendMsgBuyCardParams = {
348
+ value: MsgBuyCard,
349
+ fee?: StdFee,
350
+ memo?: string
375
351
  };
376
352
 
377
- type sendMsgInviteEarlyAccessParams = {
378
- value: MsgInviteEarlyAccess,
379
- fee?: StdFee,
380
- memo?: string
353
+ type sendMsgSetSetArtistParams = {
354
+ value: MsgSetSetArtist,
355
+ fee?: StdFee,
356
+ memo?: string
381
357
  };
382
358
 
383
-
384
- type msgBuyCardSchemeParams = {
385
- value: MsgBuyCardScheme,
359
+ type sendMsgDisinviteEarlyAccessParams = {
360
+ value: MsgDisinviteEarlyAccess,
361
+ fee?: StdFee,
362
+ memo?: string
386
363
  };
387
364
 
388
- type msgAddArtworkParams = {
389
- value: MsgAddArtwork,
365
+ type sendMsgRegisterForCouncilParams = {
366
+ value: MsgRegisterForCouncil,
367
+ fee?: StdFee,
368
+ memo?: string
390
369
  };
391
370
 
392
- type msgSetSetNameParams = {
393
- value: MsgSetSetName,
371
+
372
+ type msgCommitCouncilResponseParams = {
373
+ value: MsgCommitCouncilResponse,
394
374
  };
395
375
 
396
- type msgConfirmMatchParams = {
397
- value: MsgConfirmMatch,
376
+ type msgAddArtworkParams = {
377
+ value: MsgAddArtwork,
398
378
  };
399
379
 
400
- type msgTransferBoosterPackParams = {
401
- value: MsgTransferBoosterPack,
380
+ type msgRestartCouncilParams = {
381
+ value: MsgRestartCouncil,
402
382
  };
403
383
 
404
- type msgMultiVoteCardParams = {
405
- value: MsgMultiVoteCard,
384
+ type msgDonateToCardParams = {
385
+ value: MsgDonateToCard,
406
386
  };
407
387
 
408
- type msgFinalizeSetParams = {
409
- value: MsgFinalizeSet,
388
+ type msgAddArtworkToSetParams = {
389
+ value: MsgAddArtworkToSet,
410
390
  };
411
391
 
412
- type msgOpenBoosterPackParams = {
413
- value: MsgOpenBoosterPack,
392
+ type msgRewokeCouncilRegistrationParams = {
393
+ value: MsgRewokeCouncilRegistration,
414
394
  };
415
395
 
416
- type msgTransferCardParams = {
417
- value: MsgTransferCard,
396
+ type msgAddContributorToSetParams = {
397
+ value: MsgAddContributorToSet,
418
398
  };
419
399
 
420
- type msgRemoveContributorFromSetParams = {
421
- value: MsgRemoveContributorFromSet,
400
+ type msgInviteEarlyAccessParams = {
401
+ value: MsgInviteEarlyAccess,
422
402
  };
423
403
 
424
- type msgChangeAliasParams = {
425
- value: MsgChangeAlias,
404
+ type msgBuyBoosterPackParams = {
405
+ value: MsgBuyBoosterPack,
426
406
  };
427
407
 
428
- type msgRemoveSellOfferParams = {
429
- value: MsgRemoveSellOffer,
408
+ type msgConnectZealyAccountParams = {
409
+ value: MsgConnectZealyAccount,
430
410
  };
431
411
 
432
412
  type msgApointMatchReporterParams = {
433
- value: MsgApointMatchReporter,
413
+ value: MsgApointMatchReporter,
434
414
  };
435
415
 
436
- type msgAddArtworkToSetParams = {
437
- value: MsgAddArtworkToSet,
416
+ type msgSetProfileCardParams = {
417
+ value: MsgSetProfileCard,
438
418
  };
439
419
 
440
420
  type msgAddStoryToSetParams = {
441
- value: MsgAddStoryToSet,
421
+ value: MsgAddStoryToSet,
442
422
  };
443
423
 
444
- type msgRevealCouncilResponseParams = {
445
- value: MsgRevealCouncilResponse,
424
+ type msgCreateCouncilParams = {
425
+ value: MsgCreateCouncil,
446
426
  };
447
427
 
448
- type msgSetSetArtistParams = {
449
- value: MsgSetSetArtist,
428
+ type msgSetCardRarityParams = {
429
+ value: MsgSetCardRarity,
450
430
  };
451
431
 
452
- type msgReportMatchParams = {
453
- value: MsgReportMatch,
432
+ type msgOpenMatchParams = {
433
+ value: MsgOpenMatch,
454
434
  };
455
435
 
456
- type msgCreateCouncilParams = {
457
- value: MsgCreateCouncil,
436
+ type msgTransferBoosterPackParams = {
437
+ value: MsgTransferBoosterPack,
458
438
  };
459
439
 
460
- type msgSaveCardContentParams = {
461
- value: MsgSaveCardContent,
440
+ type msgSetSetNameParams = {
441
+ value: MsgSetSetName,
462
442
  };
463
443
 
464
- type msgSetUserBiographyParams = {
465
- value: MsgSetUserBiography,
444
+ type msgFinalizeSetParams = {
445
+ value: MsgFinalizeSet,
466
446
  };
467
447
 
468
- type msgAddCardToSetParams = {
469
- value: MsgAddCardToSet,
448
+ type msgSetSetStoryWriterParams = {
449
+ value: MsgSetSetStoryWriter,
450
+ };
451
+
452
+ type msgChangeArtistParams = {
453
+ value: MsgChangeArtist,
454
+ };
455
+
456
+ type msgCreateSellOfferParams = {
457
+ value: MsgCreateSellOffer,
458
+ };
459
+
460
+ type msgRevealCouncilResponseParams = {
461
+ value: MsgRevealCouncilResponse,
462
+ };
463
+
464
+ type msgRemoveCardFromSetParams = {
465
+ value: MsgRemoveCardFromSet,
470
466
  };
471
467
 
472
468
  type msgCreateSetParams = {
473
- value: MsgCreateSet,
469
+ value: MsgCreateSet,
474
470
  };
475
471
 
476
- type msgDisinviteEarlyAccessParams = {
477
- value: MsgDisinviteEarlyAccess,
472
+ type msgCreateuserParams = {
473
+ value: MsgCreateuser,
478
474
  };
479
475
 
480
- type msgVoteCardParams = {
481
- value: MsgVoteCard,
476
+ type msgMultiVoteCardParams = {
477
+ value: MsgMultiVoteCard,
482
478
  };
483
479
 
484
480
  type msgSetUserWebsiteParams = {
485
- value: MsgSetUserWebsite,
481
+ value: MsgSetUserWebsite,
486
482
  };
487
483
 
488
- type msgSetSetStoryWriterParams = {
489
- value: MsgSetSetStoryWriter,
484
+ type msgConfirmMatchParams = {
485
+ value: MsgConfirmMatch,
490
486
  };
491
487
 
492
- type msgRewokeCouncilRegistrationParams = {
493
- value: MsgRewokeCouncilRegistration,
488
+ type msgEncounterCloseParams = {
489
+ value: MsgEncounterClose,
494
490
  };
495
491
 
496
- type msgCommitCouncilResponseParams = {
497
- value: MsgCommitCouncilResponse,
492
+ type msgRemoveContributorFromSetParams = {
493
+ value: MsgRemoveContributorFromSet,
498
494
  };
499
495
 
500
- type msgBuyBoosterPackParams = {
501
- value: MsgBuyBoosterPack,
496
+ type msgEncounterDoParams = {
497
+ value: MsgEncounterDo,
502
498
  };
503
499
 
504
- type msgAddContributorToSetParams = {
505
- value: MsgAddContributorToSet,
500
+ type msgAddCardToSetParams = {
501
+ value: MsgAddCardToSet,
506
502
  };
507
503
 
508
- type msgRegisterForCouncilParams = {
509
- value: MsgRegisterForCouncil,
504
+ type msgEncounterCreateParams = {
505
+ value: MsgEncounterCreate,
510
506
  };
511
507
 
512
- type msgOpenMatchParams = {
513
- value: MsgOpenMatch,
508
+ type msgSaveCardContentParams = {
509
+ value: MsgSaveCardContent,
514
510
  };
515
511
 
516
- type msgSetProfileCardParams = {
517
- value: MsgSetProfileCard,
512
+ type msgBuyCardSchemeParams = {
513
+ value: MsgBuyCardScheme,
518
514
  };
519
515
 
520
- type msgChangeArtistParams = {
521
- value: MsgChangeArtist,
516
+ type msgOpenBoosterPackParams = {
517
+ value: MsgOpenBoosterPack,
522
518
  };
523
519
 
524
- type msgDonateToCardParams = {
525
- value: MsgDonateToCard,
520
+ type msgReportMatchParams = {
521
+ value: MsgReportMatch,
526
522
  };
527
523
 
528
- type msgBuyCardParams = {
529
- value: MsgBuyCard,
524
+ type msgRemoveSellOfferParams = {
525
+ value: MsgRemoveSellOffer,
530
526
  };
531
527
 
532
- type msgCreateuserParams = {
533
- value: MsgCreateuser,
528
+ type msgChangeAliasParams = {
529
+ value: MsgChangeAlias,
534
530
  };
535
531
 
536
- type msgRemoveCardFromSetParams = {
537
- value: MsgRemoveCardFromSet,
532
+ type msgTransferCardParams = {
533
+ value: MsgTransferCard,
538
534
  };
539
535
 
540
- type msgCreateSellOfferParams = {
541
- value: MsgCreateSellOffer,
536
+ type msgSetUserBiographyParams = {
537
+ value: MsgSetUserBiography,
542
538
  };
543
539
 
544
- type msgRestartCouncilParams = {
545
- value: MsgRestartCouncil,
540
+ type msgVoteCardParams = {
541
+ value: MsgVoteCard,
546
542
  };
547
543
 
548
- type msgSetCardRarityParams = {
549
- value: MsgSetCardRarity,
544
+ type msgBuyCardParams = {
545
+ value: MsgBuyCard,
550
546
  };
551
547
 
552
- type msgInviteEarlyAccessParams = {
553
- value: MsgInviteEarlyAccess,
548
+ type msgSetSetArtistParams = {
549
+ value: MsgSetSetArtist,
550
+ };
551
+
552
+ type msgDisinviteEarlyAccessParams = {
553
+ value: MsgDisinviteEarlyAccess,
554
+ };
555
+
556
+ type msgRegisterForCouncilParams = {
557
+ value: MsgRegisterForCouncil,
554
558
  };
555
559
 
556
560
 
557
561
  export const registry = new Registry(msgTypes);
558
562
 
559
563
  type Field = {
560
- name: string;
561
- type: unknown;
564
+ name: string;
565
+ type: unknown;
562
566
  }
563
-
564
567
  function getStructure(template) {
565
- const structure: { fields: Field[] } = {fields: []}
566
- for (let [key, value] of Object.entries(template)) {
567
- let field = {name: key, type: typeof value}
568
- structure.fields.push(field)
569
- }
570
- return structure
568
+ const structure: {fields: Field[]} = { fields: [] }
569
+ for (let [key, value] of Object.entries(template)) {
570
+ let field = { name: key, type: typeof value }
571
+ structure.fields.push(field)
572
+ }
573
+ return structure
571
574
  }
572
-
573
575
  const defaultFee = {
574
- amount: [],
575
- gas: "200000",
576
+ amount: [],
577
+ gas: "200000",
576
578
  };
577
579
 
578
580
  interface TxClientOptions {
579
- addr: string
580
- prefix: string
581
- signer?: OfflineSigner
581
+ addr: string
582
+ prefix: string
583
+ signer?: OfflineSigner
582
584
  }
583
585
 
584
- export const txClient = ({signer, prefix, addr}: TxClientOptions = {
585
- addr: "http://localhost:26657",
586
- prefix: "cosmos"
587
- }) => {
588
-
589
- return {
590
-
591
- async sendMsgBuyCardScheme({value, fee, memo}: sendMsgBuyCardSchemeParams): Promise<DeliverTxResponse> {
592
- if (!signer) {
593
- throw new Error('TxClient:sendMsgBuyCardScheme: Unable to sign Tx. Signer is not present.')
594
- }
595
- try {
596
- const {address} = (await signer.getAccounts())[0];
597
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
598
- let msg = this.msgBuyCardScheme({value: MsgBuyCardScheme.fromPartial(value)})
599
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
600
- } catch (e: any) {
601
- throw new Error('TxClient:sendMsgBuyCardScheme: Could not broadcast Tx: ' + e.message)
602
- }
603
- },
604
-
605
- async sendMsgAddArtwork({value, fee, memo}: sendMsgAddArtworkParams): Promise<DeliverTxResponse> {
606
- if (!signer) {
607
- throw new Error('TxClient:sendMsgAddArtwork: Unable to sign Tx. Signer is not present.')
608
- }
609
- try {
610
- const {address} = (await signer.getAccounts())[0];
611
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
612
- let msg = this.msgAddArtwork({value: MsgAddArtwork.fromPartial(value)})
613
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
614
- } catch (e: any) {
615
- throw new Error('TxClient:sendMsgAddArtwork: Could not broadcast Tx: ' + e.message)
616
- }
617
- },
618
-
619
- async sendMsgSetSetName({value, fee, memo}: sendMsgSetSetNameParams): Promise<DeliverTxResponse> {
620
- if (!signer) {
621
- throw new Error('TxClient:sendMsgSetSetName: Unable to sign Tx. Signer is not present.')
622
- }
623
- try {
624
- const {address} = (await signer.getAccounts())[0];
625
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
626
- let msg = this.msgSetSetName({value: MsgSetSetName.fromPartial(value)})
627
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
628
- } catch (e: any) {
629
- throw new Error('TxClient:sendMsgSetSetName: Could not broadcast Tx: ' + e.message)
630
- }
631
- },
632
-
633
- async sendMsgConfirmMatch({value, fee, memo}: sendMsgConfirmMatchParams): Promise<DeliverTxResponse> {
634
- if (!signer) {
635
- throw new Error('TxClient:sendMsgConfirmMatch: Unable to sign Tx. Signer is not present.')
636
- }
637
- try {
638
- const {address} = (await signer.getAccounts())[0];
639
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
640
- let msg = this.msgConfirmMatch({value: MsgConfirmMatch.fromPartial(value)})
641
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
642
- } catch (e: any) {
643
- throw new Error('TxClient:sendMsgConfirmMatch: Could not broadcast Tx: ' + e.message)
644
- }
645
- },
646
-
647
- async sendMsgTransferBoosterPack({
648
- value,
649
- fee,
650
- memo
651
- }: sendMsgTransferBoosterPackParams): Promise<DeliverTxResponse> {
652
- if (!signer) {
653
- throw new Error('TxClient:sendMsgTransferBoosterPack: Unable to sign Tx. Signer is not present.')
654
- }
655
- try {
656
- const {address} = (await signer.getAccounts())[0];
657
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
658
- let msg = this.msgTransferBoosterPack({value: MsgTransferBoosterPack.fromPartial(value)})
659
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
660
- } catch (e: any) {
661
- throw new Error('TxClient:sendMsgTransferBoosterPack: Could not broadcast Tx: ' + e.message)
662
- }
663
- },
664
-
665
- async sendMsgMultiVoteCard({value, fee, memo}: sendMsgMultiVoteCardParams): Promise<DeliverTxResponse> {
666
- if (!signer) {
667
- throw new Error('TxClient:sendMsgMultiVoteCard: Unable to sign Tx. Signer is not present.')
668
- }
669
- try {
670
- const {address} = (await signer.getAccounts())[0];
671
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
672
- let msg = this.msgMultiVoteCard({value: MsgMultiVoteCard.fromPartial(value)})
673
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
674
- } catch (e: any) {
675
- throw new Error('TxClient:sendMsgMultiVoteCard: Could not broadcast Tx: ' + e.message)
676
- }
677
- },
678
-
679
- async sendMsgFinalizeSet({value, fee, memo}: sendMsgFinalizeSetParams): Promise<DeliverTxResponse> {
680
- if (!signer) {
681
- throw new Error('TxClient:sendMsgFinalizeSet: Unable to sign Tx. Signer is not present.')
682
- }
683
- try {
684
- const {address} = (await signer.getAccounts())[0];
685
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
686
- let msg = this.msgFinalizeSet({value: MsgFinalizeSet.fromPartial(value)})
687
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
688
- } catch (e: any) {
689
- throw new Error('TxClient:sendMsgFinalizeSet: Could not broadcast Tx: ' + e.message)
690
- }
691
- },
692
-
693
- async sendMsgOpenBoosterPack({value, fee, memo}: sendMsgOpenBoosterPackParams): Promise<DeliverTxResponse> {
694
- if (!signer) {
695
- throw new Error('TxClient:sendMsgOpenBoosterPack: Unable to sign Tx. Signer is not present.')
696
- }
697
- try {
698
- const {address} = (await signer.getAccounts())[0];
699
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
700
- let msg = this.msgOpenBoosterPack({value: MsgOpenBoosterPack.fromPartial(value)})
701
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
702
- } catch (e: any) {
703
- throw new Error('TxClient:sendMsgOpenBoosterPack: Could not broadcast Tx: ' + e.message)
704
- }
705
- },
706
-
707
- async sendMsgTransferCard({value, fee, memo}: sendMsgTransferCardParams): Promise<DeliverTxResponse> {
708
- if (!signer) {
709
- throw new Error('TxClient:sendMsgTransferCard: Unable to sign Tx. Signer is not present.')
710
- }
711
- try {
712
- const {address} = (await signer.getAccounts())[0];
713
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
714
- let msg = this.msgTransferCard({value: MsgTransferCard.fromPartial(value)})
715
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
716
- } catch (e: any) {
717
- throw new Error('TxClient:sendMsgTransferCard: Could not broadcast Tx: ' + e.message)
718
- }
719
- },
720
-
721
- async sendMsgRemoveContributorFromSet({
722
- value,
723
- fee,
724
- memo
725
- }: sendMsgRemoveContributorFromSetParams): Promise<DeliverTxResponse> {
726
- if (!signer) {
727
- throw new Error('TxClient:sendMsgRemoveContributorFromSet: Unable to sign Tx. Signer is not present.')
728
- }
729
- try {
730
- const {address} = (await signer.getAccounts())[0];
731
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
732
- let msg = this.msgRemoveContributorFromSet({value: MsgRemoveContributorFromSet.fromPartial(value)})
733
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
734
- } catch (e: any) {
735
- throw new Error('TxClient:sendMsgRemoveContributorFromSet: Could not broadcast Tx: ' + e.message)
736
- }
737
- },
738
-
739
- async sendMsgChangeAlias({value, fee, memo}: sendMsgChangeAliasParams): Promise<DeliverTxResponse> {
740
- if (!signer) {
741
- throw new Error('TxClient:sendMsgChangeAlias: Unable to sign Tx. Signer is not present.')
742
- }
743
- try {
744
- const {address} = (await signer.getAccounts())[0];
745
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
746
- let msg = this.msgChangeAlias({value: MsgChangeAlias.fromPartial(value)})
747
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
748
- } catch (e: any) {
749
- throw new Error('TxClient:sendMsgChangeAlias: Could not broadcast Tx: ' + e.message)
750
- }
751
- },
752
-
753
- async sendMsgRemoveSellOffer({value, fee, memo}: sendMsgRemoveSellOfferParams): Promise<DeliverTxResponse> {
754
- if (!signer) {
755
- throw new Error('TxClient:sendMsgRemoveSellOffer: Unable to sign Tx. Signer is not present.')
756
- }
757
- try {
758
- const {address} = (await signer.getAccounts())[0];
759
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
760
- let msg = this.msgRemoveSellOffer({value: MsgRemoveSellOffer.fromPartial(value)})
761
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
762
- } catch (e: any) {
763
- throw new Error('TxClient:sendMsgRemoveSellOffer: Could not broadcast Tx: ' + e.message)
764
- }
765
- },
766
-
767
- async sendMsgApointMatchReporter({
768
- value,
769
- fee,
770
- memo
771
- }: sendMsgApointMatchReporterParams): Promise<DeliverTxResponse> {
772
- if (!signer) {
773
- throw new Error('TxClient:sendMsgApointMatchReporter: Unable to sign Tx. Signer is not present.')
774
- }
775
- try {
776
- const {address} = (await signer.getAccounts())[0];
777
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
778
- let msg = this.msgApointMatchReporter({value: MsgApointMatchReporter.fromPartial(value)})
779
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
780
- } catch (e: any) {
781
- throw new Error('TxClient:sendMsgApointMatchReporter: Could not broadcast Tx: ' + e.message)
782
- }
783
- },
784
-
785
- async sendMsgAddArtworkToSet({value, fee, memo}: sendMsgAddArtworkToSetParams): Promise<DeliverTxResponse> {
786
- if (!signer) {
787
- throw new Error('TxClient:sendMsgAddArtworkToSet: Unable to sign Tx. Signer is not present.')
788
- }
789
- try {
790
- const {address} = (await signer.getAccounts())[0];
791
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
792
- let msg = this.msgAddArtworkToSet({value: MsgAddArtworkToSet.fromPartial(value)})
793
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
794
- } catch (e: any) {
795
- throw new Error('TxClient:sendMsgAddArtworkToSet: Could not broadcast Tx: ' + e.message)
796
- }
797
- },
798
-
799
- async sendMsgAddStoryToSet({value, fee, memo}: sendMsgAddStoryToSetParams): Promise<DeliverTxResponse> {
800
- if (!signer) {
801
- throw new Error('TxClient:sendMsgAddStoryToSet: Unable to sign Tx. Signer is not present.')
802
- }
803
- try {
804
- const {address} = (await signer.getAccounts())[0];
805
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
806
- let msg = this.msgAddStoryToSet({value: MsgAddStoryToSet.fromPartial(value)})
807
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
808
- } catch (e: any) {
809
- throw new Error('TxClient:sendMsgAddStoryToSet: Could not broadcast Tx: ' + e.message)
810
- }
811
- },
812
-
813
- async sendMsgRevealCouncilResponse({
814
- value,
815
- fee,
816
- memo
817
- }: sendMsgRevealCouncilResponseParams): Promise<DeliverTxResponse> {
818
- if (!signer) {
819
- throw new Error('TxClient:sendMsgRevealCouncilResponse: Unable to sign Tx. Signer is not present.')
820
- }
821
- try {
822
- const {address} = (await signer.getAccounts())[0];
823
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
824
- let msg = this.msgRevealCouncilResponse({value: MsgRevealCouncilResponse.fromPartial(value)})
825
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
826
- } catch (e: any) {
827
- throw new Error('TxClient:sendMsgRevealCouncilResponse: Could not broadcast Tx: ' + e.message)
828
- }
829
- },
830
-
831
- async sendMsgSetSetArtist({value, fee, memo}: sendMsgSetSetArtistParams): Promise<DeliverTxResponse> {
832
- if (!signer) {
833
- throw new Error('TxClient:sendMsgSetSetArtist: Unable to sign Tx. Signer is not present.')
834
- }
835
- try {
836
- const {address} = (await signer.getAccounts())[0];
837
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
838
- let msg = this.msgSetSetArtist({value: MsgSetSetArtist.fromPartial(value)})
839
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
840
- } catch (e: any) {
841
- throw new Error('TxClient:sendMsgSetSetArtist: Could not broadcast Tx: ' + e.message)
842
- }
843
- },
844
-
845
- async sendMsgReportMatch({value, fee, memo}: sendMsgReportMatchParams): Promise<DeliverTxResponse> {
846
- if (!signer) {
847
- throw new Error('TxClient:sendMsgReportMatch: Unable to sign Tx. Signer is not present.')
848
- }
849
- try {
850
- const {address} = (await signer.getAccounts())[0];
851
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
852
- let msg = this.msgReportMatch({value: MsgReportMatch.fromPartial(value)})
853
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
854
- } catch (e: any) {
855
- throw new Error('TxClient:sendMsgReportMatch: Could not broadcast Tx: ' + e.message)
856
- }
857
- },
858
-
859
- async sendMsgCreateCouncil({value, fee, memo}: sendMsgCreateCouncilParams): Promise<DeliverTxResponse> {
860
- if (!signer) {
861
- throw new Error('TxClient:sendMsgCreateCouncil: Unable to sign Tx. Signer is not present.')
862
- }
863
- try {
864
- const {address} = (await signer.getAccounts())[0];
865
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
866
- let msg = this.msgCreateCouncil({value: MsgCreateCouncil.fromPartial(value)})
867
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
868
- } catch (e: any) {
869
- throw new Error('TxClient:sendMsgCreateCouncil: Could not broadcast Tx: ' + e.message)
870
- }
871
- },
872
-
873
- async sendMsgSaveCardContent({value, fee, memo}: sendMsgSaveCardContentParams): Promise<DeliverTxResponse> {
874
- if (!signer) {
875
- throw new Error('TxClient:sendMsgSaveCardContent: Unable to sign Tx. Signer is not present.')
876
- }
877
- try {
878
- const {address} = (await signer.getAccounts())[0];
879
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
880
- let msg = this.msgSaveCardContent({value: MsgSaveCardContent.fromPartial(value)})
881
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
882
- } catch (e: any) {
883
- throw new Error('TxClient:sendMsgSaveCardContent: Could not broadcast Tx: ' + e.message)
884
- }
885
- },
886
-
887
- async sendMsgSetUserBiography({value, fee, memo}: sendMsgSetUserBiographyParams): Promise<DeliverTxResponse> {
888
- if (!signer) {
889
- throw new Error('TxClient:sendMsgSetUserBiography: Unable to sign Tx. Signer is not present.')
890
- }
891
- try {
892
- const {address} = (await signer.getAccounts())[0];
893
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
894
- let msg = this.msgSetUserBiography({value: MsgSetUserBiography.fromPartial(value)})
895
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
896
- } catch (e: any) {
897
- throw new Error('TxClient:sendMsgSetUserBiography: Could not broadcast Tx: ' + e.message)
898
- }
899
- },
900
-
901
- async sendMsgAddCardToSet({value, fee, memo}: sendMsgAddCardToSetParams): Promise<DeliverTxResponse> {
902
- if (!signer) {
903
- throw new Error('TxClient:sendMsgAddCardToSet: Unable to sign Tx. Signer is not present.')
904
- }
905
- try {
906
- const {address} = (await signer.getAccounts())[0];
907
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
908
- let msg = this.msgAddCardToSet({value: MsgAddCardToSet.fromPartial(value)})
909
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
910
- } catch (e: any) {
911
- throw new Error('TxClient:sendMsgAddCardToSet: Could not broadcast Tx: ' + e.message)
912
- }
913
- },
914
-
915
- async sendMsgCreateSet({value, fee, memo}: sendMsgCreateSetParams): Promise<DeliverTxResponse> {
916
- if (!signer) {
917
- throw new Error('TxClient:sendMsgCreateSet: Unable to sign Tx. Signer is not present.')
918
- }
919
- try {
920
- const {address} = (await signer.getAccounts())[0];
921
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
922
- let msg = this.msgCreateSet({value: MsgCreateSet.fromPartial(value)})
923
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
924
- } catch (e: any) {
925
- throw new Error('TxClient:sendMsgCreateSet: Could not broadcast Tx: ' + e.message)
926
- }
927
- },
928
-
929
- async sendMsgDisinviteEarlyAccess({
930
- value,
931
- fee,
932
- memo
933
- }: sendMsgDisinviteEarlyAccessParams): Promise<DeliverTxResponse> {
934
- if (!signer) {
935
- throw new Error('TxClient:sendMsgDisinviteEarlyAccess: Unable to sign Tx. Signer is not present.')
936
- }
937
- try {
938
- const {address} = (await signer.getAccounts())[0];
939
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
940
- let msg = this.msgDisinviteEarlyAccess({value: MsgDisinviteEarlyAccess.fromPartial(value)})
941
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
942
- } catch (e: any) {
943
- throw new Error('TxClient:sendMsgDisinviteEarlyAccess: Could not broadcast Tx: ' + e.message)
944
- }
945
- },
946
-
947
- async sendMsgVoteCard({value, fee, memo}: sendMsgVoteCardParams): Promise<DeliverTxResponse> {
948
- if (!signer) {
949
- throw new Error('TxClient:sendMsgVoteCard: Unable to sign Tx. Signer is not present.')
950
- }
951
- try {
952
- const {address} = (await signer.getAccounts())[0];
953
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
954
- let msg = this.msgVoteCard({value: MsgVoteCard.fromPartial(value)})
955
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
956
- } catch (e: any) {
957
- throw new Error('TxClient:sendMsgVoteCard: Could not broadcast Tx: ' + e.message)
958
- }
959
- },
960
-
961
- async sendMsgSetUserWebsite({value, fee, memo}: sendMsgSetUserWebsiteParams): Promise<DeliverTxResponse> {
962
- if (!signer) {
963
- throw new Error('TxClient:sendMsgSetUserWebsite: Unable to sign Tx. Signer is not present.')
964
- }
965
- try {
966
- const {address} = (await signer.getAccounts())[0];
967
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
968
- let msg = this.msgSetUserWebsite({value: MsgSetUserWebsite.fromPartial(value)})
969
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
970
- } catch (e: any) {
971
- throw new Error('TxClient:sendMsgSetUserWebsite: Could not broadcast Tx: ' + e.message)
972
- }
973
- },
974
-
975
- async sendMsgSetSetStoryWriter({value, fee, memo}: sendMsgSetSetStoryWriterParams): Promise<DeliverTxResponse> {
976
- if (!signer) {
977
- throw new Error('TxClient:sendMsgSetSetStoryWriter: Unable to sign Tx. Signer is not present.')
978
- }
979
- try {
980
- const {address} = (await signer.getAccounts())[0];
981
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
982
- let msg = this.msgSetSetStoryWriter({value: MsgSetSetStoryWriter.fromPartial(value)})
983
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
984
- } catch (e: any) {
985
- throw new Error('TxClient:sendMsgSetSetStoryWriter: Could not broadcast Tx: ' + e.message)
986
- }
987
- },
988
-
989
- async sendMsgRewokeCouncilRegistration({
990
- value,
991
- fee,
992
- memo
993
- }: sendMsgRewokeCouncilRegistrationParams): Promise<DeliverTxResponse> {
994
- if (!signer) {
995
- throw new Error('TxClient:sendMsgRewokeCouncilRegistration: Unable to sign Tx. Signer is not present.')
996
- }
997
- try {
998
- const {address} = (await signer.getAccounts())[0];
999
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1000
- let msg = this.msgRewokeCouncilRegistration({value: MsgRewokeCouncilRegistration.fromPartial(value)})
1001
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1002
- } catch (e: any) {
1003
- throw new Error('TxClient:sendMsgRewokeCouncilRegistration: Could not broadcast Tx: ' + e.message)
1004
- }
1005
- },
1006
-
1007
- async sendMsgCommitCouncilResponse({
1008
- value,
1009
- fee,
1010
- memo
1011
- }: sendMsgCommitCouncilResponseParams): Promise<DeliverTxResponse> {
1012
- if (!signer) {
1013
- throw new Error('TxClient:sendMsgCommitCouncilResponse: Unable to sign Tx. Signer is not present.')
1014
- }
1015
- try {
1016
- const {address} = (await signer.getAccounts())[0];
1017
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1018
- let msg = this.msgCommitCouncilResponse({value: MsgCommitCouncilResponse.fromPartial(value)})
1019
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1020
- } catch (e: any) {
1021
- throw new Error('TxClient:sendMsgCommitCouncilResponse: Could not broadcast Tx: ' + e.message)
1022
- }
1023
- },
1024
-
1025
- async sendMsgBuyBoosterPack({value, fee, memo}: sendMsgBuyBoosterPackParams): Promise<DeliverTxResponse> {
1026
- if (!signer) {
1027
- throw new Error('TxClient:sendMsgBuyBoosterPack: Unable to sign Tx. Signer is not present.')
1028
- }
1029
- try {
1030
- const {address} = (await signer.getAccounts())[0];
1031
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1032
- let msg = this.msgBuyBoosterPack({value: MsgBuyBoosterPack.fromPartial(value)})
1033
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1034
- } catch (e: any) {
1035
- throw new Error('TxClient:sendMsgBuyBoosterPack: Could not broadcast Tx: ' + e.message)
1036
- }
1037
- },
1038
-
1039
- async sendMsgAddContributorToSet({
1040
- value,
1041
- fee,
1042
- memo
1043
- }: sendMsgAddContributorToSetParams): Promise<DeliverTxResponse> {
1044
- if (!signer) {
1045
- throw new Error('TxClient:sendMsgAddContributorToSet: Unable to sign Tx. Signer is not present.')
1046
- }
1047
- try {
1048
- const {address} = (await signer.getAccounts())[0];
1049
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1050
- let msg = this.msgAddContributorToSet({value: MsgAddContributorToSet.fromPartial(value)})
1051
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1052
- } catch (e: any) {
1053
- throw new Error('TxClient:sendMsgAddContributorToSet: Could not broadcast Tx: ' + e.message)
1054
- }
1055
- },
1056
-
1057
- async sendMsgRegisterForCouncil({
1058
- value,
1059
- fee,
1060
- memo
1061
- }: sendMsgRegisterForCouncilParams): Promise<DeliverTxResponse> {
1062
- if (!signer) {
1063
- throw new Error('TxClient:sendMsgRegisterForCouncil: Unable to sign Tx. Signer is not present.')
1064
- }
1065
- try {
1066
- const {address} = (await signer.getAccounts())[0];
1067
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1068
- let msg = this.msgRegisterForCouncil({value: MsgRegisterForCouncil.fromPartial(value)})
1069
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1070
- } catch (e: any) {
1071
- throw new Error('TxClient:sendMsgRegisterForCouncil: Could not broadcast Tx: ' + e.message)
1072
- }
1073
- },
1074
-
1075
- async sendMsgOpenMatch({value, fee, memo}: sendMsgOpenMatchParams): Promise<DeliverTxResponse> {
1076
- if (!signer) {
1077
- throw new Error('TxClient:sendMsgOpenMatch: Unable to sign Tx. Signer is not present.')
1078
- }
1079
- try {
1080
- const {address} = (await signer.getAccounts())[0];
1081
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1082
- let msg = this.msgOpenMatch({value: MsgOpenMatch.fromPartial(value)})
1083
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1084
- } catch (e: any) {
1085
- throw new Error('TxClient:sendMsgOpenMatch: Could not broadcast Tx: ' + e.message)
1086
- }
1087
- },
1088
-
1089
- async sendMsgSetProfileCard({value, fee, memo}: sendMsgSetProfileCardParams): Promise<DeliverTxResponse> {
1090
- if (!signer) {
1091
- throw new Error('TxClient:sendMsgSetProfileCard: Unable to sign Tx. Signer is not present.')
1092
- }
1093
- try {
1094
- const {address} = (await signer.getAccounts())[0];
1095
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1096
- let msg = this.msgSetProfileCard({value: MsgSetProfileCard.fromPartial(value)})
1097
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1098
- } catch (e: any) {
1099
- throw new Error('TxClient:sendMsgSetProfileCard: Could not broadcast Tx: ' + e.message)
1100
- }
1101
- },
1102
-
1103
- async sendMsgChangeArtist({value, fee, memo}: sendMsgChangeArtistParams): Promise<DeliverTxResponse> {
1104
- if (!signer) {
1105
- throw new Error('TxClient:sendMsgChangeArtist: Unable to sign Tx. Signer is not present.')
1106
- }
1107
- try {
1108
- const {address} = (await signer.getAccounts())[0];
1109
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1110
- let msg = this.msgChangeArtist({value: MsgChangeArtist.fromPartial(value)})
1111
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1112
- } catch (e: any) {
1113
- throw new Error('TxClient:sendMsgChangeArtist: Could not broadcast Tx: ' + e.message)
1114
- }
1115
- },
1116
-
1117
- async sendMsgDonateToCard({value, fee, memo}: sendMsgDonateToCardParams): Promise<DeliverTxResponse> {
1118
- if (!signer) {
1119
- throw new Error('TxClient:sendMsgDonateToCard: Unable to sign Tx. Signer is not present.')
1120
- }
1121
- try {
1122
- const {address} = (await signer.getAccounts())[0];
1123
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1124
- let msg = this.msgDonateToCard({value: MsgDonateToCard.fromPartial(value)})
1125
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1126
- } catch (e: any) {
1127
- throw new Error('TxClient:sendMsgDonateToCard: Could not broadcast Tx: ' + e.message)
1128
- }
1129
- },
1130
-
1131
- async sendMsgBuyCard({value, fee, memo}: sendMsgBuyCardParams): Promise<DeliverTxResponse> {
1132
- if (!signer) {
1133
- throw new Error('TxClient:sendMsgBuyCard: Unable to sign Tx. Signer is not present.')
1134
- }
1135
- try {
1136
- const {address} = (await signer.getAccounts())[0];
1137
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1138
- let msg = this.msgBuyCard({value: MsgBuyCard.fromPartial(value)})
1139
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1140
- } catch (e: any) {
1141
- throw new Error('TxClient:sendMsgBuyCard: Could not broadcast Tx: ' + e.message)
1142
- }
1143
- },
1144
-
1145
- async sendMsgCreateuser({value, fee, memo}: sendMsgCreateuserParams): Promise<DeliverTxResponse> {
1146
- if (!signer) {
1147
- throw new Error('TxClient:sendMsgCreateuser: Unable to sign Tx. Signer is not present.')
1148
- }
1149
- try {
1150
- const {address} = (await signer.getAccounts())[0];
1151
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1152
- let msg = this.msgCreateuser({value: MsgCreateuser.fromPartial(value)})
1153
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1154
- } catch (e: any) {
1155
- throw new Error('TxClient:sendMsgCreateuser: Could not broadcast Tx: ' + e.message)
1156
- }
1157
- },
1158
-
1159
- async sendMsgRemoveCardFromSet({value, fee, memo}: sendMsgRemoveCardFromSetParams): Promise<DeliverTxResponse> {
1160
- if (!signer) {
1161
- throw new Error('TxClient:sendMsgRemoveCardFromSet: Unable to sign Tx. Signer is not present.')
1162
- }
1163
- try {
1164
- const {address} = (await signer.getAccounts())[0];
1165
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1166
- let msg = this.msgRemoveCardFromSet({value: MsgRemoveCardFromSet.fromPartial(value)})
1167
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1168
- } catch (e: any) {
1169
- throw new Error('TxClient:sendMsgRemoveCardFromSet: Could not broadcast Tx: ' + e.message)
1170
- }
1171
- },
1172
-
1173
- async sendMsgCreateSellOffer({value, fee, memo}: sendMsgCreateSellOfferParams): Promise<DeliverTxResponse> {
1174
- if (!signer) {
1175
- throw new Error('TxClient:sendMsgCreateSellOffer: Unable to sign Tx. Signer is not present.')
1176
- }
1177
- try {
1178
- const {address} = (await signer.getAccounts())[0];
1179
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1180
- let msg = this.msgCreateSellOffer({value: MsgCreateSellOffer.fromPartial(value)})
1181
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1182
- } catch (e: any) {
1183
- throw new Error('TxClient:sendMsgCreateSellOffer: Could not broadcast Tx: ' + e.message)
1184
- }
1185
- },
1186
-
1187
- async sendMsgRestartCouncil({value, fee, memo}: sendMsgRestartCouncilParams): Promise<DeliverTxResponse> {
1188
- if (!signer) {
1189
- throw new Error('TxClient:sendMsgRestartCouncil: Unable to sign Tx. Signer is not present.')
1190
- }
1191
- try {
1192
- const {address} = (await signer.getAccounts())[0];
1193
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1194
- let msg = this.msgRestartCouncil({value: MsgRestartCouncil.fromPartial(value)})
1195
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1196
- } catch (e: any) {
1197
- throw new Error('TxClient:sendMsgRestartCouncil: Could not broadcast Tx: ' + e.message)
1198
- }
1199
- },
1200
-
1201
- async sendMsgSetCardRarity({value, fee, memo}: sendMsgSetCardRarityParams): Promise<DeliverTxResponse> {
1202
- if (!signer) {
1203
- throw new Error('TxClient:sendMsgSetCardRarity: Unable to sign Tx. Signer is not present.')
1204
- }
1205
- try {
1206
- const {address} = (await signer.getAccounts())[0];
1207
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1208
- let msg = this.msgSetCardRarity({value: MsgSetCardRarity.fromPartial(value)})
1209
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1210
- } catch (e: any) {
1211
- throw new Error('TxClient:sendMsgSetCardRarity: Could not broadcast Tx: ' + e.message)
1212
- }
1213
- },
1214
-
1215
- async sendMsgInviteEarlyAccess({value, fee, memo}: sendMsgInviteEarlyAccessParams): Promise<DeliverTxResponse> {
1216
- if (!signer) {
1217
- throw new Error('TxClient:sendMsgInviteEarlyAccess: Unable to sign Tx. Signer is not present.')
1218
- }
1219
- try {
1220
- const {address} = (await signer.getAccounts())[0];
1221
- const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, {registry, prefix});
1222
- let msg = this.msgInviteEarlyAccess({value: MsgInviteEarlyAccess.fromPartial(value)})
1223
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1224
- } catch (e: any) {
1225
- throw new Error('TxClient:sendMsgInviteEarlyAccess: Could not broadcast Tx: ' + e.message)
1226
- }
1227
- },
1228
-
1229
-
1230
- msgBuyCardScheme({value}: msgBuyCardSchemeParams): EncodeObject {
1231
- try {
1232
- return {
1233
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCardScheme",
1234
- value: MsgBuyCardScheme.fromPartial(value)
1235
- }
1236
- } catch (e: any) {
1237
- throw new Error('TxClient:MsgBuyCardScheme: Could not create message: ' + e.message)
1238
- }
1239
- },
1240
-
1241
- msgAddArtwork({value}: msgAddArtworkParams): EncodeObject {
1242
- try {
1243
- return {
1244
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddArtwork",
1245
- value: MsgAddArtwork.fromPartial(value)
1246
- }
1247
- } catch (e: any) {
1248
- throw new Error('TxClient:MsgAddArtwork: Could not create message: ' + e.message)
1249
- }
1250
- },
1251
-
1252
- msgSetSetName({value}: msgSetSetNameParams): EncodeObject {
1253
- try {
1254
- return {
1255
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetSetName",
1256
- value: MsgSetSetName.fromPartial(value)
1257
- }
1258
- } catch (e: any) {
1259
- throw new Error('TxClient:MsgSetSetName: Could not create message: ' + e.message)
1260
- }
1261
- },
1262
-
1263
- msgConfirmMatch({value}: msgConfirmMatchParams): EncodeObject {
1264
- try {
1265
- return {
1266
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgConfirmMatch",
1267
- value: MsgConfirmMatch.fromPartial(value)
1268
- }
1269
- } catch (e: any) {
1270
- throw new Error('TxClient:MsgConfirmMatch: Could not create message: ' + e.message)
1271
- }
1272
- },
1273
-
1274
- msgTransferBoosterPack({value}: msgTransferBoosterPackParams): EncodeObject {
1275
- try {
1276
- return {
1277
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgTransferBoosterPack",
1278
- value: MsgTransferBoosterPack.fromPartial(value)
1279
- }
1280
- } catch (e: any) {
1281
- throw new Error('TxClient:MsgTransferBoosterPack: Could not create message: ' + e.message)
1282
- }
1283
- },
1284
-
1285
- msgMultiVoteCard({value}: msgMultiVoteCardParams): EncodeObject {
1286
- try {
1287
- return {
1288
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgMultiVoteCard",
1289
- value: MsgMultiVoteCard.fromPartial(value)
1290
- }
1291
- } catch (e: any) {
1292
- throw new Error('TxClient:MsgMultiVoteCard: Could not create message: ' + e.message)
1293
- }
1294
- },
1295
-
1296
- msgFinalizeSet({value}: msgFinalizeSetParams): EncodeObject {
1297
- try {
1298
- return {
1299
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgFinalizeSet",
1300
- value: MsgFinalizeSet.fromPartial(value)
1301
- }
1302
- } catch (e: any) {
1303
- throw new Error('TxClient:MsgFinalizeSet: Could not create message: ' + e.message)
1304
- }
1305
- },
1306
-
1307
- msgOpenBoosterPack({value}: msgOpenBoosterPackParams): EncodeObject {
1308
- try {
1309
- return {
1310
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgOpenBoosterPack",
1311
- value: MsgOpenBoosterPack.fromPartial(value)
1312
- }
1313
- } catch (e: any) {
1314
- throw new Error('TxClient:MsgOpenBoosterPack: Could not create message: ' + e.message)
1315
- }
1316
- },
1317
-
1318
- msgTransferCard({value}: msgTransferCardParams): EncodeObject {
1319
- try {
1320
- return {
1321
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgTransferCard",
1322
- value: MsgTransferCard.fromPartial(value)
1323
- }
1324
- } catch (e: any) {
1325
- throw new Error('TxClient:MsgTransferCard: Could not create message: ' + e.message)
1326
- }
1327
- },
1328
-
1329
- msgRemoveContributorFromSet({value}: msgRemoveContributorFromSetParams): EncodeObject {
1330
- try {
1331
- return {
1332
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveContributorFromSet",
1333
- value: MsgRemoveContributorFromSet.fromPartial(value)
1334
- }
1335
- } catch (e: any) {
1336
- throw new Error('TxClient:MsgRemoveContributorFromSet: Could not create message: ' + e.message)
1337
- }
1338
- },
1339
-
1340
- msgChangeAlias({value}: msgChangeAliasParams): EncodeObject {
1341
- try {
1342
- return {
1343
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgChangeAlias",
1344
- value: MsgChangeAlias.fromPartial(value)
1345
- }
1346
- } catch (e: any) {
1347
- throw new Error('TxClient:MsgChangeAlias: Could not create message: ' + e.message)
1348
- }
1349
- },
1350
-
1351
- msgRemoveSellOffer({value}: msgRemoveSellOfferParams): EncodeObject {
1352
- try {
1353
- return {
1354
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveSellOffer",
1355
- value: MsgRemoveSellOffer.fromPartial(value)
1356
- }
1357
- } catch (e: any) {
1358
- throw new Error('TxClient:MsgRemoveSellOffer: Could not create message: ' + e.message)
1359
- }
1360
- },
1361
-
1362
- msgApointMatchReporter({value}: msgApointMatchReporterParams): EncodeObject {
1363
- try {
1364
- return {
1365
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgApointMatchReporter",
1366
- value: MsgApointMatchReporter.fromPartial(value)
1367
- }
1368
- } catch (e: any) {
1369
- throw new Error('TxClient:MsgApointMatchReporter: Could not create message: ' + e.message)
1370
- }
1371
- },
1372
-
1373
- msgAddArtworkToSet({value}: msgAddArtworkToSetParams): EncodeObject {
1374
- try {
1375
- return {
1376
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddArtworkToSet",
1377
- value: MsgAddArtworkToSet.fromPartial(value)
1378
- }
1379
- } catch (e: any) {
1380
- throw new Error('TxClient:MsgAddArtworkToSet: Could not create message: ' + e.message)
1381
- }
1382
- },
1383
-
1384
- msgAddStoryToSet({value}: msgAddStoryToSetParams): EncodeObject {
1385
- try {
1386
- return {
1387
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddStoryToSet",
1388
- value: MsgAddStoryToSet.fromPartial(value)
1389
- }
1390
- } catch (e: any) {
1391
- throw new Error('TxClient:MsgAddStoryToSet: Could not create message: ' + e.message)
1392
- }
1393
- },
1394
-
1395
- msgRevealCouncilResponse({value}: msgRevealCouncilResponseParams): EncodeObject {
1396
- try {
1397
- return {
1398
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRevealCouncilResponse",
1399
- value: MsgRevealCouncilResponse.fromPartial(value)
1400
- }
1401
- } catch (e: any) {
1402
- throw new Error('TxClient:MsgRevealCouncilResponse: Could not create message: ' + e.message)
1403
- }
1404
- },
1405
-
1406
- msgSetSetArtist({value}: msgSetSetArtistParams): EncodeObject {
1407
- try {
1408
- return {
1409
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetSetArtist",
1410
- value: MsgSetSetArtist.fromPartial(value)
1411
- }
1412
- } catch (e: any) {
1413
- throw new Error('TxClient:MsgSetSetArtist: Could not create message: ' + e.message)
1414
- }
1415
- },
1416
-
1417
- msgReportMatch({value}: msgReportMatchParams): EncodeObject {
1418
- try {
1419
- return {
1420
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgReportMatch",
1421
- value: MsgReportMatch.fromPartial(value)
1422
- }
1423
- } catch (e: any) {
1424
- throw new Error('TxClient:MsgReportMatch: Could not create message: ' + e.message)
1425
- }
1426
- },
1427
-
1428
- msgCreateCouncil({value}: msgCreateCouncilParams): EncodeObject {
1429
- try {
1430
- return {
1431
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateCouncil",
1432
- value: MsgCreateCouncil.fromPartial(value)
1433
- }
1434
- } catch (e: any) {
1435
- throw new Error('TxClient:MsgCreateCouncil: Could not create message: ' + e.message)
1436
- }
1437
- },
1438
-
1439
- msgSaveCardContent({value}: msgSaveCardContentParams): EncodeObject {
1440
- try {
1441
- return {
1442
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSaveCardContent",
1443
- value: MsgSaveCardContent.fromPartial(value)
1444
- }
1445
- } catch (e: any) {
1446
- throw new Error('TxClient:MsgSaveCardContent: Could not create message: ' + e.message)
1447
- }
1448
- },
1449
-
1450
- msgSetUserBiography({value}: msgSetUserBiographyParams): EncodeObject {
1451
- try {
1452
- return {
1453
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetUserBiography",
1454
- value: MsgSetUserBiography.fromPartial(value)
1455
- }
1456
- } catch (e: any) {
1457
- throw new Error('TxClient:MsgSetUserBiography: Could not create message: ' + e.message)
1458
- }
1459
- },
1460
-
1461
- msgAddCardToSet({value}: msgAddCardToSetParams): EncodeObject {
1462
- try {
1463
- return {
1464
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddCardToSet",
1465
- value: MsgAddCardToSet.fromPartial(value)
1466
- }
1467
- } catch (e: any) {
1468
- throw new Error('TxClient:MsgAddCardToSet: Could not create message: ' + e.message)
1469
- }
1470
- },
1471
-
1472
- msgCreateSet({value}: msgCreateSetParams): EncodeObject {
1473
- try {
1474
- return {
1475
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateSet",
1476
- value: MsgCreateSet.fromPartial(value)
1477
- }
1478
- } catch (e: any) {
1479
- throw new Error('TxClient:MsgCreateSet: Could not create message: ' + e.message)
1480
- }
1481
- },
1482
-
1483
- msgDisinviteEarlyAccess({value}: msgDisinviteEarlyAccessParams): EncodeObject {
1484
- try {
1485
- return {
1486
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgDisinviteEarlyAccess",
1487
- value: MsgDisinviteEarlyAccess.fromPartial(value)
1488
- }
1489
- } catch (e: any) {
1490
- throw new Error('TxClient:MsgDisinviteEarlyAccess: Could not create message: ' + e.message)
1491
- }
1492
- },
1493
-
1494
- msgVoteCard({value}: msgVoteCardParams): EncodeObject {
1495
- try {
1496
- return {
1497
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgVoteCard",
1498
- value: MsgVoteCard.fromPartial(value)
1499
- }
1500
- } catch (e: any) {
1501
- throw new Error('TxClient:MsgVoteCard: Could not create message: ' + e.message)
1502
- }
1503
- },
1504
-
1505
- msgSetUserWebsite({value}: msgSetUserWebsiteParams): EncodeObject {
1506
- try {
1507
- return {
1508
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetUserWebsite",
1509
- value: MsgSetUserWebsite.fromPartial(value)
1510
- }
1511
- } catch (e: any) {
1512
- throw new Error('TxClient:MsgSetUserWebsite: Could not create message: ' + e.message)
1513
- }
1514
- },
1515
-
1516
- msgSetSetStoryWriter({value}: msgSetSetStoryWriterParams): EncodeObject {
1517
- try {
1518
- return {
1519
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetSetStoryWriter",
1520
- value: MsgSetSetStoryWriter.fromPartial(value)
1521
- }
1522
- } catch (e: any) {
1523
- throw new Error('TxClient:MsgSetSetStoryWriter: Could not create message: ' + e.message)
1524
- }
1525
- },
1526
-
1527
- msgRewokeCouncilRegistration({value}: msgRewokeCouncilRegistrationParams): EncodeObject {
1528
- try {
1529
- return {
1530
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRewokeCouncilRegistration",
1531
- value: MsgRewokeCouncilRegistration.fromPartial(value)
1532
- }
1533
- } catch (e: any) {
1534
- throw new Error('TxClient:MsgRewokeCouncilRegistration: Could not create message: ' + e.message)
1535
- }
1536
- },
1537
-
1538
- msgCommitCouncilResponse({value}: msgCommitCouncilResponseParams): EncodeObject {
1539
- try {
1540
- return {
1541
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCommitCouncilResponse",
1542
- value: MsgCommitCouncilResponse.fromPartial(value)
1543
- }
1544
- } catch (e: any) {
1545
- throw new Error('TxClient:MsgCommitCouncilResponse: Could not create message: ' + e.message)
1546
- }
1547
- },
1548
-
1549
- msgBuyBoosterPack({value}: msgBuyBoosterPackParams): EncodeObject {
1550
- try {
1551
- return {
1552
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyBoosterPack",
1553
- value: MsgBuyBoosterPack.fromPartial(value)
1554
- }
1555
- } catch (e: any) {
1556
- throw new Error('TxClient:MsgBuyBoosterPack: Could not create message: ' + e.message)
1557
- }
1558
- },
1559
-
1560
- msgAddContributorToSet({value}: msgAddContributorToSetParams): EncodeObject {
1561
- try {
1562
- return {
1563
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddContributorToSet",
1564
- value: MsgAddContributorToSet.fromPartial(value)
1565
- }
1566
- } catch (e: any) {
1567
- throw new Error('TxClient:MsgAddContributorToSet: Could not create message: ' + e.message)
1568
- }
1569
- },
1570
-
1571
- msgRegisterForCouncil({value}: msgRegisterForCouncilParams): EncodeObject {
1572
- try {
1573
- return {
1574
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRegisterForCouncil",
1575
- value: MsgRegisterForCouncil.fromPartial(value)
1576
- }
1577
- } catch (e: any) {
1578
- throw new Error('TxClient:MsgRegisterForCouncil: Could not create message: ' + e.message)
1579
- }
1580
- },
1581
-
1582
- msgOpenMatch({value}: msgOpenMatchParams): EncodeObject {
1583
- try {
1584
- return {
1585
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgOpenMatch",
1586
- value: MsgOpenMatch.fromPartial(value)
1587
- }
1588
- } catch (e: any) {
1589
- throw new Error('TxClient:MsgOpenMatch: Could not create message: ' + e.message)
1590
- }
1591
- },
1592
-
1593
- msgSetProfileCard({value}: msgSetProfileCardParams): EncodeObject {
1594
- try {
1595
- return {
1596
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetProfileCard",
1597
- value: MsgSetProfileCard.fromPartial(value)
1598
- }
1599
- } catch (e: any) {
1600
- throw new Error('TxClient:MsgSetProfileCard: Could not create message: ' + e.message)
1601
- }
1602
- },
1603
-
1604
- msgChangeArtist({value}: msgChangeArtistParams): EncodeObject {
1605
- try {
1606
- return {
1607
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgChangeArtist",
1608
- value: MsgChangeArtist.fromPartial(value)
1609
- }
1610
- } catch (e: any) {
1611
- throw new Error('TxClient:MsgChangeArtist: Could not create message: ' + e.message)
1612
- }
1613
- },
1614
-
1615
- msgDonateToCard({value}: msgDonateToCardParams): EncodeObject {
1616
- try {
1617
- return {
1618
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgDonateToCard",
1619
- value: MsgDonateToCard.fromPartial(value)
1620
- }
1621
- } catch (e: any) {
1622
- throw new Error('TxClient:MsgDonateToCard: Could not create message: ' + e.message)
1623
- }
1624
- },
1625
-
1626
- msgBuyCard({value}: msgBuyCardParams): EncodeObject {
1627
- try {
1628
- return {
1629
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCard",
1630
- value: MsgBuyCard.fromPartial(value)
1631
- }
1632
- } catch (e: any) {
1633
- throw new Error('TxClient:MsgBuyCard: Could not create message: ' + e.message)
1634
- }
1635
- },
1636
-
1637
- msgCreateuser({value}: msgCreateuserParams): EncodeObject {
1638
- try {
1639
- return {
1640
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateuser",
1641
- value: MsgCreateuser.fromPartial(value)
1642
- }
1643
- } catch (e: any) {
1644
- throw new Error('TxClient:MsgCreateuser: Could not create message: ' + e.message)
1645
- }
1646
- },
1647
-
1648
- msgRemoveCardFromSet({value}: msgRemoveCardFromSetParams): EncodeObject {
1649
- try {
1650
- return {
1651
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveCardFromSet",
1652
- value: MsgRemoveCardFromSet.fromPartial(value)
1653
- }
1654
- } catch (e: any) {
1655
- throw new Error('TxClient:MsgRemoveCardFromSet: Could not create message: ' + e.message)
1656
- }
1657
- },
1658
-
1659
- msgCreateSellOffer({value}: msgCreateSellOfferParams): EncodeObject {
1660
- try {
1661
- return {
1662
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateSellOffer",
1663
- value: MsgCreateSellOffer.fromPartial(value)
1664
- }
1665
- } catch (e: any) {
1666
- throw new Error('TxClient:MsgCreateSellOffer: Could not create message: ' + e.message)
1667
- }
1668
- },
1669
-
1670
- msgRestartCouncil({value}: msgRestartCouncilParams): EncodeObject {
1671
- try {
1672
- return {
1673
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRestartCouncil",
1674
- value: MsgRestartCouncil.fromPartial(value)
1675
- }
1676
- } catch (e: any) {
1677
- throw new Error('TxClient:MsgRestartCouncil: Could not create message: ' + e.message)
1678
- }
1679
- },
1680
-
1681
- msgSetCardRarity({value}: msgSetCardRarityParams): EncodeObject {
1682
- try {
1683
- return {
1684
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetCardRarity",
1685
- value: MsgSetCardRarity.fromPartial(value)
1686
- }
1687
- } catch (e: any) {
1688
- throw new Error('TxClient:MsgSetCardRarity: Could not create message: ' + e.message)
1689
- }
1690
- },
1691
-
1692
- msgInviteEarlyAccess({value}: msgInviteEarlyAccessParams): EncodeObject {
1693
- try {
1694
- return {
1695
- typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgInviteEarlyAccess",
1696
- value: MsgInviteEarlyAccess.fromPartial(value)
1697
- }
1698
- } catch (e: any) {
1699
- throw new Error('TxClient:MsgInviteEarlyAccess: Could not create message: ' + e.message)
1700
- }
1701
- },
1702
-
1703
- }
586
+ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
587
+
588
+ return {
589
+
590
+ async sendMsgCommitCouncilResponse({ value, fee, memo }: sendMsgCommitCouncilResponseParams): Promise<DeliverTxResponse> {
591
+ if (!signer) {
592
+ throw new Error('TxClient:sendMsgCommitCouncilResponse: Unable to sign Tx. Signer is not present.')
593
+ }
594
+ try {
595
+ const { address } = (await signer.getAccounts())[0];
596
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
597
+ let msg = this.msgCommitCouncilResponse({ value: MsgCommitCouncilResponse.fromPartial(value) })
598
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
599
+ } catch (e: any) {
600
+ throw new Error('TxClient:sendMsgCommitCouncilResponse: Could not broadcast Tx: '+ e.message)
601
+ }
602
+ },
603
+
604
+ async sendMsgAddArtwork({ value, fee, memo }: sendMsgAddArtworkParams): Promise<DeliverTxResponse> {
605
+ if (!signer) {
606
+ throw new Error('TxClient:sendMsgAddArtwork: Unable to sign Tx. Signer is not present.')
607
+ }
608
+ try {
609
+ const { address } = (await signer.getAccounts())[0];
610
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
611
+ let msg = this.msgAddArtwork({ value: MsgAddArtwork.fromPartial(value) })
612
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
613
+ } catch (e: any) {
614
+ throw new Error('TxClient:sendMsgAddArtwork: Could not broadcast Tx: '+ e.message)
615
+ }
616
+ },
617
+
618
+ async sendMsgRestartCouncil({ value, fee, memo }: sendMsgRestartCouncilParams): Promise<DeliverTxResponse> {
619
+ if (!signer) {
620
+ throw new Error('TxClient:sendMsgRestartCouncil: Unable to sign Tx. Signer is not present.')
621
+ }
622
+ try {
623
+ const { address } = (await signer.getAccounts())[0];
624
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
625
+ let msg = this.msgRestartCouncil({ value: MsgRestartCouncil.fromPartial(value) })
626
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
627
+ } catch (e: any) {
628
+ throw new Error('TxClient:sendMsgRestartCouncil: Could not broadcast Tx: '+ e.message)
629
+ }
630
+ },
631
+
632
+ async sendMsgDonateToCard({ value, fee, memo }: sendMsgDonateToCardParams): Promise<DeliverTxResponse> {
633
+ if (!signer) {
634
+ throw new Error('TxClient:sendMsgDonateToCard: Unable to sign Tx. Signer is not present.')
635
+ }
636
+ try {
637
+ const { address } = (await signer.getAccounts())[0];
638
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
639
+ let msg = this.msgDonateToCard({ value: MsgDonateToCard.fromPartial(value) })
640
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
641
+ } catch (e: any) {
642
+ throw new Error('TxClient:sendMsgDonateToCard: Could not broadcast Tx: '+ e.message)
643
+ }
644
+ },
645
+
646
+ async sendMsgAddArtworkToSet({ value, fee, memo }: sendMsgAddArtworkToSetParams): Promise<DeliverTxResponse> {
647
+ if (!signer) {
648
+ throw new Error('TxClient:sendMsgAddArtworkToSet: Unable to sign Tx. Signer is not present.')
649
+ }
650
+ try {
651
+ const { address } = (await signer.getAccounts())[0];
652
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
653
+ let msg = this.msgAddArtworkToSet({ value: MsgAddArtworkToSet.fromPartial(value) })
654
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
655
+ } catch (e: any) {
656
+ throw new Error('TxClient:sendMsgAddArtworkToSet: Could not broadcast Tx: '+ e.message)
657
+ }
658
+ },
659
+
660
+ async sendMsgRewokeCouncilRegistration({ value, fee, memo }: sendMsgRewokeCouncilRegistrationParams): Promise<DeliverTxResponse> {
661
+ if (!signer) {
662
+ throw new Error('TxClient:sendMsgRewokeCouncilRegistration: Unable to sign Tx. Signer is not present.')
663
+ }
664
+ try {
665
+ const { address } = (await signer.getAccounts())[0];
666
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
667
+ let msg = this.msgRewokeCouncilRegistration({ value: MsgRewokeCouncilRegistration.fromPartial(value) })
668
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
669
+ } catch (e: any) {
670
+ throw new Error('TxClient:sendMsgRewokeCouncilRegistration: Could not broadcast Tx: '+ e.message)
671
+ }
672
+ },
673
+
674
+ async sendMsgAddContributorToSet({ value, fee, memo }: sendMsgAddContributorToSetParams): Promise<DeliverTxResponse> {
675
+ if (!signer) {
676
+ throw new Error('TxClient:sendMsgAddContributorToSet: Unable to sign Tx. Signer is not present.')
677
+ }
678
+ try {
679
+ const { address } = (await signer.getAccounts())[0];
680
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
681
+ let msg = this.msgAddContributorToSet({ value: MsgAddContributorToSet.fromPartial(value) })
682
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
683
+ } catch (e: any) {
684
+ throw new Error('TxClient:sendMsgAddContributorToSet: Could not broadcast Tx: '+ e.message)
685
+ }
686
+ },
687
+
688
+ async sendMsgInviteEarlyAccess({ value, fee, memo }: sendMsgInviteEarlyAccessParams): Promise<DeliverTxResponse> {
689
+ if (!signer) {
690
+ throw new Error('TxClient:sendMsgInviteEarlyAccess: Unable to sign Tx. Signer is not present.')
691
+ }
692
+ try {
693
+ const { address } = (await signer.getAccounts())[0];
694
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
695
+ let msg = this.msgInviteEarlyAccess({ value: MsgInviteEarlyAccess.fromPartial(value) })
696
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
697
+ } catch (e: any) {
698
+ throw new Error('TxClient:sendMsgInviteEarlyAccess: Could not broadcast Tx: '+ e.message)
699
+ }
700
+ },
701
+
702
+ async sendMsgBuyBoosterPack({ value, fee, memo }: sendMsgBuyBoosterPackParams): Promise<DeliverTxResponse> {
703
+ if (!signer) {
704
+ throw new Error('TxClient:sendMsgBuyBoosterPack: Unable to sign Tx. Signer is not present.')
705
+ }
706
+ try {
707
+ const { address } = (await signer.getAccounts())[0];
708
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
709
+ let msg = this.msgBuyBoosterPack({ value: MsgBuyBoosterPack.fromPartial(value) })
710
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
711
+ } catch (e: any) {
712
+ throw new Error('TxClient:sendMsgBuyBoosterPack: Could not broadcast Tx: '+ e.message)
713
+ }
714
+ },
715
+
716
+ async sendMsgConnectZealyAccount({ value, fee, memo }: sendMsgConnectZealyAccountParams): Promise<DeliverTxResponse> {
717
+ if (!signer) {
718
+ throw new Error('TxClient:sendMsgConnectZealyAccount: Unable to sign Tx. Signer is not present.')
719
+ }
720
+ try {
721
+ const { address } = (await signer.getAccounts())[0];
722
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
723
+ let msg = this.msgConnectZealyAccount({ value: MsgConnectZealyAccount.fromPartial(value) })
724
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
725
+ } catch (e: any) {
726
+ throw new Error('TxClient:sendMsgConnectZealyAccount: Could not broadcast Tx: '+ e.message)
727
+ }
728
+ },
729
+
730
+ async sendMsgApointMatchReporter({ value, fee, memo }: sendMsgApointMatchReporterParams): Promise<DeliverTxResponse> {
731
+ if (!signer) {
732
+ throw new Error('TxClient:sendMsgApointMatchReporter: Unable to sign Tx. Signer is not present.')
733
+ }
734
+ try {
735
+ const { address } = (await signer.getAccounts())[0];
736
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
737
+ let msg = this.msgApointMatchReporter({ value: MsgApointMatchReporter.fromPartial(value) })
738
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
739
+ } catch (e: any) {
740
+ throw new Error('TxClient:sendMsgApointMatchReporter: Could not broadcast Tx: '+ e.message)
741
+ }
742
+ },
743
+
744
+ async sendMsgSetProfileCard({ value, fee, memo }: sendMsgSetProfileCardParams): Promise<DeliverTxResponse> {
745
+ if (!signer) {
746
+ throw new Error('TxClient:sendMsgSetProfileCard: Unable to sign Tx. Signer is not present.')
747
+ }
748
+ try {
749
+ const { address } = (await signer.getAccounts())[0];
750
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
751
+ let msg = this.msgSetProfileCard({ value: MsgSetProfileCard.fromPartial(value) })
752
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
753
+ } catch (e: any) {
754
+ throw new Error('TxClient:sendMsgSetProfileCard: Could not broadcast Tx: '+ e.message)
755
+ }
756
+ },
757
+
758
+ async sendMsgAddStoryToSet({ value, fee, memo }: sendMsgAddStoryToSetParams): Promise<DeliverTxResponse> {
759
+ if (!signer) {
760
+ throw new Error('TxClient:sendMsgAddStoryToSet: Unable to sign Tx. Signer is not present.')
761
+ }
762
+ try {
763
+ const { address } = (await signer.getAccounts())[0];
764
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
765
+ let msg = this.msgAddStoryToSet({ value: MsgAddStoryToSet.fromPartial(value) })
766
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
767
+ } catch (e: any) {
768
+ throw new Error('TxClient:sendMsgAddStoryToSet: Could not broadcast Tx: '+ e.message)
769
+ }
770
+ },
771
+
772
+ async sendMsgCreateCouncil({ value, fee, memo }: sendMsgCreateCouncilParams): Promise<DeliverTxResponse> {
773
+ if (!signer) {
774
+ throw new Error('TxClient:sendMsgCreateCouncil: Unable to sign Tx. Signer is not present.')
775
+ }
776
+ try {
777
+ const { address } = (await signer.getAccounts())[0];
778
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
779
+ let msg = this.msgCreateCouncil({ value: MsgCreateCouncil.fromPartial(value) })
780
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
781
+ } catch (e: any) {
782
+ throw new Error('TxClient:sendMsgCreateCouncil: Could not broadcast Tx: '+ e.message)
783
+ }
784
+ },
785
+
786
+ async sendMsgSetCardRarity({ value, fee, memo }: sendMsgSetCardRarityParams): Promise<DeliverTxResponse> {
787
+ if (!signer) {
788
+ throw new Error('TxClient:sendMsgSetCardRarity: Unable to sign Tx. Signer is not present.')
789
+ }
790
+ try {
791
+ const { address } = (await signer.getAccounts())[0];
792
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
793
+ let msg = this.msgSetCardRarity({ value: MsgSetCardRarity.fromPartial(value) })
794
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
795
+ } catch (e: any) {
796
+ throw new Error('TxClient:sendMsgSetCardRarity: Could not broadcast Tx: '+ e.message)
797
+ }
798
+ },
799
+
800
+ async sendMsgOpenMatch({ value, fee, memo }: sendMsgOpenMatchParams): Promise<DeliverTxResponse> {
801
+ if (!signer) {
802
+ throw new Error('TxClient:sendMsgOpenMatch: Unable to sign Tx. Signer is not present.')
803
+ }
804
+ try {
805
+ const { address } = (await signer.getAccounts())[0];
806
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
807
+ let msg = this.msgOpenMatch({ value: MsgOpenMatch.fromPartial(value) })
808
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
809
+ } catch (e: any) {
810
+ throw new Error('TxClient:sendMsgOpenMatch: Could not broadcast Tx: '+ e.message)
811
+ }
812
+ },
813
+
814
+ async sendMsgTransferBoosterPack({ value, fee, memo }: sendMsgTransferBoosterPackParams): Promise<DeliverTxResponse> {
815
+ if (!signer) {
816
+ throw new Error('TxClient:sendMsgTransferBoosterPack: Unable to sign Tx. Signer is not present.')
817
+ }
818
+ try {
819
+ const { address } = (await signer.getAccounts())[0];
820
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
821
+ let msg = this.msgTransferBoosterPack({ value: MsgTransferBoosterPack.fromPartial(value) })
822
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
823
+ } catch (e: any) {
824
+ throw new Error('TxClient:sendMsgTransferBoosterPack: Could not broadcast Tx: '+ e.message)
825
+ }
826
+ },
827
+
828
+ async sendMsgSetSetName({ value, fee, memo }: sendMsgSetSetNameParams): Promise<DeliverTxResponse> {
829
+ if (!signer) {
830
+ throw new Error('TxClient:sendMsgSetSetName: Unable to sign Tx. Signer is not present.')
831
+ }
832
+ try {
833
+ const { address } = (await signer.getAccounts())[0];
834
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
835
+ let msg = this.msgSetSetName({ value: MsgSetSetName.fromPartial(value) })
836
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
837
+ } catch (e: any) {
838
+ throw new Error('TxClient:sendMsgSetSetName: Could not broadcast Tx: '+ e.message)
839
+ }
840
+ },
841
+
842
+ async sendMsgFinalizeSet({ value, fee, memo }: sendMsgFinalizeSetParams): Promise<DeliverTxResponse> {
843
+ if (!signer) {
844
+ throw new Error('TxClient:sendMsgFinalizeSet: Unable to sign Tx. Signer is not present.')
845
+ }
846
+ try {
847
+ const { address } = (await signer.getAccounts())[0];
848
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
849
+ let msg = this.msgFinalizeSet({ value: MsgFinalizeSet.fromPartial(value) })
850
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
851
+ } catch (e: any) {
852
+ throw new Error('TxClient:sendMsgFinalizeSet: Could not broadcast Tx: '+ e.message)
853
+ }
854
+ },
855
+
856
+ async sendMsgSetSetStoryWriter({ value, fee, memo }: sendMsgSetSetStoryWriterParams): Promise<DeliverTxResponse> {
857
+ if (!signer) {
858
+ throw new Error('TxClient:sendMsgSetSetStoryWriter: Unable to sign Tx. Signer is not present.')
859
+ }
860
+ try {
861
+ const { address } = (await signer.getAccounts())[0];
862
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
863
+ let msg = this.msgSetSetStoryWriter({ value: MsgSetSetStoryWriter.fromPartial(value) })
864
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
865
+ } catch (e: any) {
866
+ throw new Error('TxClient:sendMsgSetSetStoryWriter: Could not broadcast Tx: '+ e.message)
867
+ }
868
+ },
869
+
870
+ async sendMsgChangeArtist({ value, fee, memo }: sendMsgChangeArtistParams): Promise<DeliverTxResponse> {
871
+ if (!signer) {
872
+ throw new Error('TxClient:sendMsgChangeArtist: Unable to sign Tx. Signer is not present.')
873
+ }
874
+ try {
875
+ const { address } = (await signer.getAccounts())[0];
876
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
877
+ let msg = this.msgChangeArtist({ value: MsgChangeArtist.fromPartial(value) })
878
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
879
+ } catch (e: any) {
880
+ throw new Error('TxClient:sendMsgChangeArtist: Could not broadcast Tx: '+ e.message)
881
+ }
882
+ },
883
+
884
+ async sendMsgCreateSellOffer({ value, fee, memo }: sendMsgCreateSellOfferParams): Promise<DeliverTxResponse> {
885
+ if (!signer) {
886
+ throw new Error('TxClient:sendMsgCreateSellOffer: Unable to sign Tx. Signer is not present.')
887
+ }
888
+ try {
889
+ const { address } = (await signer.getAccounts())[0];
890
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
891
+ let msg = this.msgCreateSellOffer({ value: MsgCreateSellOffer.fromPartial(value) })
892
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
893
+ } catch (e: any) {
894
+ throw new Error('TxClient:sendMsgCreateSellOffer: Could not broadcast Tx: '+ e.message)
895
+ }
896
+ },
897
+
898
+ async sendMsgRevealCouncilResponse({ value, fee, memo }: sendMsgRevealCouncilResponseParams): Promise<DeliverTxResponse> {
899
+ if (!signer) {
900
+ throw new Error('TxClient:sendMsgRevealCouncilResponse: Unable to sign Tx. Signer is not present.')
901
+ }
902
+ try {
903
+ const { address } = (await signer.getAccounts())[0];
904
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
905
+ let msg = this.msgRevealCouncilResponse({ value: MsgRevealCouncilResponse.fromPartial(value) })
906
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
907
+ } catch (e: any) {
908
+ throw new Error('TxClient:sendMsgRevealCouncilResponse: Could not broadcast Tx: '+ e.message)
909
+ }
910
+ },
911
+
912
+ async sendMsgRemoveCardFromSet({ value, fee, memo }: sendMsgRemoveCardFromSetParams): Promise<DeliverTxResponse> {
913
+ if (!signer) {
914
+ throw new Error('TxClient:sendMsgRemoveCardFromSet: Unable to sign Tx. Signer is not present.')
915
+ }
916
+ try {
917
+ const { address } = (await signer.getAccounts())[0];
918
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
919
+ let msg = this.msgRemoveCardFromSet({ value: MsgRemoveCardFromSet.fromPartial(value) })
920
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
921
+ } catch (e: any) {
922
+ throw new Error('TxClient:sendMsgRemoveCardFromSet: Could not broadcast Tx: '+ e.message)
923
+ }
924
+ },
925
+
926
+ async sendMsgCreateSet({ value, fee, memo }: sendMsgCreateSetParams): Promise<DeliverTxResponse> {
927
+ if (!signer) {
928
+ throw new Error('TxClient:sendMsgCreateSet: Unable to sign Tx. Signer is not present.')
929
+ }
930
+ try {
931
+ const { address } = (await signer.getAccounts())[0];
932
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
933
+ let msg = this.msgCreateSet({ value: MsgCreateSet.fromPartial(value) })
934
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
935
+ } catch (e: any) {
936
+ throw new Error('TxClient:sendMsgCreateSet: Could not broadcast Tx: '+ e.message)
937
+ }
938
+ },
939
+
940
+ async sendMsgCreateuser({ value, fee, memo }: sendMsgCreateuserParams): Promise<DeliverTxResponse> {
941
+ if (!signer) {
942
+ throw new Error('TxClient:sendMsgCreateuser: Unable to sign Tx. Signer is not present.')
943
+ }
944
+ try {
945
+ const { address } = (await signer.getAccounts())[0];
946
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
947
+ let msg = this.msgCreateuser({ value: MsgCreateuser.fromPartial(value) })
948
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
949
+ } catch (e: any) {
950
+ throw new Error('TxClient:sendMsgCreateuser: Could not broadcast Tx: '+ e.message)
951
+ }
952
+ },
953
+
954
+ async sendMsgMultiVoteCard({ value, fee, memo }: sendMsgMultiVoteCardParams): Promise<DeliverTxResponse> {
955
+ if (!signer) {
956
+ throw new Error('TxClient:sendMsgMultiVoteCard: Unable to sign Tx. Signer is not present.')
957
+ }
958
+ try {
959
+ const { address } = (await signer.getAccounts())[0];
960
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
961
+ let msg = this.msgMultiVoteCard({ value: MsgMultiVoteCard.fromPartial(value) })
962
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
963
+ } catch (e: any) {
964
+ throw new Error('TxClient:sendMsgMultiVoteCard: Could not broadcast Tx: '+ e.message)
965
+ }
966
+ },
967
+
968
+ async sendMsgSetUserWebsite({ value, fee, memo }: sendMsgSetUserWebsiteParams): Promise<DeliverTxResponse> {
969
+ if (!signer) {
970
+ throw new Error('TxClient:sendMsgSetUserWebsite: Unable to sign Tx. Signer is not present.')
971
+ }
972
+ try {
973
+ const { address } = (await signer.getAccounts())[0];
974
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
975
+ let msg = this.msgSetUserWebsite({ value: MsgSetUserWebsite.fromPartial(value) })
976
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
977
+ } catch (e: any) {
978
+ throw new Error('TxClient:sendMsgSetUserWebsite: Could not broadcast Tx: '+ e.message)
979
+ }
980
+ },
981
+
982
+ async sendMsgConfirmMatch({ value, fee, memo }: sendMsgConfirmMatchParams): Promise<DeliverTxResponse> {
983
+ if (!signer) {
984
+ throw new Error('TxClient:sendMsgConfirmMatch: Unable to sign Tx. Signer is not present.')
985
+ }
986
+ try {
987
+ const { address } = (await signer.getAccounts())[0];
988
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
989
+ let msg = this.msgConfirmMatch({ value: MsgConfirmMatch.fromPartial(value) })
990
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
991
+ } catch (e: any) {
992
+ throw new Error('TxClient:sendMsgConfirmMatch: Could not broadcast Tx: '+ e.message)
993
+ }
994
+ },
995
+
996
+ async sendMsgEncounterClose({ value, fee, memo }: sendMsgEncounterCloseParams): Promise<DeliverTxResponse> {
997
+ if (!signer) {
998
+ throw new Error('TxClient:sendMsgEncounterClose: Unable to sign Tx. Signer is not present.')
999
+ }
1000
+ try {
1001
+ const { address } = (await signer.getAccounts())[0];
1002
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1003
+ let msg = this.msgEncounterClose({ value: MsgEncounterClose.fromPartial(value) })
1004
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1005
+ } catch (e: any) {
1006
+ throw new Error('TxClient:sendMsgEncounterClose: Could not broadcast Tx: '+ e.message)
1007
+ }
1008
+ },
1009
+
1010
+ async sendMsgRemoveContributorFromSet({ value, fee, memo }: sendMsgRemoveContributorFromSetParams): Promise<DeliverTxResponse> {
1011
+ if (!signer) {
1012
+ throw new Error('TxClient:sendMsgRemoveContributorFromSet: Unable to sign Tx. Signer is not present.')
1013
+ }
1014
+ try {
1015
+ const { address } = (await signer.getAccounts())[0];
1016
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1017
+ let msg = this.msgRemoveContributorFromSet({ value: MsgRemoveContributorFromSet.fromPartial(value) })
1018
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1019
+ } catch (e: any) {
1020
+ throw new Error('TxClient:sendMsgRemoveContributorFromSet: Could not broadcast Tx: '+ e.message)
1021
+ }
1022
+ },
1023
+
1024
+ async sendMsgEncounterDo({ value, fee, memo }: sendMsgEncounterDoParams): Promise<DeliverTxResponse> {
1025
+ if (!signer) {
1026
+ throw new Error('TxClient:sendMsgEncounterDo: Unable to sign Tx. Signer is not present.')
1027
+ }
1028
+ try {
1029
+ const { address } = (await signer.getAccounts())[0];
1030
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1031
+ let msg = this.msgEncounterDo({ value: MsgEncounterDo.fromPartial(value) })
1032
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1033
+ } catch (e: any) {
1034
+ throw new Error('TxClient:sendMsgEncounterDo: Could not broadcast Tx: '+ e.message)
1035
+ }
1036
+ },
1037
+
1038
+ async sendMsgAddCardToSet({ value, fee, memo }: sendMsgAddCardToSetParams): Promise<DeliverTxResponse> {
1039
+ if (!signer) {
1040
+ throw new Error('TxClient:sendMsgAddCardToSet: Unable to sign Tx. Signer is not present.')
1041
+ }
1042
+ try {
1043
+ const { address } = (await signer.getAccounts())[0];
1044
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1045
+ let msg = this.msgAddCardToSet({ value: MsgAddCardToSet.fromPartial(value) })
1046
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1047
+ } catch (e: any) {
1048
+ throw new Error('TxClient:sendMsgAddCardToSet: Could not broadcast Tx: '+ e.message)
1049
+ }
1050
+ },
1051
+
1052
+ async sendMsgEncounterCreate({ value, fee, memo }: sendMsgEncounterCreateParams): Promise<DeliverTxResponse> {
1053
+ if (!signer) {
1054
+ throw new Error('TxClient:sendMsgEncounterCreate: Unable to sign Tx. Signer is not present.')
1055
+ }
1056
+ try {
1057
+ const { address } = (await signer.getAccounts())[0];
1058
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1059
+ let msg = this.msgEncounterCreate({ value: MsgEncounterCreate.fromPartial(value) })
1060
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1061
+ } catch (e: any) {
1062
+ throw new Error('TxClient:sendMsgEncounterCreate: Could not broadcast Tx: '+ e.message)
1063
+ }
1064
+ },
1065
+
1066
+ async sendMsgSaveCardContent({ value, fee, memo }: sendMsgSaveCardContentParams): Promise<DeliverTxResponse> {
1067
+ if (!signer) {
1068
+ throw new Error('TxClient:sendMsgSaveCardContent: Unable to sign Tx. Signer is not present.')
1069
+ }
1070
+ try {
1071
+ const { address } = (await signer.getAccounts())[0];
1072
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1073
+ let msg = this.msgSaveCardContent({ value: MsgSaveCardContent.fromPartial(value) })
1074
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1075
+ } catch (e: any) {
1076
+ throw new Error('TxClient:sendMsgSaveCardContent: Could not broadcast Tx: '+ e.message)
1077
+ }
1078
+ },
1079
+
1080
+ async sendMsgBuyCardScheme({ value, fee, memo }: sendMsgBuyCardSchemeParams): Promise<DeliverTxResponse> {
1081
+ if (!signer) {
1082
+ throw new Error('TxClient:sendMsgBuyCardScheme: Unable to sign Tx. Signer is not present.')
1083
+ }
1084
+ try {
1085
+ const { address } = (await signer.getAccounts())[0];
1086
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1087
+ let msg = this.msgBuyCardScheme({ value: MsgBuyCardScheme.fromPartial(value) })
1088
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1089
+ } catch (e: any) {
1090
+ throw new Error('TxClient:sendMsgBuyCardScheme: Could not broadcast Tx: '+ e.message)
1091
+ }
1092
+ },
1093
+
1094
+ async sendMsgOpenBoosterPack({ value, fee, memo }: sendMsgOpenBoosterPackParams): Promise<DeliverTxResponse> {
1095
+ if (!signer) {
1096
+ throw new Error('TxClient:sendMsgOpenBoosterPack: Unable to sign Tx. Signer is not present.')
1097
+ }
1098
+ try {
1099
+ const { address } = (await signer.getAccounts())[0];
1100
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1101
+ let msg = this.msgOpenBoosterPack({ value: MsgOpenBoosterPack.fromPartial(value) })
1102
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1103
+ } catch (e: any) {
1104
+ throw new Error('TxClient:sendMsgOpenBoosterPack: Could not broadcast Tx: '+ e.message)
1105
+ }
1106
+ },
1107
+
1108
+ async sendMsgReportMatch({ value, fee, memo }: sendMsgReportMatchParams): Promise<DeliverTxResponse> {
1109
+ if (!signer) {
1110
+ throw new Error('TxClient:sendMsgReportMatch: Unable to sign Tx. Signer is not present.')
1111
+ }
1112
+ try {
1113
+ const { address } = (await signer.getAccounts())[0];
1114
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1115
+ let msg = this.msgReportMatch({ value: MsgReportMatch.fromPartial(value) })
1116
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1117
+ } catch (e: any) {
1118
+ throw new Error('TxClient:sendMsgReportMatch: Could not broadcast Tx: '+ e.message)
1119
+ }
1120
+ },
1121
+
1122
+ async sendMsgRemoveSellOffer({ value, fee, memo }: sendMsgRemoveSellOfferParams): Promise<DeliverTxResponse> {
1123
+ if (!signer) {
1124
+ throw new Error('TxClient:sendMsgRemoveSellOffer: Unable to sign Tx. Signer is not present.')
1125
+ }
1126
+ try {
1127
+ const { address } = (await signer.getAccounts())[0];
1128
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1129
+ let msg = this.msgRemoveSellOffer({ value: MsgRemoveSellOffer.fromPartial(value) })
1130
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1131
+ } catch (e: any) {
1132
+ throw new Error('TxClient:sendMsgRemoveSellOffer: Could not broadcast Tx: '+ e.message)
1133
+ }
1134
+ },
1135
+
1136
+ async sendMsgChangeAlias({ value, fee, memo }: sendMsgChangeAliasParams): Promise<DeliverTxResponse> {
1137
+ if (!signer) {
1138
+ throw new Error('TxClient:sendMsgChangeAlias: Unable to sign Tx. Signer is not present.')
1139
+ }
1140
+ try {
1141
+ const { address } = (await signer.getAccounts())[0];
1142
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1143
+ let msg = this.msgChangeAlias({ value: MsgChangeAlias.fromPartial(value) })
1144
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1145
+ } catch (e: any) {
1146
+ throw new Error('TxClient:sendMsgChangeAlias: Could not broadcast Tx: '+ e.message)
1147
+ }
1148
+ },
1149
+
1150
+ async sendMsgTransferCard({ value, fee, memo }: sendMsgTransferCardParams): Promise<DeliverTxResponse> {
1151
+ if (!signer) {
1152
+ throw new Error('TxClient:sendMsgTransferCard: Unable to sign Tx. Signer is not present.')
1153
+ }
1154
+ try {
1155
+ const { address } = (await signer.getAccounts())[0];
1156
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1157
+ let msg = this.msgTransferCard({ value: MsgTransferCard.fromPartial(value) })
1158
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1159
+ } catch (e: any) {
1160
+ throw new Error('TxClient:sendMsgTransferCard: Could not broadcast Tx: '+ e.message)
1161
+ }
1162
+ },
1163
+
1164
+ async sendMsgSetUserBiography({ value, fee, memo }: sendMsgSetUserBiographyParams): Promise<DeliverTxResponse> {
1165
+ if (!signer) {
1166
+ throw new Error('TxClient:sendMsgSetUserBiography: Unable to sign Tx. Signer is not present.')
1167
+ }
1168
+ try {
1169
+ const { address } = (await signer.getAccounts())[0];
1170
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1171
+ let msg = this.msgSetUserBiography({ value: MsgSetUserBiography.fromPartial(value) })
1172
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1173
+ } catch (e: any) {
1174
+ throw new Error('TxClient:sendMsgSetUserBiography: Could not broadcast Tx: '+ e.message)
1175
+ }
1176
+ },
1177
+
1178
+ async sendMsgVoteCard({ value, fee, memo }: sendMsgVoteCardParams): Promise<DeliverTxResponse> {
1179
+ if (!signer) {
1180
+ throw new Error('TxClient:sendMsgVoteCard: Unable to sign Tx. Signer is not present.')
1181
+ }
1182
+ try {
1183
+ const { address } = (await signer.getAccounts())[0];
1184
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1185
+ let msg = this.msgVoteCard({ value: MsgVoteCard.fromPartial(value) })
1186
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1187
+ } catch (e: any) {
1188
+ throw new Error('TxClient:sendMsgVoteCard: Could not broadcast Tx: '+ e.message)
1189
+ }
1190
+ },
1191
+
1192
+ async sendMsgBuyCard({ value, fee, memo }: sendMsgBuyCardParams): Promise<DeliverTxResponse> {
1193
+ if (!signer) {
1194
+ throw new Error('TxClient:sendMsgBuyCard: Unable to sign Tx. Signer is not present.')
1195
+ }
1196
+ try {
1197
+ const { address } = (await signer.getAccounts())[0];
1198
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1199
+ let msg = this.msgBuyCard({ value: MsgBuyCard.fromPartial(value) })
1200
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1201
+ } catch (e: any) {
1202
+ throw new Error('TxClient:sendMsgBuyCard: Could not broadcast Tx: '+ e.message)
1203
+ }
1204
+ },
1205
+
1206
+ async sendMsgSetSetArtist({ value, fee, memo }: sendMsgSetSetArtistParams): Promise<DeliverTxResponse> {
1207
+ if (!signer) {
1208
+ throw new Error('TxClient:sendMsgSetSetArtist: Unable to sign Tx. Signer is not present.')
1209
+ }
1210
+ try {
1211
+ const { address } = (await signer.getAccounts())[0];
1212
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1213
+ let msg = this.msgSetSetArtist({ value: MsgSetSetArtist.fromPartial(value) })
1214
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1215
+ } catch (e: any) {
1216
+ throw new Error('TxClient:sendMsgSetSetArtist: Could not broadcast Tx: '+ e.message)
1217
+ }
1218
+ },
1219
+
1220
+ async sendMsgDisinviteEarlyAccess({ value, fee, memo }: sendMsgDisinviteEarlyAccessParams): Promise<DeliverTxResponse> {
1221
+ if (!signer) {
1222
+ throw new Error('TxClient:sendMsgDisinviteEarlyAccess: Unable to sign Tx. Signer is not present.')
1223
+ }
1224
+ try {
1225
+ const { address } = (await signer.getAccounts())[0];
1226
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1227
+ let msg = this.msgDisinviteEarlyAccess({ value: MsgDisinviteEarlyAccess.fromPartial(value) })
1228
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1229
+ } catch (e: any) {
1230
+ throw new Error('TxClient:sendMsgDisinviteEarlyAccess: Could not broadcast Tx: '+ e.message)
1231
+ }
1232
+ },
1233
+
1234
+ async sendMsgRegisterForCouncil({ value, fee, memo }: sendMsgRegisterForCouncilParams): Promise<DeliverTxResponse> {
1235
+ if (!signer) {
1236
+ throw new Error('TxClient:sendMsgRegisterForCouncil: Unable to sign Tx. Signer is not present.')
1237
+ }
1238
+ try {
1239
+ const { address } = (await signer.getAccounts())[0];
1240
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
1241
+ let msg = this.msgRegisterForCouncil({ value: MsgRegisterForCouncil.fromPartial(value) })
1242
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
1243
+ } catch (e: any) {
1244
+ throw new Error('TxClient:sendMsgRegisterForCouncil: Could not broadcast Tx: '+ e.message)
1245
+ }
1246
+ },
1247
+
1248
+
1249
+ msgCommitCouncilResponse({ value }: msgCommitCouncilResponseParams): EncodeObject {
1250
+ try {
1251
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCommitCouncilResponse", value: MsgCommitCouncilResponse.fromPartial( value ) }
1252
+ } catch (e: any) {
1253
+ throw new Error('TxClient:MsgCommitCouncilResponse: Could not create message: ' + e.message)
1254
+ }
1255
+ },
1256
+
1257
+ msgAddArtwork({ value }: msgAddArtworkParams): EncodeObject {
1258
+ try {
1259
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddArtwork", value: MsgAddArtwork.fromPartial( value ) }
1260
+ } catch (e: any) {
1261
+ throw new Error('TxClient:MsgAddArtwork: Could not create message: ' + e.message)
1262
+ }
1263
+ },
1264
+
1265
+ msgRestartCouncil({ value }: msgRestartCouncilParams): EncodeObject {
1266
+ try {
1267
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRestartCouncil", value: MsgRestartCouncil.fromPartial( value ) }
1268
+ } catch (e: any) {
1269
+ throw new Error('TxClient:MsgRestartCouncil: Could not create message: ' + e.message)
1270
+ }
1271
+ },
1272
+
1273
+ msgDonateToCard({ value }: msgDonateToCardParams): EncodeObject {
1274
+ try {
1275
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgDonateToCard", value: MsgDonateToCard.fromPartial( value ) }
1276
+ } catch (e: any) {
1277
+ throw new Error('TxClient:MsgDonateToCard: Could not create message: ' + e.message)
1278
+ }
1279
+ },
1280
+
1281
+ msgAddArtworkToSet({ value }: msgAddArtworkToSetParams): EncodeObject {
1282
+ try {
1283
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddArtworkToSet", value: MsgAddArtworkToSet.fromPartial( value ) }
1284
+ } catch (e: any) {
1285
+ throw new Error('TxClient:MsgAddArtworkToSet: Could not create message: ' + e.message)
1286
+ }
1287
+ },
1288
+
1289
+ msgRewokeCouncilRegistration({ value }: msgRewokeCouncilRegistrationParams): EncodeObject {
1290
+ try {
1291
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRewokeCouncilRegistration", value: MsgRewokeCouncilRegistration.fromPartial( value ) }
1292
+ } catch (e: any) {
1293
+ throw new Error('TxClient:MsgRewokeCouncilRegistration: Could not create message: ' + e.message)
1294
+ }
1295
+ },
1296
+
1297
+ msgAddContributorToSet({ value }: msgAddContributorToSetParams): EncodeObject {
1298
+ try {
1299
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddContributorToSet", value: MsgAddContributorToSet.fromPartial( value ) }
1300
+ } catch (e: any) {
1301
+ throw new Error('TxClient:MsgAddContributorToSet: Could not create message: ' + e.message)
1302
+ }
1303
+ },
1304
+
1305
+ msgInviteEarlyAccess({ value }: msgInviteEarlyAccessParams): EncodeObject {
1306
+ try {
1307
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgInviteEarlyAccess", value: MsgInviteEarlyAccess.fromPartial( value ) }
1308
+ } catch (e: any) {
1309
+ throw new Error('TxClient:MsgInviteEarlyAccess: Could not create message: ' + e.message)
1310
+ }
1311
+ },
1312
+
1313
+ msgBuyBoosterPack({ value }: msgBuyBoosterPackParams): EncodeObject {
1314
+ try {
1315
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyBoosterPack", value: MsgBuyBoosterPack.fromPartial( value ) }
1316
+ } catch (e: any) {
1317
+ throw new Error('TxClient:MsgBuyBoosterPack: Could not create message: ' + e.message)
1318
+ }
1319
+ },
1320
+
1321
+ msgConnectZealyAccount({ value }: msgConnectZealyAccountParams): EncodeObject {
1322
+ try {
1323
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgConnectZealyAccount", value: MsgConnectZealyAccount.fromPartial( value ) }
1324
+ } catch (e: any) {
1325
+ throw new Error('TxClient:MsgConnectZealyAccount: Could not create message: ' + e.message)
1326
+ }
1327
+ },
1328
+
1329
+ msgApointMatchReporter({ value }: msgApointMatchReporterParams): EncodeObject {
1330
+ try {
1331
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgApointMatchReporter", value: MsgApointMatchReporter.fromPartial( value ) }
1332
+ } catch (e: any) {
1333
+ throw new Error('TxClient:MsgApointMatchReporter: Could not create message: ' + e.message)
1334
+ }
1335
+ },
1336
+
1337
+ msgSetProfileCard({ value }: msgSetProfileCardParams): EncodeObject {
1338
+ try {
1339
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetProfileCard", value: MsgSetProfileCard.fromPartial( value ) }
1340
+ } catch (e: any) {
1341
+ throw new Error('TxClient:MsgSetProfileCard: Could not create message: ' + e.message)
1342
+ }
1343
+ },
1344
+
1345
+ msgAddStoryToSet({ value }: msgAddStoryToSetParams): EncodeObject {
1346
+ try {
1347
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddStoryToSet", value: MsgAddStoryToSet.fromPartial( value ) }
1348
+ } catch (e: any) {
1349
+ throw new Error('TxClient:MsgAddStoryToSet: Could not create message: ' + e.message)
1350
+ }
1351
+ },
1352
+
1353
+ msgCreateCouncil({ value }: msgCreateCouncilParams): EncodeObject {
1354
+ try {
1355
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateCouncil", value: MsgCreateCouncil.fromPartial( value ) }
1356
+ } catch (e: any) {
1357
+ throw new Error('TxClient:MsgCreateCouncil: Could not create message: ' + e.message)
1358
+ }
1359
+ },
1360
+
1361
+ msgSetCardRarity({ value }: msgSetCardRarityParams): EncodeObject {
1362
+ try {
1363
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetCardRarity", value: MsgSetCardRarity.fromPartial( value ) }
1364
+ } catch (e: any) {
1365
+ throw new Error('TxClient:MsgSetCardRarity: Could not create message: ' + e.message)
1366
+ }
1367
+ },
1368
+
1369
+ msgOpenMatch({ value }: msgOpenMatchParams): EncodeObject {
1370
+ try {
1371
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgOpenMatch", value: MsgOpenMatch.fromPartial( value ) }
1372
+ } catch (e: any) {
1373
+ throw new Error('TxClient:MsgOpenMatch: Could not create message: ' + e.message)
1374
+ }
1375
+ },
1376
+
1377
+ msgTransferBoosterPack({ value }: msgTransferBoosterPackParams): EncodeObject {
1378
+ try {
1379
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgTransferBoosterPack", value: MsgTransferBoosterPack.fromPartial( value ) }
1380
+ } catch (e: any) {
1381
+ throw new Error('TxClient:MsgTransferBoosterPack: Could not create message: ' + e.message)
1382
+ }
1383
+ },
1384
+
1385
+ msgSetSetName({ value }: msgSetSetNameParams): EncodeObject {
1386
+ try {
1387
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetSetName", value: MsgSetSetName.fromPartial( value ) }
1388
+ } catch (e: any) {
1389
+ throw new Error('TxClient:MsgSetSetName: Could not create message: ' + e.message)
1390
+ }
1391
+ },
1392
+
1393
+ msgFinalizeSet({ value }: msgFinalizeSetParams): EncodeObject {
1394
+ try {
1395
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgFinalizeSet", value: MsgFinalizeSet.fromPartial( value ) }
1396
+ } catch (e: any) {
1397
+ throw new Error('TxClient:MsgFinalizeSet: Could not create message: ' + e.message)
1398
+ }
1399
+ },
1400
+
1401
+ msgSetSetStoryWriter({ value }: msgSetSetStoryWriterParams): EncodeObject {
1402
+ try {
1403
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetSetStoryWriter", value: MsgSetSetStoryWriter.fromPartial( value ) }
1404
+ } catch (e: any) {
1405
+ throw new Error('TxClient:MsgSetSetStoryWriter: Could not create message: ' + e.message)
1406
+ }
1407
+ },
1408
+
1409
+ msgChangeArtist({ value }: msgChangeArtistParams): EncodeObject {
1410
+ try {
1411
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgChangeArtist", value: MsgChangeArtist.fromPartial( value ) }
1412
+ } catch (e: any) {
1413
+ throw new Error('TxClient:MsgChangeArtist: Could not create message: ' + e.message)
1414
+ }
1415
+ },
1416
+
1417
+ msgCreateSellOffer({ value }: msgCreateSellOfferParams): EncodeObject {
1418
+ try {
1419
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateSellOffer", value: MsgCreateSellOffer.fromPartial( value ) }
1420
+ } catch (e: any) {
1421
+ throw new Error('TxClient:MsgCreateSellOffer: Could not create message: ' + e.message)
1422
+ }
1423
+ },
1424
+
1425
+ msgRevealCouncilResponse({ value }: msgRevealCouncilResponseParams): EncodeObject {
1426
+ try {
1427
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRevealCouncilResponse", value: MsgRevealCouncilResponse.fromPartial( value ) }
1428
+ } catch (e: any) {
1429
+ throw new Error('TxClient:MsgRevealCouncilResponse: Could not create message: ' + e.message)
1430
+ }
1431
+ },
1432
+
1433
+ msgRemoveCardFromSet({ value }: msgRemoveCardFromSetParams): EncodeObject {
1434
+ try {
1435
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveCardFromSet", value: MsgRemoveCardFromSet.fromPartial( value ) }
1436
+ } catch (e: any) {
1437
+ throw new Error('TxClient:MsgRemoveCardFromSet: Could not create message: ' + e.message)
1438
+ }
1439
+ },
1440
+
1441
+ msgCreateSet({ value }: msgCreateSetParams): EncodeObject {
1442
+ try {
1443
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateSet", value: MsgCreateSet.fromPartial( value ) }
1444
+ } catch (e: any) {
1445
+ throw new Error('TxClient:MsgCreateSet: Could not create message: ' + e.message)
1446
+ }
1447
+ },
1448
+
1449
+ msgCreateuser({ value }: msgCreateuserParams): EncodeObject {
1450
+ try {
1451
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateuser", value: MsgCreateuser.fromPartial( value ) }
1452
+ } catch (e: any) {
1453
+ throw new Error('TxClient:MsgCreateuser: Could not create message: ' + e.message)
1454
+ }
1455
+ },
1456
+
1457
+ msgMultiVoteCard({ value }: msgMultiVoteCardParams): EncodeObject {
1458
+ try {
1459
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgMultiVoteCard", value: MsgMultiVoteCard.fromPartial( value ) }
1460
+ } catch (e: any) {
1461
+ throw new Error('TxClient:MsgMultiVoteCard: Could not create message: ' + e.message)
1462
+ }
1463
+ },
1464
+
1465
+ msgSetUserWebsite({ value }: msgSetUserWebsiteParams): EncodeObject {
1466
+ try {
1467
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetUserWebsite", value: MsgSetUserWebsite.fromPartial( value ) }
1468
+ } catch (e: any) {
1469
+ throw new Error('TxClient:MsgSetUserWebsite: Could not create message: ' + e.message)
1470
+ }
1471
+ },
1472
+
1473
+ msgConfirmMatch({ value }: msgConfirmMatchParams): EncodeObject {
1474
+ try {
1475
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgConfirmMatch", value: MsgConfirmMatch.fromPartial( value ) }
1476
+ } catch (e: any) {
1477
+ throw new Error('TxClient:MsgConfirmMatch: Could not create message: ' + e.message)
1478
+ }
1479
+ },
1480
+
1481
+ msgEncounterClose({ value }: msgEncounterCloseParams): EncodeObject {
1482
+ try {
1483
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgEncounterClose", value: MsgEncounterClose.fromPartial( value ) }
1484
+ } catch (e: any) {
1485
+ throw new Error('TxClient:MsgEncounterClose: Could not create message: ' + e.message)
1486
+ }
1487
+ },
1488
+
1489
+ msgRemoveContributorFromSet({ value }: msgRemoveContributorFromSetParams): EncodeObject {
1490
+ try {
1491
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveContributorFromSet", value: MsgRemoveContributorFromSet.fromPartial( value ) }
1492
+ } catch (e: any) {
1493
+ throw new Error('TxClient:MsgRemoveContributorFromSet: Could not create message: ' + e.message)
1494
+ }
1495
+ },
1496
+
1497
+ msgEncounterDo({ value }: msgEncounterDoParams): EncodeObject {
1498
+ try {
1499
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgEncounterDo", value: MsgEncounterDo.fromPartial( value ) }
1500
+ } catch (e: any) {
1501
+ throw new Error('TxClient:MsgEncounterDo: Could not create message: ' + e.message)
1502
+ }
1503
+ },
1504
+
1505
+ msgAddCardToSet({ value }: msgAddCardToSetParams): EncodeObject {
1506
+ try {
1507
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddCardToSet", value: MsgAddCardToSet.fromPartial( value ) }
1508
+ } catch (e: any) {
1509
+ throw new Error('TxClient:MsgAddCardToSet: Could not create message: ' + e.message)
1510
+ }
1511
+ },
1512
+
1513
+ msgEncounterCreate({ value }: msgEncounterCreateParams): EncodeObject {
1514
+ try {
1515
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgEncounterCreate", value: MsgEncounterCreate.fromPartial( value ) }
1516
+ } catch (e: any) {
1517
+ throw new Error('TxClient:MsgEncounterCreate: Could not create message: ' + e.message)
1518
+ }
1519
+ },
1520
+
1521
+ msgSaveCardContent({ value }: msgSaveCardContentParams): EncodeObject {
1522
+ try {
1523
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSaveCardContent", value: MsgSaveCardContent.fromPartial( value ) }
1524
+ } catch (e: any) {
1525
+ throw new Error('TxClient:MsgSaveCardContent: Could not create message: ' + e.message)
1526
+ }
1527
+ },
1528
+
1529
+ msgBuyCardScheme({ value }: msgBuyCardSchemeParams): EncodeObject {
1530
+ try {
1531
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCardScheme", value: MsgBuyCardScheme.fromPartial( value ) }
1532
+ } catch (e: any) {
1533
+ throw new Error('TxClient:MsgBuyCardScheme: Could not create message: ' + e.message)
1534
+ }
1535
+ },
1536
+
1537
+ msgOpenBoosterPack({ value }: msgOpenBoosterPackParams): EncodeObject {
1538
+ try {
1539
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgOpenBoosterPack", value: MsgOpenBoosterPack.fromPartial( value ) }
1540
+ } catch (e: any) {
1541
+ throw new Error('TxClient:MsgOpenBoosterPack: Could not create message: ' + e.message)
1542
+ }
1543
+ },
1544
+
1545
+ msgReportMatch({ value }: msgReportMatchParams): EncodeObject {
1546
+ try {
1547
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgReportMatch", value: MsgReportMatch.fromPartial( value ) }
1548
+ } catch (e: any) {
1549
+ throw new Error('TxClient:MsgReportMatch: Could not create message: ' + e.message)
1550
+ }
1551
+ },
1552
+
1553
+ msgRemoveSellOffer({ value }: msgRemoveSellOfferParams): EncodeObject {
1554
+ try {
1555
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveSellOffer", value: MsgRemoveSellOffer.fromPartial( value ) }
1556
+ } catch (e: any) {
1557
+ throw new Error('TxClient:MsgRemoveSellOffer: Could not create message: ' + e.message)
1558
+ }
1559
+ },
1560
+
1561
+ msgChangeAlias({ value }: msgChangeAliasParams): EncodeObject {
1562
+ try {
1563
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgChangeAlias", value: MsgChangeAlias.fromPartial( value ) }
1564
+ } catch (e: any) {
1565
+ throw new Error('TxClient:MsgChangeAlias: Could not create message: ' + e.message)
1566
+ }
1567
+ },
1568
+
1569
+ msgTransferCard({ value }: msgTransferCardParams): EncodeObject {
1570
+ try {
1571
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgTransferCard", value: MsgTransferCard.fromPartial( value ) }
1572
+ } catch (e: any) {
1573
+ throw new Error('TxClient:MsgTransferCard: Could not create message: ' + e.message)
1574
+ }
1575
+ },
1576
+
1577
+ msgSetUserBiography({ value }: msgSetUserBiographyParams): EncodeObject {
1578
+ try {
1579
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetUserBiography", value: MsgSetUserBiography.fromPartial( value ) }
1580
+ } catch (e: any) {
1581
+ throw new Error('TxClient:MsgSetUserBiography: Could not create message: ' + e.message)
1582
+ }
1583
+ },
1584
+
1585
+ msgVoteCard({ value }: msgVoteCardParams): EncodeObject {
1586
+ try {
1587
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgVoteCard", value: MsgVoteCard.fromPartial( value ) }
1588
+ } catch (e: any) {
1589
+ throw new Error('TxClient:MsgVoteCard: Could not create message: ' + e.message)
1590
+ }
1591
+ },
1592
+
1593
+ msgBuyCard({ value }: msgBuyCardParams): EncodeObject {
1594
+ try {
1595
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCard", value: MsgBuyCard.fromPartial( value ) }
1596
+ } catch (e: any) {
1597
+ throw new Error('TxClient:MsgBuyCard: Could not create message: ' + e.message)
1598
+ }
1599
+ },
1600
+
1601
+ msgSetSetArtist({ value }: msgSetSetArtistParams): EncodeObject {
1602
+ try {
1603
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetSetArtist", value: MsgSetSetArtist.fromPartial( value ) }
1604
+ } catch (e: any) {
1605
+ throw new Error('TxClient:MsgSetSetArtist: Could not create message: ' + e.message)
1606
+ }
1607
+ },
1608
+
1609
+ msgDisinviteEarlyAccess({ value }: msgDisinviteEarlyAccessParams): EncodeObject {
1610
+ try {
1611
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgDisinviteEarlyAccess", value: MsgDisinviteEarlyAccess.fromPartial( value ) }
1612
+ } catch (e: any) {
1613
+ throw new Error('TxClient:MsgDisinviteEarlyAccess: Could not create message: ' + e.message)
1614
+ }
1615
+ },
1616
+
1617
+ msgRegisterForCouncil({ value }: msgRegisterForCouncilParams): EncodeObject {
1618
+ try {
1619
+ return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRegisterForCouncil", value: MsgRegisterForCouncil.fromPartial( value ) }
1620
+ } catch (e: any) {
1621
+ throw new Error('TxClient:MsgRegisterForCouncil: Could not create message: ' + e.message)
1622
+ }
1623
+ },
1624
+
1625
+ }
1704
1626
  };
1705
1627
 
1706
1628
  interface QueryClientOptions {
1707
- addr: string
1629
+ addr: string
1708
1630
  }
1709
1631
 
1710
- export const queryClient = ({addr: addr}: QueryClientOptions = {addr: "http://localhost:1317"}) => {
1711
- return new Api({baseURL: addr});
1632
+ export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
1633
+ return new Api({ baseURL: addr });
1712
1634
  };
1713
1635
 
1714
1636
  class SDKModule {
1715
- public query: ReturnType<typeof queryClient>;
1716
- public tx: ReturnType<typeof txClient>;
1717
- public structure: Record<string, unknown>;
1718
- public registry: Array<[string, GeneratedType]> = [];
1719
-
1720
- constructor(client: IgniteClient) {
1721
-
1722
- this.query = queryClient({addr: client.env.apiURL});
1723
- this.updateTX(client);
1724
- this.structure = {
1725
- Card: getStructure(typeCard.fromPartial({})),
1726
- TimeStamp: getStructure(typeTimeStamp.fromPartial({})),
1727
- CopyrightProposal: getStructure(typeCopyrightProposal.fromPartial({})),
1728
- WrapClearResponse: getStructure(typeWrapClearResponse.fromPartial({})),
1729
- WrapHashResponse: getStructure(typeWrapHashResponse.fromPartial({})),
1730
- Image: getStructure(typeImage.fromPartial({})),
1731
- MatchPlayer: getStructure(typeMatchPlayer.fromPartial({})),
1732
- MatchReporterProposal: getStructure(typeMatchReporterProposal.fromPartial({})),
1733
- Num: getStructure(typeNum.fromPartial({})),
1734
- Params: getStructure(typeParams.fromPartial({})),
1735
- IgnoreMatches: getStructure(typeIgnoreMatches.fromPartial({})),
1736
- IgnoreSellOffers: getStructure(typeIgnoreSellOffers.fromPartial({})),
1737
- QueryQServerResponse: getStructure(typeQueryQServerResponse.fromPartial({})),
1738
- RunningAverage: getStructure(typeRunningAverage.fromPartial({})),
1739
- Set: getStructure(typeSet.fromPartial({})),
1740
- InnerRarities: getStructure(typeInnerRarities.fromPartial({})),
1741
- AddrWithQuantity: getStructure(typeAddrWithQuantity.fromPartial({})),
1742
- SetProposal: getStructure(typeSetProposal.fromPartial({})),
1743
- EarlyAccess: getStructure(typeEarlyAccess.fromPartial({})),
1744
- BoosterPack: getStructure(typeBoosterPack.fromPartial({})),
1745
- AirDrops: getStructure(typeAirDrops.fromPartial({})),
1746
- VotingResults: getStructure(typeVotingResults.fromPartial({})),
1747
- VotingResult: getStructure(typeVotingResult.fromPartial({})),
1748
- SingleVote: getStructure(typeSingleVote.fromPartial({})),
1749
-
1750
- };
1751
- client.on('signer-changed', (signer) => {
1752
- this.updateTX(client);
1753
- })
1754
- }
1755
-
1756
- updateTX(client: IgniteClient) {
1757
- const methods = txClient({
1758
- signer: client.signer,
1759
- addr: client.env.rpcURL,
1760
- prefix: client.env.prefix ?? "cosmos",
1761
- })
1762
-
1763
- this.tx = methods;
1764
- for (let m in methods) {
1765
- this.tx[m] = methods[m].bind(this.tx);
1766
- }
1637
+ public query: ReturnType<typeof queryClient>;
1638
+ public tx: ReturnType<typeof txClient>;
1639
+ public structure: Record<string,unknown>;
1640
+ public registry: Array<[string, GeneratedType]> = [];
1641
+
1642
+ constructor(client: IgniteClient) {
1643
+
1644
+ this.query = queryClient({ addr: client.env.apiURL });
1645
+ this.updateTX(client);
1646
+ this.structure = {
1647
+ Card: getStructure(typeCard.fromPartial({})),
1648
+ TimeStamp: getStructure(typeTimeStamp.fromPartial({})),
1649
+ CopyrightProposal: getStructure(typeCopyrightProposal.fromPartial({})),
1650
+ WrapClearResponse: getStructure(typeWrapClearResponse.fromPartial({})),
1651
+ WrapHashResponse: getStructure(typeWrapHashResponse.fromPartial({})),
1652
+ EarlyAccessProposal: getStructure(typeEarlyAccessProposal.fromPartial({})),
1653
+ Encounter: getStructure(typeEncounter.fromPartial({})),
1654
+ EncounterWithImage: getStructure(typeEncounterWithImage.fromPartial({})),
1655
+ Image: getStructure(typeImage.fromPartial({})),
1656
+ MatchPlayer: getStructure(typeMatchPlayer.fromPartial({})),
1657
+ MatchReporterProposal: getStructure(typeMatchReporterProposal.fromPartial({})),
1658
+ Num: getStructure(typeNum.fromPartial({})),
1659
+ Params: getStructure(typeParams.fromPartial({})),
1660
+ IgnoreMatches: getStructure(typeIgnoreMatches.fromPartial({})),
1661
+ IgnoreSellOffers: getStructure(typeIgnoreSellOffers.fromPartial({})),
1662
+ QueryQServerResponse: getStructure(typeQueryQServerResponse.fromPartial({})),
1663
+ RunningAverage: getStructure(typeRunningAverage.fromPartial({})),
1664
+ Set: getStructure(typeSet.fromPartial({})),
1665
+ InnerRarities: getStructure(typeInnerRarities.fromPartial({})),
1666
+ AddrWithQuantity: getStructure(typeAddrWithQuantity.fromPartial({})),
1667
+ SetProposal: getStructure(typeSetProposal.fromPartial({})),
1668
+ EarlyAccess: getStructure(typeEarlyAccess.fromPartial({})),
1669
+ BoosterPack: getStructure(typeBoosterPack.fromPartial({})),
1670
+ AirDrops: getStructure(typeAirDrops.fromPartial({})),
1671
+ VotingResults: getStructure(typeVotingResults.fromPartial({})),
1672
+ VotingResult: getStructure(typeVotingResult.fromPartial({})),
1673
+ SingleVote: getStructure(typeSingleVote.fromPartial({})),
1674
+ Zealy: getStructure(typeZealy.fromPartial({})),
1675
+
1676
+ };
1677
+ client.on('signer-changed',(signer) => {
1678
+ this.updateTX(client);
1679
+ })
1680
+ }
1681
+ updateTX(client: IgniteClient) {
1682
+ const methods = txClient({
1683
+ signer: client.signer,
1684
+ addr: client.env.rpcURL,
1685
+ prefix: client.env.prefix ?? "cosmos",
1686
+ })
1687
+
1688
+ this.tx = methods;
1689
+ for (let m in methods) {
1690
+ this.tx[m] = methods[m].bind(this.tx);
1767
1691
  }
1692
+ }
1768
1693
  };
1769
1694
 
1770
1695
  const Module = (test: IgniteClient) => {
1771
- return {
1772
- module: {
1773
- DecentralCardGameCardchainCardchain: new SDKModule(test)
1774
- },
1775
- registry: msgTypes
1776
- }
1696
+ return {
1697
+ module: {
1698
+ DecentralCardGameCardchainCardchain: new SDKModule(test)
1699
+ },
1700
+ registry: msgTypes
1701
+ }
1777
1702
  }
1778
- export default Module;
1703
+ export default Module;