# @substrate/txwrapper-registry

> Polkadot-js type registry creation assistants for txwrapper libraries.

Latest version **7.5.3** (published 2024-11-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @substrate/txwrapper-registry
pnpm add @substrate/txwrapper-registry
yarn add @substrate/txwrapper-registry
bun add @substrate/txwrapper-registry
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 7.5.3 |
| Published | 2024-11-26 |
| First published | 2021-02-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 47.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | Parity Technologies |
| Maintainers | bee344, tarikgul, marshacb, imod7 |

## Links

- npm: https://www.npmjs.com/package/@substrate/txwrapper-registry
- Repository: https://github.com/paritytech/txwrapper-core
- Homepage: https://github.com/paritytech/txwrapper-core/tree/master/packages/txwrapper-registry#readme
- Issues: https://github.com/paritytech/txwrapper-core/issues
- npm.io page: https://npm.io/package/@substrate/txwrapper-registry

## Dependencies (2)

- [@polkadot/networks](https://npm.io/package/@polkadot/networks.md) ^13.1.1
- [@substrate/txwrapper-core](https://npm.io/package/@substrate/txwrapper-core.md) ^7.5.3

## Recent versions

- 7.5.3 (latest) — 2024-11-26
- 0.1.1-beta.43 (canary) — 2021-02-15
- 7.5.2 — 2024-10-15
- 7.5.1 — 2024-06-18
- 7.5.0 — 2024-06-11
- 7.4.0 — 2024-04-25
- 7.3.0 — 2024-03-19
- 7.2.1 — 2024-02-29
- 7.2.0 — 2023-12-19
- 7.1.1 — 2023-10-23
- 7.1.0 — 2023-10-16
- 7.0.1 — 2023-07-04
- 7.0.0 — 2023-07-03
- 6.0.1 — 2023-05-25
- 6.0.0 — 2023-05-08
- … 74 more at https://npm.io/package/@substrate/txwrapper-registry/versions

## README

<br /><br />

<h1 align="center">@substrate/txwrapper-registry</h1>
<h4 align="center">Registry creation support, catering to chains with types in [@polkadot/apps-config](https://github.com/polkadot-js/apps/tree/master/packages/apps-config/README.md)</h4>

<p align="center">
  <a href="https://www.npmjs.com/package/@substrate/txwrapper-registry">
    <img alt="npm" src="https://img.shields.io/npm/v/@substrate/txwrapper-registry.svg" />
  </a>
  <a href="https://github.com/paritytech/txwrapper-core/actions">
    <img alt="Github Actions" src="https://github.com/paritytech/txwrapper-core/workflows/pr/badge.svg" />
  </a>
  <a href="https://david-dm.org/paritytech/txwrapper-core">
    <img alt="david-dm" src="https://img.shields.io/david/paritytech/txwrapper-core.svg" />
  </a>
</p>

<br /><br />

```bash
yarn add @substrate/txwrapper-registry
```

In a JS/TS index file of package:

```typescript
import { getRegistry } from '@substrate/txwrapper-registry';

  // Create Polkadot's type registry.
  const registry = getRegistry({
    chainName: 'Polkadot',
    specName: 'polkadot',
    specVersion: 26,
    metadataRpc,
  });
```

Have a look at the [examples](/packages/txwrapper-examples/README.md) to see how `getRegistry` is used in the whole lifecycle of a transaction, from generation to signing to broadcast.

## **Config**

In order to instantiate a registry with your chains custom types you must pass in the path to your own types bundle file. If you would like to generate a types bundle file and don't know how to, feel free to use this helper library we have created to generate these types. [generate-type-bundle](https://github.com/paritytech/generate-type-bundle).

The following env variable is accepted:

`TX_TYPES_BUNDLE=/path-to-file` - Note: It must be a valid JSON file that has the same structure as the [`OverrideBundleTypes`](https://github.com/polkadot-js/api/blob/master/packages/types/src/types/registry.ts#L75-L78) in polkadot-js.

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