Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@substrate/txwrapper-registry

Package Overview
Dependencies
Maintainers
0
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/txwrapper-registry

Polkadot-js type registry creation assistants for txwrapper libraries.

  • 7.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9K
decreased by-31.05%
Maintainers
0
Weekly downloads
 
Created
Source



@substrate/txwrapper-registry

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)

npm Github Actions david-dm



yarn add @substrate/txwrapper-registry

In a JS/TS index file of package:

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 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.

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 in polkadot-js.

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc