/** Account derived from a local private key (mnemonic or raw key). */ type LocalAccount = { type: "local" address: string /** Compressed public key (hex) */ publicKey: string /** Raw ECDSA sign over a hash */ sign(hash: Uint8Array): Uint8Array /** Sign a raw UTF-8 / byte message (`sha256(bytes)`). Not SIP-018. */ signMessage(message: string | Uint8Array): string }; /** Account with a user-provided signing function (sync or async). */ type CustomAccount = { type: "custom" address: string publicKey: string sign(hash: Uint8Array): Promise | Uint8Array }; /** Browser wallet provider interface (e.g. Leather, Xverse). */ type StacksProvider = { request(method: string, params?: any): Promise }; /** Account backed by a browser wallet {@link StacksProvider}. */ type ProviderAccount = { type: "provider" address: string publicKey: string provider: StacksProvider }; type AccountSource = { address: string publicKey: string sign(hash: Uint8Array): Promise | Uint8Array }; declare function privateKeyToAccount(privateKey: string | Uint8Array, options?: { addressVersion?: number }): LocalAccount; /** Append 0x01 suffix if not already compressed */ declare function compressPrivateKey(key: string | Uint8Array): string; declare function mnemonicToAccount(mnemonic: string, options?: { accountIndex?: number addressVersion?: number }): LocalAccount; type BitcoinNetwork = "mainnet" | "testnet" | "regtest"; type BitcoinKeyType = "p2wpkh" | "p2tr"; type MnemonicToBitcoinKeysOptions = { /** `'p2wpkh'` (BIP84, `bc1q…`) or `'p2tr'` (BIP86, `bc1p…`). */ type: BitcoinKeyType network?: BitcoinNetwork accountIndex?: number /** 0 = receive chain, 1 = change chain. */ changeIndex?: number addressIndex?: number }; type BitcoinKeys = { /** 32-byte private key, hex. */ privateKey: string /** 33-byte compressed public key, hex. */ publicKey: string address: string /** Full BIP84/BIP86 derivation path. */ path: string }; /**\\n* Derive Bitcoin keys + address from the same mnemonic that backs a Stacks\\n* account — BIP84 (native segwit) or BIP86 (taproot) paths, matching what\\n* Leather/Xverse derive for the paired BTC account. Pure derivation: no\\n* Bitcoin transaction building or signing.\\n*\\n* @example\\n* const btc = mnemonicToBitcoinKeys(mnemonic, { type: "p2tr" });\\n* btc.address; // bc1p…\\n* btc.path; // m/86'/0'/0'/0/0\\n*/ declare function mnemonicToBitcoinKeys(mnemonic: string, options: MnemonicToBitcoinKeysOptions): BitcoinKeys; declare function toAccount(source: AccountSource): CustomAccount; /** Create a ProviderAccount by querying the wallet for addresses */ declare function providerToAccount(provider: StacksProvider): Promise; export { toAccount, providerToAccount, privateKeyToAccount, mnemonicToBitcoinKeys, mnemonicToAccount, compressPrivateKey, StacksProvider, ProviderAccount, MnemonicToBitcoinKeysOptions, LocalAccount, CustomAccount, BitcoinKeys, BitcoinKeyType, AccountSource };