1. Mar 17, 2021
  2. Mar 12, 2021
    • Zeke Mostov's avatar
      fix(types)!: polkadot/api to v4 w. esm; Use substrate/dev for build (#404) · 22802183
      Zeke Mostov authored
      * fix(types)!: polkadot/api to v4 w. esm; Use substrate/dev for build
      
      BREAKING CHANGE
      Emitted .js is now es2020, requiring node >= 12.
      
      ## Changes
      - Use @substrate/dev for build configuration
          - new tsconfig.json targets es2019
          - prettier is now uses hard tabs and 2 spaces, which causes the huge diff
          - some slight type annotations where necessary for claims.ts and method.ts in order to pass the stricter tsconfig
          - Babel is now used to transpile the @polkadot/* packages `.js` from ESM to CJS for jest
      22802183
  3. Feb 15, 2021
  4. Aug 04, 2020
  5. Jul 10, 2020
  6. Jun 06, 2020
  7. May 26, 2020
  8. May 18, 2020
  9. May 16, 2020
    • Amaury Martiny's avatar
      refactor!: Pass mandatory registry everywhere (#141) · bd14e848
      Amaury Martiny authored
      BREAKING CHANGE:
      
      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:
      
      ```diff
      + // 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:
      
      ```diff
      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.
      bd14e848
  10. May 11, 2020
  11. May 04, 2020
  12. Apr 30, 2020
  13. Apr 28, 2020
  14. Apr 27, 2020
  15. Mar 30, 2020
  16. Mar 17, 2020
  17. Mar 16, 2020
  18. Mar 12, 2020