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)
3.5.0 (2020-07-14)
3.4.0 (2020-07-12)
3.3.0 (2020-06-24)
3.2.0 (2020-06-16)
3.1.4 (2020-06-08)
- deps: Bump @polkadot/api to v1.17.2 (#163) (08a0a54)
- deps: Bump @polkadot/api to v1.18.1 (#168) (291ab52)
3.1.3 (2020-06-06)
3.1.2 (2020-05-28)
- deps: Update to @polkadot/[email protected] (#157) (da60015)
3.1.1 (2020-05-26)
- deps: Update to @polkadot/[email protected] (#156) (eb1b941)
3.1.0 (2020-05-26)
3.0.2 (2020-05-22)
3.0.1 (2020-05-21)
3.0.0 (2020-05-18)
BaseTxInfo
now takes an additionaltransactionVersion
field.
2.0.0 (2020-05-16)
- This refactor breaks compatibility with v1, as all functions now require a
{ metadataRpc?, registry }
last argument.
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 themetadata
field has been renamed tometadataRpc
. Whether a function needsmetadataRpc
is documented for each function.deriveAddress
's 2nd argumentss58Format
is now mandatory, and does not default to Kusama's prefix anymore.
1.3.0 (2020-05-11)
- deps: Update @polkadot/api to v1.13.1 (#138) (bea59fc)
- Polkadot formatting on address in example (#131) (1cdf19a)
1.2.8 (2020-05-04)
- deps: Update to @polkadot/[email protected] (#130) (5422323)
1.2.7 (2020-04-30)
1.2.6 (2020-04-27)
1.2.5 (2020-04-21)
- deps: Update to @polkadot/[email protected] (#117) (6b3d715)
1.2.4 (2020-04-01)
1.2.3 (2020-03-31)
1.2.2 (2020-03-16)
1.2.1 (2020-03-16)
1.2.0 (2020-03-12)
1.1.1 (2020-03-11)
1.1.0 (2020-03-10)
1.0.0 (2020-02-26)
No breaking change. This package will follow semver henceforth.
0.4.8 (2020-02-26)
0.4.7 (2020-02-06)
0.4.6 (2020-01-31)
0.4.5 (2020-01-21)
0.4.4 (2020-01-15)
0.4.3 (2020-01-10)
0.4.2 (2020-01-03)
0.4.1 (2020-01-03)
0.4.0 (2020-01-02)
-
- Instead of importing methods (like
bond
,balanceTransfer
) directly from the root, the package exposes amethods
object in the root, and this object contains all available methods organized by pallet:
- Instead of importing methods (like
- 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 isBaseTxInfo
, 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..', ...});
0.3.2 (2019-12-30)
0.3.1 (2019-12-16)
- Add decodeSigningPayload to decode export (#15) (38505a6)
- Put function importPrivateKey in correct file (#14) (14e1c27)
0.3.0 (2019-12-11)
generateKeypair
has been removed.
0.2.0 (2019-12-06)
-
decodeSignedTx
,decodeSigningPayload
,decodeUnsignedTx
are not exposed from@amaurymartiny/txwrapper
root anymore, as they are considered low-level. Consider using the high-leveldecode
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'
- If you still need to access the above functions separately, please use e.g.
- Add
decode
for signedTx and signingPayload (#10) (674253e) - Generic
decode
also decodes unsigned (#12) (a91f7ba)
0.1.3 (2019-12-05)
0.1.2 (2019-12-05)
0.1.1 (2019-12-03)
- Better typescript typings (e9a7450)
0.1.0 (2019-12-03)
-
decodeTx
has been renamed todecodeSignedTx
for clarity
0.0.5 (2019-12-02)
0.0.4 (2019-12-02)
0.0.3 (2019-11-29)
0.0.2 (2019-11-29)
- Output ts declaration files (5e0d0ff)
- Add deriveAddress (b9a1cc8)
- Add generateKeyPair (a8d817d)
- balanceTransfer (a4df58a)
- decodeTx (1135161)
- Export everything (0522dd8)