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
Jaco Greeff
70bc823d25
Make Block, Header & Digest generic ( #1196 )
...
* Make Block, Header & Digest generic
* It lints
* Linting passes, tests passes
2019-07-26 14:34:41 +02:00
Amaury Martiny
441148889d
CreateType is typed, add createTypeUnsafe just in case ( #1199 )
...
* Use unsafe internally
* Add comments
* Remove <> in createType
* Fix lint
* Fix classOf
* Remove createType from Text
* Fix lint
* Fix Fallback type
* Fix fallback in createType
2019-07-26 14:00:25 +02:00
Jaco Greeff
2a37b8746d
Rename srml to interfaces ( #1198 )
...
* Rename srml to interfaces
* newline, package.json
2019-07-26 12:08:17 +02:00
Jaco Greeff
478f54c703
Convert RPC classes to primitive classes or /srml types ( #1192 )
...
* Convert RPC classes to primitive classes or /srml types
* Lint passes... lokking at tests next.
* Tests pass.
* Types with basic docs (lots of work here)
* Update StorageKey.spec.ts
* Add injector to metadata doc generation
* Fix import
2019-07-26 10:23:37 +02:00
Jaco Greeff
39323a8896
Convert all type/* (and some primitives) to srml/* ( #1189 )
...
* Convert (almost-all) non-primitives (and some primitives) to srml/*
* Move Vote to primitives, remove type folder
* Move Balance :-o
* Fixup tests, override Balance.toRaw()
2019-07-25 16:34:47 +02:00
Jaco Greeff
a25110b281
Move additional classes to definition-only ( #1165 )
...
* Move additional classes to definition-only
* Move some additional quick-hit types
* Last of the easier type/* conversions
* Remove rhd files
* Remove commented line
* Add injector to types loading
* typo
* Update comment
* Merge master
* Rework & organize CHANGELOG
* Some small helper cleanups
2019-07-25 10:32:26 +02:00
Jaco Greeff
9ef7ee4a67
Unskip additional tests ( #1185 )
2019-07-25 10:29:15 +02:00
kwingram25
e1cf002a76
Improve voter derive calls ( #1181 )
...
* voterPositions
* cleanup
* rename var
* changes
* export VoterPosition
2019-07-24 19:46:05 +01:00
Jaco Greeff
ebc2fbe3ee
Move (some) from session & elections to srml/types ( #1158 )
...
* Move (some) from session & elections to srml/types
* Just use createType instad of (new ClassOf(type))(value)
* Cleanup generation script (import file duplication)
2019-07-23 11:47:45 +02:00
kwingram25
2ff632b534
Derived elections member type ( #1147 )
...
* elections
* headers
* lint
* lint
* lint
* lint
* fixes
* lint
* voterSets
* derived elections member type
* lint
2019-07-19 23:11:39 +02:00
kwingram25
ab74db5126
Elections derive ( #1143 )
...
* elections
* headers
* lint
* lint
* lint
* lint
* fixes
* lint
* voterSets
2019-07-19 21:27:02 +02:00
Jaco Greeff
37af934be6
Bump deps, export elections ( #1146 )
2019-07-19 00:25:26 +02:00
Jake Naviasky
efb38dbdf8
Fixing array bug in approvalFlagToBool derive. ( #1144 )
...
* Fixing array bug in approvalFlagToBool derive.
* Replicating 'take until last approval' logic.
2019-07-18 23:43:30 +02:00
Jake Naviasky
28cf21dd4f
Adding derives for election sets and approval flags. ( #1141 )
...
* Adding derives for election sets and approval flags.
* Bugfixes to derived election functions.
* Attempting linter fix.
* Fixing typing error.
* Another eslint fix.
* Adding explicit types to api calls.
2019-07-17 22:15:43 +02:00
Jaco Greeff
3b339a2bae
Remove some as any as Observable from derives ( #1129 )
2019-07-15 15:01:54 +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
8ca4b5aa3b
belated naming fix ( #1104 )
2019-07-10 19:09:03 +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
Axel Chalon
9abbaab991
Pull parameter_types! from metadata ( #1066 )
...
* @polkadot/{extrinsics,storage} moved to @polkadot/metadata
* Fix previous commit
* Fix previous commit
* Expose parameter types using api.consts
* Grumbles; update v6 static metadata; add UncleEntryItem (fix #1067 )
* Update api.query.* to api.consts.* where changed
* Update tests and stray api.query.staking.sessionsPerEra
* Grumbles
* Grumbles
* Revert updates to api-derive (taken care of by #1068 )
* Grumbles; fix UncleEntryItem
* Rename "@polkadot/metadata" => "@polkadot/api-metadata"
* Skip derive test
* Grumbles
* Grumbles
* Grumbles
* Cleanup merge, ensure metadata is latest
* Move api-metadata to actual api-metadata folder
* README api-metadata description (& folder link)
* Remove stray type-extrinsics package.json
2019-07-09 08:54:28 +02:00