decentralcardgame-cardchain-client-ts 0.0.1 → 0.0.2
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.ts +632 -632
- package/DecentralCardGame.cardchain.cardchain/registry.ts +62 -62
- package/cosmos.authz.v1beta1/module.ts +24 -24
- package/cosmos.authz.v1beta1/registry.ts +2 -2
- package/cosmos.bank.v1beta1/module.ts +24 -24
- package/cosmos.bank.v1beta1/registry.ts +2 -2
- package/cosmos.base.tendermint.v1beta1/rest.ts +3 -3
- package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/keys.ts +1 -1
- package/cosmos.base.tendermint.v1beta1/types/tendermint/types/types.ts +1 -1
- package/cosmos.distribution.v1beta1/module.ts +46 -46
- package/cosmos.distribution.v1beta1/registry.ts +4 -4
- package/cosmos.gov.v1/module.ts +29 -29
- package/cosmos.gov.v1/registry.ts +2 -2
- package/cosmos.gov.v1beta1/module.ts +47 -47
- package/cosmos.gov.v1beta1/registry.ts +4 -4
- package/cosmos.group.v1/module.ts +163 -163
- package/cosmos.group.v1/registry.ts +18 -18
- package/cosmos.group.v1/rest.ts +39 -0
- package/cosmos.group.v1/types/cosmos/group/v1/query.ts +150 -0
- package/cosmos.staking.v1beta1/module.ts +64 -64
- package/cosmos.staking.v1beta1/registry.ts +6 -6
- package/cosmos.staking.v1beta1/rest.ts +2 -2
- package/cosmos.staking.v1beta1/types/tendermint/crypto/keys.ts +1 -1
- package/cosmos.staking.v1beta1/types/tendermint/types/types.ts +1 -1
- package/cosmos.tx.v1beta1/rest.ts +3 -3
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +1 -1
- package/cosmos.tx.v1beta1/types/tendermint/crypto/keys.ts +1 -1
- package/cosmos.tx.v1beta1/types/tendermint/types/types.ts +1 -1
- package/cosmos.vesting.v1beta1/module.ts +29 -29
- package/cosmos.vesting.v1beta1/registry.ts +2 -2
- package/cosmos.vesting.v1beta1/rest.ts +4 -1
- package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/tx.ts +2 -0
- package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/vesting.ts +6 -1
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +143 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.ts +240 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +361 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.ts +234 -0
- package/ibc.applications.transfer.v1/rest.ts +7 -1
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.ts +28 -6
- package/ibc.core.client.v1/rest.ts +16 -16
- package/ibc.core.client.v1/types/ibc/core/client/v1/query.ts +1 -1
- package/ibc.core.connection.v1/rest.ts +37 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.ts +110 -1
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgVote } from "./types/cosmos/group/v1/tx";
|
|
3
|
-
import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx";
|
|
4
|
-
import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx";
|
|
5
|
-
import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx";
|
|
6
|
-
import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx";
|
|
7
|
-
import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx";
|
|
8
|
-
import { MsgCreateGroup } from "./types/cosmos/group/v1/tx";
|
|
9
|
-
import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx";
|
|
10
2
|
import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx";
|
|
11
3
|
import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx";
|
|
12
|
-
import {
|
|
4
|
+
import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx";
|
|
13
5
|
import { MsgUpdateGroupPolicyMetadata } from "./types/cosmos/group/v1/tx";
|
|
14
6
|
import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx";
|
|
7
|
+
import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx";
|
|
8
|
+
import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx";
|
|
9
|
+
import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx";
|
|
10
|
+
import { MsgCreateGroup } from "./types/cosmos/group/v1/tx";
|
|
11
|
+
import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx";
|
|
12
|
+
import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx";
|
|
15
13
|
import { MsgExec } from "./types/cosmos/group/v1/tx";
|
|
14
|
+
import { MsgVote } from "./types/cosmos/group/v1/tx";
|
|
15
|
+
import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx";
|
|
16
16
|
|
|
17
17
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
18
|
-
["/cosmos.group.v1.MsgVote", MsgVote],
|
|
19
|
-
["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal],
|
|
20
|
-
["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin],
|
|
21
|
-
["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup],
|
|
22
|
-
["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy],
|
|
23
|
-
["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy],
|
|
24
|
-
["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup],
|
|
25
|
-
["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal],
|
|
26
18
|
["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers],
|
|
27
19
|
["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin],
|
|
28
|
-
["/cosmos.group.v1.
|
|
20
|
+
["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy],
|
|
29
21
|
["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", MsgUpdateGroupPolicyMetadata],
|
|
30
22
|
["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy],
|
|
23
|
+
["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal],
|
|
24
|
+
["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal],
|
|
25
|
+
["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy],
|
|
26
|
+
["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup],
|
|
27
|
+
["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata],
|
|
28
|
+
["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin],
|
|
31
29
|
["/cosmos.group.v1.MsgExec", MsgExec],
|
|
30
|
+
["/cosmos.group.v1.MsgVote", MsgVote],
|
|
31
|
+
["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup],
|
|
32
32
|
|
|
33
33
|
];
|
|
34
34
|
|
package/cosmos.group.v1/rest.ts
CHANGED
|
@@ -545,6 +545,19 @@ export interface V1QueryGroupsByMemberResponse {
|
|
|
545
545
|
pagination?: V1Beta1PageResponse;
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
+
/**
|
|
549
|
+
* QueryGroupsResponse is the Query/Groups response type.
|
|
550
|
+
|
|
551
|
+
Since: cosmos-sdk 0.47.1
|
|
552
|
+
*/
|
|
553
|
+
export interface V1QueryGroupsResponse {
|
|
554
|
+
/** `groups` is all the groups present in state. */
|
|
555
|
+
groups?: V1GroupInfo[];
|
|
556
|
+
|
|
557
|
+
/** pagination defines the pagination in the response. */
|
|
558
|
+
pagination?: V1Beta1PageResponse;
|
|
559
|
+
}
|
|
560
|
+
|
|
548
561
|
/**
|
|
549
562
|
* QueryProposalResponse is the Query/Proposal response type.
|
|
550
563
|
*/
|
|
@@ -973,6 +986,32 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
973
986
|
...params,
|
|
974
987
|
});
|
|
975
988
|
|
|
989
|
+
/**
|
|
990
|
+
* @description Since: cosmos-sdk 0.47.1
|
|
991
|
+
*
|
|
992
|
+
* @tags Query
|
|
993
|
+
* @name QueryGroups
|
|
994
|
+
* @summary Groups queries all groups in state.
|
|
995
|
+
* @request GET:/cosmos/group/v1/groups
|
|
996
|
+
*/
|
|
997
|
+
queryGroups = (
|
|
998
|
+
query?: {
|
|
999
|
+
"pagination.key"?: string;
|
|
1000
|
+
"pagination.offset"?: string;
|
|
1001
|
+
"pagination.limit"?: string;
|
|
1002
|
+
"pagination.count_total"?: boolean;
|
|
1003
|
+
"pagination.reverse"?: boolean;
|
|
1004
|
+
},
|
|
1005
|
+
params: RequestParams = {},
|
|
1006
|
+
) =>
|
|
1007
|
+
this.request<V1QueryGroupsResponse, RpcStatus>({
|
|
1008
|
+
path: `/cosmos/group/v1/groups`,
|
|
1009
|
+
method: "GET",
|
|
1010
|
+
query: query,
|
|
1011
|
+
format: "json",
|
|
1012
|
+
...params,
|
|
1013
|
+
});
|
|
1014
|
+
|
|
976
1015
|
/**
|
|
977
1016
|
* No description
|
|
978
1017
|
*
|
|
@@ -198,6 +198,28 @@ export interface QueryTallyResultResponse {
|
|
|
198
198
|
tally: TallyResult | undefined;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* QueryGroupsRequest is the Query/Groups request type.
|
|
203
|
+
*
|
|
204
|
+
* Since: cosmos-sdk 0.47.1
|
|
205
|
+
*/
|
|
206
|
+
export interface QueryGroupsRequest {
|
|
207
|
+
/** pagination defines an optional pagination for the request. */
|
|
208
|
+
pagination: PageRequest | undefined;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* QueryGroupsResponse is the Query/Groups response type.
|
|
213
|
+
*
|
|
214
|
+
* Since: cosmos-sdk 0.47.1
|
|
215
|
+
*/
|
|
216
|
+
export interface QueryGroupsResponse {
|
|
217
|
+
/** `groups` is all the groups present in state. */
|
|
218
|
+
groups: GroupInfo[];
|
|
219
|
+
/** pagination defines the pagination in the response. */
|
|
220
|
+
pagination: PageResponse | undefined;
|
|
221
|
+
}
|
|
222
|
+
|
|
201
223
|
function createBaseQueryGroupInfoRequest(): QueryGroupInfoRequest {
|
|
202
224
|
return { groupId: 0 };
|
|
203
225
|
}
|
|
@@ -1713,6 +1735,121 @@ export const QueryTallyResultResponse = {
|
|
|
1713
1735
|
},
|
|
1714
1736
|
};
|
|
1715
1737
|
|
|
1738
|
+
function createBaseQueryGroupsRequest(): QueryGroupsRequest {
|
|
1739
|
+
return { pagination: undefined };
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
export const QueryGroupsRequest = {
|
|
1743
|
+
encode(message: QueryGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1744
|
+
if (message.pagination !== undefined) {
|
|
1745
|
+
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1746
|
+
}
|
|
1747
|
+
return writer;
|
|
1748
|
+
},
|
|
1749
|
+
|
|
1750
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsRequest {
|
|
1751
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1752
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1753
|
+
const message = createBaseQueryGroupsRequest();
|
|
1754
|
+
while (reader.pos < end) {
|
|
1755
|
+
const tag = reader.uint32();
|
|
1756
|
+
switch (tag >>> 3) {
|
|
1757
|
+
case 2:
|
|
1758
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
1759
|
+
break;
|
|
1760
|
+
default:
|
|
1761
|
+
reader.skipType(tag & 7);
|
|
1762
|
+
break;
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
return message;
|
|
1766
|
+
},
|
|
1767
|
+
|
|
1768
|
+
fromJSON(object: any): QueryGroupsRequest {
|
|
1769
|
+
return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined };
|
|
1770
|
+
},
|
|
1771
|
+
|
|
1772
|
+
toJSON(message: QueryGroupsRequest): unknown {
|
|
1773
|
+
const obj: any = {};
|
|
1774
|
+
message.pagination !== undefined
|
|
1775
|
+
&& (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
|
1776
|
+
return obj;
|
|
1777
|
+
},
|
|
1778
|
+
|
|
1779
|
+
fromPartial<I extends Exact<DeepPartial<QueryGroupsRequest>, I>>(object: I): QueryGroupsRequest {
|
|
1780
|
+
const message = createBaseQueryGroupsRequest();
|
|
1781
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1782
|
+
? PageRequest.fromPartial(object.pagination)
|
|
1783
|
+
: undefined;
|
|
1784
|
+
return message;
|
|
1785
|
+
},
|
|
1786
|
+
};
|
|
1787
|
+
|
|
1788
|
+
function createBaseQueryGroupsResponse(): QueryGroupsResponse {
|
|
1789
|
+
return { groups: [], pagination: undefined };
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
export const QueryGroupsResponse = {
|
|
1793
|
+
encode(message: QueryGroupsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1794
|
+
for (const v of message.groups) {
|
|
1795
|
+
GroupInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1796
|
+
}
|
|
1797
|
+
if (message.pagination !== undefined) {
|
|
1798
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1799
|
+
}
|
|
1800
|
+
return writer;
|
|
1801
|
+
},
|
|
1802
|
+
|
|
1803
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsResponse {
|
|
1804
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1805
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1806
|
+
const message = createBaseQueryGroupsResponse();
|
|
1807
|
+
while (reader.pos < end) {
|
|
1808
|
+
const tag = reader.uint32();
|
|
1809
|
+
switch (tag >>> 3) {
|
|
1810
|
+
case 1:
|
|
1811
|
+
message.groups.push(GroupInfo.decode(reader, reader.uint32()));
|
|
1812
|
+
break;
|
|
1813
|
+
case 2:
|
|
1814
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
1815
|
+
break;
|
|
1816
|
+
default:
|
|
1817
|
+
reader.skipType(tag & 7);
|
|
1818
|
+
break;
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
return message;
|
|
1822
|
+
},
|
|
1823
|
+
|
|
1824
|
+
fromJSON(object: any): QueryGroupsResponse {
|
|
1825
|
+
return {
|
|
1826
|
+
groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [],
|
|
1827
|
+
pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
|
|
1828
|
+
};
|
|
1829
|
+
},
|
|
1830
|
+
|
|
1831
|
+
toJSON(message: QueryGroupsResponse): unknown {
|
|
1832
|
+
const obj: any = {};
|
|
1833
|
+
if (message.groups) {
|
|
1834
|
+
obj.groups = message.groups.map((e) => e ? GroupInfo.toJSON(e) : undefined);
|
|
1835
|
+
} else {
|
|
1836
|
+
obj.groups = [];
|
|
1837
|
+
}
|
|
1838
|
+
message.pagination !== undefined
|
|
1839
|
+
&& (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
|
1840
|
+
return obj;
|
|
1841
|
+
},
|
|
1842
|
+
|
|
1843
|
+
fromPartial<I extends Exact<DeepPartial<QueryGroupsResponse>, I>>(object: I): QueryGroupsResponse {
|
|
1844
|
+
const message = createBaseQueryGroupsResponse();
|
|
1845
|
+
message.groups = object.groups?.map((e) => GroupInfo.fromPartial(e)) || [];
|
|
1846
|
+
message.pagination = (object.pagination !== undefined && object.pagination !== null)
|
|
1847
|
+
? PageResponse.fromPartial(object.pagination)
|
|
1848
|
+
: undefined;
|
|
1849
|
+
return message;
|
|
1850
|
+
},
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1716
1853
|
/** Query is the cosmos.group.v1 Query service. */
|
|
1717
1854
|
export interface Query {
|
|
1718
1855
|
/** GroupInfo queries group info based on group id. */
|
|
@@ -1747,6 +1884,12 @@ export interface Query {
|
|
|
1747
1884
|
* proposal itself.
|
|
1748
1885
|
*/
|
|
1749
1886
|
TallyResult(request: QueryTallyResultRequest): Promise<QueryTallyResultResponse>;
|
|
1887
|
+
/**
|
|
1888
|
+
* Groups queries all groups in state.
|
|
1889
|
+
*
|
|
1890
|
+
* Since: cosmos-sdk 0.47.1
|
|
1891
|
+
*/
|
|
1892
|
+
Groups(request: QueryGroupsRequest): Promise<QueryGroupsResponse>;
|
|
1750
1893
|
}
|
|
1751
1894
|
|
|
1752
1895
|
export class QueryClientImpl implements Query {
|
|
@@ -1766,6 +1909,7 @@ export class QueryClientImpl implements Query {
|
|
|
1766
1909
|
this.VotesByVoter = this.VotesByVoter.bind(this);
|
|
1767
1910
|
this.GroupsByMember = this.GroupsByMember.bind(this);
|
|
1768
1911
|
this.TallyResult = this.TallyResult.bind(this);
|
|
1912
|
+
this.Groups = this.Groups.bind(this);
|
|
1769
1913
|
}
|
|
1770
1914
|
GroupInfo(request: QueryGroupInfoRequest): Promise<QueryGroupInfoResponse> {
|
|
1771
1915
|
const data = QueryGroupInfoRequest.encode(request).finish();
|
|
@@ -1844,6 +1988,12 @@ export class QueryClientImpl implements Query {
|
|
|
1844
1988
|
const promise = this.rpc.request("cosmos.group.v1.Query", "TallyResult", data);
|
|
1845
1989
|
return promise.then((data) => QueryTallyResultResponse.decode(new _m0.Reader(data)));
|
|
1846
1990
|
}
|
|
1991
|
+
|
|
1992
|
+
Groups(request: QueryGroupsRequest): Promise<QueryGroupsResponse> {
|
|
1993
|
+
const data = QueryGroupsRequest.encode(request).finish();
|
|
1994
|
+
const promise = this.rpc.request("cosmos.group.v1.Query", "Groups", data);
|
|
1995
|
+
return promise.then((data) => QueryGroupsResponse.decode(new _m0.Reader(data)));
|
|
1996
|
+
}
|
|
1847
1997
|
}
|
|
1848
1998
|
|
|
1849
1999
|
interface Rpc {
|
|
@@ -7,12 +7,12 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
+
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
10
11
|
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
|
-
import {
|
|
12
|
+
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
12
13
|
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
14
|
+
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
13
15
|
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
14
|
-
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
15
|
-
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
16
16
|
|
|
17
17
|
import { StakeAuthorization as typeStakeAuthorization} from "./types"
|
|
18
18
|
import { StakeAuthorization_Validators as typeStakeAuthorization_Validators} from "./types"
|
|
@@ -38,7 +38,13 @@ import { RedelegationEntryResponse as typeRedelegationEntryResponse} from "./typ
|
|
|
38
38
|
import { RedelegationResponse as typeRedelegationResponse} from "./types"
|
|
39
39
|
import { Pool as typePool} from "./types"
|
|
40
40
|
|
|
41
|
-
export { MsgDelegate,
|
|
41
|
+
export { MsgUndelegate, MsgDelegate, MsgBeginRedelegate, MsgEditValidator, MsgCreateValidator, MsgCancelUnbondingDelegation };
|
|
42
|
+
|
|
43
|
+
type sendMsgUndelegateParams = {
|
|
44
|
+
value: MsgUndelegate,
|
|
45
|
+
fee?: StdFee,
|
|
46
|
+
memo?: string
|
|
47
|
+
};
|
|
42
48
|
|
|
43
49
|
type sendMsgDelegateParams = {
|
|
44
50
|
value: MsgDelegate,
|
|
@@ -46,8 +52,8 @@ type sendMsgDelegateParams = {
|
|
|
46
52
|
memo?: string
|
|
47
53
|
};
|
|
48
54
|
|
|
49
|
-
type
|
|
50
|
-
value:
|
|
55
|
+
type sendMsgBeginRedelegateParams = {
|
|
56
|
+
value: MsgBeginRedelegate,
|
|
51
57
|
fee?: StdFee,
|
|
52
58
|
memo?: string
|
|
53
59
|
};
|
|
@@ -58,47 +64,41 @@ type sendMsgEditValidatorParams = {
|
|
|
58
64
|
memo?: string
|
|
59
65
|
};
|
|
60
66
|
|
|
61
|
-
type
|
|
62
|
-
value:
|
|
67
|
+
type sendMsgCreateValidatorParams = {
|
|
68
|
+
value: MsgCreateValidator,
|
|
63
69
|
fee?: StdFee,
|
|
64
70
|
memo?: string
|
|
65
71
|
};
|
|
66
72
|
|
|
67
|
-
type
|
|
68
|
-
value:
|
|
73
|
+
type sendMsgCancelUnbondingDelegationParams = {
|
|
74
|
+
value: MsgCancelUnbondingDelegation,
|
|
69
75
|
fee?: StdFee,
|
|
70
76
|
memo?: string
|
|
71
77
|
};
|
|
72
78
|
|
|
73
|
-
|
|
79
|
+
|
|
80
|
+
type msgUndelegateParams = {
|
|
74
81
|
value: MsgUndelegate,
|
|
75
|
-
fee?: StdFee,
|
|
76
|
-
memo?: string
|
|
77
82
|
};
|
|
78
83
|
|
|
79
|
-
|
|
80
84
|
type msgDelegateParams = {
|
|
81
85
|
value: MsgDelegate,
|
|
82
86
|
};
|
|
83
87
|
|
|
84
|
-
type
|
|
85
|
-
value:
|
|
88
|
+
type msgBeginRedelegateParams = {
|
|
89
|
+
value: MsgBeginRedelegate,
|
|
86
90
|
};
|
|
87
91
|
|
|
88
92
|
type msgEditValidatorParams = {
|
|
89
93
|
value: MsgEditValidator,
|
|
90
94
|
};
|
|
91
95
|
|
|
92
|
-
type
|
|
93
|
-
value:
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
type msgBeginRedelegateParams = {
|
|
97
|
-
value: MsgBeginRedelegate,
|
|
96
|
+
type msgCreateValidatorParams = {
|
|
97
|
+
value: MsgCreateValidator,
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
type
|
|
101
|
-
value:
|
|
100
|
+
type msgCancelUnbondingDelegationParams = {
|
|
101
|
+
value: MsgCancelUnbondingDelegation,
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
|
|
@@ -131,6 +131,20 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
131
131
|
|
|
132
132
|
return {
|
|
133
133
|
|
|
134
|
+
async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise<DeliverTxResponse> {
|
|
135
|
+
if (!signer) {
|
|
136
|
+
throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.')
|
|
137
|
+
}
|
|
138
|
+
try {
|
|
139
|
+
const { address } = (await signer.getAccounts())[0];
|
|
140
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
141
|
+
let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) })
|
|
142
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
143
|
+
} catch (e: any) {
|
|
144
|
+
throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message)
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
|
|
134
148
|
async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise<DeliverTxResponse> {
|
|
135
149
|
if (!signer) {
|
|
136
150
|
throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.')
|
|
@@ -145,17 +159,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
145
159
|
}
|
|
146
160
|
},
|
|
147
161
|
|
|
148
|
-
async
|
|
162
|
+
async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise<DeliverTxResponse> {
|
|
149
163
|
if (!signer) {
|
|
150
|
-
throw new Error('TxClient:
|
|
164
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.')
|
|
151
165
|
}
|
|
152
166
|
try {
|
|
153
167
|
const { address } = (await signer.getAccounts())[0];
|
|
154
168
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
155
|
-
let msg = this.
|
|
169
|
+
let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) })
|
|
156
170
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
157
171
|
} catch (e: any) {
|
|
158
|
-
throw new Error('TxClient:
|
|
172
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message)
|
|
159
173
|
}
|
|
160
174
|
},
|
|
161
175
|
|
|
@@ -173,49 +187,43 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
173
187
|
}
|
|
174
188
|
},
|
|
175
189
|
|
|
176
|
-
async
|
|
190
|
+
async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise<DeliverTxResponse> {
|
|
177
191
|
if (!signer) {
|
|
178
|
-
throw new Error('TxClient:
|
|
192
|
+
throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.')
|
|
179
193
|
}
|
|
180
194
|
try {
|
|
181
195
|
const { address } = (await signer.getAccounts())[0];
|
|
182
196
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
183
|
-
let msg = this.
|
|
197
|
+
let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) })
|
|
184
198
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
185
199
|
} catch (e: any) {
|
|
186
|
-
throw new Error('TxClient:
|
|
200
|
+
throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message)
|
|
187
201
|
}
|
|
188
202
|
},
|
|
189
203
|
|
|
190
|
-
async
|
|
204
|
+
async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise<DeliverTxResponse> {
|
|
191
205
|
if (!signer) {
|
|
192
|
-
throw new Error('TxClient:
|
|
206
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.')
|
|
193
207
|
}
|
|
194
208
|
try {
|
|
195
209
|
const { address } = (await signer.getAccounts())[0];
|
|
196
210
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
197
|
-
let msg = this.
|
|
211
|
+
let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) })
|
|
198
212
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
199
213
|
} catch (e: any) {
|
|
200
|
-
throw new Error('TxClient:
|
|
214
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message)
|
|
201
215
|
}
|
|
202
216
|
},
|
|
203
217
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
try {
|
|
209
|
-
const { address } = (await signer.getAccounts())[0];
|
|
210
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
211
|
-
let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) })
|
|
212
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
218
|
+
|
|
219
|
+
msgUndelegate({ value }: msgUndelegateParams): EncodeObject {
|
|
220
|
+
try {
|
|
221
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) }
|
|
213
222
|
} catch (e: any) {
|
|
214
|
-
throw new Error('TxClient:
|
|
223
|
+
throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message)
|
|
215
224
|
}
|
|
216
225
|
},
|
|
217
226
|
|
|
218
|
-
|
|
219
227
|
msgDelegate({ value }: msgDelegateParams): EncodeObject {
|
|
220
228
|
try {
|
|
221
229
|
return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) }
|
|
@@ -224,11 +232,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
224
232
|
}
|
|
225
233
|
},
|
|
226
234
|
|
|
227
|
-
|
|
235
|
+
msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject {
|
|
228
236
|
try {
|
|
229
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
237
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) }
|
|
230
238
|
} catch (e: any) {
|
|
231
|
-
throw new Error('TxClient:
|
|
239
|
+
throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message)
|
|
232
240
|
}
|
|
233
241
|
},
|
|
234
242
|
|
|
@@ -240,27 +248,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
240
248
|
}
|
|
241
249
|
},
|
|
242
250
|
|
|
243
|
-
|
|
244
|
-
try {
|
|
245
|
-
return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) }
|
|
246
|
-
} catch (e: any) {
|
|
247
|
-
throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message)
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject {
|
|
251
|
+
msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject {
|
|
252
252
|
try {
|
|
253
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
253
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) }
|
|
254
254
|
} catch (e: any) {
|
|
255
|
-
throw new Error('TxClient:
|
|
255
|
+
throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message)
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject {
|
|
260
260
|
try {
|
|
261
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
261
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) }
|
|
262
262
|
} catch (e: any) {
|
|
263
|
-
throw new Error('TxClient:
|
|
263
|
+
throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message)
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
266
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
+
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
2
3
|
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
3
|
-
import {
|
|
4
|
+
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
4
5
|
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
6
|
+
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
5
7
|
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
6
|
-
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
7
|
-
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
8
8
|
|
|
9
9
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
10
|
+
["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate],
|
|
10
11
|
["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
|
|
11
|
-
["/cosmos.staking.v1beta1.
|
|
12
|
+
["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
|
|
12
13
|
["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
|
|
14
|
+
["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator],
|
|
13
15
|
["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation],
|
|
14
|
-
["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
|
|
15
|
-
["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate],
|
|
16
16
|
|
|
17
17
|
];
|
|
18
18
|
|
|
@@ -192,7 +192,7 @@ export interface TypesBlockID {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* Header defines the structure of a
|
|
195
|
+
* Header defines the structure of a block header.
|
|
196
196
|
*/
|
|
197
197
|
export interface TypesHeader {
|
|
198
198
|
/**
|
|
@@ -398,7 +398,7 @@ recent HistoricalInfo
|
|
|
398
398
|
(`n` is set by the staking module's `historical_entries` parameter).
|
|
399
399
|
*/
|
|
400
400
|
export interface V1Beta1HistoricalInfo {
|
|
401
|
-
/** Header defines the structure of a
|
|
401
|
+
/** Header defines the structure of a block header. */
|
|
402
402
|
header?: TypesHeader;
|
|
403
403
|
valset?: Stakingv1Beta1Validator[];
|
|
404
404
|
}
|
|
@@ -3,7 +3,7 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
|
|
4
4
|
export const protobufPackage = "tendermint.crypto";
|
|
5
5
|
|
|
6
|
-
/** PublicKey defines the keys available for use with
|
|
6
|
+
/** PublicKey defines the keys available for use with Validators */
|
|
7
7
|
export interface PublicKey {
|
|
8
8
|
ed25519: Uint8Array | undefined;
|
|
9
9
|
secp256k1: Uint8Array | undefined;
|
|
@@ -120,7 +120,7 @@ export interface BlockID {
|
|
|
120
120
|
partSetHeader: PartSetHeader | undefined;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
/** Header defines the structure of a
|
|
123
|
+
/** Header defines the structure of a block header. */
|
|
124
124
|
export interface Header {
|
|
125
125
|
/** basic block info */
|
|
126
126
|
version: Consensus | undefined;
|
|
@@ -222,7 +222,7 @@ export interface TenderminttypesValidator {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
export interface TypesBlock {
|
|
225
|
-
/** Header defines the structure of a
|
|
225
|
+
/** Header defines the structure of a block header. */
|
|
226
226
|
header?: TypesHeader;
|
|
227
227
|
data?: TenderminttypesData;
|
|
228
228
|
evidence?: TypesEvidenceList;
|
|
@@ -304,7 +304,7 @@ export interface TypesEvidenceList {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
|
-
* Header defines the structure of a
|
|
307
|
+
* Header defines the structure of a block header.
|
|
308
308
|
*/
|
|
309
309
|
export interface TypesHeader {
|
|
310
310
|
/**
|
|
@@ -414,7 +414,7 @@ export interface TypesPartSetHeader {
|
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
export interface TypesSignedHeader {
|
|
417
|
-
/** Header defines the structure of a
|
|
417
|
+
/** Header defines the structure of a block header. */
|
|
418
418
|
header?: TypesHeader;
|
|
419
419
|
|
|
420
420
|
/** Commit contains the evidence that a block was committed by a set of validators. */
|
|
@@ -270,7 +270,7 @@ export interface ResponseCheckTx {
|
|
|
270
270
|
sender: string;
|
|
271
271
|
priority: number;
|
|
272
272
|
/**
|
|
273
|
-
* mempool_error is set by
|
|
273
|
+
* mempool_error is set by CometBFT.
|
|
274
274
|
* ABCI applictions creating a ResponseCheckTX should not set mempool_error.
|
|
275
275
|
*/
|
|
276
276
|
mempoolError: string;
|
|
@@ -3,7 +3,7 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
|
|
4
4
|
export const protobufPackage = "tendermint.crypto";
|
|
5
5
|
|
|
6
|
-
/** PublicKey defines the keys available for use with
|
|
6
|
+
/** PublicKey defines the keys available for use with Validators */
|
|
7
7
|
export interface PublicKey {
|
|
8
8
|
ed25519: Uint8Array | undefined;
|
|
9
9
|
secp256k1: Uint8Array | undefined;
|
|
@@ -120,7 +120,7 @@ export interface BlockID {
|
|
|
120
120
|
partSetHeader: PartSetHeader | undefined;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
/** Header defines the structure of a
|
|
123
|
+
/** Header defines the structure of a block header. */
|
|
124
124
|
export interface Header {
|
|
125
125
|
/** basic block info */
|
|
126
126
|
version: Consensus | undefined;
|