# @types/hdkey

> TypeScript definitions for hdkey

Latest version **2.1.0** (published 2024-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/hdkey
pnpm add @types/hdkey
yarn add @types/hdkey
bun add @types/hdkey
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2024-10-17 |
| First published | 2018-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/hdkey
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hdkey
- npm.io page: https://npm.io/package/@types/hdkey

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 2.1.0 (latest) — 2024-10-17
- 2.0.3 (ts4.5) — 2023-11-07
- 2.0.1 (ts3.8) — 2022-01-11
- 2.0.0 (ts3.6) — 2021-04-15
- 0.7.1 (ts2.1) — 2019-09-26
- 2.0.2 — 2023-10-18
- 0.7.0 — 2018-05-30

## README

# Installation
> `npm install --save @types/hdkey`

# Summary
This package contains type definitions for hdkey (https://github.com/cryptocoinjs/hdkey).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hdkey.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hdkey/index.d.ts)
````ts
/// <reference types="node"/>

declare class HDNode {
    static fromMasterSeed(seed: Buffer, versions?: { private: number; public: number }): HDNode;
    publicKey: Buffer | null;
    privateKey: Buffer | null;
    chainCode: Buffer | null;
    constructor(versions?: { private: number; public: number });
    derive(path: string): HDNode;
    toJSON(): { xpriv: string; xpub: string };
    static fromJSON(obj: { xpriv: string; xpub: string }): HDNode;
    static fromExtendedKey(
        xpriv: string,
        versions?: { private: number; public: number },
        skipVerification?: boolean,
    ): HDNode;
    sign(hash: Buffer): Buffer;
    verify(hash: Buffer, signature: Buffer): boolean;
    wipePrivateData(): HDNode;
    privateExtendedKey: string | null;
    publicExtendedKey: string;
    versions: { private: number; public: number };
    depth: number;
    index: number;
    fingerprint: number;
    parentFingerprint: number;
    identifier: string | undefined;
    pubKeyHash: string | undefined;
    deriveChild(index: number): HDNode;
    static HARDENED_OFFSET: number;
}
export = HDNode;

````

### Additional Details
 * Last updated: Thu, 17 Oct 2024 23:08:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Leonid Logvinov](https://github.com/LogvinovLeon), [Tvrtko Majstorovic](https://github.com/TvrtkoM), and [Alberto Torre](https://github.com/JAlbertoGonzalez).

---
_Source: https://npm.io/package/@types/hdkey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
