Commit Graph
95 Commits
Author SHA1 Message Date
Amaury Martiny 57adf72347 Use name instead of prefix (#948)
* Use name instead of prefix

* Rename var
2019-06-12 16:45:45 +12:00
Jaco Greeff a304e0d35d Align IExtrinsic with Extrinsic impl. (signer/signature string) (#946) 2019-06-12 16:45:45 +12:00
Jaco Greeff 61b49acb51 Emit error on init (#940) 2019-06-12 16:45:45 +12:00
Jaco Greeff 62e7fe8623 Provide genesisHash & version to signer (#941)
* Provide genesisHash & version to signer

* Remove runtimeVersion (until needed, supplied anyway)
2019-06-12 16:45:45 +12:00
Jaco Greeff 3cce0902de Bump deps, align CHANGELOG (#939) 2019-06-12 16:45:45 +12:00
Alex Wang e61f1634ab support double map storage function (#934)
* support double map storage function

* add twox_64_concat, clean comments

* change Twox128Concat to Twox64Concat

* update decodeStorageKey

* fix: update decodeStorageKey

* test: add e2e test
2019-06-12 16:45:45 +12:00
Jaco Greeff 572c0905b8 ExtrinsicSignature init with address/signature strings (#935) 2019-06-12 16:45:45 +12:00
Jaco Greeff 10d0215e69 Allow Moment with BE/LE hex encoding (#933)
* Allow Moment with BE/LE hex encoding

* description clarification
2019-06-12 16:45:45 +12:00
Jaco Greeff 27c63b709f Polkadot master specVersion bump (#932)
* Polkadot master specVersion bump

* EventRecord_0_76
2019-06-12 16:45:45 +12:00
Jaco Greeff 5968647a05 Add staking.stakers to derive.staking.info (#931)
* Add staking.stakers to derive.staking.info

* alphabetical ordering

* add staking.nominators

* Fix lint
2019-06-12 16:45:45 +12:00
Jaco GreeffandAmaury Martiny 022b938f00 Show section.method on storage read error (#928)
* Show section.method on storage read error

* Update packages/types/src/primitive/StorageKey.ts

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Update StorageKey.ts
2019-06-12 16:45:45 +12:00
Jaco Greeff f9318fe013 Codec Fallback on createType (along with pedantic) (#929)
* Codec Fallback on createType (along with pedantic)

* Updates for numbers (fix failing tests)

* Add isPedantic to linked
2019-06-12 16:45:45 +12:00
Jaco Greeff 0aefc24bc2 Move HeaderExtended type to api-derive (#923)
* Move HeaderExtended type to api-derive

* Really remove HeaderExt from Header this time around
2019-06-12 16:45:45 +12:00
Jaco Greeff f50922dd38 Add edgeware to nodeCompat (#926) 2019-06-12 16:45:45 +12:00
Jaco Greeff 53ab0127cd Create submittable via hex (#919)
* Create submittable via hex

* typo
2019-06-12 16:45:45 +12:00
Jaco Greeff a487bda3bd Set assert fix (with tests) (#925)
* Set assert fix (with tests)

* toNumber() -> function
2019-06-12 16:45:45 +12:00
Amaury Martiny 47cc0647d5 Add .args breaking change (#924) 2019-06-12 16:45:45 +12:00
Stefanie Doll 1bf40ceeab Extrinsic bug with undefined value (#914)
* Extrinsic contructor to fix

* Switch from Unit8Array to U8a

* new line

* Move Unit8Array to end of decode function

* move unit8array up as default

* only create empty Unit8Array for undefined values

* default value for string

* remove empty ExtrinsicValue in decode function call

* Throw error instead of console.error

* Travis
2019-06-12 16:45:45 +12:00
Jaco Greeff e16a4652e6 api.derive.staking.info (all relevant account info) (#915)
* api.derive.staking.info (all relevant account info)

* Update description

* Explicit controller/stash id vars

* Add e2e tests to confirm
2019-06-12 16:45:45 +12:00
Jaco Greeff b5d5084b55 Add Codec toRawType (#921)
* Add Codec toType

* Revert i* & u* (toType, catered for in base)

* toType -> toRawType
2019-06-12 16:45:45 +12:00
Jaco Greeff 3b92be5284 Combine Enum & EnumType (#922)
* Extend EnumType with basic (convert use)

* Remove Enum, adjust EnumType tests with Enum version

* Remove aliasses

* test json finaised -> finalized
2019-06-12 16:45:45 +12:00
Amaury Martiny 2699dcfc9c refactor: Metadata overhaul (#913)
* Replace part1

* Replace part2

* Replace part3

* Replace part5

* Replace part6

* Fix small bugs

* Fix double map toString

* Small fixes

* Update to v4

* Fix docs script

* Grumbles

* Alphabetical

* Reads better

* comment

* module to modul
2019-06-12 16:45:45 +12:00
Jaco Greeff 194077033a codec/Set extends JS Set (#917) 2019-06-12 16:45:45 +12:00
Jaco Greeff 0e5906473b Update api.derive to use api.queryMulti (#911)
* session api.queryMulti

* Make a single subscription to retrieve all session info

* Adjustments

* WIP

* Seems mostly comprehensive, need to full test e2e

* e2e tests for operations

* Allow "create from empty"

* skip

* Remove comment

* Remove ancient ?'s

* Update types.ts
2019-06-12 16:45:45 +12:00
Jaco Greeff f070b637f7 Remove struct map naming overrides (#918) 2019-06-12 16:45:45 +12:00
Jaco Greeff 7c8ec1f7f5 Move additional types to primitive & rpc (#916) 2019-06-12 16:45:45 +12:00
Jaco Greeff a0a741d886 Contract test data (shared_vec) for Option<T>, Result<T> (#906) 2019-06-12 16:45:45 +12:00
Jaco Greeff 9f1499f435 Update Extrinsic Signature description (#905)
* Update Extrinsic Signature description

* Update ExtrinsicSignature.ts
2019-06-12 16:45:45 +12:00
Jaco Greeff 4c925d9d4b Add node-template override (#912) 2019-06-12 16:45:45 +12:00
Stefanie Doll fca5fb7110 Added derive e2e tests and documentation (#898)
* export IExtrinsic

* Switch to localhos & enable tests in promise.spec

* Derive.accounts docs (copy from my other branch) + code examples

* Fixed existing accounts tests and added tests for all accounts.derive methods

* e2e tests and docs/ examples for balances.all and balances.fees

* Removed emty lines below jsdoc info

* tests & documentation dor derive.chain

* Addressed comments from former PR https://github.com/polkadot-js/api/pull/869

* Removed unused import

* obseralbe -> observable

* undo keith' commit

* use correct jsdocs syntax

* Re-enable skip
2019-06-12 16:45:45 +12:00
Jaco Greeff bbc474432e Expose queryMulti on api (#909)
* Expose queryMulti on api

* Convert contract fees to queryMulti
2019-06-12 16:45:45 +12:00
Jaco Greeff 2630f378a4 new EventRecord with topics (#902)
* new EventRecord with topics

* Add additional decoding checks (from #612)

* Slightly rework storage parsing (future checks)

* Split storage result formatting (set vs data)

* Allow v3 event parsing

* Max Vector length check

* assert during Event parsing

* Well, HACK-y fallback

* Revert "Well, HACK-y fallback"

This reverts commit edbf61b99da2753bec3a535126660e71bdcd9861.

* Node overrides...

* Add implVersion

* Register types

* Update with polkadot as well

* inject compatibility types

* EventRecord77 in testing

* Conversion with DoubleMap

* E2E tested against v3 & v4

* Filter with some

* Split archive/remove alex tests

* beforeAll -> beforeEach

* Remove .only

* EventRecordV0 -> 77
2019-06-12 16:45:45 +12:00
Stefanie Doll e0994f3c5a Fix for RPC bugs caused by uk spelling (#904)
* Replaced UK with US spelling

* -ised to -ized

* UK -> US spelling in chain rpc methods

* Tests for RPC chain methods on Alex
2019-06-12 16:45:45 +12:00
Jaco Greeff a0b1205258 Revert "Update extrinsics FromMetadata. Drop storages with doublemap type when converting v3 to v2 (#888)" (#903)
This reverts commit 97032e7e86.
2019-06-12 16:45:45 +12:00
satellitex fbbe7625b1 Add traits replace rules. for invalid cases ::<type> and <type>::. (#885)
* add replace rules

* fix replace grep
2019-06-12 16:45:45 +12:00
Jaco Greeff b573531ebf Metadata update for latest master (#901)
* Latest metadata, add EventIndex type

* Add parsed metadata

* Create empty DoubleMap type
2019-06-12 16:45:45 +12:00
Jaco Greeff 67de525077 Bump RxJS to 6.5.2 (#897)
* Bump RxJS to 6.5.2

* Re-create yarn.lock
2019-06-12 16:45:45 +12:00
Xiliang Chen f55732af51 Start supporting double map (#843)
* double map fix

* update metadata to prevent error using double map
2019-06-12 16:45:45 +12:00
Alex Wang 5b6a6d4431 Update extrinsics FromMetadata. Drop storages with doublemap type when converting v3 to v2 (#888)
* update extrinsics fromMetadata

* drop storages with doublemap when convert v3 to v2

* update Event.injectMetadata
2019-06-12 16:45:45 +12:00
Jaco Greeff 1857d8d521 Remove combineLatest where multi is used (#895)
* Remove combineLatest where multi is used

* Add e2e test for derive.controllers
2019-06-12 16:45:45 +12:00
kwingram25 afcc7fb701 Check array before running bnMax (#893)
* Updated with derive.balances.all

* add new keys to votingBalance

* remove multi test

* vestedBalance > 0

* bestNumber bug

* Check balances.all > 0

* Check balances.all > 0

* Check balances.all > 0

* check locks array

* check locks array
2019-06-12 16:45:45 +12:00
kwingram25 be617df21f Fix error causing balances.all = undefined (#891)
* Updated with derive.balances.all

* add new keys to votingBalance

* remove multi test

* vestedBalance > 0

* bestNumber bug

* Check balances.all > 0

* Check balances.all > 0

* Check balances.all > 0
2019-06-12 16:45:45 +12:00
kwingram25 abc11890f7 Replace votingBalance -> derive.balances.all (#883)
* Updated with derive.balances.all

* add new keys to votingBalance

* remove multi test

* vestedBalance > 0
2019-06-12 16:45:45 +12:00
Stefanie Doll 5728e45261 multi calls for democracy.votes and staking.controllers (#887)
* .multi for democracy.votes & stating.controllers

* Removed leftover comment from https://github.com/polkadot-js/api/pull/875

* no new line at the end
2019-06-12 16:45:45 +12:00
ian.he 4e6b533539 v0.78.103 v0.78.103 2019-06-06 14:02:54 +12:00
ian.he 224803f4c4 fix: derive generated is empty 2019-06-06 13:53:53 +12:00
ian.he 9fbf4bf478 v0.78.102 v0.78.102 2019-06-06 12:50:29 +12:00
ian.he 385150bd81 fix: lock typescript to 3.4.5 until merge upstream 2019-06-06 12:40:16 +12:00
ian.he 14216a42a3 0.78.101 2019-06-05 10:04:08 +12:00
Alex Wang 0055cb594f fix: clean code (#1) 2019-06-05 10:04:08 +12:00