decentralcardgame-cardchain-client-ts 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +428 -460
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +1496 -1571
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +74 -66
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +74 -66
  5. package/DecentralCardGame.cardchain.cardchain/rest.js +71 -0
  6. package/DecentralCardGame.cardchain.cardchain/rest.ts +132 -0
  7. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +6 -0
  8. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +6 -0
  9. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/early_access_proposal.js +81 -0
  10. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/early_access_proposal.ts +106 -0
  11. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/encounters.js +295 -0
  12. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/encounters.ts +354 -0
  13. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +16 -0
  14. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +19 -1
  15. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +447 -0
  16. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +570 -0
  17. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +504 -0
  18. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +613 -0
  19. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +50 -0
  20. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +48 -0
  21. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/zealy.js +58 -0
  22. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/zealy.ts +82 -0
  23. package/DecentralCardGame.cardchain.cardchain/types.js +5 -1
  24. package/DecentralCardGame.cardchain.cardchain/types.ts +8 -0
  25. package/DecentralCardGame.cardchain.featureflag/module.js +9 -7
  26. package/DecentralCardGame.cardchain.featureflag/module.ts +69 -65
  27. package/client.js +2 -5
  28. package/client.ts +164 -162
  29. package/cosmos.authz.v1beta1/module.js +33 -22
  30. package/cosmos.authz.v1beta1/module.ts +220 -148
  31. package/cosmos.distribution.v1beta1/module.js +65 -35
  32. package/cosmos.distribution.v1beta1/module.ts +354 -200
  33. package/cosmos.evidence.v1beta1/module.js +21 -13
  34. package/cosmos.evidence.v1beta1/module.ts +115 -86
  35. package/cosmos.gov.v1/module.js +48 -29
  36. package/cosmos.gov.v1/module.ts +275 -178
  37. package/cosmos.mint.v1beta1/module.js +9 -7
  38. package/cosmos.mint.v1beta1/module.ts +67 -63
  39. package/cosmos.nft.v1beta1/module.js +9 -7
  40. package/cosmos.nft.v1beta1/module.ts +75 -71
  41. package/cosmos.tx.v1beta1/module.js +9 -7
  42. package/cosmos.tx.v1beta1/module.ts +89 -85
  43. package/cosmos.vesting.v1beta1/module.js +52 -29
  44. package/cosmos.vesting.v1beta1/module.ts +249 -149
  45. package/ibc.applications.interchain_accounts.controller.v1/module.js +9 -7
  46. package/ibc.applications.interchain_accounts.controller.v1/module.ts +65 -61
  47. package/ibc.applications.transfer.v1/module.js +17 -12
  48. package/ibc.applications.transfer.v1/module.ts +114 -88
  49. package/ibc.core.channel.v1/module.js +1 -4
  50. package/ibc.core.channel.v1/module.ts +79 -81
  51. package/ibc.core.client.v1/module.js +1 -4
  52. package/ibc.core.client.v1/module.ts +81 -83
  53. package/ibc.core.connection.v1/module.js +6 -7
  54. package/ibc.core.connection.v1/module.ts +88 -84
  55. package/package.json +4 -1
  56. package/tsconfig.json +1 -1
@@ -2,82 +2,85 @@
2
2
 
3
3
  import { StdFee } from "@cosmjs/amino";
4
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"
5
+ import {
6
+ EncodeObject,
7
+ GeneratedType,
8
+ OfflineSigner,
9
+ Registry,
10
+ } from "@cosmjs/proto-signing";
11
+ import { msgTypes } from "./registry";
12
+ import { IgniteClient } from "../client";
13
+ import { MissingWalletError } from "../helpers";
9
14
  import { Api } from "./rest";
10
15
  import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
11
16
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
12
17
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
13
18
  import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
14
19
 
