Skip to content

Latest commit

 

History

History
90 lines (55 loc) · 3.54 KB

README.md

File metadata and controls

90 lines (55 loc) · 3.54 KB

txwrapper-core

Tools for FRAME chain builders to publish chain specific offline transaction generation libraries.

Table of contents

Overview

The polkadot.js based txwrapper suite of packages provides chain builders with the tools to quickly create, test, and maintain a library of helper functions for offline transaction generation with their chain. End users can then use these chain specific packages to create an offline transaction workflow. (We sometimes refer to chain specific libs as txwrappers.)

For example, those looking to construct a transaction offline on Polkadot would require @substrate/txwrapper-polkadot. @substrate/txwrapper-polkadot is built by requiring @substrate/txwrapper-core, @substrate/txwrapper-registry, @substrate/txwrapper-substrate and re-exporting utilities and dispatchables relevant to Polkadot.

Packages

Published

Non-published

  • @substrate/txwrapper-example Usage examples including how to construct, sign, and decode an extrinsic with @substrate/txwrapper-polkadot.
  • @substrate/txwrapper-template Template package for chain builders.
  • txwrapper-acala PoC of how a FRAME-based chain can leverage txwrapper packages to create a txwrapper. N.B. This is only for PoC usage and not intended to be published by txwrapper-core repo maintainers.

End user examples

Click here for examples on how to use txwrappers for constructing, signing, and decoding transactions.

Chain builder guide

Click here to find our guide for chain builders. The guide explains how to make a chain specific txwrapper.

Develop, contribute, and maintain

Develop

Install dependencies:

yarn install

Build all packages:

yarn run build

Contribute

We welcome contributions!

Before submitting your PR, make sure to run the following commands

Run all tests:

yarn run test

Run the linter:

yarn run lint

# or to automatically fix warnings:

yarn run lint --fix

Maintain

Publish with lerna by running:*

yarn run deploy

N.B. Ensure you have GH_TOKEN env variable set to a GitHub personal access token (PAT) so lerna can publish the release on github.

*The publisher will need publishing permissions to the @substrate npm org.