Commit Graph
436 Commits
Author SHA1 Message Date
Jaco Greeff bc3d21b66b Add extraction of calls-only metadata (#1356)
* Add extraction of calls-only metadata

* Add --ws option to chain info

* Validate types
2019-09-02 14:22:49 +02:00
Jaco Greeff 20b835778d Add ExtrinsicPayload to registry (as with Extrinsic & Unknown) (#1357) 2019-09-02 14:22:15 +02:00
Jaco Greeff 096aa83dd7 Bump metadata (#1354)
* Bump metadata

* Update for metadata constants
2019-09-02 07:39:12 +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 d905b4fef3 Split Submittable into actual classes (#1350)
* Split Submittable into actual classes

* *sigh* Fix VSCode's "helpful" imports

* Rename option creation functions

* Extrinsic already has version embedded

* V3
2019-08-29 22:33:57 +02:00
Jaco Greeff 35622a9037 Warning for missing types via console.warn (not console.error) (#1352) 2019-08-29 16:54:35 +02:00
Jaco Greeff 417a9ffceb Bump deps (#1351) 2019-08-29 16:21:26 +02:00
Jaco Greeff a47b2ec1d2 Allow override of Extrinsic V1-V3 (#1349)
* Allow override of Extrinsic V1-V3

* Options only used once, pass in directly

* Linting, unused type
2019-08-29 14:56:56 +02:00
Jaco Greeff a0194685b8 Bytes & Extrinsic decoding cleanups (#1337)
* Bytes & Extrinsic decoding cleanups

* Add CHANGELOG entry for Extrinsic changes
2019-08-29 11:43:25 +02:00
Jaco Greeff 87f195df2f Pass Extrinsic version, allow ExtrinsicUnknown override (#1348)
* Pass Extrinsic version, allow ExtrinsicUnknown override

* ExtrinsicUnknown should throw
2019-08-29 10:24:39 +02:00
Jaco Greeff 9b1aa6aece Bump dev (#1344) 2019-08-27 13:20:29 +02:00
Jaco Greeff 9ffb4b8d91 Add SetId from grandpa (#1343)
* Add SetId from grandpa

* Add latest static
2019-08-26 07:52:23 +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 67d6c5058f Add ss58Format to ChainProperties interface (#1335)
* Add ss58Format to ChainProperties

* Make ChaineProperties entries Option
2019-08-21 17:48:02 +02:00
Jaco Greeff 2d59e9790e Struct/Tuple shows types via toRawType, not name (#1334) 2019-08-21 17:47:30 +02:00
Jaco Greeff 7bfdd88ef6 Minor API-related readability cleanups (#1333)
* Minor API-related readability cleanups

* Oops, remove trial protected, revert to private

* Unneeded as Observable<...> casts

* Split state retrieval from signAndSend

* Typo in comment

* Cleanup descriptions
2019-08-21 17:38:49 +02:00
Jaco Greeff 960d3995b5 EdcsaSignature to [u8; 65] (no tuple hacks) (#1331) 2019-08-21 14:18:16 +02:00
Jaco Greeff 6d2c2bb8a1 Cleanups & expand tests (#1330)
* Vote cleanups & tests

* VecFixed with tests & bugfixes
2019-08-21 14:14:46 +02:00
Jaco Greeff 3b71c0f64a Check Enum index before value on construct (#1329) 2019-08-21 09:52:56 +02:00
Jaco Greeff 6fee15b138 Update ValidatorPrefx for 2.x (#1325) 2019-08-19 20:05:50 +02:00
Jaco Greeff a9746b3641 Add specVersion to SignedExtra payload (#1324)
* Add specVersion to SignedExtra payload

* Update ExtrinsicPayload.ts

* Cleanup linting & tests (code-only)

* Update after e2e testing in apps

* Check and fix tests

* Grrr... case sensitivity

* Use interfaces where available

* Case sensitive fixes
2019-08-19 09:28:52 +02:00
Jaco Greeff 71d4a7e7f2 Decoding cleanups (#1321)
* Decoding cleanups

* Split extractDef

* Extract struct types to string mapping
2019-08-18 16:42:17 +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 f30354ead4 Remove deprecated Metadata getters (#1315)
* Remove deprecated Metadata getters

* Start metadata with som injected types

* Cleanup V0 somewhat with injected types

* Re-generate interfaces

* Extract some Storage type definitions

* Remove unneeded Calls & Constants files in metadata
2019-08-16 14:51:14 +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 51d589e26b Readability on Metadata & ExtrinsicSignature (#1314)
* Readbility on Metadata & ExtrinsicSignature

* Version  payload

* Adjust versioning

* De-dup asVx
2019-08-16 11:25:38 +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 411d432193 Small readability/typing fixes on metadata (#1312)
* Small readability/typing fixes on metadata

* Object destructuring

* Alphabetical ordering
2019-08-15 09:59:15 +02:00
Jaco Greeff 9954477de3 Some small complexity/readability improvements (#1309)
* Some small complexity/readability improvements

* Bump allowed returns to 5

* Revert override (as limiting as it seems)
2019-08-14 20:25:20 +02:00
Jaco Greeff 4115b8a4cc Cleanup & split createType (#1307)
* Cleanup & split createType

* createType import

* Reduce complexity somewhat

* Simplify wrapper check

* Revert "Simplify wrapper check"

This reverts commit e072c7e05e30e68994152af0b5d7b624dc38bba1.

* de-dup getTypeClass

* Explicit extraction, cleanup getTypeDef

* De-dup subType extraction

* createType move
2019-08-14 14:06:45 +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 677e63b66e Payload Call as Bytes, test serialization (#1304)
* Payload Call as Bytes, test serialization

* Strip hex prefixes to method (signing & payload)
2019-08-13 18:21:46 +02:00
Jaco Greeff 604812d53d Static metadata update (#1301) 2019-08-13 09:53:29 +02:00
Jaco Greeff b9142bcf83 Add Forcing enum (staking) (#1300) 2019-08-13 07:36:56 +02:00
Jaco Greeff e942e68798 Swap to latest extrinsic version if no blocks found (#1298)
* Swap to latest extrinsic version if no blocks found

* Rename const
2019-08-12 14:25:05 +02:00
Jaco Greeff 2a5fd1caef Low-hanging circular deps (#1297)
* Low-hanging circular deps

* Cleanup Compact check

* Null does not allow .hash
2019-08-11 23:53:26 +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 7e3da636ea Cleanup, simplify, remove Fallback (type injection) (#1294) 2019-08-11 16:09:50 +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 1aa7899a7a Allow string types inputs into codec (#1292)
* Allow string types inputs into codec

* Linkage allows string constructors

* Import case

* Cleanup keyof imports

* Attempt linkage doc fix
2019-08-11 14:01:20 +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 aa3de431ba Update VestingSchedule (#1289) 2019-08-10 09:50:26 +02:00
Jaco Greeff 1c885a25b0 Update Polkadot session keys (#1287) 2019-08-10 08:02:16 +02:00
Jaco Greeff 40cf70f415 Add polkadot attestations types (#1286)
* Add polkadot attestations types

* Config updates (misc, non-related)
2019-08-10 00:45:37 +02:00
Jaco Greeff 2e109ba2a5 Swap Keys to "Opaque" tuple definitions (#1281) 2019-08-09 09:19:47 +02:00
Jaco Greeff 2ddc87c70f Extract abrs author (#1278)
* ABRS types

* Extrcat abrs author
2019-08-07 23:34:25 +02:00
Jaco Greeff b2102d9a2b Cater for key definitions rework (#1269)
* Keys structure update

* Bump metadata, pull new keys

* Update for latest

* Update tests for new values

* Polkador session keys override

* Cleanup tests (browserlist adjustments)

* Update metadata

* Bump deps
2019-08-07 21:21:45 +02:00
Jaco Greeff 438c02def5 Add types for Polkadot claims module (#1277)
* Add types for Polkadot claims module

* ' instead of `

* Adjust types, `[u8; x]` workarounds

* One less import

* Map [u8; x] -> Uint8Array

* Fix Codec imports
2019-08-07 18:08:38 +02:00