decentralcardgame-cardchain-client-ts 0.0.26 → 0.0.28

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