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