Commit Graph
154 Commits
Author SHA1 Message Date
Jaco Greeff f080d6ed1c Bump common (#1563) 2019-11-11 11:34:08 +01:00
Jaco Greeff 3c47c3fdc3 Detect session.validators for derive extraction (#1562)
* Detect session.validators for derive extraction

* Add comment

* Indexed extraction without session
2019-11-10 12:25:34 +01:00
Jaco Greeff 2be97310d3 Add runnersup to elections (#1555) 2019-11-07 21:51:54 +01:00
Jaco Greeff 022c7ea645 Swap internal derives to use api.derive.* (#1553)
* Swap internal derives to use api.derive.*

* Rx vs normal decorate

* Small cleanups

* Res-use sessions

* Cleanup types

* Fix refCount lost subs

* Small cleanups
2019-11-07 17:34:53 +01:00
Jaco Greeff c077d0f2e7 Bump deps (#1550)
* Bump deps

* Updates
2019-11-06 22:56:52 +01:00
Jaco Greeff 8cc256fdcf Derive drr doesn't have delay (#1548) 2019-11-06 17:19:12 +01:00
Jaco Greeff 3998b1bcbd Whack derive memo (#1546)
* Whack derive memo

* Bump common
2019-11-05 14:36:53 +01:00
Jaco Greeff 2371d6a29c Remove double-up-drr (memo vs rpc) (#1541)
* Remove inner memo (no double-up on stringify)

* Validators-specific query
2019-11-03 23:47:55 +01:00
Jaco Greeff e601ae27a1 Re-add derive memo (def. has an impact) (#1539) 2019-11-03 13:28:42 +01:00
Jaco Greeff 506b042f8c Remove derive memos (#1538)
* Remove derive memos

* Remove outer memo

* Over-eager replace
2019-11-03 11:38:36 +01:00
Jaco Greeff 8d3cb72189 currentEraPointsEarned not on V1 2019-11-03 00:12:15 +01:00
Jaco Greeff 7cc961f789 Staking overview derive (#1537)
* Staking overview derive

* Expand derives

* Extract currentIndex/currentEra

* WIP

* Controllers opt

* Add memo

* Memomize the whole lot

* Doc building fixes

* Doc fixes #2
2019-11-02 23:10:10 +01:00
Jaco Greeff 2c44b5ca8a Add isVesting & vestingTotal to balances derive (#1536) 2019-11-01 17:16:26 +01:00
Jaco Greeff d41f6ec3ef Don't re-create locks empty type, return breakdown (#1524)
* Don't re-create locks empty type

* Return the actual inv. lock information
2019-11-01 16:42:19 +01:00
Jaco Greeff dc105e6b31 Sub/unsub cleanups (#1535)
* Sub/unsub cleanups

* drr full idAndIndex

* Memo on nick call

* refCountDelay

* Remove scheduler param, always asap

* Flatten

* Test cleanups

* Make tests pass

* Remove logs

* Drop nick memo

* sourceConnection.unsubscribe

* Small cleanups
2019-11-01 14:17:47 +01:00
Jaco Greeff 276da86dbe Expand heartbeats with num blocks (#1534) 2019-10-31 19:32:53 +01:00
Jaco Greeff 453aacb669 derive.accounts.info returns accountId/Index (#1533)
* derive.accounts.info returns accountId/Index

* Swap all idAndIndex to account.info
2019-10-31 10:48:29 +01:00
Jaco Greeff 8379689eaa Cleanup staking info (#1532)
* Cleanup staking info

* Cache calls

* V1, V2 (Aura & Babe) tested & working

* Hopefully pacify docs build

* Second time lucky?

* Third time lucky?

* Fouth time
2019-10-30 14:15:20 +01:00
Jaco Greeff a53c924248 Council -> consts (#1531)
* Council -> consts

* Additional info, expose Balance

* Types
2019-10-30 00:28:40 +01:00
Jaco Greeff 7555a3a7ce Use currentEraStartSessionIndex for babe (#1530)
* Use currentEraStartSessionIndex for babe

* Update WithdrawReasons
2019-10-29 23:25:45 +01:00
Jaco Greeff 41cf32c808 Flatten more combineLatest into queryMulti (#1528) 2019-10-29 17:49:42 +01:00
Jaco Greeff fed9e8f7de Retrieve heartbeats for all validators (#1527)
* Retrieve heartbeats for all validators

* Tested, confirmed working
2019-10-29 12:21:49 +01:00
Jaco Greeff a30d467618 Split candidates to separate query (#1526)
* Split candidates to seperate query

* Split only candidates
2019-10-28 14:25:34 +01:00
Jaco Greeff b69d8ec789 Account info derive (#1523) 2019-10-28 11:14:21 +01:00
Jaco Greeff f8084c2d12 Derive for electionsPhragmen (#1519) 2019-10-26 10:32:11 +02:00
Jaco Greeff de395c7053 Skip nextIndex (#1513)
* Skip nextIndex

* Remove from derive
2019-10-25 16:22:06 +02:00
Jaco Greeff 0b71291cf1 Update latest extrinsic version (#1511)
* Update latest extrinsic version

* Don't export const with types
2019-10-25 08:51:03 +02:00
Jaco Greeff 62eab2d661 Fix returned accountId for derived staking.info (#1501) 2019-10-21 17:26:34 +02:00
Jaco Greeff e49427ac61 Retrieve account.nextIndex via derive.balances.all (#1487)
* Retrieva account.nextIndex via derive.balances.all

* Remove unneeded cast

* Cast system.accountNonce

* Option -> null

* No undefined nonce
2019-10-18 14:45:25 +02:00
Jaco Greeff fe3de4379f Support TransactionPayment.{TransactionBaseFee, TransactionByteFee} (#1493)
* Support TransactionPayment.{TransactionBaseFee, TransactionByteFee}

* Dedup

* Ordering
2019-10-17 15:22:39 +02:00
Jaco Greeff db3cb47d05 Firm up on derive typings & results (#1489)
* Firm up on derive typings & results

* Move assertion (eslint vs ts, round 1, fight!)
2019-10-16 10:13:13 +02:00
Jaco Greeff bf8bed36ef Update drr equality (#1469)
* Update drr equality

* null === null

* Array length compare

* isFunction(next.eq)

* Just JSON.stringify on compare

* Add distinctUntilChanged in  rpc-core

* prev/next -> a/b
2019-10-10 20:41:57 +02:00
Jaco Greeff d594149ed1 Fix derive heartbeats to query via index (#1446) 2019-10-04 14:13:06 +02:00
Jaco Greeff f145fe7c8b Fix isGenesisSlot (only on Babe) (#1443) 2019-10-03 22:46:31 +02:00
Jaco Greeff a54286c98b Allow string (ss58) address input for approvalsOfAt (#1435)
* Allos string (ss58) address input for approvalsOfAt

* Rework deps
2019-10-02 13:31:04 +02:00
Jaco Greeff 17a10fbffe Allow approvalsOf to take string as "who" input (#1434)
* Allow approvalsOf to take string as "who" input

* Re-add <SetIndex> (build fails)
2019-10-02 12:15:50 +02:00
Amaury Martiny fadb1ffdd8 Make derive types work, and a bit more readable (#1430)
* Fix typings for derive

* Fix typings

* Spacing
2019-10-01 14:30:53 +02:00
Jaco Greeff 8de45cb09e Update metadata (Babe updates) (#1410)
* Update metadata (Babe updates)

* Bump with latest master

* Use genesisSlot as opposed to epochStartSlot (wrongly)

* Calculate session from genesis start

* Re-create after master merge

* Kusama CC1 chain type overrides
2019-09-24 16:47:04 +02:00
Amaury Martiny 00d86011a7 Correctly type api.query.*.* (#1406)
* v1, very wip

* Refactor file arch

* Clean some code

* Make it work for all methods

* Have correct typings!

* Add similar types

* Fix missing imports

* Move function order

* Put any for now

* Make api.queryMulti work

* Add override check

* Fix typings to make it better

* Uncomment code

* Fix lint

* Fix lint

* Put checkTypes into correct place in file

* Spaces...

* Add multi test

* Use interface instead of type alias

* Add comment

* Fix indentation

* Ignore query.types.ts
2019-09-23 16:46:35 +02:00
Jaco Greeff 0f21d522d7 Don't fail session info when babe is not available (#1391) 2019-09-13 12:27:39 +02:00
Jaco Greeff ad9d21cae2 Remove outdated blockNumber refs. in API docs (#1382)
* Remove outdated blockNumber refs

* ExtendedHeader

* Update subscribeNewHeads.ts
2019-09-10 20:23:37 +02:00
Jaco Greeff 9ffeda1749 Fix redeemables (#1358) 2019-09-02 17:58:36 +02:00
Jaco Greeff 2dd7cc0e69 Typescript-eslint 2 (#1353)
* Make a start

* More minor cleanups

* Some more cleanups

* Last round?

* Exclude build folders
2019-09-02 07:01:32 +02:00
Jaco Greeff 895ed80449 subscribeNewHeads (#1338)
* subscribeNewHeads

* Update CHANGELOG

* Rebuild interfaces

* Sort interfaces, really expose plural

* Fix mocks
2019-08-24 12:10:42 +02:00
Jaco Greeff c7c76f6edb Rework uniqTypes without duplication (#1316)
* Rework uniqTypes without  duplication

* Extra info for vX -> v7 conversion

* Add vX to naming

* Rework unwrap return

* Ignore gathering unique for v0

* Fix getUniq for V0 (well, def. throw-away, but anyway...)

* compareMap cleanup

* Cleanup author extraction

* Add modules via Struct.with (Metadata)

* Revert "Add modules via Struct.with (Metadata)"

This reverts commit 0666c3014cf840fb4ab26a5231cdf67dbe977bd7.

* Consistency in injected vs defined classes (Metadata)

* Add isTrue/isFalse to Bool

* Meta PlainType/MapType in registry

* Fix wrong v6 imports

* Extract storage modifier

* Split additional Metadata classes into interfaces

* Minor cleanups in type naming

* Static json renames

* Convert most V0 classes to interfaces

* Additional meta classes to interfaces

* No classes for Metadata V0 & V1 anymore

* Rename json imports

* Base cleanups

* Add polkadot static
2019-08-18 15:01:21 +02:00
Jaco Greeff 35a296037a Update types for offences (#1317)
* Update static (doc) metadata

* Offences types (definitions & generated)

* Optional recentlyOffline
2019-08-17 10:45:18 +02:00
Jaco Greeff 8922bbf328 Cater for Babe & Aura combo authors (#1305)
* Cater for Babe & Aura combo authors

* Re-add BabeWeight (until metadata updated)

* BabeWeight to registry

* Remove abrs definitions

* Bump metadata static
2019-08-16 14:07:23 +02:00
Jaco Greeff fbac330e10 Minor readability enhancements (#1313)
* Minor readability enhancements

* Split unwieldly ApiBase

* Fix import case

* Some movements, init in root

* Simplify overloaded functions

* Some more reworks

* Hoist non-class functions

* Flatten

* Split decorate and init

* Split meta from chain

* getNext cleanup
2019-08-16 00:42:54 +02:00
Jaco Greeff a39caccedc Minor cleanups, no functionality (#1308)
* Minor cleanups, no functionality

* Shared fee parsing
2019-08-14 15:04:58 +02:00
Jaco Greeff a9c752a8d4 Complexity cleanups (#1303)
* Complexity cleanups

* Revert spread

* Sig wrapping

* Use InterfaceTypes in rpc definitions

* Types for rpc definitions
2019-08-14 07:37:20 +02:00