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

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 (113) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +364 -338
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +530 -495
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +66 -64
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +66 -64
  5. package/DecentralCardGame.cardchain.cardchain/rest.js +31 -17
  6. package/DecentralCardGame.cardchain.cardchain/rest.ts +138 -94
  7. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.js +287 -106
  8. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.ts +326 -107
  9. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.js +38 -14
  10. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.ts +45 -17
  11. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.js +104 -47
  12. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.ts +122 -50
  13. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.js +92 -74
  14. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.ts +109 -66
  15. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.js +25 -17
  16. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.ts +29 -20
  17. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.js +107 -51
  18. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.ts +130 -50
  19. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.js +29 -10
  20. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.ts +32 -10
  21. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.js +17 -8
  22. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.ts +21 -11
  23. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.js +178 -57
  24. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.ts +205 -60
  25. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.js +666 -446
  26. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.ts +764 -459
  27. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.js +17 -14
  28. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.ts +24 -15
  29. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.js +45 -16
  30. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.ts +53 -19
  31. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.js +31 -12
  32. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.ts +37 -15
  33. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.js +138 -62
  34. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.ts +173 -67
  35. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.js +31 -12
  36. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.ts +37 -15
  37. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.js +1609 -1024
  38. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.ts +1821 -1153
  39. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.js +207 -98
  40. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.ts +261 -96
  41. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.js +178 -108
  42. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.ts +200 -123
  43. package/DecentralCardGame.cardchain.cardchain/types/amino/amino.ts +1 -0
  44. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +86 -0
  45. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +90 -0
  46. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +219 -114
  47. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +265 -120
  48. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.js +186 -0
  49. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.ts +210 -0
  50. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +91 -0
  51. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +113 -0
  52. package/DecentralCardGame.cardchain.cardchain/types.js +3 -1
  53. package/DecentralCardGame.cardchain.cardchain/types.ts +4 -0
  54. package/DecentralCardGame.cardchain.featureflag/rest.ts +6 -6
  55. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/flag.js +86 -0
  56. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/flag.ts +114 -0
  57. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/genesis.js +164 -0
  58. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/genesis.ts +205 -0
  59. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/params.js +40 -0
  60. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/params.ts +62 -0
  61. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/proposal.js +100 -0
  62. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/proposal.ts +130 -0
  63. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/query.js +325 -0
  64. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/query.ts +424 -0
  65. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/tx.js +9 -0
  66. package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/tx.ts +21 -0
  67. package/client.js +3 -9
  68. package/client.ts +154 -167
  69. package/cosmos.auth.v1beta1/rest.ts +21 -21
  70. package/cosmos.authz.v1beta1/module.js +17 -17
  71. package/cosmos.authz.v1beta1/module.ts +25 -25
  72. package/cosmos.authz.v1beta1/registry.js +4 -4
  73. package/cosmos.authz.v1beta1/registry.ts +4 -4
  74. package/cosmos.authz.v1beta1/rest.ts +75 -75
  75. package/cosmos.bank.v1beta1/rest.ts +9 -9
  76. package/cosmos.distribution.v1beta1/module.js +27 -27
  77. package/cosmos.distribution.v1beta1/module.ts +42 -42
  78. package/cosmos.distribution.v1beta1/registry.js +4 -4
  79. package/cosmos.distribution.v1beta1/registry.ts +4 -4
  80. package/cosmos.distribution.v1beta1/rest.ts +20 -20
  81. package/cosmos.gov.v1/module.js +24 -24
  82. package/cosmos.gov.v1/module.ts +36 -36
  83. package/cosmos.gov.v1/registry.js +4 -4
  84. package/cosmos.gov.v1/registry.ts +4 -4
  85. package/cosmos.gov.v1/rest.ts +90 -90
  86. package/cosmos.gov.v1beta1/module.js +27 -27
  87. package/cosmos.gov.v1beta1/module.ts +42 -42
  88. package/cosmos.gov.v1beta1/registry.js +4 -4
  89. package/cosmos.gov.v1beta1/registry.ts +4 -4
  90. package/cosmos.gov.v1beta1/rest.ts +152 -152
  91. package/cosmos.group.v1/module.js +108 -108
  92. package/cosmos.group.v1/module.ts +164 -164
  93. package/cosmos.group.v1/registry.js +18 -18
  94. package/cosmos.group.v1/registry.ts +18 -18
  95. package/cosmos.group.v1/rest.js +5 -5
  96. package/cosmos.group.v1/rest.ts +214 -214
  97. package/cosmos.mint.v1beta1/rest.ts +13 -13
  98. package/cosmos.nft.v1beta1/rest.ts +132 -132
  99. package/cosmos.slashing.v1beta1/rest.ts +19 -19
  100. package/cosmos.staking.v1beta1/module.js +39 -39
  101. package/cosmos.staking.v1beta1/module.ts +59 -59
  102. package/cosmos.staking.v1beta1/registry.js +6 -6
  103. package/cosmos.staking.v1beta1/registry.ts +6 -6
  104. package/cosmos.staking.v1beta1/rest.ts +95 -95
  105. package/cosmos.upgrade.v1beta1/module.js +16 -16
  106. package/cosmos.upgrade.v1beta1/module.ts +24 -24
  107. package/cosmos.upgrade.v1beta1/registry.js +2 -2
  108. package/cosmos.upgrade.v1beta1/registry.ts +2 -2
  109. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +10 -10
  110. package/ibc.applications.interchain_accounts.host.v1/rest.ts +13 -13
  111. package/ibc.applications.transfer.v1/rest.ts +3 -3
  112. package/ibc.core.channel.v1/rest.ts +44 -44
  113. package/package.json +1 -1
@@ -3,20 +3,20 @@ import { SigningStargateClient } from "@cosmjs/stargate";
3
3
  import { Registry } from "@cosmjs/proto-signing";
4
4
  import { msgTypes } from './registry';
5
5
  import { Api } from "./rest";
6
- import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx";
7
- import { MsgCreateGroup } from "./types/cosmos/group/v1/tx";
8
- import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx";
9
- import { MsgUpdateGroupPolicyMetadata } from "./types/cosmos/group/v1/tx";
10
- import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx";
11
- import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx";
6
+ import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx";
12
7
  import { MsgVote } from "./types/cosmos/group/v1/tx";
8
+ import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx";
13
9
  import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx";
10
+ import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx";
11
+ import { MsgExec } from "./types/cosmos/group/v1/tx";
14
12
  import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx";
13
+ import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx";
15
14
  import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx";
15
+ import { MsgCreateGroup } from "./types/cosmos/group/v1/tx";
16
+ import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx";
17
+ import { MsgUpdateGroupPolicyMetadata } from "./types/cosmos/group/v1/tx";
18
+ import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx";
16
19
  import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx";
17
- import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx";
18
- import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx";
19
- import { MsgExec } from "./types/cosmos/group/v1/tx";
20
20
  import { EventCreateGroup as typeEventCreateGroup } from "./types";
21
21
  import { EventUpdateGroup as typeEventUpdateGroup } from "./types";
22
22
  import { EventCreateGroupPolicy as typeEventCreateGroupPolicy } from "./types";
@@ -38,7 +38,7 @@ import { GroupPolicyInfo as typeGroupPolicyInfo } from "./types";
38
38
  import { Proposal as typeProposal } from "./types";
39
39
  import { TallyResult as typeTallyResult } from "./types";
40
40
  import { Vote as typeVote } from "./types";
41
- export { MsgCreateGroupWithPolicy, MsgCreateGroup, MsgUpdateGroupAdmin, MsgUpdateGroupPolicyMetadata, MsgUpdateGroupPolicyDecisionPolicy, MsgWithdrawProposal, MsgVote, MsgSubmitProposal, MsgCreateGroupPolicy, MsgUpdateGroupMembers, MsgUpdateGroupMetadata, MsgLeaveGroup, MsgUpdateGroupPolicyAdmin, MsgExec };
41
+ export { MsgUpdateGroupPolicyAdmin, MsgVote, MsgWithdrawProposal, MsgSubmitProposal, MsgUpdateGroupAdmin, MsgExec, MsgCreateGroupPolicy, MsgLeaveGroup, MsgUpdateGroupMembers, MsgCreateGroup, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyMetadata, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupMetadata };
42
42
  export const registry = new Registry(msgTypes);