15
- import { WeightedVoteOption as typeWeightedVoteOption} from "./types"
16
- import { Deposit as typeDeposit} from "./types"
17
- import { Proposal as typeProposal} from "./types"
18
- import { TallyResult as typeTallyResult} from "./types"
19
- import { Vote as typeVote} from "./types"
20
- import { DepositParams as typeDepositParams} from "./types"
21
- import { VotingParams as typeVotingParams} from "./types"
22
- import { TallyParams as typeTallyParams} from "./types"
20
+ import { WeightedVoteOption as typeWeightedVoteOption } from "./types";
21
+ import { Deposit as typeDeposit } from "./types";
22
+ import { Proposal as typeProposal } from "./types";
23
+ import { TallyResult as typeTallyResult } from "./types";
24
+ import { Vote as typeVote } from "./types";
25
+ import { DepositParams as typeDepositParams } from "./types";
26
+ import { VotingParams as typeVotingParams } from "./types";
27
+ import { TallyParams as typeTallyParams } from "./types";
23
28
 
24
29
  export { MsgSubmitProposal, MsgVote, MsgDeposit, MsgVoteWeighted };
25
30
 
26
31
  type sendMsgSubmitProposalParams = {
27
- value: MsgSubmitProposal,
28
- fee?: StdFee,
29
- memo?: string
32
+ value: MsgSubmitProposal;
33
+ fee?: StdFee;
34
+ memo?: string;
30
35
  };
31
36
 
32
37
  type sendMsgVoteParams = {
33
- value: MsgVote,
34
- fee?: StdFee,
35
- memo?: string
38
+ value: MsgVote;
39
+ fee?: StdFee;
40
+ memo?: string;
36
41
  };
37
42
 
38
43
  type sendMsgDepositParams = {
39
- value: MsgDeposit,
40
- fee?: StdFee,
41
- memo?: string
44
+ value: MsgDeposit;
45
+ fee?: StdFee;
46
+ memo?: string;
42
47
  };
43
48
 
44
49
  type sendMsgVoteWeightedParams = {
45
- value: MsgVoteWeighted,
46
- fee?: StdFee,
47
- memo?: string
50
+ value: MsgVoteWeighted;
51
+ fee?: StdFee;
52
+ memo?: string;
48
53
  };
49
54
 
50
-
51
55
  type msgSubmitProposalParams = {
52
- value: MsgSubmitProposal,
56
+ value: MsgSubmitProposal;
53
57
  };
54
58
 
55
59
  type msgVoteParams = {
56
- value: MsgVote,
60
+ value: MsgVote;
57
61
  };
58
62
 
59
63
  type msgDepositParams = {
60
- value: MsgDeposit,
64
+ value: MsgDeposit;
61
65
  };
62
66
 
63
67
  type msgVoteWeightedParams = {
64
- value: MsgVoteWeighted,
68
+ value: MsgVoteWeighted;
65
69
  };
66
70
 
67
-
68
71
  export const registry = new Registry(msgTypes);
69
72
 
70
73
  type Field = {
71
- name: string;
72
- type: unknown;
73
- }
74
+ name: string;
75
+ type: unknown;
76
+ };
74
77
  function getStructure(template) {
75
- const structure: {fields: Field[]} = { fields: [] }
76
- for (let [key, value] of Object.entries(template)) {
77
- let field = { name: key, type: typeof value }
78
- structure.fields.push(field)
79
- }
80
- return structure
78
+ const structure: { fields: Field[] } = { fields: [] };
79
+ for (let [key, value] of Object.entries(template)) {
80
+ let field = { name: key, type: typeof value };
81
+ structure.fields.push(field);
82
+ }
83
+ return structure;
81
84
  }
