Commit Graph
386 Commits
Author SHA1 Message Date
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
Jaco Greeff 9e61debf45 Extend SignerPayload with constructor cast (#1302) 2019-08-13 14:10:08 +02:00
Jaco Greeff 5ee2caf00e More small readability enhancements (#1296)
* More small readability enhancements

* Pacify CC on manual checks
2019-08-11 22:44:02 +02:00
Jaco Greeff 07b89e759c Some non-functionality readability cleanups (#1295)
* Some non-functionality readability cleanups

* Small Address cleanups
2019-08-11 21:45:16 +02:00
Jaco Greeff e5cc6836eb BlockNumber, Nonce -> u32 (#1284)
* BlockNumber -> u32

* Interface types extend, not re-use

* Merge master, rebuild

* Merge typo

* Lazy create struct types (extended definitions)

* Cleanup tests for Nonce u32

* Remove polkadot u64 BlockNumber (substrate default)

* Warn on type dup & still clear

* Allow type overrides to work at any point
2019-08-11 15:07:00 +02:00
Jaco Greeff b595428372 Lazily create registry types (also solves resolution order) (#1291)
* Lazily create registry types (also solves resolution order)

* Typo in comment

* Alphabetical definitions (ordering detected)

* Make fallback & SessionKeys work as expected

* Cleanup registration, user-types takes priority

* typo

* Api constructors only take options

* Cleanup typos

* Don't create classes while validating metadata

* Adjust badges... well, waiting for CI, so...

* typo
2019-08-10 14:24:04 +02:00
Jaco Greeff 2e109ba2a5 Swap Keys to "Opaque" tuple definitions (#1281) 2019-08-09 09:19:47 +02:00
Jaco Greeff fbd6bf1317 Update Keys, add rotateKeys RPC (#1280)
* author_rotateKeys

* Update Keys encoding
2019-08-08 12:58:36 +02:00
Jaco Greeff 2ddc87c70f Extract abrs author (#1278)
* ABRS types

* Extrcat abrs author
2019-08-07 23:34:25 +02:00
Jaco Greeff 724c4b8263 Return sessionIds & nextSessionIds in staking.info (#1272)
* Return sessionIds & nextSessionIds in staking.info

* Simplify
2019-08-06 16:34:11 +02:00
kwingram25 09ee77d0bc Pass online/offline status indicators with staking accounts (#1265)
* staking online status

* restrict onlineStatus.online to validators

* get onlineStatus for stash/validator only

* tests

* fixes

* Add offline

* Revert stash, change to stashId, linting

* Heartbeat signature

* Make CodeClimate (slightly) happier

* keep compatibility

* change status type

* rv null possible

* cleanup
2019-08-05 16:13:42 +00:00
Jaco Greeff 8da526132d Retrieve nextKeys, only deal with stash (#1266)
* Retrieve nextKeys, only deal with stash

* Split long function

* Allow 1.x operation

* Make CodeClimate happier

* Define result type

* Cleanups
2019-08-04 07:33:31 +02:00
Jaco Greeff 82a1c25f17 Tests for approvalFlagToBool (#1251)
* Tests for approvalFlagToBool

* Merge master
2019-08-02 20:44:25 +02:00
Jake Naviasky 58993042c1 Fixing approvalFlagsToBools. (#1250) 2019-08-01 17:18:18 +02:00
Amaury Martiny 92044d471c Make api.rpc.*.* typed (#1237)
* Generate correctly

* Fix rpc-core

* Flexible types

* Make types work!

* Lint

* Fix grumble

* Re generate

* Fix lint

* Fix small bugs

* Maybe really fix lint?

* Fix lint again

* Fix lint

* Small ordering & formatting  changes while playing...
2019-08-01 10:46:28 +02:00
Jaco Greeff 14f018d57f Fix session/era calculations for Babe (#1235) 2019-07-30 14:24:41 +02:00
Jaco Greeff 0d68f98c75 Extra block author for babe (#1227)
* Update examples for 0.90

* Fix number typo

* Adapth to use timestamp.now (blockPeriod now in all versions)

* Babe extract block author

* TODO for cleaner aura extraction

* Update Babe id

* Update & split tests
2019-07-29 21:23:34 +02:00
a45e313c84 Upgrade guide (to current) (#1194)
* Upgrade guide (to current)

* ClassOf

* JSON example

* s/srml/interfaces/

* Typos

* Update UPGRADING.md

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

* Add copy-to-apps script

* Properly extend exstended derive types

* Round out UPGRADING

* Version in CHANGELOG

* Typos

* Update UPGRADING.md

* Update CHANGELOG

* Bump common

* 0.90.0-beta.0

* Cleanups

* Split 0.82 & 0.90

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update CHANGELOG.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update CHANGELOG.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Typo

* findFunction -> api.findCall
2019-07-29 09:48:06 +02:00
Jaco Greeff 02cd1331aa Move Event, Address, AccountId, AccountIndex to generic (#1202)
* Move Event, Address, AccountId, AccountIndex to generic

* Move AccountId, AccountIndex, Address & Event to generic

* Move Vote
2019-07-26 16:39:28 +02:00