Package detail

@substrate/txwrapper-polkadot

paritytech138.4kApache-2.07.5.3

Helper functions for Polkadot, Kusama, Paseo and Westend offline transaction generation.

readme



@substrate/txwrapper-polkadot

Helper functions for Polkadot, Kusama, Paseo and Westend offline transaction generation.

npm Github Actions david-dm



About

Txwrapper library for polkadot relay and system chains; specifically Polkadot, Kusama, Paseo, Westend, Asset Hub Polkadot and Asset Hub Kusama.

Note: not all methods available apply to all supported chains. To check what methods are supported by a chain consult the pallets included in chain's runtime.

Get Started

yarn add @substrate/txwrapper-polkadot

In a JS/TS file:

import {
  construct,
  methods,
} from '@substrate/txwrapper-polkadot';

const unsigned = methods.balance.transfer(
  {
    dest: 'FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP',
    value: 100,
  },
  {
    // Additional information needed to construct the transaction offline.
  }
);

const signingPayload = construct.signingPayload(unsigned, { registry });
// On your offline device, sign the payload.
const signature = myOfflineSigning(signingPayload);

// `tx` is ready to be broadcasted.
const tx = construct.signedTx(unsigned, signature, { metadataRpc, registry });

Have a look at the examples to see how you can perform the whole lifecycle of a transaction, from generation to signing to broadcast.

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

7.5.3 (2024-11-26)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.5.2 (2024-10-15)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.5.1 (2024-06-18)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.5.0 (2024-06-11)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.5.0 (2024-06-11)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.4.0 (2024-04-25)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.3.0 (2024-03-19)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.2.1 (2024-02-29)

