import * as statics from '@bitgo/statics'; import * as utxolib from '@bitgo/utxo-lib'; import { WatchOnly, WatchOnlyAccount } from '../codecs'; export declare const signerMacaroonPermissions: { entity: string; action: string; }[]; export declare const lightningNetworkName: readonly ["bitcoin", "testnet"]; export type LightningNetworkName = (typeof lightningNetworkName)[number]; /** * Checks if the coin name is a lightning coin name. */ export declare function isLightningCoinName(coinName: unknown): coinName is 'lnbtc' | 'tlnbtc'; /** * Get the utxolib network for a lightning network. */ export declare function getLightningNetwork(networkName: LightningNetworkName): utxolib.Network; /** * Get the lightning coin name for a utxolib network. */ export declare function getLightningCoinName(network: utxolib.Network): string; /** * Checks if the network name is a valid lightning network name. */ export declare function isValidLightningNetworkName(networkName: unknown): networkName is LightningNetworkName; /** * Checks if the network is a valid lightning network. */ export declare function isValidLightningNetwork(network: unknown): network is utxolib.Network; /** * Returns the statics network data for a lightning coin. */ export declare function getStaticsLightningNetwork(coinName: string): statics.LightningNetwork; /** * Returns the utxolib network for a lightning coin. */ export declare function getUtxolibNetwork(coinName: string): utxolib.Network; /** * Returns coin specific data for a lightning coin. */ export declare function unwrapLightningCoinSpecific(obj: { lnbtc: V; } | { tlnbtc: V; }, coinSpecificPath: string): V; /** * Adds an IP caveat to a macaroon and returns the modified macaroon as a Base64 string. */ export declare function addIPCaveatToMacaroon(macaroonBase64: string, ip: string): string; export declare const PURPOSE_WRAPPED_P2WKH = 49; export declare const PURPOSE_P2WKH = 84; export declare const PURPOSE_P2TR = 86; export declare const PURPOSE_ALL_OTHERS = 1017; export type ExtendedKeyPurpose = typeof PURPOSE_WRAPPED_P2WKH | typeof PURPOSE_P2WKH | typeof PURPOSE_P2TR | typeof PURPOSE_ALL_OTHERS; export type ExtendedKeyAddressPurpose = typeof PURPOSE_WRAPPED_P2WKH | typeof PURPOSE_P2WKH | typeof PURPOSE_P2TR; /** * Converts a prefix related to purpose and network (ypub, vpub, etc.) to extended public key (xpub). */ export declare function revertXpubPrefix(xpub: string, purpose: ExtendedKeyPurpose, isMainnet: boolean): string; /** * Derives watch-only accounts from the master HD node for the given purposes and network. */ export declare function deriveWatchOnlyAccounts(masterHDNode: utxolib.BIP32Interface, isMainnet: boolean, params?: { onlyAddressCreationAccounts?: boolean; }): WatchOnlyAccount[]; /** * Creates a watch-only wallet init data from the provided signer root key and network. */ export declare function createWatchOnly(signerRootKey: string, network: utxolib.Network): WatchOnly; /** * Derives the shared Elliptic Curve Diffie-Hellman (ECDH) secret between the user's auth extended private key * and the Lightning service's public key for secure communication. */ export declare function deriveLightningServiceSharedSecret(coinName: 'lnbtc' | 'tlnbtc', userAuthXprv: string): Buffer; /** * Derives the shared secret for the middleware using a private key and the middleware's public key. */ export declare function deriveMiddlewareSharedSecret(coinName: 'lnbtc' | 'tlnbtc', xprv: string): Buffer; /** * Derives the shared secret for TAT service using ta private key and the TAT public key. */ export declare function deriveTatSharedSecret(coinName: 'lnbtc' | 'tlnbtc', xprv: string): Buffer; /** * Given a seed, compute a BIP32 derivation index. * 0 <= index < 2147483648 (largest 31 bit number). This needs to be 2^31 - 1 so that the bip32 library * can derive the hardened key. * @param seed (optional) If nothing provided, we will generate one randomly */ export declare function computeBip32DerivationIndexFromSeed(seed?: string): number; //# sourceMappingURL=lightningUtils.d.ts.map