Jaco Greeff
b3a95b58ed
Cleanup jsonrpc, refer to api-codec ( #174 )
...
* Cleanup jsonrpc, refer to api-codec
* Move storagekey legacy into type-params (legacy)
* Remove misplaced debug log
* Remove header encoding, use api-codec/Header
* Remove legacy types
* Add metadat array (hack around json import)
* Move json metadata to ts
2018-09-28 18:35:39 +02:00
Jaco Greeff
74737b6367
API formatting for inputs & outputs ( #171 )
...
* API formatting for inputs & outputs
* Shorten naming
* getStorage (signle key) operational
* Remove api-format (not used in api anymore)
* Cleanup creation logic
* Cleanup linting
* Cleanup storage creation
* e2e state test
* Add code test
* Add isBare flag to toU8a
* Uppercase... wtill wrong though
* Update metadata json
* We are creating keys properly
* Cleanup tslint
* Type splitting,m handling Tuple & Vector
* StorageChangeSet results in-place
* Update deps
* Allow Tuples to have array constructors
* Test for uncloded vec/tuple
* Update deps
2018-09-28 15:42:23 +02:00
Amaury Martiny
cbd3246c26
Rewrite type-storage ( #164 )
...
* Only modify type-storage folder to avoid conflicts
* Use new syntax
* Export default
* Add legacy code
* Skip outdates tests
* Use fromJSON for metadata
* Add comment to move function to repo
* Add whitespace
* Add type
* Use original files
* Fix bug test
* Simplify code
* Fix bug initializing well known keys
* Rename well known keys to substrate
* Linting
* Linting
2018-09-27 12:25:58 +02:00
Luke Schoen
f399bb6fd6
docs: Fixes #154 ( #167 )
...
* Move triple backticks onto new line so it doesn't break the code snippet formatting
* Add newline between dependency imports and variable declarations
* Add link to relevant line of Github repo of eventemitter3 instead of the travis build directory
* Add full stop at end of sentence in line before `@example` in .ts files, since I noticed that was the only difference between code snippet in docs that was being rendered correctly and one that was not (if the docs were generated from it). Not sure if this actually makes any difference though, but it doesn't hurt to try. i.e. change `[[unsubscribe]]` to `[[unsubscribe]].`
* Add missing code syntax for `new Ws(defaults.WS_URL)`
* Add missing `*__example__*:`
* Add missing semi-colons throughout code
* Fix typos and some grammar
* Move import of external libraries i.e. `const BN = require('bn.js');` or `const crypto = require('crypto');` before `@polkadot` ones in code
* Change from `e` to `error` in catch blocks for readable documentation
2018-09-26 07:24:03 +02:00
Chevdor
0981a30d84
Add documentation and examples ( #145 )
...
* Add documentation
* Justification u8a decoding and json encoding (#146 )
* Decode Justifications
* Json encoding for justifications
* Bump deps
* Allow extrinsic length encoding to operate on u8a[] (#148 )
* Fix config and move generated doc to a subfolder
* Cleanup extrinsic encoding (#150 )
* Cleanup extrinsic encoding
* Removed now-defunct type
* Add uncheckedLength encoding
* Add examples
* Ignore package-lock since we use yarn
* Cleanup examples
* Add gitbook config and some base files for the doc
* Do not make full doc mandatory for now
* Add contributing guide, polish doc and samples
* Update the deps of all samples and add yarn scripts
Fix and regenerate the doc
* Fix Contributing guide
2018-09-15 09:11:56 +02:00
Jaco Greeff
c3065263fc
API docs -> WS ( #141 )
...
* API docs -> WS
* API docs update
* HttpProvider -> WsProvider
* sub<something> -> subscribing
* Update dependencies
* Test message checks update
2018-08-28 14:51:16 +02:00
Jaco Greeff
137468d4a5
Fix mock tests (dep upgrade)
2018-08-16 13:25:21 +02:00
Jaco Greeff
a5c64709a2
Map sub-id on types, not methods ( #135 )
2018-08-15 17:07:17 +02:00
Jaco Greeff
bd2a1f54fc
Track subscriptions per method ( #134 )
...
* Track subscriptions per method
* Update subscription tests
* Correct newHead un/subscribe methods
2018-08-15 16:20:45 +02:00
Jaco Greeff
187c66f600
Add storage subscription API endpoints ( #126 )
...
* Add storage subscriptions
* StorageResult formatting
* Decoding WIP
* Storage subsciptions in place
* Allow null decodes, ref https://github.com/polkadot-js/apps/issues/215
* e2e tests for subscribeStorage
* Cache subscription results, return with changeset
2018-08-11 20:50:57 +02:00
Jaco Greeff
ad968ec794
Import type-* from common repo ( #125 )
...
* Import type-* from common repo
* Update links
* Fix lint links (package index)
2018-08-11 11:14:20 +02:00
Jaco Greeff
6b2c7a1d20
isConnected bugfix
2018-08-08 01:31:22 +02:00
Jaco Greeff
fe4c34defe
Classify Http & Ws providers ( #120 )
...
* Class-ify HttpProvider
* Class-ify WsProvider (tests still WIP)
* Rework tests
* rx-api usage
2018-08-07 16:59:40 +02:00
Jaco Greeff
53e14da740
Pass isLe parameter
2018-07-29 16:19:13 +02:00
Jaco Greeff
baf5dd746b
Revert params: null for jsonrpc (fixed in Node) ( #116 )
2018-07-23 17:12:55 +02:00
Jaco Greeff
b60a3f3cc0
Pass empty params as null ( #115 )
2018-07-22 12:12:37 +02:00
Jaco Greeff
4bf6fef5b3
Trap exceptions on WebSocket create ( #114 )
2018-07-11 17:18:40 +02:00
Jaco Greeff
f5a9c207d0
Add TSLint ( #106 )
...
* Add TSLint
* Update dependencies
* Update dependencies
2018-06-27 12:22:52 +02:00
Jaco Greeff
ae9fc0bd97
Update @polkadot/types ( #105 )
2018-06-26 11:11:43 +02:00
Jaco Greeff
8ca5dc0d70
Update dependencies, onClose connect
2018-06-25 09:36:13 +02:00
Jaco Greeff
432f9a73a9
TypeScript conversion ( #101 )
...
* Auto-conversion
* ES6 import/export
* WIP...
* WIP...
* And... we are TS typed, some good, some bad, some better, some worse
* Tests passing
2018-06-23 13:39:31 +02:00
Jaco Greeff
41acc4a5e7
Copyright project authors ( #98 )
...
* Copyright project authors
* Add contributors
2018-06-13 22:27:29 +02:00
Jaco Greeff
2246f866f8
Allow wss & https endpoints ( #96 )
2018-05-29 15:54:13 +02:00
Jaco Greeff
c68bf8a689
Update from new @polkadot/params ( #95 )
2018-05-29 12:26:19 +02:00
Jaco Greeff
9cef7feea1
Update dependencies ( #93 )
2018-05-24 16:41:41 +02:00
Jaco Greeff
861155f9ef
Use jsonrpc definitions from @polkadot/jsonrpc ( #91 )
...
* Drop api-jsonrpc in favour of @polkadot/jsonrpc
* Change converters
* Address issues after conversion
2018-05-18 10:08:08 +02:00
Jaco Greeff
ed3b63dccc
Update mock key names
2018-05-13 21:33:38 +02:00
Jaco Greeff
bf9aa457b0
Align timestamp with Rust ( #85 )
2018-05-03 15:03:16 +02:00
Jaco Greeff
d899cd62a5
Mock nonce ( #84 )
...
* Mock nonce
* Cleanup
2018-05-02 16:10:52 +02:00
Jaco Greeff
61a00d3ff9
Upgrades ( #83 )
...
* Upgrades
* Update refs
2018-05-02 15:10:39 +02:00
Jaco Greeff
233a47b626
Mock tim:val for queries ( #82 )
...
* Mock tim:val for queries
* Update for failing types
* Use @polkadot/storage
* Upgrades
2018-05-01 12:40:14 +02:00
Jaco Greeff
e9e4b339c3
Update mocks to use new testing keyring ( #80 )
2018-04-25 10:36:29 +02:00
Jaco Greeff
8df1228e6f
Mock events emitter ( #79 )
2018-04-25 10:01:33 +02:00
Jaco Greeff
5b9c75b9cf
Provider emits connected/disconnected ( #76 )
...
* Add provider.on stub (mock/http)
* Emit connected/disconnected from ws
* Update dependencies
* Expose .on on api
2018-04-24 10:01:47 +02:00
Jaco Greeff
e71b11a13b
Workaround for circular connect ( #73 )
...
* Workaround for circular connect
* Upgrade dependencies
2018-04-23 10:38:42 +02:00
Jaco Greeff
9c5b5103a7
Encode mock results as string ( #69 )
2018-04-17 14:06:12 +02:00
Jaco Greeff
47ead04dae
state_getStorage mock ( #67 )
2018-04-17 12:23:02 +02:00
Jaco Greeff
d86cd86251
Encode mock responses as JSON ( #66 )
...
* Encode mock responses as JSON
* Update primitives
2018-04-16 18:07:21 +02:00
Jaco Greeff
e592f4787e
Remove extra_* namespace ( #65 )
2018-04-16 16:27:17 +02:00
Jaco Greeff
418e1ca7c2
Mock interfaces has isSubscription flag ( #64 )
...
* Mock interfaces has isSubscription flag
* chain_newHead mock
2018-04-16 15:38:33 +02:00
Jaco Greeff
462fa6e5c4
Expose WS subscribe/unsubscribe ( #63 )
...
* Expose WS subscribe
* Support unsubscribe
* Align unsubscribe with method
* Basic e2e sub test
* Cleanup parameter positions
* Small update
* Handle non-supplied in output formatter
2018-04-16 13:49:02 +02:00
Jaco Greeff
913d6d8bd0
Add basic mock provider ( #58 )
2018-03-16 12:10:13 +01:00
Jaco Greeff
21c14bd85c
Add pubsub interface definition ( #54 )
...
* Add pubsub interface definition
* Functional JsonRpcCoder
* Functional HttpProvider
* Functional WsProvider
* Functional split completed
* Split actual method subscription
* Update flow
* Flatten no user-specified array in sub call
2018-03-15 12:59:49 +01:00
Jaco Greeff
263289a343
Split interface creation ( #50 )
...
* Split interface creation
* Lint fixes
* Update @polkadot dependencies
2018-01-25 15:19:56 +01:00
Jaco Greeff
671314f91d
Expand license header ( #48 )
2018-01-15 21:48:22 +01:00
Jaco Greeff
d80b737b1a
2018 ( #47 )
2018-01-04 08:46:12 +01:00
Jaco Greeff
4053064288
Update with flow lint ( #46 )
...
* Flow lint warning fixes
* Flow updates fro new flow-bin
2017-12-30 21:54:22 +01:00
Jaco Greeff
c980d3e69b
Prefer static checking ( #43 )
2017-12-18 20:08:16 +01:00
Jaco Greeff
2cde699476
Use primitives-json encode & decode ( #41 )
2017-12-14 22:02:07 +01:00
Jaco Greeff
88a2c0f007
Send encoded JSON over Ws ( #33 )
...
* Send encoded JSON over Ws
* Remove unused type import
2017-12-03 17:34:15 +01:00