Amaury Martiny
483a66257a
Update metadata ( #550 )
2019-01-08 14:30:39 +01:00
Jaco Greeff
d9655f8a21
Allow Tuple types defined as struct or Array ( #548 )
...
* Allow Tuple types defined as struct or Array
* Update tests (not requiring injection)
* Update KeyValue.ts
2019-01-08 14:28:07 +01:00
Jaco Greeff
d589a1bbfd
Compact<Index> in extrinsics ( #515 )
...
* Basic compact index
* Nonce is only used in signatures, alias it
* typo
* s/NonceCompact/IndexCompact/
* Update tests
2019-01-08 14:21:14 +01:00
Jaco Greeff
7f316b6864
Merge branch 'master' of github.com:polkadot-js/api
2019-01-08 13:39:45 +01:00
Jaco Greeff
8bb40cf5a9
Add sytstem_health rpc endpoint
2019-01-08 13:39:38 +01:00
Jaco Greeff
783db16cea
Consistency in exposing header hashes ( #546 )
...
* Consistency in exposing header hashes
* Cleanup comments
2019-01-08 13:18:09 +01:00
Jaco Greeff
95af8dbb6d
Ad link to substrate storage section ( #535 )
2019-01-06 11:23:30 +01:00
Jaco Greeff
d1a4415be9
Subscription method rendering ( #532 )
...
* Subscription method rendering
* Update MetadataMd.ts
2019-01-06 11:05:36 +01:00
Jaco Greeff
6678d7255c
Remove api-observable ( #530 )
...
* 2019
* Remove api-observable
* tuples (SomeLonelyType) -> SomeLonelyType
* Bump to 0.37.0
2019-01-04 16:18:44 +01:00
Jaco Greeff
3be56ad56c
Subscriptions return unsubscribe/dispose function ( #527 )
...
* Combinator return unsubscribe/dispose function
* Submittable extrinsics return UnsubFunction
* RPC methods with unsub callback returns
* Update changelog, bump version
* CHANGELOG typo
* Fix combinator unsubscribes
* Be explicit in returns for UnsubFunction (combineLatest)
2019-01-03 16:31:09 +01:00
Jaco Greeff
fb36c59f34
Expose H256 & H512 types ( #519 )
2018-12-29 17:18:37 +01:00
Jaco Greeff
85434e082b
Bump util, min compact bitlength ( #516 )
2018-12-25 13:58:58 +01:00
Jaco Greeff
1e880757e4
Update to latest util for Compact ( #511 )
...
* Update to latest util for Compact
* Expand FIXME comments
2018-12-21 13:38:38 +01:00
Amaury Martiny
db953403ba
Let static use the RPC response json directly ( #509 )
...
* Let static use the RPC response json directly
* Put data in static
* Remove useless file
2018-12-21 13:17:45 +01:00
Jaco Greeff
4a9069e495
Allow registry to create via object/string definitions ( #503 )
...
* Allow registry to create via object/string definitions
* typo
2018-12-21 11:19:11 +01:00
Jaco Greeff
900da0c852
Pull in large-value Compact encoding changes ( #508 )
...
* Pull in large-value Compact encoding changes
* Update size check
2018-12-21 10:32:11 +01:00
Amaury Martiny
51751d0781
Add support for default values ( #484 )
...
* Create AbstractInt
* Use abstract class
* Bump packages
* Allow decoding metadata with default values
* Add console.logs
* Add latest rpc
* Add Bytes decode
* Get encoded lenght right
* Remove useless tests
* Add getter
* Metadata json with default as hex
* FIx bugs
* Fix lint
* EOF add line
* Remove file
* Update latest rpc
* Update static.ts
* Typo
* Don't create types for default values for now, leave as Bytes
* Update & skip tests
* Remove unused file
2018-12-20 20:33:32 +01:00
Amaury Martiny
b934846248
Add missing types ( #504 )
...
* Update rpc
* Simplify Type
* Create AbstractInt
* Add integers
* Add missing types
* Add tests for negative numbers
* Use abstract class
* Fix comments
* Bump packages
* FIx bugs
* Fix lint
* EOF add line
* Fix comment
* Typo
2018-12-20 18:12:25 +01:00
Jaco Greeff
919a73ccf6
Allow new Extrinsic(method: Method) ( #499 )
...
* Allow new Extrinsic(method: Method)
* Update types
* Be explicit in returned types
* Submittable with Method constructor
2018-12-20 12:21:03 +01:00
Jaco Greeff
caff93941b
Method -> Extrinsic circular dep ( #495 )
...
* Method -> Extrinsic circular dep
* Cleanup test formatting
2018-12-19 14:43:30 +01:00
Jaco Greeff
33a4280028
Expand ExtrinsicStatus to mirror Rust types ( #494 )
...
* Expand ExtrinsicStatus to mirror Rust types
* Remove .only
* Update test expectation
* typo
* Invalid extends Null
* Remove debug log
2018-12-19 13:39:20 +01:00
Jaco Greeff
5b978246a7
Remove circular imports from types ( #492 )
...
* Remove circular imports from types
- These are creating issues on RN and is not correct
- Uint is equivalent to BN (extends it), so remove it.
- Don't import all classes (it imports types itself) - CodecTypes can be exposed elsewhere if needed
* Cleanup linting & imports
* Cleanup compact decoding
2018-12-19 09:29:53 +01:00
Jaco Greeff
4ef8bd36c3
Add missing Polkadot (parachains module) types ( #491 )
...
* Add ParaId (u32, originally ParachainId)
* Add AttestedCandidate (setHeads)
* Bump dependencies
* Cater for latest.substrate.json rename
* Update version deps
2018-12-18 16:46:39 +01:00
Jaco Greeff
edfd62558f
Allow creating Struct from JSON ( #489 )
...
* Allow creating Struct from JSON
* Fix Struct import
2018-12-18 16:26:42 +01:00
Amaury Martiny
46b10a0874
Factorize some u8a decoding logic ( #483 )
...
* Simplify decoding u8a
* Move to another folder
* Refactor isU8a in struct
* Remove ts ignore
* Whitespaces
* Don't modify input args
2018-12-18 10:40:25 +01:00
Jaco Greeff
535a9eac07
StorageKey with specific encoding ( #480 )
...
* StorageKey with specific encoding
* Comment typo
2018-12-17 12:22:01 +01:00
Jaco Greeff
06893d02d8
Add chainProperties call to api-observable ( #472 )
2018-12-14 16:29:16 +01:00
Jaco Greeff
4291a49d22
Instantiate EnumType via Object (not Array) ( #469 )
...
* Instantiate EnumType via Object (not Array)
* Split decoding into steps... slight simplification
* Use assert for index check
* Add JSON decoding tests
2018-12-14 15:09:21 +01:00
Amaury Martiny
04c639ded9
Add types from latest metadata ( #466 )
...
* Update to latest metadata
* Remove whitespaces
* Fix ::Proposal
* Add missing types
* Allow Option<> in metadata
* Empty typle
* Remove useless indenetation
* getTypeClass add Option
* Add test with Option
2018-12-13 17:20:45 +01:00
Jaco Greeff
3c8b3d325e
Option instantiates from Option ( #465 )
2018-12-12 16:13:58 +01:00
Jaco Greeff
ef926e9bfd
Allow Struct to take Map (and Struct) in constructor ( #464 )
...
* Allow Struct to take Map (and Struct) in constructor
* First do key mapping, then reduce
* Remove extra type refs
* Revert "cleanups" - KISS
2018-12-12 16:01:39 +01:00
Jaco Greeff
c0a9924c64
Update Set toU8a, Enum accepts string in constructor ( #460 )
...
* Update Set toU8a, Enum accepts string in constructor
* Standalone else
* Handle undefined case in check
* Revert previous... :(
* Flatten else usage
2018-12-11 14:42:01 +01:00
Amaury Martiny
0c947a5905
Update types parsing to latest metadata ( #456 )
...
* Remove useless whitespaces
* Update latest metadata
* Update latest metadata
2018-12-10 13:46:58 +00:00
Jaco Greeff
6b3ba22da7
Bump common, some additional cleanups ( #453 )
2018-12-09 14:30:09 +01:00
Jaco Greeff
3e7e1c653b
Additional Codeclimate cleanups ( #452 )
...
* Additional Codeclimate cleanups
* Keep original Vector.with
* Cleanup subtype extraction
* Cleanup fromMeta
* Cleanup createType tests
2018-12-09 10:54:43 +01:00
Jaco Greeff
448a729d70
Fix some Codeclimate smells ( #450 )
...
* Fix some Codeclimate smells
* Cleanup Metadata complexity
* Cleanup uniqueTypes
* Bump deps
2018-12-08 15:31:54 +01:00
Jaco Greeff
69f68509ef
Expand with all currently known RPC methods
2018-12-07 12:30:09 +01:00
Jaco Greeff
b52a86eab0
Fix types documentation links ( #445 )
...
* Fix types documentation links
* Adjust CSS selector
* Don't include Summary in the README
2018-12-06 12:11:56 +01:00
Jaco Greeff
101f869423
Expose a hasOrigin getter (public vs private) ( #437 )
...
* Expose a hasOrigin getter (public vs private)
* Add tests, fix hex creation
2018-12-04 13:49:37 +01:00
Amaury Martiny
e2c029cc9e
Expose map and filter on Tuple ( #436 )
2018-12-04 11:42:08 +01:00
Jaco Greeff
637182baf9
API cleanups, circular deps ( #433 )
...
* Cleanups with @polkadot/util packages
* Initi registry at types root
* Revert test throw
* Fallback to root types when registry lookup fails
* Update StorageChangeSet.spec.ts
* Update createType.ts
* Linting update
* Update createType.ts
* Rename TypeRegistry.ts to typeRegistry.ts
2018-12-04 10:17:26 +01:00
Amaury Martiny
1d1832111b
Tuple extends Array ( #432 )
...
* Tuple extend array
* Fix all tests
* Add tests on Tupel
* Remove getAtIndex for tuples
* Add noInheritDoc
* Update comments
* Update docs
2018-12-03 15:54:52 +01:00
Jaco Greeff
a7b177d7dd
Document getters and functions for all types (static missing) ( #431 )
...
* Document getters and functions for all types (static missing)
* Update SignedBlock.ts
* Bump @polkadot/dev, introduce @noInheritDoc
* Text inherits from String
* Link to indv. types from README
* Add base to UInt toString
2018-12-03 15:47:22 +01:00
Jaco Greeff
6cab9be9c8
Document @polkadot/types ( #430 )
...
* Start with codec descriptions
* Base codec types have definitions...
* Base interface defintions
* Descriptions for all type classes
* Link to types docs
* Remove stray template block
* Typos
* Hash -> H256 in description
2018-12-03 11:23:18 +01:00
Xiliang Chen
82dcbe50d5
Type registry ( #428 )
...
* basic type registry
* register all buildin types
* get types from TypeRegistry
* Update Api constructor options to include additionalTypes
* Fix linter issue
* Style improvements and rename ApiBaseOptions to ApiOptions
* refactor Api classes constructor options
2018-11-30 15:52:40 +01:00
Jaco Greeff
df1c6dc21b
Define properties on Struct.with automatically ( #425 )
...
* Define properties on Struct.with automatically
* getAtIndex(index) -> get(key)
2018-11-29 17:47:37 +01:00
Jaco Greeff
ffad4f1715
Revert "Define properties on Struct.with automatically"
...
This reverts commit d348f50dcf .
2018-11-29 16:12:58 +01:00
Jaco Greeff
d348f50dcf
Define properties on Struct.with automatically
2018-11-29 16:10:50 +01:00
Jaco Greeff
9092250acc
Move types.d.ts -> types.ts ( #421 )
...
* Move types.d.ts -> types.ts
* Bump common deps
2018-11-29 12:13:28 +01:00
Jaco Greeff
2aa78f2cad
createType makes new instance, StorageData tests ( #417 )
...
* createType makes new instance, StorageData tests
* Unused import
2018-11-28 12:04:38 +01:00