interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
1,412 lines (1,411 loc) • 56.8 kB
TypeScript
import { Header, HeaderAmino } from "../../../tendermint/types/types";
import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
import { Duration, DurationAmino } from "../../../google/protobuf/duration";
import { Coin, CoinAmino } from "../../base/v1beta1/coin";
import { ValidatorUpdate, ValidatorUpdateAmino } from "../../../tendermint/abci/types";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { DeepPartial } from "../../../helpers";
/** BondStatus is the status of a validator. */
export declare enum BondStatus {
/** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */
BOND_STATUS_UNSPECIFIED = 0,
/** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */
BOND_STATUS_UNBONDED = 1,
/** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */
BOND_STATUS_UNBONDING = 2,
/** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */
BOND_STATUS_BONDED = 3,
UNRECOGNIZED = -1
}
export declare const BondStatusAmino: typeof BondStatus;
export declare function bondStatusFromJSON(object: any): BondStatus;
export declare function bondStatusToJSON(object: BondStatus): string;
/** Infraction indicates the infraction a validator commited. */
export declare enum Infraction {
/** INFRACTION_UNSPECIFIED - UNSPECIFIED defines an empty infraction. */
INFRACTION_UNSPECIFIED = 0,
/** INFRACTION_DOUBLE_SIGN - DOUBLE_SIGN defines a validator that double-signs a block. */
INFRACTION_DOUBLE_SIGN = 1,
/** INFRACTION_DOWNTIME - DOWNTIME defines a validator that missed signing too many blocks. */
INFRACTION_DOWNTIME = 2,
UNRECOGNIZED = -1
}
export declare const InfractionAmino: typeof Infraction;
export declare function infractionFromJSON(object: any): Infraction;
export declare function infractionToJSON(object: Infraction): string;
/**
* HistoricalInfo contains header and validator information for a given block.
* It is stored as part of staking module's state, which persists the `n` most
* recent HistoricalInfo
* (`n` is set by the staking module's `historical_entries` parameter).
* @name HistoricalInfo
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.HistoricalInfo
*/
export interface HistoricalInfo {
header: Header;
valset: Validator[];
}
export interface HistoricalInfoProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.HistoricalInfo";
value: Uint8Array;
}
/**
* HistoricalInfo contains header and validator information for a given block.
* It is stored as part of staking module's state, which persists the `n` most
* recent HistoricalInfo
* (`n` is set by the staking module's `historical_entries` parameter).
* @name HistoricalInfoAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.HistoricalInfo
*/
export interface HistoricalInfoAmino {
header: HeaderAmino;
valset: ValidatorAmino[];
}
export interface HistoricalInfoAminoMsg {
type: "cosmos-sdk/HistoricalInfo";
value: HistoricalInfoAmino;
}
/**
* CommissionRates defines the initial commission rates to be used for creating
* a validator.
* @name CommissionRates
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.CommissionRates
*/
export interface CommissionRates {
/**
* rate is the commission rate charged to delegators, as a fraction.
*/
rate: string;
/**
* max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
*/
maxRate: string;
/**
* max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
*/
maxChangeRate: string;
}
export interface CommissionRatesProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.CommissionRates";
value: Uint8Array;
}
/**
* CommissionRates defines the initial commission rates to be used for creating
* a validator.
* @name CommissionRatesAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.CommissionRates
*/
export interface CommissionRatesAmino {
/**
* rate is the commission rate charged to delegators, as a fraction.
*/
rate: string;
/**
* max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
*/
max_rate: string;
/**
* max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
*/
max_change_rate: string;
}
export interface CommissionRatesAminoMsg {
type: "cosmos-sdk/CommissionRates";
value: CommissionRatesAmino;
}
/**
* Commission defines commission parameters for a given validator.
* @name Commission
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Commission
*/
export interface Commission {
/**
* commission_rates defines the initial commission rates to be used for creating a validator.
*/
commissionRates: CommissionRates;
/**
* update_time is the last time the commission rate was changed.
*/
updateTime: Date;
}
export interface CommissionProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Commission";
value: Uint8Array;
}
/**
* Commission defines commission parameters for a given validator.
* @name CommissionAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Commission
*/
export interface CommissionAmino {
/**
* commission_rates defines the initial commission rates to be used for creating a validator.
*/
commission_rates: CommissionRatesAmino;
/**
* update_time is the last time the commission rate was changed.
*/
update_time: string;
}
export interface CommissionAminoMsg {
type: "cosmos-sdk/Commission";
value: CommissionAmino;
}
/**
* Description defines a validator description.
* @name Description
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Description
*/
export interface Description {
/**
* moniker defines a human-readable name for the validator.
*/
moniker: string;
/**
* identity defines an optional identity signature (ex. UPort or Keybase).
*/
identity: string;
/**
* website defines an optional website link.
*/
website: string;
/**
* security_contact defines an optional email for security contact.
*/
securityContact: string;
/**
* details define other optional details.
*/
details: string;
}
export interface DescriptionProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Description";
value: Uint8Array;
}
/**
* Description defines a validator description.
* @name DescriptionAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Description
*/
export interface DescriptionAmino {
/**
* moniker defines a human-readable name for the validator.
*/
moniker: string;
/**
* identity defines an optional identity signature (ex. UPort or Keybase).
*/
identity: string;
/**
* website defines an optional website link.
*/
website: string;
/**
* security_contact defines an optional email for security contact.
*/
security_contact: string;
/**
* details define other optional details.
*/
details: string;
}
export interface DescriptionAminoMsg {
type: "cosmos-sdk/Description";
value: DescriptionAmino;
}
/**
* Validator defines a validator, together with the total amount of the
* Validator's bond shares and their exchange rate to coins. Slashing results in
* a decrease in the exchange rate, allowing correct calculation of future
* undelegations without iterating over delegators. When coins are delegated to
* this validator, the validator is credited with a delegation whose number of
* bond shares is based on the amount of coins delegated divided by the current
* exchange rate. Voting power can be calculated as total bonded shares
* multiplied by exchange rate.
* @name Validator
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Validator
*/
export interface Validator {
/**
* operator_address defines the address of the validator's operator; bech encoded in JSON.
*/
operatorAddress: string;
/**
* consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
*/
consensusPubkey?: Any | undefined;
/**
* jailed defined whether the validator has been jailed from bonded status or not.
*/
jailed: boolean;
/**
* status is the validator status (bonded/unbonding/unbonded).
*/
status: BondStatus;
/**
* tokens define the delegated tokens (incl. self-delegation).
*/
tokens: string;
/**
* delegator_shares defines total shares issued to a validator's delegators.
*/
delegatorShares: string;
/**
* description defines the description terms for the validator.
*/
description: Description;
/**
* unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
*/
unbondingHeight: bigint;
/**
* unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
*/
unbondingTime: Date;
/**
* commission defines the commission parameters.
*/
commission: Commission;
/**
* min_self_delegation is the validator's self declared minimum self delegation.
*/
minSelfDelegation: string;
/**
* strictly positive if this validator's unbonding has been stopped by external modules
*/
unbondingOnHoldRefCount: bigint;
/**
* list of unbonding ids, each uniquely identifing an unbonding of this validator
*/
unbondingIds: bigint[];
}
export interface ValidatorProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Validator";
value: Uint8Array;
}
export type ValidatorEncoded = Omit<Validator, "consensusPubkey"> & {
/**
* consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
*/
consensusPubkey?: AnyProtoMsg | undefined;
};
/**
* Validator defines a validator, together with the total amount of the
* Validator's bond shares and their exchange rate to coins. Slashing results in
* a decrease in the exchange rate, allowing correct calculation of future
* undelegations without iterating over delegators. When coins are delegated to
* this validator, the validator is credited with a delegation whose number of
* bond shares is based on the amount of coins delegated divided by the current
* exchange rate. Voting power can be calculated as total bonded shares
* multiplied by exchange rate.
* @name ValidatorAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Validator
*/
export interface ValidatorAmino {
/**
* operator_address defines the address of the validator's operator; bech encoded in JSON.
*/
operator_address: string;
/**
* consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
*/
consensus_pubkey?: AnyAmino;
/**
* jailed defined whether the validator has been jailed from bonded status or not.
*/
jailed: boolean;
/**
* status is the validator status (bonded/unbonding/unbonded).
*/
status: BondStatus;
/**
* tokens define the delegated tokens (incl. self-delegation).
*/
tokens: string;
/**
* delegator_shares defines total shares issued to a validator's delegators.
*/
delegator_shares: string;
/**
* description defines the description terms for the validator.
*/
description: DescriptionAmino;
/**
* unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
*/
unbonding_height: string;
/**
* unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
*/
unbonding_time: string;
/**
* commission defines the commission parameters.
*/
commission: CommissionAmino;
/**
* min_self_delegation is the validator's self declared minimum self delegation.
*/
min_self_delegation: string;
/**
* strictly positive if this validator's unbonding has been stopped by external modules
*/
unbonding_on_hold_ref_count: string;
/**
* list of unbonding ids, each uniquely identifing an unbonding of this validator
*/
unbonding_ids: string[];
}
export interface ValidatorAminoMsg {
type: "cosmos-sdk/Validator";
value: ValidatorAmino;
}
/**
* ValAddresses defines a repeated set of validator addresses.
* @name ValAddresses
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.ValAddresses
*/
export interface ValAddresses {
addresses: string[];
}
export interface ValAddressesProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.ValAddresses";
value: Uint8Array;
}
/**
* ValAddresses defines a repeated set of validator addresses.
* @name ValAddressesAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.ValAddresses
*/
export interface ValAddressesAmino {
addresses: string[];
}
export interface ValAddressesAminoMsg {
type: "cosmos-sdk/ValAddresses";
value: ValAddressesAmino;
}
/**
* DVPair is struct that just has a delegator-validator pair with no other data.
* It is intended to be used as a marshalable pointer. For example, a DVPair can
* be used to construct the key to getting an UnbondingDelegation from state.
* @name DVPair
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVPair
*/
export interface DVPair {
delegatorAddress: string;
validatorAddress: string;
}
export interface DVPairProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.DVPair";
value: Uint8Array;
}
/**
* DVPair is struct that just has a delegator-validator pair with no other data.
* It is intended to be used as a marshalable pointer. For example, a DVPair can
* be used to construct the key to getting an UnbondingDelegation from state.
* @name DVPairAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVPair
*/
export interface DVPairAmino {
delegator_address: string;
validator_address: string;
}
export interface DVPairAminoMsg {
type: "cosmos-sdk/DVPair";
value: DVPairAmino;
}
/**
* DVPairs defines an array of DVPair objects.
* @name DVPairs
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVPairs
*/
export interface DVPairs {
pairs: DVPair[];
}
export interface DVPairsProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.DVPairs";
value: Uint8Array;
}
/**
* DVPairs defines an array of DVPair objects.
* @name DVPairsAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVPairs
*/
export interface DVPairsAmino {
pairs: DVPairAmino[];
}
export interface DVPairsAminoMsg {
type: "cosmos-sdk/DVPairs";
value: DVPairsAmino;
}
/**
* DVVTriplet is struct that just has a delegator-validator-validator triplet
* with no other data. It is intended to be used as a marshalable pointer. For
* example, a DVVTriplet can be used to construct the key to getting a
* Redelegation from state.
* @name DVVTriplet
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVVTriplet
*/
export interface DVVTriplet {
delegatorAddress: string;
validatorSrcAddress: string;
validatorDstAddress: string;
}
export interface DVVTripletProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.DVVTriplet";
value: Uint8Array;
}
/**
* DVVTriplet is struct that just has a delegator-validator-validator triplet
* with no other data. It is intended to be used as a marshalable pointer. For
* example, a DVVTriplet can be used to construct the key to getting a
* Redelegation from state.
* @name DVVTripletAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVVTriplet
*/
export interface DVVTripletAmino {
delegator_address: string;
validator_src_address: string;
validator_dst_address: string;
}
export interface DVVTripletAminoMsg {
type: "cosmos-sdk/DVVTriplet";
value: DVVTripletAmino;
}
/**
* DVVTriplets defines an array of DVVTriplet objects.
* @name DVVTriplets
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVVTriplets
*/
export interface DVVTriplets {
triplets: DVVTriplet[];
}
export interface DVVTripletsProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.DVVTriplets";
value: Uint8Array;
}
/**
* DVVTriplets defines an array of DVVTriplet objects.
* @name DVVTripletsAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVVTriplets
*/
export interface DVVTripletsAmino {
triplets: DVVTripletAmino[];
}
export interface DVVTripletsAminoMsg {
type: "cosmos-sdk/DVVTriplets";
value: DVVTripletsAmino;
}
/**
* Delegation represents the bond with tokens held by an account. It is
* owned by one delegator, and is associated with the voting power of one
* validator.
* @name Delegation
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Delegation
*/
export interface Delegation {
/**
* delegator_address is the encoded address of the delegator.
*/
delegatorAddress: string;
/**
* validator_address is the encoded address of the validator.
*/
validatorAddress: string;
/**
* shares define the delegation shares received.
*/
shares: string;
}
export interface DelegationProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Delegation";
value: Uint8Array;
}
/**
* Delegation represents the bond with tokens held by an account. It is
* owned by one delegator, and is associated with the voting power of one
* validator.
* @name DelegationAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Delegation
*/
export interface DelegationAmino {
/**
* delegator_address is the encoded address of the delegator.
*/
delegator_address: string;
/**
* validator_address is the encoded address of the validator.
*/
validator_address: string;
/**
* shares define the delegation shares received.
*/
shares: string;
}
export interface DelegationAminoMsg {
type: "cosmos-sdk/Delegation";
value: DelegationAmino;
}
/**
* UnbondingDelegation stores all of a single delegator's unbonding bonds
* for a single validator in an time-ordered list.
* @name UnbondingDelegation
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.UnbondingDelegation
*/
export interface UnbondingDelegation {
/**
* delegator_address is the encoded address of the delegator.
*/
delegatorAddress: string;
/**
* validator_address is the encoded address of the validator.
*/
validatorAddress: string;
/**
* entries are the unbonding delegation entries.
*/
entries: UnbondingDelegationEntry[];
}
export interface UnbondingDelegationProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegation";
value: Uint8Array;
}
/**
* UnbondingDelegation stores all of a single delegator's unbonding bonds
* for a single validator in an time-ordered list.
* @name UnbondingDelegationAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.UnbondingDelegation
*/
export interface UnbondingDelegationAmino {
/**
* delegator_address is the encoded address of the delegator.
*/
delegator_address: string;
/**
* validator_address is the encoded address of the validator.
*/
validator_address: string;
/**
* entries are the unbonding delegation entries.
*/
entries: UnbondingDelegationEntryAmino[];
}
export interface UnbondingDelegationAminoMsg {
type: "cosmos-sdk/UnbondingDelegation";
value: UnbondingDelegationAmino;
}
/**
* UnbondingDelegationEntry defines an unbonding object with relevant metadata.
* @name UnbondingDelegationEntry
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.UnbondingDelegationEntry
*/
export interface UnbondingDelegationEntry {
/**
* creation_height is the height which the unbonding took place.
*/
creationHeight: bigint;
/**
* completion_time is the unix time for unbonding completion.
*/
completionTime: Date;
/**
* initial_balance defines the tokens initially scheduled to receive at completion.
*/
initialBalance: string;
/**
* balance defines the tokens to receive at completion.
*/
balance: string;
/**
* Incrementing id that uniquely identifies this entry
*/
unbondingId: bigint;
/**
* Strictly positive if this entry's unbonding has been stopped by external modules
*/
unbondingOnHoldRefCount: bigint;
}
export interface UnbondingDelegationEntryProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.UnbondingDelegationEntry";
value: Uint8Array;
}
/**
* UnbondingDelegationEntry defines an unbonding object with relevant metadata.
* @name UnbondingDelegationEntryAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.UnbondingDelegationEntry
*/
export interface UnbondingDelegationEntryAmino {
/**
* creation_height is the height which the unbonding took place.
*/
creation_height: string;
/**
* completion_time is the unix time for unbonding completion.
*/
completion_time: string;
/**
* initial_balance defines the tokens initially scheduled to receive at completion.
*/
initial_balance: string;
/**
* balance defines the tokens to receive at completion.
*/
balance: string;
/**
* Incrementing id that uniquely identifies this entry
*/
unbonding_id: string;
/**
* Strictly positive if this entry's unbonding has been stopped by external modules
*/
unbonding_on_hold_ref_count: string;
}
export interface UnbondingDelegationEntryAminoMsg {
type: "cosmos-sdk/UnbondingDelegationEntry";
value: UnbondingDelegationEntryAmino;
}
/**
* RedelegationEntry defines a redelegation object with relevant metadata.
* @name RedelegationEntry
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationEntry
*/
export interface RedelegationEntry {
/**
* creation_height defines the height which the redelegation took place.
*/
creationHeight: bigint;
/**
* completion_time defines the unix time for redelegation completion.
*/
completionTime: Date;
/**
* initial_balance defines the initial balance when redelegation started.
*/
initialBalance: string;
/**
* shares_dst is the amount of destination-validator shares created by redelegation.
*/
sharesDst: string;
/**
* Incrementing id that uniquely identifies this entry
*/
unbondingId: bigint;
/**
* Strictly positive if this entry's unbonding has been stopped by external modules
*/
unbondingOnHoldRefCount: bigint;
}
export interface RedelegationEntryProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.RedelegationEntry";
value: Uint8Array;
}
/**
* RedelegationEntry defines a redelegation object with relevant metadata.
* @name RedelegationEntryAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationEntry
*/
export interface RedelegationEntryAmino {
/**
* creation_height defines the height which the redelegation took place.
*/
creation_height: string;
/**
* completion_time defines the unix time for redelegation completion.
*/
completion_time: string;
/**
* initial_balance defines the initial balance when redelegation started.
*/
initial_balance: string;
/**
* shares_dst is the amount of destination-validator shares created by redelegation.
*/
shares_dst: string;
/**
* Incrementing id that uniquely identifies this entry
*/
unbonding_id: string;
/**
* Strictly positive if this entry's unbonding has been stopped by external modules
*/
unbonding_on_hold_ref_count: string;
}
export interface RedelegationEntryAminoMsg {
type: "cosmos-sdk/RedelegationEntry";
value: RedelegationEntryAmino;
}
/**
* Redelegation contains the list of a particular delegator's redelegating bonds
* from a particular source validator to a particular destination validator.
* @name Redelegation
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Redelegation
*/
export interface Redelegation {
/**
* delegator_address is the bech32-encoded address of the delegator.
*/
delegatorAddress: string;
/**
* validator_src_address is the validator redelegation source operator address.
*/
validatorSrcAddress: string;
/**
* validator_dst_address is the validator redelegation destination operator address.
*/
validatorDstAddress: string;
/**
* entries are the redelegation entries.
*/
entries: RedelegationEntry[];
}
export interface RedelegationProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Redelegation";
value: Uint8Array;
}
/**
* Redelegation contains the list of a particular delegator's redelegating bonds
* from a particular source validator to a particular destination validator.
* @name RedelegationAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Redelegation
*/
export interface RedelegationAmino {
/**
* delegator_address is the bech32-encoded address of the delegator.
*/
delegator_address: string;
/**
* validator_src_address is the validator redelegation source operator address.
*/
validator_src_address: string;
/**
* validator_dst_address is the validator redelegation destination operator address.
*/
validator_dst_address: string;
/**
* entries are the redelegation entries.
*/
entries: RedelegationEntryAmino[];
}
export interface RedelegationAminoMsg {
type: "cosmos-sdk/Redelegation";
value: RedelegationAmino;
}
/**
* Params defines the parameters for the x/staking module.
* @name Params
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Params
*/
export interface Params {
/**
* unbonding_time is the time duration of unbonding.
*/
unbondingTime: Duration;
/**
* max_validators is the maximum number of validators.
*/
maxValidators: number;
/**
* max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
*/
maxEntries: number;
/**
* historical_entries is the number of historical entries to persist.
*/
historicalEntries: number;
/**
* bond_denom defines the bondable coin denomination.
*/
bondDenom: string;
/**
* min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators
*/
minCommissionRate: string;
}
export interface ParamsProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Params";
value: Uint8Array;
}
/**
* Params defines the parameters for the x/staking module.
* @name ParamsAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Params
*/
export interface ParamsAmino {
/**
* unbonding_time is the time duration of unbonding.
*/
unbonding_time: DurationAmino;
/**
* max_validators is the maximum number of validators.
*/
max_validators: number;
/**
* max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
*/
max_entries: number;
/**
* historical_entries is the number of historical entries to persist.
*/
historical_entries: number;
/**
* bond_denom defines the bondable coin denomination.
*/
bond_denom: string;
/**
* min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators
*/
min_commission_rate: string;
}
export interface ParamsAminoMsg {
type: "cosmos-sdk/x/staking/Params";
value: ParamsAmino;
}
/**
* DelegationResponse is equivalent to Delegation except that it contains a
* balance in addition to shares which is more suitable for client responses.
* @name DelegationResponse
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DelegationResponse
*/
export interface DelegationResponse {
delegation: Delegation;
balance: Coin;
}
export interface DelegationResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.DelegationResponse";
value: Uint8Array;
}
/**
* DelegationResponse is equivalent to Delegation except that it contains a
* balance in addition to shares which is more suitable for client responses.
* @name DelegationResponseAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DelegationResponse
*/
export interface DelegationResponseAmino {
delegation: DelegationAmino;
balance: CoinAmino;
}
export interface DelegationResponseAminoMsg {
type: "cosmos-sdk/DelegationResponse";
value: DelegationResponseAmino;
}
/**
* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
* contains a balance in addition to shares which is more suitable for client
* responses.
* @name RedelegationEntryResponse
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationEntryResponse
*/
export interface RedelegationEntryResponse {
redelegationEntry: RedelegationEntry;
balance: string;
}
export interface RedelegationEntryResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.RedelegationEntryResponse";
value: Uint8Array;
}
/**
* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
* contains a balance in addition to shares which is more suitable for client
* responses.
* @name RedelegationEntryResponseAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationEntryResponse
*/
export interface RedelegationEntryResponseAmino {
redelegation_entry: RedelegationEntryAmino;
balance: string;
}
export interface RedelegationEntryResponseAminoMsg {
type: "cosmos-sdk/RedelegationEntryResponse";
value: RedelegationEntryResponseAmino;
}
/**
* RedelegationResponse is equivalent to a Redelegation except that its entries
* contain a balance in addition to shares which is more suitable for client
* responses.
* @name RedelegationResponse
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationResponse
*/
export interface RedelegationResponse {
redelegation: Redelegation;
entries: RedelegationEntryResponse[];
}
export interface RedelegationResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.RedelegationResponse";
value: Uint8Array;
}
/**
* RedelegationResponse is equivalent to a Redelegation except that its entries
* contain a balance in addition to shares which is more suitable for client
* responses.
* @name RedelegationResponseAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationResponse
*/
export interface RedelegationResponseAmino {
redelegation: RedelegationAmino;
entries: RedelegationEntryResponseAmino[];
}
export interface RedelegationResponseAminoMsg {
type: "cosmos-sdk/RedelegationResponse";
value: RedelegationResponseAmino;
}
/**
* Pool is used for tracking bonded and not-bonded token supply of the bond
* denomination.
* @name Pool
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Pool
*/
export interface Pool {
notBondedTokens: string;
bondedTokens: string;
}
export interface PoolProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.Pool";
value: Uint8Array;
}
/**
* Pool is used for tracking bonded and not-bonded token supply of the bond
* denomination.
* @name PoolAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Pool
*/
export interface PoolAmino {
not_bonded_tokens: string;
bonded_tokens: string;
}
export interface PoolAminoMsg {
type: "cosmos-sdk/Pool";
value: PoolAmino;
}
/**
* ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
* TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
* @name ValidatorUpdates
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.ValidatorUpdates
*/
export interface ValidatorUpdates {
updates: ValidatorUpdate[];
}
export interface ValidatorUpdatesProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.ValidatorUpdates";
value: Uint8Array;
}
/**
* ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
* TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
* @name ValidatorUpdatesAmino
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.ValidatorUpdates
*/
export interface ValidatorUpdatesAmino {
updates: ValidatorUpdateAmino[];
}
export interface ValidatorUpdatesAminoMsg {
type: "cosmos-sdk/ValidatorUpdates";
value: ValidatorUpdatesAmino;
}
/**
* HistoricalInfo contains header and validator information for a given block.
* It is stored as part of staking module's state, which persists the `n` most
* recent HistoricalInfo
* (`n` is set by the staking module's `historical_entries` parameter).
* @name HistoricalInfo
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.HistoricalInfo
*/
export declare const HistoricalInfo: {
typeUrl: string;
aminoType: string;
is(o: any): o is HistoricalInfo;
isAmino(o: any): o is HistoricalInfoAmino;
encode(message: HistoricalInfo, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): HistoricalInfo;
fromPartial(object: DeepPartial<HistoricalInfo>): HistoricalInfo;
fromAmino(object: HistoricalInfoAmino): HistoricalInfo;
toAmino(message: HistoricalInfo): HistoricalInfoAmino;
fromAminoMsg(object: HistoricalInfoAminoMsg): HistoricalInfo;
toAminoMsg(message: HistoricalInfo): HistoricalInfoAminoMsg;
fromProtoMsg(message: HistoricalInfoProtoMsg): HistoricalInfo;
toProto(message: HistoricalInfo): Uint8Array;
toProtoMsg(message: HistoricalInfo): HistoricalInfoProtoMsg;
registerTypeUrl(): void;
};
/**
* CommissionRates defines the initial commission rates to be used for creating
* a validator.
* @name CommissionRates
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.CommissionRates
*/
export declare const CommissionRates: {
typeUrl: string;
aminoType: string;
is(o: any): o is CommissionRates;
isAmino(o: any): o is CommissionRatesAmino;
encode(message: CommissionRates, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): CommissionRates;
fromPartial(object: DeepPartial<CommissionRates>): CommissionRates;
fromAmino(object: CommissionRatesAmino): CommissionRates;
toAmino(message: CommissionRates): CommissionRatesAmino;
fromAminoMsg(object: CommissionRatesAminoMsg): CommissionRates;
toAminoMsg(message: CommissionRates): CommissionRatesAminoMsg;
fromProtoMsg(message: CommissionRatesProtoMsg): CommissionRates;
toProto(message: CommissionRates): Uint8Array;
toProtoMsg(message: CommissionRates): CommissionRatesProtoMsg;
registerTypeUrl(): void;
};
/**
* Commission defines commission parameters for a given validator.
* @name Commission
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Commission
*/
export declare const Commission: {
typeUrl: string;
aminoType: string;
is(o: any): o is Commission;
isAmino(o: any): o is CommissionAmino;
encode(message: Commission, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Commission;
fromPartial(object: DeepPartial<Commission>): Commission;
fromAmino(object: CommissionAmino): Commission;
toAmino(message: Commission): CommissionAmino;
fromAminoMsg(object: CommissionAminoMsg): Commission;
toAminoMsg(message: Commission): CommissionAminoMsg;
fromProtoMsg(message: CommissionProtoMsg): Commission;
toProto(message: Commission): Uint8Array;
toProtoMsg(message: Commission): CommissionProtoMsg;
registerTypeUrl(): void;
};
/**
* Description defines a validator description.
* @name Description
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Description
*/
export declare const Description: {
typeUrl: string;
aminoType: string;
is(o: any): o is Description;
isAmino(o: any): o is DescriptionAmino;
encode(message: Description, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Description;
fromPartial(object: DeepPartial<Description>): Description;
fromAmino(object: DescriptionAmino): Description;
toAmino(message: Description): DescriptionAmino;
fromAminoMsg(object: DescriptionAminoMsg): Description;
toAminoMsg(message: Description): DescriptionAminoMsg;
fromProtoMsg(message: DescriptionProtoMsg): Description;
toProto(message: Description): Uint8Array;
toProtoMsg(message: Description): DescriptionProtoMsg;
registerTypeUrl(): void;
};
/**
* Validator defines a validator, together with the total amount of the
* Validator's bond shares and their exchange rate to coins. Slashing results in
* a decrease in the exchange rate, allowing correct calculation of future
* undelegations without iterating over delegators. When coins are delegated to
* this validator, the validator is credited with a delegation whose number of
* bond shares is based on the amount of coins delegated divided by the current
* exchange rate. Voting power can be calculated as total bonded shares
* multiplied by exchange rate.
* @name Validator
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Validator
*/
export declare const Validator: {
typeUrl: string;
aminoType: string;
is(o: any): o is Validator;
isAmino(o: any): o is ValidatorAmino;
encode(message: Validator, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Validator;
fromPartial(object: DeepPartial<Validator>): Validator;
fromAmino(object: ValidatorAmino): Validator;
toAmino(message: Validator): ValidatorAmino;
fromAminoMsg(object: ValidatorAminoMsg): Validator;
toAminoMsg(message: Validator): ValidatorAminoMsg;
fromProtoMsg(message: ValidatorProtoMsg): Validator;
toProto(message: Validator): Uint8Array;
toProtoMsg(message: Validator): ValidatorProtoMsg;
registerTypeUrl(): void;
};
/**
* ValAddresses defines a repeated set of validator addresses.
* @name ValAddresses
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.ValAddresses
*/
export declare const ValAddresses: {
typeUrl: string;
aminoType: string;
is(o: any): o is ValAddresses;
isAmino(o: any): o is ValAddressesAmino;
encode(message: ValAddresses, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): ValAddresses;
fromPartial(object: DeepPartial<ValAddresses>): ValAddresses;
fromAmino(object: ValAddressesAmino): ValAddresses;
toAmino(message: ValAddresses): ValAddressesAmino;
fromAminoMsg(object: ValAddressesAminoMsg): ValAddresses;
toAminoMsg(message: ValAddresses): ValAddressesAminoMsg;
fromProtoMsg(message: ValAddressesProtoMsg): ValAddresses;
toProto(message: ValAddresses): Uint8Array;
toProtoMsg(message: ValAddresses): ValAddressesProtoMsg;
registerTypeUrl(): void;
};
/**
* DVPair is struct that just has a delegator-validator pair with no other data.
* It is intended to be used as a marshalable pointer. For example, a DVPair can
* be used to construct the key to getting an UnbondingDelegation from state.
* @name DVPair
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVPair
*/
export declare const DVPair: {
typeUrl: string;
aminoType: string;
is(o: any): o is DVPair;
isAmino(o: any): o is DVPairAmino;
encode(message: DVPair, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): DVPair;
fromPartial(object: DeepPartial<DVPair>): DVPair;
fromAmino(object: DVPairAmino): DVPair;
toAmino(message: DVPair): DVPairAmino;
fromAminoMsg(object: DVPairAminoMsg): DVPair;
toAminoMsg(message: DVPair): DVPairAminoMsg;
fromProtoMsg(message: DVPairProtoMsg): DVPair;
toProto(message: DVPair): Uint8Array;
toProtoMsg(message: DVPair): DVPairProtoMsg;
registerTypeUrl(): void;
};
/**
* DVPairs defines an array of DVPair objects.
* @name DVPairs
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVPairs
*/
export declare const DVPairs: {
typeUrl: string;
aminoType: string;
is(o: any): o is DVPairs;
isAmino(o: any): o is DVPairsAmino;
encode(message: DVPairs, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): DVPairs;
fromPartial(object: DeepPartial<DVPairs>): DVPairs;
fromAmino(object: DVPairsAmino): DVPairs;
toAmino(message: DVPairs): DVPairsAmino;
fromAminoMsg(object: DVPairsAminoMsg): DVPairs;
toAminoMsg(message: DVPairs): DVPairsAminoMsg;
fromProtoMsg(message: DVPairsProtoMsg): DVPairs;
toProto(message: DVPairs): Uint8Array;
toProtoMsg(message: DVPairs): DVPairsProtoMsg;
registerTypeUrl(): void;
};
/**
* DVVTriplet is struct that just has a delegator-validator-validator triplet
* with no other data. It is intended to be used as a marshalable pointer. For
* example, a DVVTriplet can be used to construct the key to getting a
* Redelegation from state.
* @name DVVTriplet
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVVTriplet
*/
export declare const DVVTriplet: {
typeUrl: string;
aminoType: string;
is(o: any): o is DVVTriplet;
isAmino(o: any): o is DVVTripletAmino;
encode(message: DVVTriplet, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplet;
fromPartial(object: DeepPartial<DVVTriplet>): DVVTriplet;
fromAmino(object: DVVTripletAmino): DVVTriplet;
toAmino(message: DVVTriplet): DVVTripletAmino;
fromAminoMsg(object: DVVTripletAminoMsg): DVVTriplet;
toAminoMsg(message: DVVTriplet): DVVTripletAminoMsg;
fromProtoMsg(message: DVVTripletProtoMsg): DVVTriplet;
toProto(message: DVVTriplet): Uint8Array;
toProtoMsg(message: DVVTriplet): DVVTripletProtoMsg;
registerTypeUrl(): void;
};
/**
* DVVTriplets defines an array of DVVTriplet objects.
* @name DVVTriplets
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.DVVTriplets
*/
export declare const DVVTriplets: {
typeUrl: string;
aminoType: string;
is(o: any): o is DVVTriplets;
isAmino(o: any): o is DVVTripletsAmino;
encode(message: DVVTriplets, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplets;
fromPartial(object: DeepPartial<DVVTriplets>): DVVTriplets;
fromAmino(object: DVVTripletsAmino): DVVTriplets;
toAmino(message: DVVTriplets): DVVTripletsAmino;
fromAminoMsg(object: DVVTripletsAminoMsg): DVVTriplets;
toAminoMsg(message: DVVTriplets): DVVTripletsAminoMsg;
fromProtoMsg(message: DVVTripletsProtoMsg): DVVTriplets;
toProto(message: DVVTriplets): Uint8Array;
toProtoMsg(message: DVVTriplets): DVVTripletsProtoMsg;
registerTypeUrl(): void;
};
/**
* Delegation represents the bond with tokens held by an account. It is
* owned by one delegator, and is associated with the voting power of one
* validator.
* @name Delegation
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Delegation
*/
export declare const Delegation: {
typeUrl: string;
aminoType: string;
is(o: any): o is Delegation;
isAmino(o: any): o is DelegationAmino;
encode(message: Delegation, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Delegation;
fromPartial(object: DeepPartial<Delegation>): Delegation;
fromAmino(object: DelegationAmino): Delegation;
toAmino(message: Delegation): DelegationAmino;
fromAminoMsg(object: DelegationAminoMsg): Delegation;
toAminoMsg(message: Delegation): DelegationAminoMsg;
fromProtoMsg(message: DelegationProtoMsg): Delegation;
toProto(message: Delegation): Uint8Array;
toProtoMsg(message: Delegation): DelegationProtoMsg;
registerTypeUrl(): void;
};
/**
* UnbondingDelegation stores all of a single delegator's unbonding bonds
* for a single validator in an time-ordered list.
* @name UnbondingDelegation
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.UnbondingDelegation
*/
export declare const UnbondingDelegation: {
typeUrl: string;
aminoType: string;
is(o: any): o is UnbondingDelegation;
isAmino(o: any): o is UnbondingDelegationAmino;
encode(message: UnbondingDelegation, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegation;
fromPartial(object: DeepPartial<UnbondingDelegation>): UnbondingDelegation;
fromAmino(object: UnbondingDelegationAmino): UnbondingDelegation;
toAmino(message: UnbondingDelegation): UnbondingDelegationAmino;
fromAminoMsg(object: UnbondingDelegationAminoMsg): UnbondingDelegation;
toAminoMsg(message: UnbondingDelegation): UnbondingDelegationAminoMsg;
fromProtoMsg(message: UnbondingDelegationProtoMsg): UnbondingDelegation;
toProto(message: UnbondingDelegation): Uint8Array;
toProtoMsg(message: UnbondingDelegation): UnbondingDelegationProtoMsg;
registerTypeUrl(): void;
};
/**
* UnbondingDelegationEntry defines an unbonding object with relevant metadata.
* @name UnbondingDelegationEntry
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.UnbondingDelegationEntry
*/
export declare const UnbondingDelegationEntry: {
typeUrl: string;
aminoType: string;
is(o: any): o is UnbondingDelegationEntry;
isAmino(o: any): o is UnbondingDelegationEntryAmino;
encode(message: UnbondingDelegationEntry, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegationEntry;
fromPartial(object: DeepPartial<UnbondingDelegationEntry>): UnbondingDelegationEntry;
fromAmino(object: UnbondingDelegationEntryAmino): UnbondingDelegationEntry;
toAmino(message: UnbondingDelegationEntry): UnbondingDelegationEntryAmino;
fromAminoMsg(object: UnbondingDelegationEntryAminoMsg): UnbondingDelegationEntry;
toAminoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryAminoMsg;
fromProtoMsg(message: UnbondingDelegationEntryProtoMsg): UnbondingDelegationEntry;
toProto(message: UnbondingDelegationEntry): Uint8Array;
toProtoMsg(message: UnbondingDelegationEntry): UnbondingDelegationEntryProtoMsg;
registerTypeUrl(): void;
};
/**
* RedelegationEntry defines a redelegation object with relevant metadata.
* @name RedelegationEntry
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.RedelegationEntry
*/
export declare const RedelegationEntry: {
typeUrl: string;
aminoType: string;
is(o: any): o is RedelegationEntry;
isAmino(o: any): o is RedelegationEntryAmino;
encode(message: RedelegationEntry, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntry;
fromPartial(object: DeepPartial<RedelegationEntry>): RedelegationEntry;
fromAmino(object: RedelegationEntryAmino): RedelegationEntry;
toAmino(message: RedelegationEntry): RedelegationEntryAmino;
fromAminoMsg(object: RedelegationEntryAminoMsg): RedelegationEntry;
toAminoMsg(message: RedelegationEntry): RedelegationEntryAminoMsg;
fromProtoMsg(message: RedelegationEntryProtoMsg): RedelegationEntry;
toProto(message: RedelegationEntry): Uint8Array;
toProtoMsg(message: RedelegationEntry): RedelegationEntryProtoMsg;
registerTypeUrl(): void;
};
/**
* Redelegation contains the list of a particular delegator's redelegating bonds
* from a particular source validator to a particular destination validator.
* @name Redelegation
* @package cosmos.staking.v1beta1
* @see proto type: cosmos.staking.v1beta1.Redelegation
*/
export declare const Redelegation: {
typeUrl: string;
aminoType: string;
is(o: any): o is Redelegation;
isAmino(o: any): o is RedelegationAmino;
encode(message: Redelegation, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Redelegation;
fromPartial(object: DeepPartial<Redelegation>): Redelegation;
fromAmino(object: RedelegationAmino): Redelegation;
toAmino(message: Redelegation): RedelegationAmino;
fromAminoMsg(object: RedelegationAminoMsg): Redelegation;
toAminoMsg(message: Redelegation): RedelegationAminoMsg;
fromProtoMsg(message: RedelegationProtoMsg): Redelegation;
toProto(message: Redelegation): Uint8Array;
toProtoMsg(message: Redelegation): RedelegationProtoMsg;
registerTypeUrl(): void;
};
/**