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

28 lines (27 loc) 1.06 kB
import { SigningWallet } from '../SigningWallet'; import type { WalletSerialized } from '../../WalletSerialized'; import { PrivateKey } from './PrivateKey'; import { PublicKey } from '../../ViewOnlyWallet/PublicKeyWallet/PublicKey'; /** * Wallet backed by a single private key (no HD derivation). * * @example * ```ts * const wallet = new PrivateKeyWallet(new PrivateKey('deadbeef...')); * console.log(wallet.publicKey); * ``` */ export declare class PrivateKeyWallet extends SigningWallet<PrivateKey> { readonly walletType: "privateKey"; private readonly _publicKey; /** @param privateKey - The private key. */ constructor(privateKey: PrivateKey); /** Compressed public key as hex. Available even when encrypted. */ get publicKey(): string; /** Returns the {@link PrivateKey}. Prompts for password if encrypted. */ getPrivateKey(): Promise<PrivateKey>; /** Returns the corresponding {@link PublicKey}. */ getPublicKey(): Promise<PublicKey>; /** @internal */ protected doSerialize(): WalletSerialized; }