PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@babylonlabs-io/babylon-proto-ts/dist/generated/babylon/btcstaking/v1
Просмотр файла: tx.d.ts
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Description } from "../../../cosmos/staking/v1beta1/staking";
import { InclusionProof } from "./btcstaking";
import { Params } from "./params";
import { ProofOfPossessionBTC } from "./pop";
export declare const protobufPackage = "babylon.btcstaking.v1";
/** MsgCreateFinalityProvider is the message for creating a finality provider */
export interface MsgCreateFinalityProvider {
/**
* addr defines the address of the finality provider that will receive
* the commissions to all the delegations.
*/
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 btc_pk over the FP signer address. */
pop: ProofOfPossessionBTC | undefined;
}
/** MsgCreateFinalityProviderResponse is the response for MsgCreateFinalityProvider */
export interface MsgCreateFinalityProviderResponse {
}
/** MsgEditFinalityProvider is the message for editing an existing finality provider */
export interface MsgEditFinalityProvider {
/** addr the address of the finality provider that whishes to edit his information. */
addr: string;
/** btc_pk is the Bitcoin secp256k1 PK of the finality provider to be edited */
btcPk: Uint8Array;
/** description defines the updated description terms for the finality provider */
description: Description | undefined;
/** commission defines the updated commission rate of the finality provider */
commission: string;
}
/** MsgEditFinalityProviderResponse is the response for MsgEditFinalityProvider */
export interface MsgEditFinalityProviderResponse {
}
/** MsgCreateBTCDelegation is the message for creating a BTC delegation */
export interface MsgCreateBTCDelegation {
/** staker_addr is the address to receive rewards from BTC delegation. */
stakerAddr: string;
/** pop is the proof of possession of btc_pk by the staker_addr. */
pop: ProofOfPossessionBTC | undefined;
/** btc_pk is the Bitcoin secp256k1 PK of the BTC delegator */
btcPk: Uint8Array;
/**
* fp_btc_pk_list is the list of Bitcoin secp256k1 PKs of the finality providers, if there is more than one
* finality provider pk it means that delegation is re-staked
*/
fpBtcPkList: Uint8Array[];
/** staking_time is the time lock used in staking transaction */
stakingTime: number;
/** staking_value is the amount of satoshis locked in staking output */
stakingValue: number;
/** staking_tx is a bitcoin staking transaction i.e transaction that locks funds */
stakingTx: Uint8Array;
/** staking_tx_inclusion_proof is the inclusion proof of the staking tx in BTC chain */
stakingTxInclusionProof: InclusionProof | undefined;
/**
* slashing_tx is the slashing tx
* Note that the tx itself does not contain signatures, which are off-chain.
*/
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 staking tx output.
* The staking tx output further needs signatures from covenant and finality provider in
* order to be spendable.
*/
delegatorSlashingSig: Uint8Array;
/**
* unbonding_time is the time lock used when funds are being unbonded. It is be used in:
* - unbonding transaction, time lock spending path
* - staking slashing transaction, change output
* - unbonding slashing transaction, change output
* It must be smaller than math.MaxUInt16 and larger that max(MinUnbondingTime, CheckpointFinalizationTimeout)
*/
unbondingTime: number;
/**
* fields related to unbonding transaction
* unbonding_tx is a bitcoin unbonding transaction i.e transaction that spends
* staking output and sends it to the unbonding output
*/
unbondingTx: Uint8Array;
/**
* unbonding_value is amount of satoshis locked in unbonding output.
* NOTE: staking_value and unbonding_value could be different because of the difference between the fee for staking tx and that for unbonding
*/
unbondingValue: number;
/**
* unbonding_slashing_tx is the slashing tx which slash unbonding contract
* Note that the tx itself does not contain signatures, which are off-chain.
*/
unbondingSlashingTx: Uint8Array;
/** delegator_unbonding_slashing_sig is the signature on the slashing tx by the delegator (i.e., SK corresponding to btc_pk). */
delegatorUnbondingSlashingSig: Uint8Array;
}
/** MsgCreateBTCDelegationResponse is the response for MsgCreateBTCDelegation */
export interface MsgCreateBTCDelegationResponse {
}
/** MsgAddBTCDelegationInclusionProof is the message for adding proof of inclusion of BTC delegation on BTC chain */
export interface MsgAddBTCDelegationInclusionProof {
signer: string;
/**
* staking_tx_hash is the hash of the staking tx.
* It uniquely identifies a BTC delegation
*/
stakingTxHash: string;
/** staking_tx_inclusion_proof is the inclusion proof of the staking tx in BTC chain */
stakingTxInclusionProof: InclusionProof | undefined;
}
/** MsgAddBTCDelegationInclusionProofResponse is the response for MsgAddBTCDelegationInclusionProof */
export interface MsgAddBTCDelegationInclusionProofResponse {
}
/** MsgAddCovenantSigs is the message for handling signatures from a covenant member */
export interface MsgAddCovenantSigs {
signer: string;
/** pk is the BTC public key of the covenant member */
pk: Uint8Array;
/**
* staking_tx_hash is the hash of the staking tx.
* It uniquely identifies a BTC delegation
*/
stakingTxHash: string;
/**
* sigs is a list of adaptor signatures of the covenant
* the order of sigs should respect the order of finality providers
* of the corresponding delegation
*/
slashingTxSigs: Uint8Array[];
/**
* unbonding_tx_sig is the signature of the covenant on the unbonding tx submitted to babylon
* the signature follows encoding in BIP-340 spec
*/
unbondingTxSig: Uint8Array;
/**
* slashing_unbonding_tx_sigs is a list of adaptor signatures of the covenant
* on slashing tx corresponding to unbonding tx submitted to babylon
* the order of sigs should respect the order of finality providers
* of the corresponding delegation
*/
slashingUnbondingTxSigs: Uint8Array[];
}
/** MsgAddCovenantSigsResponse is the response for MsgAddCovenantSigs */
export interface MsgAddCovenantSigsResponse {
}
/**
* MsgBTCUndelegate is the message for handling signature on unbonding tx
* from its delegator. This signature effectively proves that the delegator
* wants to unbond this BTC delegation
*/
export interface MsgBTCUndelegate {
signer: string;
/**
* staking_tx_hash is the hash of the staking tx.
* It uniquely identifies a BTC delegation
*/
stakingTxHash: string;
/**
* stake_spending_tx is a bitcoin transaction that spends the staking transaction
* i.e it has staking output as an input
*/
stakeSpendingTx: Uint8Array;
/**
* spend_spending_tx_inclusion_proof is the proof of inclusion of the
* stake_spending_tx in the BTC chain
*/
stakeSpendingTxInclusionProof: InclusionProof | undefined;
}
/** MsgBTCUndelegateResponse is the response for MsgBTCUndelegate */
export interface MsgBTCUndelegateResponse {
}
/**
* MsgSelectiveSlashingEvidence is the message for handling evidence of selective slashing
* launched by a finality provider
*/
export interface MsgSelectiveSlashingEvidence {
signer: string;
/**
* staking_tx_hash is the hash of the staking tx.
* It uniquely identifies a BTC delegation
*/
stakingTxHash: string;
/**
* recovered_fp_btc_sk is the BTC SK of the finality provider who
* launches the selective slashing offence. The SK is recovered by
* using a covenant adaptor signature and the corresponding Schnorr
* signature
*/
recoveredFpBtcSk: Uint8Array;
}
/** MsgSelectiveSlashingEvidenceResponse is the response for MsgSelectiveSlashingEvidence */
export interface MsgSelectiveSlashingEvidenceResponse {
}
/** MsgUpdateParams defines a message for updating btcstaking module parameters. */
export interface MsgUpdateParams {
/**
* authority is the address of the governance account.
* just FYI: cosmos.AddressString marks that this field should use type alias
* for AddressString instead of string, but the functionality is not yet implemented
* in cosmos-proto
*/
authority: string;
/**
* params defines the finality parameters to update.
*
* NOTE: All parameters must be supplied.
*/
params: Params | undefined;
}
/** MsgUpdateParamsResponse is the response to the MsgUpdateParams message. */
export interface MsgUpdateParamsResponse {
}
export declare const MsgCreateFinalityProvider: MessageFns<MsgCreateFinalityProvider>;
export declare const MsgCreateFinalityProviderResponse: MessageFns<MsgCreateFinalityProviderResponse>;
export declare const MsgEditFinalityProvider: MessageFns<MsgEditFinalityProvider>;
export declare const MsgEditFinalityProviderResponse: MessageFns<MsgEditFinalityProviderResponse>;
export declare const MsgCreateBTCDelegation: MessageFns<MsgCreateBTCDelegation>;
export declare const MsgCreateBTCDelegationResponse: MessageFns<MsgCreateBTCDelegationResponse>;
export declare const MsgAddBTCDelegationInclusionProof: MessageFns<MsgAddBTCDelegationInclusionProof>;
export declare const MsgAddBTCDelegationInclusionProofResponse: MessageFns<MsgAddBTCDelegationInclusionProofResponse>;
export declare const MsgAddCovenantSigs: MessageFns<MsgAddCovenantSigs>;
export declare const MsgAddCovenantSigsResponse: MessageFns<MsgAddCovenantSigsResponse>;
export declare const MsgBTCUndelegate: MessageFns<MsgBTCUndelegate>;
export declare const MsgBTCUndelegateResponse: MessageFns<MsgBTCUndelegateResponse>;
export declare const MsgSelectiveSlashingEvidence: MessageFns<MsgSelectiveSlashingEvidence>;
export declare const MsgSelectiveSlashingEvidenceResponse: MessageFns<MsgSelectiveSlashingEvidenceResponse>;
export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
/**
* Msg defines the Msg service.
* TODO: handle unbonding tx with full witness
*/
export interface Msg {
/** CreateFinalityProvider creates a new finality provider */
CreateFinalityProvider(request: MsgCreateFinalityProvider): Promise<MsgCreateFinalityProviderResponse>;
/** EditFinalityProvider edits an existing finality provider */
EditFinalityProvider(request: MsgEditFinalityProvider): Promise<MsgEditFinalityProviderResponse>;
/** CreateBTCDelegation creates a new BTC delegation */
CreateBTCDelegation(request: MsgCreateBTCDelegation): Promise<MsgCreateBTCDelegationResponse>;
/** AddBTCDelegationInclusionProof adds inclusion proof of a given delegation on BTC chain */
AddBTCDelegationInclusionProof(request: MsgAddBTCDelegationInclusionProof): Promise<MsgAddBTCDelegationInclusionProofResponse>;
/** AddCovenantSigs handles signatures from a covenant member */
AddCovenantSigs(request: MsgAddCovenantSigs): Promise<MsgAddCovenantSigsResponse>;
/** BTCUndelegate handles a signature on unbonding tx from its delegator */
BTCUndelegate(request: MsgBTCUndelegate): Promise<MsgBTCUndelegateResponse>;
/**
* SelectiveSlashingEvidence handles the evidence of selective slashing launched
* by a finality provider
*/
SelectiveSlashingEvidence(request: MsgSelectiveSlashingEvidence): Promise<MsgSelectiveSlashingEvidenceResponse>;
/** UpdateParams updates the btcstaking module parameters. */
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
}
export declare const MsgServiceName = "babylon.btcstaking.v1.Msg";
export declare class MsgClientImpl implements Msg {
private readonly rpc;
private readonly service;
constructor(rpc: Rpc, opts?: {
service?: string;
});
CreateFinalityProvider(request: MsgCreateFinalityProvider): Promise<MsgCreateFinalityProviderResponse>;
EditFinalityProvider(request: MsgEditFinalityProvider): Promise<MsgEditFinalityProviderResponse>;
CreateBTCDelegation(request: MsgCreateBTCDelegation): Promise<MsgCreateBTCDelegationResponse>;
AddBTCDelegationInclusionProof(request: MsgAddBTCDelegationInclusionProof): Promise<MsgAddBTCDelegationInclusionProofResponse>;
AddCovenantSigs(request: MsgAddCovenantSigs): Promise<MsgAddCovenantSigsResponse>;
BTCUndelegate(request: MsgBTCUndelegate): Promise<MsgBTCUndelegateResponse>;
SelectiveSlashingEvidence(request: MsgSelectiveSlashingEvidence): Promise<MsgSelectiveSlashingEvidenceResponse>;
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
}
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
}
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=tx.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!