82
85
  const defaultFee = {
83
86
  amount: [],
@@ -85,160 +88,254 @@ const defaultFee = {
85
88
  };
86
89
 
87
90
  interface TxClientOptions {
88
- addr: string
89
- prefix: string
90
- signer?: OfflineSigner
91
+ addr: string;
92
+ prefix: string;
93
+ signer?: OfflineSigner;
91
94
  }
92
95
 
93
- export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
94
-
96
+ export const txClient = (
97
+ { signer, prefix, addr }: TxClientOptions = {
98
+ addr: "http://localhost:26657",
99
+ prefix: "cosmos",
100
+ },
101
+ ) => {
95
102
  return {
96
-
97
- async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
98
- if (!signer) {
99
- throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
100
- }
101
- try {
102
- const { address } = (await signer.getAccounts())[0];
103
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
104
- let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
105
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
106
- } catch (e: any) {
107
- throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
108
- }
109
- },
110
-
111
- async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
112
- if (!signer) {
113
- throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
114
- }
115
- try {
116
- const { address } = (await signer.getAccounts())[0];
117
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
118
- let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
119
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
120
- } catch (e: any) {
121
- throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
122
- }
123
- },
124
-
125
- async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise<DeliverTxResponse> {
126
- if (!signer) {
127
- throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.')
128
- }
129
- try {
130
- const { address } = (await signer.getAccounts())[0];
131
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
132
- let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) })
133
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
134
- } catch (e: any) {
135
- throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message)
136
- }
137
- },
138
-
139
- async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
140
- if (!signer) {
141
- throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
142
- }
143
- try {
144
- const { address } = (await signer.getAccounts())[0];
145
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
146
- let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
147
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
148
- } catch (e: any) {
149
- throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
150
- }
151
- },
152
-
153
-
154
- msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
155
- try {
156
- return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
157
- } catch (e: any) {
158
- throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
159
- }
160
- },
161
-
162
- msgVote({ value }: msgVoteParams): EncodeObject {
163
- try {
164
- return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) }
165
- } catch (e: any) {
166
- throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
167
- }
168
- },
169
-
170
- msgDeposit({ value }: msgDepositParams): EncodeObject {
171
- try {
172
- return { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.fromPartial( value ) }
173
- } catch (e: any) {
174
- throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message)
175
- }
176
- },
177
-
178
- msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
179
- try {
180
- return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
181
- } catch (e: any) {
182
- throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
183
- }
184
- },
185
-
186
- }
103
+ async sendMsgSubmitProposal({
104
+ value,
105
+ fee,
106
+ memo,
107
+ }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
108
+ if (!signer) {
109
+ throw new Error(
110
+ "TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.",
111
+ );
112
+ }
113
+ try {
114
+ const { address } = (await signer.getAccounts())[0];
115
+ const signingClient = await SigningStargateClient.connectWithSigner(
116
+ addr,
117
+ signer,
118
+ { registry, prefix },
119
+ );
120
+ let msg = this.msgSubmitProposal({
121
+ value: MsgSubmitProposal.fromPartial(value),
122
+ });
123
+ return await signingClient.signAndBroadcast(
124
+ address,
125
+ [msg],
126
+ fee ? fee : defaultFee,
127
+ memo,
128
+ );
129
+ } catch (e: any) {
130
+ throw new Error(
131
+ "TxClient:sendMsgSubmitProposal: Could not broadcast Tx: " +
132
+ e.message,
133
+ );
134
+ }
135
+ },
136
+
137
+ async sendMsgVote({
138
+ value,
139
+ fee,
140
+ memo,
141
+ }: sendMsgVoteParams): Promise<DeliverTxResponse> {
142
+ if (!signer) {
143
+ throw new Error(
144
+ "TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.",
145
+ );
146
+ }
147
+ try {
148
+ const { address } = (await signer.getAccounts())[0];
149
+ const signingClient = await SigningStargateClient.connectWithSigner(
150
+ addr,
151
+ signer,
152
+ { registry, prefix },
153
+ );
154
+ let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
155
+ return await signingClient.signAndBroadcast(
156
+ address,
157
+ [msg],
158
+ fee ? fee : defaultFee,
159
+ memo,
160
+ );
161
+ } catch (e: any) {
162
+ throw new Error(
163
+ "TxClient:sendMsgVote: Could not broadcast Tx: " + e.message,
164
+ );
165
+ }
166
+ },
167
+
168
+ async sendMsgDeposit({
169
+ value,
170
+ fee,
171
+ memo,
172
+ }: sendMsgDepositParams): Promise<DeliverTxResponse> {
173
+ if (!signer) {
174
+ throw new Error(
175
+ "TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.",
176
+ );
177
+ }
178
+ try {
179
+ const { address } = (await signer.getAccounts())[0];
180
+ const signingClient = await SigningStargateClient.connectWithSigner(
181
+ addr,
182
+ signer,
183
+ { registry, prefix },
184
+ );
185
+ let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) });
186
+ return await signingClient.signAndBroadcast(
187
+ address,
188
+ [msg],
189
+ fee ? fee : defaultFee,
190
+ memo,
191
+ );
192
+ } catch (e: any) {
193
+ throw new Error(
194
+ "TxClient:sendMsgDeposit: Could not broadcast Tx: " + e.message,
195
+ );
196
+ }
197
+ },
198
+
199
+ async sendMsgVoteWeighted({
200
+ value,
201
+ fee,
202
+ memo,
203
+ }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
204
+ if (!signer) {
205
+ throw new Error(
206
+ "TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.",
207
+ );
208
+ }
209
+ try {
210
+ const { address } = (await signer.getAccounts())[0];
211
+ const signingClient = await SigningStargateClient.connectWithSigner(
212
+ addr,
213
+ signer,
214
+ { registry, prefix },
215
+ );
216
+ let msg = this.msgVoteWeighted({
217
+ value: MsgVoteWeighted.fromPartial(value),
218
+ });
219
+ return await signingClient.signAndBroadcast(
220
+ address,
221
+ [msg],
222
+ fee ? fee : defaultFee,
223
+ memo,
224
+ );
225
+ } catch (e: any) {
226
+ throw new Error(
227
+ "TxClient:sendMsgVoteWeighted: Could not broadcast Tx: " + e.message,
228
+ );
229
+ }
230
+ },
231
+
232
+ msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
233
+ try {
234
+ return {
235
+ typeUrl: "/cosmos.gov.v1.MsgSubmitProposal",
236
+ value: MsgSubmitProposal.fromPartial(value),
237
+ };
238
+ } catch (e: any) {
239
+ throw new Error(
240
+ "TxClient:MsgSubmitProposal: Could not create message: " + e.message,
241
+ );
242
+ }
243
+ },
244
+
245
+ msgVote({ value }: msgVoteParams): EncodeObject {
246
+ try {
247
+ return {
248
+ typeUrl: "/cosmos.gov.v1.MsgVote",
249
+ value: MsgVote.fromPartial(value),
250
+ };
251
+ } catch (e: any) {
252
+ throw new Error(
253
+ "TxClient:MsgVote: Could not create message: " + e.message,
254
+ );
255
+ }
256
+ },
257
+
258
+ msgDeposit({ value }: msgDepositParams): EncodeObject {
259
+ try {
260
+ return {
261
+ typeUrl: "/cosmos.gov.v1.MsgDeposit",
262
+ value: MsgDeposit.fromPartial(value),
263
+ };
264
+ } catch (e: any) {
265
+ throw new Error(
266
+ "TxClient:MsgDeposit: Could not create message: " + e.message,
267
+ );
268
+ }
269
+ },
270
+
271
+ msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
272
+ try {
273
+ return {
274
+ typeUrl: "/cosmos.gov.v1.MsgVoteWeighted",
275
+ value: MsgVoteWeighted.fromPartial(value),
276
+ };
277
+ } catch (e: any) {
278
+ throw new Error(
279
+ "TxClient:MsgVoteWeighted: Could not create message: " + e.message,
280
+ );
281
+ }
282
+ },
283
+ };
187
284
  };
