Commit Graph
448 Commits
Author SHA1 Message Date
Travis CI 7e191db702 [CI Skip] 0.30.9 2018-10-02 09:14:05 +00:00
Jaco Greeff 2f60ba0e1c Add method name & prefix to StorageFunction (#182)
* Add methods & prefix to StorageFunction

* Match method/section to exposed names

* Export method/section on extrinsic & jsonrpc

* PR comment prefix -> section
2018-10-02 11:10:17 +02:00
Travis CI 92d72d0007 [CI Skip] 0.30.8 2018-10-01 14:37:10 +00:00
Jaco Greeff 0c906e54f8 Properly toJSON() on StorageFunction (#179)
* Properly toJSON() on StorageFunction

* Add isZero(), cmp & toStringFormat

* Update tests for UInt toString()
2018-10-01 16:33:01 +02:00
Travis CI 69ab177468 [CI Skip] 0.30.7 2018-10-01 13:25:34 +00:00
Jaco Greeff 4fc0eedbe8 Expand e2e (#178)
* Expand e2e

* Add toJSON method for StorageFunction
2018-10-01 15:18:56 +02:00
Travis CI 3f997a1cda [CI Skip] 0.30.6 2018-10-01 12:17:34 +00:00
Jaco Greeff 876c34c532 E2E testing (#177)
* Move e2e tests to provider

* Rx subscriptions

* Import @polkadot/api-provider, fix package names

* Decrease verbosity, skip all e2e tests
2018-10-01 14:11:43 +02:00
Travis CI d230c05d16 [CI Skip] 0.30.5 2018-10-01 09:28:27 +00:00
Jaco Greeff 782bb8063c Pull in observable API from UI (#175)
* Pull in observable api...

* Progress changing stuff...

* votingBalance

* Update resul types

* Expose toBn on Moment

* Rework... WIP

* ... More type cleanups

* Linting passes

* BN helpers for UInt

* Update api-observable

* Add api-observable package.json

* Allow Struct/Tuple to create from hex string

* Future-proof Length with bitLength (u64/u128 compant encoding PR out)

* Make Compact number encoding shareable

* Split Api into functional sections

* Cleanup types

* Additional per-use comments

* Remove params/primitives from README

* api-format  -> api-codec

* Whitespace.
2018-10-01 11:22:15 +02:00
Travis CI 465d986de1 [CI Skip] 0.30.4 2018-10-01 08:49:25 +00:00
Amaury Martiny 8840f33d20 Rewrite type-extrinsics (#173)
* Cleanup jsonrpc, refer to api-codec

* Remove misplaced debug log

* Add metadat array (hack around json import)

* Move json metadata to ts

* Rewrite type-extrinsics

* Make tests pass in type-params

* Skip failing tests in type-primitives

* Use legacy type for legacy stuff

* Remove useless comments

* Remove type params (finally)

* Remove type-primitives (!)

* Remove legacy stuff

* Remove useless import

* Remove useless file

* Update header

* Remove useless files

* Fix test

* Typo

* Export default

* Fix test

* Add index counting

* Fix test index counting

* toNumber() on id

* Fix bug u8a
2018-10-01 10:43:05 +02:00
Travis CI 3d552d96fd [CI Skip] 0.30.3 2018-09-28 16:42:50 +00:00
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
Travis CI 62ed0a7b3f [CI Skip] 0.30.2 2018-09-28 13:48:04 +00: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
Travis CI 8380455599 [CI Skip] 0.30.1 2018-09-27 11:17:47 +00:00
Jaco Greeff 170c33708b Bump version (new codec) (#170) 2018-09-27 13:12:58 +02:00
Jaco Greeff 773358195a Round out metadata types (#169)
* Fake Origin for compatibility

* Add Gas

* Add Moment

* Cleanups

* NewAccountOutcome

* Permill & Perbill

* PrendingExtrinsics -> PendingExtrinsics

* Extrinsics & PendingExtrinsics

* Alias String -> Text (as found in jsonrpc, expose it)

* MetaDate -> Metadata (compat)

* Add StorageData, StorageKey & ChangeSet

* Cleanup comments

* Comment update

* Comment typo

* Add ParachainId

* Add Tuple type

* Tuple tests

* Clenaup Tuple generics

* Expand comment

* Expose keys/values on struct

* Array-like at -> get

* Cleanup & simplify EnumType

* Use setValue internally to fromU8a

* Add RuntimeVersion

* Expose RuntimeVersion
2018-09-27 12:42:20 +02:00
Travis CI 79860b6b30 [CI Skip] 0.29.13 2018-09-27 10:31:56 +00: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
Travis CI b5a36c4eaa [CI Skip] 0.29.12 2018-09-26 12:38:06 +00:00
Jaco Greeff dfd2e70931 Expand types & tests (#166)
* RegEx for alias

* Expand tests

* Cleanup naming

* Options & Struct tests

* Cleanup Length with tests

* Enum tests

* TODO... expand/question assumption

* Remove extra line

* Hashin tests (commented, encoding change)

* Export Type on Vector & Struct

* Test Type & Base

* Address FIXME & additional test

* Cleanup TODOs

* Add MisbehaviorReport

* Add index.ts combinators

* typo in export

* Comment typo

* Update index.ts

* Update MisbehaviorReport.ts

* Update MisbehaviorReport.spec.js

* Extract Bft, add SignedBlock (allow anonymous structures)

* <foo>Struct -> <foo>Value (for constructor args)

* AnyNumber/U8a types for inputs (PR comment)

* Comment struct generics

* Typo in comment

* Simplify StorageFunctionType construction

* Fix liniting (wtf?)

* Fix linting & tests, make more robust
2018-09-26 14:33:12 +02:00
Travis CI 7eb2b29201 [CI Skip] 0.29.11 2018-09-26 05:30:33 +00: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
Travis CI bd6cf112b5 [CI Skip] 0.29.10 2018-09-25 16:28:02 +00:00
Jaco Greeff 964bf84b83 Add Types from RPC (and more tests) (#165)
* Tests for Array for proper coverage

* Expand tests

* Add PropIndex :(

* Add RawAddress

* Index -> Nonce

* Disable test for alias code (commented)

* Block & Extrinsic (base)

* String -> Text, Array -> Vector

* Remove Codec* prefixes

* Unsigned -> Long

* import renames

* Values for structures

* Export classes from Metadata

* Long -> UInt

* Alias vec<u8> -> Bytes
2018-09-25 18:22:25 +02:00
Travis CI b13486f9ab [CI Skip] 0.29.9 2018-09-25 11:38:51 +00:00
Jaco Greeff 60d3d6396a Expand api-codec types (#163)
* Add missing U* (number) types

* Missing number types & indexes

* Add H256, H512, Hash & Signature

* Add Bool, KeyValue & U8a (base)

* Fix LengthCompact encoder (with tests)

* AccountId

* AccountId toU8a

* Order imports

* Apply type aliasses, PropIndex -> ProposalIndex

* Cleanup mappers

* Add fromJSON to Type

* Spliut with Address, AccountId & AccountIndex

* Add some comments around the types

* instanceOf check

* Address can construct from AccountIndex or AccountId

* Remove Address.encode (unused)

* Allow instance of class in constructor

* Cleanup instanceof (String, Bool, H256, H512)

* AccountId/AccountIndex check around CodecU8a

* Fix unused imports

* Additional in-constructor instanceof constructions

* u8a allows hex, string or u8a inputs

* Metadata.fromJSON

* Add Header

* Allow CodecNumber to take hex/string inputs

* fromJSON uses decoder

* Remove LengthFixed (only compact used), add tests

* Some tests around Type

* Remove unused package

* PR comments

* Expand tests (and fix some bug - yay for tests)

* Rename /base -> /codec
2018-09-25 13:33:28 +02:00
Travis CI 3a54bf18f6 [CI Skip] 0.29.8 2018-09-24 11:58:23 +00:00
Jaco Greeff d9b05cf9f2 Decode runtime metadata (#162)
* WIP

* Some output, still borken...

* Events decoded correctly

* WIP, metadata decoded

* String cleanups

* Expand with generics

* Add getters

* Start docs...

* Additional docs

* Extra whitespace on Compact

* CodecLength FIXME

* Remove FIXME (impl. takes care)

* Swap in LengthCompact encoding

* Extend docs, play with auto-type for struct

* Trim strings, add Type for type-specific String

* More string-type hackery

* Don't allow Type re-encoding

* Remove struct experiment

* Cleanup Option

* Remove extra type defs from CodecStruct usage

* Expand Storage function with map (and type returns)

* Description around BaseCodec

* Cleanup linting, add Metadata test

* Move to api-codec

* Extract uniq types

* Uniq updates

* Unwrap, ungeneric
2018-09-24 13:51:20 +02:00
Travis CI baaf394ccc [CI Skip] 0.29.7 2018-09-21 08:20:21 +00:00
Jaco Greeff 5219cf12bb Update dependencies 2018-09-20 17:35:53 +02:00
Travis CI 120f3fd7d4 [CI Skip] 0.29.6 2018-09-19 15:04:54 +00:00
Jaco Greeff f405b52fc4 Add .nojekyll (_ in filenames) (#160) 2018-09-19 16:59:09 +02:00
Travis CI b421322aa6 [CI Skip] 0.29.5 2018-09-19 14:20:03 +00:00
Jaco Greeff 4854379424 Gitbook rendering updates (#159)
* Add .nodoc for in-flux packages

* Start with clean-slate for re-generation

* Update with working (although manual) config
2018-09-19 16:14:37 +02:00
Travis CI ef78f2a024 [CI Skip] 0.29.4 2018-09-17 12:37:37 +00:00
Jaco Greeff f5b0e23e4b Use & build gitbook from @polkadot/dev (#157) 2018-09-17 14:29:34 +02:00
Travis CI d9456dd843 [CI Skip] 0.29.3 2018-09-17 08:39:05 +00:00
Jaco Greeff 5f8c52d1e1 Remove create/* folder for API, include priv methods (#156)
* Remove create/* folder for API, include priv methods

* Move create/* into Api-rx as private

* Modularize subsequent value caching
2018-09-17 10:33:57 +02:00
Travis CI 5a513ac09e [CI Skip] 0.29.2 2018-09-15 07:17:46 +00: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
Travis CI 7fffcb3747 [CI Skip] 0.29.1 2018-09-14 15:37:29 +00:00
Jaco Greeff 35b4f9a095 Api & RxApi now created via new (#153)
* Api & RxApi now created via new

* Bump version
2018-09-14 17:32:58 +02:00
Travis CI d9ab009917 [CI Skip] 0.28.35 2018-09-13 11:39:52 +00:00
Jaco Greeff 219d574970 Bump deps 2018-09-13 13:35:35 +02:00
Travis CI 6ea874bec8 [CI Skip] 0.28.34 2018-09-13 10:10:19 +00:00
Jaco Greeff 03996722d5 Bump deps 2018-09-13 12:06:36 +02:00
Travis CI 739a4afb6f [CI Skip] 0.28.33 2018-09-12 12:29:31 +00:00