Compare commits

...
951 Commits
Author SHA1 Message Date
Github Actions e64b5483ba [CI Skip] release/stable 2.2.1
skip-checks: true
2020-10-12 14:11:29 +00:00
Jaco Greeff 6020ffcada 2.2 (#2713) 2020-10-12 16:01:52 +02:00
Jaco Greeff 1643ec7ddf Provide chain properties for contract registry (#2714) 2020-10-12 15:53:45 +02:00
Github Actions 76c206d60d [CI Skip] release/beta 2.1.2-23
skip-checks: true
2020-10-12 12:45:58 +00:00
Jaco Greeff 8a8b6f7ac8 s/contract/contracts/ on applyOnEvent (#2712)
* s/contract/contracts/ on applyOnEvent

* Expose result classes
2020-10-12 14:36:47 +02:00
Github Actions 3ba0b2e0d8 [CI Skip] release/beta 2.1.2-22
skip-checks: true
2020-10-12 11:31:50 +00:00
Jaco Greeff 1101826a05 Rename contract helpers (#2708)
* Rename contract helpers

* Allow Buffer input for code

* Parse json strings

* Revert #typeDefs

* Allow lookup on name

* constsitent string ids

* Read only via address

* Move .json

* Extract findMessage

* Naming
2020-10-12 13:21:52 +02:00
Github Actions fda1924577 [CI Skip] release/beta 2.1.2-21
skip-checks: true
2020-10-12 08:17:47 +00:00
Jaco Greeff 2b1438030b Add withResultTransform to Submittables (use in api-contracts) (#2707)
* Allow SubmittableResult transforms (use in contracts)

* withResultTransform
2020-10-12 10:07:45 +02:00
Github Actions d816859840 [CI Skip] release/beta 2.1.2-20
skip-checks: true
2020-10-11 16:59:36 +00:00
Jaco Greeff af0b4362c9 Expose instantiate on contract Blueprint (#2706)
* Expose instantiate on contract Blueprint

* Allow BigInt & string types

* CodecArg

* Selector

* Cleanup selectors

* Remove Bytes override
2020-10-11 18:51:21 +02:00
Github Actions 4cb563ba89 [CI Skip] release/beta 2.1.2-19
skip-checks: true
2020-10-11 11:58:01 +00:00
Jaco Greeff c098036ca5 ContractRegistry always has own registry instance (#2705)
* ContractRegistry always has own registry instance

* Hacky Bytes notation

* Revert Bytes (for now, keep it simple)

* Apply suggestions from code review

* Expand on found error
2020-10-11 13:49:41 +02:00
Github Actions c38afd4b5d [CI Skip] release/beta 2.1.2-18
skip-checks: true
2020-10-11 09:35:48 +00:00
Jaco Greeff 4b8634b88e Remove non-API specific contract call results (#2704) 2020-10-11 11:26:23 +02:00
Github Actions a1bab9edcf [CI Skip] release/beta 2.1.2-17
skip-checks: true
2020-10-11 07:46:26 +00:00
503286f7aa Update ink type spec for 3.0-rc1 (#2702)
* Updated ABI definitions & parsing

* Run type generation

* Definitions (should be ok-ish)

* Cleanup names

* Allow aliasses on structs (JSON parsing)

* Cleanup json mapping passing

* s/types/lookup/

* Parsing as per current output

* InkSelector

* MtRegistryIndex

* String lookup tests

* Remove serd ovverride comments (it works as-is)

* inkRegistry tests

* Extract primitive types

* s/ty/id/

* Start of parsing into types (actually to be TypeDef)

* Parsing

* stringify struct fields

* Small cleanups

* Add type index to project lookup

* Prefix with index

* Fix interface generation

* Latest contract metadata (#2118)

* Add new (provisional) incrementer contract metadata

* Update and regenerate type definitions

* WIP: generate new format scale-info types

* WIP: implementing variants

* Implement variants

* Fix up type resolution

* Fix registry spec tests

* Fix lints and some tests

* Fix inkTypes tests

* Fix some lints

* Make imports same line like original

* Comment out (temporarily) sanitize import to make CI pass

* Sanitize

* Remove indices

* Remove index

* api-contract rewrite

* lint

* cleanup

* latest

* latest

* fix definition

* fiz definitions

* rv ink storage

* Update packages/api-contract/src/base/Contract.ts

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* fixes

* rv scripts

* restore api-contract

* reorder definitions, fix ink storage

* fixes

* def order

* fixes

* encodeTypeDef asRaw

* update ink typ spec

* latest built contracts

* compare files

* Apply suggestions from code review

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
2020-10-11 09:37:39 +02:00
Github Actions 64e209783a [CI Skip] release/beta 2.1.2-16
skip-checks: true
2020-10-11 07:34:44 +00:00
Jaco Greeff 43791bcc71 Fix c-like enums type encoding (#2703)
* Fix c-like enums type encoding

* Update packages/api-contract/src/ContractRegistry.ts

* Update packages/types/src/codec/utils/encodeTypes.ts
2020-10-11 09:25:44 +02:00
Github Actions 5b42bc9a22 [CI Skip] release/beta 2.1.2-15
skip-checks: true
2020-10-10 12:34:29 +00:00
Jaco Greeff b65b2d7720 Adjust exec with SubmittableExtrinsic (#2701)
* Adjust exec with SubmittableExtrinsic

* inputData
2020-10-10 14:25:31 +02:00
Github Actions 6f99f0fc26 [CI Skip] release/beta 2.1.2-14
skip-checks: true
2020-10-10 11:04:32 +00:00
Jaco Greeff c6f4e64c1a Update ContractInfo struct (#2700) 2020-10-10 12:55:03 +02:00
Github Actions d963cdf5ae [CI Skip] release/beta 2.1.2-13
skip-checks: true
2020-10-09 16:43:26 +00:00
Jaco GreeffandAndrew Jones 453dd9e49a Updated ABI definitions & parsing (#1662)
* Updated ABI definitions & parsing

* Run type generation

* Definitions (should be ok-ish)

* Cleanup names

* Allow aliasses on structs (JSON parsing)

* Cleanup json mapping passing

* s/types/lookup/

* Parsing as per current output

* InkSelector

* MtRegistryIndex

* String lookup tests

* Remove serd ovverride comments (it works as-is)

* inkRegistry tests

* Extract primitive types

* s/ty/id/

* Start of parsing into types (actually to be TypeDef)

* Parsing

* stringify struct fields

* Small cleanups

* Add type index to project lookup

* Prefix with index

* Fix interface generation

* Latest contract metadata (#2118)

* Add new (provisional) incrementer contract metadata

* Update and regenerate type definitions

* WIP: generate new format scale-info types

* WIP: implementing variants

* Implement variants

* Fix up type resolution

* Fix registry spec tests

* Fix lints and some tests

* Fix inkTypes tests

* Fix some lints

* Make imports same line like original

* Comment out (temporarily) sanitize import to make CI pass

* Sanitize

* Remove indices

* Remove index

* Adjust ContractAbi interface (empty rpc)

* linting

* Pull in Andrew's changes

* Cleanups

* Some more cleanups

* Update with v3 contracts

* Adjust with actual types

* Regenerate

* Update ABI parsing (#2695)

* Adjust ABI code

* Cleanup

* Merge non-code

* Type naming

* Simplify Base

* Rename 1

* rename 2

* Rename 3

* Simplify

* Add index to AbiMessage

* Pass actual message or index for call

* Rename param

* Simplify

* Expose call & exec

* s/call/read/

* Cleanup asserts

* AccountId as per spec

* displayName is path

* Update definitions

* Flatten ABIType into TypeDef

* Rewrite

* Fix tests

* Updates

Co-authored-by: Andrew Jones <ascjones@gmail.com>
2020-10-09 18:33:31 +02:00
Github Actions 89e0548092 [CI Skip] release/beta 2.1.2-12
skip-checks: true
2020-10-09 14:48:20 +00:00
cd5a5da45c Definition ordering (#2699)
* Updated ABI definitions & parsing

* Run type generation

* Definitions (should be ok-ish)

* Cleanup names

* Allow aliasses on structs (JSON parsing)

* Cleanup json mapping passing

* s/types/lookup/

* Parsing as per current output

* InkSelector

* MtRegistryIndex

* String lookup tests

* Remove serd ovverride comments (it works as-is)

* inkRegistry tests

* Extract primitive types

* s/ty/id/

* Start of parsing into types (actually to be TypeDef)

* Parsing

* stringify struct fields

* Small cleanups

* Add type index to project lookup

* Prefix with index

* Fix interface generation

* Latest contract metadata (#2118)

* Add new (provisional) incrementer contract metadata

* Update and regenerate type definitions

* WIP: generate new format scale-info types

* WIP: implementing variants

* Implement variants

* Fix up type resolution

* Fix registry spec tests

* Fix lints and some tests

* Fix inkTypes tests

* Fix some lints

* Make imports same line like original

* Comment out (temporarily) sanitize import to make CI pass

* Sanitize

* Remove indices

* Remove index

* api-contract rewrite

* lint

* cleanup

* latest

* latest

* fix definition

* fiz definitions

* rv ink storage

* Update packages/api-contract/src/base/Contract.ts

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* fixes

* rv scripts

* restore api-contract

* reorder definitions, fix ink storage

* fixes

* def order

* fixes

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
2020-10-09 16:40:24 +02:00
Github Actions d7dc36c65b [CI Skip] release/beta 2.1.2-11
skip-checks: true
2020-10-09 14:16:27 +00:00
87985f1f1f Types for ink! 3.0 (#2693)
* Updated ABI definitions & parsing

* Run type generation

* Definitions (should be ok-ish)

* Cleanup names

* Allow aliasses on structs (JSON parsing)

* Cleanup json mapping passing

* s/types/lookup/

* Parsing as per current output

* InkSelector

* MtRegistryIndex

* String lookup tests

* Remove serd ovverride comments (it works as-is)

* inkRegistry tests

* Extract primitive types

* s/ty/id/

* Start of parsing into types (actually to be TypeDef)

* Parsing

* stringify struct fields

* Small cleanups

* Add type index to project lookup

* Prefix with index

* Fix interface generation

* Latest contract metadata (#2118)

* Add new (provisional) incrementer contract metadata

* Update and regenerate type definitions

* WIP: generate new format scale-info types

* WIP: implementing variants

* Implement variants

* Fix up type resolution

* Fix registry spec tests

* Fix lints and some tests

* Fix inkTypes tests

* Fix some lints

* Make imports same line like original

* Comment out (temporarily) sanitize import to make CI pass

* Sanitize

* Remove indices

* Remove index

* api-contract rewrite

* lint

* cleanup

* latest

* latest

* fix definition

* fiz definitions

* rv ink storage

* Update packages/api-contract/src/base/Contract.ts

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* fixes

* rv scripts

* restore api-contract

* reorder definitions, fix ink storage

* fixes

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
2020-10-09 16:07:08 +02:00
Github Actions e53c229ac5 [CI Skip] release/beta 2.1.2-10
skip-checks: true
2020-10-09 13:23:38 +00:00
Jaco Greeff 6a0063addd Flatten displayType & encodeType into encodeTypeDef (#2698)
* Flatten displayType & encodeType into encodeTypeDef

* Remove to-be-replaced MetaRegistry tests (hardcoded results)
2020-10-09 15:13:52 +02:00
Github Actions 3b1845f0a0 [CI Skip] release/beta 2.1.2-9
skip-checks: true
2020-10-09 11:27:49 +00:00
Jaco Greeff 10880cf038 Update Scheduler (#2696) 2020-10-09 13:19:09 +02:00
Github Actions 289782b3a0 [CI Skip] release/beta 2.1.2-8
skip-checks: true
2020-10-08 16:00:31 +00:00
Jaco Greeff c3b7302dce Support new contracts Schedule (#2582) 2020-10-08 17:51:47 +02:00
Github Actions a5800b196c [CI Skip] release/beta 2.1.2-7
skip-checks: true
2020-10-08 11:49:41 +00:00
Jaco Greeff 28da228479 Handle Struct decoding from snake_case (#2694)
* Handle Struct decoding from snake_case

* Update packages/types/src/codec/Struct.spec.ts
2020-10-08 13:40:31 +02:00
Github Actions adf3d15c86 [CI Skip] release/beta 2.1.2-6
skip-checks: true
2020-10-08 11:36:50 +00:00
Jaco Greeff 8b54a22914 Introduce OriginCaller (& apply to Scheduler) (#2692)
* Introduce OriginCaller (& apply to Scheduler)

* RawOrigin

* Create OriginCaller type dynamically

* Update packages/metadata/src/Metadata/v12/toLatest.ts
2020-10-08 13:27:50 +02:00
Github Actions 2faf68c4d2 [CI Skip] release/beta 2.1.2-5
skip-checks: true
2020-10-07 11:35:18 +00:00
Jaco Greeff 363654dfba Bump dev (#2690) 2020-10-07 13:25:18 +02:00
Github Actions 5c481d47bb [CI Skip] release/beta 2.1.2-4
skip-checks: true
2020-10-07 06:31:03 +00:00
Jaco Greeff ce00d167ee Update README.md (#2688) 2020-10-07 08:21:36 +02:00
Github Actions fa1be60880 [CI Skip] release/beta 2.1.2-3
skip-checks: true
2020-10-06 12:50:16 +00:00
Jaco Greeff a28ce768bd Update examples link 2020-10-06 14:40:11 +02:00
Github Actions 5bf71c46dd [CI Skip] release/beta 2.1.2-2
skip-checks: true
2020-10-06 12:00:17 +00:00
Jaco Greeff 344af018f9 Remove docs (moving to docs repo) (#2685)
* Remove docs (moving to docs repo)

* Remove token
2020-10-06 13:50:20 +02:00
Github Actions 8de85c3a6b [CI Skip] release/beta 2.1.2-1
skip-checks: true
2020-10-06 09:26:04 +00:00
Jaco Greeff 014fa123b9 Cleanup metadata doc generation (#2684)
* Cleanup metadata doc generation

* Remove tmp
2020-10-06 11:16:43 +02:00
Github Actions 6bb43d4cfa [CI Skip] release/beta 2.1.2-0
skip-checks: true
2020-10-05 11:04:20 +00:00
Jaco Greeff acb565d46e Allow null input on Text values (#2682)
* Allow `null` input on `Text` values

* Update test

* Add to decode section

* Revert result
2020-10-05 12:54:04 +02:00
Github Actions e3a57e14bc [CI Skip] release/stable 2.1.1
skip-checks: true
2020-10-05 08:35:08 +00:00
Jaco Greeff cc926596e5 2.1 (#2681) 2020-10-05 10:24:25 +02:00
Github Actions 5193e9c6d5 [CI Skip] release/beta 2.1.0-beta.9
skip-checks: true
2020-10-04 17:53:29 +00:00
Jaco Greeff d3703c072b Revert additional catch (#2679)
* Revert additional catch

* Cleanup immediate/timeout checks
2020-10-04 19:43:15 +02:00
Github Actions 4dbcf310f3 [CI Skip] release/beta 2.1.0-beta.8
skip-checks: true
2020-10-04 13:39:32 +00:00
Jaco Greeff f778bf32e5 Dump dev (without lerna publish) (#2678)
* Dump dev (without lerna publish)

* Drop lerna.json
2020-10-04 15:30:26 +02:00
Github Actions 7027e9f982 [CI Skip] release/beta 2.1.0-beta.7
skip-checks: true
2020-10-04 09:15:39 +00:00
Jaco Greeff d13e58fb32 Bubble processing errors (#2677) 2020-10-04 11:07:07 +02:00
Github Actions 8f8e6d542f [CI Skip] release/beta 2.1.0-beta.6
skip-checks: true
2020-10-04 08:35:28 +00:00
Jaco Greeff 95c4f03bc3 s/TRANSACTION_/EXTRINSIC_/ (#2676)
* s/TRANSACTION_/EXTRINSIC_/

* Bump deps
2020-10-04 10:26:14 +02:00
Github Actions 45bba3a897 [CI Skip] release/beta 2.1.0-beta.5
skip-checks: true
2020-10-02 12:36:02 +00:00
Jaco Greeff d202287889 Remove all class summary links (#2674) 2020-10-02 14:27:08 +02:00
Github Actions 0c338dfbce [CI Skip] release/beta 2.1.0-beta.4
skip-checks: true
2020-10-02 11:57:43 +00:00
Jaco Greeff 33c161f874 Derive validators from stashes & nominations (#2672) 2020-10-02 13:48:25 +02:00
Github Actions 34d951d63e [CI Skip] release/beta 2.1.0-beta.3
skip-checks: true
2020-10-02 11:46:18 +00:00
Jaco Greeff 27c58b930b Reformat RPC errors (with less trimming) (#2668)
* Reformat RPC errors (with less trimming)

* Adjust decoding
2020-10-02 13:38:48 +02:00
Github Actions 6d2f2affe8 [CI Skip] release/beta 2.1.0-beta.2
skip-checks: true
2020-10-02 11:34:48 +00:00
Rocco Musolino e055438c59 remove broken link (#2671) 2020-10-02 13:26:21 +02:00
Github Actions 19bf1a1b59 [CI Skip] release/beta 2.1.0-beta.1
skip-checks: true
2020-10-02 11:20:05 +00:00
Jaco Greeff 5577723b73 Add limit protection for Bytes & Text (#2670)
* Add limit protection for Bytes & Text

* Limites as K

* Adjust limits upwards
2020-10-02 13:11:25 +02:00
Github Actions ba5f9d1d01 [CI Skip] release/beta 2.1.0-beta.0
skip-checks: true
2020-09-30 06:35:05 +00:00
Jaco Greeff 9d548f787f Bump deps (#2662) 2020-09-30 08:27:37 +02:00
Github Actions 98c8240457 [CI Skip] release/stable 2.0.1
skip-checks: true
2020-09-28 07:05:01 +00:00
Jaco Greeff ff59962c56 2.0 (#2657) 2020-09-28 08:56:50 +02:00
Jaco Greeff 929a2854bd Bump metadata (#2658) 2020-09-28 08:00:23 +02:00
Github Actions d90c0e82b1 [CI Skip] release/beta 1.35.0-beta.19
skip-checks: true
2020-09-27 18:21:49 +00:00
André Silva 73ffb034d0 add secondary_vrf field to babe EpochAuthorship (#2656) 2020-09-27 20:13:25 +02:00
Github Actions bd41406a34 [CI Skip] release/beta 1.35.0-beta.18
skip-checks: true
2020-09-27 09:10:14 +00:00
Jaco Greeff 8631f68ba7 Bump common (#2655)
* Bump common

* Update tests
2020-09-27 11:01:33 +02:00
Github Actions ad9d4d50f5 [CI Skip] release/beta 1.35.0-beta.17
skip-checks: true
2020-09-26 10:11:34 +00:00
Jaco Greeff cb93cb34b7 Drop support for Extrinsic V1, V2 & V3 (#2638)
* Drop support for Extrinsic V1 & V2

* Update interfaces

* Swap default to V4

* Remove V1/V2 extrinsic tests

* Fix v3 toU8a

* Fix Decorated tests for v4

* V3 payload extends v4 payload

* Revert "V3 payload extends v4 payload"

This reverts commit b1e546aa08fe1027aa77a235fd3b98441c426812.

* Drop extrinsic v3

* Update CHANGELOG.md
2020-09-26 12:02:27 +02:00
Github Actions f2fbedb407 [CI Skip] release/beta 1.35.0-beta.16
skip-checks: true
2020-09-26 08:53:52 +00:00
Jaco Greeff c27e41be3f RefCount known upgrades (#2654) 2020-09-26 10:44:47 +02:00
Github Actions ae17338520 [CI Skip] release/beta 1.35.0-beta.15
skip-checks: true
2020-09-25 17:41:01 +00:00
Jaco Greeff 19d6165bda Add PalletVersion struct (#2652) 2020-09-25 19:32:33 +02:00
Github Actions 9a02e0695b [CI Skip] release/beta 1.35.0-beta.14
skip-checks: true
2020-09-25 14:41:45 +00:00
Jaco Greeff 5ce3524ccd Drop Metadata V0-V8 (#2634)
* Drop MetadatV0

* Apply suggestions from code review

* Restore asV1

* Remove V0 comment

* Handle DoNotConstruct in enum

* No imports from DoNotConstruct

* Merge & re-generate

* Attempt empty construction

* Drop Metadata from 0-4

* CHANGELOG

* assert(5)

* BE vs LE

* Metadataall to no-construction

* Empty U8a create

* Remove old comment

* Santize handling

* Update CHANGELOG.md

* Drop support for Metadata < 9

* Remove old pre-9 definitions

* Update CHANGELOG.md

* CHANGELOG

* Remove v8-era tests

* v8 tests
2020-09-25 16:32:48 +02:00
Github Actions dff7243aad [CI Skip] release/beta 1.35.0-beta.13
skip-checks: true
2020-09-25 11:42:24 +00:00
Jaco Greeff ee6b6da02b Bump deps (#2651) 2020-09-25 13:31:57 +02:00
Github Actions dc936cfed4 [CI Skip] release/beta 1.35.0-beta.12
skip-checks: true
2020-09-25 10:32:00 +00:00
Jaco Greeff 7af9151854 Support .entries() with no queryStorageAt (#2650) 2020-09-25 12:23:14 +02:00
Github Actions 10497ddef2 [CI Skip] release/beta 1.35.0-beta.11
skip-checks: true
2020-09-25 08:29:50 +00:00
Jaco Greeff 7fd45f63df Drop support for linked lists (#2643)
* Drop support for linked lists

* CHANGELOG

* Remove all .linked. checks
2020-09-25 10:19:28 +02:00
Github Actions 82afd93bf6 [CI Skip] release/beta 1.35.0-beta.10
skip-checks: true
2020-09-24 17:23:32 +00:00
Jeremías Díaz 05c0379f43 fix(typegen): format vecfixed correctly (#2647)
* fix(typegen): add support for VecFixed in enums

* fix(typegen): format vecfixed correctly
2020-09-24 19:12:05 +02:00
Github Actions 10c7da75d8 [CI Skip] release/beta 1.35.0-beta.9
skip-checks: true
2020-09-24 17:00:05 +00:00
Jaco Greeff 0c4cc51f74 Perbill formatting with rawType equality (#2646)
* Perbill formatting with rawType equality

* Balance toHuman() check

* Formatter lookup

* typing

* Merge

* Better Compact detection
2020-09-24 18:48:24 +02:00
Github Actions 1ba58e3d04 [CI Skip] release/beta 1.35.0-beta.8
skip-checks: true
2020-09-24 15:20:09 +00:00
Jeremías Díaz c6bc664f80 fix(typegen): add support for VecFixed in enums (#2645) 2020-09-24 17:10:24 +02:00
Github Actions eb9ab67651 [CI Skip] release/beta 1.35.0-beta.7
skip-checks: true
2020-09-24 11:44:21 +00:00
Jaco Greeff 7070f757c4 Bump deps (#2644)
* Bump deps

* 24 on Polkadot
2020-09-24 13:35:10 +02:00
Github Actions 0d88095cb2 [CI Skip] release/beta 1.35.0-beta.6
skip-checks: true
2020-09-24 07:59:06 +00:00
Jaco Greeff 6faea13a28 Filter on null keys (wrong encoding) (#2642) 2020-09-24 09:48:28 +02:00
Github Actions 4f59866528 [CI Skip] release/beta 1.35.0-beta.5
skip-checks: true
2020-09-23 14:49:37 +00:00
Jaco Greeff 41f1d8f367 Centrifuge range update (#2640)
* Cetrifuge range update

* Move RefCount

* Remove Weight (u64 is default)
2020-09-23 16:39:20 +02:00
Github Actions a32a1162ff [CI Skip] release/beta 1.35.0-beta.4
skip-checks: true
2020-09-23 13:42:27 +00:00
Jaco Greeff 0c99064b19 Update know upgrade map (#2639) 2020-09-23 15:32:20 +02:00
Github Actions 77f37f387a [CI Skip] release/beta 1.35.0-beta.3
skip-checks: true
2020-09-23 13:27:55 +00:00
Jaco Greeff 9f4007bd4b RefCount change to u32 (#2635) 2020-09-23 15:17:12 +02:00
Github Actions ad20decbbc [CI Skip] release/beta 1.35.0-beta.2
skip-checks: true
2020-09-22 21:07:19 +00:00
Miguel Hervas 820dd3d0fb Centrifuge update RC6 (#2637)
* update to rc6 types

* prep rc6

* fix lint
2020-09-22 22:57:59 +02:00
Github Actions 004f9153ab [CI Skip] release/beta 1.35.0-beta.1
skip-checks: true
2020-09-22 10:28:49 +00:00
Jaco Greeff 3de336fdff Add support for grandpa_proveFinality RPC (#2633)
* Add support for grandpa_proveFinality RPC

* CHANGELOG
2020-09-22 12:18:41 +02:00
Github Actions 67e1e07714 [CI Skip] release/beta 1.35.0-beta.0
skip-checks: true
2020-09-22 10:09:16 +00:00
Jaco Greeff b4cae14836 Add Bounty type definitions (#2632)
* Add Bounty type definitions

* CHANGELOG
2020-09-22 11:58:58 +02:00
Github Actions 9bae65864d [CI Skip] release/stable 1.34.1
skip-checks: true
2020-09-21 07:27:20 +00:00
Jaco Greeff 172143f2eb 1.34 (#2628) 2020-09-21 09:16:45 +02:00
Github Actions 3162f15a1d [CI Skip] release/beta 1.34.0-beta.14
skip-checks: true
2020-09-20 16:10:59 +00:00
Wei Tang af074500b6 Add support to extract PoW author (#2627)
* Add PoW engine ID and author fetching logic

* Fix Pow CID order
2020-09-20 18:00:21 +02:00
Github Actions 5e2a1753af [CI Skip] release/beta 1.34.0-beta.13
skip-checks: true
2020-09-19 06:56:59 +00:00
Jaco Greeff 375dadbe35 Optional votingOf for democracy locks (#2626) 2020-09-19 08:46:35 +02:00
Github Actions f799a63610 [CI Skip] release/beta 1.34.0-beta.12
skip-checks: true
2020-09-18 05:24:48 +00:00
Jaco Greeff eda5edbd40 Explicit Decorate creation with Metadata (#2622)
* Explicit Decorate creation with Metadata

* typo

* Update generator

* Adjust Registry findMetaError sig
2020-09-18 07:14:11 +02:00
Github Actions d0fefb342f [CI Skip] release/beta 1.34.0-beta.11
skip-checks: true
2020-09-17 21:25:01 +00:00
Jaco Greeff b56c1a8282 Explicit tie of metadata to registry (not implicit) (#2621)
* Explicit tie of metadata to registry (not implicit)

* Update type generation

* Test updates

* Revert non-problematic

* Cleanup mocks

* Updata metadata tests

* CHANGELOG

* linting
2020-09-17 23:15:09 +02:00
Jaco Greeff cdd6544e20 SPDX (#2619) 2020-09-17 16:31:06 +02:00
Github Actions 12068a8722 [CI Skip] release/beta 1.34.0-beta.10
skip-checks: true
2020-09-17 13:05:24 +00:00
Jaco Greeff 4596e434dd accountNextIndex on nonce = -1 (#2618) 2020-09-17 14:54:06 +02:00
Github Actions 6c00a5a408 [CI Skip] release/beta 1.34.0-beta.9
skip-checks: true
2020-09-17 08:18:32 +00:00
Jaco Greeff c10e4d3fc1 Use polyfills from polkadot-js (#2616)
* Use polyfills from polkadot-js

* no empty catch

* Non-working asjustments

* Adjust WS mocking

* Bump polyfills

* Bumps

* Restore common
2020-09-17 10:05:34 +02:00
Github Actions 597aa3d607 [CI Skip] release/beta 1.34.0-beta.8
skip-checks: true
2020-09-16 09:44:55 +00:00
Jaco Greeff 2edad85250 Refresh all type decorations on upgrade (#2615)
* Refresh all type decorations on upgrade

* Cleanups

* calls/events not part of init
2020-09-16 11:32:52 +02:00
Github Actions 5f0c6ecd1b [CI Skip] release/beta 1.34.0-beta.7
skip-checks: true
2020-09-16 07:06:46 +00:00
Jaco Greeff 2a36987140 Bump deps (incl. isomorphic-fetch replacement) (#2614)
* Bump deps (incl. isomorphic-fetch replacement)

* Bump ts
2020-09-16 08:53:50 +02:00
Github Actions 12ea37d1ec [CI Skip] release/beta 1.34.0-beta.6
skip-checks: true
2020-09-15 19:33:42 +00:00
Jaco Greeff 3dca518cd7 Explicit help in signer error (#2610) 2020-09-15 21:21:56 +02:00
Jaco Greeff 5f7057dbbf Update known upgrade blocks for Polkadot (#2611) 2020-09-15 21:21:30 +02:00
Github Actions aac6b3bc7b [CI Skip] release/beta 1.34.0-beta.5
skip-checks: true
2020-09-15 12:40:43 +00:00
Jaco Greeff 7a5a975048 Sameness check for v12 indexes (#2609)
* Sameness check for indexes

* Update with older support
2020-09-15 14:27:43 +02:00
Github Actions 46d05dd7af [CI Skip] release/beta 1.34.0-beta.4
skip-checks: true
2020-09-15 09:28:38 +00:00
Jaco Greeff 177cdb97fd Expand extrinsic decoding example (#2608) 2020-09-15 11:15:38 +02:00
Github Actions 2b0bae12c7 [CI Skip] release/beta 1.34.0-beta.3
skip-checks: true
2020-09-14 20:50:36 +00:00
Jaco Greeff 24d8915005 toCallsOnly for v12 (#2606) 2020-09-14 22:37:59 +02:00
Github Actions 180bfbbf6f [CI Skip] release/beta 1.34.0-beta.2
skip-checks: true
2020-09-14 14:16:54 +00:00
Jaco Greeff 918bb73547 Ensure that ignored map params yield an error on iterKey (#2605) 2020-09-14 16:05:37 +02:00
Github Actions 41ffa2bf00 [CI Skip] release/beta 1.34.0-beta.1
skip-checks: true
2020-09-14 11:19:37 +00:00
Jaco Greeff e425a38a7c Cleanups for WebSocket class detection and creation (#2604)
* Cleanups for WebSocket class detection and creation

* Create change
2020-09-14 13:08:28 +02:00
Github Actions c616cd51c5 [CI Skip] release/beta 1.34.0-beta.0
skip-checks: true
2020-09-14 10:49:11 +00:00
Jaco Greeff dac3261a16 Support for Metadata v12 (#2599)
* Support for Metadata v12

* v12 static data

* Treat 255 as reserved

* Point static to v12
2020-09-14 12:35:30 +02:00
Github Actions 28355424bd [CI Skip] release/stable 1.33.1
skip-checks: true
2020-09-14 07:11:20 +00:00
Jaco Greeff e7be062522 1.33 (#2602) 2020-09-14 08:58:21 +02:00
Github Actions ed5b5eeaa6 [CI Skip] release/beta 1.33.0-beta.6
skip-checks: true
2020-09-13 12:34:01 +00:00
Jaco Greeff ad8ad42344 Map Websocket error codes to short descriptions (#2601) 2020-09-13 14:23:00 +02:00
Github Actions f311e5d57f [CI Skip] release/beta 1.33.0-beta.5
skip-checks: true
2020-09-10 06:43:32 +00:00
Jaco Greeff 065f39ba6d Explicit hash to paymentInfo for query (#2598)
* Explicit hash to paymentInfo for query

* CHANGELOG
2020-09-10 08:30:16 +02:00
Github Actions 64bf72a6d7 [CI Skip] release/beta 1.33.0-beta.4
skip-checks: true
2020-09-10 00:50:50 +00:00
Jaco Greeff b59b60ae1f Use source registry in clones (#2597) 2020-09-10 02:38:07 +02:00
Github Actions e5b7e7f16f [CI Skip] release/beta 1.33.0-beta.3
skip-checks: true
2020-09-09 16:56:29 +00:00
Jaco Greeff c2705bdfda Set runtimeChain from source (#2595)
* Set runtimeChain from source

* Update packages/api/src/base/index.ts

* Update CHANGELOG.md
2020-09-09 18:44:47 +02:00
Github Actions 373eb06713 [CI Skip] release/beta 1.33.0-beta.2
skip-checks: true
2020-09-09 11:43:42 +00:00
Jaco Greeff 45c2c40a3e derive.staking.stakerPrefs (#2594) 2020-09-09 13:31:06 +02:00
Github Actions 3b110d7d7f [CI Skip] release/beta 1.33.0-beta.1
skip-checks: true
2020-09-09 08:55:49 +00:00
Jaco Greeff 0a8d2e5ac1 Allow as-signed paymentInfo on any extrinsic (#2593)
* Allow as-signed paymentInfo on any extrinsic

* Bumps
2020-09-09 10:43:59 +02:00
Github Actions d0bf8b8d82 [CI Skip] release/beta 1.33.0-beta.0
skip-checks: true
2020-09-07 11:39:53 +00:00
Jaco Greeff 2c3ef10513 Optimize heartbeat retrievals (#2590) 2020-09-07 13:28:43 +02:00
Github Actions 92022bda94 [CI Skip] release/stable 1.32.1
skip-checks: true
2020-09-07 07:22:50 +00:00
Jaco Greeff 609581430f 1.32 (#2589)
* 1.32

* CHANGELOG
2020-09-07 09:10:35 +02:00
Github Actions ec083f623d [CI Skip] release/beta 1.32.0-beta.25
skip-checks: true
2020-09-06 16:18:27 +00:00
Jaco Greeff 395dc79ef7 Adjust derive.staking.query (no opt) (#2588)
* Adjust derive.staking.query (no opt)

* Rewrite
2020-09-06 18:06:37 +02:00
Github Actions a968fe05b5 [CI Skip] release/beta 1.32.0-beta.24
skip-checks: true
2020-09-06 11:05:18 +00:00
Jaco Greeff 4b3b853c27 Extract derive for staking keys (#2587)
* Extract derive for staking keys

* CHANGELOG
2020-09-06 12:53:46 +02:00
Github Actions ea5843f7c9 [CI Skip] release/beta 1.32.0-beta.23
skip-checks: true
2020-09-06 08:04:07 +00:00
Jaco Greeff 467ccc5681 Westend known upgrade (#2584) 2020-09-06 09:51:16 +02:00
Github Actions 59922eee8f [CI Skip] release/beta 1.32.0-beta.22
skip-checks: true
2020-09-05 12:44:02 +00:00
Jaco Greeff 5af98cc89e Retry WS on initial connection failures (#2585) 2020-09-05 14:30:55 +02:00
Github Actions 1b7265048d [CI Skip] release/beta 1.32.0-beta.21
skip-checks: true
2020-09-05 06:33:47 +00:00
Jaco Greeff 3151c08aca Bump deps (#2583) 2020-09-05 08:22:29 +02:00
Github Actions 71332fde1b [CI Skip] release/beta 1.32.0-beta.20
skip-checks: true
2020-09-04 16:08:24 +00:00
Jaco Greeff 00bc441f0e Add connected() to API interface (#2580)
* Add connected() to API interface

* Slight doc update

* Align ApiRx

* isConnected() usage

* Updates

* Retrieve isConnected for API via observable

* Remove (now) useless Rx test
2020-09-04 17:57:02 +02:00
Github Actions 4f4833da74 [CI Skip] release/beta 1.32.0-beta.19
skip-checks: true
2020-09-04 08:47:58 +00:00
qiuhao 825365bb13 update DeriveCustom type (#2581) 2020-09-04 10:37:16 +02:00
Github Actions 48a3a976f9 [CI Skip] release/beta 1.32.0-beta.18
skip-checks: true
2020-09-04 06:06:45 +00:00
Jaco Greeff b579b18fad Adjust toHuman display (#2579)
* Adjust toHuman display

* revert args breakdown
2020-09-04 07:55:13 +02:00
Github Actions 27f5547bbf [CI Skip] release/beta 1.32.0-beta.17
skip-checks: true
2020-09-03 15:22:39 +00:00
Shawn Tabrizi 4654d15097 Add isReadyOrError when connecting to API (#2577)
* Add `isReadyOrError`

* lint
2020-09-03 17:10:07 +02:00
Github Actions 10574ecc33 [CI Skip] release/beta 1.32.0-beta.16
skip-checks: true
2020-09-03 14:00:02 +00:00
Jaco Greeff 6ae75ba92e Bump dev (#2576)
* Bump dev

* type linting

* linting

* linting

* missed
2020-09-03 15:47:29 +02:00
Github Actions 5a48a2a3f7 [CI Skip] release/beta 1.32.0-beta.15
skip-checks: true
2020-09-03 12:02:17 +00:00
Jaco Greeff 40899adf82 Optiona nominators (#2575) 2020-09-03 13:50:19 +02:00
Github Actions 020effecc8 [CI Skip] release/beta 1.32.0-beta.14
skip-checks: true
2020-09-03 10:58:35 +00:00
Jaco Greeff 430beb9f25 staking.currentEra returns Option (#2574)
* staking.currentEra returns Option

* Flatten

* Cleanups.

* Option<EraIndex> or EraIndex

* Test unwrapOrDefault
2020-09-03 12:45:50 +02:00
Github Actions 533d6dd441 [CI Skip] release/beta 1.32.0-beta.13
skip-checks: true
2020-09-03 06:54:48 +00:00
Jaco Greeff 95dd13e218 Dedup class creation (#2573) 2020-09-03 08:41:15 +02:00
Github Actions c8cb441a82 [CI Skip] release/beta 1.32.0-beta.12
skip-checks: true
2020-09-02 15:27:23 +00:00
Jaco Greeff b6d1be6ee5 Only memomize via instanceId (#2572)
* Add memoizee instanceId

* Gotcha.

* linitng
2020-09-02 17:13:38 +02:00
Github Actions e13514cd94 [CI Skip] release/beta 1.32.0-beta.11
skip-checks: true
2020-09-02 13:26:45 +00:00
Jaco Greeff 5a90da5df8 accountId-only lookups on paymentInfo (#2569) 2020-09-02 15:13:45 +02:00
Github Actions 8fdc518651 [CI Skip] release/beta 1.32.0-beta.10
skip-checks: true
2020-09-02 10:31:41 +00:00
Jaco Greeff eb6b3c5bd4 Align costs typing with queries (#2564)
* Align costs typing with queries

* better...

* ... and better

* ... progress

* better, down to 8

* ... down to 3

* ... 2

* Down to 1

* It builds.

* ... it really builds
2020-09-02 12:19:09 +02:00
Github Actions 1214572f02 [CI Skip] release/beta 1.32.0-beta.9
skip-checks: true
2020-09-02 07:37:22 +00:00
Jaco Greeff df229ffb8a Known Kusama update (slight upgrades rework) (#2567)
* Known Kusama update (slight upgrades rework)

* linting
2020-09-02 09:23:48 +02:00
Github Actions 334e0bb730 [CI Skip] release/beta 1.32.0-beta.8
skip-checks: true
2020-09-01 11:22:21 +00:00
Nikhil Ranjan f43bc32573 add vestingPerBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances (#2563)
* add vesting perBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances

* perBlock renamed to vestingPerBlock
2020-09-01 13:09:29 +02:00
Github Actions bf4a8e28a3 [CI Skip] release/beta 1.32.0-beta.7
skip-checks: true
2020-09-01 11:06:46 +00:00
Jaco Greeff 9188e29dcc Add grandpa_subscribeJustifications (#2562) 2020-09-01 12:54:32 +02:00
Github Actions 7ea89950fe [CI Skip] release/beta 1.32.0-beta.6
skip-checks: true
2020-09-01 10:04:40 +00:00
Jaco Greeff 7a1089df79 Cater for nested aliassed types (#2560)
* Cater for nested aliassed types

* linting
2020-09-01 11:52:11 +02:00
Github Actions f1ca28adcb [CI Skip] release/beta 1.32.0-beta.5
skip-checks: true
2020-09-01 09:26:04 +00:00
Jaco Greeff 8f675053a4 Add toHuman() & toBigInt() to type basics (#2558) 2020-09-01 11:13:46 +02:00
Github Actions 64de91a96b [CI Skip] release/beta 1.32.0-beta.4
skip-checks: true
2020-08-31 21:19:25 +00:00
Jaco Greeff 6bd10daf43 Bump static metadata (#2557) 2020-08-31 23:06:18 +02:00
Github Actions 57c54c860a [CI Skip] release/beta 1.32.0-beta.3
skip-checks: true
2020-08-31 21:03:09 +00:00
Jaco Greeff 0e9a50e020 Make metadata available on registry swap (#2556)
* Make metadata available on registry swap

* Return full VersionedRegistry
2020-08-31 22:52:33 +02:00
Github Actions 15c35900ac [CI Skip] release/beta 1.32.0-beta.2
skip-checks: true
2020-08-31 19:25:29 +00:00
Jaco Greeff 6f092a1818 api.derive.chain.getBlock(<hash>) with author getter (#2555)
* api.derive.chain.getBlock<hash>) with author getter

* Update CHANGELOG.md
2020-08-31 21:12:14 +02:00
Github Actions c0c6928394 [CI Skip] release/beta 1.32.0-beta.1
skip-checks: true
2020-08-31 17:48:54 +00:00
Jaco Greeff 391c98c845 Next beta 2020-08-31 19:34:37 +02:00
Github Actions 2e125c5542 [CI Skip] release/stable 1.31.2
skip-checks: true
2020-08-31 17:30:12 +00:00
Jaco Greeff 3d67b75059 Proxy Announcement override (#2553) 2020-08-31 19:17:48 +02:00
Github Actions d958ef8f15 [CI Skip] release/stable 1.31.1
skip-checks: true
2020-08-31 15:44:17 +00:00
Jaco Greeff 97527871d6 1.31 (#2551) 2020-08-31 17:32:20 +02:00
Github Actions 0317f28e5a [CI Skip] release/beta 1.31.0-beta.26
skip-checks: true
2020-08-31 15:06:05 +00:00
Jaco Greeff ebe6d03762 Update types for Polkadot runtime 23 (#2550)
* Update types for Polkadot runtime 23

* Expand change info

* version upgrades

* Linting
2020-08-31 16:50:56 +02:00
Github Actions 59e92fa344 [CI Skip] release/beta 1.31.0-beta.25
skip-checks: true
2020-08-31 14:24:05 +00:00
Jaco Greeff cab338e26d CHANGELOG (#2549) 2020-08-31 16:11:17 +02:00
Github Actions 743ea431b4 [CI Skip] release/beta 1.31.0-beta.24
skip-checks: true
2020-08-31 13:32:50 +00:00
Jaco Greeff 533f9ce249 Explicit delay for per-hash single queries (#2548)
* Explicit delay for per-hash single queries

* Expand delay

* Update packages/rpc-core/src/index.ts
2020-08-31 15:20:06 +02:00
Github Actions 797ee9c24a [CI Skip] release/beta 1.31.0-beta.23
skip-checks: true
2020-08-31 12:44:38 +00:00
Jaco Greeff 2f5e2537a3 Align single-shot memoization (#2546)
* Align single-shot memoization

* Small tweaks

* Test for delayed creates

* With actual sub

* Expand delay test

* Bump delay
2020-08-31 14:31:44 +02:00
Github Actions dd52ea4b32 [CI Skip] release/beta 1.31.0-beta.22
skip-checks: true
2020-08-31 12:27:52 +00:00
Jaco Greeff 5e8ae793c3 Westend known upgrades (#2547) 2020-08-31 14:16:45 +02:00
Github Actions 8713a1f2b6 [CI Skip] release/beta 1.31.0-beta.21
skip-checks: true
2020-08-31 11:22:44 +00:00
Jaco Greeff 6e6fa4a97c Known upgrade points for on-chain version skip (#2545)
* Known upgrade points for on-chain version skip

* Update packages/types-known/src/index.ts

* Update packages/api/src/base/Init.ts

* Actual known upgrade blocks for Polkadot & Kusama

* Update with known Kusama upgrade history

* linting
2020-08-31 13:09:52 +02:00
Github Actions ac2a0a34ca [CI Skip] release/beta 1.31.0-beta.20
skip-checks: true
2020-08-31 07:51:33 +00:00
Jaco Greeff 45fb6d44ad Bump deps (#2544) 2020-08-31 09:38:21 +02:00
Github Actions 6d2265d4ff [CI Skip] release/beta 1.31.0-beta.19
skip-checks: true
2020-08-31 07:11:57 +00:00
Jaco Greeff 4ec42f1750 Ensure non-destructive registry swap (#2543)
* Ensure non-destructive registry swap

* Update packages/api/src/base/Init.ts
2020-08-31 08:59:20 +02:00
Github Actions 01166b9684 [CI Skip] release/beta 1.31.0-beta.18
skip-checks: true
2020-08-30 19:24:47 +00:00
Jaco Greeff 0075dce720 Remove outdated historic query FAQ (#2540) 2020-08-30 21:11:15 +02:00
Github Actions 7fbb30066e [CI Skip] release/beta 1.31.0-beta.17
skip-checks: true
2020-08-30 18:41:28 +00:00
Jaco Greeff 637069d723 Shortcut registry for subsequent same-hash queries (#2539) 2020-08-30 20:28:37 +02:00
Github Actions d639a7ee8c [CI Skip] release/beta 1.31.0-beta.16
skip-checks: true
2020-08-30 18:17:47 +00:00
Jaco Greeff 28ef291c40 Mark submittable .sign as deprecated (#2538) 2020-08-30 20:06:42 +02:00
Github Actions 48ddd0b0d4 [CI Skip] release/beta 1.31.0-beta.15
skip-checks: true
2020-08-30 10:52:55 +00:00
Jaco Greeff e88ebf7b2e Support Vec .concat (#2537)
* Support Vec .concat

* CHANGELOG
2020-08-30 12:40:20 +02:00
Github Actions 72700e6baf [CI Skip] release/beta 1.31.0-beta.14
skip-checks: true
2020-08-30 10:36:12 +00:00
Hamza Tokuchi f748fcd46d more typos (#2532) 2020-08-30 12:24:50 +02:00
Jaco Greeff 7876bb9ced Add isHistoric flags to RPC with hash params (#2535)
* Add isHistoric flags to RPC with hash params

* Update packages/types/src/interfaces/chain/definitions.ts

* Apply suggestions from code review

* Transparently swap registry on RPC layer

* Simplify (& linting fixes)

* Cleanups

* CHANGELOG
2020-08-30 12:12:18 +02:00
Github Actions a83980b213 [CI Skip] release/beta 1.31.0-beta.13
skip-checks: true
2020-08-29 13:59:29 +00:00
Jaco Greeff c4323d5e94 Add swapRegistry(hash?) to initlize clean registry (#2534)
* Add swapRegistry(hash?) to initlize clean registry

* Cater for genesisHash queries
2020-08-29 15:46:42 +02:00
Github Actions 11694f1393 [CI Skip] release/beta 1.31.0-beta.12
skip-checks: true
2020-08-29 12:31:27 +00:00
Jaco Greeff 3989ae67b2 Bump deps (#2533) 2020-08-29 14:19:56 +02:00
Github Actions b78df57907 [CI Skip] release/beta 1.31.0-beta.11
skip-checks: true
2020-08-28 12:35:54 +00:00
Jaco Greeff 2f78329738 Return democracy locks for delegations (#2531) 2020-08-28 14:23:05 +02:00
Github Actions 6063054712 [CI Skip] release/beta 1.31.0-beta.10
skip-checks: true
2020-08-28 10:15:36 +00:00
Jaco Greeff e42af97928 Bump deps (#2530) 2020-08-28 12:03:49 +02:00
Hamza Tokuchi d05ccdb5d7 small typos (#2529) 2020-08-28 12:03:13 +02:00
Github Actions c33334b72b [CI Skip] release/beta 1.31.0-beta.9
skip-checks: true
2020-08-28 08:50:51 +00:00
Jaco Greeff 94e9fd2b17 Fix for in-place unlocking (#2528) 2020-08-28 10:40:53 +02:00
Github Actions 9c1327ea22 [CI Skip] release/beta 1.31.0-beta.8
skip-checks: true
2020-08-26 16:56:17 +00:00
Jaco Greeff 9f195e9402 Update RewardDesitination enum (any payout) (#2474) 2020-08-26 18:43:51 +02:00
Github Actions 3e5e089c68 [CI Skip] release/beta 1.31.0-beta.7
skip-checks: true
2020-08-26 11:00:13 +00:00
Jaco Greeff 35c37aa66c Allow AccountId null in constructor 2020-08-26 12:47:15 +02:00
Github Actions f1aeb564e3 [CI Skip] release/beta 1.31.0-beta.6
skip-checks: true
2020-08-26 10:41:27 +00:00
Kian Paimani c2ff1b32ae Update definitions.ts (#2514)
* Update definitions.ts

Will fix the decoding of these types. Sadly cannot provide a compact test case.

* Add more tests.

* Make the tests work.

* Fix linting as well.
2020-08-26 12:29:27 +02:00
Github Actions 288427cbb8 [CI Skip] release/beta 1.31.0-beta.5
skip-checks: true
2020-08-26 09:40:00 +00:00
Jaco Greeff d099ccedad Additional AccountId length check (protect users against themselves) (#2520)
* Additional AccountId length check

* Allow all-0

* Spaceing.
2020-08-26 11:27:57 +02:00
Github Actions 79c7983199 [CI Skip] release/beta 1.31.0-beta.4
skip-checks: true
2020-08-26 09:26:32 +00:00
Jaco Greeff 80c578fe76 Bump deps (#2521)
* Bump deps

* Rewrite yarn.lock

* Debump markdown plugin

* Explicit add of typedoc plugins

* Bump dev typedoc exec

* Bump md

* Common bump
2020-08-26 11:15:23 +02:00
Github Actions de90c048bf [CI Skip] release/beta 1.31.0-beta.3
skip-checks: true
2020-08-26 05:12:55 +00:00
aniiantt 01a36a994d add TransactionPriority def (#2519) 2020-08-26 07:03:20 +02:00
Github Actions b1ce22d51d [CI Skip] release/beta 1.31.0-beta.2
skip-checks: true
2020-08-25 22:01:24 +00:00
Jaco Greeff fe951c2645 Support bare flag on enums (#2518)
* Support bare flag on enums

* Remove extra var allocation
2020-08-25 23:50:30 +02:00
Github Actions 5a17c542a7 [CI Skip] release/beta 1.31.0-beta.1
skip-checks: true
2020-08-25 21:35:20 +00:00
Jaco Greeff 59bb5f864f Add toBigInt to number types (#2517)
* Add toBigInt to number types

* Update packages/types/src/codec/UInt.spec.ts

* Update packages/types/src/codec/Compact.spec.ts

* Update packages/types/src/codec/Compact.ts
2020-08-25 23:24:02 +02:00
Github Actions abcba20f90 [CI Skip] release/beta 1.31.0-beta.0
skip-checks: true
2020-08-25 13:48:28 +00:00
Hamza Tokuchi 014f08c7cc Small typo (#2515)
teh -> the
2020-08-25 15:36:59 +02:00
Github Actions 7ecd00a4e6 [CI Skip] release/stable 1.30.1
skip-checks: true
2020-08-24 09:27:18 +00:00
Jaco Greeff 6239818c26 1.30 (#2511) 2020-08-24 11:14:32 +02:00
Github Actions 6af22f41c7 [CI Skip] release/beta 1.30.0-beta.8
skip-checks: true
2020-08-24 07:40:12 +00:00
Jaco Greeff 77c3a701d0 Bump deps (#2510) 2020-08-24 09:27:49 +02:00
Github Actions 46b17a466c [CI Skip] release/beta 1.30.0-beta.7
skip-checks: true
2020-08-24 05:35:43 +00:00
Jaco Greeff e592c6c878 Fix circular know-type refs (#2509) 2020-08-24 07:23:06 +02:00
Github Actions ef37586dfc [CI Skip] release/beta 1.30.0-beta.6
skip-checks: true
2020-08-22 12:13:04 +00:00
Jaco Greeff 5856ce24cc User pair addressRaw for signing (#2504)
* User pair addressRaw for signing

* Bump common

* Bump common after merge
2020-08-22 14:02:28 +02:00
Github Actions 8b79056bf9 [CI Skip] release/beta 1.30.0-beta.5
skip-checks: true
2020-08-22 11:20:28 +00:00
Jaco Greeff 70e0f19ade Allow for configurable hashers (#2503) 2020-08-22 13:09:04 +02:00
Github Actions cf1e242c17 [CI Skip] release/beta 1.30.0-beta.4
skip-checks: true
2020-08-22 10:41:32 +00:00
Jaco Greeff 68856e9692 Ethereum-compatible AccountId/Address (#2501)
* Ethereum-compatible AccountId/Address

* With tests

* Adjust definitions

* Update packages/types/src/ethereum/LookupSource.ts

* Renames
2020-08-22 12:30:24 +02:00
Github Actions e0626c3dad [CI Skip] release/beta 1.30.0-beta.3
skip-checks: true
2020-08-22 09:53:13 +00:00
Jaco Greeff 277ea92fda Adjust Address <-> LookupSource definitions (#2502) 2020-08-22 11:43:19 +02:00
Github Actions aec6694028 [CI Skip] release/beta 1.30.0-beta.2
skip-checks: true
2020-08-22 08:31:53 +00:00
Jaco Greeff 533abb76f7 Bump deps (#2500)
* Bump deps

* Rewrite
2020-08-22 10:20:40 +02:00
Github Actions 7660bab86b [CI Skip] release/beta 1.30.0-beta.1
skip-checks: true
2020-08-20 08:45:46 +00:00
Jaco Greeff f7c1b6e81b Check system.account (& balances) for new queries (#2495) 2020-08-20 10:33:47 +02:00
Github Actions b6e9b29570 [CI Skip] release/beta 1.30.0-beta.0
skip-checks: true
2020-08-18 09:51:26 +00:00
Jaco Greeff 519d9c8fa9 Types for proposeParachain module (#2493) 2020-08-18 11:40:30 +02:00
Github Actions ad905db53b [CI Skip] release/stable 1.29.1
skip-checks: true
2020-08-17 10:56:06 +00:00
Jaco Greeff 0a0aa742b4 1.29 (#2489) 2020-08-17 12:43:56 +02:00
Github Actions dfbb06a4d6 [CI Skip] release/beta 1.29.0-beta.5
skip-checks: true
2020-08-13 09:05:15 +00:00
Jaco Greeff 82e71fd51e Bump deps (#2486) 2020-08-13 10:54:45 +02:00
Github Actions a8b88af97a [CI Skip] release/beta 1.29.0-beta.4
skip-checks: true
2020-08-13 07:59:11 +00:00
sung wu eee36537de Update tx.md (#2485)
fix sample code
2020-08-13 09:47:22 +02:00
Github Actions 20a75eafb6 [CI Skip] release/beta 1.29.0-beta.3
skip-checks: true
2020-08-11 15:33:01 +00:00
Jaco Greeff 00d3a1174b Add desiredRunnersUp (#2484) 2020-08-11 17:21:30 +02:00
Github Actions e293c7c1cf [CI Skip] release/beta 1.29.0-beta.2
skip-checks: true
2020-08-11 11:54:13 +00:00
Jaco Greeff 3c8cd499c4 Introduce compact version of CompactAssignments (#2483)
* Introduce compact version of CompactAssignments

* Rebuild interfaces, update tests
2020-08-11 13:43:24 +02:00
Github Actions cb3816df78 [CI Skip] release/beta 1.29.0-beta.1
skip-checks: true
2020-08-11 08:01:38 +00:00
Jaco Greeff fcfcbb2d97 Additional Fixed* types (#2481) 2020-08-11 09:50:28 +02:00
Github Actions 321b80ed63 [CI Skip] release/beta 1.29.0-beta.0
skip-checks: true
2020-08-10 14:55:58 +00:00
Jaco Greeff 73eaa9fe17 Cleanup id from index lookups (#2479) 2020-08-10 16:42:27 +02:00
Github Actions 4d8910f3da [CI Skip] release/stable 1.28.1
skip-checks: true
2020-08-10 06:20:15 +00:00
Jaco Greeff e6806ed7f9 jg-1.28 (#2478) 2020-08-10 08:10:21 +02:00
Github Actions 218abf9568 [CI Skip] release/beta 1.28.0-beta.6
skip-checks: true
2020-08-08 07:21:20 +00:00
Jaco Greeff a1df864681 Nump deps (#2477) 2020-08-08 09:09:30 +02:00
Github Actions 45640edcff [CI Skip] release/beta 1.28.0-beta.5
skip-checks: true
2020-08-07 09:29:23 +00:00
Jaco Greeff 53655019b5 Cookbook for viewing block extrinsics (#2476) 2020-08-07 11:16:33 +02:00
Github Actions a1f8bedb6d [CI Skip] release/beta 1.28.0-beta.4
skip-checks: true
2020-08-06 19:08:46 +00:00
Miguel Hervas 9d1af1eaeb Add Centrifuge missing types (#2475)
* Add missing types

* sort attempt

* sort attempt 1

* sort attempt 2
2020-08-06 20:57:07 +02:00
Github Actions 38bfd26511 [CI Skip] release/beta 1.28.0-beta.3
skip-checks: true
2020-08-06 13:07:18 +00:00
Jaco Greeff 1beaf9f208 Bump berry (#2473)
* Bump berry

* Rewrite
2020-08-06 14:56:43 +02:00
Github Actions 29c29978dd [CI Skip] release/beta 1.28.0-beta.2
skip-checks: true
2020-08-05 15:06:31 +00:00
Jaco Greeff a8d1dd0637 Bump deps (#2472) 2020-08-05 16:53:11 +02:00
Github Actions 74571dcd26 [CI Skip] release/beta 1.28.0-beta.1
skip-checks: true
2020-08-04 20:51:40 +00:00
Jaco Greeff 54b4c2620a Types for time-delay proxies (#2468)
* Types for time-delay proxies

* Remove duplicated CallHash (& generate output)
2020-08-04 22:38:56 +02:00
Github Actions da05828e74 [CI Skip] release/beta 1.28.0-beta.0
skip-checks: true
2020-08-04 11:07:26 +00:00
Jaco Greeff fa935156e1 Add ValidationFunctionParams type (#2467) 2020-08-04 12:56:55 +02:00
Github Actions 19510c1ede [CI Skip] release/stable 1.27.1
skip-checks: true
2020-08-03 07:18:56 +00:00
Jaco Greeff 97b5c699b1 1.27 (#2462) 2020-08-03 09:08:09 +02:00
Github Actions d2befda86e [CI Skip] release/beta 1.27.0-beta.3
skip-checks: true
2020-07-31 09:46:53 +00:00
Jaco Greeff 740348b48f Bump deps (#2460) 2020-07-31 11:34:00 +02:00
Github Actions 9e2a5cf532 [CI Skip] release/beta 1.27.0-beta.2
skip-checks: true
2020-07-30 16:28:52 +00:00
Jaco Greeff 6df466d9ea Known types for Rococo (#2459)
* Known types for Rococo

* Update rococo.ts
2020-07-30 18:17:32 +02:00
Github Actions e2a2ac2842 [CI Skip] release/beta 1.27.0-beta.1
skip-checks: true
2020-07-28 11:11:30 +00:00
sung wu 5adc846e45 update doc - "create instance" page (#2456)
poc-3.polkadot.io is not available right now. use rpc.polkadot.io instead.
2020-07-28 12:59:27 +02:00
Github Actions 75aa310837 [CI Skip] release/beta 1.27.0-beta.0
skip-checks: true
2020-07-28 10:27:07 +00:00
Jaco Greeff ce0523eb1c Raw toHuman Ascii detection (#2455) 2020-07-28 12:17:26 +02:00
Github Actions eb0370bb66 [CI Skip] release/stable 1.26.1
skip-checks: true
2020-07-27 11:21:29 +00:00
Jaco Greeff 5eb491dc67 1.26 (#2453) 2020-07-27 13:10:07 +02:00
Github Actions b50294ab0f [CI Skip] release/beta 1.26.0-beta.6
skip-checks: true
2020-07-27 10:56:53 +00:00
Keith Ingram e1cb62d2d2 Type for contract call params (#2452) 2020-07-27 12:43:54 +02:00
Github Actions 8ed0ef2295 [CI Skip] release/beta 1.26.0-beta.5
skip-checks: true
2020-07-27 10:18:11 +00:00
Jaco Greeff 956e173323 Metadata bump (#2451) 2020-07-27 12:06:28 +02:00
Github Actions b8a37ba438 [CI Skip] release/beta 1.26.0-beta.4
skip-checks: true
2020-07-27 07:22:38 +00:00
Jaco Greeff e7669c2b00 Add api typesBundle (#2422)
* Add api typesBundle

* Inject user-defined RPC from spec/chain

* Linting cleanups

* Invert check fro non-existing

* Extract bundle injection

* Ignore RPC for the first round

* CHANGELOG

* Merge master
2020-07-27 09:12:04 +02:00
Github Actions 6c309a503d [CI Skip] release/beta 1.26.0-beta.3
skip-checks: true
2020-07-27 07:02:12 +00:00
Jaco Greeff 3cf67c975a Bump deps (#2450) 2020-07-27 08:49:52 +02:00
Github Actions 077914364c [CI Skip] release/beta 1.26.0-beta.2
skip-checks: true
2020-07-25 12:15:51 +00:00
Jaco Greeff 56e4cbdb27 Update .123trigger 2020-07-25 14:03:36 +02:00
nsso 60bfdae734 support rpc import definitions (#2438)
* support import definitions

* fix lint
2020-07-25 13:53:04 +02:00
Jaco Greeff 1cf4d6b9b8 Additional typegen asserts (#2448)
* Additional typegen asserts

* typo

* Revert tuple assert

* Free-standing Vec is valid
2020-07-25 13:47:34 +02:00
Github Actions 40cd9ff51f [CI Skip] release/beta 1.26.0-beta.1
skip-checks: true
2020-07-20 18:13:14 +00:00
Jaco Greeff c7e6e40030 Voting is only free balance (#2444) 2020-07-20 20:03:26 +02:00
Github Actions 97d0bcbfd4 [CI Skip] release/beta 1.26.0-beta.0
skip-checks: true
2020-07-20 10:55:27 +00:00
Shawn Tabrizi 6ca84425d1 Update docs for accountNextIndex (#2443) 2020-07-20 12:45:01 +02:00
Github Actions 8481647d2c [CI Skip] release/stable 1.25.1
skip-checks: true
2020-07-20 07:35:42 +00:00
Jaco Greeff 658dda66a4 1.25 (#2440)
* 1.25

* Bump metadata
2020-07-20 09:25:04 +02:00
Github Actions 87f18efe72 [CI Skip] release/beta 1.25.0-beta.12
skip-checks: true
2020-07-17 12:38:05 +00:00
Jaco Greeff bcdfcce89c Bump dev 2020-07-17 14:26:19 +02:00
Github Actions 9418f1de56 [CI Skip] release/beta 1.25.0-beta.11
skip-checks: true
2020-07-17 12:15:43 +00:00
Jaco Greeff 37c8b8e592 Dev bumpd 2020-07-17 14:03:45 +02:00
Github Actions 4f8db79a40 [CI Skip] release/beta 1.25.0-beta.10
skip-checks: true
2020-07-17 10:28:46 +00:00
Jaco Greeff 54cf086a89 Update ContractExecResult (#2437) 2020-07-17 12:17:35 +02:00
Github Actions 37ddcaa32d [CI Skip] release/beta 1.25.0-beta.9
skip-checks: true
2020-07-17 09:38:57 +00:00
Jaco Greeff 6a2baf8352 Types for Polkadot purchase (#2436) 2020-07-17 11:27:21 +02:00
Github Actions ecca91dffd [CI Skip] release/beta 1.25.0-beta.8
skip-checks: true
2020-07-17 06:59:19 +00:00
Jaco Greeff 42576d74ac Bump deps (#2435) 2020-07-17 08:47:57 +02:00
Github Actions 26a6f20dbf [CI Skip] release/beta 1.25.0-beta.7
skip-checks: true
2020-07-17 06:33:03 +00:00
Chevdor c3ee8393b2 Add 'Registrar #1' as user (#2433) 2020-07-17 08:20:08 +02:00
Github Actions b6f0b9f262 [CI Skip] release/beta 1.25.0-beta.6
skip-checks: true
2020-07-15 17:25:30 +00:00
Jaco Greeff 991dc48020 Raw/Bytes toHuman() uses utf8 as available (#2431)
* Raw/Bytes toHuman() uses utf8 as available

* Rewrite yarn.lock

* Bump babel
2020-07-15 18:55:50 +02:00
Github Actions e4a82f9a1d [CI Skip] release/beta 1.25.0-beta.5
skip-checks: true
2020-07-15 08:58:08 +00:00
Jaco Greeff c8b6012553 networkstate reputation i32 (#2430) 2020-07-15 10:48:18 +02:00
Github Actions d0fe862605 [CI Skip] release/beta 1.25.0-beta.4
skip-checks: true
2020-07-14 17:14:55 +00:00
Jaco Greeff 61a0198695 Fallback for setImmediate (#2428) 2020-07-14 19:04:16 +02:00
Github Actions 345a97dc9f [CI Skip] release/beta 1.25.0-beta.3
skip-checks: true
2020-07-14 13:02:42 +00:00
Brad LarsonandBrad Larson f821ab8ecd [NEW] Support for custom headers with providers (#2423)
* [NEW] Support for custom headers with providers

This allows the user to supply arbitrary headers when constructing the
providers.

* [FIX] null -> undefined, use isChildClass

Co-authored-by: Brad Larson <brad@polychain.capital>
2020-07-14 14:49:42 +02:00
Github Actions f9e2bf332d [CI Skip] release/beta 1.25.0-beta.2
skip-checks: true
2020-07-14 08:40:25 +00:00
Jaco Greeff ad69430980 Clazz prototype fix for Linkage (#2426)
* Cleanup progress calcs for Aura

* Clazz prototype
2020-07-14 10:28:38 +02:00
Github Actions d25743016c [CI Skip] release/beta 1.25.0-beta.1
skip-checks: true
2020-07-14 08:15:18 +00:00
Jaco Greeff ee0a46adc4 Cleanup progress calcs for Aura (#2425) 2020-07-14 10:02:44 +02:00
Github Actions f516abfc3f [CI Skip] release/beta 1.25.0-beta.0
skip-checks: true
2020-07-13 18:53:28 +00:00
philipstanislaus 1a96ca5c0e Update types for centrifuge chain v1.2.0 (#2424)
* Update types for centrifuge chain v1.2.0

* Make linter happy
2020-07-13 20:41:15 +02:00
Github Actions 8c73cd7d6e [CI Skip] release/stable 1.24.1
skip-checks: true
2020-07-13 09:49:07 +00:00
Jaco Greeff 36232c0289 1.24 (#2421) 2020-07-13 11:38:47 +02:00
Github Actions 50d4e0397f [CI Skip] release/beta 1.24.0-beta.2
skip-checks: true
2020-07-10 13:28:14 +00:00
Jaco Greeff 539a8c4cb5 Types for poll module (#2418) 2020-07-10 15:17:03 +02:00
Github Actions b849976b3b [CI Skip] release/beta 1.24.0-beta.1
skip-checks: true
2020-07-08 14:35:48 +00:00
Jaco Greeff 2395401a2b Raw/Bytes isUtf8 & assert in toUtf8 (#2414) 2020-07-08 16:24:13 +02:00
Github Actions 0e1bbd5cac [CI Skip] release/beta 1.24.0-beta.0
skip-checks: true
2020-07-08 12:57:36 +00:00
Jaco Greeff e9489d41cb Raw isAscii & toUtf8 (#2413)
* Raw isAscii & toUtf8

* Tests for isAscii & toUtf8

* Cleanup return types
2020-07-08 14:46:12 +02:00
Github Actions 63483b9db7 [CI Skip] release/stable 1.23.1
skip-checks: true
2020-07-06 05:45:32 +00:00
Jaco Greeff b26c7f9f0a 1.23.1 (ith version bump) 2020-07-06 07:31:36 +02:00
Github Actions a165c9375c [CI Skip] release/beta 1.23.0-beta.7
skip-checks: true
2020-07-06 05:27:04 +00:00
Jaco Greeff 28631f7180 1.23 (#2411) 2020-07-06 07:15:07 +02:00
Github Actions 6489251b47 [CI Skip] release/beta 1.23.0-beta.6
skip-checks: true
2020-07-03 15:34:13 +00:00
Jaco Greeff 66884febea Add OpaqueCall type (#2408) 2020-07-03 17:22:02 +02:00
Github Actions 8058dc350f [CI Skip] release/beta 1.23.0-beta.5
skip-checks: true
2020-07-03 10:05:48 +00:00
Jaco Greeff 63096cc238 Remove unneeded base extends (#2407)
* Remove unneeded base extends

* CHANGELOG

* Result with value on enum
2020-07-03 11:55:39 +02:00
Github Actions 05600c0cd0 [CI Skip] release/beta 1.23.0-beta.4
skip-checks: true
2020-07-03 09:46:07 +00:00
Jaco Greeff eed5e23e65 Validate number sign in AbstractInt (#2406) 2020-07-03 11:33:30 +02:00
Github Actions cdf5b15673 [CI Skip] release/beta 1.23.0-beta.3
skip-checks: true
2020-07-02 05:27:15 +00:00
Jaco Greeff 1922676bd7 Bump deps (#2404) 2020-07-02 07:14:08 +02:00
Github Actions b6c427e985 [CI Skip] release/beta 1.23.0-beta.2
skip-checks: true
2020-07-01 15:55:54 +00:00
Jaco Greeff 0327aedf8e Update ProxyType for Kusama, Polkadot & Westend (#2403)
* Update ProxyType fro Kusama, Polkadot & Westend

* CHANGELOG
2020-07-01 17:42:22 +02:00
Github Actions d7035cebb1 [CI Skip] release/beta 1.23.0-beta.1
skip-checks: true
2020-07-01 11:51:42 +00:00
Daniel Maricic 8b492021af Fixed typo in README (#2402) 2020-07-01 13:39:07 +02:00
Github Actions 6a01fc7c8c [CI Skip] release/beta 1.23.0-beta.0
skip-checks: true
2020-07-01 05:58:34 +00:00
Jaco Greeff bbc30ec9dc Cross-referencing type failure (#2400)
* Cross-referencing type failure

* typo

* Adjust toRawType() with name from registry

* Rewrite yarn.lock

* Adjustments

* Test adjustments
2020-07-01 07:47:21 +02:00
Github Actions f07c0628bc [CI Skip] release/stable 1.22.1
skip-checks: true
2020-06-30 08:04:08 +00:00
Jaco Greeff 023c7588e5 1.22 (#2399)
* 1.22

* CHANGELOG for OpenTip
2020-06-30 09:52:42 +02:00
Jaco Greeff 7dfc8625cc New OpenTip structure (#2394)
* New OpenTip structure

* Kusama update
2020-06-29 16:20:43 +02:00
Github Actions 8643b5da87 [CI Skip] release/beta 1.22.0-beta.5
skip-checks: true
2020-06-29 07:03:10 +00:00
Jaco Greeff afa0e63ae8 CHANGELOG & Bumps (#2397)
* CHANGELOG & Bumps

* Rewrite yarn.lock
2020-06-29 08:52:12 +02:00
Github Actions 534303ff45 [CI Skip] release/beta 1.22.0-beta.4
skip-checks: true
2020-06-28 14:18:29 +00:00
Jaco Greeff f1ebcddec6 Adjust for vesting via locks (#2396) 2020-06-28 16:08:02 +02:00
Github Actions 657a2006dd [CI Skip] release/beta 1.22.0-beta.3
skip-checks: true
2020-06-24 19:02:00 +00:00
Jaco Greeff 219e928c01 Retried staker rewards for specified eras (#2392) 2020-06-24 20:52:21 +02:00
Github Actions 43183118d5 [CI Skip] release/beta 1.22.0-beta.2
skip-checks: true
2020-06-24 10:43:10 +00:00
Alexander Krupenkin 76e15d465d Add [u8; 33] type width for U8aFixed type (#2391)
ECDSA compressed public key has 33-byte length, this is required for encoding public key as a parameter.
2020-06-24 12:31:55 +02:00
Github Actions 4c0387e1a3 [CI Skip] release/beta 1.22.0-beta.1
skip-checks: true
2020-06-23 20:31:15 +00:00
Jaco Greeff bbbd82eb4a Move indices cache to indices list (#2390) 2020-06-23 22:19:13 +02:00
Github Actions a34a7450aa [CI Skip] release/beta 1.22.0-beta.0
skip-checks: true
2020-06-23 18:38:54 +00:00
Jaco Greeff bf472fdcf4 Optimize accountId -> accountIndex lookups (#2389) 2020-06-23 20:25:58 +02:00
Github Actions f428a58006 [CI Skip] release/stable 1.21.1
skip-checks: true
2020-06-23 16:12:18 +00:00
Jaco Greeff fcce2ab340 1.21 (#2384)
* 1.21

* CHANGELOG

* Babe EquivocationProof

* Update CHANGELOG.md
2020-06-23 18:01:47 +02:00
Jaco Greeff 877eb11717 Swap releases type to shared enum (#2388)
* Swap releases type to u8

* Shared enum for releases

* Update metadata for new names
2020-06-23 17:40:15 +02:00
Jaco Greeff 4b55f1be93 Babe Equivocation (#2374)
* Babe Equivocation

* metadata field rename to GrandpaEquivocationProof
2020-06-23 16:46:26 +02:00
Github Actions f2a677634e [CI Skip] release/beta 1.21.0-beta.4
skip-checks: true
2020-06-23 13:18:12 +00:00
Jaco Greeff eea4c8775e Use setImmediate for unsubscribe (allow outer resolve) (#2385) 2020-06-23 15:06:08 +02:00
Github Actions 792bf0ec36 [CI Skip] release/beta 1.21.0-beta.3
skip-checks: true
2020-06-23 12:20:27 +00:00
Jaco Greeff e3d13107a9 Add support for CheckMortality extension (#2383) 2020-06-23 14:08:40 +02:00
Jaco Greeff e5c2c6a228 Use BN in-place operators as appropriate (#2381)
* Use BN in-place operators as appropriate

* CHANGELOG
2020-06-23 14:02:54 +02:00
Github Actions d2be79132c [CI Skip] release/beta 1.21.0-beta.2
skip-checks: true
2020-06-23 11:59:30 +00:00
Jaco Greeff 76da2638c1 Ensure subscriptions always unsubscribe as required (#2380)
* Ensure single-shot calls always unsubscribe

* memo/refCount cleanups

* Fix unsubscriptions

* Cleanup linting types

* CHANGELOG
2020-06-23 13:47:28 +02:00
Github Actions daf3912920 [CI Skip] release/beta 1.21.0-beta.1
skip-checks: true
2020-06-23 09:17:57 +00:00
Jaco Greeff 6dfebbb9fe Fixup subscriptions for promise (w/ callback) (#2379)
* Fixup subscriptions for promise (w/ callback)

* Update packages/api/src/base/Decorate.ts
2020-06-23 11:05:51 +02:00
Github Actions e55c5f77f7 [CI Skip] release/beta 1.21.0-beta.0
skip-checks: true
2020-06-23 07:41:54 +00:00
Jaco Greeff c7315ffb74 Do not use subscriptions on single subs (#2378)
* Do not use subscriptions on single subs

* Apply suggestions from code review
2020-06-23 09:29:49 +02:00
Github Actions 84eb806f07 [CI Skip] release/stable 1.20.1
skip-checks: true
2020-06-22 14:20:44 +00:00
Jaco Greeff 2493442a2e 1.20 (#2377)
* 1.20

* Indicate @polkadot/util bump
2020-06-22 16:08:22 +02:00
Github Actions 77df7907c7 [CI Skip] release/beta 1.20.0-beta.9
skip-checks: true
2020-06-22 13:42:01 +00:00
Jaco Greeff f1b6268784 Bump metadata (#2376) 2020-06-22 15:31:27 +02:00
Github Actions 9aa9380251 [CI Skip] release/beta 1.20.0-beta.8
skip-checks: true
2020-06-22 08:22:33 +00:00
Jaco Greeff b4306cb60a Bump metadata (#2373) 2020-06-22 10:12:01 +02:00
Github Actions 1e83daf797 [CI Skip] release/beta 1.20.0-beta.7
skip-checks: true
2020-06-21 11:26:27 +00:00
Jaco Greeff d46d32d9bc Optimize query/queryMulti retrievals (#2371)
* Optimize query/queryMulti retrievals

* Current retrieval on a batch basis

* Dedup staking.account/accounts internally
2020-06-21 13:13:38 +02:00
Github Actions 032a0a595c [CI Skip] release/beta 1.20.0-beta.6
skip-checks: true
2020-06-21 08:09:28 +00:00
Jaco Greeff 34101ec12b Adjust with queryMulti as applicable (#2370) 2020-06-21 09:56:02 +02:00
Github Actions 4e02b982d3 [CI Skip] release/beta 1.20.0-beta.5
skip-checks: true
2020-06-20 18:12:10 +00:00
Jaco Greeff 5b96d52fa6 Adjust for zero-length combines (#2369) 2020-06-20 20:00:01 +02:00
Github Actions 735f2b835e [CI Skip] release/beta 1.20.0-beta.4
skip-checks: true
2020-06-20 13:42:40 +00:00
Jaco Greeff 646e64c286 Add derive.staking.waitingInfo (#2367)
* Add derive.staking.waitingInfo

* Small optimizations

* Updated
2020-06-20 15:30:48 +02:00
Github Actions fc9060caa8 [CI Skip] release/beta 1.20.0-beta.3
skip-checks: true
2020-06-19 12:04:34 +00:00
Jaco Greeff 503c2b3c63 Add transactionPayment release type (#2366) 2020-06-19 13:51:40 +02:00
Github Actions 168abc130f [CI Skip] release/beta 1.20.0-beta.2
skip-checks: true
2020-06-18 08:28:13 +00:00
Jaco Greeff 5c5db2709b Add system_dryRun RPCs (#2363)
* Add system_dryRun RPCs

* CHANGELOG
2020-06-18 10:15:41 +02:00
Github Actions 5a4ff5420f [CI Skip] release/beta 1.20.0-beta.1
skip-checks: true
2020-06-18 08:04:22 +00:00
Jaco Greeff a1655508ba Cleanups in API typing (& overrides) (#2362)
* Cleanups in API typing (& overrides)

* Less magic "as" overrides
2020-06-18 09:52:39 +02:00
Github Actions 64827a6114 [CI Skip] release/beta 1.20.0-beta.0
skip-checks: true
2020-06-17 22:18:49 +00:00
Jaco Greeff 2eb09374bc Map entries/keys cleanups (#2360) 2020-06-18 00:06:19 +02:00
Github Actions ddf67d5564 [CI Skip] release/stable 1.19.1
skip-checks: true
2020-06-16 06:47:45 +00:00
Jaco Greeff ad6b8280a2 1.19 (#2354)
* Bump deps

* 1.19

* Update CHANGELOG.md

* Freshen Substrate metadata
2020-06-16 08:34:19 +02:00
Github Actions 682c6b6fb2 [CI Skip] release/beta 1.19.0-beta.3
skip-checks: true
2020-06-12 21:28:49 +00:00
Jaco Greeff 6a281211b4 Bump metadata, allow type alias on events (#2351)
* Bump metadata, allow type alias on events

* Update packages/api/src/submittable/createClass.ts

* Update packages/metadata/src/Metadata/v11/static-substrate.json

* Fresh, no config changes
2020-06-12 23:15:50 +02:00
Github Actions 6ef94b3c3b [CI Skip] release/beta 1.19.0-beta.2
skip-checks: true
2020-06-12 16:31:41 +00:00
Jeremías Díaz e900d1d657 impovement: better typing of entries related funcs (#2346)
* impovement: better typing of entries related funcs

* refactor: remove duplicate definition
2020-06-12 18:19:55 +02:00
Github Actions 7f1a3fa636 [CI Skip] release/beta 1.19.0-beta.1
skip-checks: true
2020-06-11 07:00:42 +00:00
Jaco Greeff 21802664b8 Metadata bump (#2348) 2020-06-11 08:48:52 +02:00
Github Actions 1492df11a7 [CI Skip] release/beta 1.19.0-beta.0
skip-checks: true
2020-06-10 11:13:46 +00:00
Jaco Greeff 00fed90da2 Update parachain types (#2344) 2020-06-10 13:00:10 +02:00
Github Actions e6beb6554d [CI Skip] release/stable 1.18.1
skip-checks: true
2020-06-08 15:53:39 +00:00
Jaco Greeff 099cf5a351 1.18 (#2340)
* 1.18

* Polkadot ProxyType
2020-06-08 17:39:12 +02:00
Github Actions 55e762a348 [CI Skip] release/beta 1.18.0-beta.10
skip-checks: true
2020-06-08 13:43:22 +00:00
Jaco Greeff 0ad146c607 Adjust ProxyType for Westend (#2339) 2020-06-08 15:30:51 +02:00
Github Actions 4e7f3f5268 [CI Skip] release/beta 1.18.0-beta.9
skip-checks: true
2020-06-08 08:02:24 +00:00
Jeremías DíazandJaco Greeff 6a9e3d80f1 feat: add external pagination support (#2325)
* feat: add external pagination support

* Ordering, no functionality changes

* fix: use correct assertion condition

Also moved the PaginationOptions type to the base types file

* Apply suggestions from code review

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-06-08 09:49:53 +02:00
Github Actions dee98fae55 [CI Skip] release/beta 1.18.0-beta.8
skip-checks: true
2020-06-08 05:59:44 +00:00
Xiliang Chen ff52876920 allow Option in enum & Result type (#2336) 2020-06-08 07:45:22 +02:00
Github Actions 4d01a09c54 [CI Skip] release/beta 1.18.0-beta.7
skip-checks: true
2020-06-07 17:27:50 +00:00
Jaco Greeff 7310ea825e Allow for string subids (#2335) 2020-06-07 19:16:16 +02:00
Github Actions 15b80a47c3 [CI Skip] release/beta 1.18.0-beta.6
skip-checks: true
2020-06-07 13:02:15 +00:00
Jaco Greeff 622682b4ef npos-election ElectionScore type (#2334) 2020-06-07 14:50:25 +02:00
Github Actions 56415df4ab [CI Skip] release/beta 1.18.0-beta.5
skip-checks: true
2020-06-06 06:53:17 +00:00
Jaco Greeff 8bea5e5a3b Align Call section/method field names (#2332) 2020-06-06 08:40:41 +02:00
Github Actions d6372ade44 [CI Skip] release/beta 1.18.0-beta.4
skip-checks: true
2020-06-05 20:32:29 +00:00
Jaco Greeff f501994df8 Bump deps (#2333) 2020-06-05 22:20:32 +02:00
Github Actions b787a7d5a0 [CI Skip] release/beta 1.18.0-beta.3
skip-checks: true
2020-06-03 20:20:42 +00:00
Gerben van de Wiel 11d162a10d Adding some extra notes on changes in the specname (#2329) 2020-06-03 22:08:06 +02:00
Github Actions e2564dea17 [CI Skip] release/beta 1.18.0-beta.2
skip-checks: true
2020-06-03 13:40:22 +00:00
Jaco Greeff 2b9152871e Add ProxyType (#2327) 2020-06-03 15:27:11 +02:00
Github Actions 70ecb03d14 [CI Skip] release/beta 1.18.0-beta.1
skip-checks: true
2020-06-03 05:46:05 +00:00
djuanito.eth a2f179acb1 Update fees to current constants (#2320)
* Update fees to current constants

* Reorder args on map()

* Fixed incorrect order of args on map()
2020-06-03 07:34:03 +02:00
Jaco Greeff c8cb97edef beta 0 reset 2020-06-03 07:33:27 +02:00
Github Actions 69d344c6c3 [CI Skip] release/stable 1.17.2
skip-checks: true
2020-06-02 15:26:46 +00:00
Jaco Greeff 44cdf49b2c Resolve first result after unsub promise (via setImmediate) (#2324) 2020-06-02 17:14:29 +02:00
Github Actions daaf4654a1 [CI Skip] release/stable 1.17.1
skip-checks: true
2020-06-02 12:26:21 +00:00
Jaco Greeff f8d4fcaf04 1.17 (#2323) 2020-06-02 14:15:27 +02:00
Github Actions eb19a39d82 [CI Skip] release/beta 1.17.0-beta.8
skip-checks: true
2020-06-02 10:50:47 +00:00
Jaco Greeff 7ed958fb2d Metadata bump (#2322)
* Metadata bump

* yarn.lock

* var requires
2020-06-02 12:39:48 +02:00
Github Actions bbe9b94f26 [CI Skip] release/beta 1.17.0-beta.7
skip-checks: true
2020-06-02 09:17:06 +00:00
Jaco Greeff 6e83e6aaef Adjust call-only metadata output (#2321) 2020-06-02 11:03:34 +02:00
Github Actions 1545bbf7c5 [CI Skip] release/beta 1.17.0-beta.6
skip-checks: true
2020-05-31 11:18:45 +00:00
Jaco Greeff 5bfc2cd534 Protect against div-by-zero (#2319)
* Protect against div-by-zero

* Rewrite
2020-05-31 13:07:42 +02:00
Github Actions b22d0a196f [CI Skip] 1.17.0-beta.5
skip-checks: true
2020-05-28 11:23:47 +00:00
Jaco Greeff b174864804 Adjust own cache key (per accountId) (#2317) 2020-05-28 13:12:27 +02:00
Github Actions e6834d60c5 [CI Skip] 1.17.0-beta.4
skip-checks: true
2020-05-28 10:54:39 +00:00
Jaco Greeff 97438bb2e8 Small combineLatest -> queryMulti opts (#2316)
* Small combineLatest -> queryMulti opts

* Update packages/api-derive/src/staking/ownSlashes.ts
2020-05-28 12:43:02 +02:00
Github Actions f630d43a25 [CI Skip] 1.17.0-beta.3
skip-checks: true
2020-05-28 10:19:44 +00:00
Jaco Greeff 0187f1ff19 Extend deriveCache around ownExposure/ownSlash (#2315) 2020-05-28 12:07:02 +02:00
Github Actions d8db866316 [CI Skip] 1.17.0-beta.2
skip-checks: true
2020-05-28 09:55:46 +00:00
Jaco Greeff 28aa9e18a7 Bump deps (#2314) 2020-05-28 11:43:45 +02:00
Github Actions 3eaea97b8f [CI Skip] 1.17.0-beta.1
skip-checks: true
2020-05-28 08:55:06 +00:00
Jaco Greeff ea0e5e4547 BTreeSet decoding from Array (#2313) 2020-05-28 10:42:46 +02:00
Github Actions 1256317b65 [CI Skip] 1.17.0-beta.0
skip-checks: true
2020-05-27 17:42:13 +00:00
Jaco Greeff e0c3ed1b96 Fix ElectionSize type (#2312) 2020-05-27 19:29:13 +02:00
Github Actions 9f2c3016d7 [CI Skip] 1.16.1
skip-checks: true
2020-05-26 15:03:50 +00:00
Jaco Greeff 938ace2342 1.16 (#2310) 2020-05-26 16:51:10 +02:00
Github Actions e5d2607dff [CI Skip] 1.16.0-beta.6
skip-checks: true
2020-05-26 12:58:13 +00:00
Jaco Greeff 50b8db2263 Update with new Babe digests (#2309)
* Update with new Babe digests

* Naming cleanups
2020-05-26 14:46:06 +02:00
Github Actions 91766a6885 [CI Skip] 1.16.0-beta.5
skip-checks: true
2020-05-26 12:02:14 +00:00
Jaco Greeff 4b1a9ab9e1 Perbill/Permill toHuman as percentage (#2307)
* Perbill/Permill toHuman as percentage

* Expectation to percentage
2020-05-26 13:51:05 +02:00
Github Actions 9a14c65336 [CI Skip] 1.16.0-beta.4
skip-checks: true
2020-05-26 07:30:37 +00:00
Jaco Greeff 4aa66fd4c6 Adjust Polkadot spec version/types (#2306)
* Adjust Polkadot spec version/types

* CHANGELOG
2020-05-26 09:20:15 +02:00
Github Actions 3d9c62d538 [CI Skip] 1.16.0-beta.3
skip-checks: true
2020-05-25 06:31:48 +00:00
Jaco Greeff 4156eb44ab Bump metadata (#2305)
* Bump metadata

* Rewrite yarn.lock
2020-05-25 08:20:45 +02:00
Github Actions 4b2d33693c [CI Skip] 1.16.0-beta.2
skip-checks: true
2020-05-24 16:49:59 +00:00
Jaco Greeff e8b127e177 Adjust sign options (#2304) 2020-05-24 18:40:39 +02:00
Github Actions b052b03f31 [CI Skip] 1.16.0-beta.1
skip-checks: true
2020-05-24 14:41:32 +00:00
Amaury Martiny 6727e12468 StatementKind: Regular and Saft (#2303) 2020-05-24 16:30:12 +02:00
Github Actions c130285651 [CI Skip] 1.16.0-beta.0
skip-checks: true
2020-05-24 07:36:17 +00:00
Jaco Greeff 47fc4a2b3c Bump deps w/ eslint (#2302)
* Bump deps w/ eslint

* Additional cleanups

* Additional

* @polkadot/types done

* Additional

* @polkadot/typegen done

* Additional

* @polkadot/rpc-core done

* Additional

* Additional

* Additional

* docs

* @polkadot/api-derive done

* @polkadot/api done

* @polkadot/api-contracts done

* Update tests
2020-05-24 09:24:45 +02:00
Github Actions 97cb408f36 [CI Skip] 1.15.1
skip-checks: true
2020-05-23 09:35:31 +00:00
Jaco Greeff dde7c8085a 1.15 (#2301) 2020-05-23 11:26:05 +02:00
Github Actions 8b02fafb99 [CI Skip] 1.15.0-beta.9
skip-checks: true
2020-05-23 09:05:12 +00:00
Jaco Greeff 393f46ba4a Bump metadata (#2300) 2020-05-23 10:54:28 +02:00
455f5ad834 Allow keyPrefix to accept an additional argument for double maps (#2230)
* Allow keyPrefix to accept an additional argument for double maps

* Make key creators accept an optional parameter for key construction

* Remove .only from a test case

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>

* Cache prefix key when no arguments are supplied

* Address review comments

* Update packages/metadata/src/Decorated/storage/fromMetadata/createFunction.spec.ts

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-05-23 10:51:38 +02:00
Github Actions 674324e7f9 [CI Skip] 1.15.0-beta.8
skip-checks: true
2020-05-21 09:08:13 +00:00
Jaco Greeff b0dc7cf451 Bump metadata (#2297)
* Bump metadata

* Deps

* Regen

* Update sig for new signed extensions
2020-05-21 10:56:56 +02:00
Github Actions cbe1b2b1ce [CI Skip] 1.15.0-beta.7
skip-checks: true
2020-05-20 22:08:39 +00:00
Dan Forbes 4bd2f2fc32 Add WeightToFeeCoefficient type (#2296)
Added to support paritytech/substrate#6076
2020-05-20 23:56:04 +02:00
Github Actions 053112470d [CI Skip] 1.15.0-beta.6
skip-checks: true
2020-05-19 14:38:35 +00:00
Joshy Orndorff acdf27a272 spelling; efect -> effect (#2295) 2020-05-19 16:15:58 +02:00
Github Actions f70b32ba76 [CI Skip] 1.15.0-beta.5
skip-checks: true
2020-05-19 08:41:46 +00:00
Jaco Greeff 67a3376ef8 POC for a rough derive cache (#2293)
* POC for a rough derive cache

* With expiry

* Cache cleanups

* Memory cache

* Small cleanups
2020-05-19 10:29:40 +02:00
Github Actions eb06bb6e93 [CI Skip] 1.15.0-beta.4
skip-checks: true
2020-05-19 05:42:16 +00:00
Paweł Nguyen f8f7e92da4 Fix a minor typo in cookbook blocks docs (#2294) 2020-05-19 07:29:27 +02:00
Github Actions d0fd3eca25 [CI Skip] 1.15.0-beta.3
skip-checks: true
2020-05-18 08:32:29 +00:00
Jaco Greeff dac1df35de stakerRewards filters, re-org (#2292) 2020-05-18 10:20:09 +02:00
Github Actions 597563d2bb [CI Skip] 1.15.0-beta.2
skip-checks: true
2020-05-16 12:04:58 +00:00
Jaco Greeff f825c7f187 Fixed128 -> Fixed64 in old versions 2020-05-16 13:54:36 +02:00
Jaco Greeff 2e71a6160e Multiplier -> Fixed128 (#2290) 2020-05-16 13:52:56 +02:00
Github Actions c076c37119 [CI Skip] 1.15.0-beta.1
skip-checks: true
2020-05-16 06:49:21 +00:00
Amaury Martiny 0e18fdbccc Add transactionVersion to ExtrinsicPayload (#2287) 2020-05-16 08:37:29 +02:00
Github Actions c3eebd8fbe [CI Skip] 1.15.0-beta.0
skip-checks: true
2020-05-15 11:46:27 +00:00
Jaco Greeff 45786b31da Bump deps (#2286)
* Bump deps

* Linting cleanups
2020-05-15 13:35:15 +02:00
Github Actions f348e34de7 [CI Skip] 1.14.1
skip-checks: true
2020-05-14 14:02:15 +00:00
Jaco Greeff 337de79bef 1.14 (#2281) 2020-05-14 15:51:48 +02:00
Github Actions a13b51b985 [CI Skip] 1.14.0-beta.20
skip-checks: true
2020-05-14 06:17:01 +00:00
Jaco Greeff c5c77c9b52 Bump deps (#2280) 2020-05-14 08:05:15 +02:00
Drew StoneandJaco Greeff 2a033e5634 Update evm definitions to include vicinity (#2279)
* Update definitions.ts

* Update packages/types/src/interfaces/evm/definitions.ts

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-05-14 07:51:29 +02:00
Github Actions 00ffb358cb [CI Skip] 1.14.0-beta.19
skip-checks: true
2020-05-13 16:07:57 +00:00
Jaco Greeff 66d1bbe4cb Don't re-calculate extinsic hash (status updates) (#2277) 2020-05-13 17:56:26 +02:00
Github Actions 3baf36e9e6 [CI Skip] 1.14.0-beta.18
skip-checks: true
2020-05-13 07:44:25 +00:00
Jaco Greeff e3abb95111 Bump metadata (#2276) 2020-05-13 09:32:26 +02:00
Github Actions da281c9531 [CI Skip] 1.14.0-beta.17
skip-checks: true
2020-05-13 06:59:03 +00:00
Jaco Greeff c0e3026772 Add signedExtensions to SignerPayload (#2275) 2020-05-13 08:49:31 +02:00
Github Actions 757da68675 [CI Skip] 1.14.0-beta.16
skip-checks: true
2020-05-12 21:27:47 +00:00
Jaco Greeff f145488314 Add StatementKind & PrevalidateAttests for Polkadot claims (#2273)
* Add StatementKind for Polkadot claims

* PrevalidateAttests extension
2020-05-12 23:14:32 +02:00
Github Actions 0ce10d2938 [CI Skip] 1.14.0-beta.15
skip-checks: true
2020-05-12 20:58:34 +00:00
Jaco Greeff 6f2d62bb3b Cater for old/new style DepositOf tuples (#2272)
* Cater for old/new style DepositOf tuples

* Remove unused api on parse
2020-05-12 22:45:53 +02:00
Github Actions fc7c8310ae [CI Skip] 1.14.0-beta.14
skip-checks: true
2020-05-12 20:16:47 +00:00
Jaco Greeff c9921f002f Cater for Check{Spec, Tx}Version extensions (#2270)
* Cater for Check{Spec, Tx}Version extensions

* Fix tests
2020-05-12 22:03:20 +02:00
Github Actions 6b8a65eb31 [CI Skip] 1.14.0-beta.13
skip-checks: true
2020-05-12 19:09:51 +00:00
Jaco Greeff 0cf29719b3 Fix ProxyState type (#2269)
* Fix ProxyState type

* Generate
2020-05-12 20:58:40 +02:00
Github Actions abecabdaed [CI Skip] 1.14.0-beta.12
skip-checks: true
2020-05-12 18:31:46 +00:00
Jaco Greeff 0c5b69bea1 Extra signedExtensions retrieved via specVersion (#2268)
* Extra signedExtensions retrieved via  specVersion

* Fix tests
2020-05-12 20:20:24 +02:00
Github Actions 7b3f24b1f5 [CI Skip] 1.14.0-beta.11
skip-checks: true
2020-05-12 16:43:19 +00:00
Jaco Greeff d1f8f8b5e8 Extend SignerPayload with extra tx/extensions (#2267)
* Extend SignerPayload with extra tx/extensions

* Update registry.ts

* Update extrinsic.ts

* Linting options
2020-05-12 18:32:18 +02:00
Github Actions 3f060b9e0d [CI Skip] 1.14.0-beta.10
skip-checks: true
2020-05-12 15:00:09 +00:00
Jaco Greeff fe69f70539 DispatchInfo paysFee to Pays enum (#2266)
* DispatchInfo paysFee to Pays enum

* Update Kusama types
2020-05-12 16:46:07 +02:00
Github Actions 578c4ffb69 [CI Skip] 1.14.0-beta.9
skip-checks: true
2020-05-12 09:56:51 +00:00
Jaco Greeff 66aa38000b Derive for democracy locks (#2264)
* Derive for democracy locks

* Cater for old referendums

* Split lock parsing
2020-05-12 11:44:54 +02:00
Github Actions 50ddff6907 [CI Skip] 1.14.0-beta.8
skip-checks: true
2020-05-11 16:16:49 +00:00
Paweł Nguyen 14874f41f7 Fix a typo in Query docs - freee -> free (#2263)
This fixes a typo in Query Subscriptions with params docs. `freee` -> `free`
2020-05-11 18:05:43 +02:00
Github Actions 5a11b0c701 [CI Skip] 1.14.0-beta.7
skip-checks: true
2020-05-11 12:56:11 +00:00
Jaco Greeff 8491ab8ca6 import type BN (as applicable) (#2262) 2020-05-11 14:45:14 +02:00
Github Actions 4f5cb0f35e [CI Skip] 1.14.0-beta.6
skip-checks: true
2020-05-11 10:14:17 +00:00
Jaco Greeff 53d081df65 Bump berry (#2261) 2020-05-11 12:02:05 +02:00
Github Actions 6b5dbb6948 [CI Skip] 1.14.0-beta.5
skip-checks: true
2020-05-11 08:29:29 +00:00
Jaco Greeff 3879986a75 Bump common (#2260) 2020-05-11 10:20:21 +02:00
Github Actions 378ca10580 [CI Skip] 1.14.0-beta.4
skip-checks: true
2020-05-11 07:05:13 +00:00
Jaco Greeff d75d8bec0e Additional mortal era tests (#2259)
* Additional moratl era tests

* birth !== current (output the same)
2020-05-11 08:53:05 +02:00
Github Actions 6f6a32a7a2 [CI Skip] 1.14.0-beta.3
skip-checks: true
2020-05-08 09:59:57 +00:00
Jaco Greeff 226426e67e Add older heartbeats struct (#2255) 2020-05-08 11:50:18 +02:00
Github Actions 66e2a4d298 [CI Skip] 1.14.0-beta.2
skip-checks: true
2020-05-08 08:41:41 +00:00
Arjan Zijderveld 664151f829 Added validatorsLen to Heartbeat struct (#2254) 2020-05-08 10:31:04 +02:00
Github Actions 49b00524b1 [CI Skip] 1.14.0-beta.1
skip-checks: true
2020-05-07 07:17:07 +00:00
Jaco Greeff 401784b7e6 Historic queries FAQ (#2253) 2020-05-07 09:05:51 +02:00
Github Actions 99873e901a [CI Skip] 1.14.0-beta.0
skip-checks: true
2020-05-07 07:02:00 +00:00
Jaco Greeff 72d131f62f Ensure metadata is only retrieved once on startup (#2252)
* Ensure metadata is only retrieved once on startup

* Ensure we set rx.runtimeVersion
2020-05-07 08:50:36 +02:00
Github Actions c412f7fa11 [CI Skip] 1.13.1
skip-checks: true
2020-05-06 18:33:13 +00:00
Jaco Greeff a1ad90c2b4 1.13 (#2248)
* 1.13

* Add grandpa_roundState RPC

* RPC interfaces
2020-05-06 20:22:18 +02:00
Github Actions 92f62bfa15 [CI Skip] 1.13.0-beta.19
skip-checks: true
2020-05-06 16:48:28 +00:00
Jaco Greeff fa9c5778be Adjust Centrifuge versions (#2247) 2020-05-06 18:37:44 +02:00
Github Actions e6f877621a [CI Skip] 1.13.0-beta.18
skip-checks: true
2020-05-06 15:22:36 +00:00
Jaco Greeff 5c35a70e9d Centrifuge Chain Node (#2246) 2020-05-06 17:11:33 +02:00
Github Actions a287096cc3 [CI Skip] 1.13.0-beta.17
skip-checks: true
2020-05-06 13:47:59 +00:00
Jaco Greeff c35f31bfbd Adjust mock timeouts (#2244)
* Adjust mock timeouts

* Play with timeouts some more...

* Ooops, overzealous search-and-replace
2020-05-06 15:36:20 +02:00
Jaco Greeff 718afa91e3 Multiple endpoints CHANGELOG (#2243) 2020-05-06 15:10:37 +02:00
Hoani BrysonandJaco Greeff 102a06b0f2 Multiple Endpoint support for WsProvider (#2234)
* Fix incorrect ws connect test cases

* Make endpoint an array of endpoints

* Add requirement that WsProvider endpoint arrays must not be empty

* Simple endpoint increment

* Add multi-endpoint test for endpoint closing its connection

* Implement endpoint round robin

* Revert change to mock's TEST_WS_URL

* Address Lint errors

* Change endpoint variable to plural in WsProvider

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* Review corrections to WsProvider

* Grouping improvement in WsProvider connect

* Correct endpoint logging to only show the specific endpoint involved

* Correct ordering of endpoint increment on connect

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-05-06 14:42:30 +02:00
Github Actions 58f0df1ef0 [CI Skip] 1.13.0-beta.16
skip-checks: true
2020-05-06 12:08:40 +00:00
Jaco Greeff a458589222 Fix CompactAssignment decoding (#2242)
* Fix CompactAssignment decoding

* CHANGELOG
2020-05-06 13:56:17 +02:00
Github Actions deef4ce4c7 [CI Skip] 1.13.0-beta.15
skip-checks: true
2020-05-06 08:36:29 +00:00
Jaco Greeff f5d2449407 Grandpa Equivocation types (#2239)
* Grandpa Equivocation types

* typo
2020-05-06 10:25:37 +02:00
Github Actions 8bb1d1259e [CI Skip] 1.13.0-beta.14
skip-checks: true
2020-05-06 08:23:10 +00:00
Jaco Greeff abd860d548 Bump deps (#2240)
* Bump deps

* Jest revert
2020-05-06 10:11:58 +02:00
Github Actions 25936d882f [CI Skip] 1.13.0-beta.13
skip-checks: true
2020-05-06 06:29:54 +00:00
Keith YeungandJaco Greeff 9deaff54e4 Make the 2nd argument to SubmittableExtrinsic.sign/signAsync optional (#2238)
* Make the 2nd argument to SubmittableExtrinsic.sign/signAsync optional

* Use default argument for optionsOrNonce

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-05-06 08:17:51 +02:00
Github Actions bc479a995b [CI Skip] 1.13.0-beta.12
skip-checks: true
2020-05-05 09:44:03 +00:00
Jaco Greeff 458b7fa7e4 Update with latest Substrate metadata (#2233) 2020-05-05 11:33:04 +02:00
Github Actions 2fc17a66e1 [CI Skip] 1.13.0-beta.11
skip-checks: true
2020-05-05 05:26:31 +00:00
codingsh 94f81db568 #2182 - add: search for docs (#2232) 2020-05-05 07:16:39 +02:00
Github Actions e83d97c849 [CI Skip] 1.13.0-beta.10
skip-checks: true
2020-05-05 05:09:33 +00:00
Joshy Orndorff 4a497fa970 minor typo: RC -> RPC (#2229) 2020-05-05 06:58:52 +02:00
Github Actions cb40d459b5 [CI Skip] 1.13.0-beta.9
skip-checks: true
2020-05-04 18:40:00 +00:00
Jaco Greeff c70cdb351f Additional modules/methods in RPC samples 2020-05-04 20:29:02 +02:00
Github Actions 001aa0d011 [CI Skip] 1.13.0-beta.8
skip-checks: true
2020-05-04 15:58:01 +00:00
Jaco Greeff 961d27ad46 Update CHANGELOG.md 2020-05-04 17:47:09 +02:00
Github Actions 1c09bb69dd [CI Skip] 1.13.0-beta.7
skip-checks: true
2020-05-04 13:32:30 +00:00
Xiliang ChenandJaco Greeff 174510a928 use handlebars for code generation (#2228)
* use handlebars for code generation

* update docs

* fix isStrict

* fix lint

* Apply suggestions from code review

Co-authored-by: Jaco Greeff <jacogr@gmail.com>

* convert consts

* keep empty lines in doc comments

* update rpc

* update tx

* update interfaceRegistry

* update tsDef

* remove no longer used code

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-05-04 15:21:09 +02:00
Github Actions 39ed76f2de [CI Skip] 1.13.0-beta.6
skip-checks: true
2020-05-04 12:20:51 +00:00
Jaco Greeff 7d1c93db59 Update CHANGELOG.md 2020-05-04 14:08:18 +02:00
Github Actions e9b1b4ee77 [CI Skip] 1.13.0-beta.5
skip-checks: true
2020-05-01 19:11:49 +00:00
Jaco Greeff 2367978f6e Remove polkadot metadata (not mainatained, outdated) (#2227) 2020-05-01 21:01:08 +02:00
Github Actions e77050b9f5 [CI Skip] 1.13.0-beta.4
skip-checks: true
2020-04-30 13:24:43 +00:00
Jaco Greeff 844d1a2928 Allow failures on preimage (instead of swallow) (#2225) 2020-04-30 15:14:56 +02:00
Github Actions 6a70beda0f [CI Skip] 1.13.0-beta.3
skip-checks: true
2020-04-30 09:16:39 +00:00
Alexander Krupenkin 05a834b822 Fix extrinsic ECDSA signatures (#2222)
* Fix extrinsic ECDSA signatures

* Fix lint
2020-04-30 11:04:55 +02:00
Github Actions 6a3af506a4 [CI Skip] 1.13.0-beta.2
skip-checks: true
2020-04-30 07:37:46 +00:00
Jaco Greeff c82b85ef79 Bump deps (#2224) 2020-04-30 09:27:04 +02:00
Github Actions 91ab81ef60 [CI Skip] 1.13.0-beta.1
skip-checks: true
2020-04-30 05:47:17 +00:00
Jaco Greeff 3665690444 Beta bump (#2223) 2020-04-30 07:37:12 +02:00
Github Actions 03dcefceb5 [CI Skip] 1.12.2
skip-checks: true
2020-04-29 22:56:16 +00:00
Jaco Greeff e84be032f4 1.12.2 (stable util) 2020-04-30 00:46:45 +02:00
Github Actions 033ff7a28c [CI Skip] 1.12.1
skip-checks: true
2020-04-29 22:23:45 +00:00
Jaco Greeff 7c8b2abf92 1.12 (#2221) 2020-04-30 00:13:27 +02:00
Github Actions 5312ec1f3a [CI Skip] 1.12.0-beta.15
skip-checks: true
2020-04-29 16:13:00 +00:00
Matej Nemček cdfbf91ee6 added Kodadot to @polkadot/api users section (#2220) 2020-04-29 18:00:50 +02:00
Github Actions 14f2abdc37 [CI Skip] 1.12.0-beta.14
skip-checks: true
2020-04-29 15:50:05 +00:00
Jake Naviasky 04c8d49e9d Add configurable provider auto-reconnect time. (#2215) 2020-04-29 17:39:31 +02:00
Github Actions 722929d0d4 [CI Skip] 1.12.0-beta.13
skip-checks: true
2020-04-29 14:57:15 +00:00
Jaco Greeff d1fae523ac Fix CompactAssignments types (#2219)
* Fix CompactAssignments types

* Cleanup mistaken type adjustments
2020-04-29 16:45:59 +02:00
Github Actions ce9a92cdc0 [CI Skip] 1.12.0-beta.12
skip-checks: true
2020-04-27 17:09:59 +00:00
Jaco Greeff 3de09a2e27 Hack around preimage failures (#2217) 2020-04-27 18:59:18 +02:00
Github Actions f28479180f [CI Skip] 1.12.0-beta.11
skip-checks: true
2020-04-27 14:04:29 +00:00
Jaco Greeff 0d1d42f6c2 Update promise combineLatest with generics (#2214) 2020-04-27 15:53:17 +02:00
Github Actions c93dad0bc5 [CI Skip] 1.12.0-beta.10
skip-checks: true
2020-04-27 07:04:47 +00:00
Jaco Greeff e3d3a1ff71 Handle no keysReturn StorageChangeSet with no keys (#2212) 2020-04-27 08:54:02 +02:00
Github Actions 1c8bd896e1 [CI Skip] 1.12.0-beta.9
skip-checks: true
2020-04-26 11:56:32 +00:00
Jaco Greeff e0119c1873 Bump metadata to current Substrate master (incl. types) (#2210) 2020-04-26 13:46:36 +02:00
Github Actions defe81e560 [CI Skip] 1.12.0-beta.8
skip-checks: true
2020-04-26 11:42:47 +00:00
Xiliang Chen 932122cd21 subscribeStorage parameter should be optional (#2208) 2020-04-26 13:32:43 +02:00
Github Actions 40d035eca7 [CI Skip] 1.12.0-beta.7
skip-checks: true
2020-04-25 07:58:44 +00:00
Jaco Greeff a135abaea2 Fix flags (council may not exist) (#2207) 2020-04-25 09:47:46 +02:00
Github Actions 00b8c10881 [CI Skip] 1.12.0-beta.6
skip-checks: true
2020-04-24 14:34:08 +00:00
Jaco Greeff 11e7b90918 Bump deps (#2206) 2020-04-24 16:22:18 +02:00
Github Actions ae74467e6a [CI Skip] 1.12.0-beta.5
skip-checks: true
2020-04-24 13:40:02 +00:00
Jeremías Díaz 5a929d3810 remove unnecessary parentheses and duplicate types (#2204)
* remove unnecessary parentheses and duplicate types

* fix: remove test code
2020-04-24 15:28:47 +02:00
Github Actions 63732f1456 [CI Skip] 1.12.0-beta.4
skip-checks: true
2020-04-24 08:54:04 +00:00
Jaco Greeff ea6bb83c01 Voting delegations (#2205) 2020-04-24 10:41:30 +02:00
Github Actions d6a443ca2a [CI Skip] 1.12.0-beta.3
skip-checks: true
2020-04-23 09:50:46 +00:00
Jaco Greeff d983ee106c migrateEra is first stakerPayouts era (#2202) 2020-04-23 11:39:39 +02:00
Github Actions beed1df5bd [CI Skip] 1.12.0-beta.2
skip-checks: true
2020-04-22 09:04:55 +00:00
Jaco Greeff 426aef6088 Update .123trigger 2020-04-22 10:55:01 +02:00
Github Actions 9be9b3fb83 [CI Skip] 1.12.0-beta.1
skip-checks: true
2020-04-22 07:56:01 +00:00
Jaco Greeff 8676f30cbf Reset to beta 2020-04-22 09:44:59 +02:00
Github Actions 154561c34c [CI Skip] 1.11.2
skip-checks: true
2020-04-22 07:40:26 +00:00
Jaco Greeff 714b242ec0 0.11.2 (#2200) 2020-04-22 09:30:02 +02:00
Github Actions 32ce650ee1 [CI Skip] 1.12.0-beta.0
skip-checks: true
2020-04-21 17:05:00 +00:00
Jaco Greeff 3715df2f5b Additional parachains types (#2199)
* Additional parachains types

* missing extensions listing

* trigger
2020-04-21 18:53:00 +02:00
Github Actions dd6e6ddfc1 [CI Skip] 1.11.1
skip-checks: true
2020-04-21 07:47:25 +00:00
Jaco Greeff 9975f58cfb 1.11 (#2198)
* 1.11

* isOptional is custom RPC sample

* Names is one-liner for custom RPCs
2020-04-21 09:38:09 +02:00
Github Actions 536369261f [CI Skip] 1.11.0-beta.35
skip-checks: true
2020-04-21 07:10:16 +00:00
Jaco Greeff 33165e93dc Add state_getReadProof (#2196) 2020-04-21 09:00:03 +02:00
Github Actions 39a38a6c44 [CI Skip] 1.11.0-beta.34
skip-checks: true
2020-04-21 05:41:16 +00:00
Keith Ingram b18bdc37f9 Add api.derive.accounts.flags (#2195)
* account flags in new call

* Fix
2020-04-21 07:31:00 +02:00
Github Actions 79847aabf7 [CI Skip] 1.11.0-beta.33
skip-checks: true
2020-04-20 09:22:55 +00:00
Jaco Greeff ab75863d94 Fix derive.democracy.preimage signature (#2194) 2020-04-20 11:12:03 +02:00
Github Actions c908a27b7d [CI Skip] 1.11.0-beta.32
skip-checks: true
2020-04-18 07:31:19 +00:00
Jaco Greeff 98c7e5d5ea Optimize entries retrieval (#2193) 2020-04-18 09:21:06 +02:00
Github Actions fd4587a0bc [CI Skip] 1.11.0-beta.31
skip-checks: true
2020-04-17 13:41:21 +00:00
Jaco Greeff e211ae1667 Added types for DoubleVoteReport (parachains) (#2192) 2020-04-17 15:32:51 +02:00
Github Actions af735176fe [CI Skip] 1.11.0-beta.30
skip-checks: true
2020-04-17 10:34:48 +00:00
Jaco Greeff 9eb44d6e89 console warnings on the use of node-template (#2191)
* console warnings on the use of node-template

* Message formatting
2020-04-17 12:23:44 +02:00
Github Actions 379e841808 [CI Skip] 1.11.0-beta.29
skip-checks: true
2020-04-17 06:07:08 +00:00
Jaco Greeff 5c16b8e8a1 Adjust spec types (starting versions) (#2189) 2020-04-17 07:55:53 +02:00
Github Actions 96d7d9ff5a [CI Skip] 1.11.0-beta.28
skip-checks: true
2020-04-16 19:55:16 +00:00
Jaco Greeff e9fbbbbd42 Typos 2020-04-16 21:44:04 +02:00
Github Actions 73750ddb7d [CI Skip] 1.11.0-beta.27
skip-checks: true
2020-04-16 19:39:17 +00:00
Jaco Greeff 4e1145c66f FAQ entry for Weight adjustment (#2188)
* FAQ entry for Weight adjustment

* CHANGELOG entry for rxjs Observable exposure

* Event decoding
2020-04-16 21:29:22 +02:00
Github Actions 7f35fa22d5 [CI Skip] 1.11.0-beta.26
skip-checks: true
2020-04-16 17:14:23 +00:00
Jeremías Díaz da1daf5bd9 fix: ensure consistent Observable version (#2187) 2020-04-16 19:03:00 +02:00
Github Actions 5afc87ce47 [CI Skip] 1.11.0-beta.25
skip-checks: true
2020-04-16 16:21:36 +00:00
Jaco Greeff a2269cd999 Explain where args come from and their types (#2186)
* Explain where args come from and their types

* Update api.query.other.md
2020-04-16 18:11:12 +02:00
Github Actions 201308c259 [CI Skip] 1.11.0-beta.24
skip-checks: true
2020-04-16 14:32:15 +00:00
Jaco Greeff 00490116dd Add system_{localPeerId, localListenAddresses} RPCs (#2185)
* Add system_{localPeerId, localListenAddresses} RPCs

* CHANGELOG
2020-04-16 16:21:40 +02:00
Github Actions 1968c878f5 [CI Skip] 1.11.0-beta.23
skip-checks: true
2020-04-16 13:52:16 +00:00
Jaco Greeff 52ccb9fbbf Linkage fixes (#2184)
* Fix linkage decoding

* Actually fix linkage

* CHANGELOG
2020-04-16 15:41:42 +02:00
Github Actions 03e21ea64b [CI Skip] 1.11.0-beta.22
skip-checks: true
2020-04-16 13:39:19 +00:00
Jaco Greeff 8c949bb3df StorageKey toHuman returns decoded key (#2183) 2020-04-16 15:28:15 +02:00
Github Actions e484e7cf35 [CI Skip] 1.11.0-beta.21
skip-checks: true
2020-04-16 11:32:18 +00:00
Jaco Greeff 7aac4c7936 Add missing cookbook .keys 2020-04-16 13:21:04 +02:00
Github Actions 933c8d48e2 [CI Skip] 1.11.0-beta.20
skip-checks: true
2020-04-16 11:18:25 +00:00
Jaco Greeff d3d3bb9b5a Adjust Weight to u64 (#2181)
* Adjust Weight to u64

* Adjust copy (really should be reading folders...)

* build:interfaces

* EventRecord test expectation update
2020-04-16 13:08:46 +02:00
Github Actions f4d976c337 [CI Skip] 1.11.0-beta.19
skip-checks: true
2020-04-16 10:17:47 +00:00
Jaco Greeff 07c4037fcf On subscriptions, ensure rx.runtimeVersion is set (#2180) 2020-04-16 12:05:35 +02:00
Github Actions 52d73d8698 [CI Skip] 1.11.0-beta.18
skip-checks: true
2020-04-16 09:02:05 +00:00
Jeremías Díaz ccfab75f41 fix: use camelCase for storage module names (#2176) 2020-04-16 10:51:19 +02:00
Github Actions b8204b138d [CI Skip] 1.11.0-beta.17
skip-checks: true
2020-04-16 08:46:32 +00:00
Jaco Greeff a97cb6e25d Return all identity hashes (not just as subset) (#2179) 2020-04-16 10:36:37 +02:00
Github Actions 11534a1153 [CI Skip] 1.11.0-beta.16
skip-checks: true
2020-04-16 07:21:00 +00:00
Jaco Greeff dd1fab5366 Adjust set bitfileds to LE (#2178) 2020-04-16 09:09:17 +02:00
Github Actions dbb3a5ccc2 [CI Skip] 1.11.0-beta.15
skip-checks: true
2020-04-15 16:26:29 +00:00
Jaco Greeff fb08215e0d Add Fixed128 type (#2175) 2020-04-15 18:15:11 +02:00
Github Actions d7d7ab2f89 [CI Skip] 1.11.0-beta.14
skip-checks: true
2020-04-15 08:54:43 +00:00
Jaco Greeff 25393cd982 Add note on field ordering (#2173)
* Add note on field ordering

* Field ordering additional links
2020-04-15 10:43:15 +02:00
Github Actions d6a6089e2d [CI Skip] 1.11.0-beta.13
skip-checks: true
2020-04-15 06:55:53 +00:00
Jaco Greeff a3eaca0270 Small doc cleanups (#2172) 2020-04-15 08:44:15 +02:00
Github Actions f9d1b4d653 [CI Skip] 1.11.0-beta.12
skip-checks: true
2020-04-14 20:22:21 +00:00
Jaco Greeff f81712343a Transaction batching (#2171) 2020-04-14 22:10:25 +02:00
Github Actions 33e414be12 [CI Skip] 1.11.0-beta.11
skip-checks: true
2020-04-14 16:27:55 +00:00
Jaco Greeff 9387103558 cookbook link 2020-04-14 18:15:28 +02:00
Github Actions 3b7c1afa95 [CI Skip] 1.11.0-beta.10
skip-checks: true
2020-04-14 15:28:01 +00:00
Jaco Greeff 7e1fa8954b Extend storage cookbook (#2169)
* Extend storage cookbook

* Update storage.md

* Update storage.md
2020-04-14 17:16:46 +02:00
Github Actions 53c62f1542 [CI Skip] 1.11.0-beta.9
skip-checks: true
2020-04-14 14:56:23 +00:00
Jaco Greeff 5ed94a50e1 Update .123trigger 2020-04-14 16:45:30 +02:00
Github Actions b1c047149b [CI Skip] 1.11.0-beta.8
skip-checks: true
2020-04-14 14:35:37 +00:00
Jaco Greeff 7a0efaf58c Kusama 1057 known types (#2168) 2020-04-14 16:24:19 +02:00
Github Actions 5acce98346 [CI Skip] 1.11.0-beta.7
skip-checks: true
2020-04-14 11:52:00 +00:00
Jaco Greeff 165179ebf2 Remove flags on derive.accounts.info (#2167)
* Remove flags from derive.account.info

* adjust types
2020-04-14 13:40:12 +02:00
Github Actions def60dce9e [CI Skip] 1.11.0-beta.6
skip-checks: true
2020-04-14 10:49:12 +00:00
Jaco Greeff c8f91fcf7a Parameterize DoNotConstruct (#2165)
* Parameterize DoNotConstruct

* Update DoNotConstruct list

* typo fix
2020-04-14 12:37:30 +02:00
Github Actions 70a160cca0 [CI Skip] 1.11.0-beta.5
skip-checks: true
2020-04-14 10:31:23 +00:00
Jaco Greeff 9691fd5ba7 don't subscribe to runtime updates with no subs (#2166) 2020-04-14 12:20:07 +02:00
Jaco Greeff 475cb4fa69 Move Digest to interfaces (#2164)
* Move Digest to interfaces

* Unconstructable typos
2020-04-14 12:09:36 +02:00
Github Actions 5c54b3cc92 [CI Skip] 1.11.0-beta.4
skip-checks: true
2020-04-14 10:05:31 +00:00
Jaco Greeff 55d8c58d95 Add transactionVerions to RuntimeVersion struct (#2163) 2020-04-14 11:54:42 +02:00
Github Actions edf8adaa88 [CI Skip] 1.11.0-beta.3
skip-checks: true
2020-04-14 08:49:43 +00:00
Jaco Greeff 1f8f6e54bd Add unsigned sending to cookbook (#2162)
* Add unsigned sending to cookbook

* Block author extraction example
2020-04-14 10:36:15 +02:00
Github Actions f6ca7b9a9d [CI Skip] 1.11.0-beta.2
skip-checks: true
2020-04-14 07:52:33 +00:00
Jaco Greeff 7732339fc0 Line lengths 2020-04-14 09:41:04 +02:00
Jaco Greeff 5a8a8c7ecb Fix cookbook links 2020-04-14 09:34:39 +02:00
Github Actions 05df087e73 [CI Skip] 1.11.0-beta.1
skip-checks: true
2020-04-14 06:58:37 +00:00
Jaco Greeff 5b71abfe80 Make a start at a cookbook... still loads to go (#2160) 2020-04-14 08:48:14 +02:00
Github Actions 1d6c33060a [CI Skip] 1.11.0-beta.0
skip-checks: true
2020-04-13 10:45:21 +00:00
Jaco Greeff eae573e6a2 Simplify entries() decoding (#2159) 2020-04-13 12:33:24 +02:00
Github Actions 0f08031792 [CI Skip] 1.10.1
skip-checks: true
2020-04-13 05:28:25 +00:00
Jaco Greeff e0bde927d1 1.10 (#2158)
* 1.10

* CHANGELOG

* key extract example
2020-04-13 07:16:43 +02:00
Github Actions e569de520a [CI Skip] 1.10.0-beta.29
skip-checks: true
2020-04-11 20:32:39 +00:00
Jaco Greeff a833dccdaf All private prefixed with _ (#2157)
* All private prefixed with _

* Fix test
2020-04-11 22:21:55 +02:00
Github Actions b58d772156 [CI Skip] 1.10.0-beta.28
skip-checks: true
2020-04-10 16:17:30 +00:00
Jaco Greeff e5d9bbc264 Filter old rewards with stakingLedger (ledger can update) (#2155)
* Filter old rewards with stakingLedger (ledger can update)

* Cleanup internal functions
2020-04-10 18:06:14 +02:00
Github Actions 3089529405 [CI Skip] 1.10.0-beta.27
skip-checks: true
2020-04-10 12:41:15 +00:00
Jaco Greeff 5ab24390c5 Indicate all protected members and variables (#2154)
* Indicate all protected members and variables

* Added dropped protected
2020-04-10 14:29:58 +02:00
Github Actions 245047a41f [CI Skip] 1.10.0-beta.26
skip-checks: true
2020-04-10 12:04:49 +00:00
Jaco Greeff 8aa1bd5bd0 Indicate protected raw with _raw in Base codec (#2153) 2020-04-10 13:54:15 +02:00
Github Actions e0dde35621 [CI Skip] 1.10.0-beta.25
skip-checks: true
2020-04-10 10:23:42 +00:00
Jaco Greeff 9ba91a3851 Use forkJoin for entries() retrieval (#2152)
* Use forkJoin for entries() retrieval

* Some current and validator retrieval opts

* Remove duplicate filtering
2020-04-10 12:12:10 +02:00
Github Actions 351cb97667 [CI Skip] 1.10.0-beta.24
skip-checks: true
2020-04-09 16:44:08 +00:00
Jaco Greeff afdb476796 Small cleanups & consistency (#2151)
* Small cleanups & consistency

* Fixes
2020-04-09 18:32:30 +02:00
Github Actions 3b67b65091 [CI Skip] 1.10.0-beta.23
skip-checks: true
2020-04-09 13:55:22 +00:00
Jaco Greeff 25580b2026 Update CHANGELOG, bump deps (#2150) 2020-04-09 15:44:07 +02:00
Github Actions 2db16e94b7 [CI Skip] 1.10.0-beta.22
skip-checks: true
2020-04-09 12:57:00 +00:00
Jaco Greeff 9184268c3d Bump metadata (#2148)
* Bump metadata

* Adjust to non-customized democracy params
2020-04-09 14:46:48 +02:00
Github Actions 83a762af1e [CI Skip] 1.10.0-beta.21
skip-checks: true
2020-04-09 12:39:49 +00:00
Jaco Greeff 6a8e5370b6 Add system_chainType RPC (#2149) 2020-04-09 14:28:43 +02:00
Github Actions 9cd4bf7cf7 [CI Skip] 1.10.0-beta.20
skip-checks: true
2020-04-09 07:31:24 +00:00
Jaco Greeff c4708dcfca Cleanup isPassing (#2147) 2020-04-09 09:19:56 +02:00
Github Actions 041d06a6c8 [CI Skip] 1.10.0-beta.19
skip-checks: true
2020-04-08 19:58:30 +00:00
Jaco Greeff 2b4bd75499 Adjust calc with turnout add/sub 2020-04-08 21:47:22 +02:00
Github Actions c4c47a84e1 [CI Skip] 1.10.0-beta.18
skip-checks: true
2020-04-08 15:36:45 +00:00
Jaco Greeff a241bd1c38 Adjust change calc (#2145) 2020-04-08 17:23:59 +02:00
Github Actions d420cede82 [CI Skip] 1.10.0-beta.17
skip-checks: true
2020-04-08 14:04:37 +00:00
Jaco Greeff b869695e40 Bump util (#2144) 2020-04-08 15:55:04 +02:00
Github Actions 37caf4e710 [CI Skip] 1.10.0-beta.16
skip-checks: true
2020-04-07 19:23:34 +00:00
Jaco Greeff 134bc22463 Westend (spec) 2020-04-07 21:11:37 +02:00
Github Actions 39d142876e [CI Skip] 1.10.0-beta.15
skip-checks: true
2020-04-07 18:42:57 +00:00
Jaco Greeff 6d95eb418d Westend (again) 2020-04-07 20:31:16 +02:00
Github Actions e26a6a28ff [CI Skip] 1.10.0-beta.14
skip-checks: true
2020-04-07 18:10:26 +00:00
Jaco Greeff d80d6f2a06 Westend update (#2143) 2020-04-07 19:59:08 +02:00
Github Actions ff8dabb249 [CI Skip] 1.10.0-beta.13
skip-checks: true
2020-04-07 09:30:13 +00:00
Jaco Greeff e7a01f9780 Dump dev (incl. eslint header checks) (#2142) 2020-04-07 11:20:07 +02:00
Github Actions 94938c7075 [CI Skip] 1.10.0-beta.12
skip-checks: true
2020-04-06 10:43:28 +00:00
Jaco Greeff f37e729605 Use bumbled node (#2141) 2020-04-06 12:32:05 +02:00
Github Actions 9cfde73ff8 [CI Skip] 1.10.0-beta.11
skip-checks: true
2020-04-05 10:23:01 +00:00
Jaco Greeff f5c140d1c2 Split derive.staking.currentPoints from overview (#2140) 2020-04-05 12:12:03 +02:00
Github Actions 472e1022d3 [CI Skip] 1.10.0-beta.10
skip-checks: true
2020-04-05 08:15:44 +00:00
Jaco Greeff f71211f5dc Bump deps (#2139) 2020-04-05 10:05:50 +02:00
Github Actions 7e06974f1b [CI Skip] 1.10.0-beta.9
skip-checks: true
2020-04-04 17:16:19 +00:00
Jaco Greeff f95384d9ff Bump deps (#2138)
* Bump deps

* Add lockfile :)
2020-04-04 19:04:42 +02:00
Github Actions baedd5b689 [CI Skip] 1.10.0-beta.8
skip-checks: true
2020-04-04 16:36:28 +00:00
Jaco Greeff 9ec1cb194a Update StakingLedger (simpl payouts) (#2102)
* Update StakingLedger (simpl payouts)

* Chain defs

* Allow stakers queries with exclude filter

* Generate interfaces

* Return all exposures

* Rework exposures

* Cleanups
2020-04-04 18:25:32 +02:00
Github Actions d730310ea5 [CI Skip] 1.10.0-beta.7
skip-checks: true
2020-04-03 12:58:06 +00:00
Jaco Greeff 641fe5c380 Refresh on scheduler entries (#2135)
* Refresh on scheduler entries

* Cleanups
2020-04-03 14:47:39 +02:00
Github Actions c5a8d5e018 [CI Skip] 1.10.0-beta.6
skip-checks: true
2020-04-03 11:40:23 +00:00
Jaco Greeff 02d130f0a0 Add Mandatory to DispatchClass (#2134) 2020-04-03 13:29:07 +02:00
Github Actions 5554f17f05 [CI Skip] 1.10.0-beta.5
skip-checks: true
2020-04-02 18:55:29 +00:00
Jaco Greeff 69351ceb9e Cater for new dispatch scheduler (#2130)
* Cater for new dispatch scheduler

* Updated

* debug logs

* Update types.ts
2020-04-02 20:44:27 +02:00
Github Actions 0cf9fa7405 [CI Skip] 1.10.0-beta.4
skip-checks: true
2020-04-02 14:27:07 +00:00
Jaco Greeff 8213fa7cb9 Add validator total to staker rewards (#2129)
* Add validator total to staker rewards

* yarn rewrite
2020-04-02 16:16:10 +02:00
Github Actions 8ef983169f [CI Skip] 1.10.0-beta.3
skip-checks: true
2020-04-02 09:24:58 +00:00
Jaco Greeff e392dd745e Base centrifuge types (#2125) 2020-04-02 11:15:28 +02:00
Github Actions 6b07a9c2a5 [CI Skip] 1.10.0-beta.2
skip-checks: true
2020-04-02 07:46:55 +00:00
Jaco Greeff 114ac59707 Reword FAQ 2020-04-02 09:35:16 +02:00
Github Actions 3c95bfe56e [CI Skip] 1.10.0-beta.1
skip-checks: true
2020-04-01 22:00:58 +00:00
Jaco Greeff 58de0b8b9c Rewrite yarn.lock (#2127) 2020-04-01 23:49:56 +02:00
Github Actions 1f97c5e9e3 [CI Skip] 1.10.0-beta.0
skip-checks: true
2020-04-01 20:54:58 +00:00
Jaco Greeff 0dc46445bc Bump dev (incl. lint fixes) (#2126)
* Bump dev (incl. lint fixes)

* Fix call encoding (stepped into that one)

* Event struct order

* Update with missing tuple type (getTypeDef type)
2020-04-01 22:44:34 +02:00
Github Actions 7d3464ae2c [CI Skip] 1.9.1
skip-checks: true
2020-04-01 10:26:10 +00:00
Jaco Greeff 295cd2a7e0 1.9 (#2124) 2020-04-01 12:14:00 +02:00
Github Actions 5a66ce5a87 [CI Skip] 1.9.0-beta.27
skip-checks: true
2020-04-01 08:01:14 +00:00
Jaco Greeff d8d008108d CI scripts (#2123) 2020-04-01 09:49:16 +02:00
Github Actions 491518405d [CI Skip] 1.9.0-beta.26
skip-checks: true
2020-03-31 13:18:37 +00:00
Jaco Greeff 7290b3d296 sanitize options (allowNamespaces) (#2122)
* sanitize options (allowNamespaces)

* Pass actual option to test
2020-03-31 15:07:35 +02:00
Github Actions b6162a316f [CI Skip] 1.9.0-beta.25
skip-checks: true
2020-03-31 13:06:05 +00:00
Jaco Greeff 71c1d16dc4 Bump @polkadot/util (#2121) 2020-03-31 14:54:49 +02:00
Github Actions 204f592bea [CI Skip] 1.9.0-beta.24
skip-checks: true
2020-03-31 11:52:59 +00:00
Jaco Greeff 39c44bb5aa Split @polkadot/types/known into @polkadot/types-known (#2120)
* Split @polkadot/types/known into @polkadot/types-known

* Rreadme link

* tsconfig typo

* script aliasses
2020-03-31 13:40:59 +02:00
Github Actions df0de49a67 [CI Skip] 1.9.0-beta.23
skip-checks: true
2020-03-31 07:28:28 +00:00
Jaco Greeff 0bdbf4b7a7 Use querystorageAt for map entries (optional) (#2119) 2020-03-31 09:17:36 +02:00
Github Actions ef9cd6fc4b [CI Skip] 1.9.0-beta.22
skip-checks: true
2020-03-30 16:33:11 +00:00
Jaco Greeff 5ab0bf3998 Aplit derive session.{info, progress} (#2117) 2020-03-30 18:20:34 +02:00
Github Actions e69d97619e [CI Skip] 1.9.0-beta.21
skip-checks: true
2020-03-30 12:04:00 +00:00
Jaco Greeff 6aa0d90fc0 Add childstate_* RPCs (#2065)
* Add childstate_* RPCs

* childstate into rpc-core

* PrefixedStorageKey
2020-03-30 13:53:33 +02:00
Jaco Greeff d338fcb58c Add derive for council voting info (#2115)
* Add derive for council voting info

* Update packages/api-derive/src/council/votes.ts
2020-03-30 13:48:14 +02:00
Github Actions b9a60a2519 [CI Skip] 1.9.0-beta.20
skip-checks: true
2020-03-28 21:06:18 +00:00
Jaco Greeff 7b8b4e8078 BTreeSet only has single sub (#2114) 2020-03-28 21:55:49 +01:00
Github Actions 50b551e4fc [CI Skip] 1.9.0-beta.19
skip-checks: true
2020-03-28 20:06:12 +00:00
Jaco Greeff a4ea4d648a Handle double-encoded Bytes in fallback/constants (#2113)
* Handle double-encoded Bytes in fallback/constants

* Fix import, bypass for tests
2020-03-28 20:55:39 +01:00
Github Actions 146360a454 [CI Skip] 1.9.0-beta.18
skip-checks: true
2020-03-27 20:00:32 +00:00
Jaco Greeff 2e83d92adc Derive for deomcracy nextExternal (#2108) 2020-03-27 20:49:18 +01:00
Github Actions b77e5d079c [CI Skip] 1.9.0-beta.17
skip-checks: true
2020-03-27 17:10:21 +00:00
Jaco Greeff 0d067c9484 Add api.derive.democracy.dispatchQueue (#2107) 2020-03-27 17:59:22 +01:00
Github Actions 88519eff3f [CI Skip] 1.9.0-beta.16
skip-checks: true
2020-03-27 14:44:07 +00:00
Jaco Greeff bb14471e60 Consistency in Derive* type names (#2106) 2020-03-27 15:34:41 +01:00
Github Actions 97ab7fcf2f [CI Skip] 1.9.0-beta.15
skip-checks: true
2020-03-27 13:18:21 +00:00
Jaco Greeff 922cfb8759 FAQ entry for node-template addresses (#2105) 2020-03-27 14:07:51 +01:00
Github Actions 717f33ca02 [CI Skip] 1.9.0-beta.14
skip-checks: true
2020-03-27 12:36:19 +00:00
Jaco Greeff 21a2b5f0b7 signAndSend with finalized hash (depending on lag) (#2104)
* signAndSend with finalized hash (depending on drift)

* Extract lag calc

* mock update

* getSigningHeader

* api.derive.tx (with submittable cleanups)

* Adjust mortal calculations

* Cleanup new tx derives

* Optimize calcs

* Comment cleanups, next-up testing

* Adjust mocks

* Adjust sig (period is now based on metadata)

* Remove extra fn, tested and it works
2020-03-27 13:26:12 +01:00
Github Actions 54efead9d7 [CI Skip] 1.9.0-beta.13
skip-checks: true
2020-03-27 09:29:42 +00:00
Jaco Greeff c472a451a4 Bump dev (#2103)
* Bump dev

* Rewrite yarn.lock
2020-03-27 10:20:02 +01:00
Github Actions 6ed2de43fc [CI Skip] 1.9.0-beta.12
skip-checks: true
2020-03-26 20:20:55 +00:00
Jaco Greeff 8976ded37f Add state_queryStorageAt RPC (#2082)
* Add state_queryStorageAt RPC

* Add queryStorageAt rpc

* Clanup merge
2020-03-26 21:08:34 +01:00
Github Actions 169a374544 [CI Skip] 1.9.0-beta.11
skip-checks: true
2020-03-26 15:52:15 +00:00
Jaco Greeff 6476d88e19 Update .123trigger 2020-03-26 16:40:34 +01:00
Github Actions 75de454619 [CI Skip] 1.9.0-beta.10
skip-checks: true
2020-03-26 15:35:59 +00:00
Jaco Greeff 851428aef9 Merge branch 'master' of github.com:polkadot-js/api 2020-03-26 16:25:50 +01:00
Jaco Greeff dfc51ad300 Adjust toCallsOnly typing 2020-03-26 16:25:45 +01:00
Github Actions e16d288644 [CI Skip] 1.9.0-beta.9
skip-checks: true
2020-03-26 15:18:52 +00:00
Jaco Greeff a19928fef9 Add additional types for offchain Phragmen (#2097)
* Add additional types for offchain Phragmen

* Trim down metadata toCallsOnly
2020-03-26 16:07:54 +01:00
Github Actions 0906c7837a [CI Skip] 1.9.0-beta.8
skip-checks: true
2020-03-26 14:27:21 +00:00
Jaco Greeff cb9831c4f8 Bump metadata (#2096)
* Bump metadata

* Update staking types

* Enum updates
2020-03-26 15:17:20 +01:00
Github Actions 620d3757ba [CI Skip] 1.9.0-beta.7
skip-checks: true
2020-03-25 13:14:24 +00:00
Jaco Greeff 601288b3ec Handle <module>::<Type> in sanitize (#2094)
* Handle <module>::<Type> in santize

* Sanitize all ::'s

* Additional cleanups
2020-03-25 14:01:24 +01:00
Github Actions efbeecc8f6 [CI Skip] 1.9.0-beta.6
skip-checks: true
2020-03-25 10:18:50 +00:00
Jaco Greeff 852e0d4f0b Additional referendum derive cleanups (#2093) 2020-03-25 11:06:16 +01:00
Github Actions 5c7f9f1c8a [CI Skip] 1.9.0-beta.5
skip-checks: true
2020-03-25 08:54:57 +00:00
Jaco Greeff 64f64c1001 Add referensumsActive (#2091) 2020-03-25 09:43:05 +01:00
Github Actions 15c3085511 [CI Skip] 1.9.0-beta.4
skip-checks: true
2020-03-25 08:34:25 +00:00
Jaco Greeff 27cd9b1ca4 Cleanup interfaces/rpc, types to correct locations (#2084)
* Cleanup interfaces/rcp, types to correct locations

* Update import locations
2020-03-25 09:23:03 +01:00
Github Actions 1c2a95f820 [CI Skip] 1.9.0-beta.3
skip-checks: true
2020-03-25 07:52:42 +00:00
Jaco Greeff 8bf5e51725 Return Observable when no referendums (#2090)
* Return Observable when no referendums

* Small ordering cleanups
2020-03-25 08:41:26 +01:00
Github Actions 493225aa9d [CI Skip] 1.9.0-beta.2
skip-checks: true
2020-03-25 07:12:03 +00:00
Jaco Greeff a0979a9ce3 Only format error log, upstream error from core (#2089)
* Only format error log, upstream error from core

* Remove (now unused) wrapping info
2020-03-25 08:00:14 +01:00
Github Actions 02849ae49b [CI Skip] 1.9.0-beta.1
skip-checks: true
2020-03-24 16:50:32 +00:00
Jaco Greeff 602bb1406b derive.referendum extended info (#2086)
* derive.referendum extended info

* update

* util bump
2020-03-24 17:39:37 +01:00
Github Actions d70930587c [CI Skip] 1.9.0-beta.0
skip-checks: true
2020-03-23 10:37:30 +00:00
Jaco Greeff 8c011cdc86 Adjust new vote retrieval with entries (#2080)
* Adjust new vote retrieval with entries

* testing
2020-03-23 11:24:06 +01:00
Github Actions eb3e7a0740 [CI Skip] 1.8.1
skip-checks: true
2020-03-22 17:58:16 +00:00
Jaco Greeff 2071de517d 1.8 (#2079) 2020-03-22 18:47:04 +01:00
Github Actions 205ae40f20 [CI Skip] 1.8.0-beta.12
skip-checks: true
2020-03-22 17:27:07 +00:00
Keith IngramandJaco Greeff aa37e372dd Derived account info flags (#2068)
* Derived account info flags

* Update packages/api-derive/src/accounts/info.ts

Co-Authored-By: Jaco Greeff <jacogr@gmail.com>

* Apply suggestions from code review

* Cleanups

Co-authored-by: Jaco Greeff <jacogr@gmail.com>
2020-03-22 18:16:43 +01:00
Github Actions 8cdac77a8e [CI Skip] 1.8.0-beta.11
skip-checks: true
2020-03-22 10:15:48 +00:00
Jaco Greeff 7a7d6e9b8a New democracy types (#2078)
* New democracy types

* ReferendumInfo

* Adjust democracy derives

* Spring cleaning

* Remove ReferendumInfoExtended
2020-03-22 11:05:57 +01:00
Github Actions 7a1bdb18a8 [CI Skip] 1.8.0-beta.10
skip-checks: true
2020-03-22 06:57:07 +00:00
Jaco Greeff 39f22ca403 Control wasm initialization via initWasm: false flag (#2076) 2020-03-22 07:45:22 +01:00
Github Actions b3c6a5acc5 [CI Skip] 1.8.0-beta.9
skip-checks: true
2020-03-22 06:43:14 +00:00
Jaco Greeff b3a6b3dcb5 Bump dev, arrow functions (#2077) 2020-03-22 07:31:55 +01:00
Github Actions 0c0e4c4d7c [CI Skip] 1.8.0-beta.8
skip-checks: true
2020-03-21 08:51:26 +00:00
Jaco Greeff 9d67d711d4 Bump deps, type import on generated (#2075)
* Bump deps, type import on generated

* type imports in types/types

* Re-export defs

* Split imports/exports

* Additional type import

* Remove import type

* Remove dupes
2020-03-21 09:40:59 +01:00
Github Actions f45d03fa17 [CI Skip] 1.8.0-beta.7
skip-checks: true
2020-03-21 07:00:35 +00:00
Jaco Greeff af11444b72 Update RPCs (babe, contracts) (#2074)
* Update RPCs (babe, contracts)

* Babe in rpc-core
2020-03-21 07:50:56 +01:00
Github Actions f412a5ac86 [CI Skip] 1.8.0-beta.6
skip-checks: true
2020-03-20 16:50:04 +00:00
Jaco Greeff c9dcd51ba6 is isWarning to ISubmittableResult (#2073) 2020-03-20 17:40:09 +01:00
Jaco Greeff 5dca826429 Retracted status to isWarning 2020-03-20 17:27:18 +01:00
Github Actions 8dc53e6339 [CI Skip] 1.8.0-beta.5
skip-checks: true
2020-03-20 15:41:13 +00:00
Jaco Greeff 5867f8ab0c Allow unknown struct fields (i.e. on Map, non-codec) (#2071) 2020-03-20 16:30:29 +01:00
Github Actions 6d3db2fb3f [CI Skip] 1.8.0-beta.4
skip-checks: true
2020-03-20 12:52:46 +00:00
Jaco Greeff 3a1634d67f Add all missing RPC endpoints (#2070)
* Add all missing RPC endpoints

* Rework RPC return types

* rpc-core interface

* Remove crap test, checked anyway
2020-03-20 13:42:18 +01:00
Github Actions 53d18d874d [CI Skip] 1.8.0-beta.3
skip-checks: true
2020-03-19 13:51:15 +00:00
Jaco Greeff 044efbc6de Convert jsonrpc & typings to definitions (#2064)
* Convert jsonrpc & typings to definitions

* Handle empty interface generation (no types)

* Move jsonrpc/create to rpc-core/create

* Create imports

* Remove jsonrpc package, generate rpc-core from defs

* Debug :)

* Generate RPC definitions via interfaces

* Generate md docs

* Remove @polkadot/jsonrpc refs (at least packages)

* No empty types

* Add PAHNTOM "cleanup" gen

* *sigh* regex loop

* Update mock for no jsonrpc

* Add definition export types

* Cleanup linting

* Mocking 1 fix

* Mocking 2 fix

* rpc-core tests updates

* CHANGELOG & docs

* Add jsonrpc (already mapped) to interfaces

* Add aliasses for RPCs

* Fix rpc-core tests
2020-03-19 14:40:54 +01:00
Github Actions 27e3fbfd0f [CI Skip] 1.8.0-beta.2
skip-checks: true
2020-03-18 21:50:49 +00:00
Jaco Greeff b7af4781ea Add Initialization to extrinsic phases (#2063) 2020-03-18 22:40:53 +01:00
Github Actions c51e351117 [CI Skip] 1.8.0-beta.1
skip-checks: true
2020-03-17 23:18:54 +00:00
Jaco Greeff e6afed9bb1 Allow electedInfo commition with/without linked maps (#2060) 2020-03-18 00:08:49 +01:00
Github Actions 4b07d5511e [CI Skip] 1.8.0-beta.0
skip-checks: true
2020-03-17 18:46:06 +00:00
Jaco Greeff a613308bdb Update 2020-03-17 19:34:51 +01:00
Jaco Greeff a863e5eb95 Non-array nominators 2020-03-17 19:22:16 +01:00
Github Actions 623420ca3d [CI Skip] 1.7.1
skip-checks: true
2020-03-17 13:49:41 +00:00
Jaco Greeff 9ea6053a42 1.7 (#2059) 2020-03-17 14:39:20 +01:00
Github Actions 73dce6bfd1 [CI Skip] 1.7.0-beta.19
skip-checks: true
2020-03-17 09:48:02 +00:00
Jaco Greeff 5a7811c80f Bump metadata (#2058)
* Bump metadata

* Add missing @types/jest

* Update tests for new metadata

* CHANGELOG for linked map removals

* expand re-added check
2020-03-17 10:37:24 +01:00
Github Actions 1c529bdc6a [CI Skip] 1.7.0-beta.18
skip-checks: true
2020-03-16 14:47:43 +00:00
Jaco Greeff 3f4576f524 Add yarn matrix (#2057) 2020-03-16 15:37:23 +01:00
Github Actions 2619489ec3 [CI Skip] 1.7.0-beta.17
skip-checks: true
2020-03-16 13:59:34 +00:00
Jaco Greeff f165845cc3 Collapse actions matrix (#2056) 2020-03-16 14:49:31 +01:00
Github Actions 897f03e4c1 [CI Skip] 1.7.0-beta.16
skip-checks: true
2020-03-16 10:24:34 +00:00
Jaco Greeff 82c1e3f35a Cater for new non-linked map validator queries (#2055)
* Cater for new non-linked map validator queries

* Update staking tests

* stakers -> stashes
2020-03-16 11:13:46 +01:00
Github Actions c06f260d3c [CI Skip] 1.7.0-beta.15
skip-checks: true
2020-03-16 07:23:55 +00:00
Jaco Greeff 63573ca0de Add ownExposure & ownSlashes (#2054) 2020-03-16 08:15:00 +01:00
Github Actions bf1a5f0d91 [CI Skip] 1.7.0-beta.14
skip-checks: true
2020-03-15 19:39:52 +00:00
Wei Tang 1750522cb6 Use /usr/bin/env bash instead of /bin/bash (#2053) 2020-03-15 20:29:45 +01:00
Github Actions ed3b507ea6 [CI Skip] 1.7.0-beta.13
skip-checks: true
2020-03-15 17:00:01 +00:00
Jaco Greeff f942510309 Expose stakerSlahes & eraSlashes (#2052) 2020-03-15 17:49:15 +01:00
Github Actions 09a9153645 [CI Skip] 1.7.0-beta.12
skip-checks: true
2020-03-15 09:03:36 +00:00
Jaco Greeff 908d0fcf52 Add missing commission to payout calculations (#2051)
* Add missing comission to payout calcs

* yarn

* Bump dev with version update fix
2020-03-15 09:51:52 +01:00
Github Actions 707c93a557 [CI Skip] 1.7.0-beta.11
skip-checks: true
2020-03-15 07:36:51 +00:00
Jaco Greeff 82addc4f6a Remove non-working CI cache (#2050) 2020-03-15 08:26:34 +01:00
Github Actions d595eb440c [CI Skip] 1.7.0-beta.10
skip-checks: true
2020-03-14 08:49:03 +00:00
Jaco Greeff e86fe5bab0 Bump deps (#2048) 2020-03-14 09:37:28 +01:00
Github Actions 7187dca2f7 [CI Skip] 1.7.0-beta.9
skip-checks: true
2020-03-13 20:17:16 +00:00
Jaco Greeff 94a3b1f09a eraPoints args (#2047) 2020-03-13 21:05:40 +01:00
Github Actions d88b300a6d [CI Skip] 1.7.0-beta.8
skip-checks: true
2020-03-13 18:52:54 +00:00
Jaco Greeff dd217f82b2 Chunk keys & values retrievals on keys()/entries() (#2046)
* Chunk keys & values retrievals on keys()/entries()

* Bump chunk sizes

* Fix concatMap index

* Update mock
2020-03-13 19:40:57 +01:00
Github Actions 3b4cee08e2 [CI Skip] 1.7.0-beta.7
skip-checks: true
2020-03-13 17:07:31 +00:00
Joshy Orndorff 34be2399eb Couple little typo fixes (#2045) 2020-03-13 17:54:29 +01:00
Github Actions 27d879a325 [CI Skip] 1.7.0-beta.6
skip-checks: true
2020-03-13 12:51:33 +00:00
Jaco Greeff 4093ef9ffa Add Identity hasher (#2044)
* Add Identity hasher

* Expand new V11 storage types

* Cleanups, use actual enum keys

* Sort augmented output (fy-by enhancement)

* Map get

* DEFAULT_FN
2020-03-13 13:39:34 +01:00
Github Actions 261eebee03 [CI Skip] 1.7.0-beta.5
skip-checks: true
2020-03-13 11:45:14 +00:00
Jaco Greeff d9dad3566a Use asyncScheduler for all derives (#2043) 2020-03-13 12:32:42 +01:00
Github Actions 3d0fdbd6da [CI Skip] 1.7.0-beta.4
skip-checks: true
2020-03-13 07:56:43 +00:00
Jaco Greeff affa5d390c Expose derive staking.nextElected (#2042) 2020-03-13 08:45:28 +01:00
Github Actions 1659e672ae [CI Skip] 1.7.0-beta.3
skip-checks: true
2020-03-13 07:05:20 +00:00
Jaco Greeff 0fa6b99c9e Query docs with entries & keys, submittable with paymentInfo (#2041) 2020-03-13 07:52:53 +01:00
Github Actions ef9db7bf78 [CI Skip] 1.7.0-beta.2
skip-checks: true
2020-03-13 05:45:54 +00:00
Jaco Greeff 8c6505d870 Map signs directly to H512 (no indirection) (#2038) 2020-03-13 06:34:46 +01:00
Github Actions 48f83c7d5b [CI Skip] 1.7.0-beta.1
skip-checks: true
2020-03-12 21:11:11 +00:00
Jaco Greeff f3c2c5c084 Re-enable argument checks (dropped in 1.6.2) (#2035)
* Re-enable argument checks (dropped in 1.6.2)

* typo

* Bump to preminor
2020-03-12 21:58:57 +01:00
Jaco Greeff 98e1cc3f73 Add staking.eraExposure derive (#2036) 2020-03-12 21:57:17 +01:00
926 changed files with 48175 additions and 83960 deletions
+7 -3
View File
@@ -1,3 +1,7 @@
20
1.4.2
1.6.2
25
1.4.2
1.6.2
1.11.2
1.12.2
1.17.2
1.31.2
+3
View File
@@ -1 +1,4 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('./babel.config.js');
+1
View File
@@ -1,3 +1,4 @@
.eslintrc.js
**/build/*
**/coverage/*
**/node_modules/*
+6 -1
View File
@@ -1,3 +1,6 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint');
module.exports = {
@@ -13,6 +16,8 @@ module.exports = {
// add override for any (a metric ton of them, initial conversion)
'@typescript-eslint/no-explicit-any': 'off',
// these should be removed, there are 8 of them as errors
'@typescript-eslint/no-non-null-assertion': 'off'
'@typescript-eslint/no-non-null-assertion': 'off',
// this seems very broken atm, false positives
'@typescript-eslint/unbound-method': 'off'
}
};
+5 -100
View File
@@ -2,110 +2,15 @@ name: PR
on: [pull_request]
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
pr:
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Config yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: lint
run: |
yarn install --immutable | grep -v 'YN0013'
yarn lint
test:
name: Testing
step: ['lint', 'test', 'build']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Config yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: test
- name: ${{ matrix.step }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn test
build_code:
name: Build Code
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Config yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: build
run: |
yarn install --immutable | grep -v 'YN0013'
yarn build
build_docs:
name: Build Docs
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Config yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: build
run: |
yarn install --immutable | grep -v 'YN0013'
yarn docs
yarn ${{ matrix.step }}
+8 -61
View File
@@ -5,82 +5,29 @@ on:
- master
jobs:
build_code:
name: Build Code
if: "! contains(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-latest
master:
strategy:
matrix:
node-version: [12.x]
step: ['build:release']
name: ${{ matrix.step }}
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/api'"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.GH_PAT }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Config yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: build
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn polkadot-ci-ghact-build
build_docs:
name: Build Docs
if: "! contains(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Config yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: build
env:
GH_PAT: ${{ secrets.GH_PAT }}
GH_TOKEN: ${{ secrets.GH_PAT }}
GH_PAGES_SRC: build-docs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn polkadot-ci-ghact-docs
yarn ${{ matrix.step }}
dummy:
name: Dummy
if: "contains(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: dummy
run: |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+55
View File
File diff suppressed because one or more lines are too long
-58
View File
File diff suppressed because one or more lines are too long
+7 -2
View File
@@ -1,10 +1,15 @@
enableImmutableInstalls: false
enableProgressBars: false
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.js
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-berry.js
yarnPath: .yarn/releases/yarn-2.2.2.cjs
+811 -73
View File
File diff suppressed because it is too large Load Diff
+2 -3
View File
@@ -7,13 +7,13 @@
# @polkadot/api
This library provides a clean wrapper around all the methods exposed by a Polkadot/Subtrate network client and defines all the types exposed by a node. For complete documentation around the classes, interfaces and their use, visit the [documentation portal](https://polkadot.js.org/api/).
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the classes, interfaces and their use, visit the [documentation portal](https://polkadot.js.org/api/).
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) guides when changing versions.
## tutorials
Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
## overview
@@ -27,7 +27,6 @@ The API is split up into a number of internal packages -
Type definitions for interfaces as exposed by Polkadot & Substrate clients -
- [@polkadot/jsonrpc](packages/jsonrpc/) Definitions for JSONRPC endpoints
- [@polkadot/types](packages/types/) Codecs for all Polkadot and Substrate primitives
## development
+3
View File
@@ -1 +1,4 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/babel');
+4 -2
View File
@@ -1,4 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2017-2020 @polkadot/api authors & contributors
# SPDX-License-Identifier: Apache-2.0
function copy_folder () {
SRC="packages/$1/build"
@@ -18,6 +20,6 @@ copy_folder "api-derive"
copy_folder "metadata"
copy_folder "rpc-core"
copy_folder "rpc-provider"
copy_folder "jsonrpc"
copy_folder "types"
copy_folder "types-known"
copy_folder "typegen"
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright 2017-2020 @polkadot/api authors & contributors
# SPDX-License-Identifier: Apache-2.0
function copy_folder () {
SRC="packages/$1/build"
DST="../test/js-test/node_modules/@polkadot/$1"
echo "** Copying $SRC to $DST"
rm -rf $DST
cp -r $SRC $DST
}
yarn polkadot-dev-build-ts
copy_folder "api"
copy_folder "api-contract"
copy_folder "api-derive"
copy_folder "metadata"
copy_folder "rpc-core"
copy_folder "rpc-provider"
copy_folder "types"
copy_folder "types-known"
copy_folder "typegen"
-89
View File
@@ -1,89 +0,0 @@
module.exports = {
base: '/api/',
title: 'polkadot-js/api',
description: 'API libraries and interfaces for communicating with Polkadot and Substrate nodes',
markdown: {
lineNumbers: true
},
themeConfig: {
displayAllHeaders: true,
nav: [
{ text: 'Polkadot/Substrate Apps', link: 'https://polkadot.js.org/apps/' },
{ text: 'Project family', link: 'https://polkadot.js.org/' },
{
text: 'Documentation',
items: [
{ text: 'API Reference (this)', link: 'https://polkadot.js.org/api/' },
{ text: 'Utility Reference', link: 'https://polkadot.js.org/common/' },
{ text: 'UI Libs Reference', link: 'https://polkadot.js.org/ui/' },
]
},
{ text: 'GitHub', link: 'https://github.com/polkadot-js/api' }
],
search: false,
sidebar: [
{
title: 'Getting started',
path: '/start/',
collapsable: false,
sidebarDepth: 0,
children: [
['start/install.md', 'Installation'],
['start/basics.md', 'Basics & Metadata'],
['start/create.md', 'Creating an instance'],
['start/api.consts.md', 'Runtime Constants'],
['start/api.query.md', 'State queries'],
['start/api.rpc.md', 'RPC calls'],
['start/api.query.subs.md', 'Query subscriptions'],
['start/api.query.multi.md', 'Multi queries'],
['start/api.query.other.md', 'Query extras'],
['start/api.tx.md', 'Transactions'],
['start/keyring.md', 'Keyring'],
['start/api.tx.subs.md', 'Transaction subscriptions'],
['start/api.tx.wrap.md', 'Complex transactions'],
['start/types.basics.md', 'Type basics'],
['start/types.extend.md', 'Extending types'],
['start/types.create.md', 'Creating types'],
['start/typescript.md', 'TypeScript interfaces'],
['start/typescript.user.md', 'TypeScript user generated'],
['start/FAQ.md', 'FAQ']
]
},
{
title: 'Examples (Promise API)',
path: '/examples/promise/',
collapsable: false,
sidebarDepth: 0,
children: [
['examples/promise/01_simple_connect/', 'Simple connect'],
['examples/promise/02_listen_to_blocks/', 'Listen to blocks'],
['examples/promise/03_listen_to_balance_change/', 'Listen to balance change'],
['examples/promise/04_unsubscribe/', 'Unsubscribe from listening'],
['examples/promise/05_read_storage/', 'Read chain state'],
['examples/promise/06_make_transfer/', 'Make a transfer'],
['examples/promise/08_system_events/', 'Display system events'],
['examples/promise/09_transfer_events/', 'Transaction with events'],
['examples/promise/10_upgrade_chain/', 'Upgrade via sudo'],
['examples/promise/90_typegen/', 'TypeScript augmentation']
]
},
{
title: 'Substrate defaults',
path: '/substrate/',
collapsable: false,
sidebarDepth: 0,
children: [
['substrate/rpc.md', 'Substrate RPC'],
['substrate/constants.md', 'Constants'],
['substrate/storage.md', 'State storage'],
['substrate/extrinsics.md', 'Extrinsics'],
['substrate/events.md', 'System events'],
['substrate/errors.md', 'Errors']
]
},
['/api/', '@polkadot/api'],
['/types/', '@polkadot/types'],
'/CONTRIBUTING.md'
]
}
};
-9
View File
@@ -1,9 +0,0 @@
$accentColor = #fd8824
$textColor = #2c3e50
.home .hero .description,
.home .feature h2,
.home .feature p {
color: $textColor
opacity: 0.75
}
-50
View File
@@ -1,50 +0,0 @@
---
home: true
heroText:
tagline:
# Bringing JavaScript to the Polkadot world.
# actionText: Repository Overview
# actionLink: /REPOS.md
features:
- title: API
details: A powerful dynamic API that allows chain interactions with transparent encoding and decoding.
- title: Substrate defaults
details: An overview of the various default methods, state entries and RPCs for Substrate-based chains.
- title: Types
details: Various type interfaces to make using returned values from API calls transparent in your code.
footer: Apache-2 Licensed | Copyright © 2017-2019 polkadot-js authors and contributors
---
## Welcome
The API provides application developers the ability to query a node and interact with the Polkadot or Substrate chains using Javascript. Here you will find documentation and examples to get you started.
::: tip Getting started & Examples
[Jump right in](/start/) and get an overview on using the API in your projects, from installation all the way through to making it do magic. Already understand how things work and just want the examples? [The ApiPromise examples](/examples/promise/) provide some basic recipies.
:::
## Available packages
This repository split up into a number of internal packages, namely -
- [api](api/README.md) Promise and RxJS-based APIs
- [types](types/README.md) Type encoding and decoding wrappers
## The Polkadot Project
You can read more about the Polkadot Network at [https://polkadot.network/](https://polkadot.network/) and more about the polkadot-js projects at [https://polkadot.js.org](https://polkadot.js.org)
## Github repositories
You can find the Polkadot repositories at:
- [https://github.com/polkadot-js](https://github.com/polkadot-js)
- [https://github.com/paritytech/polkadot](https://github.com/paritytech/polkadot)
- [https://github.com/paritytech/substrate](https://github.com/paritytech/substrate)
This documentation is generated from [https://github.com/polkadot-js/api](https://github.com/polkadot-js/api)
## Contributing
Contribution to the Polkadot JS API are more than welcome. You can [report issues](https://github.com/polkadot-js/api/issues/new) and [log feature requests](https://github.com/polkadot-js/api/issues/new).
-62
View File
@@ -1,62 +0,0 @@
## Getting started
- [Introduction](start/README.md)
- [Installation](start/install.md)
- [Basics](start/basics.md)
- [Creating](start/create.md)
- [Constant queries](start/api.consts.md)
- [State queries](start/api.query.md)
- [RPC queries](start/api.rpc.md)
- [State subscriptions](start/api.query.subs.md)
- [Multi state retrieval](start/api.query.multi.md)
- [State query utilities](start/api.query.other.md)
- [Transactions](start/api.tx.md)
- [Keyring](start/keyring.md)
- [Transaction subscriptions](start/api.tx.subs.md)
- [Complex transactions](start/api.tx.wrap.md)
- [Type basics](start/types.basics.md)
- [Type extension](start/types.extend.md)
- [TypeScript interfaces](start/typescript.md)
- [TypeScript user generated](start/typescript.user.md)
## Packages
- [api](api/README.md)
- [ApiPromise](api/classes/_promise_index_.apipromise.md)
- [ApiRx](api/classes/_rx_index_.apirx.md)
- [rpc-provider](rpc-provider/README.md)
- [HttpProvider](rpc-provider/classes/_http_index_.httpprovider.md)
- [WsProvider](rpc-provider/classes/_ws_index_.wsprovider.md)
- [types (codec implementation)](types/README.md)
## Interfaces
- [Substrate](substrate/README.md)
- [RPC](substrate/rpc.md)
- [Constants (runtime)](substrate/constants.md)
- [Chain state (runtime)](substrate/storage.md)
- [Extrinsics (runtime)](substrate/extrinsics.md)
- [Events (runtime)](substrate/events.md)
## Examples
- [ApiPromise](examples/promise/README.md)
- [Simple connect](examples/promise/01_simple_connect/README.md)
- [Listen to blocks](examples/promise/02_listen_to_blocks/README.md)
- [Listen to balance change](examples/promise/03_listen_to_balance_change/README.md)
- [Unsubscribe from listening](examples/promise/04_unsubscribe/README.md)
- [Read chain state](examples/promise/05_read_storage/README.md)
- [Make a transfer](examples/promise/06_make_transfer/README.md)
- [Display system events](examples/promise/08_system_events/README.md)
- [Transaction with events](examples/promise/09_transfer_events/README.md)
- [Upgrade via sudo](examples/promise/10_upgrade_chain/README.md)
- [ApiRx](examples/rx/README.md)
- [Simple connect](examples/rx/01_simple_connect/README.md)
- [Listen to blocks](examples/rx/02_listen_to_blocks/README.md)
- [Listen to balance change](examples/rx/03_listen_to_balance_change/README.md)
- [Unsubscribe from listening](examples/rx/04_unsubscribe/README.md)
- [Read chain state](examples/rx/05_read_storage/README.md)
- [Make a transfer](examples/rx/06_make_transfer/README.md)
- [Display system events](examples/rx/08_system_events/README.md)(
- [Transaction with events](examples/rx/09_transfer_events/README.md)
- [Upgrade via sudo](examples/rx/10_upgrade_chain/README.md)
-1
View File
@@ -1 +0,0 @@
yarn.lock
@@ -1,5 +0,0 @@
# Simple Connect
The following example shows how to instantiate a Polkadot API object and use it to connect to a node using ApiPromise.
<<< @/docs/examples/promise/01_simple_connect/index.js
@@ -1,24 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Required imports
const { ApiPromise, WsProvider } = require('@polkadot/api');
async function main () {
// Initialise the provider to connect to the local node
const provider = new WsProvider('ws://127.0.0.1:9944');
// Create the API and wait until ready
const api = await ApiPromise.create({ provider });
// Retrieve the chain & node information information via rpc calls
const [chain, nodeName, nodeVersion] = await Promise.all([
api.rpc.system.chain(),
api.rpc.system.name(),
api.rpc.system.version()
]);
console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);
}
main().catch(console.error).finally(() => process.exit());
@@ -1,19 +0,0 @@
{
"name": "01_simple_connect",
"version": "0.2.0",
"description": "Example showing how to connect using a WebSocket",
"main": "index.js",
"author": "chevdor",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,8 +0,0 @@
# Listen to new blocks
This example shows how to subscribe to new blocks.
It displays the block number every time a new block is seen by the node you are connected to.
NOTE: The example runs until you stop it with CTRL+C
<<< @/docs/examples/promise/02_listen_to_blocks/index.js
@@ -1,29 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
async function main () {
// Here we don't pass the (optional) provider, connecting directly to the default
// node/port, i.e. `ws://127.0.0.1:9944`. Await for the isReady promise to ensure
// the API has connected to the node and completed the initialisation process
const api = await ApiPromise.create();
// We only display a couple, then unsubscribe
let count = 0;
// Subscribe to the new headers on-chain. The callback is fired when new headers
// are found, the call itself returns a promise with a subscription that can be
// used to unsubscribe from the newHead subscription
const unsubscribe = await api.rpc.chain.subscribeNewHeads((header) => {
console.log(`Chain is at block: #${header.number}`);
if (++count === 256) {
unsubscribe();
process.exit(0);
}
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "02_listen_to_blocks",
"version": "0.2.0",
"description": "Example showing how to use subscriptions",
"main": "index.js",
"author": "chevdor",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Listen to balance changes
This example shows how to instantiate a Polkadot API object and use it to connect to a node and retrieve balance updates.
<<< @/docs/examples/promise/03_listen_to_balance_change/index.js
@@ -1,37 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
// Known account we want to use (available on dev chain, with funds)
const Alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
async function main () {
// Create an await for the API
const api = await ApiPromise.create();
// Retrieve the initial balance. Since the call has no callback, it is simply a promise
// that resolves to the current on-chain value
let { nonce: previousNonce, data: { free: previousFree } } = await api.query.system.account(Alice);
console.log(`${Alice} has a balance of ${previousFree}, nonce ${previousNonce}`);
console.log(`You may leave this example running and start example 06 or transfer any value to ${Alice}`);
// Here we subscribe to any balance changes and update the on-screen value
api.query.system.account(Alice, ({ nonce: currentNonce, data: { free: currentFree } }) => {
// Calculate the delta
const change = currentFree.sub(previousFree);
// Only display positive value changes (Since we are pulling `previous` above already,
// the initial balance change will also be zero)
if (!change.isZero()) {
console.log(`New balance change of ${change}, nonce ${currentNonce}`);
previousFree = currentFree;
previousNonce = currentNonce;
}
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "03_listen_to_balance_change",
"version": "0.2.0",
"description": "Example showing how to subscribe to balance change",
"main": "index.js",
"author": "chevdor",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Listen to balance changes
This example shows how to instantiate a Polkadot API object and use it to connect to a node and retrieve balance updates.
<<< @/docs/examples/promise/03_listen_to_balance_change/index.js
@@ -1,23 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
// Known account we want to use (available on dev chain, with funds)
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
async function main () {
// Create an await for the API
const api = await ApiPromise.create();
console.log('Tracking balances for:', [ALICE, BOB]);
// Subscribe and listen to several balance changes
api.query.system.account.multi([ALICE, BOB], (balances) => {
console.log('Change detected, new balances: ', balances.map(({ data: { free } }) => free));
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "03_listen_to_multiple_balances_change",
"version": "0.2.0",
"description": "Example showing how to subscribe to multiple balances change",
"main": "index.js",
"author": "chevdor",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,7 +0,0 @@
# Unsubscribe from listening to updates
This example shows how to subscribe to and later unsubscribe from listening to block updates.
In this example we're calling the built-in unsubscribe() function after a timeOut of 20s to cleanup and unsubscribe from listening to updates.
<<< @/docs/examples/promise/04_unsubscribe/index.js
@@ -1,24 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
async function main () {
// Create a new instance of the api
const api = await ApiPromise.create();
// Subscribe to chain updates and log the current block number on update.
const unsubscribe = await api.rpc.chain.subscribeNewHeads((header) => {
console.log(`Chain is at block: #${header.number}`);
});
// In this example we're calling the unsubscribe() function that is being
// returned by the api call function after 20s.
setTimeout(() => {
unsubscribe();
console.log('Unsubscribed');
}, 20000);
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "04_unsubscribe",
"version": "0.2.0",
"description": "Example showing how to unsubscribe from a subscription",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Read storage
Many important variables are available through the storage API. This example shows how to call a few of those APIs.
<<< @/docs/examples/promise/05_read_storage/index.js
@@ -1,41 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
// Our address for Alice on the dev chain
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
async function main () {
// Create our API with a default connection to the local node
const api = await ApiPromise.create();
// Make our basic chain state/storage queries, all in one go
const [{ nonce: accountNonce }, now, validators] = await Promise.all([
api.query.system.account(ALICE),
api.query.timestamp.now(),
api.query.session.validators()
]);
console.log(`accountNonce(${ALICE}) ${accountNonce}`);
console.log(`last block timestamp ${now.toNumber()}`);
if (validators && validators.length > 0) {
// Retrieve the balances for all validators
const validatorBalances = await Promise.all(
validators.map(authorityId =>
api.query.system.account(authorityId)
)
);
// Print out the authorityIds and balances of all validators
console.log('validators', validators.map((authorityId, index) => ({
address: authorityId.toString(),
balance: validatorBalances[index].data.free.toHuman(),
nonce: validatorBalances[index].nonce.toHuman()
})));
}
}
main().catch(console.error).finally(() => process.exit());
@@ -1,18 +0,0 @@
{
"name": "05_read_storage",
"version": "0.2.0",
"description": "Example showing how to query storage",
"main": "index.js",
"author": "chevdor",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Read storage, at a specific blockhash
In addition to querying the latest storage, you can make storage queries at a specific blockhash. Be aware that the node applies a pruning strategy and typically only keeps the last 256 blocks, unless run in archive mode.
<<< @/docs/examples/promise/05_read_storage_at/index.js
@@ -1,32 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
// Our address for Alice on the dev chain
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
async function main () {
// Create our API with a default connection to the local node
const api = await ApiPromise.create();
// Retrieve the last block header, extracting the hash and parentHash
const { hash, parentHash } = await api.rpc.chain.getHeader();
console.log(`last header hash ${hash.toHex()}`);
// Retrieve the balance at the preceding block for Alice. For at queries
// the format is always `.at(<blockhash>, ...params)`
const balance = await api.query.system.account.at(parentHash, ALICE);
console.log(`Alice's balance at ${parentHash.toHex()} was ${balance.data.free}`);
// Now perform a multi query, returning multiple balances at once
const balances = await api.query.system.account.multi([ALICE, BOB]);
console.log(`Current balances for Alice and Bob are ${balances[0].data.free} and ${balances[1].data.free}`);
}
main().catch(console.error).finally(() => process.exit());
@@ -1,18 +0,0 @@
{
"name": "05_read_storage_at",
"version": "0.2.0",
"description": "Example showing how to query storage at a specific block",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Make a simple transfer
This sample shows how to create a transaction to make a transfer from one an account to another.
<<< @/docs/examples/promise/06_make_transfer/index.js
@@ -1,29 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API, Keyring and some utility functions
const { ApiPromise } = require('@polkadot/api');
const { Keyring } = require('@polkadot/keyring');
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
async function main () {
// Instantiate the API
const api = await ApiPromise.create();
// Constuct the keying after the API (crypto has an async init)
const keyring = new Keyring({ type: 'sr25519' });
// Add Alice to our keyring with a hard-deived path (empty phrase, so uses dev)
const alice = keyring.addFromUri('//Alice');
// Create a extrinsic, transferring 12345 units to Bob
const transfer = api.tx.balances.transfer(BOB, 12345);
// Sign and send the transaction using our account
const hash = await transfer.signAndSend(alice);
console.log('Transfer sent with hash', hash.toHex());
}
main().catch(console.error).finally(() => process.exit());
@@ -1,18 +0,0 @@
{
"name": "06_make_transfer",
"version": "0.2.0",
"description": "Example showing how to make a transfer",
"main": "index.js",
"author": "chevdor",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Make a Transfer with allowed block permissions
This transactions shows you how to add a nonce and a valid length of blocks a transaction is valid for.
This is important because as an account drops below the exsistential limit (0.1 dots) it gets pruned from the state tree. If it is added back its nonce starts at 0 again and is now vulnerable to replay attacks.
@@ -1,45 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API, Keyring and some utility functions
const { ApiPromise } = require('@polkadot/api');
const { Keyring } = require('@polkadot/keyring');
const { createType } = require('@polkadot/types');
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
async function main () {
// Instantiate the API
const api = await ApiPromise.create(); // default provider
// Constuct the keying after the API (crypto has an async init)
const keyring = new Keyring({ type: 'sr25519' });
// Add Alice to our keyring with a hard-derived path (empty phrase, so uses dev)
const alice = keyring.addFromUri('//Alice');
// Get nonce for account
const { nonce } = await api.query.system.account(alice.address);
// Get current block
const signedBlock = await api.rpc.chain.getBlock();
// Get current block height and hash
const currentHeight = signedBlock.block.header.number;
const blockHash = signedBlock.block.header.hash;
// NOTE By default the API will send mortal transactions, only explicitly construct
// if you wish to override the defaults
// construct a mortal era
const era = createType('ExtrinsicEra', { current: currentHeight, period: 10 });
// Create an extrinsic, transferring 12345 units to Bob
const transfer = api.tx.balances.transfer(BOB, 12345);
// Sign and send the transaction using our account with a nonce and the length of blocks the transaction is valid for
const hash = await transfer.signAndSend(alice, { blockHash, era, nonce });
console.log('Transfer sent with hash', hash.toHex());
}
main().catch(console.error).finally(() => process.exit());
@@ -1,18 +0,0 @@
{
"name": "07_make_transfer_with_allowed_block_permissions_only",
"version": "0.1.0",
"description": "Example showing how to make a transfer with allowed block permissions",
"main": "index.js",
"author": "Jesse",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Traverse events
Query the system events and extract information from them. This example runs until exited via Ctrl-C
<<< @/docs/examples/promise/08_system_events/index.js
@@ -1,36 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiPromise } = require('@polkadot/api');
async function main () {
// Create our API with a default connection to the local node
const api = await ApiPromise.create();
// Subscribe to system events via storage
api.query.system.events((events) => {
console.log(`\nReceived ${events.length} events:`);
// Loop through the Vec<EventRecord>
events.forEach((record) => {
// Extract the phase, event and the event types
const { event, phase } = record;
const types = event.typeDef;
// Show what we are busy with
console.log(`\t${event.section}:${event.method}:: (phase=${phase.toString()})`);
console.log(`\t\t${event.meta.documentation.toString()}`);
// Loop through each of the parameters, displaying the type and data
event.data.forEach((data, index) => {
console.log(`\t\t\t${types[index].type}: ${data.toString()}`);
});
});
});
}
main().catch((error) => {
console.error(error);
process.exit(-1);
});
@@ -1,18 +0,0 @@
{
"name": "08_system_events",
"version": "0.1.0",
"description": "Example showing how to query and parse events",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Transfer events
Display the events that occur during a transfer by sending a value to a random account
<<< @/docs/examples/promise/09_transfer_events/index.js
@@ -1,58 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API & Provider and some utility functions
const { ApiPromise } = require('@polkadot/api');
// Import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
const testKeyring = require('@polkadot/keyring/testing');
// Utility function for random values
const { randomAsU8a } = require('@polkadot/util-crypto');
// Some constants we are using in this sample
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const AMOUNT = 10000;
async function main () {
// Create the API and wait until ready
const api = await ApiPromise.create();
// Create an instance of our testing keyring
// If you're using ES6 module imports instead of require, just change this line to:
// const keyring = testKeyring();
const keyring = testKeyring.default();
// Get the nonce for the admin key
const { nonce } = await api.query.system.account(ALICE);
// Find the actual keypair in the keyring
const alicePair = keyring.getPair(ALICE);
// Create a new random recipient
const recipient = keyring.addFromSeed(randomAsU8a(32)).address;
console.log('Sending', AMOUNT, 'from', alicePair.address, 'to', recipient, 'with nonce', nonce.toString());
// Do the transfer and track the actual status
api.tx.balances
.transfer(recipient, AMOUNT)
.signAndSend(alicePair, { nonce }, ({ events = [], status }) => {
console.log('Transaction status:', status.type);
if (status.isInBlock) {
console.log('Included at block hash', status.asInBlock.toHex());
console.log('Events:');
events.forEach(({ phase, event: { data, method, section } }) => {
console.log('\t', phase.toString(), `: ${section}.${method}`, data.toString());
});
} else if (status.isFinalized) {
console.log('Finalized block hash', status.asFinalized.toHex());
process.exit(0);
}
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "09_transfer_events",
"version": "0.1.0",
"description": "Example showing how to transfer DOTs (with events)",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Chain upgrade
Performs a chain upgrade using the `sudo` module. This may brick your chain, so use it as an educational sample. (use `substrate purge-chain --dev` to remove DB and recover).
<<< @/docs/examples/promise/10_upgrade_chain/index.js
@@ -1,60 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API & Provider and some utility functions
const { ApiPromise, WsProvider } = require('@polkadot/api');
// import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
const testKeyring = require('@polkadot/keyring/testing');
const fs = require('fs');
async function main () {
// Initialise the provider to connect to the local node
const provider = new WsProvider('ws://127.0.0.1:9944');
// Create the API and wait until ready (optional provider passed through)
const api = await ApiPromise.create({ provider });
// Retrieve the upgrade key from the chain state
const adminId = await api.query.sudo.key();
// Find the actual keypair in the keyring (if this is a changed value, the key
// needs to be added to the keyring before - this assumes we have defaults, i.e.
// Alice as the key - and this already exists on the test keyring)
const keyring = testKeyring.default();
const adminPair = keyring.getPair(adminId.toString());
// Retrieve the runtime to upgrade
const code = fs.readFileSync('./test.wasm').toString('hex');
const proposal = api.tx.system && api.tx.system.setCode
? api.tx.system.setCode(`0x${code}`) // For newer versions of Substrate
: api.tx.consensus.setCode(`0x${code}`); // For previous versions
console.log(`Upgrading from ${adminId}, ${code.length / 2} bytes`);
// Perform the actual chain upgrade via the sudo module
api.tx.sudo
.sudo(proposal)
.signAndSend(adminPair, ({ events = [], status }) => {
console.log('Proposal status:', status.type);
if (status.isInBlock) {
console.error('You have just upgraded your chain');
console.log('Included at block hash', status.asInBlock.toHex());
console.log('Events:');
console.log(JSON.stringify(events.toHuman(), null, 2));
} else if (status.isFinalized) {
console.log('Finalized block hash', status.asFinalized.toHex());
process.exit(0);
}
});
}
main().catch((error) => {
console.error(error);
process.exit(-1);
});
@@ -1,18 +0,0 @@
{
"name": "10_upgrade_chain",
"version": "0.2.0",
"description": "Example showing how to upgrade via upgradeKey",
"main": "index.js",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
Binary file not shown.
-248
View File
@@ -1,248 +0,0 @@
# typegen
This is a sample TypeScript project [with full source & config on GithHub](https://github.com/polkadot-js/api/tree/master/docs/examples/promise/90_typegen), that uses `@polkadot/typegen` to generate type definitions that can be used to decorate the `@polkadot/api`. It uses both types defined for the specific chain as well as the chain metadata to generate TypeScript interfaces. This means that interfaces such as `api.query.*`, `api.tx.*` and `api.consts.*` will be decorated based on chain-specific information, instead of an un-augmented catch-all definition.
**NOTE** This is built using the updates in the `1.4.0` api track and as such it uses the latest (at the time of writing) `@polkadot/api 1.4.0`. If you want to play on your own, it is also suggested that you use the `1.4+` series since some generation types have moved around internally, making it easier to augment.
## Packages
For the packages we need from the `@polkadot/*` we have added `@polkadot/api` (we want to do API stuff) and `@polkadot/typegen` (to generate the actual interfaces). So our scripts and dependencies inside `package.json` contain the following -
```json
{
"scripts": {
"build": "yarn generate:defs && yarn generate:meta",
"generate:defs": "ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input ./src/interfaces",
"generate:meta": "ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --package sample-polkadotjs-typegen/interfaces --endpoint ./edgeware.json --output ./src/interfaces",
"lint": "tsc --noEmit --pretty"
},
"dependencies": {
"@polkadot/api": "^1.4.0"
},
"devDependencies": {
"@polkadot/typegen": "^1.4.0",
"ts-node": "^8.6.2",
"typescript": "^3.8.2"
}
}
```
We will delve into the setup and running the scripts and what they do in a short bit, but as of now just notice that we are running the scripts via `ts-node`. Since we supply our definitions as `*.ts` files, this is important otherwise they will not be parsable. `build` will just run both the types and meta generators (in that order, so metadata can use the types) and we have a `lint` that can just check that everything is as it is meant to be.
## Metadata setup
The idea here is to use the actual chain metadata to generate the actual api augmented endpoints. The metadata we are adding here (in addition to the user types), is from the Edgeware Berlin testnet. So this is a real-world example of configuring the API for a specific substrate chain. For the metadata retrieval, we just ran a simple curl command to get it from the node -
`curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "state_getMetadata", "params":[]}' http://localhost:9933`
And then add the full JSONPC output as received to the `edgeware.json` file as specified by the generation command. A trimmed version would look like -
```json
{"jsonrpc":"2.0","result":"0x6d6574610b6c185379737....","id":29}
```
The generator can also use a `wss://` as an `--endpoint` param as part of the generation, but in most cases you would want a static metadata to work from in development, hence we are actually adding it here.
## Types setup
The types are defined in the `src/interfaces` folder. While this repo contains a number of generated files in there as well, you basically only need to manually add the following -
- `src/interfaces/definitions.ts` - this just exports all the sub-folder definitions in one go
- `src/interfaces/<module>/definitions.ts` - type definitions for a specific module
This structure fully matches what is available in the `@polkadot/type/interfaces` folder, so the structure is setup based on the convention used in the `@polkadot/types` library. The generating scripts will expect something matching this since the same underlying code is actually used inside `@polkadot/types` as well. The top-level `interfaces/` folder can be name anything, however the internal content structure need to match what is defined above.
For the top-level the definition file has the following contents -
```js
export { default as signaling } from './signaling/definitions';
export { default as treasuryRewards } from './treasuryRewards/definitions';
export { default as voting } from './voting/definitions';
```
As explained above, it really is just a re-export of the definitions, so they are all easily accessible to the outside, i.e. we will use this import inside our own code to use the definitions in API initialization. The generation scripts will load this file to determine which types it needs to import. By the `@polkadot/types` convention, match the export names with the folders (preferably your runtime module names), the generation scripts will use these names to find the correct folders to output the generated `types.ts` to.
For each of the folders, `signaling`, `treasuryRewards` and `voting` another `definitions.ts` file is contained within. Looking at the one from `signaling`, it contains this -
```js
export default {
types: {
ProposalRecord: {
index: 'u32',
author: 'AccountId',
stage: 'VoteStage',
transition_time: 'u32',
title: 'Text',
contents: 'Text',
vote_id: 'u64'
},
ProposalContents: 'Vec<u8>',
ProposalTitle: 'Vec<u8>'
}
}
```
Just the type definitions (the structure of which you should be familiar with), nested inside a `types: {...}` container. This allows us future extension points, i.e. there is some work to expose the custom RPC types alongside, so that would become another key on a per-module basis.
In the above, you will note that the `ProposalRecord` references a type for `voting`, i.e. `VoteStage`. The type generation and resolution will determine where the type comes from, and provide the required imports on generation.
Looking at the example in this repo, it also has `augment*`, `index.ts` and `types.ts` files in the interfaces folder. These are all generated, and will be re-generated when the generator is run - so all edits to these files will be lost. The only requirement for user-edits are the `definitions.ts` files.
## Generating
Now that both the metadata nd types setup is completed, we just run the build command via `yarn build` and magically (assuming you didn't have the `augment*` and other generated files), these files will be added. When running this command, the console should display something like -
```
> yarn build
$ yarn generate:defs && yarn generate:meta
$ ts-node --skip-project \
node_modules/.bin/polkadot-types-from-defs \
--package sample-polkadotjs-typegen/interfaces \
--input ./src/interfaces
sample-polkadotjs-typegen/src/interfaces/types.ts
Generating
Extracting interfaces for signaling
...
Writing
sample-polkadotjs-typegen/src/interfaces/augment-types.ts
Generating
Writing
$ ts-node --skip-project \
node_modules/.bin/polkadot-types-from-chain \
--package sample-polkadotjs-typegen/interfaces \
--endpoint ./edgeware.json \
--output ./src/interfaces
Generating from metadata, 81,267 bytes
...
sample-polkadotjs-typegen/src/interfaces/augment-api.ts
Generating
Writing
✨ Done in 4.04s.
```
Now if we check the actual output against the source via `yarn lint`, we would see that valid output has been generated -
```
> yarn lint
$ tsc --noEmit --pretty
✨ Done in 2.28s.
```
## Peering at the output
We are ready to use all these generated types this after some TS config. If you take a look at the generated `src/signaling/types.ts`, you would see generated TS interfaces, such as -
```js
import { Struct } from '@polkadot/types/codec';
import { Bytes, Text, u32, u64 } from '@polkadot/types/primitive';
import { AccountId } from '@polkadot/types/interfaces/runtime';
import { VoteStage } from 'sample-polkadotjs-typegen/interfaces/voting';
/** @name ProposalContents */
export interface ProposalContents extends Bytes {}
/** @name ProposalRecord */
export interface ProposalRecord extends Struct {
readonly index: u32;
readonly author: AccountId;
readonly stage: VoteStage;
readonly transition_time: u32;
readonly title: Text;
readonly contents: Text;
readonly vote_id: u64;
}
/** @name ProposalTitle */
export interface ProposalTitle extends Bytes {}
```
As mentioned earlier, here you will notice the `import { VoteStage }`, the generator has determined that `voting` exports that interface and has added the required imports.
## TypeScript config
Now that we have files generated, it is time to make TypeScript aware of the types and add an explicit override into out `tsconfig.json`. After some changes, the paths in the config looks as follow (comments are in teh actual config file here) -
```json
{
"compilerOptions": {
"paths": {
"sample-polkadotjs-typegen/*": ["src/*"],
"@polkadot/api/augment": ["src/interfaces/augment-api.ts"],
"@polkadot/types/augment": ["src/interfaces/augment-types.ts"]
}
}
}
```
Effectively what we do above is tell the TypeScript compiler to not use the built-in API augmentation, but rather to replace it with our version. This means that all types from these are injected not by the substrate-latest-master version, but rather with what we have defined above.
## Usage
For simple usage, we have added the `src/index.ts` file that show how the metadata and types actually decorate the API. In addition, we also have setup instructions included here.
```js
// We need to import the augmented definitions "somewhere" in our project, however since we have
// it in tsconfig as an override and the api/types has imports, it is not strictly required here.
// Because of the tsconfig override, we could import from '@polkadot/{api, types}/augment'
import './interfaces/augment-api';
import './interfaces/augment-types';
// all type stuff, the only one we are using here
import type { VoteRecord } from './interfaces';
// external imports
import { ApiPromise } from '@polkadot/api';
import { createType } from '@polkadot/types';
// our local stuff
import * as definitions from './interfaces/definitions';
async function main (): Promise<void> {
// extract all types from definitions - fast and dirty approach, flatted on 'types'
const types = Object.values(definitions).reduce((res, { types }): object => ({ ...res, ...types }), {});
const api = await ApiPromise.create({
types: {
...types,
// aliases that don't do well as part of interfaces
'voting::VoteType': 'VoteType',
'voting::TallyType': 'TallyType',
// chain-specific overrides
Keys: 'SessionKeys4'
}
});
// get a query
const recordOpt = await api.query.voting.voteRecords(123);
// the types match with what we expect here
let firstRecord: VoteRecord | null = recordOpt.unwrapOr(null);
console.log(firstRecord?.toHuman());
// it even does work for arrays & subscriptions
api.query.signaling.activeProposals((results): void => {
results.forEach(([hash, blockNumber]): void => {
console.log(hash.toHex(), ':', blockNumber.toNumber());
});
});
// even createType works, allowing for our types to be used
console.log(`Balance2 bitLength:`, [
api.createType('Balance2').bitLength(),
api.registry.createType('Balance2').bitLength(),
createType(api.registry, 'Balance2').bitLength()
]);
}
await main();
```
## And that is a ...
... wrap. Just a really simple walk-through to customizing the API TypeScript definitions for your chain.
File diff suppressed because one or more lines are too long
@@ -1,24 +0,0 @@
{
"name": "sample-polkadotjs-typegen",
"version": "0.0.1",
"description": "A sample using @polkadot/typegen to generate type definitions",
"main": "index.js",
"repository": "https://github.com/jacogr/sample-polkadotjs-typegen",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "The Unlicense",
"private": true,
"scripts": {
"build": "yarn generate:defs && yarn generate:meta",
"generate:defs": "ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input ./src/interfaces",
"generate:meta": "ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --package sample-polkadotjs-typegen/interfaces --endpoint ./edgeware.json --output ./src/interfaces --strict",
"lint": "tsc --noEmit --pretty"
},
"dependencies": {
"@polkadot/api": "^1.4.0"
},
"devDependencies": {
"@polkadot/typegen": "^1.4.0",
"ts-node": "^8.6.2",
"typescript": "^3.8.2"
}
}
@@ -1,54 +0,0 @@
// We need to import the augmented definitions "somewhere" in our project, however since we have
// it in tsconfig as an override and the api/types has imports, it is not strictly required here.
// Because of the tsconfig override, we could import from '@polkadot/{api, types}/augment'
import './interfaces/augment-api';
import './interfaces/augment-types';
// all type stuff, the only one we are using here
import type { VoteRecord } from './interfaces';
// external imports
import { ApiPromise } from '@polkadot/api';
import { createType } from '@polkadot/types';
// our local stuff
import * as definitions from './interfaces/definitions';
async function main (): Promise<void> {
// extract all types from definitions - fast and dirty approach, flatted on 'types'
const types = Object.values(definitions).reduce((res, { types }): object => ({ ...res, ...types }), {});
const api = await ApiPromise.create({
types: {
...types,
// aliasses that don't do well as part of interfaces
'voting::VoteType': 'VoteType',
'voting::TallyType': 'TallyType',
// chain-specific overrides
Keys: 'SessionKeys4'
}
});
// get a query
const recordOpt = await api.query.voting.voteRecords(123);
// the types match with what we expect here
let firstRecord: VoteRecord | null = recordOpt.unwrapOr(null);
console.log(firstRecord?.toHuman());
// it even does work for arrays & subscriptions
api.query.signaling.activeProposals((results): void => {
results.forEach(([hash, blockNumber]): void => {
console.log(hash.toHex(), ':', blockNumber.toNumber());
});
});
// even createType works, allowing for our types to be used
console.log(`Balance2 bitLength:`, [
api.createType('Balance2').bitLength(),
api.registry.createType('Balance2').bitLength(),
createType(api.registry, 'Balance2').bitLength()
]);
}
await main();
@@ -1,253 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
import { Bytes, u32 } from '@polkadot/types/primitive';
import { Gas } from '@polkadot/types/interfaces/contracts';
import { Balance, BalanceOf, BlockNumber, Moment, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import { SessionIndex } from '@polkadot/types/interfaces/session';
import { EraIndex } from '@polkadot/types/interfaces/staking';
declare module '@polkadot/metadata/Decorated/consts/types' {
export interface Constants {
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected* period
* that the block production apparatus provides. Your chosen consensus system will generally
* work with this to determine a sensible block time. e.g. For Aura, it will be double this
* period on default settings.
**/
minimumPeriod: AugmentedConst<Moment>;
};
balances: {
/**
* The minimum amount required to keep an account open.
**/
existentialDeposit: AugmentedConst<Balance>;
/**
* The fee required to make a transfer.
**/
transferFee: AugmentedConst<Balance>;
/**
* The fee required to create an account.
**/
creationFee: AugmentedConst<Balance>;
};
transactionPayment: {
/**
* The fee to be paid for making a transaction; the base.
**/
transactionBaseFee: AugmentedConst<BalanceOf>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: AugmentedConst<BalanceOf>;
};
staking: {
/**
* Number of sessions per era.
**/
sessionsPerEra: AugmentedConst<SessionIndex>;
/**
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: AugmentedConst<EraIndex>;
};
session: {
/**
* Used as first key for `NextKeys` and `KeyOwner` to put all the data into the same branch
* of the trie.
**/
dedupKeyPrefix: AugmentedConst<Bytes>;
};
democracy: {
/**
* The minimum period of locking and the period between a proposal being approved and enacted.
* It should generally be a little more than the unstake period to ensure that
* voting stakers have an opportunity to remove themselves from the system in the case where
* they are on the losing side of a vote.
**/
enactmentPeriod: AugmentedConst<BlockNumber>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: AugmentedConst<BlockNumber>;
/**
* How often (in blocks) to check for new votes.
**/
votingPeriod: AugmentedConst<BlockNumber>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: AugmentedConst<BalanceOf>;
/**
* Minimum voting period allowed for an emergency referendum.
**/
emergencyVotingPeriod: AugmentedConst<BlockNumber>;
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: AugmentedConst<BlockNumber>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: AugmentedConst<BalanceOf>;
};
elections: {
candidacyBond: AugmentedConst<BalanceOf>;
votingBond: AugmentedConst<BalanceOf>;
desiredMembers: AugmentedConst<u32>;
desiredRunnersUp: AugmentedConst<u32>;
termDuration: AugmentedConst<BlockNumber>;
};
finalityTracker: {
/**
* The number of recent samples to keep from this chain. Default is 101.
**/
windowSize: AugmentedConst<BlockNumber>;
/**
* The delay after which point things become suspicious. Default is 1000.
**/
reportLatency: AugmentedConst<BlockNumber>;
};
treasury: {
/**
* Fraction of a proposal's value that should be bonded in order to place the proposal.
* An accepted proposal gets these back. A rejected proposal does not.
**/
proposalBond: AugmentedConst<Permill>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMinimum: AugmentedConst<BalanceOf>;
/**
* Period between successive spends.
**/
spendPeriod: AugmentedConst<BlockNumber>;
/**
* Percentage of spare funds (if any) that are burnt per spend period.
**/
burn: AugmentedConst<Permill>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: AugmentedConst<BlockNumber>;
/**
* The amount of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: AugmentedConst<Percent>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: AugmentedConst<BalanceOf>;
/**
* The amount held on deposit per byte within the tip report reason.
**/
tipReportDepositPerByte: AugmentedConst<BalanceOf>;
};
contracts: {
/**
* Number of block delay an extrinsic claim surcharge has.
* When claim surcharge is called by an extrinsic the rent is checked
* for current_block - delay
**/
signedClaimHandicap: AugmentedConst<BlockNumber>;
/**
* The minimum amount required to generate a tombstone.
**/
tombstoneDeposit: AugmentedConst<BalanceOf>;
/**
* Size of a contract at the time of instantiaion. This is a simple way to ensure that
* empty contracts eventually gets deleted.
**/
storageSizeOffset: AugmentedConst<u32>;
/**
* Price of a byte of storage per one block interval. Should be greater than 0.
**/
rentByteFee: AugmentedConst<BalanceOf>;
/**
* The amount of funds a contract should deposit in order to offset
* the cost of one byte.
* Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,
* then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.
* But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,
* then it would pay 500 BU/day.
**/
rentDepositOffset: AugmentedConst<BalanceOf>;
/**
* Reward that is received by the party whose touch has led
* to removal of a contract.
**/
surchargeReward: AugmentedConst<BalanceOf>;
/**
* The fee required to make a transfer.
**/
transferFee: AugmentedConst<BalanceOf>;
/**
* The fee required to create an account.
**/
creationFee: AugmentedConst<BalanceOf>;
/**
* The fee to be paid for making a transaction; the base.
**/
transactionBaseFee: AugmentedConst<BalanceOf>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: AugmentedConst<BalanceOf>;
/**
* The fee required to instantiate a contract instance. A reasonable default value
* is 21.
**/
contractFee: AugmentedConst<BalanceOf>;
/**
* The base fee charged for calling into a contract. A reasonable default
* value is 135.
**/
callBaseFee: AugmentedConst<Gas>;
/**
* The base fee charged for instantiating a contract. A reasonable default value
* is 175.
**/
instantiateBaseFee: AugmentedConst<Gas>;
/**
* The maximum nesting level of a call/instantiate stack. A reasonable default
* value is 100.
**/
maxDepth: AugmentedConst<u32>;
/**
* The maximum size of a storage value in bytes. A reasonable default is 16 KiB.
**/
maxValueSize: AugmentedConst<u32>;
/**
* The maximum amount of gas that could be expended per block. A reasonable
* default value is 10_000_000.
**/
blockGasLimit: AugmentedConst<Gas>;
};
nicks: {
/**
* Reservation fee.
**/
reservationFee: AugmentedConst<BalanceOf>;
/**
* The minimum length a name may be.
**/
minLength: AugmentedConst<u32>;
/**
* The maximum length a name may be.
**/
maxLength: AugmentedConst<u32>;
};
}
}
@@ -1,706 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
import { AnyNumber, ITuple } from '@polkadot/types/types';
import { Option, U8aFixed, Vec } from '@polkadot/types/codec';
import { Bytes, Data, bool, u32, u64 } from '@polkadot/types/primitive';
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
import { BalanceLock, VestingSchedule } from '@polkadot/types/interfaces/balances';
import { ProposalIndex, Votes } from '@polkadot/types/interfaces/collective';
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
import { CodeHash, ContractInfo, Gas, PrefabWasmModule, Schedule } from '@polkadot/types/interfaces/contracts';
import { Conviction, PropIndex, Proposal, ReferendumIndex, ReferendumInfo } from '@polkadot/types/interfaces/democracy';
import { Vote, VoteThreshold } from '@polkadot/types/interfaces/elections';
import { AuthorityList, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
import { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity';
import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
import { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Hash, Index, KeyTypeId, Moment, Perbill, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
import { ProposalRecord } from 'sample-polkadotjs-typegen/interfaces/signaling';
import { EraIndex, EraPoints, Exposure, Forcing, MomentOf, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
import { DigestOf, EventIndex, EventRecord } from '@polkadot/types/interfaces/system';
import { OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
import { Multisig } from '@polkadot/types/interfaces/utility';
import { VoteRecord } from 'sample-polkadotjs-typegen/interfaces/voting';
import { Observable } from 'rxjs';
import { ApiTypes } from '@polkadot/api/types';
declare module '@polkadot/api/types/storage' {
export interface AugmentedQueries<ApiType> {
system: {
/**
* Extrinsics nonce for accounts.
**/
accountNonce: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Index>>;
/**
* Total extrinsics count for the current block.
**/
extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>>;
/**
* Total weight for all extrinsics put together, for the current block.
**/
allExtrinsicsWeight: AugmentedQuery<ApiType, () => Observable<Option<Weight>>>;
/**
* Total length (in bytes) for all extrinsics put together, for the current block.
**/
allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>>;
/**
* Map of block numbers to block hashes.
**/
blockHash: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Hash>>;
/**
* Extrinsics data for the current block (maps an extrinsic's index to its data).
**/
extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>>;
/**
* The current block number being processed. Set by `execute_block`.
**/
number: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
/**
* Hash of the previous block.
**/
parentHash: AugmentedQuery<ApiType, () => Observable<Hash>>;
/**
* Extrinsics root of the current block, also part of the block header.
**/
extrinsicsRoot: AugmentedQuery<ApiType, () => Observable<Hash>>;
/**
* Digest of the current block, also part of the block header.
**/
digest: AugmentedQuery<ApiType, () => Observable<DigestOf>>;
/**
* Events deposited for the current block.
**/
events: AugmentedQuery<ApiType, () => Observable<Vec<EventRecord>>>;
/**
* The number of events in the `Events<T>` list.
**/
eventCount: AugmentedQuery<ApiType, () => Observable<EventIndex>>;
/**
* Mapping between a topic (represented by T::Hash) and a vector of indexes
* of events in the `<Events<T>>` list.
* All topic vectors have deterministic storage locations depending on the topic. This
* allows light-clients to leverage the changes trie storage tracking mechanism and
* in case of changes fetch the list of events of interest.
* The value has the type `(T::BlockNumber, EventIndex)` because if we used only just
* the `EventIndex` then in case if the topic has the same contents on the next block
* no notification will be triggered thus the event might be lost.
**/
eventTopics: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Vec<ITuple<[BlockNumber, EventIndex]>>>>;
};
utility: {
/**
* The set of open multisig operations.
**/
multisigs: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: U8aFixed | string | Uint8Array) => Observable<Option<Multisig>>>;
};
timestamp: {
/**
* Current time for the current block.
**/
now: AugmentedQuery<ApiType, () => Observable<Moment>>;
/**
* Did the timestamp get updated in this block?
**/
didUpdate: AugmentedQuery<ApiType, () => Observable<bool>>;
};
authorship: {
/**
* Uncles
**/
uncles: AugmentedQuery<ApiType, () => Observable<Vec<UncleEntryItem>>>;
/**
* Author of current block.
**/
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>>;
/**
* Whether uncles were already set in this block.
**/
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>>;
};
indices: {
/**
* The next free enumeration set.
**/
nextEnumSet: AugmentedQuery<ApiType, () => Observable<AccountIndex>>;
/**
* The enumeration sets.
**/
enumSet: AugmentedQuery<ApiType, (arg: AccountIndex | AnyNumber | Uint8Array) => Observable<Vec<AccountId>>>;
};
balances: {
/**
* The total units issued in the system.
**/
totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>>;
/**
* Information regarding the vesting of a given account.
**/
vesting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<VestingSchedule>>>;
/**
* The 'free' balance of a given account.
* This is the only balance that matters in terms of most operations on tokens. It
* alone is used to determine the balance when in the contract execution environment. When this
* balance falls below the value of `ExistentialDeposit`, then the 'current account' is
* deleted: specifically `FreeBalance`. Further, the `OnFreeBalanceZero` callback
* is invoked, giving a chance to external modules to clean up data associated with
* the deleted account.
* `frame_system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets
* collapsed to zero if it ever becomes less than `ExistentialDeposit`.
**/
freeBalance: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* The amount of the balance of a given account that is externally reserved; this can still get
* slashed, but gets slashed last of all.
* This balance is a 'reserve' balance that other subsystems use in order to set aside tokens
* that are still 'owned' by the account holder, but which are suspendable.
* When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'
* is deleted: specifically, `ReservedBalance`.
* `frame_system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets
* collapsed to zero if it ever becomes less than `ExistentialDeposit`.)
**/
reservedBalance: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Any liquidity locks on some account balances.
**/
locks: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<BalanceLock>>>;
};
transactionPayment: {
nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<Multiplier>>;
};
staking: {
/**
* The ideal number of staking participants.
**/
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>>;
/**
* Minimum number of staking participants before emergency conditions are imposed.
**/
minimumValidatorCount: AugmentedQuery<ApiType, () => Observable<u32>>;
/**
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
* easy to initialize and the performance hit is minimal (we expect no more than four
* invulnerables) and restricted to testnets.
**/
invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
/**
* Map from all locked "stash" accounts to the controller account.
**/
bonded: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>>;
/**
* Map from all (unlocked) "controller" accounts to the info regarding the staking.
**/
ledger: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<StakingLedger>>>;
/**
* Where the reward payment should be made. Keyed by stash.
**/
payee: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardDestination>>;
/**
* The map from (wannabe) validator stash key to the preferences of that validator.
**/
validators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>>;
/**
* The map from nominator stash key to the set of stash keys of all validators to nominate.
* NOTE: is private so that we can ensure upgraded before all typical accesses.
* Direct storage APIs can still bypass this protection.
**/
nominators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Nominations>>>;
/**
* Nominators for a particular account that is in action right now. You can't iterate
* through validators here, but you can find them in the Session module.
* This is keyed by the stash account.
**/
stakers: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Exposure>>;
/**
* The currently elected validator set keyed by stash account ID.
**/
currentElected: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
/**
* The current era index.
**/
currentEra: AugmentedQuery<ApiType, () => Observable<EraIndex>>;
/**
* The start of the current era.
**/
currentEraStart: AugmentedQuery<ApiType, () => Observable<MomentOf>>;
/**
* The session index at which the current era started.
**/
currentEraStartSessionIndex: AugmentedQuery<ApiType, () => Observable<SessionIndex>>;
/**
* Rewards for the current era. Using indices of current elected set.
**/
currentEraPointsEarned: AugmentedQuery<ApiType, () => Observable<EraPoints>>;
/**
* The amount of balance actively at stake for each validator slot, currently.
* This is used to derive rewards and punishments.
**/
slotStake: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
/**
* True if the next session change will be a new era regardless of index.
**/
forceEra: AugmentedQuery<ApiType, () => Observable<Forcing>>;
/**
* The percentage of the slash that is distributed to reporters.
* The rest of the slashed value is handled by the `Slash`.
**/
slashRewardFraction: AugmentedQuery<ApiType, () => Observable<Perbill>>;
/**
* The amount of currency given to reporters of a slash event which was
* canceled by extraordinary circumstances (e.g. governance).
**/
canceledSlashPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
/**
* All unapplied slashes that are queued for later.
**/
unappliedSlashes: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Vec<UnappliedSlash>>>;
/**
* A mapping from still-bonded eras to the first session index of that era.
**/
bondedEras: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EraIndex, SessionIndex]>>>>;
/**
* All slashing events on validators, mapped by era to the highest slash proportion
* and slash value of the era.
**/
validatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Perbill, BalanceOf]>>>>;
/**
* All slashing events on nominators, mapped by era to the highest slash value of the era.
**/
nominatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<BalanceOf>>>;
/**
* Slashing spans for stash accounts.
**/
slashingSpans: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<SlashingSpans>>>;
/**
* Records information about the maximum slash of a stash within a slashing span,
* as well as how much reward has been paid out.
**/
spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId, SpanIndex]> | [AccountId | string | Uint8Array, SpanIndex | AnyNumber | Uint8Array]) => Observable<SpanRecord>>;
/**
* The earliest era for which we have a pending, unapplied slash.
**/
earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>>;
/**
* The version of storage for upgrade.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<u32>>;
};
session: {
/**
* The current set of validators.
**/
validators: AugmentedQuery<ApiType, () => Observable<Vec<ValidatorId>>>;
/**
* Current index of the session.
**/
currentIndex: AugmentedQuery<ApiType, () => Observable<SessionIndex>>;
/**
* True if the underlying economic identities or weighting behind the validators
* has changed in the queued validator set.
**/
queuedChanged: AugmentedQuery<ApiType, () => Observable<bool>>;
/**
* The queued keys for the next session. When the next session begins, these keys
* will be used to determine the validator's session keys.
**/
queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[ValidatorId, Keys]>>>>;
/**
* Indices of disabled validators.
* The set is cleared when `on_session_ending` returns a new set of identities.
**/
disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>>;
/**
* The next session keys for a validator.
* The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of
* the trie. Having all data in the same branch should prevent slowing down other queries.
**/
nextKeys: AugmentedQueryDoubleMap<ApiType, (key1: Bytes | string | Uint8Array, key2: ValidatorId | string | Uint8Array) => Observable<Option<Keys>>>;
/**
* The owner of a key. The second key is the `KeyTypeId` + the encoded key.
* The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of
* the trie. Having all data in the same branch should prevent slowing down other queries.
**/
keyOwner: AugmentedQueryDoubleMap<ApiType, (key1: Bytes | string | Uint8Array, key2: ITuple<[KeyTypeId, Bytes]> | [KeyTypeId | AnyNumber | Uint8Array, Bytes | string | Uint8Array]) => Observable<Option<ValidatorId>>>;
};
democracy: {
/**
* The number of (public) proposals that have been made so far.
**/
publicPropCount: AugmentedQuery<ApiType, () => Observable<PropIndex>>;
/**
* The public proposals. Unsorted. The second item is the proposal's hash.
**/
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[PropIndex, Hash, AccountId]>>>>;
/**
* Map of hashes to the proposal preimage, along with who registered it and their deposit.
* The block number is the block at which it was deposited.
**/
preimages: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<ITuple<[Bytes, AccountId, BalanceOf, BlockNumber]>>>>;
/**
* Those who have locked a deposit.
**/
depositOf: AugmentedQuery<ApiType, (arg: PropIndex | AnyNumber | Uint8Array) => Observable<Option<ITuple<[BalanceOf, Vec<AccountId>]>>>>;
/**
* The next free referendum index, aka the number of referenda started so far.
**/
referendumCount: AugmentedQuery<ApiType, () => Observable<ReferendumIndex>>;
/**
* The lowest referendum index representing an unbaked referendum. Equal to
* `ReferendumCount` if there isn't a unbaked referendum.
**/
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<ReferendumIndex>>;
/**
* Information concerning any given referendum.
**/
referendumInfoOf: AugmentedQuery<ApiType, (arg: ReferendumIndex | AnyNumber | Uint8Array) => Observable<Option<ReferendumInfo>>>;
/**
* Queue of successful referenda to be dispatched. Stored ordered by block number.
**/
dispatchQueue: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>>;
/**
* Get the voters for the current proposal.
**/
votersFor: AugmentedQuery<ApiType, (arg: ReferendumIndex | AnyNumber | Uint8Array) => Observable<Vec<AccountId>>>;
/**
* Get the vote in a given referendum of a particular voter. The result is meaningful only
* if `voters_for` includes the voter when called with the referendum (you'll get the
* default `Vote` value otherwise). If you don't want to check `voters_for`, then you can
* also check for simple existence with `VoteOf::exists` first.
**/
voteOf: AugmentedQuery<ApiType, (arg: ITuple<[ReferendumIndex, AccountId]> | [ReferendumIndex | AnyNumber | Uint8Array, AccountId | string | Uint8Array]) => Observable<Vote>>;
/**
* Who is able to vote for whom. Value is the fund-holding account, key is the
* vote-transaction-sending account.
**/
proxy: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>>;
/**
* Get the account (and lock periods) to which another account is delegating vote.
**/
delegations: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[AccountId, Conviction]>>>;
/**
* True if the last referendum tabled was submitted externally. False if it was a public
* proposal.
**/
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>>;
/**
* The referendum to be tabled whenever it would be valid to table an external proposal.
* This happens when a referendum needs to be tabled and one of two conditions are met:
* - `LastTabledWasExternal` is `false`; or
* - `PublicProps` is empty.
**/
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[Hash, VoteThreshold]>>>>;
/**
* A record of who vetoed what. Maps proposal hash to a possible existent block number
* (until when it may not be resubmitted) and who vetoed it.
**/
blacklist: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<ITuple<[BlockNumber, Vec<AccountId>]>>>>;
/**
* Record of all proposals that have been subject to emergency cancellation.
**/
cancellations: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<bool>>;
};
council: {
/**
* The hashes of the active proposals.
**/
proposals: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>>;
/**
* Actual proposal for a given hash, if it's current.
**/
proposalOf: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<Proposal>>>;
/**
* Votes on a given proposal, if it is ongoing.
**/
voting: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<Votes>>>;
/**
* Proposals so far.
**/
proposalCount: AugmentedQuery<ApiType, () => Observable<u32>>;
/**
* The current members of the collective. This is stored sorted (just by value).
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
};
elections: {
/**
* The current elected membership. Sorted based on account id.
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId, BalanceOf]>>>>;
/**
* The current runners_up. Sorted based on low to high merit (worse to best runner).
**/
runnersUp: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId, BalanceOf]>>>>;
/**
* The total number of vote rounds that have happened, excluding the upcoming one.
**/
electionRounds: AugmentedQuery<ApiType, () => Observable<u32>>;
/**
* Votes of a particular voter, with the round index of the votes.
**/
votesOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<AccountId>>>;
/**
* Locked stake of a voter.
**/
stakeOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<BalanceOf>>;
/**
* The present candidate list. Sorted based on account-id. A current member or a runner can
* never enter this vector and is always implicitly assumed to be a candidate.
**/
candidates: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
};
grandpa: {
/**
* DEPRECATED
* This used to store the current authority set, which has been migrated to the well-known
* GRANDPA_AUTHORITES_KEY unhashed key.
**/
authorities: AugmentedQuery<ApiType, () => Observable<AuthorityList>>;
/**
* State of the current authority set.
**/
state: AugmentedQuery<ApiType, () => Observable<StoredState>>;
/**
* Pending change: (signaled at, scheduled change).
**/
pendingChange: AugmentedQuery<ApiType, () => Observable<Option<StoredPendingChange>>>;
/**
* next block number where we can force a change.
**/
nextForced: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>>;
/**
* `true` if we are currently stalled.
**/
stalled: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[BlockNumber, BlockNumber]>>>>;
/**
* The number of changes (both in terms of keys and underlying economic responsibilities)
* in the "set" of Grandpa validators from genesis.
**/
currentSetId: AugmentedQuery<ApiType, () => Observable<SetId>>;
/**
* A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible.
**/
setIdSession: AugmentedQuery<ApiType, (arg: SetId | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>>;
};
treasury: {
/**
* Number of proposals that have been made.
**/
proposalCount: AugmentedQuery<ApiType, () => Observable<ProposalIndex>>;
/**
* Proposals that have been made.
**/
proposals: AugmentedQuery<ApiType, (arg: ProposalIndex | AnyNumber | Uint8Array) => Observable<Option<TreasuryProposal>>>;
/**
* Proposal indices that have been approved but not yet awarded.
**/
approvals: AugmentedQuery<ApiType, () => Observable<Vec<ProposalIndex>>>;
/**
* Tips that are not yet completed. Keyed by the hash of `(reason, who)` from the value.
* This has the insecure enumerable hash function since the key itself is already
* guaranteed to be a secure hash.
**/
tips: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<OpenTip>>>;
/**
* Simple preimage lookup from the reason's hash to the original data. Again, has an
* insecure enumerable hash since the key is guaranteed to be the result of a secure hash.
**/
reasons: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<Bytes>>>;
};
contracts: {
/**
* Gas spent so far in this block.
**/
gasSpent: AugmentedQuery<ApiType, () => Observable<Gas>>;
/**
* Current cost schedule for contracts.
**/
currentSchedule: AugmentedQuery<ApiType, () => Observable<Schedule>>;
/**
* A mapping from an original code hash to the original code, untouched by instrumentation.
**/
pristineCode: AugmentedQuery<ApiType, (arg: CodeHash | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* A mapping between an original code hash and instrumented wasm code, ready for execution.
**/
codeStorage: AugmentedQuery<ApiType, (arg: CodeHash | string | Uint8Array) => Observable<Option<PrefabWasmModule>>>;
/**
* The subtrie counter.
**/
accountCounter: AugmentedQuery<ApiType, () => Observable<u64>>;
/**
* The code associated with a given account.
**/
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ContractInfo>>>;
/**
* The price of one unit of gas.
**/
gasPrice: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
};
identity: {
/**
* Information that is pertinent to identify the entity behind an account.
**/
identityOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Registration>>>;
/**
* The super-identity of an alternative "sub" identity together with its name, within that
* context. If the account is not some other account's sub-identity, then just `None`.
**/
superOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ITuple<[AccountId, Data]>>>>;
/**
* Alternative "sub" identities of this account.
* The first item is the deposit, the second is a vector of the accounts.
**/
subsOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[BalanceOf, Vec<AccountId>]>>>;
/**
* The set of registrars. Not expected to get very big as can only be added through a
* special origin (likely a council motion).
* The index into this can be cast to `RegistrarIndex` to get a valid value.
**/
registrars: AugmentedQuery<ApiType, () => Observable<Vec<Option<RegistrarInfo>>>>;
};
imOnline: {
/**
* The block number after which it's ok to send heartbeats in current session.
* At the beginning of each session we set this to a value that should
* fall roughly in the middle of the session duration.
* The idea is to first wait for the validators to produce a block
* in the current session, so that the heartbeat later on will not be necessary.
**/
heartbeatAfter: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
/**
* The current set of keys that may issue a heartbeat.
**/
keys: AugmentedQuery<ApiType, () => Observable<Vec<AuthorityId>>>;
/**
* For each session index, we keep a mapping of `AuthIndex`
* to `offchain::OpaqueNetworkState`.
**/
receivedHeartbeats: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: AuthIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>>;
/**
* For each session index, we keep a mapping of `T::ValidatorId` to the
* number of blocks authored by the given authority.
**/
authoredBlocks: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: ValidatorId | string | Uint8Array) => Observable<u32>>;
};
offences: {
/**
* The primary structure that holds all offence records keyed by report identifiers.
**/
reports: AugmentedQuery<ApiType, (arg: ReportIdOf | string | Uint8Array) => Observable<Option<OffenceDetails>>>;
/**
* A vector of reports of the same kind that happened at the same time slot.
**/
concurrentReportsIndex: AugmentedQueryDoubleMap<ApiType, (key1: Kind | string | Uint8Array, key2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>>;
/**
* Enumerates all reports of a kind along with the time they happened.
* All reports are sorted by the time of offence.
* Note that the actual type of this mapping is `Vec<u8>`, this is because values of
* different types are not supported at the moment so we are doing the manual serialization.
**/
reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>>;
};
randomnessCollectiveFlip: {
/**
* Series of block headers from the last 81 blocks that acts as random seed material. This
* is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of
* the oldest hash.
**/
randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>>;
};
nicks: {
/**
* The lookup table for names.
**/
nameOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Bytes, BalanceOf]>>>>;
};
sudo: {
/**
* The `AccountId` of the sudo key.
**/
key: AugmentedQuery<ApiType, () => Observable<AccountId>>;
};
signaling: {
/**
* The total number of proposals created thus far.
**/
proposalCount: AugmentedQuery<ApiType, () => Observable<u32>>;
/**
* A list of all extant proposals.
**/
inactiveProposals: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[Hash, BlockNumber]>>>>;
/**
* A list of active proposals along with the time at which they complete.
**/
activeProposals: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[Hash, BlockNumber]>>>>;
/**
* A list of completed proposals, pending deletion
**/
completedProposals: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[Hash, BlockNumber]>>>>;
/**
* Amount of time a proposal remains in "Voting" stage.
**/
votingLength: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
/**
* Map for retrieving the information about any proposal from its hash.
**/
proposalOf: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Option<ProposalRecord>>>;
/**
* Registration bond
**/
proposalCreationBond: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
};
voting: {
/**
* The map of all vote records indexed by id
**/
voteRecords: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<VoteRecord>>>;
/**
* The number of vote records that have been created
**/
voteRecordCount: AugmentedQuery<ApiType, () => Observable<u64>>;
};
treasuryReward: {
/**
* Interval in number of blocks to reward treasury
**/
mintingInterval: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
/**
* Current payout of module
**/
currentPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
/**
* Current pot
**/
pot: AugmentedQuery<ApiType, () => Observable<Balance>>;
};
}
export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
}
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
import '@polkadot/api/augment/rpc';
import './augment-api-consts';
import './augment-api-query';
import './augment-api-tx';
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
// order here matches with what is found in (unused removed)
// https://www.npmjs.com/package/edgeware-node-types
// https://github.com/hicommonwealth/edgeware-node-types/tree/master/types
export { default as signaling } from './signaling/definitions';
export { default as treasuryRewards } from './treasuryRewards/definitions';
export { default as voting } from './voting/definitions';
@@ -1,17 +0,0 @@
/* eslint-disable @typescript-eslint/camelcase */
export default {
types: {
ProposalRecord: {
index: 'u32',
author: 'AccountId',
stage: 'VoteStage',
transition_time: 'u32',
title: 'Text',
contents: 'Text',
vote_id: 'u64'
},
ProposalContents: 'Vec<u8>',
ProposalTitle: 'Vec<u8>'
}
};
@@ -1,24 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
import { Struct } from '@polkadot/types/codec';
import { Bytes, Text, u32, u64 } from '@polkadot/types/primitive';
import { AccountId } from '@polkadot/types/interfaces/runtime';
import { VoteStage } from 'sample-polkadotjs-typegen/interfaces/voting';
/** @name ProposalContents */
export interface ProposalContents extends Bytes {}
/** @name ProposalRecord */
export interface ProposalRecord extends Struct {
readonly index: u32;
readonly author: AccountId;
readonly stage: VoteStage;
readonly transition_time: u32;
readonly title: Text;
readonly contents: Text;
readonly vote_id: u64;
}
/** @name ProposalTitle */
export interface ProposalTitle extends Bytes {}
@@ -1,7 +0,0 @@
/* eslint-disable @typescript-eslint/camelcase */
export default {
types: {
Balance2: 'u128'
}
};
@@ -1,7 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
import { u128 } from '@polkadot/types/primitive';
/** @name Balance2 */
export interface Balance2 extends u128 {}
@@ -1,6 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
export * from './signaling/types';
export * from './treasuryRewards/types';
export * from './voting/types';
@@ -1,33 +0,0 @@
/* eslint-disable @typescript-eslint/camelcase */
export default {
types: {
VoteStage: {
_enum: ['PreVoting', 'Commit', 'Voting', 'Completed']
},
VoteType: {
_enum: ['Binary', 'MultiOption', 'RankedChoice']
},
TallyType: {
_enum: ['OnePerson', 'OneCoin']
},
VoteOutcome: '[u8; 32]',
Tally: 'Option<Vec<(VoteOutcome, u128)>>',
VoteData: {
initiator: 'AccountId',
stage: 'VoteStage',
vote_type: 'VoteType',
tally_type: 'TallyType',
is_commit_reveal: 'bool'
},
Commitments: 'Vec<(AccountId, VoteOutcome)>',
Reveals: 'Vec<(AccountId, Vec<VoteOutcome>)>',
VoteRecord: {
id: 'u64',
commitments: 'Commitments',
reveals: 'Reveals',
data: 'VoteData',
outcomes: 'Vec<VoteOutcome>'
}
}
};
@@ -1,58 +0,0 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable @typescript-eslint/no-empty-interface */
import { ITuple } from '@polkadot/types/types';
import { Enum, Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
import { bool, u128, u64 } from '@polkadot/types/primitive';
import { AccountId } from '@polkadot/types/interfaces/runtime';
/** @name Commitments */
export interface Commitments extends Vec<ITuple<[AccountId, VoteOutcome]>> {}
/** @name Reveals */
export interface Reveals extends Vec<ITuple<[AccountId, Vec<VoteOutcome>]>> {}
/** @name Tally */
export interface Tally extends Option<Vec<ITuple<[VoteOutcome, u128]>>> {}
/** @name TallyType */
export interface TallyType extends Enum {
readonly isOnePerson: boolean;
readonly isOneCoin: boolean;
}
/** @name VoteData */
export interface VoteData extends Struct {
readonly initiator: AccountId;
readonly stage: VoteStage;
readonly vote_type: VoteType;
readonly tally_type: TallyType;
readonly is_commit_reveal: bool;
}
/** @name VoteOutcome */
export interface VoteOutcome extends U8aFixed {}
/** @name VoteRecord */
export interface VoteRecord extends Struct {
readonly id: u64;
readonly commitments: Commitments;
readonly reveals: Reveals;
readonly data: VoteData;
readonly outcomes: Vec<VoteOutcome>;
}
/** @name VoteStage */
export interface VoteStage extends Enum {
readonly isPreVoting: boolean;
readonly isCommit: boolean;
readonly isVoting: boolean;
readonly isCompleted: boolean;
}
/** @name VoteType */
export interface VoteType extends Enum {
readonly isBinary: boolean;
readonly isMultiOption: boolean;
readonly isRankedChoice: boolean;
}
@@ -1,34 +0,0 @@
{
"compilerOptions": {
// this is specific with augmented overrides
"paths": {
// this is the package name we use (in the interface imports, --package for generators)
"sample-polkadotjs-typegen/*": ["src/*"],
// here we replace the @polkadot/api augmentation with our own, generated from chain
"@polkadot/api/augment": ["src/interfaces/augment-api.ts"],
// replace the augmented types with our own, as generated from definitions
"@polkadot/types/augment": ["src/interfaces/augment-types.ts"]
},
// some other options, whatever you want for your environment
"target": "esnext",
"module": "esnext",
"jsx": "preserve",
"declaration": true,
"strict": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"baseUrl": ".",
"skipLibCheck": true,
"typeRoots": [
"./node_modules/@types"
]
},
"exclude": [
"build/**/*",
"node_modules"
]
}
-24
View File
@@ -1,24 +0,0 @@
# ApiPromise Examples
Here you will find a list of examples that takes you through the basics of connecting to a local node, retrieving data from the Node and chain and execute transactions on the chain. It uses the [[ApiPromise]] interface.
## Prerequisites
For the following examples, you need a local node. It is usually convenient testing with:
```
substrate --dev
```
## Running the examples
From each folder, run `yarn` to install the required dependencies and then run `yarn start` to execute the example against the running node.
## Development accounts
Some of the examples use the following accounts:
- Alice: `5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY`
- Bob: `5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty`
Those accounts are easy to add if you don't have/see them. The seed of Alice's account is `//Alice` (via `keyring.addUri(...)`, dev seed implied) and the seed of Bob is... well you guess...
@@ -1,5 +0,0 @@
# Simple Connect
The following example shows how to instantiate a Polkadot API object and use it to connect to a node using ApiRx.
<<< @/docs/examples/rx/01_simple_connect/index.js
@@ -1,27 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Required imports
const { zip } = require('rxjs');
const { ApiRx } = require('@polkadot/api');
const { WsProvider } = require('@polkadot/rpc-provider');
async function main () {
// Initialise the provider to connect to the local node
const provider = new WsProvider('ws://127.0.0.1:9944');
// Create the API and wait until ready
const api = await ApiRx.create({ provider }).toPromise();
// We're using RxJs 'zip()' combination operator to get the emitted values
// of multiple observables as an array
zip(
api.rpc.system.chain(),
api.rpc.system.name(),
api.rpc.system.version()
).subscribe(([chain, nodeName, nodeVersion]) => {
console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);
});
}
main().catch(console.error).finally(() => process.exit());
@@ -1,19 +0,0 @@
{
"name": "rx_01_simple_connect",
"version": "0.2.0",
"description": "Example showing how to connect using a WebSocket",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,9 +0,0 @@
# Listen to new blocks
This example shows how to subscribe to new blocks.
It displays the block number every time a new block is seen by the node you are connected to.
NOTE: The example runs until you stop it with CTRL+C
<<< @/docs/examples/rx/02_listen_to_blocks/index.js
@@ -1,22 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiRx } = require('@polkadot/api');
const { switchMap } = require('rxjs/operators');
async function main () {
// Here we don't pass the (optional) provider, connecting directly to the default
// node/port, i.e. `ws://127.0.0.1:9944`. Await for the isReady promise to ensure
// the API has connected to the node and completed the initialisation process
new ApiRx().isReady
.pipe(
switchMap((api) =>
api.rpc.chain.subscribeNewHeads()
))
.subscribe((header) => {
console.log(`Chain is at block: #${header.number}`);
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "rx_02_listen_to_blocks",
"version": "0.2.0",
"description": "Example showing how to use subscriptions",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Listen to balance changes
This example shows how to instantiate a Polkadot API object and use it to connect to a node and retrieve balance updates.
<<< @/docs/examples/rx/03_listen_to_balance_change/index.js
@@ -1,42 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API and operators from RxJs
const { ApiRx } = require('@polkadot/api');
const { pairwise, startWith } = require('rxjs/operators');
// Known account we want to use (available on dev chain, with funds)
const Alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
async function main () {
// Create an await for the API
const api = await ApiRx.create().toPromise();
// Here we subscribe to any balance changes and update the on-screen value.
// We're using RxJs pairwise() operator to get the previous and current values as an array.
api.query.system.account(Alice)
.pipe(
// since pairwise only starts emitting values on the second emission, we prepend an
// initial value with the startWith() operator to be able to also receive the first value
startWith('first'),
pairwise()
)
.subscribe((balance) => {
if (balance[0] === 'first') {
// Now we know that if the previous value emitted as balance[0] is `first`,
// then balance[1] is the initial value of Alice account.
console.log(`Alice ${Alice} has a balance of ${balance[1].data.free}`);
console.log('You may leave this example running and start the "Make a transfer" example or transfer any value to Alice address');
return;
}
const change = balance[1].data.free.sub(balance[0].date.free);
// Only display value changes
if (!change.isZero()) {
console.log(`New balance change of: ${change}`);
}
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "rx_03_listen_to_balance_change",
"version": "0.2.0",
"description": "Example showing how to subscribe to balance change",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,7 +0,0 @@
# Unsubscribe from listening to updates
This example shows how to subscribe to and later unsubscribe from listening to block updates.
In this example we're calling the built-in unsubscribe() function after a timeOut of 20s to cleanup and unsubscribe from listening to updates.
<<< @/docs/examples/rx/04_unsubscribe/index.js
-28
View File
@@ -1,28 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiRx } = require('@polkadot/api');
const { switchMap } = require('rxjs/operators');
async function main () {
// Create a new instance of the api
// Subscribe to chain updates and log the current block number on update.
const subscription = new ApiRx().isReady
.pipe(
switchMap((api) =>
api.rpc.chain.subscribeNewHeads()
))
.subscribe((header) => {
console.log(`Chain is at block: #${header.number}`);
});
// In this example we're calling the Overvables unsubscribe() //
// function after 20s.
setTimeout(() => {
subscription.unsubscribe();
console.log('Unsubscribed');
}, 20000);
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "rx_04_unsubscribe",
"version": "0.2.0",
"description": "Example showing how to unsubscribe from a subscription",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Read storage
Many important variables are available through the storage API. This example shows how to call a few of those APIs.
<<< @/docs/examples/rx/05_read_storage/index.js
-54
View File
@@ -1,54 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API
const { ApiRx } = require('@polkadot/api');
const { combineLatest, of } = require('rxjs');
const { first, switchMap } = require('rxjs/operators');
// Our address for Alice on the dev chain
const Alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
function main () {
// Create our API with a default connection to the local node
new ApiRx().isReady
.pipe(
// Here we ake our basic chain state/storage queries
switchMap((api) => combineLatest(
of(api),
api.query.session.validators().pipe(first())
)),
switchMap(([api, validators]) => {
// In the next step, we're checking if the node has active validators.
// If it does, we're making another call to the api to get the balances for all validators
const balances = (validators && validators.length > 0)
? combineLatest(validators.map(authorityId => api.query.system.account(authorityId).pipe(first())))
: of(null);
// We're combining the results together with the emitted value 'validators',
// which we're turning back into an observable using of()
return combineLatest(
api.query.system.account(Alice).pipe(first()),
api.query.timestamp.blockPeriod().pipe(first()),
of(validators),
balances
);
})
)
// Then we're subscribing to the emitted results
.subscribe(([{ nonce }, blockPeriod, validators, validatorBalances]) => {
console.log(`accountNonce(${Alice}) ${nonce}`);
console.log(`blockPeriod ${blockPeriod.toNumber()} seconds`);
if (validatorBalances) {
// And lastly we print out the authorityIds and balances of all validators
console.log('validators', validators.map((authorityId, index) => ({
address: authorityId.toString(),
balance: validatorBalances[index].data.free.toString(),
nonce: validatorBalances[index].data.toString()
})));
}
});
}
main().catch(console.error).finally(() => process.exit());
@@ -1,18 +0,0 @@
{
"name": "rx_05_read_storage",
"version": "0.2.0",
"description": "Example showing how to query storage",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Make a simple transfer
This sample shows how to create a transaction to make a transfer from one an account to another.
<<< @/docs/examples/rx/06_make_transfer/index.js
@@ -1,42 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API, Keyring and some utility functions
const { ApiRx } = require('@polkadot/api');
const { Keyring } = require('@polkadot/keyring');
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
async function main () {
// Instantiate the API
const api = await ApiRx.create().toPromise();
// Create an instance of the keyring
const keyring = new Keyring({ type: 'sr25519' });
// Add Alice to our keyring (with the known seed for the account)
const alice = keyring.addFromUri('//Alice');
// Create a extrinsic, transferring 12345 units to Bob.
const subscription = api.tx.balances
// create transfer
.transfer(BOB, 12345)
// Sign and send the transcation
.signAndSend(alice)
// Subscribe to the status updates of the transfer
.subscribe(({ status }) => {
if (status.isInBlock) {
console.log(`Successful transfer of 12345 from Alice to Bob at block ${status.asInBlock.toHex()}`);
} else if (status.isFinalized) {
console.log('Finalized block hash', status.asFinalized.toHex());
subscription.unsubscribe();
process.exit(0);
} else {
console.log(`Status of transfer: ${status.type}`);
}
});
}
main().catch(console.error);
@@ -1,18 +0,0 @@
{
"name": "rx_06_make_transfer",
"version": "0.2.0",
"description": "Example showing how to make a transfer",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}
@@ -1,5 +0,0 @@
# Traverse events
Query the system events and extract information from them. This example runs until exited via Ctrl-C
<<< @/docs/examples/rx/08_system_events/index.js
@@ -1,41 +0,0 @@
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-var-requires */
// Import the API and selected RxJs operators
const { switchMap } = require('rxjs/operators');
const { ApiRx } = require('@polkadot/api');
async function main () {
// Create our API with a default connection to the local node
ApiRx.create()
.pipe(
switchMap((api) =>
// subscribe to system events via storage
api.query.system.events()
)
)
// Then we're subscribing to the emitted results
.subscribe((events) => {
console.log(`\nReceived ${events.length} events:`);
// loop through the Vec<EventRecord>
events.forEach((record) => {
// extract the phase, event and the event types
const { event, phase } = record;
const types = event.typeDef;
// show what we are busy with
console.log(`\t${event.section}:${event.method}:: (phase=${phase.toString()})`);
console.log(`\t\t${event.meta.documentation.toString()}`);
// loop through each of the parameters, displaying the type and data
event.data.forEach((data, index) => {
console.log(`\t\t\t${types[index].type}: ${data.toString()}`);
});
});
});
}
main().catch((error) => {
console.error(error);
process.exit(-1);
});
@@ -1,18 +0,0 @@
{
"name": "rx_08_system_events",
"version": "0.1.0",
"description": "Example showing how to query and parse events",
"main": "index.js",
"author": "Stefie",
"license": "MIT",
"scripts": {
"clean": "rimraf node_modules",
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "*"
},
"devDependencies": {
"rimraf": "^2.6.2"
}
}

Some files were not shown because too many files have changed in this diff Show More