Commit Graph
32 Commits
Author SHA1 Message Date
Jaco Greeff 2b5169c232 Bump @polkadot/keyring, change package name (#272) 2018-10-12 17:33:29 +02:00
Jaco Greeff f8d9f1c76e Align all RPC methods with Rust (#264)
* Align all RPC methods with Rust

* Adjust tests for extrinsicUpdate (e2e & working)

* Update transfer.spec.js

Auto-complete imports removed
2018-10-12 14:47:22 +02:00
Jaco Greeff a47485c9bf Return value from array on subscription (#262) 2018-10-12 12:33:18 +02:00
Jaco Greeff 5975e237e3 Status type (#256) 2018-10-12 09:35:23 +02:00
Amaury Martiny 5207285b43 Storage key are not length-prefixed anymore (#257)
* Fix lenght prefix

* Put add lenght prefix to compact
2018-10-11 21:28:47 +02:00
Amaury Martiny f5948fee52 Intelligent constructor (Part 2) (#252)
* Fix AccountId

* Fix AccountIndex

* Add Bool

* Fix Address

* Small fixes

* Fix Bytes

* Fix ExtrinsicSignature

* Small fixes

* Sorta fix Method

* Fix Extrinsic

* Fix method

* Fix Bytes and KeyValue

* Fix Moment

* Length-prefix the storage key

* Fix Bytes prefix

* Add comment
2018-10-11 13:39:27 +02:00
Jaco Greeff 27b2885722 Extend ApiRx from abstract Base (prepare for promise) (#243)
* Extend ApiRx from abstract Base (prepare for promise)

* Update Metadata parsing

* Update Base.ts

* Update types.d.ts

* Cleanup base

* Cleanup linting (renamed imports)

* PR comments

* Update decoded Metadata.json
2018-10-11 10:20:54 +02:00
Luke Schoen 267411d778 fix: Fixes #235 TypeDoc updates consistent with renaming (#236)
* fix: Remove docs/api since replaced with docs/rpc-core

* fix: Remove docs/api-provider since replaced with docs/rpc-provider

* fix: Remove docs/api-rx since replaced with docs/rpc-rx

* fix: Remove the guide file that serves no purpose

* fix: Change license from ui-observable to api-observable

* fix: Remove disused mockHttp and mockWs that are duplicates of those in rpc-provider

* fix: Clarifies difference between PropIndex and ProposalIndex from Issue #226

* fix: Update api-observable Readme to refer to rpc-core, previously called api

* misc: Update Readme of rpc-core. See commit message details.

* Update name to be @polkadot/rpc-core instead of @polkadot/api

* Use Yarn instead of NPM for instructions adding dependencies

* Refer to @polkadot/rpc-core as `Rpc`

* Highlight that given block header hash should be a 0x-prefixed hex string with length of 64 (not only length of 10 as shown in the example)

* Showcase more information that you can obtain from the header object (i.e. best block number, parentHash, stateRoot, extrinsicsRoot, and digest)

* Use `header.raw` instead of just `header` to access properties of the header object

* Update the example to console.log the subscription ID

* Add missing semicolon

* fix: Fix name in license header and rename Api to Rpc for rpc-core e2e tests

* fix: Update rpc-provider Readme to use Yarn instead of NPM install

* fix: Fix minor typo

* fix: Rename Api to Rpc for rpc-provider ws

* fix: Refer to rpc-core instead of api in the rpc-rx Readme

* fix: Update rpc-rx files to refer to it as RpcRx instead of RxApi or just Api

* fix: Refer to rpc-core as Rpc instead of Api

* fix: Update type-jsonrpc Readme. Fix typo. Use Yarn not NPM. Refer to TSLint not Flow

* refactor: Move non-type dependency import with non-type dependencies

* docs: Add link to parity-codec repo

* fix: Avoid use of .raw. Fix listen to blocks example

* fix: Add missing error to newHead in listen to blocks example
2018-10-10 20:11:22 +02:00
Jaco Greeff b05429e6e8 Option allows null/undefined as empty (#230) 2018-10-09 16:26:28 +02:00
Amaury Martiny c026ecb1c2 Intelligent constructor (#217)
* Decode Uint8Array to Struct

* Add decode for Text

* Add tests for Text

* Add decode for Struct

* Rename variable

* Add test for struct

* Remove array check

* Remove isTuple

* Remove decode in Struct

* Add encoding tests

* Remove isTuple

* Better error message

* Add isTuple back

* Fix Option

* Fix Metadata test

* Fix Vector

* Fix Enum

* Fix U8a

* Fix imports

* Add tests

* Fix bug new Compact

* Fix lint

* Use specific decode

* Fix Vector

* Fix test

* Remove useless file

* Don't change Vector

* Fix lint
2018-10-09 15:59:45 +02:00
Jaco Greeff 32f491ec31 Vector from u8a, StorageChangeSet with gaps (#228) 2018-10-09 12:56:20 +02:00
Jaco Greeff e96ed94f4b injectExtrinsics into Method (use for decoding) (#227)
* injectExtrinsics into Method (use for decoding)

* Comment typos
2018-10-09 10:12:49 +01:00
Jaco Greeff 17aa24c61f Lowercase bool type (#225)
* Lowercase bool

* bool as Bool (keeping to uppercase naming in files)
2018-10-08 14:57:01 +01:00
Jaco Greeff dc887977cd Add Compact{16,32,64,128,256} (#219)
* Add Compact{16,32,64,128,256}

* Pass Compact encoding/decoding length, set default

* Align default length naming with Compact
2018-10-08 14:47:46 +01:00
Jaco Greeff 12a3b4a527 Proposal extends Method/Call (#224) 2018-10-08 14:04:02 +02:00
Jaco Greeff 5a770c7e37 Proposal extends Method (#223) 2018-10-08 12:36:15 +02:00
Jaco Greeff d56f081bdc Revert "Proposal extends Method"
This reverts commit 45fe764da4.
2018-10-08 12:16:52 +02:00
Jaco Greeff 45fe764da4 Proposal extends Method 2018-10-08 12:15:20 +02:00
Jaco Greeff 4615661d1c Revert "Proposal only has method information"
This reverts commit e8b1225910.
2018-10-08 12:12:45 +02:00
Jaco Greeff e8b1225910 Proposal only has method information 2018-10-08 12:05:08 +02:00
Jaco Greeff a8305c96ac Add Extrinsic length in toHex (#216) 2018-10-05 18:04:30 +02:00
Jaco Greeff 5b5caa1e80 Raw decoding for extrinsics (#214) 2018-10-05 15:44:30 +02:00
Jaco Greeff 82dbc93f79 Mortal -> Extrinsic, expand for decoding start (#212)
* Mortal -> Extrinsic, expand for decoding start

* Method, Section -> Rpc{Method, Section}

* Only expose callIndex

* CallIndex -> MethodIndex in spec
2018-10-05 12:29:06 +02:00
Jaco Greeff 427c38ee21 Expose callIndex on extrinsics (lookups) (#206)
* Expose callId on extrinsics (lookups)

* Expose call meta

* s/callId/callIndex/
2018-10-05 09:21:14 +02:00
Jaco Greeff 59e97832a3 Don't create when instanceof (#201) 2018-10-04 14:24:01 +02:00
Jaco Greeff 81348c60de Small fixes in operation (#200)
* Small fixes in operation

* Move length encoding to Extrinsic
2018-10-04 12:15:01 +02:00
Jaco Greeff cce329b19a UncheckedEncoding (#192)
* Re add type-extrinsics

* Add descriptor

* Add uncheked mortal extrinsic

* Add e2e test

* Add versionInfo and signatureInfo

* Skip e2e test

* Small updates

* Additions for era & extra types

* Move types to types, fixup tests

* Small test updates

* Update test for full decoding
2018-10-04 08:37:32 +02:00
Jaco Greeff e9030fac39 Update Address/AccountIndex coding (#186) 2018-10-03 18:46:43 +02:00
Jaco Greeff a38d1faea7 Remove Length, variable-prefix calls Compact directly (#190)
* Remove Length, variable-prefix calls Compact directly

* Only store originalLength

* s/Length/Compact/ is test description
2018-10-03 10:52:16 +02:00
Jaco Greeff 29b221b94f Naming changes for #184 (#185)
* Create TypeValue structure

* Cleanup create

* More nesting in types

* Trim types (just in case)

* Export stuff from createType

* TypeValue -> TypeDef
2018-10-02 13:22:09 +02:00
Jaco Greeff c7cd9cdfbf Create TypeValue structure (#184)
* Create TypeValue structure

* Cleanup create

* More nesting in types

* Trim types (just in case)
2018-10-02 13:09:25 +02:00
Jaco Greeff 48e57f9a55 Rename api-codec -> types (#183)
* Rename api-codec -> types

* Cleanups with exports (as found with use)

* Docs to build for /types
2018-10-02 11:30:45 +02:00