decentralcardgame-cardchain-client-ts 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DecentralCardGame.cardchain.cardchain/module.js +1044 -0
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -70
- package/DecentralCardGame.cardchain.cardchain/rest.js +1 -1
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +30 -6
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +11 -17
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +1 -217
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +166 -8
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +7 -65
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.js +30 -10
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.js +4137 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +22 -21
- package/client.js +2 -1
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.distribution.v1beta1/module.js +24 -24
- package/cosmos.distribution.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1/module.js +31 -31
- package/cosmos.gov.v1/registry.js +4 -4
- package/cosmos.gov.v1beta1/module.js +22 -22
- package/cosmos.gov.v1beta1/registry.js +2 -2
- package/cosmos.group.v1/module.js +102 -102
- package/cosmos.group.v1/registry.js +14 -14
- package/cosmos.group.v1/rest.js +15 -0
- package/cosmos.group.v1/types/cosmos/group/v1/query.js +110 -0
- package/cosmos.staking.v1beta1/module.js +40 -40
- package/cosmos.staking.v1beta1/registry.js +8 -8
- package/cosmos.vesting.v1beta1/module.js +16 -16
- package/cosmos.vesting.v1beta1/registry.js +2 -2
- package/ibc.applications.interchain_accounts.controller.v1/rest.js +9 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.js +99 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +266 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.js +192 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.js +24 -6
- package/ibc.core.client.v1/rest.js +14 -14
- package/ibc.core.connection.v1/rest.js +14 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.js +83 -1
- package/package.json +2 -2
- package/tsconfig.json +0 -1
|
@@ -3,12 +3,12 @@ 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 {
|
|
7
|
-
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
6
|
+
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
8
7
|
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
9
|
-
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
10
8
|
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
|
-
import {
|
|
9
|
+
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
10
|
+
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
|
+
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
12
12
|
import { StakeAuthorization as typeStakeAuthorization } from "./types";
|
|
13
13
|
import { StakeAuthorization_Validators as typeStakeAuthorization_Validators } from "./types";
|
|
14
14
|
import { LastValidatorPower as typeLastValidatorPower } from "./types";
|
|
@@ -32,7 +32,7 @@ import { DelegationResponse as typeDelegationResponse } from "./types";
|
|
|
32
32
|
import { RedelegationEntryResponse as typeRedelegationEntryResponse } from "./types";
|
|
33
33
|
import { RedelegationResponse as typeRedelegationResponse } from "./types";
|
|
34
34
|
import { Pool as typePool } from "./types";
|
|
35
|
-
export {
|
|
35
|
+
export { MsgUndelegate, MsgDelegate, MsgBeginRedelegate, MsgEditValidator, MsgCreateValidator, MsgCancelUnbondingDelegation };
|
|
36
36
|
export const registry = new Registry(msgTypes);
|
|
37
37
|
function getStructure(template) {
|
|
38
38
|
const structure = { fields: [] };
|
|
@@ -48,46 +48,46 @@ const defaultFee = {
|
|
|
48
48
|
};
|
|
49
49
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
50
50
|
return {
|
|
51
|
-
async
|
|
51
|
+
async sendMsgUndelegate({ value, fee, memo }) {
|
|
52
52
|
if (!signer) {
|
|
53
|
-
throw new Error('TxClient:
|
|
53
|
+
throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.');
|
|
54
54
|
}
|
|
55
55
|
try {
|
|
56
56
|
const { address } = (await signer.getAccounts())[0];
|
|
57
57
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
58
|
-
let msg = this.
|
|
58
|
+
let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) });
|
|
59
59
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
60
60
|
}
|
|
61
61
|
catch (e) {
|
|
62
|
-
throw new Error('TxClient:
|
|
62
|
+
throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: ' + e.message);
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
async
|
|
65
|
+
async sendMsgDelegate({ value, fee, memo }) {
|
|
66
66
|
if (!signer) {
|
|
67
|
-
throw new Error('TxClient:
|
|
67
|
+
throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.');
|
|
68
68
|
}
|
|
69
69
|
try {
|
|
70
70
|
const { address } = (await signer.getAccounts())[0];
|
|
71
71
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
72
|
-
let msg = this.
|
|
72
|
+
let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) });
|
|
73
73
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
74
74
|
}
|
|
75
75
|
catch (e) {
|
|
76
|
-
throw new Error('TxClient:
|
|
76
|
+
throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: ' + e.message);
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
async
|
|
79
|
+
async sendMsgBeginRedelegate({ value, fee, memo }) {
|
|
80
80
|
if (!signer) {
|
|
81
|
-
throw new Error('TxClient:
|
|
81
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.');
|
|
82
82
|
}
|
|
83
83
|
try {
|
|
84
84
|
const { address } = (await signer.getAccounts())[0];
|
|
85
85
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
86
|
-
let msg = this.
|
|
86
|
+
let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) });
|
|
87
87
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
88
88
|
}
|
|
89
89
|
catch (e) {
|
|
90
|
-
throw new Error('TxClient:
|
|
90
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: ' + e.message);
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
async sendMsgEditValidator({ value, fee, memo }) {
|
|
@@ -104,56 +104,56 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
104
104
|
throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: ' + e.message);
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
async
|
|
107
|
+
async sendMsgCreateValidator({ value, fee, memo }) {
|
|
108
108
|
if (!signer) {
|
|
109
|
-
throw new Error('TxClient:
|
|
109
|
+
throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.');
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
112
|
const { address } = (await signer.getAccounts())[0];
|
|
113
113
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
114
|
-
let msg = this.
|
|
114
|
+
let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) });
|
|
115
115
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
116
116
|
}
|
|
117
117
|
catch (e) {
|
|
118
|
-
throw new Error('TxClient:
|
|
118
|
+
throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: ' + e.message);
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
async
|
|
121
|
+
async sendMsgCancelUnbondingDelegation({ value, fee, memo }) {
|
|
122
122
|
if (!signer) {
|
|
123
|
-
throw new Error('TxClient:
|
|
123
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.');
|
|
124
124
|
}
|
|
125
125
|
try {
|
|
126
126
|
const { address } = (await signer.getAccounts())[0];
|
|
127
127
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
128
|
-
let msg = this.
|
|
128
|
+
let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) });
|
|
129
129
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
130
130
|
}
|
|
131
131
|
catch (e) {
|
|
132
|
-
throw new Error('TxClient:
|
|
132
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: ' + e.message);
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
|
-
|
|
135
|
+
msgUndelegate({ value }) {
|
|
136
136
|
try {
|
|
137
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
137
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial(value) };
|
|
138
138
|
}
|
|
139
139
|
catch (e) {
|
|
140
|
-
throw new Error('TxClient:
|
|
140
|
+
throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message);
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
|
|
143
|
+
msgDelegate({ value }) {
|
|
144
144
|
try {
|
|
145
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
145
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial(value) };
|
|
146
146
|
}
|
|
147
147
|
catch (e) {
|
|
148
|
-
throw new Error('TxClient:
|
|
148
|
+
throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message);
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
|
|
151
|
+
msgBeginRedelegate({ value }) {
|
|
152
152
|
try {
|
|
153
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
153
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial(value) };
|
|
154
154
|
}
|
|
155
155
|
catch (e) {
|
|
156
|
-
throw new Error('TxClient:
|
|
156
|
+
throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message);
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
msgEditValidator({ value }) {
|
|
@@ -164,20 +164,20 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
164
164
|
throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message);
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
|
|
167
|
+
msgCreateValidator({ value }) {
|
|
168
168
|
try {
|
|
169
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
169
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial(value) };
|
|
170
170
|
}
|
|
171
171
|
catch (e) {
|
|
172
|
-
throw new Error('TxClient:
|
|
172
|
+
throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message);
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
|
|
175
|
+
msgCancelUnbondingDelegation({ value }) {
|
|
176
176
|
try {
|
|
177
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
177
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial(value) };
|
|
178
178
|
}
|
|
179
179
|
catch (e) {
|
|
180
|
-
throw new Error('TxClient:
|
|
180
|
+
throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message);
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
183
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
1
|
+
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
3
2
|
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
4
|
-
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
5
3
|
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
6
|
-
import {
|
|
4
|
+
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
5
|
+
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
6
|
+
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
7
7
|
const msgTypes = [
|
|
8
|
-
["/cosmos.staking.v1beta1.
|
|
9
|
-
["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation],
|
|
8
|
+
["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate],
|
|
10
9
|
["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
|
|
11
|
-
["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
|
|
12
10
|
["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
|
|
13
|
-
["/cosmos.staking.v1beta1.
|
|
11
|
+
["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
|
|
12
|
+
["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator],
|
|
13
|
+
["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation],
|
|
14
14
|
];
|
|
15
15
|
export { msgTypes };
|
|
@@ -3,8 +3,8 @@ 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 { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
7
6
|
import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
7
|
+
import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
8
8
|
import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
9
9
|
import { BaseVestingAccount as typeBaseVestingAccount } from "./types";
|
|
10
10
|
import { ContinuousVestingAccount as typeContinuousVestingAccount } from "./types";
|
|
@@ -12,7 +12,7 @@ import { DelayedVestingAccount as typeDelayedVestingAccount } from "./types";
|
|
|
12
12
|
import { Period as typePeriod } from "./types";
|
|
13
13
|
import { PeriodicVestingAccount as typePeriodicVestingAccount } from "./types";
|
|
14
14
|
import { PermanentLockedAccount as typePermanentLockedAccount } from "./types";
|
|
15
|
-
export {
|
|
15
|
+
export { MsgCreatePermanentLockedAccount, MsgCreateVestingAccount, MsgCreatePeriodicVestingAccount };
|
|
16
16
|
export const registry = new Registry(msgTypes);
|
|
17
17
|
function getStructure(template) {
|
|
18
18
|
const structure = { fields: [] };
|
|
@@ -28,32 +28,32 @@ const defaultFee = {
|
|
|
28
28
|
};
|
|
29
29
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
30
30
|
return {
|
|
31
|
-
async
|
|
31
|
+
async sendMsgCreatePermanentLockedAccount({ value, fee, memo }) {
|
|
32
32
|
if (!signer) {
|
|
33
|
-
throw new Error('TxClient:
|
|
33
|
+
throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Unable to sign Tx. Signer is not present.');
|
|
34
34
|
}
|
|
35
35
|
try {
|
|
36
36
|
const { address } = (await signer.getAccounts())[0];
|
|
37
37
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
38
|
-
let msg = this.
|
|
38
|
+
let msg = this.msgCreatePermanentLockedAccount({ value: MsgCreatePermanentLockedAccount.fromPartial(value) });
|
|
39
39
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
40
40
|
}
|
|
41
41
|
catch (e) {
|
|
42
|
-
throw new Error('TxClient:
|
|
42
|
+
throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Could not broadcast Tx: ' + e.message);
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
async
|
|
45
|
+
async sendMsgCreateVestingAccount({ value, fee, memo }) {
|
|
46
46
|
if (!signer) {
|
|
47
|
-
throw new Error('TxClient:
|
|
47
|
+
throw new Error('TxClient:sendMsgCreateVestingAccount: Unable to sign Tx. Signer is not present.');
|
|
48
48
|
}
|
|
49
49
|
try {
|
|
50
50
|
const { address } = (await signer.getAccounts())[0];
|
|
51
51
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
52
|
-
let msg = this.
|
|
52
|
+
let msg = this.msgCreateVestingAccount({ value: MsgCreateVestingAccount.fromPartial(value) });
|
|
53
53
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
54
54
|
}
|
|
55
55
|
catch (e) {
|
|
56
|
-
throw new Error('TxClient:
|
|
56
|
+
throw new Error('TxClient:sendMsgCreateVestingAccount: Could not broadcast Tx: ' + e.message);
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
async sendMsgCreatePeriodicVestingAccount({ value, fee, memo }) {
|
|
@@ -70,20 +70,20 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
70
70
|
throw new Error('TxClient:sendMsgCreatePeriodicVestingAccount: Could not broadcast Tx: ' + e.message);
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
msgCreatePermanentLockedAccount({ value }) {
|
|
74
74
|
try {
|
|
75
|
-
return { typeUrl: "/cosmos.vesting.v1beta1.
|
|
75
|
+
return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.fromPartial(value) };
|
|
76
76
|
}
|
|
77
77
|
catch (e) {
|
|
78
|
-
throw new Error('TxClient:
|
|
78
|
+
throw new Error('TxClient:MsgCreatePermanentLockedAccount: Could not create message: ' + e.message);
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
|
|
81
|
+
msgCreateVestingAccount({ value }) {
|
|
82
82
|
try {
|
|
83
|
-
return { typeUrl: "/cosmos.vesting.v1beta1.
|
|
83
|
+
return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.fromPartial(value) };
|
|
84
84
|
}
|
|
85
85
|
catch (e) {
|
|
86
|
-
throw new Error('TxClient:
|
|
86
|
+
throw new Error('TxClient:MsgCreateVestingAccount: Could not create message: ' + e.message);
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
msgCreatePeriodicVestingAccount({ value }) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
2
1
|
import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
2
|
+
import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
3
3
|
import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx";
|
|
4
4
|
const msgTypes = [
|
|
5
|
-
["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount],
|
|
6
5
|
["/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", MsgCreatePermanentLockedAccount],
|
|
6
|
+
["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount],
|
|
7
7
|
["/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", MsgCreatePeriodicVestingAccount],
|
|
8
8
|
];
|
|
9
9
|
export { msgTypes };
|
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* - TYPE_UNSPECIFIED: Default zero value enumeration
|
|
13
|
+
- TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain
|
|
14
|
+
*/
|
|
15
|
+
export var InterchainAccountsv1Type;
|
|
16
|
+
(function (InterchainAccountsv1Type) {
|
|
17
|
+
InterchainAccountsv1Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
18
|
+
InterchainAccountsv1Type["TYPE_EXECUTE_TX"] = "TYPE_EXECUTE_TX";
|
|
19
|
+
})(InterchainAccountsv1Type || (InterchainAccountsv1Type = {}));
|
|
11
20
|
import axios from "axios";
|
|
12
21
|
export var ContentType;
|
|
13
22
|
(function (ContentType) {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
export const protobufPackage = "google.protobuf";
|
|
4
|
+
function createBaseAny() {
|
|
5
|
+
return { typeUrl: "", value: new Uint8Array() };
|
|
6
|
+
}
|
|
7
|
+
export const Any = {
|
|
8
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
9
|
+
if (message.typeUrl !== "") {
|
|
10
|
+
writer.uint32(10).string(message.typeUrl);
|
|
11
|
+
}
|
|
12
|
+
if (message.value.length !== 0) {
|
|
13
|
+
writer.uint32(18).bytes(message.value);
|
|
14
|
+
}
|
|
15
|
+
return writer;
|
|
16
|
+
},
|
|
17
|
+
decode(input, length) {
|
|
18
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
19
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
20
|
+
const message = createBaseAny();
|
|
21
|
+
while (reader.pos < end) {
|
|
22
|
+
const tag = reader.uint32();
|
|
23
|
+
switch (tag >>> 3) {
|
|
24
|
+
case 1:
|
|
25
|
+
message.typeUrl = reader.string();
|
|
26
|
+
break;
|
|
27
|
+
case 2:
|
|
28
|
+
message.value = reader.bytes();
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
reader.skipType(tag & 7);
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return message;
|
|
36
|
+
},
|
|
37
|
+
fromJSON(object) {
|
|
38
|
+
return {
|
|
39
|
+
typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",
|
|
40
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
toJSON(message) {
|
|
44
|
+
const obj = {};
|
|
45
|
+
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
|
|
46
|
+
message.value !== undefined
|
|
47
|
+
&& (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
|
48
|
+
return obj;
|
|
49
|
+
},
|
|
50
|
+
fromPartial(object) {
|
|
51
|
+
const message = createBaseAny();
|
|
52
|
+
message.typeUrl = object.typeUrl ?? "";
|
|
53
|
+
message.value = object.value ?? new Uint8Array();
|
|
54
|
+
return message;
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
var globalThis = (() => {
|
|
58
|
+
if (typeof globalThis !== "undefined") {
|
|
59
|
+
return globalThis;
|
|
60
|
+
}
|
|
61
|
+
if (typeof self !== "undefined") {
|
|
62
|
+
return self;
|
|
63
|
+
}
|
|
64
|
+
if (typeof window !== "undefined") {
|
|
65
|
+
return window;
|
|
66
|
+
}
|
|
67
|
+
if (typeof global !== "undefined") {
|
|
68
|
+
return global;
|
|
69
|
+
}
|
|
70
|
+
throw "Unable to locate global object";
|
|
71
|
+
})();
|
|
72
|
+
function bytesFromBase64(b64) {
|
|
73
|
+
if (globalThis.Buffer) {
|
|
74
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const bin = globalThis.atob(b64);
|
|
78
|
+
const arr = new Uint8Array(bin.length);
|
|
79
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
80
|
+
arr[i] = bin.charCodeAt(i);
|
|
81
|
+
}
|
|
82
|
+
return arr;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function base64FromBytes(arr) {
|
|
86
|
+
if (globalThis.Buffer) {
|
|
87
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const bin = [];
|
|
91
|
+
arr.forEach((byte) => {
|
|
92
|
+
bin.push(String.fromCharCode(byte));
|
|
93
|
+
});
|
|
94
|
+
return globalThis.btoa(bin.join(""));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function isSet(value) {
|
|
98
|
+
return value !== null && value !== undefined;
|
|
99
|
+
}
|