Commit Graph
12 Commits
Author SHA1 Message Date
Amaury Martiny f6c93e48b7 Add derive functions (#540)
* Make types work

* Add test for derive

* Skip e2e

* Change description

* Add some comments

* Add caching

* Integrate cache

* Add tests

* Add test

* Fix types in tests

* Add e2e tests

* Add comments

* Fix lint

* Bump versions

* Remove useless stuff

* Address grumbles
2019-01-09 10:59:56 +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 eb143b3fdd Bump deps (#345)
* Bump deps

* Mock-socket definition hacks
2018-10-24 17:47:01 +02:00
Jaco Greeff 7180f8958e @polkadot/api/rx (#233)
* api-rx (new)

* Update SubmittableExtrinsic.ts

* Update types.d.ts

* Update index.ts

* Retrieve genesisHash

* extrinsics -> tx, state -> st

* Update index.ts

* Type cleanup

* Update index.ts

* Update index.ts

* Update index.ts

* Sign returns SubmittableExtrinsic

* Example cleanup

* Move to api-rx package

* Add connected/disconnected events

* Expand storage creation

* isReady/isConnected

* Add static create

* Cleanup docs

* Cleanups

* ReplaySubjects

* Basic tests

* Add runtimeVersion

* Test for version, meta & hash

* Package location

* Expand README

* 2 ways of init

* whenReady -> isReady

* api-rx -> api/rx

* Namings
2018-10-10 20:18:48 +02:00
Jaco Greeff 4344f33de8 First stage renames, rpc-{core,provider,rx} (#220)
* Docs renames (& removal for re-gen)

* Rename api, api-provider & api-rx

* Apoi -> Rpc, RxApi -> RpcRx (classes)

* Add .nodoc

* Bump version

* Link updates (summary)

* Cleanup deleted (master version)

* Deleted re-instated

* More... ;)

* Types...

* Revert .nodoc
2018-10-10 10:01:34 +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
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
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
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
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 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 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