@types/create-xpub
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

Installation

npm install --save @types/create-xpub

Summary

This package contains type definitions for create-xpub (https://github.com/lukechilds/create-xpub#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/create-xpub.

index.d.ts

export = createXpub;

/**
 * Creates a Base58 encoded extended public key (xpub) for use in a
 * [BIP32 hierarchical deterministic wallet](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).
 *
 * Tip: If you're working with ledgerjs you can pass the output of
 * [`getWalletPublicKey()`](http://ledgerhq.github.io/ledgerjs/docs/#btcgetwalletpublickey) almost directly in.
 *
 * @returns A Base58 encoded extended public key.
 */
declare function createXpub(options: createXpub.Options): string;

declare namespace createXpub {
    /**
     * Mainnet (xpub) version bytes.
     */
    const mainnet: 0x0488B21E;
    /**
     * Testnet (tpub) version bytes.
     */
    const testnet: 0x043587CF;

    interface Options {
        /**
         * Network version bytes.
         * @default 0x0488B21E
         */
        networkVersion?: number | undefined;
        /**
         * The depth of the derived key.
         */
        depth: number;
        /**
         * The child number.
         */
        childNumber: number;
        /**
         * The chain code.
         */
        chainCode: string;
        /**
         * The public key in compressed or uncompressed form.
         */
        publicKey: string;
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/create-xpub

Weekly Downloads

9

Version

2.1.3

License

MIT

Unpacked Size

5.05 kB

Total Files

5

Last publish

Collaborators

  • types