# @types/rlp-encoding

> TypeScript definitions for rlp-encoding

Latest version **3.0.3** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rlp-encoding
pnpm add @types/rlp-encoding
yarn add @types/rlp-encoding
bun add @types/rlp-encoding
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2023-11-21 |
| First published | 2022-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 3.0.3 (latest) — 2023-11-21
- 3.0.0 (ts4.1) — 2022-11-07
- 3.0.2 — 2023-11-07
- 3.0.1 — 2023-10-18

## README

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

/**
 * Encode value to [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp).
 *
 * @param value The value to encode.
 * @param buffer The buffer to encode the `value` to. If not provided, a new `Buffer` will be allocated.
 * @param [offset=0] The byte offset in the `buffer` to encode `value` to.
 */
export function encode(value: ValueToEncode, buffer?: Buffer, offset?: number): Buffer;
export namespace encode {
    /**
     * The number of bytes the last call to `encode` produced.
     */
    const bytes: number | undefined;
}

/**
 * Decode [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp) encoded value.
 *
 * @param buffer The buffer containing the encoded value.
 * @param [start=0] The byte offset in the `buffer` start decoding.
 * @param [end=buffer.length] The byte offset in the `buffer` stop decoding.
 */
export function decode(buffer: Buffer, start?: number, end?: number): DecodedValue;
export namespace decode {
    /**
     * The number of bytes the last call to `decode` produced.
     */
    const bytes: number | undefined;
}

/**
 * Determines the number of bytes a `value` requires when encoded.
 */
export function encodingLength(value: ValueToEncode): number;

export type ValueToEncode = readonly ValueToEncode[] | Buffer | number | string | null | undefined;
export type DecodedValue = Buffer | DecodedValue[];

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).

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