Commit Graph
39 Commits
Author SHA1 Message Date
Jaco Greeff d389c6737e Cleanup README (& Call) (#2736) 2020-10-15 17:06:51 +02:00
Nikolay Volf ffaea83e3e Fix typo (#1730) 2020-01-19 21:05:58 +01:00
Jaco Greeff 0d2896630d Replace Data/U8a with un-aliassed Raw (#1656)
* Replace Data with un-aliassed U8a

* Export U8a

* Explicitly add U8a to the registry

* U8a -> Raw
2019-12-09 15:38:07 +01:00
Jaco Greeff a207348c13 Remove generated types from docs (#1468) 2019-10-10 17:35:21 +02:00
Stefanie Doll b231b7b8cb Rename types in docs to match exports (#1424) 2019-09-27 16:32:11 +02:00
Jaco Greeff fe35527a65 Method -> Call, expose findMethod on api (#1222)
* Rename Method -> Call (interface, align with Rust)

* Export Call types from types, expose findCall
2019-07-29 09:04:37 +02:00
Jaco Greeff d516e9eefc Adjust session Keys for Babe (#1209) 2019-07-27 08:53:48 +02:00
Jaco Greeff d56905d1b5 Move Extrinsic/Method to generic (#1205)
* Move Extrinsic/Method to generic

* Strip Generic* primitives

* Move Origin & Method, pass lint/tests
2019-07-26 18:04:33 +02:00
Jaco Greeff 478f54c703 Convert RPC classes to primitive classes or /srml types (#1192)
* Convert RPC classes to primitive classes or /srml types

* Lint passes... lokking at tests next.

* Tests pass.

* Types with basic docs (lots of work here)

* Update StorageKey.spec.ts

* Add injector to metadata doc generation

* Fix import
2019-07-26 10:23:37 +02:00
Jaco Greeff a25110b281 Move additional classes to definition-only (#1165)
* Move additional classes to definition-only

* Move some additional quick-hit types

* Last of the easier type/* conversions

* Remove rhd files

* Remove commented line

* Add injector to types loading

* typo

* Update comment

* Merge master

* Rework & organize CHANGELOG

* Some small helper cleanups
2019-07-25 10:32:26 +02:00
Jaco GreeffandAmaury Martiny 50a2314544 Extrinsic v2 (#1150)
* Extrinsic v2

* Save after last move of files

* Signature V2

* Rework signature decoding

* Simplify V1 and V2 underlying impl.

* Detect chain extrinsic version

* SignaturePayload

* remove Raw payload variant link (Payload is now raw)

* Remove v2 comments referring to v1 data

* Pass isSigned to Extrinsic{V1, V2}

* Cleanup era injection

* It flows :)

* Add SignerPayload and signPayload for Signer (#1152)

* Add SignerPayload and signPayload for Signer

* Submittables use signPayload

* Don't pass version on deprecated interface

* Update after all e2e tx tests passes

* Comment around payload generation

* Adjust blocktime to default (nice round 50 block eras)

* Fix calc

* Re-add test comment

* Update packages/api/src/types.ts

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

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

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

* Backwards compatibility for current in-store signers

* Apply options suggestions

* Add missing Compact params (linting)
2019-07-22 17:08:06 +02:00
Jaco Greeff 3d7a460cd2 Latest metadata for substrate 2.x (#1151)
* Latest metadata for substrate 2.x

* Save json...

* Latest types

* typo in name

* typo in name

* Export all types from the seperate modules
2019-07-21 10:35:27 +02:00
Jaco Greeff 50a3a40cfd Auto-generate TS definitions from types (#1077)
* Basic ts generation from JSON (parachains)

* Basic enum jsdoc comments

* Add as<Type> enum getter

* Register types

* Expand with other Polkadot types

* Readability cleanups

* cc

* Remove extra Null check

* Combine Vector & VectorFixed

* cc

* Additional magic type comments

* Tuple has actual indexed types

* Tests for Enum asXyz and isXyz getters

* Dep-dupe imports setup

* Small textual adjustments

* DRY up with getTypeClassMap
2019-07-10 16:55:25 +02:00
Jaco Greeff f5f5830bc5 Add ValidatorId (#1098)
* Add ValidatorId

* Bump metadata
2019-07-10 15:15:05 +02:00
Jaco Greeff e7eeeae5d3 Update with latest modules (all indexes are off) (#1082) 2019-07-09 06:59:58 +02:00
Jaco Greeff ed19ba91e1 Latest polkadot metadata (#1050)
* Latest polkadot metadata

* The first bunch of Polkadot types... WinningData is an issue...

* VectorFixed, allowing for [<Type>; <length>]

* Add WinningData
2019-06-22 18:28:59 +02:00
Jaco Greeff ea991e4ccc Additional types for latest substrate master (#1016)
* Additional types for latest substrate master

* Method tests updated for new structure

* Adjust extrinsic test indexes

* Adjust type-extrinsics tests

* Adapt for new session/era calc

* Small comment update

* Update with patch for system

* Adjust tests with system calls in metadata
2019-06-15 19:06:02 +02:00
Stefanie Doll 6771f9948b Added types for ApprovalFlag, SetIndex, VoterInfo (#996)
* Added types for ApprovalFlag, SetIndex, VoterInfo

* Delete VoterInfo

* Fixed typo ApprovalIndex  => ApprovalFlag

* Added VoterInfo

* newline & whitespace
2019-06-12 19:43:40 +02:00
Jaco GreeffandAmaury Martiny 3227ce20a2 Support for new inherent digests (#973)
* Support for new inherent digests

* Latest metadata

* Pull in new council & democracy types

* Update tests for new digest

* Digest logsWith/Without

* Round-up e2e tests

* Remove stray debugging log

* Update CHANGELOG.md

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>
2019-06-06 13:47:52 +02:00
Jaco Greeff b37eb31b60 Add SignaturePayloadRaw (#967) 2019-06-04 11:23:41 +02:00
Jaco Greeff 543fdc034f Update for latest substrate master metadata (#958)
* Update for latest substrate master metadata

* Add ContractStorageKey type

* Update schedule
2019-05-29 17:23:06 +02:00
Jaco Greeff acaca67385 derive.{balances, contracts, staking, session} returns Codec (#953)
* derive.{balances, contracts, staking, session} returns Codec

* Json -> StructAny (as per VectorAny)

* multi returns VectorAny

* VectorAny casts

* Bump common
2019-05-27 12:49:19 +02:00
Jaco Greeff 36d7a85ed2 Move HeaderExtended type to api-derive (#923)
* Move HeaderExtended type to api-derive

* Really remove HeaderExt from Header this time around
2019-05-17 11:44:14 +02:00
Jaco Greeff 42fe4e1739 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-05-16 13:52:00 +02:00
Jaco Greeff 86a8011c65 Move additional types to primitive & rpc (#916) 2019-05-16 11:11:32 +02:00
Stefanie Doll c30d3a80e8 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-05-15 11:50:28 +02:00
Stefanie Doll 94e462655a Fix the md table formatting (#855)
* Last attempt

* Poke Travis
2019-04-23 18:33:48 +02:00
Stefanie Doll cfe9d18881 Type definitions formatting fix (#851)
* attempt to fix vuepress falsy markdown interpretation

* Linebreak fix

* Roll-back yarn.lock
2019-04-23 15:44:04 +02:00
Stefanie Doll c085d01d00 Add short description to all types on overview page (#849)
* Smaller typos/ wording

* Grammar An - A

* Add short description to each type on overview page WIP

* Removed 'Derived types' section because HeaderExtended was the only derived method left

* Commit current state

* Description completed

* Removed empty row placeholder

* Fixed Typo in LockPeriods

* Spell out Little Endian

* Fixed accidentaly removed space character
2019-04-23 13:07:56 +02:00
Jaco Greeff 33924367bc TreasuryProposal (#825) 2019-04-05 23:32:38 +02:00
Jaco Greeff 45e524371e Add Key to types, bump util for assert typeof fix (#800)
* Add Key to types, bump util for assert typeof fix

* Export default

* docs
2019-03-27 10:25:07 +01:00
Jaco Greeff 7f8a7f4286 Update for latest substrate Metadata (#761) 2019-03-07 12:06:39 +01:00
Jaco Greeff 1ea1f6f9f5 Add system_networkState RPC (with cleanups) (#745)
* Ad system_networkState RPC (with cleanups)

* Bump external dependencies

* s/network_state/networkState/ (as per Rust PR comments)

* Bump common (latest)
2019-02-28 13:53:36 +01:00
Jaco Greeff d86b9c8b55 Update type documentation links (#734)
* Update type documentation links

* Add derived types
2019-02-22 13:30:15 +01:00
Jaco Greeff 69f68509ef Expand with all currently known RPC methods 2018-12-07 12:30:09 +01:00
Jaco Greeff a7b177d7dd Document getters and functions for all types (static missing) (#431)
* Document getters and functions for all types (static missing)

* Update SignedBlock.ts

* Bump @polkadot/dev, introduce @noInheritDoc

* Text inherits from String

* Link to indv. types from README

* Add base to UInt toString
2018-12-03 15:47:22 +01: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 7f270cb773 Bump 2018-10-10 09:25:24 +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