43
43
  function getStructure(template) {
44
44
  const structure = { fields: [] };
@@ -54,312 +54,312 @@ const defaultFee = {
54
54
  };
55
55
  export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
56
56
  return {
57
- async sendMsgCreateGroupWithPolicy({ value, fee, memo }) {
57
+ async sendMsgUpdateGroupPolicyAdmin({ value, fee, memo }) {
58
58
  if (!signer) {
59
- throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Unable to sign Tx. Signer is not present.');
59
+ throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Unable to sign Tx. Signer is not present.');
60
60
  }
61
61
  try {
62
62
  const { address } = (await signer.getAccounts())[0];
63
63
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
64
- let msg = this.msgCreateGroupWithPolicy({ value: MsgCreateGroupWithPolicy.fromPartial(value) });
64
+ let msg = this.msgUpdateGroupPolicyAdmin({ value: MsgUpdateGroupPolicyAdmin.fromPartial(value) });
65
65
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
66
66
  }
67
67
  catch (e) {
68
- throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Could not broadcast Tx: ' + e.message);
68
+ throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Could not broadcast Tx: ' + e.message);
69
69
  }
70
70
  },
71
- async sendMsgCreateGroup({ value, fee, memo }) {
71
+ async sendMsgVote({ value, fee, memo }) {
72
72
  if (!signer) {
73
- throw new Error('TxClient:sendMsgCreateGroup: Unable to sign Tx. Signer is not present.');
73
+ throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
74
74
  }
75
75
  try {
76
76
  const { address } = (await signer.getAccounts())[0];
77
77
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
78
- let msg = this.msgCreateGroup({ value: MsgCreateGroup.fromPartial(value) });
78
+ let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
79
79
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
80
80
  }
81
81
  catch (e) {
82
- throw new Error('TxClient:sendMsgCreateGroup: Could not broadcast Tx: ' + e.message);
82
+ throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
83
83
  }
84
84
  },
85
- async sendMsgUpdateGroupAdmin({ value, fee, memo }) {
85
+ async sendMsgWithdrawProposal({ value, fee, memo }) {
86
86
  if (!signer) {
87
- throw new Error('TxClient:sendMsgUpdateGroupAdmin: Unable to sign Tx. Signer is not present.');
87
+ throw new Error('TxClient:sendMsgWithdrawProposal: Unable to sign Tx. Signer is not present.');
88
88
  }
89
89
  try {
90
90
  const { address } = (await signer.getAccounts())[0];
91
91
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
92
- let msg = this.msgUpdateGroupAdmin({ value: MsgUpdateGroupAdmin.fromPartial(value) });
92
+ let msg = this.msgWithdrawProposal({ value: MsgWithdrawProposal.fromPartial(value) });
93
93
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
94
94
  }
95
95
  catch (e) {
96
- throw new Error('TxClient:sendMsgUpdateGroupAdmin: Could not broadcast Tx: ' + e.message);
96
+ throw new Error('TxClient:sendMsgWithdrawProposal: Could not broadcast Tx: ' + e.message);
97
97
  }
98
98
  },
99
- async sendMsgUpdateGroupPolicyMetadata({ value, fee, memo }) {
99
+ async sendMsgSubmitProposal({ value, fee, memo }) {
100
100
  if (!signer) {
101
- throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Unable to sign Tx. Signer is not present.');
101
+ throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.');
102
102
  }
103
103
  try {
104
104
  const { address } = (await signer.getAccounts())[0];
105
105
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
106
- let msg = this.msgUpdateGroupPolicyMetadata({ value: MsgUpdateGroupPolicyMetadata.fromPartial(value) });
106
+ let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) });
107
107
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
108
108
  }
109
109
  catch (e) {
110
- throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Could not broadcast Tx: ' + e.message);
110
+ throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
111
111
  }
112
112
  },
113
- async sendMsgUpdateGroupPolicyDecisionPolicy({ value, fee, memo }) {
113
+ async sendMsgUpdateGroupAdmin({ value, fee, memo }) {
114
114
  if (!signer) {
115
- throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Unable to sign Tx. Signer is not present.');
115
+ throw new Error('TxClient:sendMsgUpdateGroupAdmin: Unable to sign Tx. Signer is not present.');
116
116
  }
117
117
  try {
118
118
  const { address } = (await signer.getAccounts())[0];
119
119
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
120
- let msg = this.msgUpdateGroupPolicyDecisionPolicy({ value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) });
120
+ let msg = this.msgUpdateGroupAdmin({ value: MsgUpdateGroupAdmin.fromPartial(value) });
121
121
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
122
122
  }
123
123
  catch (e) {
124
- throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Could not broadcast Tx: ' + e.message);
124
+ throw new Error('TxClient:sendMsgUpdateGroupAdmin: Could not broadcast Tx: ' + e.message);
125
125
  }
126
126
  },
127
- async sendMsgWithdrawProposal({ value, fee, memo }) {
127
+ async sendMsgExec({ value, fee, memo }) {
128
128
  if (!signer) {
129
- throw new Error('TxClient:sendMsgWithdrawProposal: Unable to sign Tx. Signer is not present.');
129
+ throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.');
130
130
  }
131
131
  try {
132
132
  const { address } = (await signer.getAccounts())[0];
133
133
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
134
- let msg = this.msgWithdrawProposal({ value: MsgWithdrawProposal.fromPartial(value) });
134
+ let msg = this.msgExec({ value: MsgExec.fromPartial(value) });
135
135
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
136
136
  }
137
137
  catch (e) {
138
- throw new Error('TxClient:sendMsgWithdrawProposal: Could not broadcast Tx: ' + e.message);
138
+ throw new Error('TxClient:sendMsgExec: Could not broadcast Tx: ' + e.message);
139
139
  }
140
140
  },
141
- async sendMsgVote({ value, fee, memo }) {
141
+ async sendMsgCreateGroupPolicy({ value, fee, memo }) {
142
142
  if (!signer) {
143
- throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
143
+ throw new Error('TxClient:sendMsgCreateGroupPolicy: Unable to sign Tx. Signer is not present.');
144
144
  }
145
145
  try {
146
146
  const { address } = (await signer.getAccounts())[0];
147
147
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
148
- let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
148
+ let msg = this.msgCreateGroupPolicy({ value: MsgCreateGroupPolicy.fromPartial(value) });
149
149
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
150
150
  }
151
151
  catch (e) {
152
- throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
152
+ throw new Error('TxClient:sendMsgCreateGroupPolicy: Could not broadcast Tx: ' + e.message);
153
153
  }
154
154
  },
155
- async sendMsgSubmitProposal({ value, fee, memo }) {
155
+ async sendMsgLeaveGroup({ value, fee, memo }) {
156
156
  if (!signer) {
157
- throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.');
157
+ throw new Error('TxClient:sendMsgLeaveGroup: Unable to sign Tx. Signer is not present.');
158
158
  }
159
159
  try {
160
160
  const { address } = (await signer.getAccounts())[0];
161
161
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
162
- let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) });
162
+ let msg = this.msgLeaveGroup({ value: MsgLeaveGroup.fromPartial(value) });
163
163
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
164
164
  }
165
165
  catch (e) {
166
- throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
166
+ throw new Error('TxClient:sendMsgLeaveGroup: Could not broadcast Tx: ' + e.message);
167
167
  }
168
168
  },
169
- async sendMsgCreateGroupPolicy({ value, fee, memo }) {
169
+ async sendMsgUpdateGroupMembers({ value, fee, memo }) {
170
170
  if (!signer) {
171
- throw new Error('TxClient:sendMsgCreateGroupPolicy: Unable to sign Tx. Signer is not present.');
171
+ throw new Error('TxClient:sendMsgUpdateGroupMembers: Unable to sign Tx. Signer is not present.');
172
172
  }
173
173
  try {
174
174
  const { address } = (await signer.getAccounts())[0];
175
175
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
176
- let msg = this.msgCreateGroupPolicy({ value: MsgCreateGroupPolicy.fromPartial(value) });
176
+ let msg = this.msgUpdateGroupMembers({ value: MsgUpdateGroupMembers.fromPartial(value) });
177
177
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
178
178
  }
179
179
  catch (e) {
180
- throw new Error('TxClient:sendMsgCreateGroupPolicy: Could not broadcast Tx: ' + e.message);
180
+ throw new Error('TxClient:sendMsgUpdateGroupMembers: Could not broadcast Tx: ' + e.message);
181
181
  }
182
182
  },
183
- async sendMsgUpdateGroupMembers({ value, fee, memo }) {
183
+ async sendMsgCreateGroup({ value, fee, memo }) {
184
184
  if (!signer) {
185
- throw new Error('TxClient:sendMsgUpdateGroupMembers: Unable to sign Tx. Signer is not present.');
185
+ throw new Error('TxClient:sendMsgCreateGroup: Unable to sign Tx. Signer is not present.');
186
186
  }
187
187
  try {
188
188
  const { address } = (await signer.getAccounts())[0];
189
189
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
190
- let msg = this.msgUpdateGroupMembers({ value: MsgUpdateGroupMembers.fromPartial(value) });
190
+ let msg = this.msgCreateGroup({ value: MsgCreateGroup.fromPartial(value) });
191
191
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
192
192
  }
193
193
  catch (e) {
194
- throw new Error('TxClient:sendMsgUpdateGroupMembers: Could not broadcast Tx: ' + e.message);
194
+ throw new Error('TxClient:sendMsgCreateGroup: Could not broadcast Tx: ' + e.message);
195
195
  }
196
196
  },
197
- async sendMsgUpdateGroupMetadata({ value, fee, memo }) {
197
+ async sendMsgCreateGroupWithPolicy({ value, fee, memo }) {
198
198
  if (!signer) {
199
- throw new Error('TxClient:sendMsgUpdateGroupMetadata: Unable to sign Tx. Signer is not present.');
199
+ throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Unable to sign Tx. Signer is not present.');
200
200
  }
201
201
  try {
202
202
  const { address } = (await signer.getAccounts())[0];
203
203
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
204
- let msg = this.msgUpdateGroupMetadata({ value: MsgUpdateGroupMetadata.fromPartial(value) });
204
+ let msg = this.msgCreateGroupWithPolicy({ value: MsgCreateGroupWithPolicy.fromPartial(value) });
205
205
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
206
206
  }
207
207
  catch (e) {
208
- throw new Error('TxClient:sendMsgUpdateGroupMetadata: Could not broadcast Tx: ' + e.message);
208
+ throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Could not broadcast Tx: ' + e.message);
209
209
  }
210
210
  },
211
- async sendMsgLeaveGroup({ value, fee, memo }) {
211
+ async sendMsgUpdateGroupPolicyMetadata({ value, fee, memo }) {
212
212
  if (!signer) {
213
- throw new Error('TxClient:sendMsgLeaveGroup: Unable to sign Tx. Signer is not present.');
213
+ throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Unable to sign Tx. Signer is not present.');
214
214
  }
215
215
  try {
216
216
  const { address } = (await signer.getAccounts())[0];
217
217
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
218
- let msg = this.msgLeaveGroup({ value: MsgLeaveGroup.fromPartial(value) });
218
+ let msg = this.msgUpdateGroupPolicyMetadata({ value: MsgUpdateGroupPolicyMetadata.fromPartial(value) });
219
219
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
220
220
  }
221
221
  catch (e) {
222
- throw new Error('TxClient:sendMsgLeaveGroup: Could not broadcast Tx: ' + e.message);
222
+ throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Could not broadcast Tx: ' + e.message);
223
223
  }
224
224
  },
225
- async sendMsgUpdateGroupPolicyAdmin({ value, fee, memo }) {
225
+ async sendMsgUpdateGroupPolicyDecisionPolicy({ value, fee, memo }) {
226
226
  if (!signer) {
227
- throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Unable to sign Tx. Signer is not present.');
227
+ throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Unable to sign Tx. Signer is not present.');
228
228
  }
229
229
  try {
230
230
  const { address } = (await signer.getAccounts())[0];
231
231
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
232
- let msg = this.msgUpdateGroupPolicyAdmin({ value: MsgUpdateGroupPolicyAdmin.fromPartial(value) });
232
+ let msg = this.msgUpdateGroupPolicyDecisionPolicy({ value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) });
233
233
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
234
234
  }
235
235
  catch (e) {
236
- throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Could not broadcast Tx: ' + e.message);
236
+ throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Could not broadcast Tx: ' + e.message);
237
237
  }
238
238
  },
239
- async sendMsgExec({ value, fee, memo }) {
239
+ async sendMsgUpdateGroupMetadata({ value, fee, memo }) {
240
240
  if (!signer) {
241
- throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.');
241
+ throw new Error('TxClient:sendMsgUpdateGroupMetadata: Unable to sign Tx. Signer is not present.');
242
242
  }
243
243
  try {
244
244
  const { address } = (await signer.getAccounts())[0];
245
245
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
246
- let msg = this.msgExec({ value: MsgExec.fromPartial(value) });
246
+ let msg = this.msgUpdateGroupMetadata({ value: MsgUpdateGroupMetadata.fromPartial(value) });
247
247
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
248
248
  }
249
249
  catch (e) {
250
- throw new Error('TxClient:sendMsgExec: Could not broadcast Tx: ' + e.message);
250
+ throw new Error('TxClient:sendMsgUpdateGroupMetadata: Could not broadcast Tx: ' + e.message);
251
251
  }
252
252
  },
253
- msgCreateGroupWithPolicy({ value }) {
253
+ msgUpdateGroupPolicyAdmin({ value }) {
254
254
  try {
255
- return { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.fromPartial(value) };
255
+ return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.fromPartial(value) };
256
256
  }
257
257
  catch (e) {
258
- throw new Error('TxClient:MsgCreateGroupWithPolicy: Could not create message: ' + e.message);
258
+ throw new Error('TxClient:MsgUpdateGroupPolicyAdmin: Could not create message: ' + e.message);
259
259
  }
260
260
  },
261
- msgCreateGroup({ value }) {
261
+ msgVote({ value }) {
262
262
  try {
263
- return { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.fromPartial(value) };
263
+ return { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.fromPartial(value) };
264
264
  }
265
265
  catch (e) {
266
- throw new Error('TxClient:MsgCreateGroup: Could not create message: ' + e.message);
266
+ throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
267
267
  }
268
268
  },
269
- msgUpdateGroupAdmin({ value }) {
269
+ msgWithdrawProposal({ value }) {
270
270
  try {
271
- return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.fromPartial(value) };
271
+ return { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.fromPartial(value) };
272
272
  }
273
273
  catch (e) {
274
- throw new Error('TxClient:MsgUpdateGroupAdmin: Could not create message: ' + e.message);
274
+ throw new Error('TxClient:MsgWithdrawProposal: Could not create message: ' + e.message);
275
275
  }
276
276
  },
277
- msgUpdateGroupPolicyMetadata({ value }) {
277
+ msgSubmitProposal({ value }) {
278
278
  try {
279
- return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.fromPartial(value) };
279
+ return { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(value) };
280
280
  }
281
281
  catch (e) {
282
- throw new Error('TxClient:MsgUpdateGroupPolicyMetadata: Could not create message: ' + e.message);
282
+ throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
283
283
  }
284
284
  },
285
- msgUpdateGroupPolicyDecisionPolicy({ value }) {
285
+ msgUpdateGroupAdmin({ value }) {
286
286
  try {
287
- return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) };
287
+ return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.fromPartial(value) };
288
288
  }
289
289
  catch (e) {
290
- throw new Error('TxClient:MsgUpdateGroupPolicyDecisionPolicy: Could not create message: ' + e.message);
290
+ throw new Error('TxClient:MsgUpdateGroupAdmin: Could not create message: ' + e.message);
291
291
  }
292
292
  },
293
- msgWithdrawProposal({ value }) {
293
+ msgExec({ value }) {
294
294
  try {
295
- return { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.fromPartial(value) };
295
+ return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial(value) };
296
296
  }
297
297
  catch (e) {
298
- throw new Error('TxClient:MsgWithdrawProposal: Could not create message: ' + e.message);
298
+ throw new Error('TxClient:MsgExec: Could not create message: ' + e.message);
299
299
  }
300
300
  },
301
- msgVote({ value }) {
301
+ msgCreateGroupPolicy({ value }) {
302
302
  try {
303
- return { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.fromPartial(value) };
303
+ return { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.fromPartial(value) };
304
304
  }
305
305
  catch (e) {
306
- throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
306
+ throw new Error('TxClient:MsgCreateGroupPolicy: Could not create message: ' + e.message);
307
307
  }
308
308
  },
309
- msgSubmitProposal({ value }) {
309
+ msgLeaveGroup({ value }) {
310
310
  try {
311
- return { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(value) };
311
+ return { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.fromPartial(value) };
312
312
  }
313
313
  catch (e) {
314
- throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
314
+ throw new Error('TxClient:MsgLeaveGroup: Could not create message: ' + e.message);
315
315
  }
316
316
  },
317
- msgCreateGroupPolicy({ value }) {
317
+ msgUpdateGroupMembers({ value }) {
318
318
  try {
319
- return { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.fromPartial(value) };
319
+ return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.fromPartial(value) };
320
320
  }
321
321
  catch (e) {
322
- throw new Error('TxClient:MsgCreateGroupPolicy: Could not create message: ' + e.message);
322
+ throw new Error('TxClient:MsgUpdateGroupMembers: Could not create message: ' + e.message);
323
323
  }
324
324
  },
325
- msgUpdateGroupMembers({ value }) {
325
+ msgCreateGroup({ value }) {
326
326
  try {
327
- return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.fromPartial(value) };
327
+ return { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.fromPartial(value) };
328
328
  }
329
329
  catch (e) {
330
- throw new Error('TxClient:MsgUpdateGroupMembers: Could not create message: ' + e.message);
330
+ throw new Error('TxClient:MsgCreateGroup: Could not create message: ' + e.message);
331
331
  }
332
332
  },
333
- msgUpdateGroupMetadata({ value }) {
333
+ msgCreateGroupWithPolicy({ value }) {
334
334
  try {
335
- return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.fromPartial(value) };
335
+ return { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.fromPartial(value) };
336
336
  }
337
337
  catch (e) {
338
- throw new Error('TxClient:MsgUpdateGroupMetadata: Could not create message: ' + e.message);
338
+ throw new Error('TxClient:MsgCreateGroupWithPolicy: Could not create message: ' + e.message);
339
339
  }
340
340
  },
341
- msgLeaveGroup({ value }) {
341
+ msgUpdateGroupPolicyMetadata({ value }) {
342
342
  try {
343
- return { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.fromPartial(value) };
343
+ return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.fromPartial(value) };
344
344
  }
345
345
  catch (e) {
346
- throw new Error('TxClient:MsgLeaveGroup: Could not create message: ' + e.message);
346
+ throw new Error('TxClient:MsgUpdateGroupPolicyMetadata: Could not create message: ' + e.message);
347
347
  }
348
348
  },
349
- msgUpdateGroupPolicyAdmin({ value }) {
349
+ msgUpdateGroupPolicyDecisionPolicy({ value }) {
350
350
  try {
351
- return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.fromPartial(value) };
351
+ return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) };
352
352
  }
353
353
  catch (e) {
354
- throw new Error('TxClient:MsgUpdateGroupPolicyAdmin: Could not create message: ' + e.message);
354
+ throw new Error('TxClient:MsgUpdateGroupPolicyDecisionPolicy: Could not create message: ' + e.message);
355
355
  }
356
356
  },
357
- msgExec({ value }) {
357
+ msgUpdateGroupMetadata({ value }) {
358
358
  try {
359
- return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial(value) };
359
+ return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.fromPartial(value) };
360
360
  }
361
361
  catch (e) {
362
- throw new Error('TxClient:MsgExec: Could not create message: ' + e.message);
362
+ throw new Error('TxClient:MsgUpdateGroupMetadata: Could not create message: ' + e.message);
363
363
  }
364
364
  },
365
365
  };