Bug Fixes

  • deps: bumped @substrate/dev to v0.7.1 (#357) (47bda87)

7.2.0 (2023-12-19)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.1.1 (2023-10-23)

Note: Version bump only for package @substrate/txwrapper-polkadot

7.1.0 (2023-10-16)

Bug Fixes

  • txwrapper-polkadot: export xcmPallet as part of methods (#326) (d68ddd2)

Features

  • txwrapper-polkadot: Add limited xcm calls for reserve and teleport (#327) (44594f5)

7.0.1 (2023-07-04)

Bug Fixes

  • rename state{mint, mine} to asset-hub-* (#307) (3a1822a)

7.0.0 (2023-07-03)

Note: Version bump only for package @substrate/txwrapper-polkadot

6.0.1 (2023-05-25)

Note: Version bump only for package @substrate/txwrapper-polkadot

6.0.0 (2023-05-08)

  • fix!: refactor the whole testing system with metadata, remove old calls, and fix some types (#295) (58d026a), closes #295

Features

  • add additionalTypes, and typesBundle to getRegistryBase (#294) (671a2d1)

BREAKING CHANGES

  • fix balances

  • metadata and decode

  • method

  • remove constants

  • remove a large amount of bloat

  • ensure setKets kets type is correct

5.0.1 (2023-02-28)

Note: Version bump only for package @substrate/txwrapper-polkadot

5.0.0 (2023-01-13)

Note: Version bump only for package @substrate/txwrapper-polkadot

4.1.0 (2022-12-29)

Note: Version bump only for package @substrate/txwrapper-polkadot

4.0.3 (2022-12-07)

Note: Version bump only for package @substrate/txwrapper-polkadot

4.0.2 (2022-11-28)

Note: Version bump only for package @substrate/txwrapper-polkadot

4.0.1 (2022-10-03)

Bug Fixes

  • remove asSpecifiedCallsOnlyV14 from getRegistryBase (#249) (8d94be4)

4.0.0 (2022-09-21)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.2.2 (2022-09-06)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.2.1 (2022-08-30)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.2.0 (2022-08-16)

Features

3.1.7 (2022-07-26)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.6 (2022-07-12)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.5 (2022-07-05)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.4 (2022-06-27)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.3 (2022-06-20)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.2 (2022-06-15)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.1 (2022-06-07)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.1.0 (2022-05-31)

Features

3.0.4 (2022-05-24)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.0.3 (2022-05-17)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.0.2 (2022-05-09)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.0.1 (2022-05-04)

Note: Version bump only for package @substrate/txwrapper-polkadot

3.0.0 (2022-05-04)

Note: Version bump only for package @substrate/txwrapper-polkadot

2.0.3 (2022-04-21)

Note: Version bump only for package @substrate/txwrapper-polkadot

2.0.2 (2022-04-13)

Note: Version bump only for package @substrate/txwrapper-polkadot

2.0.1 (2022-04-07)

Note: Version bump only for package @substrate/txwrapper-polkadot

2.0.0 (2022-04-06)

Bug Fixes

  • changelog: deprecate 1.7.0, and remove 1.6.0 (#205) (cec26b1)

1.7.0 (2022-04-06)

!Warning Deprecated: Please refer to v2.0.0 for this release

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.9 (2022-03-30)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.8 (2022-03-24)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.7 (2022-03-15)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.6 (2022-03-09)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.5 (2022-03-08)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.4 (2022-02-25)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.3 (2022-02-22)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.2 (2022-02-10)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.1 (2022-01-18)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.5.0 (2022-01-18)

Bug Fixes

Features

  • support for signedExtentions, and userExtensions (#170) (121909b)

1.4.0 (2022-01-06)

Bug Fixes

1.3.2 (2021-12-08)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.3.1 (2021-12-07)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.3.0 (2021-12-02)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.21 (2021-11-16)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.20 (2021-11-09)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.19 (2021-10-28)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.18 (2021-10-20)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.17 (2021-09-30)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.16 (2021-09-22)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.14 (2021-09-13)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.13 (2021-08-31)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.12 (2021-08-23)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.11 (2021-08-17)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.10 (2021-08-02)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.9 (2021-07-27)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.8 (2021-07-19)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.7 (2021-07-13)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.6 (2021-07-07)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.5 (2021-06-29)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.4 (2021-06-28)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.3 (2021-06-21)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.2 (2021-06-14)

Bug Fixes

  • types: Update polkadot-js deps to get the latest types (#102) (541822b)

1.2.1 (2021-06-07)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.2.0 (2021-06-02)

Features

  • txwrapper-polkadot: Add crowdloan.addMemo (#99) (0b305ec)

1.1.3 (2021-05-31)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.1.2 (2021-05-26)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.1.1 (2021-05-18)

Note: Version bump only for package @substrate/txwrapper-polkadot

1.1.0 (2021-05-11)

Features

  • txwrapper-polkadot: Add support for Statemint & Statemine (#75) (8958d30)

1.0.0 (2021-05-03)

Bug Fixes

0.5.1 (2021-04-19)

Note: Version bump only for package @substrate/txwrapper-polkadot

0.5.0 (2021-04-05)

Note: Version bump only for package @substrate/txwrapper-polkadot

0.4.1 (2021-03-29)

Note: Version bump only for package @substrate/txwrapper-polkadot

0.4.0 (2021-03-22)

Features

  • polkadot: Add pallet methods crowdloan.{contribute, withdraw} (#64) (09542bd), closes #63

0.3.0 (2021-03-15)

Note: Version bump only for package @substrate/txwrapper-polkadot

0.2.1 (2021-03-02)

Bug Fixes

  • types: Bump deps to get latest type definitions (#59) (76b5e55)

0.2.0-beta.0 (2021-02-23)

Features

  • migrate system, and session txwrapper methods (#51) (3f0ed07)

0.1.0 (2021-02-15)

Features

  • Add methods multisig.{asMulti, approveAsMulti, cancelAsMulti} (#52) (6476a74)
  • Add proxy methods to txwrapper-{substrate, polkadot} (#21) (1c09a0e)
  • create initial substrate, polkadot, and example packages (#10) (0f0824e)
  • ORML methods; Acala pkg; More dynamic getRegistry and knownChainProperties; Lerna (#26) (731a943)
  • txwrapper-template & CHAIN_BUILDER guide (#35) (427ea8c)
  • Use local getRegistry functions (#48) (4c430ba), closes #47 #46 #45