Skip to content

Latest commit

 

History

History
471 lines (236 loc) · 20.7 KB

CHANGELOG.md

File metadata and controls

471 lines (236 loc) · 20.7 KB

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

3.5.1 (2020-07-14)

3.5.0 (2020-07-14)

Features

3.5.0 (2020-07-14)

Features

3.4.0 (2020-07-12)

Features

3.3.0 (2020-06-24)

Features

3.2.0 (2020-06-16)

Features

  • Add proxy methods and staking.payoutStakers (#172) (51e5d77)

3.1.4 (2020-06-08)

Bug Fixes

3.1.3 (2020-06-06)

Bug Fixes

3.1.2 (2020-05-28)

Bug Fixes

3.1.1 (2020-05-26)

Bug Fixes

3.1.0 (2020-05-26)

Features

  • Add helper functions for claiming and attesting (#154) (16eac1a), closes #155

3.0.2 (2020-05-22)

Features

3.0.1 (2020-05-21)

Bug Fixes

  • deps: Bump @polkadot/api to v1.15.0-beta.8 (#149) (ad37205)

3.0.0 (2020-05-18)

⚠ BREAKING CHANGES

  • BaseTxInfo now takes an additional transactionVersion field.

Features

2.0.0 (2020-05-16)

⚠ BREAKING CHANGES

  • This refactor breaks compatibility with v1, as all functions now require a { metadataRpc?, registry } last argument.

Rationale

In v1, by not passing any last argument, we implicitly used Kusama's most recent TypeRegistry. This was a handy shortcut, but might create hard-to-debug issues down the road (e.g. using another chain, or using Kusama with an incompatible spec version).

In v2, we never default to Kusama anymore, and always require the user passing the registry (and sometimes the metadata too, if needed, see docs for details).

Example 1:

+ // Get Kusama's registry at `specVersion`
+ const registry = getRegistry('Kusama', 'kusama', specVersion);

const unsigned = methods.balances.transfer(
  { dest: '1F...', value: 23 },
  {
    // other info about tx
-    metadataRpc: metadataRpc,
- }
+  }, {
+    metadataRpc: metadataRpc,
+    registry: registry
+  }
);

Example 2:

const unsigned = {...};
const signature = '...';

+ // Get Kusama's registry at `specVersion`
+ const registry = getRegistry('Kusama', 'kusama', unsigned.specVersion);

- const signed = createSigned(unsigned, signature);
+ const signed = createSigned(unsigned, signature, {
+    metadataRpc: unsigned.metadata,
+    registry,
+ });

Here is the full list of breaking changes:

  • decode function taking 3 arguments was deprecated in v1, in favor or 2 arguments. In v2, decode takes exactly 2 arguments.
  • createSigningPayload, createSignedTx, methods.*.* functions all take a mandatory last argument { metadataRpc?, registry }. Note that the metadata field has been renamed to metadataRpc. Whether a function needs metadataRpc is documented for each function.
  • deriveAddress's 2nd argument ss58Format is now mandatory, and does not default to Kusama's prefix anymore.

1.3.0 (2020-05-11)

Features

  • Deprecate validityPeriod, use eraPeriod in blocks instead (#137) (22f9dfb)

Bug Fixes

  • deps: Update @polkadot/api to v1.13.1 (#138) (bea59fc)
  • Polkadot formatting on address in example (#131) (1cdf19a)

1.2.8 (2020-05-04)

Bug Fixes

1.2.7 (2020-04-30)

Bug Fixes

1.2.6 (2020-04-27)

Bug Fixes

  • Add options parameter to all methods (#122) (ee13cb4)

1.2.5 (2020-04-21)

Bug Fixes

1.2.4 (2020-04-01)

Bug Fixes

  • deps: Update @polkadot/api to v1.9.1 (#106) (4a76397)

1.2.3 (2020-03-31)

Bug Fixes

1.2.2 (2020-03-16)

Bug Fixes

1.2.1 (2020-03-16)

Bug Fixes

  • Add options to createSignedTx and createSigningPayload (#91) (d72ac3e)

1.2.0 (2020-03-12)

Features

  • Pass options object as second argument in decode* (#88) (97ccc31)

1.1.1 (2020-03-11)

Bug Fixes

1.1.0 (2020-03-10)

Features

  • Add new calls for staking, democracy and vesting pallets (#84) (819d11e)

1.0.0 (2020-02-26)

No breaking change. This package will follow semver henceforth.

0.4.8 (2020-02-26)

Features

Bug Fixes

  • Update to latest @polkadot/api (#71) (8c4910c)

    • Note: you might need to bump typescript to >=3.8.2.

0.4.7 (2020-02-06)

Bug Fixes

  • Use again Capitalized enum in payee (#57) (694148d)

0.4.6 (2020-01-31)

Features

  • Add staking::{chill, validate} and session::setKeys (#51) (f5a6eed)

0.4.5 (2020-01-21)

Bug Fixes

  • Add default values for tip and validityPeriod (#41) (44cefad)

0.4.4 (2020-01-15)

Features

  • Add bondExtra and withdrawUnbonded (#30) (23f298f)

0.4.3 (2020-01-10)

0.4.2 (2020-01-03)

Bug Fixes

  • Update polkadot JS to make it work kusama1033 (#27) (6352732)

0.4.1 (2020-01-03)

Bug Fixes

0.4.0 (2020-01-02)

⚠ BREAKING CHANGES

    • Instead of importing methods (like bond, balanceTransfer) directly from the root, the package exposes a methods object in the root, and this object contains all available methods organized by pallet:
- import { bond, balanceTransfer } from '@amaurymartiny/txwrapper';
+ import { methods } from '@amaurymartiny/txwrapper';

- bond(...);
- balanceTransfer(...);
+ methods.staking.bond(...);
+ methods.balances.tranfer({dest: '...', value: }, {blockHash: '0x...'});
+ methods.balances.transferKeepAlive(...);
  • All the methods under methods.*.* take now 2 arguments: the first one is the actual args specific to the tx method, and the second one is BaseTxInfo, common to all transactions
methods.staking.nominate({target: ['F1...']}, {blockHash: '0x..', ...});
  • balances::transfer arguments has been renamed from {to, amount} to {dest, value}, to reflect the rust codebase:
methods.balances.transfer({dest: '5....', value: 100}, {blockHash: '0x..', ...});

Features

  • Add SS58 parameter to decode suite (#22) (3f7dd01)

  • Put all available methods under method.* (#23) (77176a3)

0.3.2 (2019-12-30)

Features

0.3.1 (2019-12-16)

Features

  • Add ss58Format as param to importPrivateKey (#16) (f47611e)

Bug Fixes

  • Add decodeSigningPayload to decode export (#15) (38505a6)
  • Put function importPrivateKey in correct file (#14) (14e1c27)

0.3.0 (2019-12-11)

⚠ BREAKING CHANGES

  • generateKeypair has been removed.

Features

0.2.0 (2019-12-06)

⚠ BREAKING CHANGES

    • decodeSignedTx, decodeSigningPayload, decodeUnsignedTx are not exposed from @amaurymartiny/txwrapper root anymore, as they are considered low-level. Consider using the high-level decode function, which can decode an unsigned tx or a signed tx.
- import { decodeSignedTx } from '@amaurymartiny/txwrapper';
+ import { decode } from '@amaurymartiny/txwrapper';

- decodeSignedTx('0x...');
+ decode('0x...');
    • If you still need to access the above functions separately, please use e.g. import { decodeSigningPayload } from '@amaurymartiny/txwrapper/lib/decode/decodeSigningPayload'

Features

  • Add decode for signedTx and signingPayload (#10) (674253e)
  • Generic decode also decodes unsigned (#12) (a91f7ba)

0.1.3 (2019-12-05)

Bug Fixes

0.1.2 (2019-12-05)

Bug Fixes

  • Add ss58 prefix for Polkadot (#8) (5f9fde8)

0.1.1 (2019-12-03)

Bug Fixes

  • Better typescript typings (e9a7450)

0.1.0 (2019-12-03)

⚠ BREAKING CHANGES

    • decodeTx has been renamed to decodeSignedTx for clarity

Features

  • Add decodeSigningPayload and getTxHash (#7) (ece7146)
  • Add decodeUnsignedTx (#6) (2a1460c)

Bug Fixes

0.0.5 (2019-12-02)

Features

  • Add balances::transfer_keep_alive (#4) (d480fb9)

0.0.4 (2019-12-02)

Bug Fixes

0.0.3 (2019-11-29)

0.0.2 (2019-11-29)

Bug Fixes

  • Output ts declaration files (5e0d0ff)

0.0.1 (2019-11-29)

Features

Bug Fixes