decentralcardgame-cardchain-client-ts 0.0.26-rc1 → 0.0.27

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