Commit Graph
67 Commits
Author SHA1 Message Date
Jaco Greeff a0194685b8 Bytes & Extrinsic decoding cleanups (#1337)
* Bytes & Extrinsic decoding cleanups

* Add CHANGELOG entry for Extrinsic changes
2019-08-29 11:43:25 +02:00
Jaco Greeff 97a5b16320 chain.getRuntimeVersion -> state.getRuntimeVersion (#1341) 2019-08-25 09:02:30 +02:00
Jaco Greeff dc1104bc00 0.90 (#1339) 2019-08-24 13:30:16 +02:00
Jaco Greeff 895ed80449 subscribeNewHeads (#1338)
* subscribeNewHeads

* Update CHANGELOG

* Rebuild interfaces

* Sort interfaces, really expose plural

* Fix mocks
2019-08-24 12:10:42 +02:00
Jaco Greeff 4115b8a4cc Cleanup & split createType (#1307)
* Cleanup & split createType

* createType import

* Reduce complexity somewhat

* Simplify wrapper check

* Revert "Simplify wrapper check"

This reverts commit e072c7e05e30e68994152af0b5d7b624dc38bba1.

* de-dup getTypeClass

* Explicit extraction, cleanup getTypeDef

* De-dup subType extraction

* createType move
2019-08-14 14:06:45 +02:00
Jaco Greeff 9738ea16aa Add BlockNumber/Index override CHANGELOG examples (#1299)
* Add BlockNumber/Index override examples

* Re-order changes
2019-08-12 17:17:37 +02:00
Jaco Greeff b595428372 Lazily create registry types (also solves resolution order) (#1291)
* Lazily create registry types (also solves resolution order)

* Typo in comment

* Alphabetical definitions (ordering detected)

* Make fallback & SessionKeys work as expected

* Cleanup registration, user-types takes priority

* typo

* Api constructors only take options

* Cleanup typos

* Don't create classes while validating metadata

* Adjust badges... well, waiting for CI, so...

* typo
2019-08-10 14:24:04 +02:00
a45e313c84 Upgrade guide (to current) (#1194)
* Upgrade guide (to current)

* ClassOf

* JSON example

* s/srml/interfaces/

* Typos

* Update UPGRADING.md

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

* Add copy-to-apps script

* Properly extend exstended derive types

* Round out UPGRADING

* Version in CHANGELOG

* Typos

* Update UPGRADING.md

* Update CHANGELOG

* Bump common

* 0.90.0-beta.0

* Cleanups

* Split 0.82 & 0.90

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update UPGRADING.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update CHANGELOG.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update CHANGELOG.md

Co-Authored-By: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Typo

* findFunction -> api.findCall
2019-07-29 09:48:06 +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
Axel Chalon 9abbaab991 Pull parameter_types! from metadata (#1066)
* @polkadot/{extrinsics,storage} moved to @polkadot/metadata

* Fix previous commit

* Fix previous commit

* Expose parameter types using api.consts

* Grumbles; update v6 static metadata; add UncleEntryItem (fix #1067)

* Update api.query.* to api.consts.* where changed

* Update tests and stray api.query.staking.sessionsPerEra

* Grumbles

* Grumbles

* Revert updates to api-derive (taken care of by #1068)

* Grumbles; fix UncleEntryItem

* Rename "@polkadot/metadata" => "@polkadot/api-metadata"

* Skip derive test

* Grumbles

* Grumbles

* Grumbles

* Cleanup merge, ensure metadata is latest

* Move api-metadata to actual api-metadata folder

* README api-metadata description (& folder link)

* Remove stray type-extrinsics package.json
2019-07-09 08:54:28 +02:00
YJ 8c4320c0f3 feat: Vote interface as U8a (#1061)
* feat: Vote interface as Bytes

* fix: decode v1 values

* fix: decode v2 vote

* duplicate decode struct

* use struct

* fix: encodes as Bytes

* as u8a

* fix: encode as u8a

* fix: encode as u8a

* fix paddig bug

* decode from bits

* fix lint

* fix grumbles

* fix lint

* fix grumbles, remove toNumber

* fix grumbles

* remov only

* Update CHANGELOG.md

* Update CHANGELOG.md
2019-07-04 15:46:36 +02:00
YJ 917168ab81 CHANGELOG: Add breaking change to changelog (#1065)
* fix add breaking change to changelog

* Update CHANGELOG.md
2019-07-02 14:37:27 +02:00
YJ 7229a5fdfb feat: Metadata V6 with module constants (#1059)
* feat: metadata v6, minus static and test

* fix: update v5 to v6 everywhere

* fix: lint and testUtil

* fix typo

* fix: match final metadata. constants no longer optional, StorageFunctionMetadata renamed to StorageEntryMetadata.

* fix: constants constructor

* fix: unit tests pass

* fix: linting and renaming, make tests pass

* fix: skip e2e

remove console log

* fix: formatting test

* fix api e2e tests

* fix: put the skip back

* feat: yarn test:skip-e2e

* fix: grumbles, add fresh flipper wasm

* fix: grumbles, add fresh flipper wasm

* fix: changelog

* fix ci
2019-07-02 11:48:40 +02:00
Stefanie Doll 66d96d3172 Add breaking change to release notes (#1057) 2019-06-25 15:54:59 +02:00
Jaco Greeff 7023214581 s/contract/contracts/ (#1036)
* s/contract/contracts/

* Derive rename
2019-06-19 21:12:16 +02:00
Jaco Greeff 993bc05892 USize is now non-constructable (#1022)
* USize is now unconstructable

* usize CHANGELOG entry
2019-06-17 10:41:57 +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
Jaco Greeff 4cba24c134 Create api-contract (baseline for useful interactions) (#1007)
* Create api-contract (baseline for useful interactions)

* Add CHANGELOG entry (breaking)
2019-06-14 13:48:53 +02:00
Jaco Greeff 6d5f297c32 0.81 (#1010) 2019-06-14 10:41:23 +02:00
Axel Chalon 5533b1b961 Add .off method to ApiBase (#999)
* Add .off method to ApiBase

* Update CHANGELOG
2019-06-13 18:34:47 +02:00
Jaco Greeff 5ca32863d0 Allow for contract Vec, Option and Tuple arg/return (#997)
* Allow for contract Vec & Option arg/return

* Support nesting, fixed vecs and tuples

* Support Result

* Update CHANGELOG

* Add additional types added to CHANGELOG (& re-order)

* Add metadata entry (ready to go)
2019-06-13 15:46:47 +02:00
Jaco Greeff 6ee5799777 Remove extra error logs, bubble trace via Error (#995)
* Remove extra error logs, bubble trace via Error

* Add change to CHANGELOG

* Fix MagicNumber assertion check
2019-06-12 17:50:44 +02:00
Jaco Greeff ea6ce4eb83 Bump deps (#992)
* Bump deps

* Uopdate CHANGELOG while waiting for CI...

* Bump with latest common
2019-06-12 16:18:26 +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 ca8da1ff96 0.80 (#969) 2019-06-04 13:05:06 +02:00
Jaco Greeff bdd1ca4f3d 0.79 (#944)
* 0.79

* @polkadot/api -> *
2019-05-22 11:45:32 +02:00
Jaco Greeff ce6738c270 Bump deps, align CHANGELOG (#939) 2019-05-22 09:18:33 +02:00
Amaury Martiny 6729da721a Add .args breaking change (#924) 2019-05-16 15:19:15 +02:00
Jaco Greeff 5a857a33c8 codec/Set extends JS Set (#917) 2019-05-16 11:54:26 +02:00
Jaco Greeff f7bd071013 0.78.1 (#884)
* update CHANGELOG

* Bump common

* Bump to 0.78
2019-05-08 17:41:48 +02:00
Amaury Martiny 9319cf184a Update Changelog (#859) 2019-04-25 16:44:18 +02:00
Amaury Martiny 4dd320fc89 Use custom hasher for Map (#857)
* Use blake2 instead of two_x

* Add v4

* Update to new v4 static

* Update json

* Revert

* Use hasher enum

* Fix metadata v4 test

* Fix metadata v4 test

* Fix versioned metadata

* refactor & clean

* Use consistent naming

* Make jsons consistent

* Add backward compat

* Fix tests

* Start working on type-storage

* Fix output

* Grumble

* Update to latest static

* Clean code

* Fix imports

* Remove useless imports

* Fix tests

* Use prettier output for toJSON in metadata

* Implement different hashers

* Remove generic storageKey

* Bump version

* Add backwards-compat

* Fix hashing function, use Twox128

* Grumbles

* Add tests
2019-04-25 15:34:35 +02:00
Jaco Greeff 33924367bc TreasuryProposal (#825) 2019-04-05 23:32:38 +02:00
Jaco Greeff 13d3f6861a 0.76 2019-04-03 16:26:17 +02:00
Jaco Greeff 8e6c5f693d Contracts attachment (#818)
* WIP... just getting ti to work

* Export ContractAbi from types

* e2e testing

* Add selector encoding (calls)

* Linting

* Exapnd e2e tests

* TODO comments

* Add ABI types & isConstant flag

* Updated with actual steps (progress)

* Linting

* Cleanup event code

* Bump deps

* Bump deps (keyring mnemonic fix)
2019-04-02 21:21:00 +02:00
Jaco Greeff b8863a0d14 Bump util-crypto (new wasm-crypto) (#815) 2019-03-30 19:24:49 +01:00
Jaco Greeff 6b8ecb26f2 0.75 2019-03-29 22:11:48 +01:00
Jaco Greeff e2b15adaf2 Update keyring, new ss58 checksums (#812) 2019-03-29 15:16:11 +01:00
Jaco Greeff 6fef86cc78 Adjust support fo US English as per substrate (#811)
* Rename ExtinsicStatus Finalised -> Finalized

* Finalised heads -> Finalized
2019-03-29 14:12:56 +01:00
Jaco Greeff 7f901d76c0 0.52 (#808)
* 0.52

* Add PeerInfo info

* Bump version

* Bump common
2019-03-28 18:14:35 +01:00
Jaco Greeff 5a292db92f Derive controllers from stashes (#806)
* Derive controllers from stashes

* Fix combineLatest import
2019-03-28 14:29:05 +01: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 c827bdbbec Check for multiple api & types instances (#797) 2019-03-26 17:13:15 +01:00
Jaco Greeff e63ecfb50a 0.51 2019-03-25 13:07:46 +01:00
Jaco Greeff 4a35380ea2 0.50 2019-03-23 08:40:28 +01:00
Jaco Greeff 9e36b8f00f 0.50 2019-03-23 08:37:23 +01:00
Jaco Greeff f716881b87 Bump util-crypto (WASM with JS fallback) (#791) 2019-03-22 13:51:05 +01:00
Jaco Greeff cfa27ff51e 0.49 2019-03-20 17:47:00 +01:00
Jaco Greeff eccd695c79 0.48-stable (#786) 2019-03-18 17:11:38 +01:00