decentralcardgame-cardchain-client-ts 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DecentralCardGame.cardchain.cardchain/module.js +1044 -0
- package/DecentralCardGame.cardchain.cardchain/module.ts +493 -458
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -70
- package/DecentralCardGame.cardchain.cardchain/registry.ts +71 -69
- package/DecentralCardGame.cardchain.cardchain/rest.js +1 -1
- package/DecentralCardGame.cardchain.cardchain/rest.ts +11 -1
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +30 -6
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +33 -6
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +11 -17
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +11 -17
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +1 -217
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +1 -252
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +166 -8
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +203 -11
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +7 -65
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +8 -77
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.js +30 -10
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.js +4137 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +22 -21
- package/DecentralCardGame.cardchain.cardchain/types.ts +22 -20
- package/client.js +2 -1
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.distribution.v1beta1/module.js +24 -24
- package/cosmos.distribution.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1/module.js +31 -31
- package/cosmos.gov.v1/registry.js +4 -4
- package/cosmos.gov.v1beta1/module.js +22 -22
- package/cosmos.gov.v1beta1/registry.js +2 -2
- package/cosmos.group.v1/module.js +102 -102
- package/cosmos.group.v1/registry.js +14 -14
- package/cosmos.group.v1/rest.js +15 -0
- package/cosmos.group.v1/types/cosmos/group/v1/query.js +110 -0
- package/cosmos.staking.v1beta1/module.js +40 -40
- package/cosmos.staking.v1beta1/registry.js +8 -8
- package/cosmos.vesting.v1beta1/module.js +16 -16
- package/cosmos.vesting.v1beta1/registry.js +2 -2
- package/ibc.applications.interchain_accounts.controller.v1/rest.js +9 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.js +99 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +266 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.js +192 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.js +24 -6
- package/ibc.core.client.v1/rest.js +14 -14
- package/ibc.core.connection.v1/rest.js +14 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.js +83 -1
- package/package.json +2 -2
- package/tsconfig.json +0 -1
|
@@ -0,0 +1,1044 @@
|
|
|
1
|
+
// Generated by Ignite ignite.com/cli
|
|
2
|
+
import { SigningStargateClient } from "@cosmjs/stargate";
|
|
3
|
+
import { Registry } from "@cosmjs/proto-signing";
|
|
4
|
+
import { msgTypes } from './registry';
|
|
5
|
+
import { Api } from "./rest";
|
|
6
|
+
import { MsgCreateCouncil } from "./types/cardchain/cardchain/tx";
|
|
7
|
+
import { MsgCommitCouncilResponse } from "./types/cardchain/cardchain/tx";
|
|
8
|
+
import { MsgFinalizeCollection } from "./types/cardchain/cardchain/tx";
|
|
9
|
+
import { MsgSetCardRarity } from "./types/cardchain/cardchain/tx";
|
|
10
|
+
import { MsgAddContributorToCollection } from "./types/cardchain/cardchain/tx";
|
|
11
|
+
import { MsgTransferCard } from "./types/cardchain/cardchain/tx";
|
|
12
|
+
import { MsgSetUserBiography } from "./types/cardchain/cardchain/tx";
|
|
13
|
+
import { MsgRemoveSellOffer } from "./types/cardchain/cardchain/tx";
|
|
14
|
+
import { MsgCreateCollection } from "./types/cardchain/cardchain/tx";
|
|
15
|
+
import { MsgApointMatchReporter } from "./types/cardchain/cardchain/tx";
|
|
16
|
+
import { MsgSetProfileCard } from "./types/cardchain/cardchain/tx";
|
|
17
|
+
import { MsgDonateToCard } from "./types/cardchain/cardchain/tx";
|
|
18
|
+
import { MsgRemoveContributorFromCollection } from "./types/cardchain/cardchain/tx";
|
|
19
|
+
import { MsgAddStoryToCollection } from "./types/cardchain/cardchain/tx";
|
|
20
|
+
import { MsgSubmitCopyrightProposal } from "./types/cardchain/cardchain/tx";
|
|
21
|
+
import { MsgMultiVoteCard } from "./types/cardchain/cardchain/tx";
|
|
22
|
+
import { MsgAddArtwork } from "./types/cardchain/cardchain/tx";
|
|
23
|
+
import { MsgRegisterForCouncil } from "./types/cardchain/cardchain/tx";
|
|
24
|
+
import { MsgSetUserWebsite } from "./types/cardchain/cardchain/tx";
|
|
25
|
+
import { MsgSaveCardContent } from "./types/cardchain/cardchain/tx";
|
|
26
|
+
import { MsgOpenBoosterPack } from "./types/cardchain/cardchain/tx";
|
|
27
|
+
import { MsgReportMatch } from "./types/cardchain/cardchain/tx";
|
|
28
|
+
import { MsgBuyCollection } from "./types/cardchain/cardchain/tx";
|
|
29
|
+
import { MsgAddCardToCollection } from "./types/cardchain/cardchain/tx";
|
|
30
|
+
import { MsgSubmitCollectionProposal } from "./types/cardchain/cardchain/tx";
|
|
31
|
+
import { MsgRewokeCouncilRegistration } from "./types/cardchain/cardchain/tx";
|
|
32
|
+
import { MsgVoteCard } from "./types/cardchain/cardchain/tx";
|
|
33
|
+
import { MsgTransferBoosterPack } from "./types/cardchain/cardchain/tx";
|
|
34
|
+
import { MsgRestartCouncil } from "./types/cardchain/cardchain/tx";
|
|
35
|
+
import { MsgBuyCardScheme } from "./types/cardchain/cardchain/tx";
|
|
36
|
+
import { MsgSubmitMatchReporterProposal } from "./types/cardchain/cardchain/tx";
|
|
37
|
+
import { MsgSetCollectionStoryWriter } from "./types/cardchain/cardchain/tx";
|
|
38
|
+
import { MsgCreateuser } from "./types/cardchain/cardchain/tx";
|
|
39
|
+
import { MsgAddArtworkToCollection } from "./types/cardchain/cardchain/tx";
|
|
40
|
+
import { MsgBuyCard } from "./types/cardchain/cardchain/tx";
|
|
41
|
+
import { MsgSetCollectionArtist } from "./types/cardchain/cardchain/tx";
|
|
42
|
+
import { MsgRevealCouncilResponse } from "./types/cardchain/cardchain/tx";
|
|
43
|
+
import { MsgConfirmMatch } from "./types/cardchain/cardchain/tx";
|
|
44
|
+
import { MsgChangeArtist } from "./types/cardchain/cardchain/tx";
|
|
45
|
+
import { MsgCreateSellOffer } from "./types/cardchain/cardchain/tx";
|
|
46
|
+
import { MsgRemoveCardFromCollection } from "./types/cardchain/cardchain/tx";
|
|
47
|
+
import { Card as typeCard } from "./types";
|
|
48
|
+
import { Collection as typeCollection } from "./types";
|
|
49
|
+
import { CollectionProposal as typeCollectionProposal } from "./types";
|
|
50
|
+
import { CopyrightProposal as typeCopyrightProposal } from "./types";
|
|
51
|
+
import { WrapClearResponse as typeWrapClearResponse } from "./types";
|
|
52
|
+
import { WrapHashResponse as typeWrapHashResponse } from "./types";
|
|
53
|
+
import { Image as typeImage } from "./types";
|
|
54
|
+
import { MatchPlayer as typeMatchPlayer } from "./types";
|
|
55
|
+
import { MatchReporterProposal as typeMatchReporterProposal } from "./types";
|
|
56
|
+
import { Num as typeNum } from "./types";
|
|
57
|
+
import { Params as typeParams } from "./types";
|
|
58
|
+
import { IgnoreMatches as typeIgnoreMatches } from "./types";
|
|
59
|
+
import { IgnoreSellOffers as typeIgnoreSellOffers } from "./types";
|
|
60
|
+
import { QueryQServerResponse as typeQueryQServerResponse } from "./types";
|
|
61
|
+
import { RunningAverage as typeRunningAverage } from "./types";
|
|
62
|
+
import { SingleVote as typeSingleVote } from "./types";
|
|
63
|
+
import { BoosterPack as typeBoosterPack } from "./types";
|
|
64
|
+
import { AirDrops as typeAirDrops } from "./types";
|
|
65
|
+
import { VoteRight as typeVoteRight } from "./types";
|
|
66
|
+
import { VotingResult as typeVotingResult } from "./types";
|
|
67
|
+
import { VotingResults as typeVotingResults } from "./types";
|
|
68
|
+
export { MsgCreateCouncil, MsgCommitCouncilResponse, MsgFinalizeCollection, MsgSetCardRarity, MsgAddContributorToCollection, MsgTransferCard, MsgSetUserBiography, MsgRemoveSellOffer, MsgCreateCollection, MsgApointMatchReporter, MsgSetProfileCard, MsgDonateToCard, MsgRemoveContributorFromCollection, MsgAddStoryToCollection, MsgSubmitCopyrightProposal, MsgMultiVoteCard, MsgAddArtwork, MsgRegisterForCouncil, MsgSetUserWebsite, MsgSaveCardContent, MsgOpenBoosterPack, MsgReportMatch, MsgBuyCollection, MsgAddCardToCollection, MsgSubmitCollectionProposal, MsgRewokeCouncilRegistration, MsgVoteCard, MsgTransferBoosterPack, MsgRestartCouncil, MsgBuyCardScheme, MsgSubmitMatchReporterProposal, MsgSetCollectionStoryWriter, MsgCreateuser, MsgAddArtworkToCollection, MsgBuyCard, MsgSetCollectionArtist, MsgRevealCouncilResponse, MsgConfirmMatch, MsgChangeArtist, MsgCreateSellOffer, MsgRemoveCardFromCollection };
|
|
69
|
+
export const registry = new Registry(msgTypes);
|
|
70
|
+
function getStructure(template) {
|
|
71
|
+
const structure = { fields: [] };
|
|
72
|
+
for (let [key, value] of Object.entries(template)) {
|
|
73
|
+
let field = { name: key, type: typeof value };
|
|
74
|
+
structure.fields.push(field);
|
|
75
|
+
}
|
|
76
|
+
return structure;
|
|
77
|
+
}
|
|
78
|
+
const defaultFee = {
|
|
79
|
+
amount: [],
|
|
80
|
+
gas: "200000",
|
|
81
|
+
};
|
|
82
|
+
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
83
|
+
return {
|
|
84
|
+
async sendMsgCreateCouncil({ value, fee, memo }) {
|
|
85
|
+
if (!signer) {
|
|
86
|
+
throw new Error('TxClient:sendMsgCreateCouncil: Unable to sign Tx. Signer is not present.');
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const { address } = (await signer.getAccounts())[0];
|
|
90
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
91
|
+
let msg = this.msgCreateCouncil({ value: MsgCreateCouncil.fromPartial(value) });
|
|
92
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
throw new Error('TxClient:sendMsgCreateCouncil: Could not broadcast Tx: ' + e.message);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
async sendMsgCommitCouncilResponse({ value, fee, memo }) {
|
|
99
|
+
if (!signer) {
|
|
100
|
+
throw new Error('TxClient:sendMsgCommitCouncilResponse: Unable to sign Tx. Signer is not present.');
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const { address } = (await signer.getAccounts())[0];
|
|
104
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
105
|
+
let msg = this.msgCommitCouncilResponse({ value: MsgCommitCouncilResponse.fromPartial(value) });
|
|
106
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
throw new Error('TxClient:sendMsgCommitCouncilResponse: Could not broadcast Tx: ' + e.message);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
async sendMsgFinalizeCollection({ value, fee, memo }) {
|
|
113
|
+
if (!signer) {
|
|
114
|
+
throw new Error('TxClient:sendMsgFinalizeCollection: Unable to sign Tx. Signer is not present.');
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
const { address } = (await signer.getAccounts())[0];
|
|
118
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
119
|
+
let msg = this.msgFinalizeCollection({ value: MsgFinalizeCollection.fromPartial(value) });
|
|
120
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
throw new Error('TxClient:sendMsgFinalizeCollection: Could not broadcast Tx: ' + e.message);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
async sendMsgSetCardRarity({ value, fee, memo }) {
|
|
127
|
+
if (!signer) {
|
|
128
|
+
throw new Error('TxClient:sendMsgSetCardRarity: Unable to sign Tx. Signer is not present.');
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
const { address } = (await signer.getAccounts())[0];
|
|
132
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
133
|
+
let msg = this.msgSetCardRarity({ value: MsgSetCardRarity.fromPartial(value) });
|
|
134
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
135
|
+
}
|
|
136
|
+
catch (e) {
|
|
137
|
+
throw new Error('TxClient:sendMsgSetCardRarity: Could not broadcast Tx: ' + e.message);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
async sendMsgAddContributorToCollection({ value, fee, memo }) {
|
|
141
|
+
if (!signer) {
|
|
142
|
+
throw new Error('TxClient:sendMsgAddContributorToCollection: Unable to sign Tx. Signer is not present.');
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
const { address } = (await signer.getAccounts())[0];
|
|
146
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
147
|
+
let msg = this.msgAddContributorToCollection({ value: MsgAddContributorToCollection.fromPartial(value) });
|
|
148
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
149
|
+
}
|
|
150
|
+
catch (e) {
|
|
151
|
+
throw new Error('TxClient:sendMsgAddContributorToCollection: Could not broadcast Tx: ' + e.message);
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
async sendMsgTransferCard({ value, fee, memo }) {
|
|
155
|
+
if (!signer) {
|
|
156
|
+
throw new Error('TxClient:sendMsgTransferCard: Unable to sign Tx. Signer is not present.');
|
|
157
|
+
}
|
|
158
|
+
try {
|
|
159
|
+
const { address } = (await signer.getAccounts())[0];
|
|
160
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
161
|
+
let msg = this.msgTransferCard({ value: MsgTransferCard.fromPartial(value) });
|
|
162
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
throw new Error('TxClient:sendMsgTransferCard: Could not broadcast Tx: ' + e.message);
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
async sendMsgSetUserBiography({ value, fee, memo }) {
|
|
169
|
+
if (!signer) {
|
|
170
|
+
throw new Error('TxClient:sendMsgSetUserBiography: Unable to sign Tx. Signer is not present.');
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
const { address } = (await signer.getAccounts())[0];
|
|
174
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
175
|
+
let msg = this.msgSetUserBiography({ value: MsgSetUserBiography.fromPartial(value) });
|
|
176
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
177
|
+
}
|
|
178
|
+
catch (e) {
|
|
179
|
+
throw new Error('TxClient:sendMsgSetUserBiography: Could not broadcast Tx: ' + e.message);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
async sendMsgRemoveSellOffer({ value, fee, memo }) {
|
|
183
|
+
if (!signer) {
|
|
184
|
+
throw new Error('TxClient:sendMsgRemoveSellOffer: Unable to sign Tx. Signer is not present.');
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
const { address } = (await signer.getAccounts())[0];
|
|
188
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
189
|
+
let msg = this.msgRemoveSellOffer({ value: MsgRemoveSellOffer.fromPartial(value) });
|
|
190
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
throw new Error('TxClient:sendMsgRemoveSellOffer: Could not broadcast Tx: ' + e.message);
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
async sendMsgCreateCollection({ value, fee, memo }) {
|
|
197
|
+
if (!signer) {
|
|
198
|
+
throw new Error('TxClient:sendMsgCreateCollection: Unable to sign Tx. Signer is not present.');
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const { address } = (await signer.getAccounts())[0];
|
|
202
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
203
|
+
let msg = this.msgCreateCollection({ value: MsgCreateCollection.fromPartial(value) });
|
|
204
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
205
|
+
}
|
|
206
|
+
catch (e) {
|
|
207
|
+
throw new Error('TxClient:sendMsgCreateCollection: Could not broadcast Tx: ' + e.message);
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
async sendMsgApointMatchReporter({ value, fee, memo }) {
|
|
211
|
+
if (!signer) {
|
|
212
|
+
throw new Error('TxClient:sendMsgApointMatchReporter: Unable to sign Tx. Signer is not present.');
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
const { address } = (await signer.getAccounts())[0];
|
|
216
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
217
|
+
let msg = this.msgApointMatchReporter({ value: MsgApointMatchReporter.fromPartial(value) });
|
|
218
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
throw new Error('TxClient:sendMsgApointMatchReporter: Could not broadcast Tx: ' + e.message);
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
async sendMsgSetProfileCard({ value, fee, memo }) {
|
|
225
|
+
if (!signer) {
|
|
226
|
+
throw new Error('TxClient:sendMsgSetProfileCard: Unable to sign Tx. Signer is not present.');
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
const { address } = (await signer.getAccounts())[0];
|
|
230
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
231
|
+
let msg = this.msgSetProfileCard({ value: MsgSetProfileCard.fromPartial(value) });
|
|
232
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
233
|
+
}
|
|
234
|
+
catch (e) {
|
|
235
|
+
throw new Error('TxClient:sendMsgSetProfileCard: Could not broadcast Tx: ' + e.message);
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
async sendMsgDonateToCard({ value, fee, memo }) {
|
|
239
|
+
if (!signer) {
|
|
240
|
+
throw new Error('TxClient:sendMsgDonateToCard: Unable to sign Tx. Signer is not present.');
|
|
241
|
+
}
|
|
242
|
+
try {
|
|
243
|
+
const { address } = (await signer.getAccounts())[0];
|
|
244
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
245
|
+
let msg = this.msgDonateToCard({ value: MsgDonateToCard.fromPartial(value) });
|
|
246
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
247
|
+
}
|
|
248
|
+
catch (e) {
|
|
249
|
+
throw new Error('TxClient:sendMsgDonateToCard: Could not broadcast Tx: ' + e.message);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
async sendMsgRemoveContributorFromCollection({ value, fee, memo }) {
|
|
253
|
+
if (!signer) {
|
|
254
|
+
throw new Error('TxClient:sendMsgRemoveContributorFromCollection: Unable to sign Tx. Signer is not present.');
|
|
255
|
+
}
|
|
256
|
+
try {
|
|
257
|
+
const { address } = (await signer.getAccounts())[0];
|
|
258
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
259
|
+
let msg = this.msgRemoveContributorFromCollection({ value: MsgRemoveContributorFromCollection.fromPartial(value) });
|
|
260
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
261
|
+
}
|
|
262
|
+
catch (e) {
|
|
263
|
+
throw new Error('TxClient:sendMsgRemoveContributorFromCollection: Could not broadcast Tx: ' + e.message);
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
async sendMsgAddStoryToCollection({ value, fee, memo }) {
|
|
267
|
+
if (!signer) {
|
|
268
|
+
throw new Error('TxClient:sendMsgAddStoryToCollection: Unable to sign Tx. Signer is not present.');
|
|
269
|
+
}
|
|
270
|
+
try {
|
|
271
|
+
const { address } = (await signer.getAccounts())[0];
|
|
272
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
273
|
+
let msg = this.msgAddStoryToCollection({ value: MsgAddStoryToCollection.fromPartial(value) });
|
|
274
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
275
|
+
}
|
|
276
|
+
catch (e) {
|
|
277
|
+
throw new Error('TxClient:sendMsgAddStoryToCollection: Could not broadcast Tx: ' + e.message);
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
async sendMsgSubmitCopyrightProposal({ value, fee, memo }) {
|
|
281
|
+
if (!signer) {
|
|
282
|
+
throw new Error('TxClient:sendMsgSubmitCopyrightProposal: Unable to sign Tx. Signer is not present.');
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
const { address } = (await signer.getAccounts())[0];
|
|
286
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
287
|
+
let msg = this.msgSubmitCopyrightProposal({ value: MsgSubmitCopyrightProposal.fromPartial(value) });
|
|
288
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
289
|
+
}
|
|
290
|
+
catch (e) {
|
|
291
|
+
throw new Error('TxClient:sendMsgSubmitCopyrightProposal: Could not broadcast Tx: ' + e.message);
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
async sendMsgMultiVoteCard({ value, fee, memo }) {
|
|
295
|
+
if (!signer) {
|
|
296
|
+
throw new Error('TxClient:sendMsgMultiVoteCard: Unable to sign Tx. Signer is not present.');
|
|
297
|
+
}
|
|
298
|
+
try {
|
|
299
|
+
const { address } = (await signer.getAccounts())[0];
|
|
300
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
301
|
+
let msg = this.msgMultiVoteCard({ value: MsgMultiVoteCard.fromPartial(value) });
|
|
302
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
303
|
+
}
|
|
304
|
+
catch (e) {
|
|
305
|
+
throw new Error('TxClient:sendMsgMultiVoteCard: Could not broadcast Tx: ' + e.message);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
async sendMsgAddArtwork({ value, fee, memo }) {
|
|
309
|
+
if (!signer) {
|
|
310
|
+
throw new Error('TxClient:sendMsgAddArtwork: Unable to sign Tx. Signer is not present.');
|
|
311
|
+
}
|
|
312
|
+
try {
|
|
313
|
+
const { address } = (await signer.getAccounts())[0];
|
|
314
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
315
|
+
let msg = this.msgAddArtwork({ value: MsgAddArtwork.fromPartial(value) });
|
|
316
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
317
|
+
}
|
|
318
|
+
catch (e) {
|
|
319
|
+
throw new Error('TxClient:sendMsgAddArtwork: Could not broadcast Tx: ' + e.message);
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
async sendMsgRegisterForCouncil({ value, fee, memo }) {
|
|
323
|
+
if (!signer) {
|
|
324
|
+
throw new Error('TxClient:sendMsgRegisterForCouncil: Unable to sign Tx. Signer is not present.');
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
327
|
+
const { address } = (await signer.getAccounts())[0];
|
|
328
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
329
|
+
let msg = this.msgRegisterForCouncil({ value: MsgRegisterForCouncil.fromPartial(value) });
|
|
330
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
331
|
+
}
|
|
332
|
+
catch (e) {
|
|
333
|
+
throw new Error('TxClient:sendMsgRegisterForCouncil: Could not broadcast Tx: ' + e.message);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
async sendMsgSetUserWebsite({ value, fee, memo }) {
|
|
337
|
+
if (!signer) {
|
|
338
|
+
throw new Error('TxClient:sendMsgSetUserWebsite: Unable to sign Tx. Signer is not present.');
|
|
339
|
+
}
|
|
340
|
+
try {
|
|
341
|
+
const { address } = (await signer.getAccounts())[0];
|
|
342
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
343
|
+
let msg = this.msgSetUserWebsite({ value: MsgSetUserWebsite.fromPartial(value) });
|
|
344
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
345
|
+
}
|
|
346
|
+
catch (e) {
|
|
347
|
+
throw new Error('TxClient:sendMsgSetUserWebsite: Could not broadcast Tx: ' + e.message);
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
async sendMsgSaveCardContent({ value, fee, memo }) {
|
|
351
|
+
if (!signer) {
|
|
352
|
+
throw new Error('TxClient:sendMsgSaveCardContent: Unable to sign Tx. Signer is not present.');
|
|
353
|
+
}
|
|
354
|
+
try {
|
|
355
|
+
const { address } = (await signer.getAccounts())[0];
|
|
356
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
357
|
+
let msg = this.msgSaveCardContent({ value: MsgSaveCardContent.fromPartial(value) });
|
|
358
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
359
|
+
}
|
|
360
|
+
catch (e) {
|
|
361
|
+
throw new Error('TxClient:sendMsgSaveCardContent: Could not broadcast Tx: ' + e.message);
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
async sendMsgOpenBoosterPack({ value, fee, memo }) {
|
|
365
|
+
if (!signer) {
|
|
366
|
+
throw new Error('TxClient:sendMsgOpenBoosterPack: Unable to sign Tx. Signer is not present.');
|
|
367
|
+
}
|
|
368
|
+
try {
|
|
369
|
+
const { address } = (await signer.getAccounts())[0];
|
|
370
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
371
|
+
let msg = this.msgOpenBoosterPack({ value: MsgOpenBoosterPack.fromPartial(value) });
|
|
372
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
373
|
+
}
|
|
374
|
+
catch (e) {
|
|
375
|
+
throw new Error('TxClient:sendMsgOpenBoosterPack: Could not broadcast Tx: ' + e.message);
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
async sendMsgReportMatch({ value, fee, memo }) {
|
|
379
|
+
if (!signer) {
|
|
380
|
+
throw new Error('TxClient:sendMsgReportMatch: Unable to sign Tx. Signer is not present.');
|
|
381
|
+
}
|
|
382
|
+
try {
|
|
383
|
+
const { address } = (await signer.getAccounts())[0];
|
|
384
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
385
|
+
let msg = this.msgReportMatch({ value: MsgReportMatch.fromPartial(value) });
|
|
386
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
387
|
+
}
|
|
388
|
+
catch (e) {
|
|
389
|
+
throw new Error('TxClient:sendMsgReportMatch: Could not broadcast Tx: ' + e.message);
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
async sendMsgBuyCollection({ value, fee, memo }) {
|
|
393
|
+
if (!signer) {
|
|
394
|
+
throw new Error('TxClient:sendMsgBuyCollection: Unable to sign Tx. Signer is not present.');
|
|
395
|
+
}
|
|
396
|
+
try {
|
|
397
|
+
const { address } = (await signer.getAccounts())[0];
|
|
398
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
399
|
+
let msg = this.msgBuyCollection({ value: MsgBuyCollection.fromPartial(value) });
|
|
400
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
401
|
+
}
|
|
402
|
+
catch (e) {
|
|
403
|
+
throw new Error('TxClient:sendMsgBuyCollection: Could not broadcast Tx: ' + e.message);
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
async sendMsgAddCardToCollection({ value, fee, memo }) {
|
|
407
|
+
if (!signer) {
|
|
408
|
+
throw new Error('TxClient:sendMsgAddCardToCollection: Unable to sign Tx. Signer is not present.');
|
|
409
|
+
}
|
|
410
|
+
try {
|
|
411
|
+
const { address } = (await signer.getAccounts())[0];
|
|
412
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
413
|
+
let msg = this.msgAddCardToCollection({ value: MsgAddCardToCollection.fromPartial(value) });
|
|
414
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
415
|
+
}
|
|
416
|
+
catch (e) {
|
|
417
|
+
throw new Error('TxClient:sendMsgAddCardToCollection: Could not broadcast Tx: ' + e.message);
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
async sendMsgSubmitCollectionProposal({ value, fee, memo }) {
|
|
421
|
+
if (!signer) {
|
|
422
|
+
throw new Error('TxClient:sendMsgSubmitCollectionProposal: Unable to sign Tx. Signer is not present.');
|
|
423
|
+
}
|
|
424
|
+
try {
|
|
425
|
+
const { address } = (await signer.getAccounts())[0];
|
|
426
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
427
|
+
let msg = this.msgSubmitCollectionProposal({ value: MsgSubmitCollectionProposal.fromPartial(value) });
|
|
428
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
429
|
+
}
|
|
430
|
+
catch (e) {
|
|
431
|
+
throw new Error('TxClient:sendMsgSubmitCollectionProposal: Could not broadcast Tx: ' + e.message);
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
async sendMsgRewokeCouncilRegistration({ value, fee, memo }) {
|
|
435
|
+
if (!signer) {
|
|
436
|
+
throw new Error('TxClient:sendMsgRewokeCouncilRegistration: Unable to sign Tx. Signer is not present.');
|
|
437
|
+
}
|
|
438
|
+
try {
|
|
439
|
+
const { address } = (await signer.getAccounts())[0];
|
|
440
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
441
|
+
let msg = this.msgRewokeCouncilRegistration({ value: MsgRewokeCouncilRegistration.fromPartial(value) });
|
|
442
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
443
|
+
}
|
|
444
|
+
catch (e) {
|
|
445
|
+
throw new Error('TxClient:sendMsgRewokeCouncilRegistration: Could not broadcast Tx: ' + e.message);
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
async sendMsgVoteCard({ value, fee, memo }) {
|
|
449
|
+
if (!signer) {
|
|
450
|
+
throw new Error('TxClient:sendMsgVoteCard: Unable to sign Tx. Signer is not present.');
|
|
451
|
+
}
|
|
452
|
+
try {
|
|
453
|
+
const { address } = (await signer.getAccounts())[0];
|
|
454
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
455
|
+
let msg = this.msgVoteCard({ value: MsgVoteCard.fromPartial(value) });
|
|
456
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
457
|
+
}
|
|
458
|
+
catch (e) {
|
|
459
|
+
throw new Error('TxClient:sendMsgVoteCard: Could not broadcast Tx: ' + e.message);
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
async sendMsgTransferBoosterPack({ value, fee, memo }) {
|
|
463
|
+
if (!signer) {
|
|
464
|
+
throw new Error('TxClient:sendMsgTransferBoosterPack: Unable to sign Tx. Signer is not present.');
|
|
465
|
+
}
|
|
466
|
+
try {
|
|
467
|
+
const { address } = (await signer.getAccounts())[0];
|
|
468
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
469
|
+
let msg = this.msgTransferBoosterPack({ value: MsgTransferBoosterPack.fromPartial(value) });
|
|
470
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
471
|
+
}
|
|
472
|
+
catch (e) {
|
|
473
|
+
throw new Error('TxClient:sendMsgTransferBoosterPack: Could not broadcast Tx: ' + e.message);
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
async sendMsgRestartCouncil({ value, fee, memo }) {
|
|
477
|
+
if (!signer) {
|
|
478
|
+
throw new Error('TxClient:sendMsgRestartCouncil: Unable to sign Tx. Signer is not present.');
|
|
479
|
+
}
|
|
480
|
+
try {
|
|
481
|
+
const { address } = (await signer.getAccounts())[0];
|
|
482
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
483
|
+
let msg = this.msgRestartCouncil({ value: MsgRestartCouncil.fromPartial(value) });
|
|
484
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
485
|
+
}
|
|
486
|
+
catch (e) {
|
|
487
|
+
throw new Error('TxClient:sendMsgRestartCouncil: Could not broadcast Tx: ' + e.message);
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
async sendMsgBuyCardScheme({ value, fee, memo }) {
|
|
491
|
+
if (!signer) {
|
|
492
|
+
throw new Error('TxClient:sendMsgBuyCardScheme: Unable to sign Tx. Signer is not present.');
|
|
493
|
+
}
|
|
494
|
+
try {
|
|
495
|
+
const { address } = (await signer.getAccounts())[0];
|
|
496
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
497
|
+
let msg = this.msgBuyCardScheme({ value: MsgBuyCardScheme.fromPartial(value) });
|
|
498
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
499
|
+
}
|
|
500
|
+
catch (e) {
|
|
501
|
+
throw new Error('TxClient:sendMsgBuyCardScheme: Could not broadcast Tx: ' + e.message);
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
async sendMsgSubmitMatchReporterProposal({ value, fee, memo }) {
|
|
505
|
+
if (!signer) {
|
|
506
|
+
throw new Error('TxClient:sendMsgSubmitMatchReporterProposal: Unable to sign Tx. Signer is not present.');
|
|
507
|
+
}
|
|
508
|
+
try {
|
|
509
|
+
const { address } = (await signer.getAccounts())[0];
|
|
510
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
511
|
+
let msg = this.msgSubmitMatchReporterProposal({ value: MsgSubmitMatchReporterProposal.fromPartial(value) });
|
|
512
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
513
|
+
}
|
|
514
|
+
catch (e) {
|
|
515
|
+
throw new Error('TxClient:sendMsgSubmitMatchReporterProposal: Could not broadcast Tx: ' + e.message);
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
async sendMsgSetCollectionStoryWriter({ value, fee, memo }) {
|
|
519
|
+
if (!signer) {
|
|
520
|
+
throw new Error('TxClient:sendMsgSetCollectionStoryWriter: Unable to sign Tx. Signer is not present.');
|
|
521
|
+
}
|
|
522
|
+
try {
|
|
523
|
+
const { address } = (await signer.getAccounts())[0];
|
|
524
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
525
|
+
let msg = this.msgSetCollectionStoryWriter({ value: MsgSetCollectionStoryWriter.fromPartial(value) });
|
|
526
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
527
|
+
}
|
|
528
|
+
catch (e) {
|
|
529
|
+
throw new Error('TxClient:sendMsgSetCollectionStoryWriter: Could not broadcast Tx: ' + e.message);
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
async sendMsgCreateuser({ value, fee, memo }) {
|
|
533
|
+
if (!signer) {
|
|
534
|
+
throw new Error('TxClient:sendMsgCreateuser: Unable to sign Tx. Signer is not present.');
|
|
535
|
+
}
|
|
536
|
+
try {
|
|
537
|
+
const { address } = (await signer.getAccounts())[0];
|
|
538
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
539
|
+
let msg = this.msgCreateuser({ value: MsgCreateuser.fromPartial(value) });
|
|
540
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
541
|
+
}
|
|
542
|
+
catch (e) {
|
|
543
|
+
throw new Error('TxClient:sendMsgCreateuser: Could not broadcast Tx: ' + e.message);
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
async sendMsgAddArtworkToCollection({ value, fee, memo }) {
|
|
547
|
+
if (!signer) {
|
|
548
|
+
throw new Error('TxClient:sendMsgAddArtworkToCollection: Unable to sign Tx. Signer is not present.');
|
|
549
|
+
}
|
|
550
|
+
try {
|
|
551
|
+
const { address } = (await signer.getAccounts())[0];
|
|
552
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
553
|
+
let msg = this.msgAddArtworkToCollection({ value: MsgAddArtworkToCollection.fromPartial(value) });
|
|
554
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
555
|
+
}
|
|
556
|
+
catch (e) {
|
|
557
|
+
throw new Error('TxClient:sendMsgAddArtworkToCollection: Could not broadcast Tx: ' + e.message);
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
async sendMsgBuyCard({ value, fee, memo }) {
|
|
561
|
+
if (!signer) {
|
|
562
|
+
throw new Error('TxClient:sendMsgBuyCard: Unable to sign Tx. Signer is not present.');
|
|
563
|
+
}
|
|
564
|
+
try {
|
|
565
|
+
const { address } = (await signer.getAccounts())[0];
|
|
566
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
567
|
+
let msg = this.msgBuyCard({ value: MsgBuyCard.fromPartial(value) });
|
|
568
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
569
|
+
}
|
|
570
|
+
catch (e) {
|
|
571
|
+
throw new Error('TxClient:sendMsgBuyCard: Could not broadcast Tx: ' + e.message);
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
async sendMsgSetCollectionArtist({ value, fee, memo }) {
|
|
575
|
+
if (!signer) {
|
|
576
|
+
throw new Error('TxClient:sendMsgSetCollectionArtist: Unable to sign Tx. Signer is not present.');
|
|
577
|
+
}
|
|
578
|
+
try {
|
|
579
|
+
const { address } = (await signer.getAccounts())[0];
|
|
580
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
581
|
+
let msg = this.msgSetCollectionArtist({ value: MsgSetCollectionArtist.fromPartial(value) });
|
|
582
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
583
|
+
}
|
|
584
|
+
catch (e) {
|
|
585
|
+
throw new Error('TxClient:sendMsgSetCollectionArtist: Could not broadcast Tx: ' + e.message);
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
async sendMsgRevealCouncilResponse({ value, fee, memo }) {
|
|
589
|
+
if (!signer) {
|
|
590
|
+
throw new Error('TxClient:sendMsgRevealCouncilResponse: Unable to sign Tx. Signer is not present.');
|
|
591
|
+
}
|
|
592
|
+
try {
|
|
593
|
+
const { address } = (await signer.getAccounts())[0];
|
|
594
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
595
|
+
let msg = this.msgRevealCouncilResponse({ value: MsgRevealCouncilResponse.fromPartial(value) });
|
|
596
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
597
|
+
}
|
|
598
|
+
catch (e) {
|
|
599
|
+
throw new Error('TxClient:sendMsgRevealCouncilResponse: Could not broadcast Tx: ' + e.message);
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
async sendMsgConfirmMatch({ value, fee, memo }) {
|
|
603
|
+
if (!signer) {
|
|
604
|
+
throw new Error('TxClient:sendMsgConfirmMatch: Unable to sign Tx. Signer is not present.');
|
|
605
|
+
}
|
|
606
|
+
try {
|
|
607
|
+
const { address } = (await signer.getAccounts())[0];
|
|
608
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
609
|
+
let msg = this.msgConfirmMatch({ value: MsgConfirmMatch.fromPartial(value) });
|
|
610
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
611
|
+
}
|
|
612
|
+
catch (e) {
|
|
613
|
+
throw new Error('TxClient:sendMsgConfirmMatch: Could not broadcast Tx: ' + e.message);
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
async sendMsgChangeArtist({ value, fee, memo }) {
|
|
617
|
+
if (!signer) {
|
|
618
|
+
throw new Error('TxClient:sendMsgChangeArtist: Unable to sign Tx. Signer is not present.');
|
|
619
|
+
}
|
|
620
|
+
try {
|
|
621
|
+
const { address } = (await signer.getAccounts())[0];
|
|
622
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
623
|
+
let msg = this.msgChangeArtist({ value: MsgChangeArtist.fromPartial(value) });
|
|
624
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
625
|
+
}
|
|
626
|
+
catch (e) {
|
|
627
|
+
throw new Error('TxClient:sendMsgChangeArtist: Could not broadcast Tx: ' + e.message);
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
async sendMsgCreateSellOffer({ value, fee, memo }) {
|
|
631
|
+
if (!signer) {
|
|
632
|
+
throw new Error('TxClient:sendMsgCreateSellOffer: Unable to sign Tx. Signer is not present.');
|
|
633
|
+
}
|
|
634
|
+
try {
|
|
635
|
+
const { address } = (await signer.getAccounts())[0];
|
|
636
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
637
|
+
let msg = this.msgCreateSellOffer({ value: MsgCreateSellOffer.fromPartial(value) });
|
|
638
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
639
|
+
}
|
|
640
|
+
catch (e) {
|
|
641
|
+
throw new Error('TxClient:sendMsgCreateSellOffer: Could not broadcast Tx: ' + e.message);
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
async sendMsgRemoveCardFromCollection({ value, fee, memo }) {
|
|
645
|
+
if (!signer) {
|
|
646
|
+
throw new Error('TxClient:sendMsgRemoveCardFromCollection: Unable to sign Tx. Signer is not present.');
|
|
647
|
+
}
|
|
648
|
+
try {
|
|
649
|
+
const { address } = (await signer.getAccounts())[0];
|
|
650
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
651
|
+
let msg = this.msgRemoveCardFromCollection({ value: MsgRemoveCardFromCollection.fromPartial(value) });
|
|
652
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
653
|
+
}
|
|
654
|
+
catch (e) {
|
|
655
|
+
throw new Error('TxClient:sendMsgRemoveCardFromCollection: Could not broadcast Tx: ' + e.message);
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
msgCreateCouncil({ value }) {
|
|
659
|
+
try {
|
|
660
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateCouncil", value: MsgCreateCouncil.fromPartial(value) };
|
|
661
|
+
}
|
|
662
|
+
catch (e) {
|
|
663
|
+
throw new Error('TxClient:MsgCreateCouncil: Could not create message: ' + e.message);
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
msgCommitCouncilResponse({ value }) {
|
|
667
|
+
try {
|
|
668
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCommitCouncilResponse", value: MsgCommitCouncilResponse.fromPartial(value) };
|
|
669
|
+
}
|
|
670
|
+
catch (e) {
|
|
671
|
+
throw new Error('TxClient:MsgCommitCouncilResponse: Could not create message: ' + e.message);
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
msgFinalizeCollection({ value }) {
|
|
675
|
+
try {
|
|
676
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgFinalizeCollection", value: MsgFinalizeCollection.fromPartial(value) };
|
|
677
|
+
}
|
|
678
|
+
catch (e) {
|
|
679
|
+
throw new Error('TxClient:MsgFinalizeCollection: Could not create message: ' + e.message);
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
msgSetCardRarity({ value }) {
|
|
683
|
+
try {
|
|
684
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetCardRarity", value: MsgSetCardRarity.fromPartial(value) };
|
|
685
|
+
}
|
|
686
|
+
catch (e) {
|
|
687
|
+
throw new Error('TxClient:MsgSetCardRarity: Could not create message: ' + e.message);
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
msgAddContributorToCollection({ value }) {
|
|
691
|
+
try {
|
|
692
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddContributorToCollection", value: MsgAddContributorToCollection.fromPartial(value) };
|
|
693
|
+
}
|
|
694
|
+
catch (e) {
|
|
695
|
+
throw new Error('TxClient:MsgAddContributorToCollection: Could not create message: ' + e.message);
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
msgTransferCard({ value }) {
|
|
699
|
+
try {
|
|
700
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgTransferCard", value: MsgTransferCard.fromPartial(value) };
|
|
701
|
+
}
|
|
702
|
+
catch (e) {
|
|
703
|
+
throw new Error('TxClient:MsgTransferCard: Could not create message: ' + e.message);
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
msgSetUserBiography({ value }) {
|
|
707
|
+
try {
|
|
708
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetUserBiography", value: MsgSetUserBiography.fromPartial(value) };
|
|
709
|
+
}
|
|
710
|
+
catch (e) {
|
|
711
|
+
throw new Error('TxClient:MsgSetUserBiography: Could not create message: ' + e.message);
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
msgRemoveSellOffer({ value }) {
|
|
715
|
+
try {
|
|
716
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveSellOffer", value: MsgRemoveSellOffer.fromPartial(value) };
|
|
717
|
+
}
|
|
718
|
+
catch (e) {
|
|
719
|
+
throw new Error('TxClient:MsgRemoveSellOffer: Could not create message: ' + e.message);
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
msgCreateCollection({ value }) {
|
|
723
|
+
try {
|
|
724
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateCollection", value: MsgCreateCollection.fromPartial(value) };
|
|
725
|
+
}
|
|
726
|
+
catch (e) {
|
|
727
|
+
throw new Error('TxClient:MsgCreateCollection: Could not create message: ' + e.message);
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
msgApointMatchReporter({ value }) {
|
|
731
|
+
try {
|
|
732
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgApointMatchReporter", value: MsgApointMatchReporter.fromPartial(value) };
|
|
733
|
+
}
|
|
734
|
+
catch (e) {
|
|
735
|
+
throw new Error('TxClient:MsgApointMatchReporter: Could not create message: ' + e.message);
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
msgSetProfileCard({ value }) {
|
|
739
|
+
try {
|
|
740
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetProfileCard", value: MsgSetProfileCard.fromPartial(value) };
|
|
741
|
+
}
|
|
742
|
+
catch (e) {
|
|
743
|
+
throw new Error('TxClient:MsgSetProfileCard: Could not create message: ' + e.message);
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
msgDonateToCard({ value }) {
|
|
747
|
+
try {
|
|
748
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgDonateToCard", value: MsgDonateToCard.fromPartial(value) };
|
|
749
|
+
}
|
|
750
|
+
catch (e) {
|
|
751
|
+
throw new Error('TxClient:MsgDonateToCard: Could not create message: ' + e.message);
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
msgRemoveContributorFromCollection({ value }) {
|
|
755
|
+
try {
|
|
756
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveContributorFromCollection", value: MsgRemoveContributorFromCollection.fromPartial(value) };
|
|
757
|
+
}
|
|
758
|
+
catch (e) {
|
|
759
|
+
throw new Error('TxClient:MsgRemoveContributorFromCollection: Could not create message: ' + e.message);
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
msgAddStoryToCollection({ value }) {
|
|
763
|
+
try {
|
|
764
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddStoryToCollection", value: MsgAddStoryToCollection.fromPartial(value) };
|
|
765
|
+
}
|
|
766
|
+
catch (e) {
|
|
767
|
+
throw new Error('TxClient:MsgAddStoryToCollection: Could not create message: ' + e.message);
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
msgSubmitCopyrightProposal({ value }) {
|
|
771
|
+
try {
|
|
772
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSubmitCopyrightProposal", value: MsgSubmitCopyrightProposal.fromPartial(value) };
|
|
773
|
+
}
|
|
774
|
+
catch (e) {
|
|
775
|
+
throw new Error('TxClient:MsgSubmitCopyrightProposal: Could not create message: ' + e.message);
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
msgMultiVoteCard({ value }) {
|
|
779
|
+
try {
|
|
780
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgMultiVoteCard", value: MsgMultiVoteCard.fromPartial(value) };
|
|
781
|
+
}
|
|
782
|
+
catch (e) {
|
|
783
|
+
throw new Error('TxClient:MsgMultiVoteCard: Could not create message: ' + e.message);
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
msgAddArtwork({ value }) {
|
|
787
|
+
try {
|
|
788
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddArtwork", value: MsgAddArtwork.fromPartial(value) };
|
|
789
|
+
}
|
|
790
|
+
catch (e) {
|
|
791
|
+
throw new Error('TxClient:MsgAddArtwork: Could not create message: ' + e.message);
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
msgRegisterForCouncil({ value }) {
|
|
795
|
+
try {
|
|
796
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRegisterForCouncil", value: MsgRegisterForCouncil.fromPartial(value) };
|
|
797
|
+
}
|
|
798
|
+
catch (e) {
|
|
799
|
+
throw new Error('TxClient:MsgRegisterForCouncil: Could not create message: ' + e.message);
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
msgSetUserWebsite({ value }) {
|
|
803
|
+
try {
|
|
804
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetUserWebsite", value: MsgSetUserWebsite.fromPartial(value) };
|
|
805
|
+
}
|
|
806
|
+
catch (e) {
|
|
807
|
+
throw new Error('TxClient:MsgSetUserWebsite: Could not create message: ' + e.message);
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
msgSaveCardContent({ value }) {
|
|
811
|
+
try {
|
|
812
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSaveCardContent", value: MsgSaveCardContent.fromPartial(value) };
|
|
813
|
+
}
|
|
814
|
+
catch (e) {
|
|
815
|
+
throw new Error('TxClient:MsgSaveCardContent: Could not create message: ' + e.message);
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
msgOpenBoosterPack({ value }) {
|
|
819
|
+
try {
|
|
820
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgOpenBoosterPack", value: MsgOpenBoosterPack.fromPartial(value) };
|
|
821
|
+
}
|
|
822
|
+
catch (e) {
|
|
823
|
+
throw new Error('TxClient:MsgOpenBoosterPack: Could not create message: ' + e.message);
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
msgReportMatch({ value }) {
|
|
827
|
+
try {
|
|
828
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgReportMatch", value: MsgReportMatch.fromPartial(value) };
|
|
829
|
+
}
|
|
830
|
+
catch (e) {
|
|
831
|
+
throw new Error('TxClient:MsgReportMatch: Could not create message: ' + e.message);
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
msgBuyCollection({ value }) {
|
|
835
|
+
try {
|
|
836
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCollection", value: MsgBuyCollection.fromPartial(value) };
|
|
837
|
+
}
|
|
838
|
+
catch (e) {
|
|
839
|
+
throw new Error('TxClient:MsgBuyCollection: Could not create message: ' + e.message);
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
msgAddCardToCollection({ value }) {
|
|
843
|
+
try {
|
|
844
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddCardToCollection", value: MsgAddCardToCollection.fromPartial(value) };
|
|
845
|
+
}
|
|
846
|
+
catch (e) {
|
|
847
|
+
throw new Error('TxClient:MsgAddCardToCollection: Could not create message: ' + e.message);
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
msgSubmitCollectionProposal({ value }) {
|
|
851
|
+
try {
|
|
852
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSubmitCollectionProposal", value: MsgSubmitCollectionProposal.fromPartial(value) };
|
|
853
|
+
}
|
|
854
|
+
catch (e) {
|
|
855
|
+
throw new Error('TxClient:MsgSubmitCollectionProposal: Could not create message: ' + e.message);
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
msgRewokeCouncilRegistration({ value }) {
|
|
859
|
+
try {
|
|
860
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRewokeCouncilRegistration", value: MsgRewokeCouncilRegistration.fromPartial(value) };
|
|
861
|
+
}
|
|
862
|
+
catch (e) {
|
|
863
|
+
throw new Error('TxClient:MsgRewokeCouncilRegistration: Could not create message: ' + e.message);
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
msgVoteCard({ value }) {
|
|
867
|
+
try {
|
|
868
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgVoteCard", value: MsgVoteCard.fromPartial(value) };
|
|
869
|
+
}
|
|
870
|
+
catch (e) {
|
|
871
|
+
throw new Error('TxClient:MsgVoteCard: Could not create message: ' + e.message);
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
msgTransferBoosterPack({ value }) {
|
|
875
|
+
try {
|
|
876
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgTransferBoosterPack", value: MsgTransferBoosterPack.fromPartial(value) };
|
|
877
|
+
}
|
|
878
|
+
catch (e) {
|
|
879
|
+
throw new Error('TxClient:MsgTransferBoosterPack: Could not create message: ' + e.message);
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
msgRestartCouncil({ value }) {
|
|
883
|
+
try {
|
|
884
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRestartCouncil", value: MsgRestartCouncil.fromPartial(value) };
|
|
885
|
+
}
|
|
886
|
+
catch (e) {
|
|
887
|
+
throw new Error('TxClient:MsgRestartCouncil: Could not create message: ' + e.message);
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
msgBuyCardScheme({ value }) {
|
|
891
|
+
try {
|
|
892
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCardScheme", value: MsgBuyCardScheme.fromPartial(value) };
|
|
893
|
+
}
|
|
894
|
+
catch (e) {
|
|
895
|
+
throw new Error('TxClient:MsgBuyCardScheme: Could not create message: ' + e.message);
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
msgSubmitMatchReporterProposal({ value }) {
|
|
899
|
+
try {
|
|
900
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSubmitMatchReporterProposal", value: MsgSubmitMatchReporterProposal.fromPartial(value) };
|
|
901
|
+
}
|
|
902
|
+
catch (e) {
|
|
903
|
+
throw new Error('TxClient:MsgSubmitMatchReporterProposal: Could not create message: ' + e.message);
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
msgSetCollectionStoryWriter({ value }) {
|
|
907
|
+
try {
|
|
908
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetCollectionStoryWriter", value: MsgSetCollectionStoryWriter.fromPartial(value) };
|
|
909
|
+
}
|
|
910
|
+
catch (e) {
|
|
911
|
+
throw new Error('TxClient:MsgSetCollectionStoryWriter: Could not create message: ' + e.message);
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
msgCreateuser({ value }) {
|
|
915
|
+
try {
|
|
916
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateuser", value: MsgCreateuser.fromPartial(value) };
|
|
917
|
+
}
|
|
918
|
+
catch (e) {
|
|
919
|
+
throw new Error('TxClient:MsgCreateuser: Could not create message: ' + e.message);
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
msgAddArtworkToCollection({ value }) {
|
|
923
|
+
try {
|
|
924
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgAddArtworkToCollection", value: MsgAddArtworkToCollection.fromPartial(value) };
|
|
925
|
+
}
|
|
926
|
+
catch (e) {
|
|
927
|
+
throw new Error('TxClient:MsgAddArtworkToCollection: Could not create message: ' + e.message);
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
msgBuyCard({ value }) {
|
|
931
|
+
try {
|
|
932
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgBuyCard", value: MsgBuyCard.fromPartial(value) };
|
|
933
|
+
}
|
|
934
|
+
catch (e) {
|
|
935
|
+
throw new Error('TxClient:MsgBuyCard: Could not create message: ' + e.message);
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
msgSetCollectionArtist({ value }) {
|
|
939
|
+
try {
|
|
940
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgSetCollectionArtist", value: MsgSetCollectionArtist.fromPartial(value) };
|
|
941
|
+
}
|
|
942
|
+
catch (e) {
|
|
943
|
+
throw new Error('TxClient:MsgSetCollectionArtist: Could not create message: ' + e.message);
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
msgRevealCouncilResponse({ value }) {
|
|
947
|
+
try {
|
|
948
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRevealCouncilResponse", value: MsgRevealCouncilResponse.fromPartial(value) };
|
|
949
|
+
}
|
|
950
|
+
catch (e) {
|
|
951
|
+
throw new Error('TxClient:MsgRevealCouncilResponse: Could not create message: ' + e.message);
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
msgConfirmMatch({ value }) {
|
|
955
|
+
try {
|
|
956
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgConfirmMatch", value: MsgConfirmMatch.fromPartial(value) };
|
|
957
|
+
}
|
|
958
|
+
catch (e) {
|
|
959
|
+
throw new Error('TxClient:MsgConfirmMatch: Could not create message: ' + e.message);
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
msgChangeArtist({ value }) {
|
|
963
|
+
try {
|
|
964
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgChangeArtist", value: MsgChangeArtist.fromPartial(value) };
|
|
965
|
+
}
|
|
966
|
+
catch (e) {
|
|
967
|
+
throw new Error('TxClient:MsgChangeArtist: Could not create message: ' + e.message);
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
msgCreateSellOffer({ value }) {
|
|
971
|
+
try {
|
|
972
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgCreateSellOffer", value: MsgCreateSellOffer.fromPartial(value) };
|
|
973
|
+
}
|
|
974
|
+
catch (e) {
|
|
975
|
+
throw new Error('TxClient:MsgCreateSellOffer: Could not create message: ' + e.message);
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
msgRemoveCardFromCollection({ value }) {
|
|
979
|
+
try {
|
|
980
|
+
return { typeUrl: "/DecentralCardGame.cardchain.cardchain.MsgRemoveCardFromCollection", value: MsgRemoveCardFromCollection.fromPartial(value) };
|
|
981
|
+
}
|
|
982
|
+
catch (e) {
|
|
983
|
+
throw new Error('TxClient:MsgRemoveCardFromCollection: Could not create message: ' + e.message);
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
|
|
989
|
+
return new Api({ baseURL: addr });
|
|
990
|
+
};
|
|
991
|
+
class SDKModule {
|
|
992
|
+
constructor(client) {
|
|
993
|
+
this.registry = [];
|
|
994
|
+
this.query = queryClient({ addr: client.env.apiURL });
|
|
995
|
+
this.updateTX(client);
|
|
996
|
+
this.structure = {
|
|
997
|
+
Card: getStructure(typeCard.fromPartial({})),
|
|
998
|
+
Collection: getStructure(typeCollection.fromPartial({})),
|
|
999
|
+
CollectionProposal: getStructure(typeCollectionProposal.fromPartial({})),
|
|
1000
|
+
CopyrightProposal: getStructure(typeCopyrightProposal.fromPartial({})),
|
|
1001
|
+
WrapClearResponse: getStructure(typeWrapClearResponse.fromPartial({})),
|
|
1002
|
+
WrapHashResponse: getStructure(typeWrapHashResponse.fromPartial({})),
|
|
1003
|
+
Image: getStructure(typeImage.fromPartial({})),
|
|
1004
|
+
MatchPlayer: getStructure(typeMatchPlayer.fromPartial({})),
|
|
1005
|
+
MatchReporterProposal: getStructure(typeMatchReporterProposal.fromPartial({})),
|
|
1006
|
+
Num: getStructure(typeNum.fromPartial({})),
|
|
1007
|
+
Params: getStructure(typeParams.fromPartial({})),
|
|
1008
|
+
IgnoreMatches: getStructure(typeIgnoreMatches.fromPartial({})),
|
|
1009
|
+
IgnoreSellOffers: getStructure(typeIgnoreSellOffers.fromPartial({})),
|
|
1010
|
+
QueryQServerResponse: getStructure(typeQueryQServerResponse.fromPartial({})),
|
|
1011
|
+
RunningAverage: getStructure(typeRunningAverage.fromPartial({})),
|
|
1012
|
+
SingleVote: getStructure(typeSingleVote.fromPartial({})),
|
|
1013
|
+
BoosterPack: getStructure(typeBoosterPack.fromPartial({})),
|
|
1014
|
+
AirDrops: getStructure(typeAirDrops.fromPartial({})),
|
|
1015
|
+
VoteRight: getStructure(typeVoteRight.fromPartial({})),
|
|
1016
|
+
VotingResult: getStructure(typeVotingResult.fromPartial({})),
|
|
1017
|
+
VotingResults: getStructure(typeVotingResults.fromPartial({})),
|
|
1018
|
+
};
|
|
1019
|
+
client.on('signer-changed', (signer) => {
|
|
1020
|
+
this.updateTX(client);
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
updateTX(client) {
|
|
1024
|
+
const methods = txClient({
|
|
1025
|
+
signer: client.signer,
|
|
1026
|
+
addr: client.env.rpcURL,
|
|
1027
|
+
prefix: client.env.prefix ?? "cosmos",
|
|
1028
|
+
});
|
|
1029
|
+
this.tx = methods;
|
|
1030
|
+
for (let m in methods) {
|
|
1031
|
+
this.tx[m] = methods[m].bind(this.tx);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
;
|
|
1036
|
+
const Module = (test) => {
|
|
1037
|
+
return {
|
|
1038
|
+
module: {
|
|
1039
|
+
DecentralCardGameCardchainCardchain: new SDKModule(test)
|
|
1040
|
+
},
|
|
1041
|
+
registry: msgTypes
|
|
1042
|
+
};
|
|
1043
|
+
};
|
|
1044
|
+
export default Module;
|