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
*/
export 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;
/**
* Finalize the inputs Xverse was asked to sign.
*
* Xverse returns the signed PSBT without finalizing it, so this is done
* locally to honor `autoFinalized`. Only the requested inputs are touched,
* leaving inputs owned by other signers untouched.
*/
private finalizeSignedInputs;
/**
* 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, which is not finalized
*
* Xverse has no equivalent of `autoFinalized`, so when it is enabled the
* requested inputs are finalized locally after signing. `sighashTypes` and
* `disableTweakSigner` in `inputsToSign` are not supported by Xverse and
* are ignored.
*
* @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
*/
export 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 { barrel_d_exports as t };
//# sourceMappingURL=barrel.d.ts.map