Commit Graph
58 Commits
Author SHA1 Message Date
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
Jaco Greeff 7f2546e22d Swap to publishing -beta.x on merge (#775) 2019-03-14 11:54:56 +01:00
Jaco Greeff 1ed1bfab9a Cleanup Submittable interfaces for external use (#755)
* Cleanup Submittable interfaces for external use

* Update Struct.ts
2019-03-03 12:06:43 +01:00
Jaco Greeff eaea8741df Bump version (#752) 2019-03-01 13:53:14 +01:00
Jaco Greeff f807a93e87 Handle storage with optional modifiers (#717)
* Handle storage with optional modifiers

* Storage docs indicate Option

* Cleanup Option logic

* Convert Optional derive to use Option

* Bump version, update changelog

* Update CHANGELOG description

* Enum.spec.js -> Enum.spec.ts

* Add isEmpty to primitive types
2019-02-19 13:47:36 +01:00
Jaco Greeff cf5ca51f7f Split types into primitive (base) & type (derived) (#715)
* Split types into primitves & structs

* Bump version (breaking change)
2019-02-19 09:40:14 +01:00
Jaco Greeff ead67ec9d6 Integrate new keyring (#693)
* Integrate new keyring

* Bump

* Bump version

* ed25519 dusl-support
2019-02-14 23:17:02 +01:00
Jaco Greeff c1a6f0230c Cater for signature over hash (with version checks) (#655)
* Cater for signature over hash (with version checks)

* Allow Submittable signAndSend

* isUndefined for nonce check

* .sign with backwards compat

* e2e tests started

* Work around optional callback for Promise

* Commit actual e2e test

* Promise allows for submitExtrinsic

* e2e tests are passing

* Bump version, update CHANGELOG
2019-01-31 18:01:14 +01:00
Jaco Greeff fd93fbc4a6 Support new versioned metadata format (#632)
* Start something...

* Parsing via proxy (everything still all-ok)

* Imp[ort order (minor)

* WIP expanding the structure

* Adjust V1 structure

* Parsing seems to do the trick...

* Add CodeHash and Schedule types

* //v0/ -> /v0/

* Update Extrinsic.ts

* Updated with compact outerDispatch, non-throw construction

* v1 to V0 conversion

* Bubble non-magic errors in constructor

* Update e2e after testing them

* Bump version with CHANGELOG  (potentially breaking change)
2019-01-26 16:27:00 +01:00
Amaury Martiny d07ed8ac38 Refactor api-promise/rx (#566)
* Use a generic abstract OnCall

* Add OnCall for Promise

* First run at fixing extrinsics

* Fix types

* Make submittable extrinsic work

* Move file

* Make derive work

* Fix types

* Only call metadata once

* Make tests pass

* Put event emitter in apirx

* Fix small bugs

* Fix tests

* Fix bug decorateStorage

* Make tests pass for tx

* Move rpc base to apirx

* Fix lint

* Fix small bugs

* Fix bug with isSubscription

* Fix codeclimate

* Revert

* Add tslint disable line

* Fix lint

* Skip e2e

* Typo

* Lint

* Re-add combinator back

* Add ._rx in Base

* Make extrinsics work

* Update derivex

* Fix bug lint

* Fix circular dep

* Fix bug e2e

* Remove useless check

* Add description comment

* Clean stuff

* Move assert to Base

* Bump version, update CHANGELOG

* Make _rx private

* Private emit
2019-01-16 15:42:59 +01:00