Jaco Greeff
b7eeb992cd
Bump deps ( #1699 )
2020-01-06 14:12:49 +01:00
Jaco Greeff
0d2896630d
Replace Data/U8a with un-aliassed Raw ( #1656 )
...
* Replace Data with un-aliassed U8a
* Export U8a
* Explicitly add U8a to the registry
* U8a -> Raw
2019-12-09 15:38:07 +01:00
Jaco Greeff
01f3666cc7
Bump deps ( #1641 )
...
* Bump deps
* Linting
2019-12-05 11:09:27 +01:00
Amaury Martiny
f78bf9dde1
Remove as unknown ( #1636 )
...
* Remove some as unknowns
* Rename sanitize
* Remove file
2019-12-04 12:19:37 +01:00
Jaco Greeff
7a60ab81f8
Drop decorated export ( #1628 )
...
* Drop decorated export
* Fixup imports
2019-12-03 14:49:30 +01:00
Jaco Greeff
33fd1b1c78
Support Metadata V9 ( #1600 )
...
* Metadata v9 definitions
* Update stay V5 in V9
* WIP...
* Small adjustments
* toV9 looks sane ... may work
* v9 tests passes
* v8 tests pass... will get to overall... not checked
* Cleanup type
* Spread storage
* Missing semi
* Cleanup testUtil
* Cater for prefix map key generation
* Remove DoubleMap<T> wrapper
* Remove DoubleMap<T> wrapper
* WIP result types not yet operational
* Output formatting
* Add missing name prop
* Move v9 -> v10, v9 only as storage changes (next up)
* Support v9 & v10
* Fixup linked maps
2019-11-27 19:24:44 +01:00
Jaco Greeff
db59fbff25
Acc contracts_getStorage ( #1603 )
2019-11-23 22:29:33 +01:00
Jaco Greeff and Amaury Martiny
011e24bd49
Pass registry to all codec types ( #1592 )
...
* Pass registry to all codec types
* Pass through registry inside API (where the rubber meets the road)
* Small additions
* Derive w/ registry
* Types are more-or-less covered
* Some test adjustments (guided by linting)
* Rid the world of some ../injector
* Additional cleanups, merge injector into registry
* Cleanup extrinsics (always passing registry)
* Remove injector imports (not all replaced)
* Typ spec cleanups
* Phase 1 - types seem lint-free
* rpc-{core,provider} lint free
* Start working through metadata
* Small metadata additions
* Some e2e tests (out-of-order)
* Down to a handful
* Fixup tests for packages/types/src/codec/*.spec.ts
* packages/types/src/codec passes all tests
* packages/types ok (Convert storage with registry fn)
* progress (sort out injection, dreaded find-before msg)
* Down to 1 lint issue...
* Linting done... along with on-demand import
* Exposed ordering
* Remove global injects
* Cleanup comments
* Add CHANGELOG & UPGRADING
* Apply suggestions from code review
Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com >
* Update Metadata description
2019-11-21 16:32:39 +01:00
Jaco Greeff
75220eb54f
Add payment queryInfo RPC ( #1580 )
2019-11-18 12:26:09 +01:00
Jaco Greeff
921e329d18
Cleanup decode errors ( #1567 )
...
* Cleanup decode errors
* Expand RPC error message
* Extract RPC createSignature method
* Flatten formatError
* Formatting
* Update test string match
2019-11-13 22:18:07 +01:00
Amaury Martiny
16e0ea9315
Add a Decorated class, which will be offline decorated Metadata ( #1463 )
...
* Move Metadata to api-metadata
* Make tests in api-metadata pass
* Make tests in api-metadata pass
* Refactor fromMetadata into decorated
* Fix some linting
* Replace headers
* Fix all tests
* Small lint
* Fix tests
* Fix metadata docs scripts
* Fix import ordering
* Add line breaks
* Grumbles
* Fix forgotten import
* rpcMetadata everywhere
* Fixlint
* s/api-metadata/metadata
* Fix latest tests
* Fix lint
* Fix tests
2019-11-12 12:06:18 +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
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
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
cac0056fc4
Allow user-define RPC interfaces ( #1504 )
...
* Allow user-define RPC interfaces
* Add user-decorated tests
* Pacify CC
* Typos
* Just push.
2019-10-23 17:36:27 +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
9c09386600
Support Metadata V8 ( #1441 )
...
* Support Metadata V8
* Update V7 references, introduce *Latest (as applicable)
* Add v8 static metadata
* Bump to latest metadata
2019-10-08 11:30:54 +02:00
Jaco Greeff
d0f9114fda
Don't decode and re-encode storage queries, single pass ( #1433 )
...
* Don't decode and re-encode storage queries, single pass
* Remove old SorageData <-> Bytes HACK tests
* Add non-empty check to isPendantic
2019-10-02 12:38:16 +02:00
Jaco Greeff
bed3f9f4c5
Add rpc_methods ( #1397 )
...
* Add rpc_methods
* Adjust interface tests
* Add account_nextIndex & contracts_call, filter
* Rework AbstractArray includes with some
* Adjust tests
* Ordering
* Correct definitions (pull in from methods)
* Be agressive on filtering, regardless of isOptional
* async/await in filterRpcMethods
* map Text[] -> string[]
* Correct naming for account_nextIndex
* Remove/don't remove rpc_methods as applicable
* Cleanup method handling errors
2019-09-16 11:40:54 +02:00
Jaco Greeff
bdd0cb9d9a
Remove ExtError from use (removed from util)
2019-09-10 17:55:02 +02:00
Amaury Martiny
b889e56b34
Make author_insertKey public arg required ( #1366 )
...
* Make author_insertKey public arg required
* Remove blank line
* Build interfaces
* Rename to publicKey
2019-09-04 13:06:11 +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
97a5b16320
chain.getRuntimeVersion -> state.getRuntimeVersion ( #1341 )
2019-08-25 09:02:30 +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
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
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
Travis CI
230898ca04
[CI Skip] 0.90.0-beta.50
2019-08-14 05:48:42 +00: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
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
fbd6bf1317
Update Keys, add rotateKeys RPC ( #1280 )
...
* author_rotateKeys
* Update Keys encoding
2019-08-08 12:58:36 +02:00
Jaco Greeff
17063093bf
Fixup cache for multiple values (real length check now) ( #1257 )
2019-08-02 14:18:54 +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
19c3e4b510
Don't apply value-caching on single-value subs ( #1246 )
2019-07-31 22:15:08 +02:00
Jaco Greeff
ddc46ed237
Re-add StorageData from 0.82.0-beta.96 (not an alias) ( #1240 )
2019-07-31 09:07:44 +02:00
Jaco Greeff
c31bd20c6a
Remove Promise chain, fix formatting test subscription ( #1218 )
2019-07-28 00:20:43 +02:00
Jaco Greeff
99368a6d4d
createType allows multiple params ( #1207 )
2019-07-27 08:05:11 +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
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
700eb7e1f4
Remove injectDefinitions import, prefer injector ( #1195 )
...
* 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
* Remove injectDefinitions import, prefer injector
2019-07-26 11:12: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
79e5f7c9cc
Metadata v7 ( #1182 )
...
* Make a start... static is in, code copied as a start.
* Get exports (more-or-less) right
* Well, the v7/* tests pass... now just to tweak storage generation
* Linting is happy, it doesn't mean it will work...
* It compiles... ship it.
2019-07-24 21:34:51 +02:00
Amaury Martiny
66ab3ac502
Cache getTypeClass ( #1183 )
...
* Put memoizee only in types
* Add some tests
* Add failing tests
* Make instanceof work
* Better tests
2019-07-24 17:22:49 +02:00
Jaco Greeff
37022d2e23
Small rpc-core storage cleanups ( #1168 )
2019-07-24 12:47:50 +02: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