PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@babylonlabs-io/babylon-proto-ts/dist/generated/babylon/btcstaking/v1
Просмотр файла: btcstaking.d.ts
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Description } from "../../../cosmos/staking/v1beta1/staking";
import { TransactionKey } from "../../btccheckpoint/v1/btccheckpoint";
import { ProofOfPossessionBTC } from "./pop";
export declare const protobufPackage = "babylon.btcstaking.v1";
/**
* BTCDelegationStatus is the status of a delegation.
* There are two possible valid state transition paths for a BTC delegation:
* - PENDING -> VERIFIED -> ACTIVE -> UNBONDED -> EXPIRED
* - PENDING -> VERIFIED -> ACTIVE -> UNBONDED/EXPIRED
* and one invalid state transition path:
* - PENDING -> VERIFIED -> UNBONDED i.e the staker unbonded before
* activating delegation on Babylon chain.
* In valid transition paths, the delegation becomes UNBONDED when:
* - either the staking transaction timelock expires
* - or the staker requests early undelegation through MsgBTCUndelegate message.
*/
export declare enum BTCDelegationStatus {
/** PENDING - PENDING defines a delegation that is waiting for covenant signatures. */
PENDING = 0,
/**
* VERIFIED - VERIFIED defines a delegation that has covenant signatures but is not yet
* included in the BTC chain.
*/
VERIFIED = 1,
/** ACTIVE - ACTIVE defines a delegation that has voting power */
ACTIVE = 2,
/**
* UNBONDED - UNBONDED defines a delegation no longer has voting power
* by receiving unbonding tx with signatures from staker and covenant committee
*/
UNBONDED = 3,
/**
* EXPIRED - EXPIRED defines a delegation no longer has voting power
* for reaching the end of staking transaction timelock
*/
EXPIRED = 4,
/** ANY - ANY is any of the above status */
ANY = 5,
UNRECOGNIZED = -1
}
export declare function bTCDelegationStatusFromJSON(object: any): BTCDelegationStatus;
export declare function bTCDelegationStatusToJSON(object: BTCDelegationStatus): string;
/** FinalityProvider defines a finality provider */
export interface FinalityProvider {
/** addr is the bech32 address identifier of the finality provider. */
addr: string;
/** description defines the description terms for the finality provider. */
description: Description | undefined;
/** commission defines the commission rate of the finality provider. */
commission: string;
/**
* btc_pk is the Bitcoin secp256k1 PK of this finality provider
* the PK follows encoding in BIP-340 spec
*/
btcPk: Uint8Array;
/**
* pop is the proof of possession of the btc_pk, where the BTC
* private key signs the bech32 bbn addr of the finality provider.
*/
pop: ProofOfPossessionBTC | undefined;
/**
* slashed_babylon_height indicates the Babylon height when
* the finality provider is slashed.
* if it's 0 then the finality provider is not slashed
*/
slashedBabylonHeight: number;
/**
* slashed_btc_height indicates the BTC height when
* the finality provider is slashed.
* if it's 0 then the finality provider is not slashed
*/
slashedBtcHeight: number;
/** jailed defines whether the finality provider is jailed */
jailed: boolean;
/**
* highest_voted_height is the highest height for which the
* finality provider has voted
*/
highestVotedHeight: number;
}
/** FinalityProviderWithMeta wraps the FinalityProvider with metadata. */
export interface FinalityProviderWithMeta {
/**
* btc_pk is the Bitcoin secp256k1 PK of thisfinality provider
* the PK follows encoding in BIP-340 spec
*/
btcPk: Uint8Array;
/** height is the queried Babylon height */
height: number;
/** voting_power is the voting power of this finality provider at the given height */
votingPower: number;
/**
* slashed_babylon_height indicates the Babylon height when
* the finality provider is slashed.
* if it's 0 then the finality provider is not slashed
*/
slashedBabylonHeight: number;
/**
* slashed_btc_height indicates the BTC height when
* the finality provider is slashed.
* if it's 0 then the finality provider is not slashed
*/
slashedBtcHeight: number;
/** jailed defines whether the finality provider is detected jailed */
jailed: boolean;
/**
* highest_voted_height is the highest height for which the
* finality provider has voted
*/
highestVotedHeight: number;
}
/** BTCDelegation defines a BTC delegation */
export interface BTCDelegation {
/** staker_addr is the address to receive rewards from BTC delegation. */
stakerAddr: string;
/**
* btc_pk is the Bitcoin secp256k1 PK of this BTC delegation
* the PK follows encoding in BIP-340 spec
*/
btcPk: Uint8Array;
/** pop is the proof of possession of babylon_pk and btc_pk */
pop: ProofOfPossessionBTC | undefined;
/**
* fp_btc_pk_list is the list of BIP-340 PKs of the finality providers that
* this BTC delegation delegates to
* If there is more than 1 PKs, then this means the delegation is restaked
* to multiple finality providers
*/
fpBtcPkList: Uint8Array[];
/** staking_time is the number of blocks for which the delegation is locked on BTC chain */
stakingTime: number;
/**
* start_height is the start BTC height of the BTC delegation
* it is the start BTC height of the timelock
*/
startHeight: number;
/**
* end_height is the end height of the BTC delegation
* it is calculated by end_height = start_height + staking_time
*/
endHeight: number;
/**
* total_sat is the total amount of BTC stakes in this delegation
* quantified in satoshi
*/
totalSat: number;
/** staking_tx is the staking tx */
stakingTx: Uint8Array;
/** staking_output_idx is the index of the staking output in the staking tx */
stakingOutputIdx: number;
/**
* slashing_tx is the slashing tx
* It is partially signed by SK corresponding to btc_pk, but not signed by
* finality provider or covenant yet.
*/
slashingTx: Uint8Array;
/**
* delegator_sig is the signature on the slashing tx
* by the delegator (i.e., SK corresponding to btc_pk).
* It will be a part of the witness for the staking tx output.
*/
delegatorSig: Uint8Array;
/**
* covenant_sigs is a list of adaptor signatures on the slashing tx
* by each covenant member
* It will be a part of the witness for the staking tx output.
*/
covenantSigs: CovenantAdaptorSignatures[];
/**
* unbonding_time describes how long the funds will be locked either in unbonding output
* or slashing change output
*/
unbondingTime: number;
/** btc_undelegation is the information about the early unbonding path of the BTC delegation */
btcUndelegation: BTCUndelegation | undefined;
/** version of the params used to validate the delegation */
paramsVersion: number;
/**
* btc_tip_height is the height of the BTC light client tip at the time of
* the delegation creation
*/
btcTipHeight: number;
}
/**
* DelegatorUnbondingInfo contains the information about transaction which spent
* the staking output. It contains:
* - spend_stake_tx: the transaction which spent the staking output
*/
export interface DelegatorUnbondingInfo {
/**
* spend_stake_tx is the transaction which spent the staking output. It is
* filled only if spend_stake_tx is different than unbonding_tx registered
* on the Babylon chain.
*/
spendStakeTx: Uint8Array;
}
/** BTCUndelegation contains the information about the early unbonding path of the BTC delegation */
export interface BTCUndelegation {
/**
* unbonding_tx is the transaction which will transfer the funds from staking
* output to unbonding output. Unbonding output will usually have lower timelock
* than staking output.
*/
unbondingTx: Uint8Array;
/**
* slashing_tx is the slashing tx for unbonding transactions
* It is partially signed by SK corresponding to btc_pk, but not signed by
* finality provider or covenant yet.
*/
slashingTx: Uint8Array;
/**
* delegator_slashing_sig is the signature on the slashing tx
* by the delegator (i.e., SK corresponding to btc_pk).
* It will be a part of the witness for the unbonding tx output.
*/
delegatorSlashingSig: Uint8Array;
/**
* covenant_slashing_sigs is a list of adaptor signatures on the slashing tx
* by each covenant member
* It will be a part of the witness for the staking tx output.
*/
covenantSlashingSigs: CovenantAdaptorSignatures[];
/**
* covenant_unbonding_sig_list is the list of signatures on the unbonding tx
* by covenant members
* It must be provided after processing undelegate message by Babylon
*/
covenantUnbondingSigList: SignatureInfo[];
/**
* delegator_unbonding_info is the information about transaction which spent
* the staking output
*/
delegatorUnbondingInfo: DelegatorUnbondingInfo | undefined;
}
/** BTCDelegatorDelegations is a collection of BTC delegations from the same delegator. */
export interface BTCDelegatorDelegations {
dels: BTCDelegation[];
}
/** BTCDelegatorDelegationIndex is a list of staking tx hashes of BTC delegations from the same delegator. */
export interface BTCDelegatorDelegationIndex {
stakingTxHashList: Uint8Array[];
}
/** SignatureInfo is a BIP-340 signature together with its signer's BIP-340 PK */
export interface SignatureInfo {
pk: Uint8Array;
sig: Uint8Array;
}
/**
* CovenantAdaptorSignatures is a list adaptor signatures signed by the
* covenant with different finality provider's public keys as encryption keys
*/
export interface CovenantAdaptorSignatures {
/** cov_pk is the public key of the covenant emulator, used as the public key of the adaptor signature */
covPk: Uint8Array;
/** adaptor_sigs is a list of adaptor signatures, each encrypted by a restaked BTC finality provider's public key */
adaptorSigs: Uint8Array[];
}
/**
* SelectiveSlashingEvidence is the evidence that the finality provider
* selectively slashed a BTC delegation
* NOTE: it's possible that a slashed finality provider exploits the
* SelectiveSlashingEvidence endpoint while it is actually slashed due to
* equivocation. But such behaviour does not affect the system's security
* or gives any benefit for the adversary
*/
export interface SelectiveSlashingEvidence {
/**
* staking_tx_hash is the hash of the staking tx.
* It uniquely identifies a BTC delegation
*/
stakingTxHash: string;
/**
* fp_btc_pk is the BTC PK of the finality provider who
* launches the selective slashing offence
*/
fpBtcPk: Uint8Array;
/**
* recovered_fp_btc_sk is the finality provider's BTC SK recovered from
* the covenant adaptor/Schnorr signature pair. It is the consequence
* of selective slashing.
*/
recoveredFpBtcSk: Uint8Array;
}
/**
* InclusionProof proves the existence of tx on BTC blockchain
* including
* - the position of the tx on BTC blockchain
* - the Merkle proof that this tx is on the above position
*/
export interface InclusionProof {
/** key is the position (txIdx, blockHash) of this tx on BTC blockchain */
key: TransactionKey | undefined;
/** proof is the Merkle proof that this tx is included in the position in `key` */
proof: Uint8Array;
}
export declare const FinalityProvider: MessageFns<FinalityProvider>;
export declare const FinalityProviderWithMeta: MessageFns<FinalityProviderWithMeta>;
export declare const BTCDelegation: MessageFns<BTCDelegation>;
export declare const DelegatorUnbondingInfo: MessageFns<DelegatorUnbondingInfo>;
export declare const BTCUndelegation: MessageFns<BTCUndelegation>;
export declare const BTCDelegatorDelegations: MessageFns<BTCDelegatorDelegations>;
export declare const BTCDelegatorDelegationIndex: MessageFns<BTCDelegatorDelegationIndex>;
export declare const SignatureInfo: MessageFns<SignatureInfo>;
export declare const CovenantAdaptorSignatures: MessageFns<CovenantAdaptorSignatures>;
export declare const SelectiveSlashingEvidence: MessageFns<SelectiveSlashingEvidence>;
export declare const InclusionProof: MessageFns<InclusionProof>;
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
[K in keyof P]: Exact<P[K], I[K]>;
} & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;
fromJSON(object: any): T;
toJSON(message: T): unknown;
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
}
export {};
//# sourceMappingURL=btcstaking.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!