UNPKG

@roochnetwork/rooch-sdk

Version:
43 lines (42 loc) 1.23 kB
import { Bytes } from '../types/index.js'; import { RoochAddress } from './rooch.js'; import { ThirdPartyAddress } from './thirdparty-address.js'; export declare enum BitcoinNetowkType { Bitcoin = 0, Testnet = 1, Signet = 2, Regtest = 3 } declare enum BitcoinAddressType { pkh = 0, sh = 1, witness = 2 } export declare class BitcoinNetwork { private readonly network; constructor(network?: BitcoinNetowkType); static fromBech32Prefix(prefix: string): BitcoinNetwork | undefined; bech32HRP(): string; } export declare class BitcoinAddress extends ThirdPartyAddress { private readonly bytes; private roochAddress; constructor(input: string, network?: BitcoinNetowkType); static fromPublicKey(publicKey: Bytes, network?: BitcoinNetowkType): BitcoinAddress; private getPubkeyAddressPrefix; private getScriptAddressPrefix; toBytes(): Bytes; genMultiChainAddress(): Bytes; genRoochAddress(): RoochAddress; decode(): { bytes: Uint8Array; type: BitcoinAddressType; version: number; } | { bytes: Uint8Array; type: BitcoinAddressType; version?: undefined; }; private wrapAddress; } export {};