Jaco Greeff
eda5edbd40
Explicit Decorate creation with Metadata ( #2622 )
...
* Explicit Decorate creation with Metadata
* typo
* Update generator
* Adjust Registry findMetaError sig
2020-09-18 07:14:11 +02:00
Jaco Greeff
b56c1a8282
Explicit tie of metadata to registry (not implicit) ( #2621 )
...
* Explicit tie of metadata to registry (not implicit)
* Update type generation
* Test updates
* Revert non-problematic
* Cleanup mocks
* Updata metadata tests
* CHANGELOG
* linting
2020-09-17 23:15:09 +02:00
Jaco Greeff
cdd6544e20
SPDX ( #2619 )
2020-09-17 16:31:06 +02:00
Jaco Greeff
c10e4d3fc1
Use polyfills from polkadot-js ( #2616 )
...
* Use polyfills from polkadot-js
* no empty catch
* Non-working asjustments
* Adjust WS mocking
* Bump polyfills
* Bumps
* Restore common
2020-09-17 10:05:34 +02:00
Jaco Greeff
e425a38a7c
Cleanups for WebSocket class detection and creation ( #2604 )
...
* Cleanups for WebSocket class detection and creation
* Create change
2020-09-14 13:08:28 +02:00
Jaco Greeff
eb6b3c5bd4
Align costs typing with queries ( #2564 )
...
* Align costs typing with queries
* better...
* ... and better
* ... progress
* better, down to 8
* ... down to 3
* ... 2
* Down to 1
* It builds.
* ... it really builds
2020-09-02 12:19:09 +02:00
Jaco Greeff
277ea92fda
Adjust Address <-> LookupSource definitions ( #2502 )
2020-08-22 11:43:19 +02:00
nsso
60bfdae734
support rpc import definitions ( #2438 )
...
* support import definitions
* fix lint
2020-07-25 13:53:04 +02:00
Jaco Greeff
1cf4d6b9b8
Additional typegen asserts ( #2448 )
...
* Additional typegen asserts
* typo
* Revert tuple assert
* Free-standing Vec is valid
2020-07-25 13:47:34 +02:00
Xiliang Chen
ff52876920
allow Option in enum & Result type ( #2336 )
2020-06-08 07:45:22 +02:00
Jaco Greeff
7ed958fb2d
Metadata bump ( #2322 )
...
* Metadata bump
* yarn.lock
* var requires
2020-06-02 12:39:48 +02:00
Jaco Greeff
47fc4a2b3c
Bump deps w/ eslint ( #2302 )
...
* Bump deps w/ eslint
* Additional cleanups
* Additional
* @polkadot/types done
* Additional
* @polkadot/typegen done
* Additional
* @polkadot/rpc-core done
* Additional
* Additional
* Additional
* docs
* @polkadot/api-derive done
* @polkadot/api done
* @polkadot/api-contracts done
* Update tests
2020-05-24 09:24:45 +02:00
Jaco Greeff
b0dc7cf451
Bump metadata ( #2297 )
...
* Bump metadata
* Deps
* Regen
* Update sig for new signed extensions
2020-05-21 10:56:56 +02:00
Jaco Greeff
45786b31da
Bump deps ( #2286 )
...
* Bump deps
* Linting cleanups
2020-05-15 13:35:15 +02:00
Xiliang Chen and Jaco Greeff
174510a928
use handlebars for code generation ( #2228 )
...
* use handlebars for code generation
* update docs
* fix isStrict
* fix lint
* Apply suggestions from code review
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
* convert consts
* keep empty lines in doc comments
* update rpc
* update tx
* update interfaceRegistry
* update tsDef
* remove no longer used code
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
2020-05-04 15:21:09 +02:00
Xiliang Chen
932122cd21
subscribeStorage parameter should be optional ( #2208 )
2020-04-26 13:32:43 +02:00
Jeremías Díaz
5a929d3810
remove unnecessary parentheses and duplicate types ( #2204 )
...
* remove unnecessary parentheses and duplicate types
* fix: remove test code
2020-04-24 15:28:47 +02:00
Jeremías Díaz
da1daf5bd9
fix: ensure consistent Observable version ( #2187 )
2020-04-16 19:03:00 +02:00
Jeremías Díaz
ccfab75f41
fix: use camelCase for storage module names ( #2176 )
2020-04-16 10:51:19 +02:00
Jaco Greeff
c8f91fcf7a
Parameterize DoNotConstruct ( #2165 )
...
* Parameterize DoNotConstruct
* Update DoNotConstruct list
* typo fix
2020-04-14 12:37:30 +02:00
Jaco Greeff
58de0b8b9c
Rewrite yarn.lock ( #2127 )
2020-04-01 23:49:56 +02:00
Jaco Greeff
0dc46445bc
Bump dev (incl. lint fixes) ( #2126 )
...
* Bump dev (incl. lint fixes)
* Fix call encoding (stepped into that one)
* Event struct order
* Update with missing tuple type (getTypeDef type)
2020-04-01 22:44:34 +02:00
Jaco Greeff
8976ded37f
Add state_queryStorageAt RPC ( #2082 )
...
* Add state_queryStorageAt RPC
* Add queryStorageAt rpc
* Clanup merge
2020-03-26 21:08:34 +01:00
Jaco Greeff
cb9831c4f8
Bump metadata ( #2096 )
...
* Bump metadata
* Update staking types
* Enum updates
2020-03-26 15:17:20 +01:00
Jaco Greeff
b3a6b3dcb5
Bump dev, arrow functions ( #2077 )
2020-03-22 07:31:55 +01:00
Jaco Greeff
9d67d711d4
Bump deps, type import on generated ( #2075 )
...
* Bump deps, type import on generated
* type imports in types/types
* Re-export defs
* Split imports/exports
* Additional type import
* Remove import type
* Remove dupes
2020-03-21 09:40:59 +01:00
Jaco Greeff
044efbc6de
Convert jsonrpc & typings to definitions ( #2064 )
...
* Convert jsonrpc & typings to definitions
* Handle empty interface generation (no types)
* Move jsonrpc/create to rpc-core/create
* Create imports
* Remove jsonrpc package, generate rpc-core from defs
* Debug :)
* Generate RPC definitions via interfaces
* Generate md docs
* Remove @polkadot/jsonrpc refs (at least packages)
* No empty types
* Add PAHNTOM "cleanup" gen
* *sigh* regex loop
* Update mock for no jsonrpc
* Add definition export types
* Cleanup linting
* Mocking 1 fix
* Mocking 2 fix
* rpc-core tests updates
* CHANGELOG & docs
* Add jsonrpc (already mapped) to interfaces
* Add aliasses for RPCs
* Fix rpc-core tests
2020-03-19 14:40:54 +01:00
Jaco Greeff
4093ef9ffa
Add Identity hasher ( #2044 )
...
* Add Identity hasher
* Expand new V11 storage types
* Cleanups, use actual enum keys
* Sort augmented output (fy-by enhancement)
* Map get
* DEFAULT_FN
2020-03-13 13:39:34 +01:00
Jaco Greeff
c2f9ef7ca8
Add .keys on storage entries ( #2032 )
...
* Add .keys on storage entries
* Pass isOptional to storage type unwrap
* Linked maps TS types
2020-03-12 09:12:11 +01:00
Jaco Greeff
1d8b6a79ef
Rework rpc.queryStorage to return [Hash, Codec[]][] ( #2025 )
2020-03-11 12:21:09 +01:00
Jaco Greeff
adee447cd0
Add .args to decoded StorageKeys ( #2004 )
...
* Add .args to decoded StorageKeys
* Small opts
* Formatting
2020-03-06 13:47:40 +01:00
Jaco Greeff
0e297c6779
Add rpc.raw interface, convert RPC to Augmented wrappers ( #1990 )
...
* Add rpc.raw interface, convert RPC to Augmented
* Augmentaton attempt...
* Failing test
* Fix augmentation
* Cleanup linting
* Expose .raw on decorated RPCs
* .raw into CHANGELOG
* Stray eslint overrides
2020-03-03 08:49:24 +01:00
Jaco Greeff
d9ee39f367
Warn on type override ( #1985 )
2020-03-02 09:12:25 +01:00
Jaco Greeff
b588238836
Handle import module name conflicts ( #1983 )
2020-03-02 00:07:34 +01:00
Jaco Greeff
f59cb12ec7
Add .range([from, to?], ...args) on storage queries ( #1979 )
...
* Add .between(from, to) ot storage queries
* between -> range
* CHANGELOG
* checkTypes.manual
* Tested as working
2020-03-01 09:12:17 +01:00
Jeremías Díaz
7316f68cdf
Support tuples in enums ( #1981 )
...
* fix: support tuples as enum members in typegen
* fix: add tuple case
2020-03-01 08:11:36 +01:00
Jaco Greeff
d531dd374f
1.4.2 ( #1963 )
...
* 1.4.2
* Actual version bump
* Rework api.tx decoratation (with tests)
2020-02-27 11:16:23 +01:00
Jaco Greeff
85ae6f949b
Allow construction of HashMap ( #1955 )
...
* Allow construction of HashMap
* WIP... add Map to codec, extend BTreeMap & HashMap from it
* Rework various map tests
* registry.createClass
* createClass in tests
2020-02-26 21:30:38 +01:00
Jaco Greeff
a7132b4e9c
Fix HEADER(...) in fromChain typegen ( #1941 )
2020-02-25 10:08:31 +01:00
Jaco Greeff
dcf053633b
CHANGELOG & small strict adjustments ( #1940 )
2020-02-25 09:44:13 +01:00
Jeremías Díaz
2d0ce2ddff
Make Strict Mode Strict Again ( #1938 )
...
* fix: don't format "unorthodox" query input types
Also add support for tuples in `getSimilarTypes`
* fix: refactor type ignore logic into `formatType`
Had to use a regexp solution because types like `([AccountId | string | Uint8Array, Data | { none: any } | { raw: any } | { blakeTwo256: any } | { sha256: any } | { keccak256: any } | { shaThree256: any } | string | Uint8Array])[]` were not being ignored with the current logic, so they were passed to `getTypeDef` and causing delimiter errors.
* refactor: remove superfluous "FirstKeyType" param
* fix: ignore tuples with structs when formatting
* feat: eliminate all index signatures with --strict
* docs: fix doc generation
2020-02-25 08:40:07 +01:00
Jeremías Díaz
c6355fb147
fix: don't format "unorthodox" query input types ( #1934 )
...
* fix: don't format "unorthodox" query input types
Also add support for tuples in `getSimilarTypes`
* fix: refactor type ignore logic into `formatType`
Had to use a regexp solution because types like `([AccountId | string | Uint8Array, Data | { none: any } | { raw: any } | { blakeTwo256: any } | { sha256: any } | { keccak256: any } | { shaThree256: any } | string | Uint8Array])[]` were not being ignored with the current logic, so they were passed to `getTypeDef` and causing delimiter errors.
* refactor: remove superfluous "FirstKeyType" param
2020-02-24 22:31:18 +01:00
Jaco Greeff
869f9b7af9
InterfaceTypes -> keyof InterfaceRegistry ( #1928 )
...
* InterfaceTypes -> keyof InterfaceRegistry
* Renames
2020-02-23 13:43:37 +01:00
Jaco Greeff
553b3df0b2
Augment naming
2020-02-23 12:48:01 +01:00
Jaco Greeff
1fd157364b
Use allDefs in augment-types
2020-02-23 12:42:05 +01:00
Jaco Greeff
443706a6e0
Extract full interfaceRegistry ( #1927 )
...
* Extract full interfaceRegistry
* Move augment to top-level in api & types
* Type augment output
* Update with new augmented paths
* Update RPC path
2020-02-23 12:26:10 +01:00
Jaco Greeff
a35da085d6
Augment user type registry ( #1926 )
...
* Augment user type registry
* Augment InterfaceRegistry
* Addition api.createType test
* Import '@polkadot/types/interfaceAugment'
* Skip CC on generated
* Move augmentation to full path imports
* Output to augment-*
2020-02-23 11:48:40 +01:00
Jaco Greeff
6c5ef6ecd6
Generation scripts register user types ( #1925 )
...
* Generation scripts register user types
* Create augment.ts output
* Remove stray package
2020-02-23 10:22:55 +01:00
Jaco Greeff
196a0891b8
Use isChildClass & isBigInt from @polkadot/util ( #1924 )
...
* Use isChildClass & isBigInt from @polkadot/util
* Allow never
* Bumps
* Common 2.5.1
* Fix overrides
* Remove gh-pages script (in dev)
2020-02-22 17:02:03 +01:00
Jaco Greeff
51686f0cd4
Don't clobber global space in WS provider ( #1922 )
...
* Don't clbber global space in WS provider
* Re-use getWSClass
2020-02-22 13:56:37 +01:00