188
285
 
189
286
  interface QueryClientOptions {
190
- addr: string
287
+ addr: string;
191
288
  }
192
289
 
193
- export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
290
+ export const queryClient = (
291
+ { addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" },
292
+ ) => {
194
293
  return new Api({ baseURL: addr });
195
294
  };
196
295
 
197
296
  class SDKModule {
198
- public query: ReturnType<typeof queryClient>;
199
- public tx: ReturnType<typeof txClient>;
200
- public structure: Record<string,unknown>;
201
- public registry: Array<[string, GeneratedType]> = [];
202
-
203
- constructor(client: IgniteClient) {
204
-
205
- this.query = queryClient({ addr: client.env.apiURL });
206
- this.updateTX(client);
207
- this.structure = {
208
- WeightedVoteOption: getStructure(typeWeightedVoteOption.fromPartial({})),
209
- Deposit: getStructure(typeDeposit.fromPartial({})),
210
- Proposal: getStructure(typeProposal.fromPartial({})),
211
- TallyResult: getStructure(typeTallyResult.fromPartial({})),
212
- Vote: getStructure(typeVote.fromPartial({})),
213
- DepositParams: getStructure(typeDepositParams.fromPartial({})),
214
- VotingParams: getStructure(typeVotingParams.fromPartial({})),
215
- TallyParams: getStructure(typeTallyParams.fromPartial({})),
216
-
217
- };
218
- client.on('signer-changed',(signer) => {
219
- this.updateTX(client);
220
- })
221
- }
222
- updateTX(client: IgniteClient) {
297
+ public query: ReturnType<typeof queryClient>;
298
+ public tx: ReturnType<typeof txClient>;
299
+ public structure: Record<string, unknown>;
300
+ public registry: Array<[string, GeneratedType]> = [];
301
+
302
+ constructor(client: IgniteClient) {
303
+ this.query = queryClient({ addr: client.env.apiURL });
304
+ this.updateTX(client);
305
+ this.structure = {
306
+ WeightedVoteOption: getStructure(typeWeightedVoteOption.fromPartial({})),
307
+ Deposit: getStructure(typeDeposit.fromPartial({})),
308
+ Proposal: getStructure(typeProposal.fromPartial({})),
309
+ TallyResult: getStructure(typeTallyResult.fromPartial({})),
310
+ Vote: getStructure(typeVote.fromPartial({})),
311
+ DepositParams: getStructure(typeDepositParams.fromPartial({})),
312
+ VotingParams: getStructure(typeVotingParams.fromPartial({})),
313
+ TallyParams: getStructure(typeTallyParams.fromPartial({})),
314
+ };
315
+ client.on("signer-changed", (signer) => {
316
+ this.updateTX(client);
317
+ });
318
+ }
319
+ updateTX(client: IgniteClient) {
223
320
  const methods = txClient({
224
- signer: client.signer,
225
- addr: client.env.rpcURL,
226
- prefix: client.env.prefix ?? "cosmos",
227
- })
228
-
321
+ signer: client.signer,
322
+ addr: client.env.rpcURL,
323
+ prefix: client.env.prefix ?? "cosmos",
324
+ });
325
+
229
326
  this.tx = methods;
230
327
  for (let m in methods) {
231
- this.tx[m] = methods[m].bind(this.tx);
328
+ this.tx[m] = methods[m].bind(this.tx);
232
329
  }
233
- }
234
- };
235
-
236
- const Module = (test: IgniteClient) => {
237
- return {
238
- module: {
239
- CosmosGovV1: new SDKModule(test)
240
- },
241
- registry: msgTypes
242
330
  }
243
331
  }
