* Add jest watch option to package.json
* convert promise-alex-spec to ts & add types
* convert ./api tests from JS to TS
* convert ./api tests from JS to TS pt. 2
* More convert tests from JS to TS
* rpc-provider convert tests from js to ts
* rpc-provider tests js => ts
* rpc-provider tests js => ts
* linting issues
* tslint fixes
* 101 => 68 typescript errors
* WIP
* connect() e2e tests
* more fixes
* Fix linting errors of new ERA tests after merge
* test for listeners in connect
* formatting
* getting there...
* re-add skips
* test refactoring & codeclimate fixes
* more fixed tests
* mock.body workaround
* Fixed wrong test description
* ApiPromiseInterface => Api
* ws polyfill / send
* bring back isZero() test
* .then().catch() => .catch()
* Removed leftover body
* Type ProviderInterface => Http
* Fixed polyfill tests
* trailing whitespce
* (mock.body as any)['test_body'] and Balance
* Fix autoconnect in WsProvider
* Fixed part of linting errors in ERA tests
* call unused const unsubscribe
* added ts-ignores for testing private properties/ methods of Provider
* Archive node test
* Fixed linting for ERA tests
* Further changes
* Update packages/rpc-provider/src/ws/polyfill.spec.ts
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>
* relative paths for imports inside module & reordering of imports pt. 1
* relative paths for imports inside module & reordering of imports pt. 2
* added skip back to e2e transactions
* Fix some more tests in TS (#952)
* Fix some more tests in ts
* Add more constructor
* More typing in ./api
* .skip
* <SubmittableResult>'s
* .catch() -> return()
* Extrinsics tests
* Left TODO's for extrinsic e2e tests
* Workaround for failing Type Extrinsic tests
* Remove circular imports from types
- These are creating issues on RN and is not correct
- Uint is equivalent to BN (extends it), so remove it.
- Don't import all classes (it imports types itself) - CodecTypes can be exposed elsewhere if needed
* Cleanup linting & imports
* Cleanup compact decoding
* docs: Relates to #193. Generate Methods in API docs to Substrate Interfaces Extrinsics and Storage from Metadata
* Steps to generate Gitbook:
```
yarn run build:methodsdoc;
yarn run build;
yarn gitbook serve;
```
* Allows generating a docs/METHODS_STORAGE.md and docs/METHODS_EXTRINSICS.md files by running `yarn run build:methodsdoc`
* Note: The script runs `node packages/types/src/MetadataMdWrapper.js`, which uses Babel.js to transpile the TypeScript file MetadataMd.ts into JavaScript as MetadataMd.js by using the babel-plugin-module-resolver dependency that has been added to package.json. It runs MetadataMd.js, which parses a hard-coded copy of a Metadata response from the Substrate Node, and then generates the two aforementioned Markdown files to be included in the Gitbook.
* Important Note: DO NOT run `./node_modules/.bin/tsc packages/types/src/MetadataMd.ts; node packages/types/src/MetadataMd.js;`, as doing so may incorrectly transpile other TypeScript files, and will give errors like `TypeError: bn_js_1.default is not a constructor` when you run your unit tests.
* Added links that work when you go to http://localhost:4000/api/ and click the "api" link on the side menu
* Note: This was achieved by first adding the links in packages/api/README.md (i.e. `[Extrinsics (Substrate Interface)](../METHODS_EXTRINSICS.md)`). Note that the links could also be `METHODS_EXTRINSICS.html` and it would still work. It is VERY important to add links to these Markdown files in docs/SUMMARY.md (i.e. `[Storage](METHODS_STORAGE.md)`), as Gitbook generates HTML files in the same docs/ directory (i.e. it generates docs/METHODS_STORAGE.html) for any links provided in that file, and when you run `yarn run build; yarn gitbook serve` it will put a copy of those HTML files in the _book directory so it can be accessed in the browser.
* Replaces PR #249 and #255 from jg-meta-md from jg-meta-md-luke branches
* feat: Add script to generate decoded JSON file of the Metadata. Remove test.
* Summary:
* Running `yarn run build:decodedjson` will generate packages/types/src/Metadata.decoded.json from the Metadata in the Metadata.rpc.ts file.
* docs: Manually add RPC Substrate Interface API docs including author, chain, state, system
* docs: Append Storage Substrate methods to Storage Methods. Add consistent styling. Add descriptions
* Add Description at top of Substrate Interface page for RPC, Extrinsics, and Storage in API docs
* Add styling to Substrate Interface page for Extrinsics and Storage, including:
* ▸ symbol before each method
* bold method names
* adding Summary label and only showing the summary label if a summary exists
* adding a horizonal line between each section of methods
* Fix by adding new line after description when there is one in Extrinscis and Storage
* Manually creating a markdown file containing storage.substrate methods METHODS_STORAGE_SUBSTRATE.md, and then reading from the file and appending it to the bottom of the METHODS_STORAGE.md file that is generated, since the storage.substrate methods are not available from the Metadata.
* Fix by reading and writing to file using UTF8 instead of ASCII so symbols appear correctly
* Updating docs/METHODS_RPC.md and adding a horizontal line before the first section of methods
* docs: Fix Readme file step numbering
* docs: Generate the Substrate Interface Markdown files first when run yarn run build
* refactor: Move babel register config into shared file
* refactor: Use shared function to overcome codeclimate error
* fix: Reword description of RPC methodsto address review comment
* docs: Rename to Runtime Node Interfaces to address review comment
* docs: Rename to Runtime Node Interface in api Readme to address review comment
* docs: Fix minor typos
* docs: Fixes#117 providing Readme ref to jsonrpc docs
* fix: Remove preceding whitespace
* docs: Rename so RPC is not referred to as an interface of the runtime
* docs: Refer to Storage Substrate methods as always available to runtime implementation
* test: Restore the test that was unnecessary deleted
* Move scripts into packages/types/src/scripts
* docs: Add script to generate RPC interface docs
* fix: Fix TSlint error where element had any time due to no index signature
* refactor: Restore code back to normal instead of bowing to codeclimate whims
* refactor: Declare meaningful variables to make more readable
* docs: Show .subscribe when it is isSubscription method
* Re add type-extrinsics
* Add descriptor
* Add uncheked mortal extrinsic
* Add e2e test
* Add versionInfo and signatureInfo
* Skip e2e test
* Small updates
* Additions for era & extra types
* Move types to types, fixup tests
* Small test updates
* Update test for full decoding