UNPKG

chaingate

Version:

Multi-chain cryptocurrency SDK for TypeScript — unified API for Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Cash, Polygon, Arbitrum, and any EVM-compatible chain. Create wallets, query balances, send transactions, and manage tokens and NFTs across UTXO

31 lines (30 loc) 1.04 kB
import { ViewOnlyWallet } from '../ViewOnlyWallet'; import type { WalletSerialized } from '../../WalletSerialized'; import { DerivedPublicKey } from '../../DerivedPublicKey'; /** * Read-only HD wallet from an extended public key (xpub). Supports derivation (non-hardened only). * * @example * ```ts * const wallet = new XpubWallet('xpub6CUGRUo...'); * const derived = await wallet.derive("m/0/0"); * console.log(derived.publicKeyHex); * ``` */ export declare class XpubWallet extends ViewOnlyWallet { readonly walletType: "xpub"; private readonly _xpub; private readonly _publicKey; /** @param xpub - The extended public key string. */ constructor(xpub: string); /** Compressed master public key as hex string. */ get publicKey(): string; /** * Derives a public key at the given path (non-hardened only). * * @param derivationPath - e.g. `"m/0/0"`. */ derive(derivationPath: string): Promise<DerivedPublicKey>; /** @inheritdoc */ serialize(): Promise<WalletSerialized>; }