244
- export default Module;
332
+
333
+ const Module = (test: IgniteClient) => {
334
+ return {
335
+ module: {
336
+ CosmosGovV1: new SDKModule(test),
337
+ },
338
+ registry: msgTypes,
339
+ };
340
+ };
341
+ export default Module;
@@ -1,6 +1,6 @@
1
1
  // Generated by Ignite ignite.com/cli
2
- import { Registry } from "@cosmjs/proto-signing";
3
- import { msgTypes } from './registry';
2
+ import { Registry, } from "@cosmjs/proto-signing";
3
+ import { msgTypes } from "./registry";
4
4
  import { Api } from "./rest";
5
5
  import { Minter as typeMinter } from "./types";
6
6
  import { Params as typeParams } from "./types";
@@ -17,7 +17,10 @@ const defaultFee = {
17
17
  amount: [],
18
18
  gas: "200000",
19
19
  };
20
- export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
20
+ export const txClient = ({ signer, prefix, addr } = {
21
+ addr: "http://localhost:26657",
22
+ prefix: "cosmos",
23
+ }) => {
21
24
  return {};
22
25
  };
23
26
  export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
@@ -32,7 +35,7 @@ class SDKModule {
32
35
  Minter: getStructure(typeMinter.fromPartial({})),
33
36
  Params: getStructure(typeParams.fromPartial({})),
34
37
  };
35
- client.on('signer-changed', (signer) => {
38
+ client.on("signer-changed", (signer) => {
36
39
  this.updateTX(client);
37
40
  });
38
41
  }
@@ -48,13 +51,12 @@ class SDKModule {
48
51
  }
49
52
  }
50
53
  }
51
- ;
52
54
  const Module = (test) => {
53
55
  return {
54
56
  module: {
55
- CosmosMintV1Beta1: new SDKModule(test)
57
+ CosmosMintV1Beta1: new SDKModule(test),
56
58
  },
57
- registry: msgTypes
59
+ registry: msgTypes,
58
60
  };
59
61
  };
60
62
  export default Module;