35 Commits
Author SHA1 Message Date
Jaco 5eb3534d8e Bump dev (w/ eslint 8) (#4070)
* Bump dev (w/ eslint 8)

* Additional linting

* Additional

* More lint fixes

* Last batch

* Additional

* Cleanups
2021-10-17 14:49:26 +03:00
Jaco f603100b8b Add @polkadot/types-support (#3842)
* Add @polkadot/types-support

* jest config fix

* typegen lookups

* Build fixes

* Explicit kusama naming

* testMeta for v14 (local)

* CI test failure

* CI test failure v14

* Update with corrected data after test

* types-support json imports
2021-08-04 10:39:21 +02:00
Jaco 3172cb55f8 Add Polkadot static metadata (#3827)
* Add Polkadot static metadata

* v13 static polkadot

* v14 static polkadot

* CHANGELOG
2021-07-30 13:56:39 +02:00
Jaco 92a1f603d9 Move metadata into types (circular deps hell) (#3743)
* Move metadata into types (circular deps hells)

* Adjust

* Additional

* Additional

* Last round?

* Adjust imports

* Adjust

* packages

* Bump common
2021-07-07 14:00:30 +02:00
Jaco 32f704459f api.at(blockHash).{consts, errors, events, query} (#3710)
* api.at(blockHash).{consts, errors, events, query}

* Manual tests for apiAt

* Adjust helpers... not perfect, but best for now

* Expand decorated return

* Re-add compable injectMetadata

* CHANGELOG

* Bump jest global timeout
2021-07-02 09:30:25 +02:00
Ewa Kowalska 0c5fc15935 Add motions to bounty derive (#3016)
* Add proposals to BountyDerive

* Extract filterBountiesProposals method

* Apply review suggestions
2021-01-05 10:37:45 +01:00
Jaco Greeff a9c9fb5769 2021 (#3015) 2021-01-03 11:26:46 +01:00
Ewa Kowalska a98b6b9bf8 Add bounty index to DeriveBounty (#3000)
* Add bounty index to DeriveBounty

* Apply review suggestions
2020-12-29 15:46:03 +01:00
Jaco Greeff 0b11fc98b9 Update to latest Substrate metadata (#2967)
* Update to latest Substrate metadata

* Update bounties derive

* Cleanups

* Update bounty location
2020-12-20 10:36:38 +01:00
Krzysztof Jelski beccc2ed9b Derive for bounties and descriptions (#2925)
* WIP on bounties derive.

* wip

* Some basic tests for derive bounties

* Simplify bounties derive and mocks

* Get bounties and descriptions

* Allow for empty bounties. Refactor tests.

* Move tests to test directory

* Attempt to remove duplication

* Sort imports

* Reorganize tests

* Change returned type
2020-12-08 13:25:30 +01:00
Stefanie Doll d57dca53f4 Reorganize test setup (#1132)
* Moved all e2e tests to 'api' folder

* Moved metadata test

* fix imports

* Add jest options for testing the different endpoint types separately

* Add check for empty test suites and return empt test to prevent jest from throwing an error

* Fix import paths

* Fix const tests for polkadot chains

* Update to latest Substrate 2.0 image

* Move contract files for e2e testing to e2e tesing folder

* reorder & fix promise query tests for all test nodes

* final fixes for promise query

* eslint fixes

* removed trailing space

* fix linting errors

* Address codeclimate "Function getWsEndpoints has a Cognitive Complexity of 7 (exceeds 5 allowed)."

* Fix contract ABI import paths

* linter endpoint types

* replace alice with alice_stash

* split off promise-queries file

* Remove apiType, smaller cleanups, added local to only: [] tests suites

* relative paths changed to `@polkadot` import

* moved contract wasm & abi's back to `api-contract`
2019-07-16 16:03:53 +02:00
Jaco Greeff ee27e31275 SessionId extraction for 2.x (#1127)
* SessionId extraction for 2.x

* Run through e2e & update
2019-07-15 15:01:36 +02:00
Jaco Greeff 71c5920b1f eslint rules (#1099)
* Off to the races - 3760 problems (1794 errors, 1966 warnings)

* Convert Array<T> -> T[] (not all correct, eg. extends)

* () => { -> (): void  => {

* get is/as -> public get is/as

* public for getters, constructors & base Codec

* Some cleanups from previous overzealous search & replace

* Under 2k, 1874 problems (649 errors, 1225 warnings)

* ^^^ check that commit for details ;)

* Minor.

* rm config header

* Minor cleanups

* Default to tslint, eslint as option

* Trigger

* Update jsonrpc

* 1494 problems (433 errors, 1061 warnings)

* 1103 problems (135 errors, 968 warnings)

* 899 problems (9 errors, 890 warnings)

* 483 problems (9 errors, 474 warnings) (ignore any... for now)

* 366 problems (9 errors, 357 warnings)

* 336 problems (9 errors, 327 warnings)

* 148 problems (9 errors, 139 warnings)

* 31 problems (8 errors, 23 warnings)

* 0, 0
2019-07-14 12:15:14 +02:00
Stefanie Doll 1393c8c5cf Include api.consts in api.derive methods (#1084)
* Bring back derive changes

* Fix fees tests

* contract fees for v1.0

* Contract fees v1.0 test

* Bring back console.logs

* Uase api.consts instead

* linter fixes

* more linter nits

* Fixed staking & session

* .skip()

* Formatting nits
2019-07-10 16:56:11 +02:00
Amaury Martiny a3ce8672af Fix staking.info (#1091)
* Frankenstein

* Remove console.log

* Fix lint

* Remove console

* Fix tests

* Put back old version

* Add comment

* Store changeset data (filling in the blanks) (#1094)

* Store changeset data (filling in the blanks)

* Option(StorageData, null) when not available

* Make test pass
2019-07-10 13:08:32 +02:00
Stefanie Doll 53e5a0ce9b Fix typescript errors in recently added tests (#1032)
* type header

* Fix typescript errors in recently added tests

* Fix HeaderExtended type
2019-06-18 18:52:23 +02:00
Amaury Martiny 63846ac367 Remove onCall, use decorateMethod (#987)
* update signature of doublemap storage function

* add test cases

* update doublemap implementation

* update implementation

* remove duplicate test case

* update test cases

* Add hkt

* Fix derive types

* Make derive work

* Fix some bugs

* Fix some bugs

* More stuff

* Make some more stuff work

* Fix types in derive

* Fix all tests in derive

* Change back ApiType

* Remove vscode

* Fix Submittables

* Fix some errors

* Fix some bugs

* Change some stuff

* Fix merge conflict

* Fix types

* Add console.log

* Add console.log

* Re-add decorateMethod

* Fix tests

* Skip e2e

* Small fixes

* Fix signAndSend

* Fix typings in test

* Fix lint

* Add comments

* One line

* Remove useless

* URI->ApiType

* Indentation
2019-06-14 12:12:53 +02:00
Stefanie DollandAmaury Martiny e4a97d4efd Update to Metadata v5 (#991)
* add v5 folder

* Fixed typo in README

* Updated tests to v5

* added v5 methods to MetadataVersioned

* Added toV5 conversion file to v4 folder

* change from v4 to v5

* Bump up version

* Update imports in type-storage package

* Switch to v5 imports in type-extrinsics, rpc-core and rpc-provider

* 0.81.0 => 0.82.0

* Updating dependencies to 0.82.0

* update comments

* Undo version bump

* Remove release notes

* v4 to v5 conversion

* WIP tests

* Addresses Amaurys comments

* re-added conversion function

* removed unused imports

* Re-add string to HasherInput type

* addresses failing derive tests

* Fixed broken derive e2e tests

* v5 tests

* Update packages/types/src/Metadata/MetadataVersioned.ts

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* v3->v4

* trigger hung up travis build
2019-06-13 14:42:44 +02:00
Thibaut Sardan 5f43da0623 Add rewardDestination to derive.staking.info (#977)
* rewardDestination in staking.info

* squash a couple lines together to please CodeClimate
2019-06-07 12:14:14 +02:00
Jaco Greeff e295c4d5bf Support more consensus engines with digest info (#974)
* Support more consensus engines with digest info

* Tested against both v1 & v2

* Skip e2e

* Apply map suggestion (more effective as well)
2019-06-07 12:13:30 +02:00
Jaco Greeff 73f2a2abc3 availableBalance should be >0 (#963)
* availableBalance should be >0

* Remove double >0 check

* Add e2e test
2019-05-30 13:27:07 +02:00
Thibaut Sardan 7155848ba7 Redeemable and Unlocking in staking.info (#959)
* init

* init2

* redeemable

* unlocking

* address some comments

* remove map and exit early

* add test for unlocking

* lint

* comment and lint

* use SubmittableResult

* swap _stakingLedger and stakingLedger
2019-05-29 17:06:47 +02:00
Jaco Greeff 07ba80bee1 api.derive.staking.info (all relevant account info) (#915)
* api.derive.staking.info (all relevant account info)

* Update description

* Explicit controller/stash id vars

* Add e2e tests to confirm
2019-05-16 14:28:08 +02:00
Jaco Greeff 2dfc55cb5c Update api.derive to use api.queryMulti (#911)
* session api.queryMulti

* Make a single subscription to retrieve all session info

* Adjustments

* WIP

* Seems mostly comprehensive, need to full test e2e

* e2e tests for operations

* Allow "create from empty"

* skip

* Remove comment

* Remove ancient ?'s

* Update types.ts
2019-05-16 11:36:41 +02:00
Stefanie Doll c30d3a80e8 Added derive e2e tests and documentation (#898)
* export IExtrinsic

* Switch to localhos & enable tests in promise.spec

* Derive.accounts docs (copy from my other branch) + code examples

* Fixed existing accounts tests and added tests for all accounts.derive methods

* e2e tests and docs/ examples for balances.all and balances.fees

* Removed emty lines below jsdoc info

* tests & documentation dor derive.chain

* Addressed comments from former PR https://github.com/polkadot-js/api/pull/869

* Removed unused import

* obseralbe -> observable

* undo keith' commit

* use correct jsdocs syntax

* Re-enable skip
2019-05-15 11:50:28 +02:00
Jaco Greeff 3557657034 Expose queryMulti on api (#909)
* Expose queryMulti on api

* Convert contract fees to queryMulti
2019-05-15 10:41:48 +02:00
Jaco Greeff 5a82fb623f Expand Digest for asAura, use in HeaderExtended (#832) 2019-04-09 17:00:44 +02:00
Jaco Greeff e2b15adaf2 Update keyring, new ss58 checksums (#812) 2019-03-29 15:16:11 +01:00
Amaury Martiny 3e43bc5ea9 fix: remove cache from api-derive (#779)
* Remove cache from api-derive

* Skip e2e

* Update headers to 2019
2019-03-15 12:45:50 +01:00
Jaco Greeff 34888bd4fb Remove /index imports (swap to bare) (#773)
* Remove /index imports (swap to bare)

* Bump common
2019-03-14 09:02:55 +01:00
Jaco Greeff b313614935 Pull in vuepress foir docs (as opposed to gitbook) (#742)
* Pull in latest @polkadot/dev, cleanup existing *.html

* Cleanups (old gitbook interfaces)

* Bump, WIP

* Ready for testing

* Update examples

* Include source

* Cleanup links

* Adjust links

* Add typedoc exclusions

* Default classes from class files

* Adjust imports

* Adjust config

* Re-add types split

* Update links to substrate interfaces

* Anchors for metadata

* Adjust links

* Restore HTML (to be deleted on CI)

* Bump deps

* Re-gen yarn.lock

* Remove a in links

* Adjust interfaces
2019-02-26 15:21:39 +01:00
Jaco Greeff a3e421f665 Allow for balance/indices lookups (#596)
* Allow for balance/indices lookups

* Latest metadata

* Indices work

* Update json with actual decoded

* Update Type.ts

* Some tests updated

* Update final tests

* Remove .only from derive e2e (really skip it)
2019-01-17 15:11:50 +01:00
Jaco Greeff a69cff1c64 Add derive.staking.intentionsBalances (#595)
* Add derive.staking.intentionsBalances

* Skip e2e test

* ts-lint?

* Alignment with new signatures, remove all slices
2019-01-17 09:55:08 +01:00
Amaury Martiny d07ed8ac38 Refactor api-promise/rx (#566)
* Use a generic abstract OnCall

* Add OnCall for Promise

* First run at fixing extrinsics

* Fix types

* Make submittable extrinsic work

* Move file

* Make derive work

* Fix types

* Only call metadata once

* Make tests pass

* Put event emitter in apirx

* Fix small bugs

* Fix tests

* Fix bug decorateStorage

* Make tests pass for tx

* Move rpc base to apirx

* Fix lint

* Fix small bugs

* Fix bug with isSubscription

* Fix codeclimate

* Revert

* Add tslint disable line

* Fix lint

* Skip e2e

* Typo

* Lint

* Re-add combinator back

* Add ._rx in Base

* Make extrinsics work

* Update derivex

* Fix bug lint

* Fix circular dep

* Fix bug e2e

* Remove useless check

* Add description comment

* Clean stuff

* Move assert to Base

* Bump version, update CHANGELOG

* Make _rx private

* Private emit
2019-01-16 15:42:59 +01:00
Amaury Martiny f6c93e48b7 Add derive functions (#540)
* Make types work

* Add test for derive

* Skip e2e

* Change description

* Add some comments

* Add caching

* Integrate cache

* Add tests

* Add test

* Fix types in tests

* Add e2e tests

* Add comments

* Fix lint

* Bump versions

* Remove useless stuff

* Address grumbles
2019-01-09 10:59:56 +01:00