import { Ut as WalletNetworkName, an as __exportAll, bt as BtcProvider, n as Address } from "./advancedBarrel-DTFSOc5v.js";
import { ccc } from "@ckb-ccc/core";
//#region src/signer.d.ts
/**
* Class representing a Bitcoin signer that extends SignerBtc
* @public
*/
declare class Signer extends ccc.SignerBtc {
readonly provider: BtcProvider;
readonly network?: WalletNetworkName | undefined;
private addressCache;
/**
* Creates an instance of Signer.
* @param client - The client instance.
* @param provider - The provider instance.
*/
constructor(client: ccc.Client, provider: BtcProvider, _preferredNetworks?: ccc.NetworkPreference[], network?: WalletNetworkName | undefined);
assertAddress(): Promise
;
private requestAddress;
/**
* Gets the Bitcoin account address.
* @returns A promise that resolves to the Bitcoin account address.
*/
getBtcAccount(): Promise;
/**
* Gets the Bitcoin public key.
* @returns A promise that resolves to the Bitcoin public key.
*/
getBtcPublicKey(): Promise;
/**
* Connects to the provider by requesting accounts.
* @returns A promise that resolves when the connection is established.
*/
connect(): Promise;
disconnect(): Promise;
onReplaced(listener: () => void): () => void;
/**
* Checks if the signer is connected.
* @returns A promise that resolves to true if connected, false otherwise.
*/
isConnected(): Promise;
private getNetwork;
/**
* Signs a raw message with the Bitcoin account.
* @param message - The message to sign.
* @returns A promise that resolves to the signed message.
*/
signMessageRaw(message: string | ccc.BytesLike): Promise;
/**
* Build default inputsToSign for all unsigned inputs
*/
private buildDefaultinputsToSign;
private prepareSignPsbtParams;
/**
* Signs a PSBT using Xverse wallet.
*
* @param psbtHex - The hex string of PSBT to sign.
* @param options - Options for signing the PSBT
* @returns A promise that resolves to the signed PSBT as a Hex string
*
* @remarks
* Xverse accepts:
* - psbt: A string representing the PSBT to sign, encoded in base64
* - signInputs: A Record where:
* - keys are the addresses to use for signing
* - values are the indexes of the inputs to sign with each address
*
* Xverse returns:
* - psbt: The base64 encoded signed PSBT
*
* @see https://docs.xverse.app/sats-connect/bitcoin-methods/signpsbt
*/
signPsbt(psbtHex: ccc.HexLike, options?: ccc.SignPsbtOptionsLike): Promise;
/**
* Broadcasts a PSBT to the Bitcoin network.
*
* @remarks
* Xverse does not support broadcasting a signed PSBT directly.
* It only supports "Sign and Broadcast" as a single atomic operation via `signAndBroadcastPsbt`.
*/
broadcastPsbt(_psbtHex: ccc.HexLike, _options?: ccc.SignPsbtOptionsLike): Promise;
signAndBroadcastPsbt(psbtHex: ccc.HexLike, options?: ccc.SignPsbtOptionsLike): Promise;
}
//#endregion
//#region src/signersFactory.d.ts
/**
* Retrieves the Xverse signer if available.
* @public
*
* @param client - The client instance.
* @returns All Xverse Signer instances
*/
declare function getXverseSigners(client: ccc.Client, preferredNetworks?: ccc.NetworkPreference[]): {
wallet: ccc.Wallet;
signerInfo: ccc.SignerInfo;
}[];
declare namespace barrel_d_exports {
export { Signer, getXverseSigners };
}
//#endregion
export { Signer, getXverseSigners, barrel_d_exports as t };
//# sourceMappingURL=barrel.d.ts.map