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) 793 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DerivedPublicKey = void 0; const utils_1 = require("../utils"); /** * A public key derived from an HD wallet. Returned by {@link HDWallet.derivePublicKey} * and {@link XpubWallet.derive}. */ class DerivedPublicKey { /** @internal */ constructor(data) { this._publicData = data; } /** The compressed public key as raw bytes. */ get publicKey() { return this._publicData.publicKey; } /** The compressed public key as hex. */ get publicKeyHex() { return (0, utils_1.bytesToHex)(this.publicKey); } /** The extended public key (xpub). */ get xpub() { return this._publicData.xpub; } } exports.DerivedPublicKey = DerivedPublicKey;