mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Add MsgDelegate
This commit is contained in:
parent
6b52d376b5
commit
33d55e6923
@ -93,6 +93,7 @@ export function main(originalArgs: readonly string[]): void {
|
||||
"IndexedTx",
|
||||
"Coin",
|
||||
"Msg",
|
||||
"MsgDelegate",
|
||||
"MsgSend",
|
||||
"Pen",
|
||||
"PubKey",
|
||||
|
@ -30,7 +30,7 @@ export {
|
||||
SearchTxsResponse,
|
||||
TxsResponse,
|
||||
} from "./restclient";
|
||||
export { isMsgSend, Msg, MsgSend } from "./msgs";
|
||||
export { isMsgDelegate, isMsgSend, Msg, MsgDelegate, MsgSend } from "./msgs";
|
||||
export { Pen, Secp256k1Pen, makeCosmoshubPath } from "./pen";
|
||||
export { decodeBech32Pubkey, encodeBech32Pubkey, encodeSecp256k1Pubkey } from "./pubkey";
|
||||
export { findSequenceForSignedTx } from "./sequence";
|
||||
|
@ -20,3 +20,23 @@ export interface MsgSend extends Msg {
|
||||
export function isMsgSend(msg: Msg): msg is MsgSend {
|
||||
return (msg as MsgSend).type === "cosmos-sdk/MsgSend";
|
||||
}
|
||||
|
||||
/**
|
||||
* A Cosmos SDK MsgDelegate
|
||||
*
|
||||
* @see https://docs.cosmos.network/master/modules/staking/03_messages.html#msgdelegate
|
||||
*/
|
||||
export interface MsgDelegate extends Msg {
|
||||
readonly type: "cosmos-sdk/MsgDelegate";
|
||||
readonly value: {
|
||||
/** Bech32 encoded delegator address */
|
||||
readonly delegator_address: string;
|
||||
/** Bech32 encoded validator address */
|
||||
readonly validator_address: string;
|
||||
readonly amount: Coin;
|
||||
};
|
||||
}
|
||||
|
||||
export function isMsgDelegate(msg: Msg): msg is MsgDelegate {
|
||||
return (msg as MsgDelegate).type === "cosmos-sdk/MsgDelegate";
|
||||
}
|
||||
|
2
packages/sdk38/types/index.d.ts
vendored
2
packages/sdk38/types/index.d.ts
vendored
@ -28,7 +28,7 @@ export {
|
||||
SearchTxsResponse,
|
||||
TxsResponse,
|
||||
} from "./restclient";
|
||||
export { isMsgSend, Msg, MsgSend } from "./msgs";
|
||||
export { isMsgDelegate, isMsgSend, Msg, MsgDelegate, MsgSend } from "./msgs";
|
||||
export { Pen, Secp256k1Pen, makeCosmoshubPath } from "./pen";
|
||||
export { decodeBech32Pubkey, encodeBech32Pubkey, encodeSecp256k1Pubkey } from "./pubkey";
|
||||
export { findSequenceForSignedTx } from "./sequence";
|
||||
|
16
packages/sdk38/types/msgs.d.ts
vendored
16
packages/sdk38/types/msgs.d.ts
vendored
@ -15,3 +15,19 @@ export interface MsgSend extends Msg {
|
||||
};
|
||||
}
|
||||
export declare function isMsgSend(msg: Msg): msg is MsgSend;
|
||||
/**
|
||||
* A Cosmos SDK MsgDelegate
|
||||
*
|
||||
* @see https://docs.cosmos.network/master/modules/staking/03_messages.html#msgdelegate
|
||||
*/
|
||||
export interface MsgDelegate extends Msg {
|
||||
readonly type: "cosmos-sdk/MsgDelegate";
|
||||
readonly value: {
|
||||
/** Bech32 encoded delegator address */
|
||||
readonly delegator_address: string;
|
||||
/** Bech32 encoded validator address */
|
||||
readonly validator_address: string;
|
||||
readonly amount: Coin;
|
||||
};
|
||||
}
|
||||
export declare function isMsgDelegate(msg: Msg): msg is MsgDelegate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user