Compare commits

...
831 Commits
Author SHA1 Message Date
github-actions[bot] 32a04fd24f [CI Skip] release/stable 11.0.3
skip-checks: true
2024-05-08 13:31:16 +00:00
Tarik Gul 009461f564 11.0.3 (#5873) 2024-05-08 16:23:44 +03:00
github-actions[bot] 00cb2ef875 [CI Skip] bump/beta 11.0.3-2-x
skip-checks: true
2024-05-08 12:49:12 +00:00
Tarik Gul fed0d5bf0d Update substrate to latest (#5872) 2024-05-08 15:41:42 +03:00
github-actions[bot] 53e9305f41 [CI Skip] bump/beta 11.0.3-1-x
skip-checks: true
2024-05-08 03:23:20 +00:00
Tarik Gul 2ca9da3304 Fix claimedRewards in staking.derives (#5870)
* Fix claimedRewards in staking.derives

* Cleanup

* few nits
2024-05-08 06:15:40 +03:00
github-actions[bot] 7a4d32710c [CI Skip] bump/beta 11.0.3-0-x
skip-checks: true
2024-05-06 16:26:34 +00:00
Tarik Gul 15c8859b06 ApiDerive.staking backwards compatibility. (#5868)
* Start of backwards compatibility for api.derive.staking

* Update nextElected to be compatible

* lint

* Comments

* remove clipped from query

* Ensure backwards compat for ownExposure

* Fix query
2024-05-06 19:18:58 +03:00
github-actions[bot] e0e9829417 [CI Skip] release/stable 11.0.2
skip-checks: true
2024-04-24 17:12:04 +00:00
Tarik Gul 00bc5c818b 11.0.2 (#5866) 2024-04-24 13:04:17 -04:00
github-actions[bot] f43600d773 [CI Skip] bump/beta 11.0.2-0-x
skip-checks: true
2024-04-24 16:38:09 +00:00
Tarik Gul fc112988f0 Fix type for TAssetConversion in Polkadot Asset hub (#5865) 2024-04-24 12:30:42 -04:00
github-actions[bot] a9fa603ad8 [CI Skip] release/stable 11.0.1
skip-checks: true
2024-04-23 21:08:58 +00:00
Tarik Gul d86bff91a7 11.0.1 (#5864) 2024-04-24 00:01:19 +03:00
github-actions[bot] 26b5303c2d [CI Skip] bump/beta 10.13.2-3-x
skip-checks: true
2024-04-23 18:13:43 +00:00
Tarik Gul b4ebdc29a1 Add claimedRewardsEra to api.derive.staking.query for compatibility with legacyClaimedRewards (#5862)
* Fix ClaimedRewards breaking change

* fix some naming

* remove consoles

* Fix logic

* fix output type

* Fix StakerRewards

* Fix electedInfo
2024-04-23 21:06:11 +03:00
github-actions[bot] 6e4dc0b52d [CI Skip] bump/beta 10.13.2-2-x
skip-checks: true
2024-04-23 12:48:34 +00:00
Matias Volpe 02ec613def Bump @substrate/connect to 0.8.10 (#5863) 2024-04-23 08:41:06 -04:00
github-actions[bot] a83e1da941 [CI Skip] bump/beta 10.13.2-1-x
skip-checks: true
2024-04-22 19:54:07 +00:00
Tarik Gul c4e8270b45 Update api.derive.staking calls with breaking changes (#5860)
* Fix staking derives

* ownexposure

* fix query

* Add WithExposureMEta

* exposureMEta

* fix ownExposures

* Add page input for staking.query

* Update types for query

* add page param to ownExposure

* change page to exposurePaged

* fix small nit
2024-04-22 22:46:33 +03:00
github-actions[bot] ddb9b44460 [CI Skip] bump/beta 10.13.2-0-x
skip-checks: true
2024-04-21 13:22:40 +00:00
Tarik Gul 887812eeaa Update polkadot types-known for latest runtime upgrades (#5857) 2024-04-21 16:15:10 +03:00
github-actions[bot] 6415eb6515 [CI Skip] release/stable 10.13.1
skip-checks: true
2024-04-16 17:44:32 +00:00
Tarik Gul 06c829d30f 10.13.1 (#5854) 2024-04-16 20:37:03 +03:00
github-actions[bot] efd6ba9a4c [CI Skip] bump/beta 10.12.7-5-x
skip-checks: true
2024-04-16 15:31:19 +00:00
Tarik Gul a1f2473fb4 Update kusama types-known for 1001003 (#5853) 2024-04-16 18:23:44 +03:00
github-actions[bot] 9e53fc060d [CI Skip] bump/beta 10.12.7-4-x
skip-checks: true
2024-04-16 14:47:38 +00:00
Tarik Gul 364001f287 Update westend types-known for 1010000 (#5852) 2024-04-16 17:40:02 +03:00
github-actions[bot] 5bcd56d6c3 [CI Skip] bump/beta 10.12.7-3-x
skip-checks: true
2024-04-15 20:49:17 +00:00
Tarik Gul 5b3f18e6fd Resolve correct module for council derive (#5851)
* Resolve correct module for council derive

* remove console
2024-04-15 23:41:40 +03:00
github-actions[bot] 8ab79958f0 [CI Skip] bump/beta 10.12.7-2-x
skip-checks: true
2024-04-13 21:32:54 +00:00
Tarik Gul 1343aa4651 Support ParachainHost runtime Api v6 7 8 9 10 (#5850)
* Add initial update for parachainHost

* Add v6,7,8,9,10

* fix version nit

* change bytes to u32 for usize
2024-04-14 00:25:26 +03:00
github-actions[bot] a311fed87e [CI Skip] bump/beta 10.12.7-1-x
skip-checks: true
2024-04-13 16:51:25 +00:00
Tarik Gul c0590bc5fe Update substrate metadata latest (#5849) 2024-04-13 19:43:56 +03:00
github-actions[bot] d650744984 [CI Skip] bump/beta 10.12.7-0-x
skip-checks: true
2024-04-08 16:58:49 +00:00
Tarik Gul 7baf2ecf7a Update CI actions and setup_node to v4 (#5844) 2024-04-08 19:51:04 +03:00
github-actions[bot] accfce9785 [CI Skip] release/stable 10.12.6
skip-checks: true
2024-04-03 03:35:00 +00:00
Tarik Gul 0349c39907 10.12.6 (#5842) 2024-04-03 06:26:39 +03:00
github-actions[bot] 155701a7b1 [CI Skip] release/stable 10.12.5
skip-checks: true
2024-04-02 21:04:34 +00:00
Tarik Gul c6e5cb812b 10.12.5 (#5840)
* 10.12.5

* Update changelog
2024-04-02 23:57:19 +03:00
github-actions[bot] 63f3fc8a89 [CI Skip] bump/beta 10.12.5-8-x
skip-checks: true
2024-04-02 14:35:31 +00:00
Tarik Gul 591e9b145d Add assetId field to to necessary ExtrinsicPayloads (#5839)
* Add assetId field to GenericExtrinsicPayload

* Update AssetId usage

* update nits

* Update packages/types/src/extrinsic/Extrinsic.ts
2024-04-02 17:28:05 +03:00
github-actions[bot] caca8ce345 [CI Skip] bump/beta 10.12.5-7-x
skip-checks: true
2024-04-01 13:48:53 +00:00
Tarik Gul ccae7c9421 Add Updated Runtime Defintions (#5837)
* Start v15 runtime api support

* Update root too mmr_root

* fix MmrError type

* ensure type is generated

* Add ValidateStatement

* touch up statement

* Update core

* get core fixed

* Fix ExtrinsicInclusionMode type

* add mixnet

* Fix mixnet export

* fix type

* Add GenesisBuilder
2024-04-01 16:41:30 +03:00
github-actions[bot] be0a764be7 [CI Skip] bump/beta 10.12.5-6-x
skip-checks: true
2024-03-28 19:00:05 +00:00
Tarik Gul 4be19804b2 V15 Update substrate latest metadata (#5838) 2024-03-28 20:52:39 +02:00
github-actions[bot] 7874a8e723 [CI Skip] bump/beta 10.12.5-5-x
skip-checks: true
2024-03-26 01:04:15 +00:00
Tarik Gul 5e9eed426a Bump yarn to 4.1.1 (#5836) 2024-03-26 02:57:02 +02:00
github-actions[bot] ff3b798ea4 [CI Skip] bump/beta 10.12.5-4-x
skip-checks: true
2024-03-24 15:42:37 +00:00
Snoppy 62163ea5a7 chore: fix typos (#5835) 2024-03-24 11:35:30 -04:00
github-actions[bot] 96cde82c60 [CI Skip] bump/beta 10.12.5-3-x
skip-checks: true
2024-03-24 15:26:12 +00:00
Lauro Gripa a2ea6a36d1 Fix multi call of defenderVotes and isDefenderVoter flag in society.members derivation (#5834)
* Fix society members derivation and add regression test

* Remove regression test for now

* Optimize challenge round query

* Make linter happy

* Return true for isDefenderVoter even if the member vote for rejection
2024-03-24 11:18:48 -04:00
github-actions[bot] 5531d180d7 [CI Skip] bump/beta 10.12.5-2-x
skip-checks: true
2024-03-22 23:12:13 +00:00
Tarik Gul aacf0726e4 Update substrate latest metadata (#5833)
* Update substrate latest metadata

* imports
2024-03-23 01:04:57 +02:00
github-actions[bot] 9fde30a1d6 [CI Skip] bump/beta 10.12.5-1-x
skip-checks: true
2024-03-21 17:25:11 +00:00
Tarik Gul 0982f68507 Add disableAscii option for toHuman, and toPrimitive (#5831)
* Add `allowAscii` option for toHuman, and toPrimitive

* change allowAscii to disableAscii

* add test

* Ensure Struct passes down the value to Raw, and add disableAscii to other types

* ensure CodecMap also has disableAscii

* toPrimitive CodecMap disableAscii

* add toPrimitive options
2024-03-21 19:17:53 +02:00
github-actions[bot] bfabfcd99f [CI Skip] bump/beta 10.12.5-0-x
skip-checks: true
2024-03-21 14:20:42 +00:00
Tarik Gul 64ac37ee4d Update westend runtime upgrade 1009000 (#5832) 2024-03-21 16:13:22 +02:00
github-actions[bot] 442a0fbbf8 [CI Skip] release/stable 10.12.4
skip-checks: true
2024-03-19 13:22:04 +00:00
Tarik Gul 615e4c67fd 10.12.4 (#5830) 2024-03-19 15:15:00 +02:00
github-actions[bot] 1c7f3b157d [CI Skip] bump/beta 10.12.4-0-x
skip-checks: true
2024-03-19 12:37:40 +00:00
Javier Viola b0ce49de18 add muln(2), as was in the old code (#5829) 2024-03-19 08:30:22 -04:00
github-actions[bot] 95798b4636 [CI Skip] release/stable 10.12.3
skip-checks: true
2024-03-18 22:58:48 +00:00
Tarik Gul 88da5011e0 10.12.3 (#5828) 2024-03-19 00:51:39 +02:00
github-actions[bot] 18f596d448 [CI Skip] bump/beta 10.12.3-7-x
skip-checks: true
2024-03-18 21:28:49 +00:00
Javier ViolaandTarik Gul 2c7b904c37 fix: check if minimumPeriod is zero (#5827)
* fix: check if minimumPeriod is zero

* changes for https://github.com/paritytech/polkadot-sdk/pull/3732/files

* guard expectedBlockTime

* typo

* clean code and add aura interface

* Update signingInfo.ts

Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>

* Update packages/api-derive/src/tx/signingInfo.ts

Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>

* lint

---------

Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
2024-03-18 17:21:00 -04:00
github-actions[bot] c30ae402da [CI Skip] bump/beta 10.12.3-6-x
skip-checks: true
2024-03-18 16:17:51 +00:00
Dominique 1a0677800e fix: add optional chaining operator in toHuman (#5825)
* fix: add optional chaining operator in toHuman

* fix typo
2024-03-18 12:10:22 -04:00
github-actions[bot] 8dbc373ac5 [CI Skip] bump/beta 10.12.3-5-x
skip-checks: true
2024-03-16 04:09:19 +00:00
Tarik Gul cf956f869c Update westend runtime upgrade per block (#5824) 2024-03-16 06:02:03 +02:00
github-actions[bot] 09a34a7f05 [CI Skip] bump/beta 10.12.3-4-x
skip-checks: true
2024-03-16 01:04:16 +00:00
Tarik Gul 18a9205868 Update kusama runtime upgrade per block (#5823) 2024-03-16 02:57:09 +02:00
github-actions[bot] 9a9fa90f5e [CI Skip] bump/beta 10.12.3-3-x
skip-checks: true
2024-03-15 15:25:47 +00:00
Tarik Gul 114f4f82bf Update polkadot runtime upgrade per block (#5822)
* Update polkadot runtime upgrade per block

* update e2e tests

* lint
2024-03-15 17:18:25 +02:00
github-actions[bot] 3d0865d95d [CI Skip] bump/beta 10.12.3-2-x
skip-checks: true
2024-03-15 02:22:36 +00:00
Tarik Gul 60993d8fa4 Fix invalid Lookup assignment on augmentation and update polkadot and kusama metadata (#5812)
* Update kusama and polkadot

* fix type gen aug

* todo

* fix nits

* Update json metadata

* Fix xcmv3multilocation

* fix spacing

* fix tests
2024-03-15 04:15:25 +02:00
github-actions[bot] 89227fd031 [CI Skip] bump/beta 10.12.3-1-x
skip-checks: true
2024-03-13 14:25:17 +00:00
Tarik Gul 9ecf4f2ee0 Fix api.derive.staking.eraExposure for compatibility (#5815)
* Fix api.derive.staking.eraExposure

* fix nit
2024-03-13 16:17:35 +02:00
github-actions[bot] 390610127a [CI Skip] bump/beta 10.12.3-0-x
skip-checks: true
2024-03-13 01:16:58 +00:00
Matias Volpe 5ef0fedd26 Bump @substrate/connect to 0.8.8 (#5817) 2024-03-12 21:09:47 -04:00
github-actions[bot] da289238b0 [CI Skip] release/stable 10.12.2
skip-checks: true
2024-03-11 13:05:36 +00:00
Tarik Gul 8289e181cc 10.12.2 (#5814) 2024-03-11 14:58:13 +02:00
github-actions[bot] d06860861c [CI Skip] bump/beta 10.12.2-2-x
skip-checks: true
2024-03-07 13:42:56 +00:00
Tarik GulandAlberto Nicolas Penayo 1797d6b42c Update docs in types-support for retrieving metadata for typegen (#5809)
* Update docs in types-support for retrieving metadata for typegen

* nit

* copy notes

* Update packages/types-support/src/metadata/README.md

Co-authored-by: Alberto Nicolas Penayo <74352651+bee344@users.noreply.github.com>

* Update packages/types-support/src/metadata/README.md

Co-authored-by: Alberto Nicolas Penayo <74352651+bee344@users.noreply.github.com>

---------

Co-authored-by: Alberto Nicolas Penayo <74352651+bee344@users.noreply.github.com>
2024-03-07 15:35:46 +02:00
github-actions[bot] 6a9a53c48c [CI Skip] bump/beta 10.12.2-1-x
skip-checks: true
2024-03-06 18:24:57 +00:00
Tarik Gul d680b3dd39 Bump to latest Substrate metadata (#5807)
* Bump to latest substrate metadata

* Bump to latest Substrate metadata

* Update type-support docs for metadata

* Update docs again

* fix compat issues

* adjust types
2024-03-06 20:17:23 +02:00
github-actions[bot] 3b479879ca [CI Skip] bump/beta 10.12.2-0-x
skip-checks: true
2024-03-04 17:04:54 +00:00
Ermal Kaleci ea2c942ece fix cache key (rpc-provider) (#5745) 2024-03-04 11:57:45 -05:00
github-actions[bot] df2039f54d [CI Skip] release/stable 10.12.1
skip-checks: true
2024-03-04 12:16:27 +00:00
Tarik Gul 501638b2d9 10.12.1 (#5804)
* 10.12.1

* remove 10.12.0
2024-03-04 14:09:15 +02:00
Tarik Gul d163d91909 10.12.0 (#5802)
* 10.12.0

* extra space in changelog
2024-03-04 06:08:42 +02:00
github-actions[bot] dc7f687563 [CI Skip] bump/beta 10.11.4-0-x
skip-checks: true
2024-03-02 14:25:25 +00:00
peetzweg/ ca4802326c feat: ink! v5 (#5791)
* adds definitions and types according to ink v5 changes

* adds toV5 boilerplate code draft

* adds v5 flipper test contract code

* fix license dates

* adds test v5 toLatest test

* implements new scheme to determine event

* apply linter changes

* adds test result outputs

* change `EventRecord['topics'][0]` type to plain `Hash`

* adds testcases for decoding payload data of a ink!v4 and ink!v5 event

* changes `Abi.decodeEvent(data:Bytes)` method interface to `Abi.decodeEvent(record:EventRecord)` which includes the event and the topic for decoding.

* draft implementation with version metadata

* cleaner implementation of versioned Metadata by actually leveraging the `version` field included since v2 contract metadata

* trying to make linter happy

* makes `ContractMetadataSupported` in internal to `Abi` type and not exposing it externally.

* properly types unused parameter for tsc 🤷

* adds `@polkadot/types-support` dev dependency

* Update yarn.lock

* references `types-support` in `api-contract

* resolving change requests

* resolves linter warnings

* changes ContractMetadataV5 field to `u64` from `Text`

* adds contracts and contract metadata compiled with the most recent ink version

* implements decoding of anonymous events if possible

* removes done todo comments
2024-03-02 09:18:14 -05:00
github-actions[bot] f9b2d26381 [CI Skip] release/stable 10.11.3
skip-checks: true
2024-02-27 15:21:23 +00:00
Tarik Gul 28a5ac4279 10.11.3 (#5799)
* 10.11.3

* add space in changelog
2024-02-27 17:14:13 +02:00
github-actions[bot] feb652cef3 [CI Skip] bump/beta 10.11.3-10-x
skip-checks: true
2024-02-23 13:06:20 +00:00
Matias Volpe f87479f9da chore: bump @substrate/connect to 0.8.7 (#5797) 2024-02-23 07:59:07 -05:00
github-actions[bot] 2be54afe24 [CI Skip] bump/beta 10.11.3-9-x
skip-checks: true
2024-02-21 13:36:10 +00:00
Matias Volpe 24d9d053a1 feat: bump @substrate/connect to 0.8.6 (#5796) 2024-02-21 14:28:51 +01:00
github-actions[bot] 3299292368 [CI Skip] bump/beta 10.11.3-8-x
skip-checks: true
2024-02-17 14:16:08 +00:00
Tarik Gul 58b320a791 chore(yarn): update yarn to 4.1.0 (#5792) 2024-02-17 16:08:47 +02:00
github-actions[bot] 6998d9232b [CI Skip] bump/beta 10.11.3-7-x
skip-checks: true
2024-02-17 01:57:13 +00:00
Tarik Gul 43e11d8f56 ci: add user (TarikGul) to auto-approve (#5793) 2024-02-17 03:49:46 +02:00
github-actions[bot] 22d06b93a6 [CI Skip] bump/beta 10.11.3-6-x
skip-checks: true
2024-01-26 14:19:26 +00:00
Matias Volpe bc3f066c3b feat: upgrade to substrate-connect v0.8.4 (#5776)
* feat: upgrade to substrate-connect v0.8.4

* feat(rpc-provider): re-write addChain for @substrate/connect

* fix: linting
2024-01-26 15:11:58 +01:00
github-actions[bot] de30dd5bfe [CI Skip] bump/beta 10.11.3-5-x
skip-checks: true
2024-01-26 10:46:12 +00:00
Marc Fornósandgithub-actions[bot] a64228c9b2 add beefy compact signed commitment definition (#5781)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-26 12:38:40 +02:00
github-actions[bot] 5374f8448f [CI Skip] bump/beta 10.11.3-4-x
skip-checks: true
2024-01-26 07:44:18 +00:00
Tarik Gul c5371c146b feat(rpc-provider): allow cacheCapacity option for WsProvider (#5778)
* feat(rpc-provider): allow cacheCapacity option for WsProvider

* change args ordering to avoid breaking change
2024-01-26 09:36:51 +02:00
github-actions[bot] 5de73b706e [CI Skip] bump/beta 10.11.3-3-x
skip-checks: true
2024-01-24 07:04:22 +00:00
Jaco 7fc736769a Bump deps (#5785)
* Bump deps

* Satisfy linter on unsubscribe
2024-01-24 08:56:56 +02:00
github-actions[bot] 747855b161 [CI Skip] bump/beta 10.11.3-2-x
skip-checks: true
2024-01-08 13:14:41 +00:00
Jaco 3bdf49b042 2024 (#5777) 2024-01-08 15:07:13 +02:00
github-actions[bot] 93175f6a01 [CI Skip] bump/beta 10.11.3-1-x
skip-checks: true
2023-12-19 09:28:14 +00:00
Robert Gabriel Jakabosky b4150d5dbf Fix sorting of Option values and error on duplicates from BTreeSet/BTreeMap. (#5731)
* Fix sorting of Option<Enum> values.

* Filter duplicates from BTreeSet/BTreeMap.

* Throw error instead of filtering duplicates.

* Test duplicate values and Option(Enum) sorting.

* Add tests for BTreeMap.

* Add None values to tests.
2023-12-19 11:20:48 +02:00
github-actions[bot] dfbbfa8a7d [CI Skip] bump/beta 10.11.3-0-x
skip-checks: true
2023-12-19 08:57:50 +00:00
Jaco 97116a3d8a Bump dev w/ packageDetect adjustments (#5775) 2023-12-19 10:50:28 +02:00
github-actions[bot] 0c7fed3090 [CI Skip] release/stable 10.11.2
skip-checks: true
2023-12-18 10:27:35 +00:00
Jaco 5a4414d36d 10.11.2 (#5774)
* 10.11.2

* Adj metadata CHANGELOG entry
2023-12-18 12:20:15 +02:00
github-actions[bot] 7d41d34a03 [CI Skip] bump/beta 10.11.2-4-x
skip-checks: true
2023-12-18 08:36:29 +00:00
Jaco f983b6aa90 Bump yarn berry, bump deps (#5772) 2023-12-18 10:29:05 +02:00
github-actions[bot] 9271f7f05a [CI Skip] bump/beta 10.11.2-3-x
skip-checks: true
2023-12-18 07:10:53 +00:00
Jaco 46c00d4883 Adjust known lookup with support for [u8;32] (#5764) 2023-12-18 09:03:08 +02:00
github-actions[bot] 2d26e748f0 [CI Skip] bump/beta 10.11.2-2-x
skip-checks: true
2023-12-11 08:33:39 +00:00
Jaco db1a699c0a Bump to latest Substrate metadata (#5770) 2023-12-11 10:25:48 +02:00
github-actions[bot] 53f9abe4e2 [CI Skip] bump/beta 10.11.2-1-x
skip-checks: true
2023-12-11 08:23:16 +00:00
Francisco Gamundi 263d2a40f3 Add chainIsEthereum prop to Registry interface (#5761) 2023-12-11 10:15:29 +02:00
github-actions[bot] c73c26d133 [CI Skip] bump/beta 10.11.2-0-x
skip-checks: true
2023-11-26 10:18:13 +00:00
Alberto Nicolas Penayo 63afad4862 updated remaining assetId for ChargeAssetTxPayment (#5763) 2023-11-26 12:10:32 +02:00
github-actions[bot] fca68ae286 [CI Skip] release/stable 10.11.1
skip-checks: true
2023-11-18 08:18:39 +00:00
Jaco efc4a291b1 10.11.1 (#5759) 2023-11-18 10:11:07 +02:00
github-actions[bot] ed14218205 [CI Skip] bump/beta 10.10.2-8-x
skip-checks: true
2023-11-18 07:58:45 +00:00
Jaco 4ec727ed6b Bump common (#5758) 2023-11-18 09:51:14 +02:00
github-actions[bot] a1ccedf76e [CI Skip] bump/beta 10.10.2-7-x
skip-checks: true
2023-11-18 06:56:19 +00:00
Jaco ec1f6ca5f5 Add SkipCheckIfFeeless signed extension (#5756) 2023-11-18 08:48:42 +02:00
github-actions[bot] dcca12bc23 [CI Skip] bump/beta 10.10.2-6-x
skip-checks: true
2023-11-17 15:16:05 +00:00
Jaco d9d0d7b0c8 Add known intrablockEntropy storage key (#5754) 2023-11-17 17:08:33 +02:00
github-actions[bot] 1a5de033e6 [CI Skip] bump/beta 10.10.2-5-x
skip-checks: true
2023-11-17 08:49:00 +00:00
Jaco 3460a74f7e Bump dev deps, drop Node 16 (#5753) 2023-11-17 10:41:28 +02:00
github-actions[bot] 56eee35e05 [CI Skip] bump/beta 10.10.2-4-x
skip-checks: true
2023-11-16 07:33:57 +00:00
Alberto Nicolas Penayo bc81ca45ef fix: ChargeAssetTxPayment to work with Asset Conversion on Westend's and Kusama's Asset Hubs (#5752)
* fix: added type override for AssetConversion

* fix: modified ChargeAssetTxPayment SE for AssetHub

* fixed ChargeAssetTxPayment for AssetConversion

* ran yarn lint

* added default type for AssetConversion

* added default type TAssetConversion

* ran yarn lint
2023-11-16 09:26:21 +02:00
github-actions[bot] 7a8a4f1c64 [CI Skip] bump/beta 10.10.2-3-x
skip-checks: true
2023-11-02 08:46:25 +00:00
xiaolou86 4c811a3fdd Fix typos (#5747) 2023-11-02 10:36:36 +02:00
github-actions[bot] 6fcd984205 [CI Skip] bump/beta 10.10.2-2-x
skip-checks: true
2023-10-23 08:40:00 +00:00
Jaco 62bbf09f5c Bump dev deps (#5743) 2023-10-23 11:28:37 +03:00
github-actions[bot] dea14bcfc4 [CI Skip] bump/beta 10.10.2-1-x
skip-checks: true
2023-10-19 02:40:59 +00:00
Serban Iorgaandgithub-actions[bot] 5246a6771c Fix beefy::subscribeJustifications() return type (#5740)
* Fix beefy::subscribeJustifications() return type

* yarn build

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-19 05:31:59 +03:00
github-actions[bot] bc2a51e28e [CI Skip] bump/beta 10.10.2-0-x
skip-checks: true
2023-10-15 10:56:57 +00:00
Jaco dd085cee79 Bump TS (#5739) 2023-10-15 13:43:45 +03:00
github-actions[bot] a1e25176dd [CI Skip] release/stable 10.10.1
skip-checks: true
2023-10-14 07:04:51 +00:00
Jaco c241d2430f 10.10.1 (#5738) 2023-10-14 09:54:17 +03:00
github-actions[bot] 0f84a4f53d [CI Skip] bump/beta 10.9.2-29-x
skip-checks: true
2023-10-14 04:13:01 +00:00
Jaco 200ea2310c Bump dev deps (#5737) 2023-10-14 07:03:54 +03:00
github-actions[bot] a22a111f72 [CI Skip] bump/beta 10.9.2-28-x
skip-checks: true
2023-10-03 06:12:06 +00:00
Jaco 2a16dc80c9 Bump dev deps (#5733) 2023-10-03 08:59:50 +03:00
github-actions[bot] 0dcf349831 [CI Skip] bump/beta 10.9.2-27-x
skip-checks: true
2023-09-24 16:52:57 +00:00
Jaco f77a97b1fe Bump dev deps (#5730) 2023-09-24 19:42:18 +03:00
github-actions[bot] 38209a3123 [CI Skip] bump/beta 10.9.2-26-x
skip-checks: true
2023-09-15 07:44:00 +00:00
Jaco c0d5408d8f Bump deps (w/ latest util) (#5729)
* Bump deps (w/ latest util)

* CHANGELOG

* Fix typo
2023-09-15 10:34:33 +03:00
github-actions[bot] 700812aa60 [CI Skip] bump/beta 10.9.2-25-x
skip-checks: true
2023-09-04 21:24:29 +00:00
Andreea EfteneandJaco ae24a99fcb Update check for contract instantiation (#5699)
* add risc v check

* run lint

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

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

* add explicit return type

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

---------

Co-authored-by: Jaco <jacogr@gmail.com>
2023-09-05 00:13:41 +03:00
github-actions[bot] 257c9579d0 [CI Skip] bump/beta 10.9.2-24-x
skip-checks: true
2023-09-01 04:52:16 +00:00
Francisco Gamundi 74a969bb54 Add isEthereum to ChainProperties (#5686)
* Add isEthereum to ChainProperties

* Decription

* Set isEthereum in registry

* lint

* Change type to Bool

* Registry getter

* Fix test
2023-09-01 07:41:04 +03:00
github-actions[bot] 00b26f48b4 [CI Skip] bump/beta 10.9.2-23-x
skip-checks: true
2023-08-30 06:16:18 +00:00
Jaco 641ca4daee Expose chain.subscribeFinalizedBlocks derive (#5724)
* Expose chain.subscribeFinalizedBlocks derive

* CHANGELOG
2023-08-30 09:04:25 +03:00
github-actions[bot] 4ab9ad6765 [CI Skip] bump/beta 10.9.2-22-x
skip-checks: true
2023-08-30 06:02:18 +00:00
Jaco 1c3fc93ebd Bump dev deps (w/ latest CHANGELOG) (#5723) 2023-08-30 08:49:26 +03:00
github-actions[bot] 03f323fae1 [CI Skip] bump/beta 10.9.2-21-x
skip-checks: true
2023-08-30 05:34:38 +00:00
Jaco 7cae843e9b Expose combination of provider + core stats (#5696)
* Expose combination of provider + core stats

* Non-existing core stats
2023-08-30 08:25:51 +03:00
github-actions[bot] ab3b162d7e [CI Skip] bump/beta 10.9.2-20-x
skip-checks: true
2023-08-29 13:24:39 +00:00
Jaco 21425900bb Parsing for latest metadata v15 (#5720)
* Parsing for latest metadata v15

* ExtrinsicMetadataLatest = 15

* ExtrinsicMetadataV14 -> ExtrinsicMetadataV15 conversion

* V15 conversion type unwrap

* Cleanup checks

* Adjust (again)

* Start outerEnums population

* Add Event outer enum extraction

* Adjust expectations
2023-08-29 16:15:45 +03:00
github-actions[bot] b82bf68954 [CI Skip] bump/beta 10.9.2-19-x
skip-checks: true
2023-08-29 12:13:46 +00:00
Jegor Sidorenko cfffa68c96 Use Box<XcmV3MultiLocation> instead of MultiAssetId (#5700)
* Use Box<XcmV3MultiLocation> instead of MultiAssetId

* Remove Box<>

* Fix test
2023-08-29 15:03:21 +03:00
github-actions[bot] f08be2f928 [CI Skip] bump/beta 10.9.2-18-x
skip-checks: true
2023-08-29 10:22:23 +00:00
peetzweg/andJaco f213063972 Adds tests cases for issue #5702 (#5703)
* adds tests cases describe in #5702

* fix wrong test outputs

* Update packages/types-codec/src/base/Int.spec.ts

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

* Apply suggestions from code review

---------

Co-authored-by: Jaco <jacogr@gmail.com>
2023-08-29 13:10:09 +03:00
github-actions[bot] 3828f41a0f [CI Skip] bump/beta 10.9.2-17-x
skip-checks: true
2023-08-29 10:09:32 +00:00
Jaco bc62b46fa5 Seraliaze "unknown" payload fields via toJSON (#5716)
* Seraliaze "unknown" payload fields via toJSON

* Additional tests

* Adjust

* CHANGELOG
2023-08-29 12:58:55 +03:00
github-actions[bot] 9f0a32474d [CI Skip] bump/beta 10.9.2-16-x
skip-checks: true
2023-08-29 09:54:27 +00:00
Jaco ebde5a3c19 Latest CHANGELOG (w/ deps bump) (#5719) 2023-08-29 12:44:52 +03:00
github-actions[bot] 321b759723 [CI Skip] bump/beta 10.9.2-15-x
skip-checks: true
2023-08-29 09:18:00 +00:00
Jaco f49f05c820 Bump static metadata (#5717)
* Bump static metadata

* Adjust society candidate retrieval

* Fix society member retrieval

* Rebuild

* Build runtime

* Adjust types

* Extract re-used types
2023-08-29 12:08:41 +03:00
github-actions[bot] e9fec17599 [CI Skip] bump/beta 10.9.2-14-x
skip-checks: true
2023-08-29 08:16:33 +00:00
Jaco 6f24d2f5dc Latest BeefyApi & ParachainHost runtime interfaces (#5718)
* Latest BeefyApi & ParachainHost runtime interfaces

* Add missing types

* Correct string closing
2023-08-29 11:07:39 +03:00
github-actions[bot] c028c69582 [CI Skip] bump/beta 10.9.2-13-x
skip-checks: true
2023-08-24 10:29:03 +00:00
Jaco 136ec7c600 Group Int/Uint tests, size check compare for Int (#5709)
* Group In/Uint tests, size check compare for Int

* Adjust
2023-08-24 13:20:03 +03:00
github-actions[bot] 0455a94630 [CI Skip] bump/beta 10.9.2-12-x
skip-checks: true
2023-08-23 10:44:59 +00:00
Jaco 3c7dc4b82a Bump deps (#5708) 2023-08-23 13:35:52 +03:00
github-actions[bot] 52e36534cf [CI Skip] bump/beta 10.9.2-11-x
skip-checks: true
2023-08-20 07:00:26 +00:00
Jaco 0320e9b410 Bump deps (#5707) 2023-08-20 09:49:24 +03:00
github-actions[bot] f4655a233a [CI Skip] bump/beta 10.9.2-10-x
skip-checks: true
2023-08-18 06:46:00 +00:00
Jaco 4826906b6d Bump common (#5705)
* Bump common

* Fix lint
2023-08-18 09:36:52 +03:00
github-actions[bot] 2f2bbc01bb [CI Skip] bump/beta 10.9.2-9-x
skip-checks: true
2023-08-16 08:09:47 +00:00
Jaco d8136a8e61 Bump dev (w/ ts-eslint updates) (#5691) 2023-08-16 11:00:52 +03:00
github-actions[bot] 319535a1e9 [CI Skip] bump/beta 10.9.2-8-x
skip-checks: true
2023-07-24 11:11:03 +00:00
Jegor Sidorenko c2944f2dc1 Add AssetConversionApi (#5694)
* Add Asset Conversion Api

* Fix lint errors
2023-07-24 14:02:17 +03:00
github-actions[bot] 1fcc278381 [CI Skip] bump/beta 10.9.2-7-x
skip-checks: true
2023-07-24 09:05:52 +00:00
Tim B fd87b08396 added EthRTApiV5 ifaces (#5680) 2023-07-24 11:56:52 +03:00
github-actions[bot] 114c8d3f98 [CI Skip] bump/beta 10.9.2-6-x
skip-checks: true
2023-07-17 08:34:26 +00:00
Branislav Kontur a8b38b09d6 Added FungiblesApi version 2 (#5687)
* Added FungiblesApi version 2

* Add exception to inspectType
2023-07-17 11:25:44 +03:00
github-actions[bot] 47df39e02d [CI Skip] bump/beta 10.9.2-5-x
skip-checks: true
2023-07-06 07:37:17 +00:00
Jaco dd58202af7 Bump deps (#5685)
* Bump deps

* String extends override
2023-07-06 10:28:41 +03:00
github-actions[bot] 6ee830b838 [CI Skip] bump/beta 10.9.2-4-x
skip-checks: true
2023-06-28 13:39:10 +00:00
Jaco 3c3f1bf78e Bump deps (#5682) 2023-06-28 16:29:57 +03:00
github-actions[bot] 8282159f70 [CI Skip] bump/beta 10.9.2-3-x
skip-checks: true
2023-06-21 17:05:27 +00:00
Jeeyong Um d946a99a35 Alias for Noir types (#5678) 2023-06-21 19:56:39 +03:00
github-actions[bot] 2235cbde19 [CI Skip] bump/beta 10.9.2-2-x
skip-checks: true
2023-06-17 10:38:18 +00:00
Jaco e89212b435 Remove some eslint overrides (#5676)
* Remove some eslint overrides

* Use noop
2023-06-17 13:27:51 +03:00
github-actions[bot] 9913701e82 [CI Skip] bump/beta 10.9.2-1-x
skip-checks: true
2023-06-16 06:55:38 +00:00
Jaco 61a8b4041e Use import.meta.url instead of process.cwd() (#5675)
* Use import.meta.url instead of process.cwd()

* Bump dev
2023-06-16 09:45:32 +03:00
github-actions[bot] 56fb5c9985 [CI Skip] bump/beta 10.9.2-0-x
skip-checks: true
2023-06-12 06:16:24 +00:00
Jaco eb9a0c4a66 Bump util (#5673) 2023-06-12 09:07:51 +03:00
github-actions[bot] ac07123e54 [CI Skip] release/stable 10.9.1
skip-checks: true
2023-06-12 04:41:46 +00:00
Jaco a9865bb60a 10.9.1 (#5672)
* 10.9.1

* Bump static metadata
2023-06-12 07:31:48 +03:00
github-actions[bot] 62741a10dd [CI Skip] bump/beta 10.8.2-0-x
skip-checks: true
2023-06-11 07:08:56 +00:00
Jaco c277b3d865 Adjust object index typings (#5671)
* Adjust object index typings

* CHANGELOG

* Remove dot-notation overrides

* Align overrides

* Ordering

* Revert lint formatting changes

* Bump common
2023-06-11 09:58:20 +03:00
github-actions[bot] edde226740 [CI Skip] release/stable 10.8.1
skip-checks: true
2023-06-05 05:01:50 +00:00
Jaco 88a9316dbd 10.8.1 (#5669) 2023-06-05 07:52:47 +03:00
github-actions[bot] 23b7ff1794 [CI Skip] bump/beta 10.7.4-5-x
skip-checks: true
2023-06-04 15:10:27 +00:00
Jaco f1fda12353 Bump metadata (#5668) 2023-06-04 18:01:24 +03:00
github-actions[bot] e2e0e38d35 [CI Skip] bump/beta 10.7.4-4-x
skip-checks: true
2023-06-04 14:54:03 +00:00
Jaco 74279380e3 Bump common (#5667) 2023-06-04 17:42:28 +03:00
github-actions[bot] e0c5f7cab0 [CI Skip] bump/beta 10.7.4-3-x
skip-checks: true
2023-06-02 10:34:14 +00:00
Jaco 7a088f9ce7 Bump deps (w/ TS 5.1) (#5666) 2023-06-02 13:22:58 +03:00
github-actions[bot] d9ea5ee921 [CI Skip] bump/beta 10.7.4-2-x
skip-checks: true
2023-06-01 05:35:21 +00:00
Jaco 4b8792fe7c Remove (some) eslint overrides (#5663) 2023-06-01 08:26:29 +03:00
github-actions[bot] 5cc25fb40c [CI Skip] bump/beta 10.7.4-1-x
skip-checks: true
2023-05-30 05:48:23 +00:00
Jaco 2494801d50 Rework contract ABI environment option (#5661) 2023-05-30 08:39:29 +03:00
github-actions[bot] dbcb39734a [CI Skip] bump/beta 10.7.4-0-x
skip-checks: true
2023-05-29 17:30:12 +00:00
Andreea Eftene 0be50b285b Add suport for latest ink! metadata (#5650)
* add v5

* add environment

* tov5

* use correct version

* decode env types

* fix tests

* remove unnecesary checks

* update fixtures

* add maxEventTopics

* get type defs for environment

* fix conversion to v4
2023-05-29 20:19:55 +03:00
github-actions[bot] 2f07e1c45f [CI Skip] release/stable 10.7.3
skip-checks: true
2023-05-28 08:05:22 +00:00
Jaco 39eff81207 10.7.3 (#5660) 2023-05-28 10:56:30 +03:00
github-actions[bot] 19f3c5b16b [CI Skip] bump/beta 10.7.3-1-x
skip-checks: true
2023-05-26 05:13:37 +00:00
Jaco cdd74ea084 .paymentInfo never mutates the existing signature (#5659) 2023-05-26 08:02:18 +03:00
github-actions[bot] 54c96ed975 [CI Skip] bump/beta 10.7.3-0-x
skip-checks: true
2023-05-25 07:41:17 +00:00
Jaco 4e507246e3 jg-bump-deps (#5656) 2023-05-25 10:30:06 +03:00
github-actions[bot] d0e0008399 [CI Skip] release/stable 10.7.2
skip-checks: true
2023-05-21 10:24:18 +00:00
Jaco a6eeba83c1 10.7.2 (#5652) 2023-05-21 13:13:34 +03:00
github-actions[bot] 541eceae82 [CI Skip] bump/beta 10.7.2-3-x
skip-checks: true
2023-05-21 09:48:40 +00:00
Jaco 3d0a1701fa Bump dev & adjust duplicated exports (#5651) 2023-05-21 12:40:07 +03:00
github-actions[bot] 0e46592f4d [CI Skip] bump/beta 10.7.2-2-x
skip-checks: true
2023-05-20 07:55:15 +00:00
polymath-eric a561253de9 Allow unset external signer (#5649) 2023-05-20 10:46:06 +03:00
github-actions[bot] 0c6a4754f0 [CI Skip] bump/beta 10.7.2-1-x
skip-checks: true
2023-05-18 09:08:21 +00:00
Jaco 60dd4e9699 Adjust tsconfig usage (w/ latest dev) (#5648) 2023-05-18 11:59:11 +03:00
github-actions[bot] f10f79c0ac [CI Skip] bump/beta 10.7.2-0-x
skip-checks: true
2023-05-18 05:51:41 +00:00
Jaco 8394c71cfa Bump dev deps (#5647)
* Bump dev deps

* Adjust

* Actual bump, fix tsconfig for typegen
2023-05-18 08:42:41 +03:00
github-actions[bot] dd0bd21d88 [CI Skip] release/stable 10.7.1
skip-checks: true
2023-05-13 09:56:51 +00:00
Jaco 58875b8125 10.7.1 (#5645) 2023-05-13 12:44:17 +03:00
github-actions[bot] 7e0586794a [CI Skip] bump/beta 10.6.2-1-x
skip-checks: true
2023-05-13 08:52:44 +00:00
Jaco d800886ee0 Bump util (#5644) 2023-05-13 11:43:50 +03:00
github-actions[bot] 0bdfc37096 [CI Skip] bump/beta 10.6.2-0-x
skip-checks: true
2023-05-13 08:05:11 +00:00
Jaco db3b3f606b Bump static metadata (#5643) 2023-05-13 10:53:47 +03:00
github-actions[bot] 717043c557 [CI Skip] release/stable 10.6.1
skip-checks: true
2023-05-07 11:40:24 +00:00
Jaco 8cee4c462a 10.6.1 (#5635) 2023-05-07 14:30:10 +03:00
github-actions[bot] f6f1646147 [CI Skip] bump/beta 10.5.2-8-x
skip-checks: true
2023-05-07 11:14:21 +00:00
Jaco dd533f9831 Update static metadata (#5634) 2023-05-07 14:02:37 +03:00
github-actions[bot] 5ba13358a5 [CI Skip] bump/beta 10.5.2-7-x
skip-checks: true
2023-05-07 09:34:16 +00:00
Jaco 3a3680194d Allow conversion of v15 metadata (#5631)
* Allow conversion of v15 metadata

* Don't output toCallsOnly in latest known

* Adjust asV* inside metadata conversions

* typo

* CHANGELOG

* CHANGELOG
2023-05-07 12:25:40 +03:00
github-actions[bot] d436e42bb0 [CI Skip] bump/beta 10.5.2-6-x
skip-checks: true
2023-05-06 09:00:47 +00:00
Jaco d6d1575ba9 Bump dev (#5632) 2023-05-06 11:52:22 +03:00
github-actions[bot] 15e5f4d401 [CI Skip] bump/beta 10.5.2-5-x
skip-checks: true
2023-05-04 12:09:06 +00:00
Jaco f4c2b150d3 Adjust rpc coder types (#5630) 2023-05-04 15:00:43 +03:00
github-actions[bot] c1d727fbe8 [CI Skip] bump/beta 10.5.2-4-x
skip-checks: true
2023-05-02 07:23:00 +00:00
Jaco 475891575b Historic Kusama Scheduler overrides (non-comprehensive) (#5629) 2023-05-02 10:14:17 +03:00
github-actions[bot] 02b7807ba5 [CI Skip] bump/beta 10.5.2-3-x
skip-checks: true
2023-05-02 06:27:33 +00:00
Florian Franzen d15f0b3ac5 metadataMd: use endpoint for rpc and runtime details too (#5628) 2023-05-02 09:17:15 +03:00
github-actions[bot] e8f782e1f2 [CI Skip] bump/beta 10.5.2-2-x
skip-checks: true
2023-05-02 05:39:18 +00:00
Jaco 0f627bed2d Adjust WebSocket check (#5627)
* Adjust WebSocket check

* Deno adjust

* Re-adjust
2023-05-02 08:30:19 +03:00
github-actions[bot] 427cf3e105 [CI Skip] bump/beta 10.5.2-1-x
skip-checks: true
2023-05-01 16:39:54 +00:00
Jaco 9e98f81dc0 Attempt to fix Deno check (#5626)
* Attemp to fix Deno check

* Adjust
2023-05-01 19:30:58 +03:00
github-actions[bot] f98422c42b [CI Skip] bump/beta 10.5.2-0-x
skip-checks: true
2023-05-01 15:25:41 +00:00
Tarik Gul 267c6242a3 Update .nvmrc (#5624)
* Update nvmrc to be inline with package.json engine

* Update to 18.15
2023-05-01 18:16:56 +03:00
github-actions[bot] 94cbbf5356 [CI Skip] release/stable 10.5.1
skip-checks: true
2023-04-29 08:56:34 +00:00
Jaco c1b1ad7843 10.5.1 (#5623) 2023-04-29 11:48:07 +03:00
github-actions[bot] ce5769471f [CI Skip] bump/beta 10.4.2-7-x
skip-checks: true
2023-04-29 06:40:36 +00:00
Jaco 09222d9055 Bump util (#5622)
* Bump util

* Adjust to fix build
2023-04-29 09:31:52 +03:00
github-actions[bot] 9c4554ddb3 [CI Skip] bump/beta 10.4.2-6-x
skip-checks: true
2023-04-28 07:46:21 +00:00
Jaco 1ba4c0c277 Allow switching on/off of isPedantic checks (#5620)
* Allow switching on/off of isPedantic checks

* CHANGELOG

* typos
2023-04-28 10:37:27 +03:00
github-actions[bot] ac46305d15 [CI Skip] bump/beta 10.4.2-5-x
skip-checks: true
2023-04-28 07:33:46 +00:00
Jaco ad59abfc37 Adjust spread usage in types/interfaces (#5610) 2023-04-28 10:23:04 +03:00
github-actions[bot] 5a48ca3a0a [CI Skip] bump/beta 10.4.2-4-x
skip-checks: true
2023-04-28 06:49:19 +00:00
Jaco d3dabadf95 Bump deps (#5619)
* Bump deps

* CHANGELOG
2023-04-28 09:40:45 +03:00
github-actions[bot] 212d0e33ae [CI Skip] bump/beta 10.4.2-3-x
skip-checks: true
2023-04-26 09:49:32 +00:00
Jaco a6adeb739f Bump deps w/ export ordering (#5614) 2023-04-26 12:40:14 +03:00
github-actions[bot] cd440ea3c4 [CI Skip] bump/beta 10.4.2-2-x
skip-checks: true
2023-04-25 06:05:26 +00:00
Jaco eb480d7ce9 Export & spread cleanups on types-known (#5609) 2023-04-25 08:56:37 +03:00
github-actions[bot] 298397f499 [CI Skip] bump/beta 10.4.2-1-x
skip-checks: true
2023-04-23 13:02:37 +00:00
Jaco 6b17bf5a7a Default to hex-only when number bits > native Rust (#5611)
* Default to hex-only when number bits > native Rust

* CHANGELOG

* Add test for > u128 case
2023-04-23 15:53:32 +03:00
github-actions[bot] 3b3da09f33 [CI Skip] bump/beta 10.4.2-0-x
skip-checks: true
2023-04-23 06:21:56 +00:00
Jaco 976d708fae Adjust Deno WebSocket check (#5608) 2023-04-23 09:13:09 +03:00
github-actions[bot] 92c250e9a7 [CI Skip] release/stable 10.4.1
skip-checks: true
2023-04-22 09:56:06 +00:00
Jaco ba43c288fe 10.4.1 (#5607) 2023-04-22 12:47:14 +03:00
github-actions[bot] ef0d1f4e8a [CI Skip] bump/beta 10.3.5-4-x
skip-checks: true
2023-04-22 09:26:11 +00:00
Jaco cc31d1176e Bump static metadata (#5606) 2023-04-22 12:17:06 +03:00
github-actions[bot] b45e0d4e0d [CI Skip] bump/beta 10.3.5-3-x
skip-checks: true
2023-04-22 09:00:43 +00:00
Jaco 3b894da9f2 Adjust AccountId20 detection with partial match (#5605) 2023-04-22 11:48:59 +03:00
github-actions[bot] 83500c05b3 [CI Skip] bump/beta 10.3.5-2-x
skip-checks: true
2023-04-22 08:35:22 +00:00
Jaco c554e5eef7 Bump common (#5604) 2023-04-22 11:26:14 +03:00
Jaco 6b655838a0 Small cleanup to author details (#5599)
* Small cleanup to author details

* CHANGELOG
2023-04-22 11:16:29 +03:00
github-actions[bot] 4bd23463ab [CI Skip] bump/beta 10.3.5-1-x
skip-checks: true
2023-04-21 10:56:23 +00:00
Jaco 9c758cce95 Bump dev (w/ Node 16+ only) (#5603) 2023-04-21 13:47:31 +03:00
github-actions[bot] abdc50f405 [CI Skip] bump/beta 10.3.5-0-x
skip-checks: true
2023-04-20 05:23:47 +00:00
Xiliang Chen b849d50995 no warm for unknown signed extensions (#5601) 2023-04-20 08:14:55 +03:00
github-actions[bot] 3d2307f12a [CI Skip] release/stable 10.3.4
skip-checks: true
2023-04-16 09:27:26 +00:00
Jaco 320135dbe5 Author extract using correct as-at state (#5598)
* Author extract using correct as-at state

* Align header retrieval

* Dedupe

* Deupe

* Adjust

* Remove deprecated events.at

* 10.3.4
2023-04-16 12:18:36 +03:00
github-actions[bot] 074e790bfc [CI Skip] release/stable 10.3.3
skip-checks: true
2023-04-15 11:41:28 +00:00
Jaco d561fc9dc7 10.3.3 (#5596) 2023-04-15 14:31:04 +03:00
rob thijssen 8b37ed6dda nimbus author mapping correction (#5590) 2023-04-15 14:14:41 +03:00
github-actions[bot] d2a7df9e0b [CI Skip] bump/beta 10.3.3-3-x
skip-checks: true
2023-04-15 10:17:04 +00:00
Jaco 66ab71b29e Bump metadata (#5595) 2023-04-15 13:08:25 +03:00
github-actions[bot] 8d2300ca3f [CI Skip] bump/beta 10.3.3-2-x
skip-checks: true
2023-04-14 14:02:47 +00:00
Jaco b4bb6613b1 Skip runtime-only type check (#5593)
* Skip runtime-only type check

* Add CHANGELOG
2023-04-14 16:53:53 +03:00
Branislav Kontur 2389ea16e1 Fungibles runtime api for statemine/statemint/westmint (#5592) 2023-04-14 16:35:26 +03:00
github-actions[bot] e33139919f [CI Skip] bump/beta 10.3.3-1-x
skip-checks: true
2023-04-14 08:26:30 +00:00
Branislav KonturandJaco 4c8e7135de Fungibles runtime api for statemine/statemint/westmint (#5584)
* Fungibles runtime api for statemine/statemint/westmint

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

* export `./fungibles/definitions.js`

---------

Co-authored-by: Jaco <jacogr@gmail.com>
2023-04-14 11:14:08 +03:00
github-actions[bot] 4115a93ed3 [CI Skip] bump/beta 10.3.3-0-x
skip-checks: true
2023-04-13 10:19:02 +00:00
Jaco a7526ba5f3 Bump dev (#5591)
* Bump dev

* Adjust

* Adjust
2023-04-13 13:10:36 +03:00
github-actions[bot] 8fe02a1434 [CI Skip] release/stable 10.3.2
skip-checks: true
2023-04-10 05:21:37 +00:00
Jaco ac25d0704d 10.3.2 (#5589) 2023-04-10 08:13:16 +03:00
github-actions[bot] 82d0bfc51b [CI Skip] release/stable 10.3.1
skip-checks: true
2023-04-09 09:43:26 +00:00
Jaco 8e514ad511 10.3.1 (#5587) 2023-04-09 12:34:29 +03:00
github-actions[bot] abb45e5fcf [CI Skip] bump/beta 10.2.3-4-x
skip-checks: true
2023-04-09 08:55:04 +00:00
Jaco 71273dbce3 Bump metadata (#5586)
* Bump metadata

* TransactionPaymentApi/4
2023-04-09 11:46:12 +03:00
github-actions[bot] 3d5b69d6e6 [CI Skip] bump/beta 10.2.3-3-x
skip-checks: true
2023-04-07 06:33:03 +00:00
Jaco d51ddc70f9 Add BitVec.toBoolArray() helper function (#5585) 2023-04-07 09:24:11 +03:00
github-actions[bot] 9052f16e0f [CI Skip] bump/beta 10.2.3-2-x
skip-checks: true
2023-04-05 07:30:36 +00:00
Jaco dd19d17b60 Bump deps (#5580) 2023-04-05 10:22:04 +03:00
github-actions[bot] 58ba63069a [CI Skip] bump/beta 10.2.3-1-x
skip-checks: true
2023-04-04 05:38:08 +00:00
Jaco 6206569e5b Update lock wf (#5576) 2023-04-04 08:29:13 +03:00
github-actions[bot] c3bb18fbaf [CI Skip] bump/beta 10.2.3-0-x
skip-checks: true
2023-04-02 07:02:38 +00:00
Jaco 186cfc93b5 Move type-only imports (w/ verbatimModuleSyntax) (#5574) 2023-04-02 09:53:37 +03:00
github-actions[bot] 9a92089810 [CI Skip] release/stable 10.2.2
skip-checks: true
2023-04-01 08:41:18 +00:00
Jaco 211c487297 10.2.2 (#5573) 2023-04-01 11:32:52 +03:00
github-actions[bot] 3f3c5a753f [CI Skip] bump/beta 10.2.2-4-x
skip-checks: true
2023-04-01 08:14:22 +00:00
Jaco d1d0168793 Bump metadata (#5572) 2023-04-01 11:05:19 +03:00
github-actions[bot] a1f6e207f4 [CI Skip] bump/beta 10.2.2-3-x
skip-checks: true
2023-04-01 07:46:53 +00:00
Jaco de4e56ace0 Bump deps (#5571) 2023-04-01 10:36:13 +03:00
github-actions[bot] 6c5ca7ebec [CI Skip] bump/beta 10.2.2-2-x
skip-checks: true
2023-03-31 10:54:34 +00:00
Jaco d9f3d319fb Bump deps (#5569) 2023-03-31 13:43:33 +03:00
github-actions[bot] 4fd3289739 [CI Skip] bump/beta 10.2.2-1-x
skip-checks: true
2023-03-28 05:02:18 +00:00
rob thijssen 1a267c58f3 support manta author lookup (#5561)
* support manta author lookup

* handle scenarios where queuedKeys is not of the expected type

* add catchError to imports

* should it be square?

* resolve combineLatest deprecation issue

* type safe nimbus author mappings

* precise var names

* remove reference to deprecated combineLatest

* stay simple, that's what works

* implicit type for session.validators

we don't want to change this aspect of the implementation

* clearer comments on the code paths

* explicit variable names
2023-03-28 07:51:25 +03:00
github-actions[bot] 745a1b7838 [CI Skip] bump/beta 10.2.2-0-x
skip-checks: true
2023-03-25 15:55:24 +00:00
Jaco 7e62e08b5d Add repo dev req. for Node.js (#5565) 2023-03-25 17:46:28 +02:00
github-actions[bot] 2328bf8779 [CI Skip] release/stable 10.2.1
skip-checks: true
2023-03-25 11:10:03 +00:00
Jaco 1fb35ae110 10.2.1 (#5564) 2023-03-25 12:58:39 +02:00
github-actions[bot] 91278f67ac [CI Skip] bump/beta 10.1.5-8-x
skip-checks: true
2023-03-25 10:47:49 +00:00
Jaco f8121e364d Bump metadata & deps (#5563)
* Bump metadata & deps

* Add missing types

* Adjust

* Debug

* Use transferAllowDeath

* Use transferAllowDeath in tests

* Re-adjust

* Bump
2023-03-25 12:39:12 +02:00
github-actions[bot] 5c0ff26585 [CI Skip] bump/beta 10.1.5-7-x
skip-checks: true
2023-03-24 12:05:25 +00:00
Jaco 7366fc201d Fix tests for isize (w/ deps bump) (#5562) 2023-03-24 13:56:55 +02:00
github-actions[bot] 6ce7deb1df [CI Skip] bump/beta 10.1.5-6-x
skip-checks: true
2023-03-23 10:43:43 +00:00
Jaco b80a28f65d AccountId20.eq should not fail on null/undefined (#5560)
* AccountId20.eq should not fail on null/undefined

* CHANGELOG
2023-03-23 12:34:29 +02:00
github-actions[bot] 4f7f7769be [CI Skip] bump/beta 10.1.5-5-x
skip-checks: true
2023-03-23 10:20:18 +00:00
Robert HambrockandJaco a79dcca89f update MMR API (#5479)
* update MMR RPC API

use latest MMR RPC API

* update MMR API

* correct mmr_root interface

* add back v1 of MmrApi

* decouple mmr api v1 & v2

the signature's changed in v2 for all runtime calls that they share.

* Apply suggestions (all dangling ,'s as reported)

* Apply lint fixes (asc. order of keys & missing ;)

---------

Co-authored-by: Jaco <jacogr@gmail.com>
2023-03-23 12:11:33 +02:00
github-actions[bot] 17a7427e04 [CI Skip] bump/beta 10.1.5-4-x
skip-checks: true
2023-03-23 10:05:20 +00:00
Jaco 43abd5f525 Adjust signing headers, catering for discarded (#5558) 2023-03-23 11:56:35 +02:00
github-actions[bot] 660fe4e087 [CI Skip] bump/beta 10.1.5-3-x
skip-checks: true
2023-03-23 09:07:24 +00:00
Jaco 3b9d03bb2e Add ISize type (same as USize, not-to-be used) (#5556) 2023-03-23 10:58:38 +02:00
github-actions[bot] 1cbbe3bb12 [CI Skip] bump/beta 10.1.5-2-x
skip-checks: true
2023-03-23 05:49:21 +00:00
Jaco a79e9f56a1 Resolve/reject once in getWsData for typegen (#5557)
* Resolve/reject once in getWsData for typegen

* Add onmessage rejections

* CHANGELOG
2023-03-23 07:40:20 +02:00
github-actions[bot] 3b39de3852 [CI Skip] bump/beta 10.1.5-1-x
skip-checks: true
2023-03-22 07:17:51 +00:00
Jaco 0526b8dbfc Generate markdown for multiple/other chains (#5552) 2023-03-22 09:09:09 +02:00
github-actions[bot] 3aeca2942b [CI Skip] bump/beta 10.1.5-0-x
skip-checks: true
2023-03-20 04:59:48 +00:00
Qinxuan Chen 591b96206d Add fp_account::AccountId20 mapping (#5551) 2023-03-20 06:50:54 +02:00
github-actions[bot] b2c8e748c3 [CI Skip] release/stable 10.1.4
skip-checks: true
2023-03-19 08:20:05 +00:00
Jaco be9feced65 10.1.4 (#5550) 2023-03-19 10:09:54 +02:00
github-actions[bot] f73ed3ef36 [CI Skip] bump/beta 10.1.4-6-x
skip-checks: true
2023-03-18 10:08:36 +00:00
Jaco cf1fabaecf Bump deps (& remove unused overrides) (#5549) 2023-03-18 11:59:42 +02:00
github-actions[bot] ac8446b30c [CI Skip] bump/beta 10.1.4-5-x
skip-checks: true
2023-03-17 06:11:26 +00:00
Jaco abb802bc92 Bump to TS 5.0 (#5548) 2023-03-17 08:00:08 +02:00
github-actions[bot] 9cc2cd8240 [CI Skip] bump/beta 10.1.4-4-x
skip-checks: true
2023-03-16 19:40:55 +00:00
Jaco efbbde74fc Bump dev deps (#5547)
* Bump dev deps

* Bump dev
2023-03-16 21:31:57 +02:00
github-actions[bot] ba5a02b5f5 [CI Skip] bump/beta 10.1.4-3-x
skip-checks: true
2023-03-16 06:47:23 +00:00
Jaco e035ba20ac Adjust CHANGELOG (#5546)
* Adjust CHANGELOG

* typo
2023-03-16 08:38:01 +02:00
github-actions[bot] 116b6ee1b5 [CI Skip] bump/beta 10.1.4-2-x
skip-checks: true
2023-03-16 05:28:33 +00:00
Jaco 8d1736c047 Cater for runtime Metadata_* v2 (#5545)
* Cater for runtime Metadata_* v2

* Swap order, latest first (as elsewhere)
2023-03-16 07:19:32 +02:00
github-actions[bot] 4408f3a3ac [CI Skip] bump/beta 10.1.4-1-x
skip-checks: true
2023-03-15 15:23:51 +00:00
Jaco 058edbe9c5 Bump dev (#5544)
* Bump dev

* Change ref types

* Fix build
2023-03-15 17:14:35 +02:00
github-actions[bot] 0c5211c1a6 [CI Skip] bump/beta 10.1.4-0-x
skip-checks: true
2023-03-15 12:00:44 +00:00
Jaco 7a5ef6249e Bump dev (#5542) 2023-03-15 13:51:48 +02:00
github-actions[bot] 5fa64a9e26 [CI Skip] release/stable 10.1.3
skip-checks: true
2023-03-15 10:50:09 +00:00
Jaco 48d2dbd885 10.1.3: Remove wrong .module specifier in typegen (#5541)
* Remove wrong .module specifier in typegen

* 10.1.3

* Reset

* Revert "10.1.3"

This reverts commit 1c6d8ff0720a8c221fe30e4cca17c5211262ef09.

* Rebump 10.1.3
2023-03-15 12:30:50 +02:00
github-actions[bot] 254e218a7b [CI Skip] bump/beta 10.1.3-3-x
skip-checks: true
2023-03-14 11:27:56 +00:00
Jaco e44cf73a45 Remove stale workflow (#5539) 2023-03-14 13:08:29 +02:00
github-actions[bot] 61589add1b [CI Skip] bump/beta 10.1.3-2-x
skip-checks: true
2023-03-14 08:00:58 +00:00
Jaco 046f51daf6 Extract all unsafe Substrate RPC checks (#5538) 2023-03-14 09:41:27 +02:00
github-actions[bot] 4c3b6a660e [CI Skip] bump/beta 10.1.3-1-x
skip-checks: true
2023-03-12 10:24:50 +00:00
Jaco 5145a0c181 Bump dev (#5537)
* Bump dev

* Adjust dev/node/test/node.d.ts imports

* Fix types-support imports

* Adjust extensionless imports
2023-03-12 12:05:43 +02:00
github-actions[bot] 95fc6c0fd3 [CI Skip] bump/beta 10.1.3-0-x
skip-checks: true
2023-03-11 16:09:05 +00:00
Jaco 84621a26cb Adjust derive definitions for no reexport of types (#5536)
* Adjust derive definitions for no reexport of types

* Additional for hasProposals
2023-03-11 17:49:27 +02:00
github-actions[bot] 60652cdf22 [CI Skip] release/stable 10.1.2
skip-checks: true
2023-03-11 11:44:15 +00:00
Jaco a37045036e 10.1.2 (#5535)
* 10.1.2

* USe /*#__PURE__*/  exports in derives
2023-03-11 13:20:14 +02:00
github-actions[bot] 3887f6f836 [CI Skip] release/stable 10.1.1
skip-checks: true
2023-03-11 08:50:06 +00:00
Jaco fcdb31dc3c Bump metadata (#5534)
* Bump metadata

* Adjust with rebuild & runtime bumps

* Remove root babel deps

* 10.1.1
2023-03-11 10:30:55 +02:00
github-actions[bot] f4ee507a17 [CI Skip] bump/beta 10.0.2-8-x
skip-checks: true
2023-03-10 08:07:40 +00:00
Jaco 58881bc317 Bump dev deps (& swap to using build:before) (#5533) 2023-03-10 09:48:16 +02:00
github-actions[bot] 42d39a81e4 [CI Skip] bump/beta 10.0.2-7-x
skip-checks: true
2023-03-10 06:54:48 +00:00
Jaco f818e334eb Update GH actions (#5532) 2023-03-10 08:35:04 +02:00
github-actions[bot] e861a0a4eb [CI Skip] bump/beta 10.0.2-6-x
skip-checks: true
2023-03-09 18:30:18 +00:00
Jaco 611ff12a3d Align tsconfig to allow moduleResolution: nodenext (#5530)
* Align tsconfig to allow moduleResolution: nodenext

* Small adjustments (revert nodenext req. changes)

* Adjust for current compilation

* Read metadata compare from file

* Adjust

* Fix assertions
2023-03-09 20:10:53 +02:00
github-actions[bot] 9ac9d72082 [CI Skip] bump/beta 10.0.2-5-x
skip-checks: true
2023-03-09 17:35:35 +00:00
Jeeyong Um aa30b39525 Fix inaccessible yargs instance error (#5531) 2023-03-09 19:16:11 +02:00
github-actions[bot] 91161b95c3 [CI Skip] bump/beta 10.0.2-4-x
skip-checks: true
2023-03-09 10:38:39 +00:00
Jaco 9fe2798b70 Use .js imports in src (#5526)
* Use .js imports in src

* Adjust

* Fix imports

* Bump dev

* Adjust with .js imports for typegen

* Adjust

* Adjust

* Remove target override
2023-03-09 12:19:12 +02:00
github-actions[bot] f233671c27 [CI Skip] bump/beta 10.0.2-3-x
skip-checks: true
2023-03-07 08:57:48 +00:00
Jaco 29244d211b Adjust BeefyApi to latest (#5523)
* Adjust BeefyApi to latest

* Rebuild
2023-03-07 10:38:25 +02:00
github-actions[bot] 73b226b30b [CI Skip] bump/beta 10.0.2-2-x
skip-checks: true
2023-03-07 07:09:01 +00:00
Jaco 97c7625557 Align runtime APIs with latest Substrate (#5521) 2023-03-07 08:49:10 +02:00
github-actions[bot] 0e96488024 [CI Skip] bump/beta 10.0.2-1-x
skip-checks: true
2023-03-06 12:47:31 +00:00
Jaco baf681e98d Bump dev deps (#5520) 2023-03-06 14:28:28 +02:00
github-actions[bot] 32c9580bfc [CI Skip] bump/beta 10.0.2-0-x
skip-checks: true
2023-03-05 12:20:02 +00:00
Jaco aa09601e88 jg-rm-babel-config (#5519) 2023-03-05 13:57:21 +02:00
github-actions[bot] b9805cdc94 [CI Skip] release/stable 10.0.1
skip-checks: true
2023-03-05 08:50:27 +00:00
Jaco feb36d43a4 10.0.1 (#5518)
* 10.0.1

* Drop extra websocket dep

* Drop extra babel deps
2023-03-05 10:30:54 +02:00
github-actions[bot] 92c88d7c13 [CI Skip] bump/beta 9.14.3-11-x
skip-checks: true
2023-03-04 15:33:05 +00:00
Jaco 033fc4f480 Adjust x-ws usage (#5511) 2023-03-04 17:13:41 +02:00
Jaco 4ca9670e4e Bump deps (#5517)
* Bump deps

* Bump dev
2023-03-04 16:52:54 +02:00
github-actions[bot] 8fee66c0fa [CI Skip] bump/beta 9.14.3-10-x
skip-checks: true
2023-03-03 11:01:16 +00:00
Jaco 9a3b5d7a2c Ensure that provider disconnect clears all subscriptions (#5516)
* Ensure that provider disconnect clears all subscriptions

* Update CHANGELOG
2023-03-03 12:53:08 +02:00
github-actions[bot] f166431b02 [CI Skip] bump/beta 9.14.3-9-x
skip-checks: true
2023-03-03 09:32:25 +00:00
Jaco 088fdc6171 Bump dev & update gh workflows (#5515) 2023-03-03 11:24:27 +02:00
github-actions[bot] 910c77fd39 [CI Skip] bump/beta 9.14.3-8-x
skip-checks: true
2023-03-03 06:32:46 +00:00
Julien dacf2875b7 General WsProvider extensibility improvements (#5467)
* Make endpoints index selection extensible

* Expose endpoint

* Ensure events happen last

* Added endpoint stats
2023-03-03 08:23:25 +02:00
github-actions[bot] cbcc79972a [CI Skip] bump/beta 9.14.3-7-x
skip-checks: true
2023-03-01 11:24:48 +00:00
Jaco 0faddf1df6 Remove done callback usage from it(...) (#5514)
* Remove done callback usage from it(...)

* Bump deps

* continue-on-error: true
2023-03-01 13:13:38 +02:00
github-actions[bot] 697c8b8e7a [CI Skip] bump/beta 9.14.3-6-x
skip-checks: true
2023-02-28 09:01:36 +00:00
Jaco 99403b8246 Adjust loading of user-specified metadata (#5513) 2023-02-28 10:53:37 +02:00
github-actions[bot] 4b7e1003e0 [CI Skip] bump/beta 9.14.3-5-x
skip-checks: true
2023-02-27 15:02:40 +00:00
Jaco 5fd6d39aed Replace require(...) with import(...) in typegen (#5495)
* Replace require(...) with import(...) in typegen

* Update metadata

* Adjust & actual run

* Bump API

* Rebuild

* Bump build
2023-02-27 16:54:06 +02:00
github-actions[bot] cedb1afe6f [CI Skip] bump/beta 9.14.3-4-x
skip-checks: true
2023-02-27 09:48:05 +00:00
Jaco 4bff8e5158 Bump dev deps (#5510)
* Bump dev deps

* Bump dev
2023-02-27 11:39:47 +02:00
github-actions[bot] 474aedde34 [CI Skip] bump/beta 9.14.3-3-x
skip-checks: true
2023-02-25 09:56:39 +00:00
Jaco a8d7566186 Adjust tests for node:test env (#5509) 2023-02-25 11:48:26 +02:00
github-actions[bot] beb7b54e4a [CI Skip] bump/beta 9.14.3-2-x
skip-checks: true
2023-02-24 15:56:28 +00:00
Andreea Eftene d08cc74aad add type overrides (#5506) 2023-02-24 17:46:07 +02:00
github-actions[bot] 27e4279c55 [CI Skip] bump/beta 9.14.3-1-x
skip-checks: true
2023-02-22 07:26:08 +00:00
Jaco 6cd2f3b386 Bump deps (#5505)
* Bump deps

* Bump dev
2023-02-22 09:14:43 +02:00
github-actions[bot] 472c971c5b [CI Skip] bump/beta 9.14.3-0-x
skip-checks: true
2023-02-20 15:45:24 +00:00
Jaco d8756455c2 Bump dev deps (#5502) 2023-02-20 17:37:11 +02:00
github-actions[bot] 5aae48cc28 [CI Skip] release/stable 9.14.2
skip-checks: true
2023-02-19 11:19:41 +00:00
Jaco 4ab3b55383 9.14.2 (#5500) 2023-02-19 13:10:43 +02:00
github-actions[bot] 6ea6b90e03 [CI Skip] bump/beta 9.14.2-8-x
skip-checks: true
2023-02-19 10:45:23 +00:00
Jaco eb5c888cb8 Update metadata (#5499)
* Updata metadata

* Rebuild

* Adjust generation
2023-02-19 12:36:41 +02:00
github-actions[bot] cda07dfa0b [CI Skip] bump/beta 9.14.2-7-x
skip-checks: true
2023-02-18 10:50:26 +00:00
Jaco 4abae3200b Remove extraneous jest.mock usage (unused, no impact) (#5498) 2023-02-18 12:42:11 +02:00
github-actions[bot] b60895beb4 [CI Skip] bump/beta 9.14.2-6-x
skip-checks: true
2023-02-18 07:58:29 +00:00
Jaco 855d70a3b3 Remove __dirname usage in typegen (#5496) 2023-02-18 09:48:07 +02:00
github-actions[bot] 583d9bfe36 [CI Skip] bump/beta 9.14.2-5-x
skip-checks: true
2023-02-17 18:30:43 +00:00
Jaco d519611a25 Adjust test expectations (#5494) 2023-02-17 20:22:12 +02:00
github-actions[bot] 9a9bace8e8 [CI Skip] bump/beta 9.14.2-4-x
skip-checks: true
2023-02-17 10:08:40 +00:00
Jaco 40810f2fdb Cleanup tests (& fix ws.connect()) (#5493)
* Cleanup tests (& fix ws.connect())

* Await mock

* Adjust sc connect ordering
2023-02-17 11:57:34 +02:00
github-actions[bot] 361a77580e [CI Skip] bump/beta 9.14.2-3-x
skip-checks: true
2023-02-17 06:29:52 +00:00
Jaco ea45c7e689 Remove __dirname usages in tests (#5492) 2023-02-17 08:20:29 +02:00
github-actions[bot] cc1d51a6ca [CI Skip] bump/beta 9.14.2-2-x
skip-checks: true
2023-02-16 19:18:36 +00:00
Jaco b8233fb7b8 Adjust test expectations (#5490) 2023-02-16 21:10:17 +02:00
github-actions[bot] 5cbe80066d [CI Skip] bump/beta 9.14.2-1-x
skip-checks: true
2023-02-15 10:07:50 +00:00
Jaco 3f6c10256c Bump deps (#5486) 2023-02-15 11:56:46 +02:00
github-actions[bot] 609b2830b0 [CI Skip] bump/beta 9.14.2-0-x
skip-checks: true
2023-02-15 07:26:32 +00:00
Jaco b7bbd2d615 Fix CI release workflow (#5485) 2023-02-15 09:16:35 +02:00
Jaco 41d6429782 Use latest LTS for CI scripts (#5482) 2023-02-14 10:49:33 +02:00
github-actions[bot] ae168a00a9 [CI Skip] release/stable 9.14.1
skip-checks: true
2023-02-12 13:31:21 +00:00
Jaco 79694d8a95 9.14.1 (#5481)
* 9.14.1

* Rebuild metadata
2023-02-12 15:22:48 +02:00
github-actions[bot] 95be64cbd7 [CI Skip] bump/beta 9.13.7-1-x
skip-checks: true
2023-02-07 12:26:53 +00:00
Jaco 76bf7a0079 Alias for Runtime{Call, Event} types (#5477)
* Alias for Runtime{Call, Event} types

* CHANGELOG
2023-02-07 14:17:29 +02:00
github-actions[bot] 142390f27d [CI Skip] bump/beta 9.13.7-0-x
skip-checks: true
2023-02-05 12:18:54 +00:00
Jaco d0145ce58c Bump dev (#5476) 2023-02-05 14:10:25 +02:00
github-actions[bot] 9217f83870 [CI Skip] release/stable 9.13.6
skip-checks: true
2023-02-05 11:35:16 +00:00
Jaco cf261724c3 9.13.6 (#5475) 2023-02-05 13:26:52 +02:00
github-actions[bot] 375afb5dff [CI Skip] bump/beta 9.13.6-5-x
skip-checks: true
2023-02-05 08:08:53 +00:00
Jaco 9e5779644c Bump dev (#5474) 2023-02-05 09:57:56 +02:00
github-actions[bot] a6a92837e4 [CI Skip] bump/beta 9.13.6-4-x
skip-checks: true
2023-02-04 15:40:31 +00:00
Aleš Ferlan d84f40dd77 fix: use H160 for address in getTransactionCount (#5472) 2023-02-04 17:31:53 +02:00
github-actions[bot] 5183c28d5e [CI Skip] bump/beta 9.13.6-3-x
skip-checks: true
2023-02-03 22:30:29 +00:00
Jaco 5ed3ea51d3 Add script to retrieve local meta/rpc/version (#5471)
* Add script to retrieve local meta/rpc/version

* Filter _unknown_

* Cleanup

* Additional
2023-02-04 00:22:36 +02:00
github-actions[bot] 39d76c969d [CI Skip] bump/beta 9.13.6-2-x
skip-checks: true
2023-02-03 13:08:35 +00:00
Jaco 5cf4c4edbe Overrides for deployed Weight 1.5 chains (#5469) 2023-02-03 15:00:46 +02:00
github-actions[bot] f6c376a3e7 [CI Skip] bump/beta 9.13.6-1-x
skip-checks: true
2023-02-03 08:58:09 +00:00
Jaco d9a2265b0f Bump deps (incl. TS) (#5468) 2023-02-03 10:48:46 +02:00
github-actions[bot] 0c1b1c48f2 [CI Skip] bump/beta 9.13.6-0-x
skip-checks: true
2023-02-02 11:11:44 +00:00
Jaco 7c24998e28 Adjust PortableRegistry aliases (w/o any Weight) (#5466) 2023-02-02 13:03:48 +02:00
github-actions[bot] bf442a4bd4 [CI Skip] release/stable 9.13.5
skip-checks: true
2023-02-02 09:52:22 +00:00
Jaco 40f432badb Adjust for aliasses for Weight 1.5 (#5465)
* Adjust for aliasses for Weight 1.5

* 9.13.5
2023-02-02 11:43:24 +02:00
github-actions[bot] 15a8681ba0 [CI Skip] release/stable 9.13.4
skip-checks: true
2023-02-01 07:48:32 +00:00
Jaco 61ed6e97f4 9.13.4 (#5463) 2023-02-01 09:37:31 +02:00
github-actions[bot] eee4bf51d6 [CI Skip] release/stable 9.13.3
skip-checks: true
2023-02-01 06:28:13 +00:00
Jaco b9cbb9e2e8 Adjust Weight alias for WeightV0 injection (#5462)
* Adjust Weight alias for WeightV0 injection

* 9.13.3
2023-02-01 08:20:06 +02:00
github-actions[bot] ed426108f2 [CI Skip] release/stable 9.13.2
skip-checks: true
2023-01-29 07:25:40 +00:00
Jaco c168615305 Allow null as valid param to Int/UInt (#5458) 2023-01-29 09:17:21 +02:00
Jaco 680ae0222a Bump eventemitter 3 (#5457) 2023-01-29 09:14:57 +02:00
github-actions[bot] dc3d34e4df [CI Skip] release/stable 9.13.1
skip-checks: true
2023-01-29 06:01:16 +00:00
Jaco d356fa4da6 9.13.1 (#5456) 2023-01-29 07:53:24 +02:00
github-actions[bot] 90eafdd820 [CI Skip] bump/beta 9.12.2-12-x
skip-checks: true
2023-01-28 09:58:20 +00:00
Jaco 263fca2510 Bump static metadata (#5455) 2023-01-28 11:50:32 +02:00
github-actions[bot] 04dcb490c3 [CI Skip] bump/beta 9.12.2-11-x
skip-checks: true
2023-01-28 08:00:05 +00:00
Jaco e8a96523b7 Bump util (#5454) 2023-01-28 09:49:10 +02:00
github-actions[bot] 226886acf7 [CI Skip] bump/beta 9.12.2-10-x
skip-checks: true
2023-01-28 07:18:40 +00:00
Jaco b544f24bcf Runtime definition cleanups (& CHANGELOG) (#5450)
* Runtime definition cleanups (& CHANGELOG)

* Adjust to pre-v3 levels

* Full CHANGELOG
2023-01-28 09:07:44 +02:00
github-actions[bot] f7ad6e09ed [CI Skip] bump/beta 9.12.2-9-x
skip-checks: true
2023-01-28 06:54:36 +00:00
Jaco 1d8abf1110 Add (unused) ability to filter rpcs/calls from chain info (#5453)
* Add (unused) ability to filter rpcs/calls from chain info

* Explicitly sort api versions

* Named tuples

* Re-order sorting

* Allow future name configurability

* Pass runtimeName to generators

* Remove unneeded lint overrides

* Allow doc root override

* Use chain name
2023-01-28 08:45:35 +02:00
github-actions[bot] fee281fcb4 [CI Skip] bump/beta 9.12.2-8-x
skip-checks: true
2023-01-27 08:28:57 +00:00
Jaco 1facb7dd71 Bump dev (#5451)
* Bump dev

* Bump dev
2023-01-27 10:21:06 +02:00
github-actions[bot] a96d7c789e [CI Skip] bump/beta 9.12.2-7-x
skip-checks: true
2023-01-27 04:52:46 +00:00
Stephen SheltonandJaco cc4e4b236d Add transaction-payment runtime API V3 (#5430)
* Add transaction-payment runtime API V3

* Apply suggestions from code review

* Update packages/types/src/interfaces/payment/runtime.ts

* Update packages/types/src/interfaces/payment/runtime.ts

* Apply suggestions from code review

* Handle query_info vs query_call_info correctly

Co-authored-by: Jaco <jacogr@gmail.com>
2023-01-27 06:43:02 +02:00
github-actions[bot] 932efb6ef5 [CI Skip] bump/beta 9.12.2-6-x
skip-checks: true
2023-01-26 09:59:38 +00:00
Jaco bf6c23eb86 Add composite base object (#5448)
* Add composite base object

* Missing toRawType
2023-01-26 11:51:40 +02:00
github-actions[bot] df1754eb2a [CI Skip] bump/beta 9.12.2-5-x
skip-checks: true
2023-01-26 07:33:50 +00:00
Jaco 1ce1f0a981 Remove unused BigInt extension (#5447) 2023-01-26 09:25:01 +02:00
github-actions[bot] 29537ea283 [CI Skip] bump/beta 9.12.2-4-x
skip-checks: true
2023-01-26 06:57:42 +00:00
Jaco 0b45618c5f Tighten up TS type with LookupString introduction (#5446)
* Tighten up TS type with LookupString introduction

* Adjust typegen
2023-01-26 08:49:53 +02:00
github-actions[bot] 48079d6f1a [CI Skip] bump/beta 9.12.2-3-x
skip-checks: true
2023-01-26 05:05:58 +00:00
Jaco 1531ac847c Apply JSDoc comments onto PortableRegistry (#5443) 2023-01-26 06:58:07 +02:00
github-actions[bot] 66f569e214 [CI Skip] bump/beta 9.12.2-2-x
skip-checks: true
2023-01-26 04:38:14 +00:00
Jaco db71aeea41 Swap (pre-detect, typegen) Weight alias to latest (#5445) 2023-01-26 06:30:17 +02:00
github-actions[bot] 1c8e0babac [CI Skip] bump/beta 9.12.2-1-x
skip-checks: true
2023-01-25 07:55:20 +00:00
Jaco 416ac1a619 Weight detect from PortableRegistry -> TypeRegistry (#5442)
* Weight detect from PortableRegistry -> TypeRegistry

* Re-use setLookup

* Revert last

* Expand comments

* Cast for type detect

* Get actual classes for construction
2023-01-25 09:45:55 +02:00
github-actions[bot] ab805808c5 [CI Skip] bump/beta 9.12.2-0-x
skip-checks: true
2023-01-25 07:42:50 +00:00
Jaco cf577a29da Bump GH actions (#5444) 2023-01-25 09:34:55 +02:00
github-actions[bot] 94d2fd0147 [CI Skip] release/stable 9.12.1
skip-checks: true
2023-01-22 12:53:52 +00:00
Jaco e745d802df 9.12.1 (#5438)
* 9.12.1

* CHANGELOG
2023-01-22 14:45:06 +02:00
Jaco cd1dca9bfa Bump static metadata (#5439)
* Bump static metadata

* Remove specific events tests (only for v2, on v3 now)

* Remove unused deps

* Commit yarn.lock
2023-01-22 14:16:16 +02:00
github-actions[bot] b0ec03bdd5 [CI Skip] bump/beta 9.11.4-12-x
skip-checks: true
2023-01-22 07:47:10 +00:00
Jaco becccf6323 Ensure api.queryMulti returns empty result when no keys are provided (#5436) 2023-01-22 09:36:08 +02:00
github-actions[bot] 10cb508783 [CI Skip] bump/beta 9.11.4-11-x
skip-checks: true
2023-01-22 07:11:42 +00:00
Jaco cf9d2d6049 Bump dev (& remove duplicated files) (#5437) 2023-01-22 09:01:44 +02:00
github-actions[bot] 3e490736fd [CI Skip] bump/beta 9.11.4-10-x
skip-checks: true
2023-01-20 21:35:28 +00:00
Jaco 95e7edd48f Apply memo(...) on batched storage subscriptions (#5435) 2023-01-20 23:26:45 +02:00
github-actions[bot] 6f8ca717c8 [CI Skip] bump/beta 9.11.4-9-x
skip-checks: true
2023-01-20 18:24:19 +00:00
Jaco f480cdc1ca Add explicit Array checks to Vec/Tuple decoding (#5434)
* Add explicit Array checks to Vec/Tuple decoding

* Fixes for tests

* Remove extra else

* Revert Text changes (keep it pin-point)

* No need for isU8a check (already handled)

* Result length check

* stringify logged object
2023-01-20 20:15:30 +02:00
github-actions[bot] beca267b66 [CI Skip] bump/beta 9.11.4-8-x
skip-checks: true
2023-01-20 15:38:20 +00:00
Jaco f270fe693b Align struct .entries() looping between functions (#5433) 2023-01-20 17:30:16 +02:00
github-actions[bot] a7f96a19ca [CI Skip] bump/beta 9.11.4-7-x
skip-checks: true
2023-01-19 13:17:09 +00:00
Jaco e759d32bcf Revert all recent $ renames (#5429)
* Revert "[CI Skip] bump/beta 9.11.4-6-x"

This reverts commit 7ee4f7aaf8.

* Revert "Rename Code .registry to .$registry (#5428)"

This reverts commit dd6826fadd.

* Revert "[CI Skip] bump/beta 9.11.4-5-x"

This reverts commit abc68bf2e2.

* Revert "Convert encodedLength to $encodedLength (#5426)"

This reverts commit ccab89304b.

* Revert "[CI Skip] bump/beta 9.11.4-4-x"

This reverts commit 044465eee4.

* Revert "Rename inspect() to inspectU8a() (#5425)"

This reverts commit 42af205546.

* Revert "[CI Skip] bump/beta 9.11.4-3-x"

This reverts commit 545ad50097.

* Revert "Move .isEmpty to $isEmpty (#5424)"

This reverts commit 6f19084a4d.

* Revert "[CI Skip] bump/beta 9.11.4-2-x"

This reverts commit 4688291ecf.

* Revert "Warn on deprecated getter usage (#5423)"

This reverts commit da1cf9d64e.

* Revert "[CI Skip] bump/beta 9.11.4-1-x"

This reverts commit 96a3ef51f0.

* Revert "Revert "[CI Skip] bump/beta 9.11.4-1-x""

This reverts commit 2eca0730a630d587878f12c141e21ea631dcdd19.

* Revert "Revert "[CI Skip] bump/beta 9.11.4-2-x""

This reverts commit 66284b40692071aa03a1064997c9402fc0b0987c.

* Revert "Revert "[CI Skip] bump/beta 9.11.4-3-x""

This reverts commit 9b820eaefccdb7b51d893000e5480d11e5195e22.

* Revert "Revert "[CI Skip] bump/beta 9.11.4-4-x""

This reverts commit cb5149adf98a5eefd8da61b8793707f85deb7c09.

* Revert "Revert "[CI Skip] bump/beta 9.11.4-5-x""

This reverts commit 489a64439860fefba163695ec36b319dcb1eeddc.

* Revert "Revert "[CI Skip] bump/beta 9.11.4-6-x""

This reverts commit 34a0fd4e2784a1b40ea8e06534d1f39328250e7a.

* Adjust linebreaks

* Adjust isStorageFallback naming

* Fix build
2023-01-19 15:06:29 +02:00
github-actions[bot] 7ee4f7aaf8 [CI Skip] bump/beta 9.11.4-6-x
skip-checks: true
2023-01-19 12:03:22 +00:00
Jaco dd6826fadd Rename Code .registry to .$registry (#5428)
* Adapt $registry getter, deprecate registry

* warnGet adjustments

* Additional adjustments
2023-01-19 13:54:34 +02:00
github-actions[bot] abc68bf2e2 [CI Skip] bump/beta 9.11.4-5-x
skip-checks: true
2023-01-19 11:25:40 +00:00
Jaco ccab89304b Convert encodedLength to $encodedLength (#5426) 2023-01-19 13:17:33 +02:00
github-actions[bot] 044465eee4 [CI Skip] bump/beta 9.11.4-4-x
skip-checks: true
2023-01-19 10:52:59 +00:00
Jaco 42af205546 Rename inspect() to inspectU8a() (#5425)
* Rename inspect() to inspectU8a()

* Additional adjustments
2023-01-19 12:42:49 +02:00
github-actions[bot] 545ad50097 [CI Skip] bump/beta 9.11.4-3-x
skip-checks: true
2023-01-19 09:16:02 +00:00
Jaco 6f19084a4d Move .isEmpty to $isEmpty (#5424)
* Move .isEmpty to $isEmpty

* Adjust usages
2023-01-19 11:07:29 +02:00
github-actions[bot] 4688291ecf [CI Skip] bump/beta 9.11.4-2-x
skip-checks: true
2023-01-19 08:06:43 +00:00
Jaco da1cf9d64e Warn on deprecated getter usage (#5423)
* Warn on deprecated getter usage

* Adjust warning message

* Make read-only interafces for deprecations

* Re-word Codec deprecation messages

* Re-adjust warning messages

* Fix getter return

* Explicit deprecation holder
2023-01-19 09:56:34 +02:00
github-actions[bot] 96a3ef51f0 [CI Skip] bump/beta 9.11.4-1-x
skip-checks: true
2023-01-19 07:01:57 +00:00
Jaco 2eb453c4ce Cleanup class variable linebreaks (#5422) 2023-01-19 08:52:14 +02:00
github-actions[bot] 12bf338e40 [CI Skip] bump/beta 9.11.4-0-x
skip-checks: true
2023-01-18 20:08:15 +00:00
Jaco 923f569d77 Add $isStorageFallback on Codec interface (#5421)
* Add $isStorageFallback on Codec interface

* Rename in CHANGELOG

* Update specs with new naming

* Small formatting adjustments

* Abstract values

* Adjust initialU8a expectation

* Mark old interface as deprecated (& type to never)

* Adjust @deprecated comments

* Add deprecated interfaces to all
2023-01-18 21:58:06 +02:00
github-actions[bot] 263fce1e7d [CI Skip] release/stable 9.11.3
skip-checks: true
2023-01-15 10:54:58 +00:00
Jaco f780c017e2 9.11.3 (#5418) 2023-01-15 12:45:18 +02:00
github-actions[bot] 87a1ae7d44 [CI Skip] bump/beta 9.11.3-1-x
skip-checks: true
2023-01-15 10:36:20 +00:00
Jaco 3cdd608e6e Bump metadata (#5417) 2023-01-15 12:27:42 +02:00
github-actions[bot] 394d4aee96 [CI Skip] bump/beta 9.11.3-0-x
skip-checks: true
2023-01-15 08:55:13 +00:00
Jaco 732dd26bd9 Bump deps (#5416) 2023-01-15 10:47:11 +02:00
github-actions[bot] ebb9f055c1 [CI Skip] release/stable 9.11.2
skip-checks: true
2023-01-13 08:14:10 +00:00
Jaco 2f34c0c6e8 9.11.2 (#5415) 2023-01-13 10:05:41 +02:00
github-actions[bot] 41617c1dfb [CI Skip] bump/beta 9.11.2-0-x
skip-checks: true
2023-01-13 07:52:29 +00:00
Jaco 6ff3577853 Adjust democracy preimages retrieval (#5413)
* Adjust democracy preimages retrieval

* Remove log
2023-01-13 09:41:52 +02:00
github-actions[bot] 73b8dc3aff [CI Skip] release/stable 9.11.1
skip-checks: true
2023-01-08 08:39:26 +00:00
Jaco d93c7bdf4a 9.11.1 (#5407) 2023-01-08 10:30:55 +02:00
github-actions[bot] 6e1dfc3a45 [CI Skip] bump/beta 9.10.6-6-x
skip-checks: true
2023-01-07 15:45:34 +00:00
Jaco e4e457fc53 Bump static metadata (#5406) 2023-01-07 17:36:54 +02:00
github-actions[bot] aa5464f8dd [CI Skip] bump/beta 9.10.6-5-x
skip-checks: true
2023-01-07 13:38:48 +00:00
Jaco 5c1e701ab6 Pass ScConnect as argument to ScProvider (#5405)
* Pass ScConnect as argument to ScProvider

* CHANGELOG

* Adjust type exports

* Adjust

* Adjust

* Renames

* throw error on non-TS

* Attempt to fix tests

* Comment around cowboy class

* Remove all .skip (no dynamic import)

* Move @substrate/connect to dev/optional dep

* typo
2023-01-07 15:30:35 +02:00
github-actions[bot] 81b5d2280d [CI Skip] bump/beta 9.10.6-4-x
skip-checks: true
2023-01-07 12:36:25 +00:00
Julien d90ac68e29 Clarified WsProvider constructor parameters documentation (#5404) 2023-01-07 14:27:29 +02:00
github-actions[bot] cc2405ea85 [CI Skip] bump/beta 9.10.6-3-x
skip-checks: true
2023-01-06 13:07:12 +00:00
Jaco d6cd2a2cd4 Bump deps (#5402) 2023-01-06 14:58:48 +02:00
github-actions[bot] 114050f893 [CI Skip] bump/beta 9.10.6-2-x
skip-checks: true
2023-01-05 12:56:23 +00:00
sander2 6a3eb70d33 fix: type generation for nested tuples (#5395)
* fix: type generation for nested tuples

* chore: formatting
2023-01-05 14:48:02 +02:00
github-actions[bot] e61ab51c6b [CI Skip] bump/beta 9.10.6-1-x
skip-checks: true
2023-01-05 09:29:41 +00:00
Ken Vu e792eba587 Expose blockNumber via filterEvents function (#5394)
* Expose `blockNumber` via filterEvents function

* Address eslint issues plus add guard for Compact type
2023-01-05 11:21:37 +02:00
github-actions[bot] f9df7a5c0d [CI Skip] bump/beta 9.10.6-0-x
skip-checks: true
2023-01-01 08:35:51 +00:00
Jaco 2c949e0fc5 Update headers for 2023 (#5392) 2023-01-01 10:25:51 +02:00
github-actions[bot] 03647c9b86 [CI Skip] release/stable 9.10.5
skip-checks: true
2022-12-27 16:03:15 +00:00
Jaco 28d9bb7053 9.10.5 (#5390)
* 9.10.5

* Adjust
2022-12-27 17:54:38 +02:00
github-actions[bot] 364a6decae [CI Skip] bump/beta 9.10.5-0-x
skip-checks: true
2022-12-26 08:02:35 +00:00
Jaco fed75806d7 Bump dev (#5389) 2022-12-26 09:54:25 +02:00
github-actions[bot] c9c976b81b [CI Skip] release/stable 9.10.4
skip-checks: true
2022-12-25 16:29:32 +00:00
Jaco 4f0527d3cc 9.10.4 (#5388) 2022-12-25 18:21:42 +02:00
github-actions[bot] 2e7f340362 [CI Skip] bump/beta 9.10.4-0-x
skip-checks: true
2022-12-25 15:34:12 +00:00
Jaco 9fe8e3ace1 Add fallbacks for paymentInfo (non-fixed) results (#5382) 2022-12-25 17:22:40 +02:00
github-actions[bot] 7b5b8745a2 [CI Skip] release/stable 9.10.3
skip-checks: true
2022-12-17 11:34:36 +00:00
Jaco 0d40e85699 9.10.3 (#5381) 2022-12-17 13:26:38 +02:00
github-actions[bot] 1af97abd80 [CI Skip] bump/beta 9.10.3-4-x
skip-checks: true
2022-12-17 11:08:55 +00:00
Jaco a4e967d48e Kusama & Westend upgrade blocks (#5380) 2022-12-17 12:57:38 +02:00
github-actions[bot] 7415fd5fd1 [CI Skip] bump/beta 9.10.3-3-x
skip-checks: true
2022-12-17 09:48:33 +00:00
Jaco 6f502aeb20 Bump metadata (#5379) 2022-12-17 11:40:38 +02:00
github-actions[bot] 64934281d6 [CI Skip] bump/beta 9.10.3-2-x
skip-checks: true
2022-12-14 06:32:32 +00:00
Jaco 0473b03551 Bump deps (w/ deprecation warnings) (#5378) 2022-12-14 08:24:23 +02:00
github-actions[bot] d82e87f0c9 [CI Skip] bump/beta 9.10.3-1-x
skip-checks: true
2022-12-13 07:19:08 +00:00
Jaco 90a7802cf6 Adjust TS target (#5377)
* Adjust TS target

* es2020
2022-12-13 09:10:17 +02:00
github-actions[bot] 1af3b21874 [CI Skip] bump/beta 9.10.3-0-x
skip-checks: true
2022-12-13 06:31:02 +00:00
Jaco 073a06edb4 Add registry to reserved (rename w/ underscore) list (#5375)
* Add registry to reserved (rename w/ underscore) list

* Ordering
2022-12-13 08:22:23 +02:00
github-actions[bot] d91b3cb501 [CI Skip] release/stable 9.10.2
skip-checks: true
2022-12-09 12:09:00 +00:00
Jaco 677cbd30e9 Fix derive.balances.account detection for system vs balances (#5373)
* Fix derive.balances.account detection for system vs balances

* Adjust balances.all

* 9.10.2
2022-12-09 14:00:57 +02:00
github-actions[bot] f95edc5a2a [CI Skip] bump/beta 9.10.2-3-x
skip-checks: true
2022-12-09 06:05:04 +00:00
Jaco 9a6e096020 Explicit mention of recommended WellKnownChains usage in CHANGELOG (#5372)
* Explicit mention of recommended WellKnownChains usage in CHANGELOG

* Adjust text
2022-12-09 07:57:06 +02:00
github-actions[bot] 083e459407 [CI Skip] bump/beta 9.10.2-2-x
skip-checks: true
2022-12-08 07:12:48 +00:00
Jaco 4fe3ca4b44 Remove CC (#5370) 2022-12-08 09:04:50 +02:00
github-actions[bot] 5839670024 [CI Skip] bump/beta 9.10.2-1-x
skip-checks: true
2022-12-08 06:28:38 +00:00
Jaco 1bee72587f Bump TS (#5368) 2022-12-08 08:20:17 +02:00
github-actions[bot] 0a1cc26aab [CI Skip] bump/beta 9.10.2-0-x
skip-checks: true
2022-12-07 13:56:35 +00:00
Jaco 15410ceeb5 Update token retrieval (#5366) 2022-12-07 15:48:23 +02:00
github-actions[bot] 603b762d0e [CI Skip] release/stable 9.10.1
skip-checks: true
2022-12-04 11:36:07 +00:00
Jaco 8c43bcf405 9.10.1 (#5364) 2022-12-04 13:28:12 +02:00
github-actions[bot] a0e4fa0570 [CI Skip] bump/beta 9.9.5-2-x
skip-checks: true
2022-12-04 11:19:34 +00:00
Jaco d7b4adc050 Bump metadata (#5363)
* Bump metadata

* Fix lint
2022-12-04 13:09:58 +02:00
github-actions[bot] ef97ea7d00 [CI Skip] bump/beta 9.9.5-1-x
skip-checks: true
2022-11-30 17:00:47 +00:00
Jaco af9e1931e6 Adjust with type-only imports (#5360)
* Adjust with type-only imports

* Don't rexport WellKnownChain
2022-11-30 18:52:11 +02:00
github-actions[bot] 576887d508 [CI Skip] bump/beta 9.9.5-0-x
skip-checks: true
2022-11-30 05:43:47 +00:00
Jaco 57e9857ed8 Converts payloads to use BlockHash types (#5358) 2022-11-30 07:35:31 +02:00
github-actions[bot] f59b5b8d92 [CI Skip] release/stable 9.9.4
skip-checks: true
2022-11-28 10:35:35 +00:00
Jaco 4cb0281340 9.9.4 (#5357) 2022-11-28 12:27:44 +02:00
github-actions[bot] 9c5ca08106 [CI Skip] release/stable 9.9.3
skip-checks: true
2022-11-28 10:14:20 +00:00
Jaco fde69670f1 Fix dispatchQueue preimage retrieval in derives (#5356) 2022-11-28 12:06:06 +02:00
github-actions[bot] 2da085afb8 [CI Skip] release/stable 9.9.2
skip-checks: true
2022-11-27 17:14:51 +00:00
Jaco 973cc13873 9.9.2 (#5355) 2022-11-27 19:07:02 +02:00
github-actions[bot] 61e5f91e5b [CI Skip] bump/beta 9.9.2-1-x
skip-checks: true
2022-11-27 15:25:35 +00:00
Jaco 8c52f050fe Bumnp Substrate metadata (#5354) 2022-11-27 17:15:23 +02:00
github-actions[bot] d1bf4402cf [CI Skip] bump/beta 9.9.2-0-x
skip-checks: true
2022-11-27 14:42:57 +00:00
Jaco d3eb1de49b Bump util (#5353) 2022-11-27 16:34:07 +02:00
github-actions[bot] 46076c5595 [CI Skip] release/stable 9.9.1
skip-checks: true
2022-11-20 13:42:59 +00:00
Jaco ba4e74f67c 9.9.1 (#5349) 2022-11-20 15:32:32 +02:00
github-actions[bot] d303f553a1 [CI Skip] bump/beta 9.8.3-2-x
skip-checks: true
2022-11-20 13:23:28 +00:00
Jaco ad71405fd8 Bump metadata (#5348)
* Bump metadata

* fillBlock moved
2022-11-20 15:14:59 +02:00
github-actions[bot] 3f6127d854 [CI Skip] bump/beta 9.8.3-1-x
skip-checks: true
2022-11-20 09:50:19 +00:00
Jaco 9353536db0 Bump TS (#5347)
* Bump TS

* linting

* expand comment
2022-11-20 11:42:18 +02:00
github-actions[bot] dcc4583c32 [CI Skip] bump/beta 9.8.3-0-x
skip-checks: true
2022-11-19 19:30:15 +00:00
Jaco 2c96b71c30 Bump deps (#5346) 2022-11-19 21:22:09 +02:00
github-actions[bot] 9b3258a65a [CI Skip] release/stable 9.8.2
skip-checks: true
2022-11-16 18:24:16 +00:00
Jaco d191d07782 9.8.2 (#5343) 2022-11-16 20:16:15 +02:00
github-actions[bot] fe2103e5d4 [CI Skip] bump/beta 9.8.2-1-x
skip-checks: true
2022-11-16 18:08:33 +00:00
Jaco ee42e3a86c Reset/Revert v1 of runtime query_info (w/ detect) (#5342)
* Reset/Revert v1 of runtime quety_info (w/ detect)

* Add V2 struct
2022-11-16 19:58:51 +02:00
github-actions[bot] 12fd31def5 [CI Skip] bump/beta 9.8.2-0-x
skip-checks: true
2022-11-16 16:25:06 +00:00
Jaco a3901ca7ad Adjust (to be deprecated) payment RPC return values (#5341)
* Adjust (to be deprecated) payment RPC return values

* Adjust

* Build TS interfaces
2022-11-16 18:16:49 +02:00
github-actions[bot] d22a2918ce [CI Skip] release/stable 9.8.1
skip-checks: true
2022-11-13 08:51:55 +00:00
Jaco 62cbf7b8b6 9.8.1 (#5337) 2022-11-13 10:42:53 +02:00
github-actions[bot] c874a22c78 [CI Skip] bump/beta 9.7.2-9-x
skip-checks: true
2022-11-13 06:52:36 +00:00
Jaco b21cc0ae06 Pass through WeightV2 as-is (contracts) (#5336)
* Pass through WeightV2 as-is (contracts)

* Adjust convertWeight

* Adjust
2022-11-13 08:44:31 +02:00
Jun Jiang cad2b0fefe Update contract' gas to Weight type (#5324)
* Update contract' gas to Weight type

* Make Contracts Runtime Calls support WeightV2

* fix gasConsumed & gasConsumed type

* Regenerate contracts types

* Correct ContractCallOutcome

* `gasLimit` are optional

* Apply suggestion

* Add ContractCallRequestV1 and specify old rpc use that

* Add back getGas

* Port jg-ContractsApi-v2 (#5330)

* Run yarn build:metadata

* There is no 'ContractCallRequestV1', only 'ContractCallRequest'

* api.tx.contracts.call.meta no version field, _isOldWeight still work?
2022-11-13 08:30:33 +02:00
github-actions[bot] dd6dd83af7 [CI Skip] bump/beta 9.7.2-8-x
skip-checks: true
2022-11-12 14:09:50 +00:00
Jaco e0e86b1383 Small cleanups to contracts Weight detection (#5335) 2022-11-12 16:01:41 +02:00
github-actions[bot] d8446d535a [CI Skip] bump/beta 9.7.2-7-x
skip-checks: true
2022-11-12 13:28:17 +00:00
Jaco 225ae80b95 Update to latest Polkadot/Kusama metadata (#5333)
* Update to latest Polkadot/Kusama metadata

* dispatchQueue compat
2022-11-12 15:18:15 +02:00
github-actions[bot] 71d3d10f0e [CI Skip] bump/beta 9.7.2-6-x
skip-checks: true
2022-11-12 12:34:55 +00:00
Jaco aa82c74493 Polkadot 9300, Kusama 9300 & Westend 9310/9320 upgrade blocks (#5332) 2022-11-12 14:26:42 +02:00
github-actions[bot] 3cd75c74a7 [CI Skip] bump/beta 9.7.2-5-x
skip-checks: true
2022-11-12 06:11:45 +00:00
Jaco b90a1e388f Add has{DryRun, PaymentInfo} to submittables (#5331) 2022-11-12 08:03:31 +02:00
github-actions[bot] b2f67ffae1 [CI Skip] bump/beta 9.7.2-4-x
skip-checks: true
2022-11-11 08:27:03 +00:00
Jaco 9aa696dbb6 Bump Substrate metadata (#5329) 2022-11-11 10:19:12 +02:00
github-actions[bot] 6b80d3415b [CI Skip] bump/beta 9.7.2-3-x
skip-checks: true
2022-11-11 08:01:00 +00:00
Jaco e23401092f Move runtime ordering checks to test (#5328) 2022-11-11 09:49:59 +02:00
github-actions[bot] a34e14a89f [CI Skip] bump/beta 9.7.2-2-x
skip-checks: true
2022-11-11 07:21:51 +00:00
Jaco 8dd13e181a Usage comments around rpc and call interfaces (#5327)
* Usage comments around rpc and call interfaces

* Optional pubsub

* s/method/subname/
2022-11-11 09:14:00 +02:00
github-actions[bot] 3525070d92 [CI Skip] bump/beta 9.7.2-1-x
skip-checks: true
2022-11-11 06:42:25 +00:00
Jaco 744a2f7325 Cater for TransactionPaymentApi/2 runtime calls (#5326) 2022-11-11 08:32:46 +02:00
github-actions[bot] 135e2b2ccc [CI Skip] bump/beta 9.7.2-0-x
skip-checks: true
2022-11-10 05:39:53 +00:00
Xiliang Chen 521fa2026d fix unkown rpc (#5325)
* fix unkown rpc

* fix
2022-11-10 07:32:23 +02:00
github-actions[bot] 5c81e4fd3b [CI Skip] release/stable 9.7.1
skip-checks: true
2022-11-06 10:11:03 +00:00
Jaco 27d21ce117 9.7.1 (#5320) 2022-11-06 12:01:39 +02:00
github-actions[bot] 417e46016b [CI Skip] bump/beta 9.6.3-7-x
skip-checks: true
2022-11-06 09:33:14 +00:00
Jaco fc7bb681f5 Bump dev deps (#5318) 2022-11-06 11:24:56 +02:00
github-actions[bot] a0592986fa [CI Skip] bump/beta 9.6.3-6-x
skip-checks: true
2022-11-04 09:02:06 +00:00
Jaco d9aa61c786 Add isClonable getter on providers (#5317)
* Add isClonable getter on providers

* Use isClonable in API constructor

* mock clonable
2022-11-04 10:52:51 +02:00
github-actions[bot] 8883d355ff [CI Skip] bump/beta 9.6.3-5-x
skip-checks: true
2022-11-03 08:21:11 +00:00
Jaco 2ca657257c Local package README adjustments (#5314) 2022-11-03 10:11:31 +02:00
github-actions[bot] 482471b878 [CI Skip] bump/beta 9.6.3-4-x
skip-checks: true
2022-11-03 07:31:30 +00:00
Jaco 627f990166 Align ScProvider code structure with other providers (#5313)
* Align ScProvider code structure with other providers

* Additional moves

* Final adjustment

* Remove old

* Health adjustments
2022-11-03 09:23:12 +02:00
github-actions[bot] a73603cf0a [CI Skip] bump/beta 9.6.3-3-x
skip-checks: true
2022-11-03 06:29:48 +00:00
Jaco 1744544552 Bump metadata (#5310) 2022-11-03 08:21:53 +02:00
github-actions[bot] 408de16495 [CI Skip] bump/beta 9.6.3-2-x
skip-checks: true
2022-11-03 05:32:13 +00:00
Xiliang Chen 2822c43df3 able to send raw rpc methods (#5305)
* able to send raw rpc methods

* fix

* update stringify
2022-11-03 07:21:32 +02:00
github-actions[bot] 4fd3ac4097 [CI Skip] bump/beta 9.6.3-1-x
skip-checks: true
2022-10-31 11:13:19 +00:00
Nikos Kontakis 2c33d3d452 Bump substrate connect to 0.7.16 (#5307) 2022-10-31 13:05:22 +02:00
github-actions[bot] 65c1b8b26d [CI Skip] bump/beta 9.6.3-0-x
skip-checks: true
2022-10-31 07:02:45 +00:00
Jaco 7c6012ab07 Extra source information on decoding failures (#5306) 2022-10-31 08:55:01 +02:00
github-actions[bot] 0da2c25abd [CI Skip] release/stable 9.6.2
skip-checks: true
2022-10-30 08:20:45 +00:00
Jaco 2f0036e34a 9.6.2 (#5304) 2022-10-30 10:12:41 +02:00
github-actions[bot] bf4cff113a [CI Skip] bump/beta 9.6.2-0-x
skip-checks: true
2022-10-28 09:27:10 +00:00
Jaco 3f3c51d652 Adjust historic DispatchError type for statemint/statemine (#5303) 2022-10-28 12:18:50 +03:00
github-actions[bot] 0caae6beb5 [CI Skip] release/stable 9.6.1
skip-checks: true
2022-10-23 06:31:21 +00:00
Jaco 7f92bb33bc 9.6.1 (#5289) 2022-10-23 09:23:03 +03:00
github-actions[bot] 20b39c18f6 [CI Skip] bump/beta 9.5.3-9-x
skip-checks: true
2022-10-22 07:29:13 +00:00
Jaco f6907eb5de Bump dev (#5286) 2022-10-22 10:21:23 +03:00
github-actions[bot] 8880785951 [CI Skip] bump/beta 9.5.3-8-x
skip-checks: true
2022-10-21 14:25:29 +00:00
Jaco c4a4e1acd7 Update CHANGELOG (#5285) 2022-10-21 17:16:51 +03:00
github-actions[bot] e1cf75288c [CI Skip] bump/beta 9.5.3-7-x
skip-checks: true
2022-10-21 07:31:40 +00:00
Jaco be95356999 Ensure apiAt.<section>.<method>.key(...) passes through the correct arguments (#5283) 2022-10-21 10:23:54 +03:00
github-actions[bot] b66d62548a [CI Skip] bump/beta 9.5.3-6-x
skip-checks: true
2022-10-20 09:41:41 +00:00
Jaco bee7db805a Retrieve preimages from new pallet (#5281) 2022-10-20 12:33:52 +03:00
github-actions[bot] ca7a382c5b [CI Skip] bump/beta 9.5.3-5-x
skip-checks: true
2022-10-20 08:57:27 +00:00
Jaco 40393ddc1e Prepare for swap to global V2 weight defs (#5280) 2022-10-20 11:46:23 +03:00
github-actions[bot] 5bd2a664ec [CI Skip] bump/beta 9.5.3-4-x
skip-checks: true
2022-10-20 04:38:40 +00:00
Shunji Zhan 52ef27806b small polish (#5276) 2022-10-20 07:31:47 +03:00
github-actions[bot] 8e234f8a98 [CI Skip] bump/beta 9.5.3-3-x
skip-checks: true
2022-10-19 05:18:01 +00:00
Jaco 5e9ba771b5 Bump dev (#5278) 2022-10-19 08:09:31 +03:00
github-actions[bot] e855dca167 [CI Skip] bump/beta 9.5.3-2-x
skip-checks: true
2022-10-18 13:21:06 +00:00
Nikos Kontakis 3da1bbe403 Bump Substrate connect to 0.7.15 (#5275) 2022-10-18 16:10:46 +03:00
github-actions[bot] 5740c00259 [CI Skip] bump/beta 9.5.3-1-x
skip-checks: true
2022-10-18 10:43:18 +00:00
Jaco 8bb8fa0f32 Polkadot & Westend upgrade blocks (#5277) 2022-10-18 13:35:35 +03:00
github-actions[bot] 30bd10c3b3 [CI Skip] bump/beta 9.5.3-0-x
skip-checks: true
2022-10-17 12:05:45 +00:00
Jaco f7b647f4c6 Bump metadata (#5274)
* Bump metadata

* Adjust democracy proposals

* CHANGELOG

* Adjust for bounded extraction

* Adjust

* Adjust nextExternal

* dispatchQueue adjustments

* checkTypes adjust

* CHANGELOG
2022-10-17 14:55:51 +03:00
github-actions[bot] 3ae8e32c84 [CI Skip] release/stable 9.5.2
skip-checks: true
2022-10-16 10:03:04 +00:00
Jaco 3dbba5e5ba 9.5.2 (#5273) 2022-10-16 12:53:21 +03:00
github-actions[bot] 7e3b8bf5fc [CI Skip] bump/beta 9.5.2-1-x
skip-checks: true
2022-10-16 05:05:56 +00:00
Jaco 14b8d25fb1 Bump deps (#5272) 2022-10-16 07:54:59 +03:00
github-actions[bot] d64a1fcfd3 [CI Skip] bump/beta 9.5.2-0-x
skip-checks: true
2022-10-13 07:31:56 +00:00
Jaco 41bf6fa8ea Add ParachainHost version 3 runtime calls (#5270) 2022-10-13 10:23:45 +03:00
github-actions[bot] faa28f2822 [CI Skip] release/stable 9.5.1
skip-checks: true
2022-10-08 05:53:02 +00:00
Jaco 528a2b041b 9.5.1 (#5267)
* 9.5.1

* CHANGELOG
2022-10-08 08:43:38 +03:00
github-actions[bot] 7a0f103545 [CI Skip] bump/beta 9.4.4-6-x
skip-checks: true
2022-10-07 05:11:33 +00:00
Jaco 0565492ae8 Bump util (#5263) 2022-10-07 08:01:49 +03:00
github-actions[bot] af7820a0a2 [CI Skip] bump/beta 9.4.4-5-x
skip-checks: true
2022-10-06 06:51:09 +00:00
Jaco 69e754105d Revery 9300 WeightV2 override (#5261) 2022-10-06 09:43:00 +03:00
github-actions[bot] 8fc143ceab [CI Skip] bump/beta 9.4.4-4-x
skip-checks: true
2022-10-06 06:25:29 +00:00
Jaco af072be808 Statemine/Statemin Weights v2 adj (#5260) 2022-10-06 09:17:01 +03:00
github-actions[bot] 8d86def88b [CI Skip] bump/beta 9.4.4-3-x
skip-checks: true
2022-10-05 08:01:36 +00:00
Jaco a99f848adb Cleanup WeightV2 comments (#5259) 2022-10-05 10:51:56 +03:00
github-actions[bot] f53db7dbf0 [CI Skip] bump/beta 9.4.4-2-x
skip-checks: true
2022-10-04 05:59:22 +00:00
Jaco 26d1d0d695 Add Weight{V1, V2} aliases (#5257) 2022-10-04 08:51:38 +03:00
github-actions[bot] ed33850c62 [CI Skip] bump/beta 9.4.4-1-x
skip-checks: true
2022-10-03 09:40:33 +00:00
Jaco 6983f8c883 Adjust contracts to pass either V1 or V2 weights (#5254)
* Adjust contracts to pass either V1 or V2 weights

* Adjust

* Formatting

* Adjust

* Fix build
2022-10-03 12:31:00 +03:00
github-actions[bot] 71ddc66515 [CI Skip] bump/beta 9.4.4-0-x
skip-checks: true
2022-10-03 05:50:02 +00:00
Jaco e3ba160935 Bump metadata (#5251)
* Bump metadata

* Weight V2 as structure

* checkTypes

* Partial alias override

* Remove unused type import

* Use old weight calls on contracts (as available)

* Adjust

* merge master

* Adjust

* CHANGELOG

* CHANGELOG

* formatting

* Casting

* Adjust expectations
2022-10-03 08:41:43 +03:00
github-actions[bot] b824edd281 [CI Skip] release/stable 9.4.3
skip-checks: true
2022-10-02 09:35:43 +00:00
Jaco b397486fe8 9.4.3 (#5252) 2022-10-02 12:27:46 +03:00
github-actions[bot] 28d1d8193b [CI Skip] bump/beta 9.4.3-7-x
skip-checks: true
2022-10-02 07:05:01 +00:00
Jaco 6cb0c5c5be Runtime upgrade blocks (#5250) 2022-10-02 09:56:29 +03:00
github-actions[bot] f4072b9202 [CI Skip] bump/beta 9.4.3-6-x
skip-checks: true
2022-09-30 06:14:09 +00:00
Jaco 8d300a73b8 Bump deps (#5248) 2022-09-30 09:05:43 +03:00
github-actions[bot] d6d24d5b61 [CI Skip] bump/beta 9.4.3-5-x
skip-checks: true
2022-09-28 10:58:03 +00:00
Jaco 0ef93c3b94 Bump TS (#5245) 2022-09-28 13:50:14 +03:00
github-actions[bot] a6b48f8eec [CI Skip] bump/beta 9.4.3-4-x
skip-checks: true
2022-09-28 05:22:34 +00:00
Jaco a92bfca548 Add deprecated flag to RPCs (#5244)
* Add deprecated flag to RPCs

* CHANGELOG
2022-09-28 08:14:47 +03:00
github-actions[bot] 7701205d58 [CI Skip] bump/beta 9.4.3-3-x
skip-checks: true
2022-09-27 12:17:29 +00:00
Jaco 2d09e8d94e Align redeemable check with Substrate (exact) (#5243)
* Align redeemable check with Substrate (exact)

* Fix comment
2022-09-27 15:09:45 +03:00
github-actions[bot] 7b0fd81b4e [CI Skip] bump/beta 9.4.3-2-x
skip-checks: true
2022-09-27 11:28:39 +00:00
Jaco c1a6f3f302 Align staking derive redeemableSum with Rust source (currentEra vs activeEra usage) (#5242) 2022-09-27 14:18:56 +03:00
github-actions[bot] 62df7e4ead [CI Skip] bump/beta 9.4.3-1-x
skip-checks: true
2022-09-26 07:04:03 +00:00
Jaco f2cb628e25 Adjust CHANGELOG (#5238) 2022-09-26 09:53:29 +03:00
github-actions[bot] 5b0eb1b67b [CI Skip] bump/beta 9.4.3-0-x
skip-checks: true
2022-09-26 06:49:54 +00:00
Andreea Eftene 87affdcbb3 Fix code source type (#5236) 2022-09-26 09:42:09 +03:00
Andreea Eftene 4afd550db7 change prefix (#5237) 2022-09-25 20:57:16 +03:00
github-actions[bot] cebcc054da [CI Skip] release/stable 9.4.2
skip-checks: true
2022-09-24 09:20:45 +00:00
Jaco dc9c225eb8 9.4.2 (#5235) 2022-09-24 12:10:34 +03:00
github-actions[bot] a3b0d9a794 [CI Skip] bump/beta 9.4.2-4-x
skip-checks: true
2022-09-24 08:10:46 +00:00
Jaco 43efff7ade Bump metadata (#5233)
* Bump metadata

* historyDepth as const

* bagsList rename

* CHANGELOG
2022-09-24 11:02:29 +03:00
github-actions[bot] a81d83a25c [CI Skip] bump/beta 9.4.2-3-x
skip-checks: true
2022-09-24 06:31:29 +00:00
Nikos Kontakis 6dea8d9a07 Add resubscription delete on unsubscribe (#5230) 2022-09-24 09:22:02 +03:00
github-actions[bot] 4677ecc55f [CI Skip] bump/beta 9.4.2-2-x
skip-checks: true
2022-09-24 06:16:40 +00:00
Jaco 4038260b37 Deps (#5231) 2022-09-24 09:08:59 +03:00
github-actions[bot] ec87b5b244 [CI Skip] bump/beta 9.4.2-1-x
skip-checks: true
2022-09-23 09:55:34 +00:00
Nikos KontakisandJaco 421f767b0d Add autoconnect to ScProvider (#5217)
* Add autoconnect to ScProvider

* Add autoconnect flag

* remove autoconnect solution and create resubscribe

* Satisfy lint

* Update packages/rpc-provider/src/substrate-connect/ScProvider.ts

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

Co-authored-by: Jaco <jacogr@gmail.com>
2022-09-23 12:47:44 +03:00
github-actions[bot] cfc7e2490c [CI Skip] bump/beta 9.4.2-0-x
skip-checks: true
2022-09-22 08:22:25 +00:00
Jaco 2051a3d772 Bump deps (#5226) 2022-09-22 11:14:40 +03:00
github-actions[bot] 44590fd235 [CI Skip] release/stable 9.4.1
skip-checks: true
2022-09-17 07:20:12 +00:00
Jaco fdd4d3a16d 9.4.1 (#5225) 2022-09-17 10:12:01 +03:00
github-actions[bot] c8307138a9 [CI Skip] bump/beta 9.3.4-8-x
skip-checks: true
2022-09-16 13:25:13 +00:00
Jaco 6e5697fc8e Bump metadata (#5224)
* Bump metadata

* Polkadot & Kusama
2022-09-16 16:14:35 +03:00
github-actions[bot] 0dc114227c [CI Skip] bump/beta 9.3.4-7-x
skip-checks: true
2022-09-16 12:04:50 +00:00
Jaco 006c6b02b1 Bump deps (& align CHANGELOG) (#5223) 2022-09-16 14:56:59 +03:00
github-actions[bot] 6984329a2b [CI Skip] bump/beta 9.3.4-6-x
skip-checks: true
2022-09-16 10:10:24 +00:00
Jaco 954a6f11de Cater for weights 1.5 JSON representation (#5221)
* Cater for weights 1.5 JSON representation

* toBn check
2022-09-16 13:00:50 +03:00
github-actions[bot] 9247a40a15 [CI Skip] bump/beta 9.3.4-5-x
skip-checks: true
2022-09-16 04:53:31 +00:00
Jaco 85ddffde61 Westend 9290 upgrade block (#5220) 2022-09-16 07:45:40 +03:00
github-actions[bot] 4dff632fa6 [CI Skip] bump/beta 9.3.4-4-x
skip-checks: true
2022-09-14 08:27:05 +00:00
Jaco a7e3e15a7a Bump deps (#5216) 2022-09-14 11:18:50 +03:00
github-actions[bot] 385068e542 [CI Skip] bump/beta 9.3.4-3-x
skip-checks: true
2022-09-13 14:18:47 +00:00
Jaco 210454dfe6 Upgrade blocks (#5215)
* Upgrade blocks

* Adjust Polkadot
2022-09-13 17:10:38 +03:00
github-actions[bot] 8264c5db11 [CI Skip] bump/beta 9.3.4-2-x
skip-checks: true
2022-09-13 03:36:43 +00:00
Nikos Kontakis 9e66524714 Bump substrate connect to 0.7.12 (#5214) 2022-09-13 06:28:51 +03:00
github-actions[bot] 77202c4dd3 [CI Skip] bump/beta 9.3.4-1-x
skip-checks: true
2022-09-12 06:15:01 +00:00
Jaco 9d61aaa1f3 Bump deps (#5213) 2022-09-12 09:06:41 +03:00
github-actions[bot] a147a7c769 [CI Skip] bump/beta 9.3.4-0-x
skip-checks: true
2022-09-09 06:15:27 +00:00
Jaco a8b180b387 Bump deps (#5210) 2022-09-09 09:05:39 +03:00
github-actions[bot] 266427c8f4 [CI Skip] release/stable 9.3.3
skip-checks: true
2022-09-06 07:56:49 +00:00
Jaco e94af85e69 9.3.3 (#5207) 2022-09-06 10:47:34 +03:00
github-actions[bot] 9be16a40ef [CI Skip] bump/beta 9.3.3-2-x
skip-checks: true
2022-09-06 07:32:51 +00:00
Jaco 2b92fd94af Fix and adjust tests for AccountId{32, 33} (#5206) 2022-09-06 10:24:36 +03:00
github-actions[bot] 0b6f786108 [CI Skip] bump/beta 9.3.3-1-x
skip-checks: true
2022-09-05 10:43:39 +00:00
Jaco b0a3c206ab Adjust CHANGELOG (#5204) 2022-09-05 13:35:53 +03:00
github-actions[bot] 98ae45c64b [CI Skip] bump/beta 9.3.3-0-x
skip-checks: true
2022-09-05 10:25:10 +00:00
David Duong 116501f89a Avoid reserved words during named enum fields augmentation (#5203) 2022-09-05 13:15:57 +03:00
github-actions[bot] 3cf456f3fa [CI Skip] release/stable 9.3.2
skip-checks: true
2022-09-04 10:19:49 +00:00
Jaco 63e917ca09 9.3.2 (#5202)
* 9.3.2

* Upgrade blocks

* CC ignore

* Fix CC path
2022-09-04 13:08:48 +03:00
github-actions[bot] 76c6b63f29 [CI Skip] bump/beta 9.3.2-0-x
skip-checks: true
2022-09-04 06:52:38 +00:00
Jaco 65dbe9043a Bump metadata (#5200)
* Bump metadata

* Weight mapping

* CHANGELOG
2022-09-04 09:43:20 +03:00
github-actions[bot] ce5ec004b4 [CI Skip] release/stable 9.3.1
skip-checks: true
2022-09-03 07:14:46 +00:00
Jaco 196f91bc92 9.3.1 (#5201) 2022-09-03 10:06:32 +03:00
github-actions[bot] 159ec48029 [CI Skip] bump/beta 9.2.5-6-x
skip-checks: true
2022-09-02 09:06:44 +00:00
Jaco 993e16240d Bump common (#5199) 2022-09-02 11:59:02 +03:00
github-actions[bot] ae6c2aa750 [CI Skip] bump/beta 9.2.5-5-x
skip-checks: true
2022-09-02 05:37:10 +00:00
Jaco 79da77234e Support for ink! v4 metadata (#5195)
* Support for ink! v4 metadata

* Adjust

* Export v4ToLatest

* Adjust expectations
2022-09-02 08:25:12 +03:00
github-actions[bot] 8992e7f2e8 [CI Skip] bump/beta 9.2.5-4-x
skip-checks: true
2022-09-01 14:13:02 +00:00
Jaco 9b1e5f2f25 AccountId33 (#5197)
* Support for ink! v4 metadata

* Adjust

* Support for AccountId33

* Revert "Adjust"

This reverts commit 862e20c3a88de40c6c639b1f51034c296d7f9d16.

* Revert "Support for ink! v4 metadata"

This reverts commit 07d1fc0dba4c4c2e2a52b349e6d84b046ebbd205.

* Adjust

* Adjust, keep exports

* Adjust test

* Adjust

* Sizing
2022-09-01 17:05:07 +03:00
github-actions[bot] a94c0ff11c [CI Skip] bump/beta 9.2.5-3-x
skip-checks: true
2022-09-01 08:58:36 +00:00
Jaco 0db40bc98b Add v4 contract tests (not used yet) (#5194) 2022-09-01 11:50:36 +03:00
github-actions[bot] 4fd5e56af3 [CI Skip] bump/beta 9.2.5-2-x
skip-checks: true
2022-08-31 07:33:05 +00:00
Jaco 38cb10fb24 Adjust pendingRewards for pools runtime calls (#5192) 2022-08-31 10:23:32 +03:00
github-actions[bot] b5ab09fdb1 [CI Skip] bump/beta 9.2.5-1-x
skip-checks: true
2022-08-31 06:40:25 +00:00
Jaco 517baddb25 Bump metadata (#5191) 2022-08-31 09:30:15 +03:00
github-actions[bot] e445a26d5d [CI Skip] bump/beta 9.2.5-0-x
skip-checks: true
2022-08-31 06:06:35 +00:00
Jaco f523325c0a Bump dev (#5190) 2022-08-31 08:58:57 +03:00
github-actions[bot] 55cb602a71 [CI Skip] release/stable 9.2.4
skip-checks: true
2022-08-27 15:27:25 +00:00
Jaco 904b2aafe7 9.2.4 (#5188) 2022-08-27 18:19:25 +03:00
github-actions[bot] 3dee6a9cb4 [CI Skip] bump/beta 9.2.4-6-x
skip-checks: true
2022-08-26 15:06:21 +00:00
Jaco bd113b124e Pin Github actions (#5187) 2022-08-26 17:58:23 +03:00
github-actions[bot] 580039a23c [CI Skip] bump/beta 9.2.4-5-x
skip-checks: true
2022-08-26 13:18:52 +00:00
Jaco 2472ef8c98 Bump TS (#5186)
* Bump TS

* Adjust types

* False positive
2022-08-26 16:10:26 +03:00
github-actions[bot] 020fb1cd09 [CI Skip] bump/beta 9.2.4-4-x
skip-checks: true
2022-08-26 12:01:51 +00:00
Jaco 3cbebb6d71 Typegen with embebbed Enum in Struct (#5185) 2022-08-26 14:52:04 +03:00
github-actions[bot] 138a64c5fb [CI Skip] bump/beta 9.2.4-3-x
skip-checks: true
2022-08-26 10:23:58 +00:00
Jaco efd76e3e20 Align nextTick in decorate with other usages (#5184) 2022-08-26 13:13:14 +03:00
github-actions[bot] 2b562c80b9 [CI Skip] bump/beta 9.2.4-2-x
skip-checks: true
2022-08-24 06:56:42 +00:00
Jaco f9ab3e7029 Remove drr Observable logging (#5179) 2022-08-24 09:46:05 +03:00
github-actions[bot] fdc30fd2c2 [CI Skip] bump/beta 9.2.4-1-x
skip-checks: true
2022-08-24 06:43:23 +00:00
Jaco d2b40660ad Bump common (#5180) 2022-08-24 09:33:48 +03:00
github-actions[bot] c545cffec0 [CI Skip] bump/beta 9.2.4-0-x
skip-checks: true
2022-08-21 06:33:40 +00:00
Jaco 479719fdcc Correct CHANGELOG (#5178) 2022-08-21 09:25:53 +03:00
github-actions[bot] 8a3f938392 [CI Skip] release/stable 9.2.3
skip-checks: true
2022-08-21 06:14:08 +00:00
Jaco 0ccf9ad96f 9.2.3 (#5177) 2022-08-21 09:06:30 +03:00
github-actions[bot] a41d292fc1 [CI Skip] bump/beta 9.2.3-5-x
skip-checks: true
2022-08-21 05:53:41 +00:00
Jaco aacebcabb5 Remove unneeded TryRuntime state call defs (#5176) 2022-08-21 08:46:02 +03:00
github-actions[bot] 17c6ef7527 [CI Skip] bump/beta 9.2.3-4-x
skip-checks: true
2022-08-20 13:06:04 +00:00
Jaco b252f13210 Bump static metadata (#5175) 2022-08-20 15:57:58 +03:00
Jaco 64360b3598 Fallback for StakingLedger at 1050 (#5171)
* Fallback for StakingLedger at 1050

* CHANGELOG
2022-08-19 12:00:17 +03:00
github-actions[bot] 0acb0ab226 [CI Skip] bump/beta 9.2.3-3-x
skip-checks: true
2022-08-19 08:49:31 +00:00
Jaco d32e219d7e Bump pjs/dev (#5174) 2022-08-19 11:41:19 +03:00
github-actions[bot] a1029dc0ba [CI Skip] bump/beta 9.2.3-2-x
skip-checks: true
2022-08-18 12:20:28 +00:00
Nikos Kontakis eef50a759d Bump substrate-connect to 0.7.11 (#5173) 2022-08-18 15:09:39 +03:00
github-actions[bot] 2bad0f4799 [CI Skip] bump/beta 9.2.3-1-x
skip-checks: true
2022-08-16 15:49:52 +00:00
Jaco 9756d33664 Update rpc-provider README (#5168) 2022-08-16 18:42:12 +03:00
github-actions[bot] 1ea50757c6 [CI Skip] bump/beta 9.2.3-0-x
skip-checks: true
2022-08-16 14:57:47 +00:00
Jaco 26e550fe6c Use constant for latest extrinsic version (#5167) 2022-08-16 17:50:03 +03:00
1191 changed files with 289452 additions and 121558 deletions
-27
View File
@@ -1,27 +0,0 @@
checks:
argument-count:
config:
threshold: 5
method-complexity:
config:
threshold: 7
method-count:
config:
threshold: 25
method-lines:
config:
threshold: 30
exclude_patterns:
- "**/*.spec.js"
- "**/*.spec.ts"
- "**/*.test.js"
- "**/*.test.ts"
- "docs/**/*.js"
- "docs/**/*.ts"
- "packages/*-augment/"
- "packages/*-augment-*/"
- "packages/typegen/scripts"
- "packages/typegen/src"
- "packages/types/src/interfaces/"
- "packages/types/src/augment/"
-24
View File
@@ -1,24 +0,0 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = {
...base,
ignorePatterns: [
...base.ignorePatterns
],
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.eslint.json'
]
},
rules: {
...base.rules,
// add override for any (a metric ton of them, initial conversion)
'@typescript-eslint/no-explicit-any': 'off',
// this seems very broken atm, false positives
'@typescript-eslint/unbound-method': 'off'
}
};
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-approve@master
- uses: jacogr/action-approve@795afd1dd096a2071d7ec98740661af4e853b7da
with:
authors: jacogr
authors: jacogr, TarikGul
labels: -auto
token: ${{ secrets.GH_PAT_BOT }}
+2 -2
View File
@@ -8,9 +8,9 @@ jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-merge@master
- uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029
with:
checks: build,lint,test
checks: pr (build),pr (lint),pr (test)
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
+5 -5
View File
@@ -10,16 +10,16 @@ jobs:
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836
with:
github-token: ${{ secrets.GH_PAT_BOT }}
issue-lock-inactive-days: '7'
issue-lock-comment: >
issue-inactive-days: '7'
issue-comment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue
if you think you have a related problem or query.
pr-lock-inactive-days: '2'
pr-lock-comment: >
pr-inactive-days: '2'
pr-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
+6 -3
View File
@@ -3,20 +3,23 @@ on: [pull_request]
jobs:
pr:
continue-on-error: true
strategy:
matrix:
step: ['lint', 'test', 'build', 'deno']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
- name: ${{ matrix.step }}
if: always()
run: |
yarn install --immutable | grep -v 'YN0013'
yarn install --immutable
yarn ${{ matrix.step }}
+8 -6
View File
@@ -10,20 +10,22 @@ jobs:
strategy:
matrix:
step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
GH_PAT: ${{ secrets.GH_PAT_BOT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
token: ${{ secrets.GH_PAT_BOT }}
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: ${{ matrix.step }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn install --immutable
yarn ${{ matrix.step }}
-20
View File
@@ -1,20 +0,0 @@
name: Semgrep
on:
pull_request: {}
push:
branches:
- master
jobs:
check:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
with:
auditOn: push
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
publishDeployment: 1395
-19
View File
@@ -1,19 +0,0 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '55 1/3 * * *'
jobs:
stale:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GH_PAT_BOT }}
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
stale-issue-label: 'stale'
exempt-issue-labels: '-size-l,-size-m,-size-s,-size-xl,-size-xs,[bug]'
days-before-stale: 21
days-before-close: 7
+1
View File
@@ -19,6 +19,7 @@ NOTES.md
!.yarn/plugins
.pnp.*
.vscode/
.idea/
cc-test-reporter
lerna-debug.log*
npm-debug.log*
+1 -1
View File
@@ -1 +1 @@
14
v18.15
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// Copyright 2017-2024 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/prettier.cjs');
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-785
View File
File diff suppressed because one or more lines are too long
+893
View File
File diff suppressed because one or more lines are too long
+9 -7
View File
@@ -1,13 +1,15 @@
compressionLevel: mixed
enableGlobalCache: false
enableImmutableInstalls: false
enableProgressBars: false
logFilters:
- code: YN0013
level: discard
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.2.0.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
+771
View File
@@ -1,5 +1,776 @@
# CHANGELOG
## 11.0.3 May 8, 2024
Changes
- Make `api.derive.staking.*` backwards compatible
- Fix `claimedRewards` regression in `api.derive.staking.queryMulti`
- Update Substrate to latest
## 11.0.2 Apr 24, 2024
Changes
- Fix type for TAssetConversion in Polkadot Asset hub
## 11.0.1 Apr 23, 2024
Breaking Changes:
Note! The following breaking changes only refer to `@polkadot/api-derive` calls under `api.derive.staking.*` due to the most recent breaking changes in runtime version v1.2. Please refer to the link next to the bullet points for more information.
- Update` api.derive.staking` calls with breaking changes ([#5860](https://github.com/polkadot-js/api/pull/5860))
- Add `claimedRewardsEra` to api.derive.staking.query for compatibility with legacyClaimedRewards ([#5862](https://github.com/polkadot-js/api/pull/5862))
Contributed:
- Bump @substrate/connect to 0.8.10 (Thanks to https://github.com/kratico)
Changes:
- Update polkadot types-known for latest runtime upgrades
## 10.13.1 Apr 16, 2024
Changes:
- Update CI actions and setup_node to v4
- Update substrate metadata to latest
- Support ParachainHost runtime api v6, 7, 8, 9, 10
- Resolve correct module for council derive
- Update westend types-known for 1010000
- Update kusama types-known for 1001003
## 10.12.6 Apr 2, 2024
**NOTE**: Because of a broken CI build for 10.12.5 -> 10.12.6 is a replacement
Contributed:
- chore: fix typos in error (Thanks to https://github.com/xiaoxianBoy)
Changes:
- Upgrade westend types-known for 1009000
- Add `disableAscii` option for toHuman, and toPrimitive
- V14 Update substrate latest metadata
- V15 Update substrate latest metadata
- Bump yarn to 4.1.1
- Add `assetId` getter field to to necessary ExtrinsicPayloads
- Add Updated Runtime Defintions
- ValidateStatement
- MMRApi
- mmr_root
- mmr_leaf_count
- Core v5
- GenesisBuilder
- MixnetApi
## 10.12.5 Apr 2, 2024
Contributed:
- chore: fix typos in error (Thanks to https://github.com/xiaoxianBoy)
Changes:
- Upgrade westend types-known for 1009000
- Add `disableAscii` option for toHuman, and toPrimitive
- V14 Update substrate latest metadata
- V15 Update substrate latest metadata
- Bump yarn to 4.1.1
- Add `assetId` getter field to to necessary ExtrinsicPayloads
- Add Updated Runtime Defintions
- ValidateStatement
- MMRApi
- mmr_root
- mmr_leaf_count
- Core v5
- GenesisBuilder
- MixnetApi
## 10.12.4 Mar 19, 2024
Contributed:
- Fix add muln(2) to signingInfo Derive (Thanks to https://github.com/pepoviola)
## 10.12.3 Mar 18, 2024
Contributed:
- Bump @substrate/connect to 0.8.8 (Thanks to https://github.com/kratico)
- Fix optional chaining operator in toHuman (Thanks to https://github.com/Imod7)
- Fix check if minimumPeriod is zero (Thanks to https://github.com/pepoviola)
Changes:
- Fix api.derive.staking.eraExposure for compatibility
- Fix invalid Lookup assignment on augmentation and update polkadot and kusama metadata
- Update polkadot runtime upgrade per block
- Update kusama runtime upgrade per block
- Update westend runtime upgrade per block
## 10.12.2 Mar 11, 2024
Contributed:
- fix cache key (rpc-provider) (Thanks to https://github.com/ermalkaleci)
Changes:
- Update to latest Substrate metadata
## 10.12.1 Mar 4, 2024
Contributed:
- Ink! V5 Support (Thanks to https://github.com/peetzweg)
## 10.11.3 Feb 27, 2024
Contributed:
- Fix sorting of `Option` values and error on duplicates from BTreeSet/BTreeMap (Thanks to https://github.com/Neopallium)
- Fix BEEFY compact signed commitment in versioned finality proofs (Thanks to https://github.com/mfornos)
- Update @substrate/connect (Thanks to https://github.com/kratico)
Changes:
- Bump dev w/ packageDetect adjustments
- Update copyright year
- Bump nock, and dev deps
- Allow `cacheCapacity` option for the `WsProvider`
- Bump yarn
## 10.11.2 Dec 18, 2023
Contributed:
- Add `chainIsEthereum` key to `Registry` interface (Thanks to https://github.com/fgamundi)
- Adjust types for `ChargeAssetTxPayment` (Thanks to https://github.com/bee344)
Changes:
- Support `[8a;32]` types in known keys
- Update to latest Substrate metadata
## 10.11.1 Nov 18, 2023
Contributed:
- Support for latest `ChargeAssetTxPayment` (Thanks to https://github.com/bee344)
- Support for latest `beefy::subscribeJustifications()` (Thanks to https://github.com/serban300)
Changes:
- Add known `intrablockEntropy` storage key
- Add support for `SkipCheckIfFeeless` signed extension
- Ensure all usages of `balances.transfer` (in tests) have been removed
- Drop support for Node 16 (EOL 11 Sep 2023)
## 10.10.1 Oct 14, 2023
Contributed:
- Add aliases for Noir type paths (Thanks to https://github.com/conr2d)
- Add runtime `FungliblesApi` version 2 (Thanks to https://github.com/bkontur)
- Add runtime `EthereumApi` version 5 (Thanks to https://github.com/timbrinded)
- Add runtime `AssetConversionApi` (Thanks to https://github.com/jsidorenko)
- Adjust types for runtime `AssetConversionApi` (Thanks to https://github.com/jsidorenko)
- Expand test cases for `Int` conversions (Thanks to https://github.com/peetzweg)
- Add `isEthereum` to chain properties (Thanks to https://github.com/fgamundi)
- Allow RiscV contracts via check (Thanks to https://github.com/statictype)
Changes:
- Serialize any additional payload fields via `toJSON()`
- Expose internal `rpc-core` stats on `api.stats` getter
- Add support for latest/stable V15 metadata interfaces
- Add runtime `BeefyApi` version 3
- Add runtime `ParachainHost` version 5
- Expose `chain.subscribeFinalizedBlocks` derive
- Consistently use `import.meta.url` inside tests
- Group `Uint/Int` tests for maintainability
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.9.1 Jun 12, 2023
Changes:
- Adjust object index access for stricter tsconfig settings
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.8.1 Jun 5, 2023
Contributed:
- Added support for extended Contracts ABI V4 definitions (Thanks to https://github.com/statictype)
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
- Cleanup (some) linting overrides
## 10.7.3 May 28, 2023
Changes:
- Ensure that `.paymentInfo` never mutates the underlying/existing signature
## 10.7.2 May 21, 2023
Contributed:
- Allow `api.setSigner(...)` to clear existing (Thanks to https://github.com/polymath-eric)
Changes:
- Adjust `@polkadot/types-create` exports with no duplicates
## 10.7.1 May 13, 2023
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
- Add `module` to `package.json` export map (ESM-only)
## 10.6.1 May 7, 2023
Contributed:
- Extract runtime details for custom documentation (Thanks to https://github.com/FlorianFranzen)
Changes:
- Apply historic `Scheduled` types for Kusama (as reported, non-comprehensive)
- Adjust Deno types inside `WsProvider`
- Allow parsing of (experimental) metadata v15
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.5.1 Apr 29, 2023
Changes:
- Default to hex-only in `Int/UInt.toJSON` for > 128-bit values
- Allow for disabling of `isPedantic` storage checks in API options
- Adjust usage of `objectSpread`, default to runtime as required
- Adjust compilation output for `__internal__` class fields
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.4.1 Apr 22, 2023
Contributed:
- Apply `noInitWarn` flag to signed extension warnings (Thanks to https://github.com/xlc)
Changes:
- Adjust `AccountId20` detection with partial match
- Cleanup block author extraction derives
- Update to latest Polkadot, Kusama & Substrate metadata
- Drop support for Node 14 (EOL 30 Apr 2023)
## 10.3.4 Apr 16, 2023
Changes:
- Ensure block author extract uses the correct as-at block construction state
## 10.3.3 Apr 15, 2023
Contributed:
- Add support for Fungibles runtime api (Thanks to https://github.com/bkontur)
- Update Nimbus Collator lookups (Thanks to https://github.com/grenade)
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
- Minimal support for a `@tsconfig/stricter` setup
## 10.3.2 Apr 10, 2023
Changes:
- Revert throw on MSB BitVec (`toHuman()` output is still incorrect)
## 10.3.1 Apr 9, 2023
Changes:
- Add `BitVec.toBoolArray()` helper function
- Tie down `BitVec` from metadata to only allow (default) Lsb
- Support for `TransactionPaymentApi/4`
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.2.2 Apr 1, 2023
Contributed:
- Support expanded Nimbus lookups to Collators (Thanks to https://github.com/grenade)
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.2.1 Mar 25, 2023
Contributed:
- Add support for new Frontier `AccountId20` mapping (Thanks to https://github.com/koushiro)
- Adjust MMR RPCs & runtime calls to align with latest (Thanks to https://github.com/Lederstrumpf)
Changes:
- Use Promise resolve/reject to track state in typegen on-chain metadata retrievals
- Adjust signing header retrieval, catering for discarded state fallbacks
- Add support for `ParachainHost v4` runtime calls
- Basic support for markdown generation for different chains (only Kusama & Polkadot currently added)
- Add not-to-be-used `ISize` type support (same as `USize`, throwing on use - added for completeness)
- Ensure `AccountId20.eq` does not fail on null/undefined inputs
- Expand tests around `toU8a()` where the `isBare` flag is is being used
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.1.4 Mar 19, 2023
Changes:
- Add methods for v2 `Metadata_*` runtime calls
## 10.1.3 Mar 15, 2023
Changes:
- Remove incorrect `.module.` specifiers in typegen code
- Mark unsafe RPC methods (and include in `rpc.md` generation)
## 10.1.2 Mar 11, 2023
Changes:
- Adjust type exports to remove invalid generated exports from `/src/`
- Apply missing `/*#__PURE__*/` exports in `api-derive`
## 10.1.1 Mar 11, 2023
Contributed:
- Fix yargs usage inside ESM modules (Thanks to https://github.com/conr2d)
Changes:
- Align runtime APIs with latest Substrate
- Update to latest Polkadot, Kusama & Substrate metadata
- Use consistent `.js` imports in source files (TS moduleResolution)
## 10.0.1 Mar 4, 2023
Contributed:
- Expose per-endpoint stats for providers (Thanks to https://github.com/jeluard)
- Adjust ink! primitive extraction for v4 (Thanks to https://github.com/statictype)
Changes:
- Ensure that provider disconnect clears all subscriptions
- Adjust typegen to internally use `import()` (catering for ESM provided types)
- Swap TS -> JS compiler to use tsc (from babel)
- Adjust all tests to use `node:test` runner (ESM variants)
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.14.2 Feb 19, 2023
Changes:
- Don't allow `WsProvider.connect()` on an open connection (creates resource leaks)
- Adjust typegen to use metadata-defined aliases in query return decoration
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.14.1 Feb 12, 2023
Changes:
- Extract aliases for `*_runtime::Runtime{Call, Event}` from metadata
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.13.6 Feb 5, 2023
Contributed:
- Align `eth_getTransactionCount` with frontier (Thanks to https://github.com/alko89)
Changes:
- Additional override for `Compact<{ refTime: u64 }>` chains
- Add script to retrieve local rpc, version & metadata for typegen
## 9.13.5 Feb 2, 2023
Changes:
- Adjust `Weight` alias for 1.5 chains
- Ensure correct registry is pass through for runtime TS generation
## 9.13.4 Feb 1, 2023
Changes:
- None from 9.13.3 (The previous version had npm registry publishing issues)
## 9.13.3 Feb 1, 2023
Changes:
- Adjust `Weight` alias detection to cater for `WeightV0/u32` overrides (e.g. early Kusama blocks)
## 9.13.2 Jan 29, 2023
Changes:
- Allow null as valid param to Int/UInt
## 9.13.1 Jan 29, 2023
Contributed:
- Add support for V3 of `TransactionPaymentApi` (Thanks to https://github.com/notlesh)
Changes:
- Adjust `Weight` alias detection (moved from `PortableRegistry` -> `Registry`)
- Move default (typegen) weight alias to `WeightV2` (does not affect runtime detection)
- Prepare metadata docs from chain generation for future cli arguments
- Add base type object for (future) composite types
- Apply additional JSDoc comments into `PortableRegistry`
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.12.1 Jan 22, 2023
Changes:
- Add `isStorageFallback` on the `Codec` interface. (`true` if entry was created from a metadata fallback value from an empty storage item)
- Ensure `api.queryMulti` returns empty result when no keys are provided
- Add explicit Array checks on `Vec/Tuple` inputs
- Align `Struct.{toU8a/toPrimitive/toHuman/toJSON}` population of results
- Apply memoization to batched API queries
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.11.3 Jan 15, 2023
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.11.2 Jan 13, 2023
Changes:
- Ensure `derive.democracy.preimages` retrieves correctly from (current-gen) `preimage`
## 9.11.1 Jan 8, 2023
- **Breaking change** For users of `ScProvider` you now need to explicitly pass `@substrate/connect` as a parameter. This means the code needs to be adjusted as follows -
```js
import { ScProvider } from '@polkadot/api';
import * as Sc from '@substrate/connect';
const provider = new ScProvider(Sc, Sc.WellKnownChain.polkadot);
```
Contributed:
- Fix for typegen with nested tuples (Thanks to https://github.com/sander2)
- Expose blockNumber on submittable results (Thanks to https://github.com/ken-centrality)
Changes:
- The `ScProvider` interface now needs receive an `@substrate/connect` instance
- Along with the above `ScProvider.WellKnownChains` has been removed
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.10.5 Dec 27, 2022
Changes:
- Revert 9.10.4 paymentInfo changes (fallback only works on struct, not `Weight`)
## 9.10.4 Dec 25, 2022
Changes:
- Align runtime `paymentInfo` calls with Substrate (w/ decoding fallbacks)
## 9.10.3 Dec 17, 2022
Changes:
- Add override for Structs where `registry` appear as a field
- Update to latest Polkadot, Kusama & Substrate metadata
- Kusama 9320/9340/9350 & Westend 9330/9340/9350 upgrade blocks
## 9.10.2 Dec 9, 2022
Changes:
- Fix `derive.balances.account` detection for system vs balances
## 9.10.1 Dec 4, 2022
- **Important** Since [9.2.1](https://github.com/polkadot-js/api/releases/tag/v9.2.1) the recommended way of accessing `WellKnownChain` for light clients is via `ScProvider.WellKnownChain`. This release removes the explicit export from the `ScProvider` root.
Changes:
- Adjust payloads to use `BlockHash` types (as applicable)
- Adjust type-only imports in `ScProvider`
- Update to latest Polkadot, Kusama & Substrate metadata
- Update to `@polkadot/util` 10.2.1
## 9.9.4 Nov 28, 2022
Changes:
- Fix dispatchQueue preimage retrieval in derives
- No change from incorrectly published 9.9.3
## 9.9.2 Nov 27, 2022
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.9.1 Nov 20, 2022
Changes:
- Update to latest Polkadot, Kusama & Substrate metadata
- Adjust code for latest Eslint & TS released versions
## 9.8.2 Nov 16, 2022
Changes:
- Adjust `api.rpc.payment.queryInfo` to always return `WeightV1` responses
- Mark `api.rpc.payment.queryInfo` as deprecated (will be in a future Substrate version)
## 9.8.1 Nov 13, 2022
Contributed:
- Params encoding fix for `api.rpc(...)` (Thanks to https://github.com/xlc)
- Support for `WeightV2` contract interfaces (Thanks to https://github.com/jasl)
Changes:
- Cater for `TransactionPaymentApi/2` runtime calls
- Add getters for `has{DryRun, PaymentInfo}` on submittables (feature detection)
- Polkadot 9300, Kusama 9300 & Westend 9310/9320 upgrade blocks
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.7.1 Nov 6, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
- Add `api.rpc(method, ...params)` support (Thanks to https://github.com/xlc)
Changes:
- Align `ScProvider` code structure with other providers
- Add `isClonable` getter on providers (some, e.g. sc doesn't support this)
- Update to latest Substrate metadata
## 9.6.2 Oct 30, 2022
Changes:
- Adjust historic `DispatchError` type for `statemint/statemine`
## 9.6.1 Oct 23, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
- Use `.?` operators in submittable class (Thanks to https://github.com/shunjizhan)
Changes:
- Cater for latest Substrate `DispatchError` (additional preimage statuses)
- Adjust `api.derive.democracy.*` to return `imageHash` as `HexString` (as applicable, supports current-gen preimages)
- Adjust `api.derive.preimages.*` to retrieve via `democracy` or `preimage` pallets
- Ensure `apiAt.<section>.<method>.key(...)` passes through the correct arguments
- Apply fallback for Weight downgrades (V2 >> V1 detection)
- Update to latest Substrate metadata
- Polkadot 9291 & Westend 9300 upgrade blocks
## 9.5.2 Oct 16, 2022
Changes:
- Add `ParachainHost` version 3 runtime calls
## 9.5.1 Oct 8, 2022
- **Important** While the API witll detect and decorate the weight type based on V1 or V2, the default `Weight` type (used in runtime calls and RPCs) has not been swapped from the old `u64` variant. This means that on new chains using `WeightV2`, the TS decorated type will still reflect the old version.
Changes:
- Adjust handling of `Weight` type for V2 structures
- Add alis definitions for `Weight{V1, V2}` (used for type overrides)
- Cater for weight v2 (along with v1 pass-through) extrinsics in `api-contract`
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.4.3 Oct 2, 2022
Contributed:
- Allow for new `ink_primitives` types (Thanks to https://github.com/statictype)
- Fix contracts runtime `instantiate` call params (Thanks to https://github.com/statictype)
Changes:
- Align staking derive redeemableSum with Rust source (`currentEra` vs `activeEra` usage)
- Add `@deprecated` flag to RPC interface generation (`contracts_*` & `state_get{Pairs/Keys}`)
- Polkadot 9280/9281, Kusama 9291 upgrade blocks
## 9.4.2 Sep 24, 2022
Contributed:
- Allow for re-subscriptions on `ScProvider` (Thanks to https://github.com/wirednkod)
Changes:
- Align derives to cater for latest (& previous) Substrate interfaces
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.4.1 Sep 17, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
Changes:
- Cater for v1.5 Weight JSON representation (via RPC)
- Polkadot 9270, Kusama 9280 & Westend 9290 upgrade blocks
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.3.3 Sep 6, 2022
Contributed:
- Ensure JS reserved words are aliassed in types (Thanks to https://github.com/dqbd)
Changes:
- Fix and adjust tests for `AccountId{32, 33}`
## 9.3.2 Sep 4, 2022
Changes:
- Cater for v1.5 Weight types (structure to inner value)
- Westend 9280 & Kusama 9271 upgrade blocks
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.3.1 Sep 3, 2022
Changes:
- Support for ink! v4 metadata
- Adjust pool runtime call `pendingRewards` return type
- Support for `AccountId33` (raw/compressed 33-byte ecdsa)
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.2.4 Aug 27, 2022
Changes:
- Remove extra error logging in internal rpc-core Observable
- Allow for embebbed `Enum` in `Struct` typegen (no `lookupName`)
## 9.2.3 Aug 21, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
Changes:
- Adjust `StakingLedger` with fallback for Kusama 1050 (2 different structures on-chain)
- Remove `TryRuntime` state call definitions (only off-chain usage)
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.2.2 Aug 16, 2022
Changes:
+35 -5
View File
@@ -1,15 +1,19 @@
3192 Jaco 9.2.2 (#5166)
3512 Jaco Bump deps (#5785)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
43 Tarik Gul 11.0.3 (#5873)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
19 Xiliang Chen no warm for unknown signed extensions (#5601)
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
11 Ian He HttpProvider support clone() (#3949)
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
8 Nikos Kontakis Bump substrate connect to 0.7.10; Fixes #5120 (#5123)
6 Andreea Eftene Update check for contract instantiation (#5699)
5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
5 Julien Eluard General WsProvider extensibility improvements (#5467)
5 Matias Volpe Bump @substrate/connect to 0.8.10 (#5863)
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
4 Alex Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009)
@@ -20,24 +24,31 @@
3 André Silva add support for ValidationCodeHash (#3640)
3 Antoine Estienne Adapted to display moonbeam author (#3108)
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
3 Branislav Kontur Added FungiblesApi version 2 (#5687)
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
3 hamidra add support for n key entries for NMaps (#3886)
3 Hamza Tokuchi more typos (#2532)
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
3 Julien Eluard Fixed typos about module balances (#1402)
3 KarishmaBothara Backward compatibility thing (#3511)
3 Miguel Hervas Adding RT4 Types (#3007)
3 Shawn Tabrizi Add `isReadyOrError` when connecting to API (#2577)
3 YJ feat: Vote interface as U8a (#1061)
2 Alberto Nicolas Penayo updated remaining assetId for ChargeAssetTxPayment (#5763)
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
2 Branan Riley Add proxy type for Centrifuge (#3940)
2 Caio Add `Range` and `RangeInclusive` types (#3791)
2 Francisco Gamundi Add chainIsEthereum prop to Registry interface (#5761)
2 HackFisher Update maxExtrinsic definition (#4703)
2 Jakub Pánik All heads subscription (#1899)
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Javier Viola add muln(2), as was in the old code (#5829)
2 Jeeyong Um Alias for Noir types (#5678)
2 Jegor Sidorenko Use Box<XcmV3MultiLocation> instead of MultiAssetId (#5700)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
2 MOZGIII Follow-up fix after #4665 (#4666)
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
2 peetzweg/ feat: ink! v5 (#5791)
2 rob thijssen nimbus author mapping correction (#5590)
2 sung wu Update tx.md (#2485)
2 Veliko Abi constructor takes different parameters (#3347)
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
@@ -45,7 +56,7 @@
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
1 Andreea Eftene Add storage deposit support (#4304)
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
1 chriswmercer little readme tweak (#279)
@@ -55,11 +66,15 @@
1 Daniel Maricic Fixed typo in README (#2402)
1 Daniel Savu fix: Generate custom type definitions (#4224)
1 David Don't log full error (#2952)
1 David Duong Avoid reserved words during named enum fields augmentation (#5203)
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
1 djuanito.eth Update fees to current constants (#2320)
1 Dominique fix: add optional chaining operator in `toHuman` (#5825)
1 Drew Stone Update evm definitions to include vicinity (#2279)
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
1 Ermal Kaleci fix cache key (rpc-provider) (#5745)
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
1 Florian Franzen metadataMd: use endpoint for rpc and runtime details too (#5628)
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
1 Gérard Dethier Fix LRUCache memory leak. (#4520)
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
@@ -72,11 +87,15 @@
1 Joey don't throw error at `onSocketClose` (#4363)
1 Jordan Allow typegen for custom RPCs (#2876)
1 JQQQ Allow rpc expose definition/ metadata (#3488)
1 Jun Jiang Update contract' gas to Weight type (#5324)
1 Ken Vu Expose `blockNumber` via filterEvents function (#5394)
1 Kian Paimani Update definitions.ts (#2514)
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
1 Lae Make sure awaiting on an api object won't stuck forever on error (#1763)
1 Lauro Gripa Fix multi call of `defenderVotes` and `isDefenderVoter` flag in `society.members` derivation (#5834)
1 Lezek123 BTreeSet and BTreeMap - encoding and serialization fixes (#3789)
1 Lovesh Harchandani Fix name of "getBlock" in package "api-derive" and export it in "index.ts" (#2857)
1 Marc Fornós add beefy compact signed commitment definition (#5781)
1 Mario Neises fix usage with typescript (#405)
1 Mario Pino Add PolkaStats to API users (#1593)
1 Mark Robert Henderson Update warnings.ts to have the latest URLs (#2720)
@@ -90,18 +109,29 @@
1 Paul M Fox Basic BTreeMaps codec support (#1474)
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
1 Pierre Krieger Update substrate/connect to 0.7.6 (#4940)
1 polymath-eric Allow unset external signer (#5649)
1 Qinxuan Chen Add fp_account::AccountId20 mapping (#5551)
1 qiuhao update DeriveCustom type (#2581)
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
1 Raphael Flechtner fix: typegen disconnect ws on success (#4901)
1 Robert Gabriel Jakabosky Fix sorting of `Option` values and error on duplicates from BTreeSet/BTreeMap. (#5731)
1 Robert Hambrock update MMR API (#5479)
1 Rocco Musolino remove broken link (#2671)
1 sander2 fix: type generation for nested tuples (#5395)
1 satellitex Add BTreeSet<V> Codec (#1639)
1 satellitex Add traits replace rules. for invalid cases `::<type>` and `<type>::`. (#885)
1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
1 Sean Young Solang requires u256 and i256 types (#2752)
1 Serban Iorga Fix `beefy::subscribeJustifications()` return type (#5740)
1 serge make WS provider timeout configurable (#4758)
1 Sergei Pepyakin INK! -> ink! (#1347)
1 Shunji Zhan small polish (#5276)
1 Snoppy chore: fix typos (#5835)
1 Stephen Shelton Add transaction-payment runtime API V3 (#5430)
1 Tim B added EthRTApiV5 ifaces (#5680)
1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 xiaolou86 Fix typos (#5747)
1 yjh fix MetadataVersioned.asV12 (#2983)
1 Yuri fixes #3693 Fix uniques return types (#3694)
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
+2 -9
View File
@@ -1,15 +1,8 @@
[![polkadotjs](https://img.shields.io/badge/polkadot-js-orange?style=flat-square)](https://polkadot.js.org)
![license](https://img.shields.io/badge/License-Apache%202.0-blue?logo=apache&style=flat-square)
[![npm](https://img.shields.io/npm/v/@polkadot/api?logo=npm&style=flat-square)](https://www.npmjs.com/package/@polkadot/api)
[![beta](https://img.shields.io/npm/v/@polkadot/api/beta?label=beta&logo=npm&&style=flat-square)](https://www.npmjs.com/package/@polkadot/api)
[![maintainability](https://img.shields.io/codeclimate/maintainability-percentage/polkadot-js/api?logo=code-climate&style=flat-square)](https://codeclimate.com/github/polkadot-js/api)
[![coverage](https://img.shields.io/codeclimate/coverage/polkadot-js/api?logo=code-climate&style=flat-square)](https://codeclimate.com/github/polkadot-js/api)
# @polkadot/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/docs/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 interfaces and their use, visit the [documentation portal](https://polkadot.js.org/docs/api/).
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) guides when changing versions.
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) when changing versions.
## tutorials
-201
View File
@@ -1,201 +0,0 @@
# Upgrade guide
This is an upgrade guide for users of the API. It does not attempt to detail each version (the [CHANGELOG](CHANGELOG.md) has all the changes between versions), but rather tries to explain the rationale behind major breaking changes and how users of the API should handle this.
While we try to keep the user-facing interfaces as stable as possible, sometimes you just need to make additions to move forward and improve things down the road, as painful as they may be. Like you, we are also users of the API, and eat our own dog food - and as such, feel any pains introduced first.
## 0.97.1 (and newer)
The 0.97 series lays the groundwork to allow type registration to be ties to a specific chain and a specific Api instance. In the past, 2 Api instances in the same process would share types, which mean that you could not connect to 2 independent chains with different types. This is very problematic for Polkadot chains, where the idea is to connect to multiple chains.
When using the Api, a new `Registry` will be created on using `new Api(...)` or `Api.create(...)` and this will be transparently passed when creating types. In the cases where you create type instances explicitly or create type classes for injection, you would need to make adjustments.
### Type classes
In a number of instances, developers are creating classes and making these available for interacting with their chains. For instance, an example of a custom type could be -
```js
import { Struct, Text, u32 } from '@polkadot/types';
export class Preferences extends Struct {
constructor (value?: ahy) {
super({
name: Text,
id: u32
}, value);
}
...
}
```
In the current iteration, the underlying `@polkadot/types` bases structures now require a `Registry` to be passed as the first parameter. This means that the above signature would be adjusted to -
```js
// the next import is only required for TypeScript
import { Registry } from '@polkadot/types/types';
import { Struct, Text, u32 } from '@polkadot/types';
export class Preferences extends Struct {
constructor (registry: Registry, value?: ahy) {
super(registry, {
name: Text,
id: u32
}, value);
}
...
}
```
Where the type is used or returned from the API, the `Registry` will be automatically passed to class creation.
### createType
Previously, when creating a type instance such as `BlockNumber`, you would do `api.createType('BlockNumber', <initValue>)`, this is unchanged. In the cases where you directly import from `@polkadot/types`, the following pattern is required -
```js
import { createType } from '@polkadot/types';
...
const blockNumber = createType(api.registry, 'BlockNumber', 12345);
```
In some cases, you would want to explicitly pass a `Registry` interface to the API, instead of relying on it explicitly. This is generally applicable in the cases where you want to use the `createType` independently from the API -
```js
import { ApiPromise } from '@polkadot/api';
import { TypeRegistry, createType } from '@polkadot/types';
...
const registry = new TypeRegistry();
const blockNumber = createType(registry, 'BlockNumber', 12345);
const api = await ApiPromise.create({ registry });
```
### Extrinsic metadata
In some applications, the undocumented `findFunction` has been used to determine the Api has the metadata for a specific extrinsic. The has been exposed on top of `GenericCall`, and it typically used in applications such as signers. Along with the compulsory registry, the above functions have been moved to the `Registry` itself, so if you previously had -
```js
const { meta, method, section } = GenericCall.findFunction(extrinsic.callIndex);
```
You need to change it to -
```js
const { meta, method, section } = registry.findMetaCall(extrinsic.callIndex);
```
## 0.90.1 (and newer), from 0.81.1 (and older)
The 0.90.1 release caters for the [Kusama network](https://kusama.network/) and pulls in all the changes to support [Substrate 2.x](https://github.com/paritytech/substrate), all while maintaining backwards compatibility to allow operation on networks such as [Polkadot's Alexander](https://polkadot.network/).
To support the network and the new transaction formats, a number of changes were made to how extrinsics are handled and signed. In addition, as support for ongoing work where type definitions are to be supplied by the actual node metadata, the foundation has been laid to move to type definitions as opposed to classes for runtime types.
### Modules
The first thing to be aware of is breakages when connecting to any new network, here older networks such as Alex are unaffected - the node metadata defines exactly what is available to the chain, so endpoints that worked yesterday still works today.
There will no doubt be breakages in using calls to now non-existent endpoints (as populated by the metadata) if you are upgrading your nodes to Substrate 2.x. Substrate 2.x has had a number of internal changes, where new modules and features are introduced (such as `babe` and `technicalCommittee`), some modules have been renamed (such as `contract` -> `contracts`) and modules such as `session` has been reworked to a large degree.
To cater for both 1.x and 2.x support, the [@polkadot/api-derive](packages/api-derive) endpoints, do feature detection for the node type and should continue working as-is. Additionally, a number of new derives have been added, specifically around elections.
### Type renames
To better align with the actual types from the metadata, and avoid (too much) context switching, some types from the `@polkadot/types` have been renamed. These include -
- `Vector` -> `Vec`
- `U{8|16|32|64|128|256}` have been removed, only the lowercase version of these remain, i.e. `u32`.
### Type usage
The [@polkadot/api](packages/api) has always handled the conversion of types for parameters when making calls or queries. For example, when making a transfer to `BOB` (address), any of the following is valid -
- `api.tx.balances.transfer(BOB, 12345)` - value specified as a number
- `api.tx.balances.transfer(BOB, '12345')` - value specified as a string
- `api.tx.balances.transfer(BOB, '0x3039')` - value specified as a hex
- `api.tx.balances.transfer(BOB, new BN(12345))` - value specified as a [BN](https://github.com/indutny/bn.js/)
Internally the API will take the input and convert the value into a `Balance`, serialize it using the SCALE codec and transfer it to the node. In some cases users would construct the `Balance` type manually, by importing the class and calling `new` on it. This last approach has now been removed, and where classes are still available (limited reach), discouraged.
First the rationale behind this - in all cases Substrate is very flexible, so while Polkadot (and the Substrate base), define `type Balance = u128`, this can be different between chains. (This also applies to the majority of built-in supported types). As such, type construction should be done via the actual registered types.
```js
// this is applicable everywhere, import the type creator, using the registry
import { createType } from '@polkadot/types';
// construct the Balance, of type Balance (type is inferred and available with TS)
const value = createType('Balance', 12345);
// use value here as you normally would
...
```
The impact of this will be noticeable, if you have been importing the old-style type classes from `@polkadot/types`, those imports are not available anymore. For creation, just pass everything through the `createType`.
If a TypeScript user, you can find the updated type (it is a type definition only, not a class), under `@polkadot/types/interfaces`. To do type casting, using interfaces -
```js
// import the TypeScript runtime interfaces we wish to use
import { Balance, Hash } from '@polkadot/types/interfaces';
// import the primitives we wish to use
import { createType, Compact, Vec, u32 } from '@polkadot/types';
// define an interface we want to use inside our code
interface MyProps {
balance: Compact<Balance>;
changes: Vec<Hash>;
counter?: u32;
}
// assign something to this structure
const props = {
balance: createType('Compact<Balance>', 12345),
changes: createType('Vec<Hash>', []) // empty for now
};
```
### Type definitions
One of the major pain points in working with a custom Substrate node is the definition of types to cater for chains. There are 2 approaches: defining types via a JSON format or extending your own classes in TypeScript (or JS) and injecting these. For the latter category, there are some impacts in the way you define these.
If using JSON definitions, nothing changes, your types are still defined as -
```json
{
"MyStruct": {
"balance": "Compact<Balance>",
"values": "Vec<AccountId>",
"counter": "u32"
}
}
```
For the definition of any structures using the Substrate specific types as classes, some adjustments are needed. Since the base modules types are now not available in classes, however it is needed for definitions, the following approach is encouraged -
```js
// import the ClassOf, it works the same as `createType` (along with type detection)
// and acts as a replacement for the direct import and use of specific classes
import { ClassOf, Struct, u32 } from '@polkadot/types';
export class MyStruct extends Struct {
constructor (value?: any) {
super({
balance: ClassOf('Compact<Balance>'),
values: ClassOf('Vec<AccountId>'),
counter: u32
}, value);
}
}
```
Internally the [@polkadot/types](packages/types) package now only defines classes where there are specific encoding logic applied. For all other types, the definitions are done via a JSON-like format and then the TypeScript definitions are generated from these. (In a world where nodes inject types and the type definitions are not needed, this functionality will be useful to allow TS developers to auto-generate type definitions based on what the node defines.)
### Signing transactions (Signer interface)
For users of the API signer interfaces (such as extensions and mobile signers), the interfaces have undergone some changes to cater for the extrinsic v2 format as defined by Substrate. If you are only supporting current chains (e.g. Alexander), no changes are required, however the old `sign` interface does not support chains such as Kusama, so all users are encouraged to upgrade to the new `signPayload` interface.
This has already been implemented in both the [polkadot-js extension](https://github.com/polkadot-js/extension/blob/5f22f67d558655c605eb6f6beecef6826ed6c159/packages/extension/src/page/Signer.ts#L16v) as well as the [simple single signer](https://github.com/polkadot-js/api/blob/d56905d1b566be6f17eb570ac01448378fc91b67/packages/api/test/util/SingleAccountSigner.ts#L37).
-4
View File
@@ -1,4 +0,0 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs');
+23
View File
@@ -0,0 +1,23 @@
// Copyright 2017-2024 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import baseConfig from '@polkadot/dev/config/eslint';
export default [
{
ignores: [
// see the tsconfig.eslint.json for explanation
'packages/api-augment/src/kusama/*.ts',
'packages/api-augment/src/polkadot/*.ts'
]
},
...baseConfig,
{
rules: {
// add override for any (a metric ton of them, initial conversion)
'@typescript-eslint/no-explicit-any': 'off',
// we generally use this in isFunction, not via calling
'@typescript-eslint/unbound-method': 'off'
}
}
];
-19
View File
@@ -1,19 +0,0 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
module.exports = {
...config,
moduleNameMapper: {
'@polkadot/api-(augment|base|contract|derive)(.*)$': '<rootDir>/packages/api-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
testTimeout: 30000
};
+17 -16
View File
@@ -1,9 +1,12 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"engines": {
"node": ">=18.14"
},
"homepage": "https://github.com/polkadot-js/api#readme",
"license": "Apache-2.0",
"packageManager": "yarn@3.2.0",
"packageManager": "yarn@4.1.1",
"private": true,
"repository": {
"type": "git",
@@ -11,39 +14,37 @@
},
"sideEffects": false,
"type": "module",
"version": "9.2.2",
"version": "11.0.3",
"versions": {
"git": "9.2.2",
"npm": "9.2.2"
"git": "11.0.3",
"npm": "11.0.3"
},
"workspaces": [
"packages/*"
],
"scripts": {
"build": "yarn build:interfaces && polkadot-dev-build-ts",
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)",
"build:interfaces": "polkadot-types-internal-interfaces",
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
"build:before": "polkadot-dev-copy-dir --cd packages/typegen scripts build",
"build:interfaces": "node --loader @polkadot/dev-ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs",
"build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14",
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
"build:upgrades": "polkadot-dev-run-test upgrades/e2e",
"chain:info": "polkadot-types-chain-info",
"clean": "polkadot-dev-clean-build",
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
"lint": "polkadot-dev-run-lint",
"postinstall": "polkadot-dev-yarn-only",
"test": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --coverage --forceExit --runInBand --testPathIgnorePatterns e2e",
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
"test": "polkadot-dev-run-test --env node ^e2e",
"test:node": "polkadot-dev-run-test --env node ^e2e",
"test:one": "polkadot-dev-run-test --env node"
},
"devDependencies": {
"@babel/core": "^7.18.10",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.18.9",
"@polkadot/dev": "^0.67.97",
"@polkadot/dev": "^0.78.9",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^28.1.7",
"copyfiles": "^2.4.1"
"@types/node": "^20.11.6"
},
"resolutions": {
"typescript": "^4.7.4"
"typescript": "^5.3.3"
}
}
-201
View File
@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+11 -16
View File
@@ -1,14 +1,12 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "API generated augmentation",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-augment#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/api-augment",
"repository": {
"directory": "packages/api-augment",
@@ -16,22 +14,19 @@
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
"./packageDetect.js",
"./packageDetect.cjs"
],
"type": "module",
"version": "9.2.2",
"version": "11.0.3",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/api-base": "9.2.2",
"@polkadot/rpc-augment": "9.2.2",
"@polkadot/types": "9.2.2",
"@polkadot/types-augment": "9.2.2",
"@polkadot/types-codec": "9.2.2",
"@polkadot/util": "^10.1.4"
},
"devDependencies": {
"@polkadot/types-support": "9.2.2"
"@polkadot/api-base": "11.0.3",
"@polkadot/rpc-augment": "11.0.3",
"@polkadot/types": "11.0.3",
"@polkadot/types-augment": "11.0.3",
"@polkadot/types-codec": "11.0.3",
"@polkadot/util": "^12.6.2",
"tslib": "^2.6.2"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// for the API, we decorate not only the endpoints, but all types
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './substrate';
import './substrate/index.js';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
-8
View File
@@ -1,8 +0,0 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
export default [baseInfo, typesInfo, codecInfo];
-11
View File
@@ -1,11 +0,0 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './packageDetect.js';
export * from './bundle';
export * from './bundle.js';
+407 -253
View File
@@ -6,10 +6,10 @@
import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec, ITuple } from '@polkadot/types-codec/types';
import type { Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
@@ -64,6 +52,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -71,9 +63,20 @@ declare module '@polkadot/api-base/types/consts' {
};
balances: {
/**
* The minimum amount required to keep an account open.
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
*
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
* In case you have multiple sources of provider references, you may also get unexpected
* behaviour if you set this to zero.
*
* Bottom line: Do yourself a favour and make it at least one!
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of individual freeze locks that can exist on an account at any time.
**/
maxFreezes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
@@ -88,6 +91,29 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
beefy: {
/**
* The maximum number of authorities that can be added.
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: {
/**
* The amount held on deposit for placing a bounty proposal.
@@ -156,71 +182,14 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
crowdloan: {
convictionVoting: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
* least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
* The maximum number of concurrent votes an account may have.
*
* 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: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
* Also used to compute weight, an overly large value can lead to extrinsics with large
* weight estimation: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
@@ -229,9 +198,35 @@ declare module '@polkadot/api-base/types/consts' {
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
* Generic const
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
[key: string]: Codec;
};
coretime: {
/**
* The ParaId of the broker system parachain.
**/
brokerId: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
crowdloan: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be
* at least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be
* `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -244,20 +239,16 @@ declare module '@polkadot/api-base/types/consts' {
**/
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" in the Unsigned phase.
* The maximum number of winners that can be elected by this `ElectionProvider`
* implementation.
*
* Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
**/
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
maxWinners: u32 & AugmentedConst<ApiType>;
minerMaxLength: u32 & AugmentedConst<ApiType>;
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
minerMaxWinners: u32 & AugmentedConst<ApiType>;
/**
* The priority of the unsigned transaction submitted in the unsigned-phase
**/
@@ -269,10 +260,6 @@ declare module '@polkadot/api-base/types/consts' {
* to submit the worker's solution.
**/
offchainRepeat: u32 & AugmentedConst<ApiType>;
/**
* Base deposit for a signed solution.
**/
signedDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Per-byte deposit for a signed solution.
**/
@@ -302,7 +289,7 @@ declare module '@polkadot/api-base/types/consts' {
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
@@ -320,50 +307,41 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
gilt: {
fastUnstake: {
/**
* Portion of the queue which is free from ordering and just a FIFO.
*
* Must be no greater than `MaxQueueLen`.
* Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
* the costs of resources on unsuccessful unstake.
**/
fifoQueueLen: u32 & AugmentedConst<ApiType>;
deposit: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between consecutive attempts to issue more gilts in an effort to
* get to the target amount to be frozen.
*
* A larger value results in fewer storage hits each block, but a slower period to get to
* the target.
* Generic const
**/
intakePeriod: u32 & AugmentedConst<ApiType>;
[key: string]: Codec;
};
fellowshipReferenda: {
/**
* The maximum amount of bids that can be turned into issued gilts each block. A larger
* value here means less of the block available for transactions should there be a glut of
* bids to make into gilts to reach the target.
* Quantization level for the referendum wakeup scheduler. A higher number will result in
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
* automatic referendum status changes. Explicit servicing instructions are unaffected.
**/
maxIntakeBids: u32 & AugmentedConst<ApiType>;
alarmInterval: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of items that may be in each duration queue.
* Maximum size of the referendum queue for a single track.
**/
maxQueueLen: u32 & AugmentedConst<ApiType>;
maxQueued: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount of funds that may be offered to freeze for a gilt. Note that this
* does not actually limit the amount which may be frozen in a gilt since gilts may be
* split up in order to satisfy the desired amount of funds under gilts.
*
* It should be at least big enough to ensure that there is no possible storage spam attack
* or queue-filling attack.
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minFreeze: u128 & AugmentedConst<ApiType>;
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* The base period for the duration queues. This is the common multiple across all
* supported freezing durations that can be bid upon.
* Information concerning the different referendum tracks.
**/
period: u32 & AugmentedConst<ApiType>;
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
/**
* Number of duration queues in total. This sets the maximum duration supported, which is
* this value multiplied by `Period`.
* The number of blocks after submission that a referendum must begin being decided by.
* Once this passes, then anyone may cancel the referendum.
**/
queueCount: u32 & AugmentedConst<ApiType>;
undecidingTimeout: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -374,6 +352,19 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -381,18 +372,13 @@ declare module '@polkadot/api-base/types/consts' {
};
identity: {
/**
* The amount held on deposit for a registered identity
* The amount held on deposit for a registered identity.
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
* The amount held on deposit per encoded byte for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
byteDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
@@ -402,6 +388,18 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a suffix.
**/
maxSuffixLength: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a username, including its suffix and any system-added delimiters.
**/
maxUsernameLength: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks within which a username grant must be accepted.
**/
pendingUsernameExpiration: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
@@ -413,19 +411,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
*
* This is exposed so that it can be tuned for particular runtime, when
* multiple pallets send unsigned transactions.
**/
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
@@ -436,6 +421,34 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
messageQueue: {
/**
* The size of the page; this implies the maximum message size which can be sent.
*
* A good value depends on the expected message sizes, their weights, the weight that is
* available for processing them and the maximal needed message size. The maximal message
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
**/
heapSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
* can happen. Once there are more stale pages than this, then historical pages may be
* dropped, even if they contain unprocessed overweight messages.
**/
maxStale: u32 & AugmentedConst<ApiType>;
/**
* The amount of weight (if any) which should be provided to the message queue for
* servicing enqueued items.
*
* This may be legitimately `None` in the case that you will call
* `ServiceQueues::service_queues` manually.
**/
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
@@ -455,7 +468,100 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The maximum amount of signatories allowed in the multisig.
**/
maxSignatories: u16 & AugmentedConst<ApiType>;
maxSignatories: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
nis: {
/**
* The base period for the duration queues. This is the common multiple across all
* supported freezing durations that can be bid upon.
**/
basePeriod: u32 & AugmentedConst<ApiType>;
/**
* Portion of the queue which is free from ordering and just a FIFO.
*
* Must be no greater than `MaxQueueLen`.
**/
fifoQueueLen: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks between consecutive attempts to dequeue bids and create receipts.
*
* A larger value results in fewer storage hits each block, but a slower period to get to
* the target.
**/
intakePeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of bids that can consolidated into receipts in a single intake. A
* larger value here means less of the block available for transactions should there be a
* glut of bids.
**/
maxIntakeWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* Maximum number of items that may be in each duration queue.
*
* Must be larger than zero.
**/
maxQueueLen: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount of funds that may be placed in a bid. Note that this
* does not actually limit the amount which may be represented in a receipt since bids may
* be split up by the system.
*
* It should be at least big enough to ensure that there is no possible storage spam attack
* or queue-filling attack.
**/
minBid: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of funds which may intentionally be left remaining under a single
* receipt.
**/
minReceipt: Perquintill & AugmentedConst<ApiType>;
/**
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Number of duration queues in total. This sets the maximum duration supported, which is
* this value multiplied by `Period`.
**/
queueCount: u32 & AugmentedConst<ApiType>;
/**
* The maximum proportion which may be thawed and the period over which it is reset.
**/
thawThrottle: ITuple<[Perquintill, u32]> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
nisCounterpartBalances: {
/**
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
*
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
* In case you have multiple sources of provider references, you may also get unexpected
* behaviour if you set this to zero.
*
* Bottom line: Do yourself a favour and make it at least one!
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of individual freeze locks that can exist on an account at any time.
**/
maxFreezes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -477,6 +583,10 @@ declare module '@polkadot/api-base/types/consts' {
* Such a scenario would also be the equivalent of the pool being 90% slashed.
**/
maxPointsToBalance: u8 & AugmentedConst<ApiType>;
/**
* The maximum number of simultaneous unbonding chunks that can exist per member.
**/
maxUnbonding: u32 & AugmentedConst<ApiType>;
/**
* The nomination pool's pallet id.
**/
@@ -486,47 +596,18 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
onDemandAssignmentProvider: {
/**
* The default value for the spot traffic multiplier.
**/
trafficDefaultValue: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -615,13 +696,42 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
referenda: {
/**
* Quantization level for the referendum wakeup scheduler. A higher number will result in
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
* automatic referendum status changes. Explicit servicing instructions are unaffected.
**/
alarmInterval: u32 & AugmentedConst<ApiType>;
/**
* Maximum size of the referendum queue for a single track.
**/
maxQueued: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* Information concerning the different referendum tracks.
**/
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
/**
* The number of blocks after submission that a referendum must begin being decided by.
* Once this passes, then anyone may cancel the referendum.
**/
undecidingTimeout: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
registrar: {
/**
* The deposit to be paid per byte stored on chain.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The deposit to be paid to run a parathread.
* The deposit to be paid to run a on-demand parachain.
* This should include the cost for storing the genesis head and validation code.
**/
paraDeposit: u128 & AugmentedConst<ApiType>;
@@ -632,13 +742,15 @@ declare module '@polkadot/api-base/types/consts' {
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
* The maximum weight that may be scheduled per block for any dispatchables.
**/
maximumWeight: u64 & AugmentedConst<ApiType>;
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
*
* NOTE:
* + Dependent pallets' benchmarks might require a higher limit for the setting. Set a
* higher limit under `runtime-benchmarks` feature.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
@@ -661,27 +773,31 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
society: {
/**
* The minimum amount of a deposit required for a bid to be made.
**/
candidateDeposit: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between membership challenges.
**/
challengePeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates that we accept per round.
* The number of blocks on which new candidates can claim their membership and be the
* named head.
**/
maxCandidateIntake: u32 & AugmentedConst<ApiType>;
claimPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of strikes before a member gets funds slashed.
**/
graceStrikes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of bids at once.
**/
maxBids: u32 & AugmentedConst<ApiType>;
/**
* The maximum duration of the payout lock.
**/
maxLockDuration: u32 & AugmentedConst<ApiType>;
/**
* The number of times a member may vote the wrong way (or not at all, when they are a
* skeptic) before they become suspended.
* The maximum number of payouts a member may have waiting unclaimed.
**/
maxStrikes: u32 & AugmentedConst<ApiType>;
maxPayouts: u32 & AugmentedConst<ApiType>;
/**
* The societies's pallet id
**/
@@ -691,14 +807,10 @@ declare module '@polkadot/api-base/types/consts' {
**/
periodSpend: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between candidate/membership rotation periods.
* The number of blocks on which new candidates should be voted on. Together with
* `ClaimPeriod`, this sums to the number of blocks between candidate intake periods.
**/
rotationPeriod: u32 & AugmentedConst<ApiType>;
/**
* The amount of the unpaid reward that gets deducted in the case that either a skeptic
* doesn't vote or someone votes in the wrong way.
**/
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -710,19 +822,53 @@ declare module '@polkadot/api-base/types/consts' {
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
* Number of eras to keep in history.
*
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
* claim their reward. This used to limit the i/o cost for the nominator payout.
* Following information is kept for eras in `[current_era -
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
* `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`, `ErasStakersPaged`,
* `ErasStakersOverview`.
*
* Must be more than the number of eras delayed by session.
* I.e. active era must always be in history. I.e. `active_era >
* current_era - history_depth` must be guaranteed.
*
* If migrating an existing pallet from storage value to config value,
* this should be set to same value or greater as in storage.
*
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
* item `StakingLedger.legacy_claimed_rewards`. Setting this value lower than
* the existing value can lead to inconsistencies in the
* `StakingLedger` and will need to be handled properly in a migration.
* The test `reducing_history_depth_abrupt` shows this effect.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
historyDepth: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
* The maximum size of each `T::ExposurePage`.
*
* An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize`
* nominators.
*
* For older non-paged exposure, a reward payout was restricted to the top
* `MaxExposurePageSize` nominators. This is to limit the i/o cost for the
* nominator payout.
*
* Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce
* without handling it in a migration.
**/
maxExposurePageSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
* have. Effectively determines how many unique eras a staker may be
* unbonding in.
*
* Note: `MaxUnlockingChunks` is used as the upper bound for the
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
* lower than the existing value can lead to inconsistencies in the
* `StakingLedger` and will need to be handled properly in a runtime
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
* this effect.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/**
@@ -741,6 +887,36 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
stateTrieMigration: {
/**
* Maximal number of bytes that a key can have.
*
* FRAME itself does not limit the key length.
* The concrete value must therefore depend on your storage usage.
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
*
* Use the *state migration RPC* to retrieve the length of the longest key in your
* storage: <https://github.com/paritytech/substrate/issues/11642>
*
* The migration will halt with a `Halted` event if this value is too small.
* Since there is no real penalty from over-estimating, it is advised to use a large
* value. The default is 512 byte.
*
* Some key lengths for reference:
* - [`frame_support::storage::StorageValue`]: 32 byte
* - [`frame_support::storage::StorageMap`]: 64 byte
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
*
* For more info see
* <https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/>
**/
maxKeyLen: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
@@ -757,9 +933,9 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
* The designated SS58 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
@@ -777,10 +953,12 @@ declare module '@polkadot/api-base/types/consts' {
};
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.
* The minimum period between blocks.
*
* Be aware 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. For example, in the Aura pallet it will be double this
* period on default settings.
**/
minimumPeriod: u64 & AugmentedConst<ApiType>;
/**
@@ -788,40 +966,12 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: {
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
*
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
* This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later
* added to a tip component in regular `priority` calculations.
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
@@ -861,6 +1011,10 @@ declare module '@polkadot/api-base/types/consts' {
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* The period during which an approved treasury spend has to be claimed.
**/
payoutPeriod: u32 & AugmentedConst<ApiType>;
/**
* 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.
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment/kusama';
import type { PolkadotRuntimeParachainsUmpPalletEvent, XcmV2TraitsOutcome } from '@polkadot/types/lookup';
import { Metadata, TypeRegistry } from '@polkadot/types';
import metadataStatic from '@polkadot/types-support/metadata/static-kusama';
const registry = new TypeRegistry();
const metadata = new Metadata(registry, metadataStatic);
registry.setMetadata(metadata);
describe('correct types', (): void => {
it('correctly creates XcmV2TraitsOutcome', (): void => {
const test = registry.createType<XcmV2TraitsOutcome>('XcmV2TraitsOutcome', {
Incomplete: [3_000_000_000, 'BadOrigin']
});
expect(test.toHuman()).toEqual({
Incomplete: [
'3,000,000,000',
'BadOrigin'
]
});
expect(test.isIncomplete).toEqual(true);
expect(test.asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
it('correctly creates PolkadotRuntimeParachainsUmpPalletEvent', (): void => {
const test = registry.createType<PolkadotRuntimeParachainsUmpPalletEvent>('PolkadotRuntimeParachainsUmpPalletEvent', '0x02112233445566778811223344556677881122334455667788112233445566778801005ed0b20000000006');
expect(test.asExecutedUpward[1].asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
});
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './registry';
import './runtime';
import './tx';
import '../base.js';
import './consts.js';
import './errors.js';
import './events.js';
import './query.js';
import './registry.js';
import './runtime.js';
import './tx.js';
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
+166 -28
View File
@@ -6,22 +6,24 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { Bytes, Null, Option, Result, U64, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
import type { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { ApprovalVotingParams, AsyncBackingParams, BackingState, CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeProof, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, NodeFeatures, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PendingSlashes, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { ValidatorIndex } from '@polkadot/types/interfaces/staking';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
@@ -85,8 +87,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x49eaaf1b548a0cb0/1 */
/** 0x49eaaf1b548a0cb0/3 */
beefyApi: {
/**
* Return the block number where BEEFY consensus is enabled/started
**/
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
/**
* Generates a proof of key ownership for the given authority in the given set.
**/
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Submits an unsigned extrinsic to report an equivocation.
**/
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Return the current active BEEFY validator set
**/
@@ -96,6 +110,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x2a5e924655399e60/1 */
beefyMmrApi: {
/**
* Return the currently active BEEFY authority set proof.
**/
authoritySetProof: AugmentedCall<ApiType, () => Observable<BeefyAuthoritySet>>;
/**
* Return the next/queued BEEFY authority set proof.
**/
nextAuthoritySetProof: AugmentedCall<ApiType, () => Observable<BeefyNextAuthoritySet>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x40fe3ad401f8959a/6 */
blockBuilder: {
/**
@@ -138,6 +167,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xfbc577b9d747efd6/1 */
genesisBuilder: {
/**
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
**/
buildConfig: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<ITuple<[]>, GenesisBuildErr>>>;
/**
* Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
**/
createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xed99c5acb25eedf5/3 */
grandpaApi: {
/**
@@ -161,47 +205,47 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x37e397fc7c91f5e4/1 */
/** 0x37e397fc7c91f5e4/2 */
metadata: {
/**
* Returns the metadata of a runtime
**/
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
/**
* Returns the metadata at a given version.
**/
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
/**
* Returns the supported metadata versions.
**/
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x91d5df18b0d2cf58/1 */
/** 0x91d5df18b0d2cf58/2 */
mmrApi: {
/**
* Generate MMR proof for a series of leaves under given indices.
* Generate MMR proof for the given block numbers.
**/
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
/**
* Generate MMR proof for a leaf under given index.
* Return the number of MMR blocks in the chain.
**/
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<U64, MmrError>>>;
/**
* Return the on-chain MMR root hash.
**/
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR for a batch of leaves.
**/
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against given root hash or a batch of leaves.
**/
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
verifyProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against given root hash.
**/
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Generic call
**/
@@ -209,10 +253,18 @@ declare module '@polkadot/api-base/types/calls' {
};
/** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: {
/**
* Returns the equivalent points of `new_funds` for a given pool.
**/
balanceToPoints: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, newFunds: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Returns the pending rewards for the given member.
**/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Returns the equivalent balance of `points` for a given pool.
**/
pointsToBalance: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, points: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
@@ -229,12 +281,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xaf2c0297a23e6d3d/2 */
/** 0xaf2c0297a23e6d3d/10 */
parachainHost: {
/**
* Approval voting configuration parameters
**/
approvalVotingParams: AugmentedCall<ApiType, () => Observable<ApprovalVotingParams>>;
/**
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
**/
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
/**
* Returns candidate's acceptance limitations for asynchronous backing for a relay parent
**/
asyncBackingParams: AugmentedCall<ApiType, () => Observable<AsyncBackingParams>>;
/**
* Yields information on all availability cores as relevant to the child block.
**/
@@ -251,6 +311,14 @@ declare module '@polkadot/api-base/types/calls' {
* Checks if the given validation outputs pass the acceptance criteria.
**/
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
/**
* Returns a list of all disabled validators at the given block
**/
disabledValidators: AugmentedCall<ApiType, () => Observable<ValidatorIndex>>;
/**
* Returns all onchain disputes.
**/
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, DisputeState]>>>>;
/**
* Get all the pending inbound messages in the downward message queue for a para.
**/
@@ -259,10 +327,26 @@ declare module '@polkadot/api-base/types/calls' {
* Get the contents of all channels addressed to the given recipient.
**/
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
/**
* Returns a merkle proof of a validator session key
**/
keyOwnershipProof: AugmentedCall<ApiType, (validatorId: ValidatorId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Get the minimum number of backing votes for a parachain candidate. This is a staging method! Do not use on production runtimes!
**/
minimumBackingVotes: AugmentedCall<ApiType, () => Observable<u32>>;
/**
* Get node features. This is a staging method! Do not use on production runtimes!
**/
nodeFeatures: AugmentedCall<ApiType, () => Observable<NodeFeatures>>;
/**
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
**/
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
/**
* Returns the state of parachain backing for a given para
**/
paraBackingState: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<BackingState>>>;
/**
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
**/
@@ -271,6 +355,10 @@ declare module '@polkadot/api-base/types/calls' {
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
**/
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
/**
* Returns execution parameters for the session.
**/
sessionExecutorParams: AugmentedCall<ApiType, (sessionIndex: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<ExecutorParams>>>;
/**
* Returns the session index expected at a child of the block.
**/
@@ -283,10 +371,18 @@ declare module '@polkadot/api-base/types/calls' {
* Submits a PVF pre-checking statement into the transaction pool.
**/
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
/**
* Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session
**/
submitReportDisputeLost: AugmentedCall<ApiType, (disputeProof: DisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnershipProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Returns a list of validators that lost a past session dispute and need to be slashed
**/
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, PendingSlashes]>>>>;
/**
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCode>>>;
/**
* Get the validation code from its hash.
**/
@@ -323,6 +419,17 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x18ef58a3b67ba770/1 */
stakingApi: {
/**
* Returns the nominations quota for a nominator with a given balance.
**/
nominationsQuota: AugmentedCall<ApiType, (balance: Balance | AnyNumber | Uint8Array) => Observable<u32>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xd2bc9897eed08f15/3 */
taggedTransactionQueue: {
/**
@@ -334,7 +441,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x37c8bb1350a9a2a8/1 */
/** 0x37c8bb1350a9a2a8/4 */
transactionPaymentApi: {
/**
* The transaction fee details
@@ -344,6 +451,37 @@ declare module '@polkadot/api-base/types/calls' {
* The transaction info
**/
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Query the output of the current LengthToFee given some input
**/
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Query the output of the current WeightToFee given some input
**/
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf3ff14d5ab527059/3 */
transactionPaymentCallApi: {
/**
* The call fee details
**/
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
/**
* The call info
**/
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Query the output of the current LengthToFee given some input
**/
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Query the output of the current WeightToFee given some input
**/
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+14
View File
@@ -0,0 +1,14 @@
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
// (packageInfo imports will be kept as-is, user-editable)
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, [baseInfo, codecInfo, typesInfo]);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.2.2' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '11.0.3' };
+266 -210
View File
@@ -6,10 +6,10 @@
import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec, ITuple } from '@polkadot/types-codec/types';
import type { Perbill, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
@@ -64,6 +52,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -71,9 +63,20 @@ declare module '@polkadot/api-base/types/consts' {
};
balances: {
/**
* The minimum amount required to keep an account open.
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
*
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
* In case you have multiple sources of provider references, you may also get unexpected
* behaviour if you set this to zero.
*
* Bottom line: Do yourself a favour and make it at least one!
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of individual freeze locks that can exist on an account at any time.
**/
maxFreezes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
@@ -88,6 +91,29 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
beefy: {
/**
* The maximum number of authorities that can be added.
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: {
/**
* The amount held on deposit for placing a bounty proposal.
@@ -156,71 +182,14 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
crowdloan: {
convictionVoting: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
* least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
* The maximum number of concurrent votes an account may have.
*
* 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: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
* Also used to compute weight, an overly large value can lead to extrinsics with large
* weight estimation: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
@@ -229,9 +198,25 @@ declare module '@polkadot/api-base/types/consts' {
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
* Generic const
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
[key: string]: Codec;
};
crowdloan: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be
* at least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be
* `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -244,20 +229,16 @@ declare module '@polkadot/api-base/types/consts' {
**/
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" in the Unsigned phase.
* The maximum number of winners that can be elected by this `ElectionProvider`
* implementation.
*
* Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
**/
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
maxWinners: u32 & AugmentedConst<ApiType>;
minerMaxLength: u32 & AugmentedConst<ApiType>;
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
minerMaxWinners: u32 & AugmentedConst<ApiType>;
/**
* The priority of the unsigned transaction submitted in the unsigned-phase
**/
@@ -269,10 +250,6 @@ declare module '@polkadot/api-base/types/consts' {
* to submit the worker's solution.
**/
offchainRepeat: u32 & AugmentedConst<ApiType>;
/**
* Base deposit for a signed solution.
**/
signedDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Per-byte deposit for a signed solution.
**/
@@ -302,7 +279,7 @@ declare module '@polkadot/api-base/types/consts' {
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
@@ -320,11 +297,35 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
fastUnstake: {
/**
* Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
* the costs of resources on unsuccessful unstake.
**/
deposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
grandpa: {
/**
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -332,18 +333,13 @@ declare module '@polkadot/api-base/types/consts' {
};
identity: {
/**
* The amount held on deposit for a registered identity
* The amount held on deposit for a registered identity.
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
* The amount held on deposit per encoded byte for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
byteDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
@@ -353,6 +349,18 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a suffix.
**/
maxSuffixLength: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a username, including its suffix and any system-added delimiters.
**/
maxUsernameLength: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks within which a username grant must be accepted.
**/
pendingUsernameExpiration: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
@@ -364,19 +372,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
*
* This is exposed so that it can be tuned for particular runtime, when
* multiple pallets send unsigned transactions.
**/
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
@@ -387,6 +382,34 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
messageQueue: {
/**
* The size of the page; this implies the maximum message size which can be sent.
*
* A good value depends on the expected message sizes, their weights, the weight that is
* available for processing them and the maximal needed message size. The maximal message
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
**/
heapSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
* can happen. Once there are more stale pages than this, then historical pages may be
* dropped, even if they contain unprocessed overweight messages.
**/
maxStale: u32 & AugmentedConst<ApiType>;
/**
* The amount of weight (if any) which should be provided to the message queue for
* servicing enqueued items.
*
* This may be legitimately `None` in the case that you will call
* `ServiceQueues::service_queues` manually.
**/
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
@@ -406,7 +429,36 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The maximum amount of signatories allowed in the multisig.
**/
maxSignatories: u16 & AugmentedConst<ApiType>;
maxSignatories: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
nominationPools: {
/**
* The maximum pool points-to-balance ratio that an `open` pool can have.
*
* This is important in the event slashing takes place and the pool's points-to-balance
* ratio becomes disproportional.
*
* Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations
* are a function of number of points, and by setting this value to e.g. 10, you ensure
* that the total number of points in the system are at most 10 times the total_issuance of
* the chain, in the absolute worse case.
*
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
* Such a scenario would also be the equivalent of the pool being 90% slashed.
**/
maxPointsToBalance: u8 & AugmentedConst<ApiType>;
/**
* The maximum number of simultaneous unbonding chunks that can exist per member.
**/
maxUnbonding: u32 & AugmentedConst<ApiType>;
/**
* The nomination pool's pallet id.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -419,45 +471,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
@@ -501,13 +514,42 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
referenda: {
/**
* Quantization level for the referendum wakeup scheduler. A higher number will result in
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
* automatic referendum status changes. Explicit servicing instructions are unaffected.
**/
alarmInterval: u32 & AugmentedConst<ApiType>;
/**
* Maximum size of the referendum queue for a single track.
**/
maxQueued: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* Information concerning the different referendum tracks.
**/
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
/**
* The number of blocks after submission that a referendum must begin being decided by.
* Once this passes, then anyone may cancel the referendum.
**/
undecidingTimeout: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
registrar: {
/**
* The deposit to be paid per byte stored on chain.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The deposit to be paid to run a parathread.
* The deposit to be paid to run a on-demand parachain.
* This should include the cost for storing the genesis head and validation code.
**/
paraDeposit: u128 & AugmentedConst<ApiType>;
@@ -518,13 +560,15 @@ declare module '@polkadot/api-base/types/consts' {
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
* The maximum weight that may be scheduled per block for any dispatchables.
**/
maximumWeight: u64 & AugmentedConst<ApiType>;
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
*
* NOTE:
* + Dependent pallets' benchmarks might require a higher limit for the setting. Set a
* higher limit under `runtime-benchmarks` feature.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
@@ -552,19 +596,53 @@ declare module '@polkadot/api-base/types/consts' {
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
* Number of eras to keep in history.
*
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
* claim their reward. This used to limit the i/o cost for the nominator payout.
* Following information is kept for eras in `[current_era -
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
* `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`, `ErasStakersPaged`,
* `ErasStakersOverview`.
*
* Must be more than the number of eras delayed by session.
* I.e. active era must always be in history. I.e. `active_era >
* current_era - history_depth` must be guaranteed.
*
* If migrating an existing pallet from storage value to config value,
* this should be set to same value or greater as in storage.
*
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
* item `StakingLedger.legacy_claimed_rewards`. Setting this value lower than
* the existing value can lead to inconsistencies in the
* `StakingLedger` and will need to be handled properly in a migration.
* The test `reducing_history_depth_abrupt` shows this effect.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
historyDepth: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
* The maximum size of each `T::ExposurePage`.
*
* An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize`
* nominators.
*
* For older non-paged exposure, a reward payout was restricted to the top
* `MaxExposurePageSize` nominators. This is to limit the i/o cost for the
* nominator payout.
*
* Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce
* without handling it in a migration.
**/
maxExposurePageSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
* have. Effectively determines how many unique eras a staker may be
* unbonding in.
*
* Note: `MaxUnlockingChunks` is used as the upper bound for the
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
* lower than the existing value can lead to inconsistencies in the
* `StakingLedger` and will need to be handled properly in a runtime
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
* this effect.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/**
@@ -599,9 +677,9 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
* The designated SS58 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
@@ -619,10 +697,12 @@ declare module '@polkadot/api-base/types/consts' {
};
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.
* The minimum period between blocks.
*
* Be aware 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. For example, in the Aura pallet it will be double this
* period on default settings.
**/
minimumPeriod: u64 & AugmentedConst<ApiType>;
/**
@@ -630,40 +710,12 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: {
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
*
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
* This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later
* added to a tip component in regular `priority` calculations.
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
@@ -703,6 +755,10 @@ declare module '@polkadot/api-base/types/consts' {
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* The period during which an approved treasury spend has to be claimed.
**/
payoutPeriod: u32 & AugmentedConst<ApiType>;
/**
* 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.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './registry';
import './runtime';
import './tx';
import '../base.js';
import './consts.js';
import './errors.js';
import './events.js';
import './query.js';
import './registry.js';
import './runtime.js';
import './tx.js';
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
+151 -26
View File
@@ -6,20 +6,22 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { Bytes, Null, Option, Result, U64, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
import type { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeProof, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PendingSlashes, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
@@ -84,8 +86,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x49eaaf1b548a0cb0/1 */
/** 0x49eaaf1b548a0cb0/3 */
beefyApi: {
/**
* Return the block number where BEEFY consensus is enabled/started
**/
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
/**
* Generates a proof of key ownership for the given authority in the given set.
**/
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Submits an unsigned extrinsic to report an equivocation.
**/
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Return the current active BEEFY validator set
**/
@@ -95,6 +109,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x2a5e924655399e60/1 */
beefyMmrApi: {
/**
* Return the currently active BEEFY authority set proof.
**/
authoritySetProof: AugmentedCall<ApiType, () => Observable<BeefyAuthoritySet>>;
/**
* Return the next/queued BEEFY authority set proof.
**/
nextAuthoritySetProof: AugmentedCall<ApiType, () => Observable<BeefyNextAuthoritySet>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x40fe3ad401f8959a/6 */
blockBuilder: {
/**
@@ -137,6 +166,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xfbc577b9d747efd6/1 */
genesisBuilder: {
/**
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
**/
buildConfig: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<ITuple<[]>, GenesisBuildErr>>>;
/**
* Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
**/
createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xed99c5acb25eedf5/3 */
grandpaApi: {
/**
@@ -160,47 +204,66 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x37e397fc7c91f5e4/1 */
/** 0x37e397fc7c91f5e4/2 */
metadata: {
/**
* Returns the metadata of a runtime
**/
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
/**
* Returns the metadata at a given version.
**/
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
/**
* Returns the supported metadata versions.
**/
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x91d5df18b0d2cf58/1 */
/** 0x91d5df18b0d2cf58/2 */
mmrApi: {
/**
* Generate MMR proof for a series of leaves under given indices.
* Generate MMR proof for the given block numbers.
**/
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
/**
* Generate MMR proof for a leaf under given index.
* Return the number of MMR blocks in the chain.
**/
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<U64, MmrError>>>;
/**
* Return the on-chain MMR root hash.
**/
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR for a batch of leaves.
**/
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against given root hash or a batch of leaves.
**/
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
verifyProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against given root hash.
**/
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: {
/**
* Returns the equivalent points of `new_funds` for a given pool.
**/
balanceToPoints: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, newFunds: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Returns the pending rewards for the given member.
**/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Returns the equivalent balance of `points` for a given pool.
**/
pointsToBalance: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, points: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
@@ -217,7 +280,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xaf2c0297a23e6d3d/2 */
/** 0xaf2c0297a23e6d3d/5 */
parachainHost: {
/**
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
@@ -239,6 +302,10 @@ declare module '@polkadot/api-base/types/calls' {
* Checks if the given validation outputs pass the acceptance criteria.
**/
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
/**
* Returns all onchain disputes.
**/
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, DisputeState]>>>>;
/**
* Get all the pending inbound messages in the downward message queue for a para.
**/
@@ -247,6 +314,10 @@ declare module '@polkadot/api-base/types/calls' {
* Get the contents of all channels addressed to the given recipient.
**/
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
/**
* Returns a merkle proof of a validator session key
**/
keyOwnershipProof: AugmentedCall<ApiType, (validatorId: ValidatorId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
**/
@@ -259,6 +330,10 @@ declare module '@polkadot/api-base/types/calls' {
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
**/
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
/**
* Returns execution parameters for the session.
**/
sessionExecutorParams: AugmentedCall<ApiType, (sessionIndex: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<ExecutorParams>>>;
/**
* Returns the session index expected at a child of the block.
**/
@@ -271,10 +346,18 @@ declare module '@polkadot/api-base/types/calls' {
* Submits a PVF pre-checking statement into the transaction pool.
**/
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
/**
* Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session
**/
submitReportDisputeLost: AugmentedCall<ApiType, (disputeProof: DisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnershipProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Returns a list of validators that lost a past session dispute and need to be slashed
**/
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, PendingSlashes]>>>>;
/**
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCode>>>;
/**
* Get the validation code from its hash.
**/
@@ -311,6 +394,17 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x18ef58a3b67ba770/1 */
stakingApi: {
/**
* Returns the nominations quota for a nominator with a given balance.
**/
nominationsQuota: AugmentedCall<ApiType, (balance: Balance | AnyNumber | Uint8Array) => Observable<u32>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xd2bc9897eed08f15/3 */
taggedTransactionQueue: {
/**
@@ -322,7 +416,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x37c8bb1350a9a2a8/1 */
/** 0x37c8bb1350a9a2a8/4 */
transactionPaymentApi: {
/**
* The transaction fee details
@@ -332,6 +426,37 @@ declare module '@polkadot/api-base/types/calls' {
* The transaction info
**/
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Query the output of the current LengthToFee given some input
**/
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Query the output of the current WeightToFee given some input
**/
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf3ff14d5ab527059/3 */
transactionPaymentCallApi: {
/**
* The call fee details
**/
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
/**
* The call info
**/
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Query the output of the current LengthToFee given some input
**/
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Query the output of the current WeightToFee given some input
**/
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './registry';
import './runtime';
import './tx';
import '../base.js';
import './consts.js';
import './errors.js';
import './events.js';
import './query.js';
import './registry.js';
import './runtime.js';
import './tx.js';
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
+204 -29
View File
@@ -6,23 +6,30 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
import type { Bytes, Null, Option, Result, U64, Vec, bool, u128, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { TAssetBalance } from '@polkadot/types/interfaces/assets';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { BeefyEquivocationProof, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
import type { Mixnode, MixnodesErr, SessionStatus } from '@polkadot/types/interfaces/mixnet';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, BlockNumber, Call, ExtrinsicInclusionMode, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { StatementStoreInvalidStatement, StatementStoreStatementSource, StatementStoreValidStatement } from '@polkadot/types/interfaces/statement';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
import type { SpStatementStoreStatement, StagingXcmV3MultiLocation } from '@polkadot/types/lookup';
import type { IExtrinsic, Observable } from '@polkadot/types/types';
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
@@ -41,6 +48,36 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x8a8047a53a8277ec/1 */
assetConversionApi: {
/**
* Get pool reserves
**/
getReserves: AugmentedCall<ApiType, (asset1: StagingXcmV3MultiLocation, asset2: StagingXcmV3MultiLocation) => Observable<Option<ITuple<[Balance, Balance]>>>>;
/**
* Quote price: exact tokens for tokens
**/
quotePriceExactTokensForTokens: AugmentedCall<ApiType, (asset1: StagingXcmV3MultiLocation, asset2: StagingXcmV3MultiLocation, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<Balance>>>;
/**
* Quote price: tokens for exact tokens
**/
quotePriceTokensForExactTokens: AugmentedCall<ApiType, (asset1: StagingXcmV3MultiLocation, asset2: StagingXcmV3MultiLocation, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<Balance>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x8453b50b22293977/1 */
assetsApi: {
/**
* Return the current set of authorities.
**/
accountBalances: AugmentedCall<ApiType, (account: AccountId | string | Uint8Array) => Observable<Vec<ITuple<[u32, TAssetBalance]>>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x687ad44ad37f03c2/1 */
authorityDiscoveryApi: {
/**
@@ -83,6 +120,29 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x49eaaf1b548a0cb0/3 */
beefyApi: {
/**
* Return the block number where BEEFY consensus is enabled/started
**/
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
/**
* Generates a proof of key ownership for the given authority in the given set.
**/
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Submits an unsigned extrinsic to report an equivocation.
**/
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Return the current active BEEFY validator set
**/
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x40fe3ad401f8959a/6 */
blockBuilder: {
/**
@@ -106,12 +166,12 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x68b66ba122c93fa7/1 */
/** 0x68b66ba122c93fa7/2 */
contractsApi: {
/**
* Perform a call from a specified account to a given contract.
**/
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: Option<WeightV2> | null | Uint8Array | WeightV2 | { refTime?: any; proofSize?: any } | string, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
/**
* Query a given storage key in a given contract.
**/
@@ -119,7 +179,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Instantiate a new contract.
**/
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: Option<WeightV2> | null | Uint8Array | WeightV2 | { refTime?: any; proofSize?: any } | string, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: CodeSource | { Upload: any } | { Existing: any } | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
/**
* Upload new code without instantiating a contract from it.
**/
@@ -129,7 +189,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xdf6acb689907609b/4 */
/** 0xdf6acb689907609b/5 */
core: {
/**
* Execute the given block.
@@ -138,7 +198,7 @@ declare module '@polkadot/api-base/types/calls' {
/**
* Initialize a block with the given header.
**/
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<ExtrinsicInclusionMode>>;
/**
* Returns the version of the runtime.
**/
@@ -148,6 +208,21 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xfbc577b9d747efd6/1 */
genesisBuilder: {
/**
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
**/
buildConfig: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<ITuple<[]>, GenesisBuildErr>>>;
/**
* Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
**/
createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xed99c5acb25eedf5/3 */
grandpaApi: {
/**
@@ -171,47 +246,101 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x37e397fc7c91f5e4/1 */
/** 0x37e397fc7c91f5e4/2 */
metadata: {
/**
* Returns the metadata of a runtime
**/
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
/**
* Returns the metadata at a given version.
**/
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
/**
* Returns the supported metadata versions.
**/
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x91d5df18b0d2cf58/1 */
/** 0x6fd7c327202e4a8d/1 */
mixnetApi: {
/**
* Get the index and phase of the current session.
**/
currentMixnodes: AugmentedCall<ApiType, () => Observable<Result<Mixnode, MixnodesErr>>>;
/**
* Try to register a mixnode for the next session.
**/
maybeRegister: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array, mixnode: Mixnode | { externalAddresses?: any; kxPublic?: any; peerId?: any } | string | Uint8Array) => Observable<bool>>;
/**
* Get the index and phase of the current session.
**/
prevMixnodes: AugmentedCall<ApiType, () => Observable<Result<Mixnode, MixnodesErr>>>;
/**
* Get the index and phase of the current session.
**/
sessionStatus: AugmentedCall<ApiType, () => Observable<SessionStatus>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x91d5df18b0d2cf58/2 */
mmrApi: {
/**
* Generate MMR proof for a series of leaves under given indices.
* Generate MMR proof for the given block numbers.
**/
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
/**
* Generate MMR proof for a leaf under given index.
* Return the number of MMR blocks in the chain.
**/
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<U64, MmrError>>>;
/**
* Return the on-chain MMR root hash.
**/
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR for a batch of leaves.
**/
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against given root hash or a batch of leaves.
**/
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against on-chain MMR.
**/
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
verifyProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Verify MMR proof against given root hash.
**/
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x899a250cbe84f250/1 */
nftsApi: {
/**
* An attribute
**/
attribute: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* A collection attribute
**/
collectionAttribute: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* A collection owner
**/
collectionOwner: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array) => Observable<Option<AccountId>>>;
/**
* A custom attribute
**/
customAttribute: AugmentedCall<ApiType, (account: AccountId | string | Uint8Array, collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* Collection owner
**/
owner: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array) => Observable<Option<AccountId>>>;
/**
* System attribute
**/
systemAttribute: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* Generic call
**/
@@ -219,10 +348,18 @@ declare module '@polkadot/api-base/types/calls' {
};
/** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: {
/**
* Returns the equivalent points of `new_funds` for a given pool.
**/
balanceToPoints: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, newFunds: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Returns the pending rewards for the given member.
**/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Returns the equivalent balance of `points` for a given pool.
**/
pointsToBalance: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, points: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
@@ -254,6 +391,17 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x18ef58a3b67ba770/1 */
stakingApi: {
/**
* Returns the nominations quota for a nominator with a given balance.
**/
nominationsQuota: AugmentedCall<ApiType, (balance: Balance | AnyNumber | Uint8Array) => Observable<u32>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xd2bc9897eed08f15/3 */
taggedTransactionQueue: {
/**
@@ -265,7 +413,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x37c8bb1350a9a2a8/1 */
/** 0x37c8bb1350a9a2a8/4 */
transactionPaymentApi: {
/**
* The transaction fee details
@@ -275,12 +423,20 @@ declare module '@polkadot/api-base/types/calls' {
* The transaction info
**/
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Query the output of the current LengthToFee given some input
**/
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Query the output of the current WeightToFee given some input
**/
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf3ff14d5ab527059/1 */
/** 0xf3ff14d5ab527059/3 */
transactionPaymentCallApi: {
/**
* The call fee details
@@ -290,6 +446,25 @@ declare module '@polkadot/api-base/types/calls' {
* The call info
**/
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Query the output of the current LengthToFee given some input
**/
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
/**
* Query the output of the current WeightToFee given some input
**/
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xbe9fb0c91a8046cf/1 */
validateStatement: {
/**
* Validate the statement.
**/
valdateStatement: AugmentedCall<ApiType, (source: StatementStoreStatementSource | 'Chain' | 'Network' | 'Local' | number | Uint8Array, statement: SpStatementStoreStatement | { proof?: any; decryptionKey?: any; channel?: any; priority?: any; numTopics?: any; topics?: any; data?: any } | string | Uint8Array) => Observable<Result<StatementStoreValidStatement, StatementStoreInvalidStatement>>>;
/**
* Generic call
**/
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -7,6 +7,7 @@
},
"exclude": [
"**/*.spec.ts",
"**/mod.ts",
"**/kusama/*.ts",
"**/polkadot/*.ts"
],
@@ -15,7 +16,6 @@
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
{ "path": "../types-augment/tsconfig.build.json" }
]
}
@@ -1,22 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"noEmit": true
},
"include": [
"**/kusama/*.spec.ts"
],
"references": [
{ "path": "../api-augment/tsconfig.build.json" },
{ "path": "../api-augment/tsconfig.kusama.json" },
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
]
}
-201
View File
@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+9 -11
View File
@@ -1,14 +1,12 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Interfaces for interacting with contracts and contract ABIs",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-base#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/api-base",
"repository": {
"directory": "packages/api-base",
@@ -16,17 +14,17 @@
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
"./packageDetect.js",
"./packageDetect.cjs"
],
"type": "module",
"version": "9.2.2",
"version": "11.0.3",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/rpc-core": "9.2.2",
"@polkadot/types": "9.2.2",
"@polkadot/util": "^10.1.4",
"rxjs": "^7.5.6"
"@polkadot/rpc-core": "11.0.3",
"@polkadot/types": "11.0.3",
"@polkadot/util": "^12.6.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
}
}
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
-7
View File
@@ -1,7 +0,0 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
export default [rpcInfo, typesInfo];
-11
View File
@@ -1,11 +0,0 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './packageDetect.js';
export * from './bundle';
export * from './bundle.js';
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+13
View File
@@ -0,0 +1,13 @@
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
// (packageInfo imports will be kept as-is, user-editable)
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, [rpcInfo, typesInfo]);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.2.2' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '11.0.3' };
+3 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
@@ -13,7 +13,7 @@ export interface ApiInterfaceRx {
call: QueryableCalls<'rxjs'>;
consts: QueryableConsts<'rxjs'>;
extrinsicType: number;
genesisHash?: Hash;
genesisHash?: Hash | undefined;
hasSubscriptions: boolean;
registry: Registry;
runtimeMetadata: Metadata;
@@ -22,7 +22,7 @@ export interface ApiInterfaceRx {
queryMulti: QueryableStorageMulti<'rxjs'>;
rpc: DecoratedRpc<'rxjs', RpcInterface>;
tx: SubmittableExtrinsics<'rxjs'>;
signer?: Signer;
signer?: Signer | undefined;
callAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableCalls<'rxjs'>>;
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
+9 -4
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
@@ -62,12 +62,17 @@ export interface PaginationOptions<A = unknown> {
startKey?: string;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
export type DecorateMethod<_ApiType extends ApiTypes, T = any> =
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
type AsCodec<R extends Codec | any> = R extends Codec
type AsCodec<R> = R extends Codec
? R
: Codec;
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface EmptyBase<_> {
// this is use to allow use to have unused vars in augmented interfaces,
// so intentionally left empty
}
+12 -12
View File
@@ -1,31 +1,31 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
import type { ApiTypes, ReturnCodec } from './base';
import type { ApiTypes, EmptyBase, ReturnCodec } from './base.js';
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
ApiType extends 'rxjs'
? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
? <T = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
: <T = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
DecoratedCallBase<ApiType, F> & { meta: DefinitionCallNamed };
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
/** The metadata/description/definition for this method */
meta: DefinitionCallNamed
};
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
export interface AugmentedCalls<ApiType extends ApiTypes> {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedCalls<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> {
// when non-augmented, we need to at least have Codec results
[key: string]: QueryableModuleCalls<ApiType>;
}
export interface QueryableModuleCalls<ApiType extends ApiTypes> {
[key: string]: DecoratedCallBase<ApiType>;
}
export type QueryableModuleCalls<ApiType extends ApiTypes> = Record<string, DecoratedCallBase<ApiType>>;
+7 -9
View File
@@ -1,27 +1,25 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
import type { Codec } from '@polkadot/types/types';
import type { ApiTypes } from './base';
import type { ApiTypes, EmptyBase } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export interface AugmentedConst<ApiType extends ApiTypes> {
export interface AugmentedConst<_ extends ApiTypes> {
meta: PalletConstantMetadataLatest;
}
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
export interface AugmentedConsts<ApiType extends ApiTypes> {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedConsts<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableConsts<ApiType extends ApiTypes> extends AugmentedConsts<ApiType> {
// when non-augmented, we need to at least have Codec results
[key: string]: QueryableModuleConsts;
}
export interface QueryableModuleConsts {
[key: string]: Codec;
}
export type QueryableModuleConsts = Record<string, Codec>;
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
+7 -9
View File
@@ -1,24 +1,22 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { IsError } from '@polkadot/types/metadata/decorate/types';
import type { ApiTypes } from './base';
import type { ApiTypes, EmptyBase } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type AugmentedError<ApiType extends ApiTypes> = IsError;
export type AugmentedError<_ extends ApiTypes> = IsError;
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
export interface AugmentedErrors<ApiType extends ApiTypes> {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedErrors<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface DecoratedErrors<ApiType extends ApiTypes> extends AugmentedErrors<ApiType> {
// when non-augmented, we need to at least have Codec results
[key: string]: ModuleErrors<ApiType>;
}
export interface ModuleErrors<ApiType extends ApiTypes> {
[key: string]: AugmentedError<ApiType>;
}
export type ModuleErrors<ApiType extends ApiTypes> = Record<string, AugmentedError<ApiType>>;
+7 -9
View File
@@ -1,25 +1,23 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { IsEvent } from '@polkadot/types/metadata/decorate/types';
import type { AnyTuple } from '@polkadot/types/types';
import type { ApiTypes } from './base';
import type { ApiTypes, EmptyBase } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
export type AugmentedEvent<_ extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
export interface AugmentedEvents<ApiType extends ApiTypes> {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedEvents<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEvents<ApiType> {
// when non-augmented, we need to at least have Codec results
[key: string]: ModuleEvents<ApiType>;
}
export interface ModuleEvents<ApiType extends ApiTypes> {
[key: string]: AugmentedEvent<ApiType>;
}
export type ModuleEvents<ApiType extends ApiTypes> = Record<string, AugmentedEvent<ApiType>>;
+5 -5
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// Copyright 2017-2024 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// These are augmented, do an augmentation export
@@ -10,7 +10,7 @@ export * from '@polkadot/api-base/types/storage';
export * from '@polkadot/api-base/types/submittable';
// normal exports
export * from './api';
export * from './base';
export * from './derive';
export * from './rpc';
export * from './api.js';
export * from './base.js';
export * from './derive.js';
export * from './rpc.js';
+6 -5
View File
@@ -1,10 +1,9 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AnyFunction, Callback, DefinitionRpc } from '@polkadot/types/types';
import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base';
import type { AnyFunction, AnyJson, Callback, DefinitionRpc } from '@polkadot/types/types';
import type { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base.js';
export type { AugmentedRpc } from '@polkadot/rpc-core/types';
@@ -29,6 +28,8 @@ export type DecoratedRpcSection<ApiType extends ApiTypes, Section> = {
: never
}
export type RawRpcType<ApiType extends ApiTypes> = (method: string, ...params: unknown[]) => ApiType extends 'rxjs' ? Observable<AnyJson> : Promise<AnyJson>;
export type DecoratedRpc<ApiType extends ApiTypes, AllSections> = {
[S in keyof AllSections]: DecoratedRpcSection<ApiType, AllSections[S]>
}
} & RawRpcType<ApiType>
+16 -22
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
@@ -6,15 +6,13 @@ import type { StorageKey, u64 } from '@polkadot/types';
import type { Hash } from '@polkadot/types/interfaces';
import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base';
import type { ApiTypes, DropLast, EmptyBase, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
interface StorageEntryObservableMulti<R extends Codec = Codec> {
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
}
type StorageEntryObservableMulti<R extends Codec = Codec> = <T extends Codec = R>(args: unknown[]) => Observable<T[]>;
interface StorageEntryPromiseMulti<R extends Codec = Codec> {
<T extends Codec = R>(args: (unknown[] | unknown)[]): Promise<T[]>;
<T extends Codec = R>(args: (unknown[] | unknown)[], callback: Callback<T[]>): UnsubscribePromise;
<T extends Codec = R>(args: unknown[]): Promise<T[]>;
<T extends Codec = R>(args: unknown[], callback: Callback<T[]>): UnsubscribePromise;
}
export interface StorageEntryPromiseOverloads {
@@ -48,12 +46,12 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
/**
* @deprecated Use api.at(<blockHash>)
*/
at: <T extends Codec | any = ReturnCodec<F>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
at: <T = ReturnCodec<F>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
creator: StorageEntry;
/**
* @deprecated Use api.at(<blockHash>)
*/
entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesAt: <T = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
/**
* @deprecated Use api.at(<blockHash>)
*/
@@ -68,8 +66,8 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
}
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entries: <T = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
key: (...args: Parameters<F>) => string;
@@ -79,21 +77,15 @@ export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunct
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
}
export interface QueryableModuleStorage<ApiType extends ApiTypes> {
[key: string]: QueryableStorageEntry<ApiType, AnyTuple>;
}
export type QueryableModuleStorage<ApiType extends ApiTypes> = Record<string, QueryableStorageEntry<ApiType, AnyTuple>>;
export interface QueryableModuleStorageAt<ApiType extends ApiTypes> {
[key: string]: QueryableStorageEntryAt<ApiType, AnyTuple>;
}
export type QueryableModuleStorageAt<ApiType extends ApiTypes> = Record<string, QueryableStorageEntryAt<ApiType, AnyTuple>>;
export type QueryableStorageMultiArg<ApiType extends ApiTypes> =
QueryableStorageEntry<ApiType> |
[QueryableStorageEntry<ApiType>, ...unknown[]];
export interface QueryableStorageMultiBase<ApiType extends ApiTypes> {
<T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[]): Observable<T>;
}
export type QueryableStorageMultiBase<ApiType extends ApiTypes> = <T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[]) => Observable<T>;
export interface QueryableStorageMultiPromise<ApiType extends ApiTypes> {
<T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[], callback: Callback<T>): UnsubscribePromise;
@@ -114,16 +106,18 @@ export type AugmentedQueryDoubleMap<ApiType extends ApiTypes, F extends AnyFunct
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
export interface AugmentedQueries<ApiType extends ApiTypes> {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedQueries<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
// when non-augmented, we need to at least have Codec results
[key: string]: QueryableModuleStorage<ApiType>;
}
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableStorageAt<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
[key: string]: QueryableModuleStorageAt<ApiType>;
}
+17 -14
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// Copyright 2017-2024 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AccountId, Address, ApplyExtrinsicResult, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types';
import type { ApiTypes, PromiseOrObs } from './base';
import type { ApiTypes, EmptyBase, PromiseOrObs } from './base.js';
export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>;
@@ -16,7 +16,7 @@ export interface SignerOptions {
nonce: AnyNumber | Codec;
signer?: Signer;
tip?: AnyNumber;
assetId?: AnyNumber;
assetId?: AnyNumber | object;
}
export type SubmittableDryRunResult<ApiType extends ApiTypes> =
@@ -40,16 +40,22 @@ export type SubmittablePaymentResult<ApiType extends ApiTypes> =
: Promise<RuntimeDispatchInfo>;
export interface SubmittableResultValue {
dispatchError?: DispatchError;
dispatchInfo?: DispatchInfo;
dispatchError?: DispatchError | undefined;
dispatchInfo?: DispatchInfo | undefined;
events?: EventRecord[];
internalError?: Error;
internalError?: Error | undefined;
status: ExtrinsicStatus;
txHash: Hash;
txIndex?: number;
txIndex?: number | undefined;
blockNumber?: BlockNumber;
}
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
/** true if api.rpc.system.dryRun is available, enabling dryRun(...) */
hasDryRun: boolean;
/** true if api.call.transactionPaymentApi.queryInfo is available, enabling paymentInfo(...) */
hasPaymentInfo: boolean;
dryRun (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableDryRunResult<ApiType>;
paymentInfo (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittablePaymentResult<ApiType>;
@@ -75,8 +81,8 @@ export interface SubmittableExtrinsicFunction<ApiType extends ApiTypes, A extend
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedSubmittables<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
@@ -86,7 +92,4 @@ export interface SubmittableExtrinsics<ApiType extends ApiTypes> extends Augment
[key: string]: SubmittableModuleExtrinsics<ApiType>;
}
export interface SubmittableModuleExtrinsics<ApiType extends ApiTypes> {
// only with is<Type> augmentation
[key: string]: SubmittableExtrinsicFunction<ApiType>;
}
export type SubmittableModuleExtrinsics<ApiType extends ApiTypes> = Record<string, SubmittableExtrinsicFunction<ApiType>>;
+3
View File
@@ -5,6 +5,9 @@
"outDir": "./build",
"rootDir": "./src"
},
"exclude": [
"**/mod.ts"
],
"references": [
{ "path": "../rpc-core/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" }
-201
View File
@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+16 -16
View File
@@ -1,14 +1,12 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Interfaces for interacting with contracts and contract ABIs",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/api-contract",
"repository": {
"directory": "packages/api-contract",
@@ -16,24 +14,26 @@
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
"./packageDetect.js",
"./packageDetect.cjs"
],
"type": "module",
"version": "9.2.2",
"version": "11.0.3",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/api": "9.2.2",
"@polkadot/types": "9.2.2",
"@polkadot/types-codec": "9.2.2",
"@polkadot/types-create": "9.2.2",
"@polkadot/util": "^10.1.4",
"@polkadot/util-crypto": "^10.1.4",
"rxjs": "^7.5.6"
"@polkadot/api": "11.0.3",
"@polkadot/api-augment": "11.0.3",
"@polkadot/types": "11.0.3",
"@polkadot/types-codec": "11.0.3",
"@polkadot/types-create": "11.0.3",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"rxjs": "^7.8.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@polkadot/api-augment": "9.2.2",
"@polkadot/keyring": "^10.1.4"
"@polkadot/api-augment": "11.0.3",
"@polkadot/keyring": "^12.6.2",
"@polkadot/types-support": "11.0.3"
}
}
+139 -21
View File
@@ -1,16 +1,20 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Registry } from '@polkadot/types/types';
import fs from 'fs';
import path from 'path';
import fs from 'node:fs';
import process from 'node:process';
import { TypeDefInfo } from '@polkadot/types/types';
import rpcMetadata from '@polkadot/types-support/metadata/static-substrate-contracts-node';
import { blake2AsHex } from '@polkadot/util-crypto';
import abis from '../test/contracts';
import { Abi } from '.';
import { Metadata, TypeRegistry } from '../../../types/src/bundle.js';
import abis from '../test/contracts/index.js';
import { Abi } from './index.js';
interface SpecDef {
messages: {
@@ -35,12 +39,15 @@ interface JSONAbi {
},
V3: {
spec: SpecDef;
},
V4: {
spec: SpecDef;
}
}
function stringifyInfo (key: string, value: unknown): unknown {
return key === 'info'
? TypeDefInfo[value as number]
return key === 'info' && typeof value === 'number'
? TypeDefInfo[value]
: value;
}
@@ -59,7 +66,7 @@ describe('Abi', (): void => {
it(`initializes from a contract ABI (${abiName})`, (): void => {
try {
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
const messageIds = (abi.V4 || abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
label || (
Array.isArray(name)
? name.join('::')
@@ -79,31 +86,34 @@ describe('Abi', (): void => {
});
describe('TypeDef', (): void => {
Object.keys(abis).forEach((abiName) => {
it(`initializes from a contract ABI (${abiName})`, (): void => {
const abi = new Abi(abis[abiName]);
const json = stringifyJson(abi.registry);
const cmpPath = path.join(__dirname, `../test/compare/${abiName}.test.json`);
for (const [abiName, abiJson] of Object.entries(abis)) {
it(`initializes from a contract ABI: ${abiName}`, (): void => {
const abi = new Abi(abiJson);
const registryJson = stringifyJson(abi.registry);
const cmpFile = new URL(`../test/compare/${abiName}.test.json`, import.meta.url);
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
expect(JSON.parse(json)).toEqual(require(cmpPath));
expect(
JSON.parse(registryJson)
).toEqual(
JSON.parse(fs.readFileSync(cmpFile, 'utf-8'))
);
} catch (error) {
if (process.env.GITHUB_REPOSITORY) {
console.error(json);
if (process.env['GITHUB_REPOSITORY']) {
console.error(registryJson);
throw error;
}
fs.writeFileSync(cmpPath, json, { flag: 'w' });
fs.writeFileSync(cmpFile, registryJson, { flag: 'w' });
}
});
});
}
});
it('has the correct hash for the source', (): void => {
const abi = new Abi(abis.ink_v0_flipperBundle);
const bundle = abis.ink_v0_flipperBundle as unknown as JSONAbi;
const abi = new Abi(abis['ink_v0_flipperBundle']);
const bundle = abis['ink_v0_flipperBundle'] as unknown as JSONAbi;
// manual
expect(bundle.source.hash).toEqual(blake2AsHex(bundle.source.wasm));
@@ -114,4 +124,112 @@ describe('Abi', (): void => {
// the hash as per the actual Abi
expect(bundle.source.hash).toEqual(abi.info.source.wasmHash.toHex());
});
describe('Events', (): void => {
const registry = new TypeRegistry();
beforeAll((): void => {
const metadata = new Metadata(registry, rpcMetadata);
registry.setMetadata(metadata);
});
it('decoding <=ink!v4 event', (): void => {
const abiJson = abis['ink_v4_erc20Metadata'];
expect(abiJson).toBeDefined();
const abi = new Abi(abiJson);
const eventRecordHex =
'0x0001000000080360951b8baf569bca905a279c12d6ce17db7cdce23a42563870ef585129ce5dc64d010001d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000c0045726332303a3a5472616e7366657200000000000000000000000000000000da2d695d3b5a304e0039e7fc4419c34fa0c1f239189c99bb72a6484f1634782b2b00c7d40fe6d84d660f3e6bed90f218e022a0909f7e1a7ea35ada8b6e003564';
const record = registry.createType('EventRecord', eventRecordHex);
const decodedEvent = abi.decodeEvent(record);
expect(decodedEvent.event.args.length).toEqual(3);
expect(decodedEvent.args.length).toEqual(3);
expect(decodedEvent.event.identifier).toEqual('Transfer');
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
return {
...prev,
[cur.name]: decodedEvent.args[index].toHuman()
};
}, {});
const expectedEvent = {
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
value: '123.4567 MUnit'
};
expect(decodedEventHuman).toEqual(expectedEvent);
});
it('decoding >=ink!v5 event', (): void => {
const abiJson = abis['ink_v5_erc20Metadata'];
expect(abiJson).toBeDefined();
const abi = new Abi(abiJson);
const eventRecordHex =
'0x00010000000803da17150e96b3955a4db6ad35ddeb495f722f9c1d84683113bfb096bf3faa30f2490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000cb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cbd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
const record = registry.createType('EventRecord', eventRecordHex);
const decodedEvent = abi.decodeEvent(record);
expect(decodedEvent.event.args.length).toEqual(3);
expect(decodedEvent.args.length).toEqual(3);
expect(decodedEvent.event.identifier).toEqual('erc20::erc20::Transfer');
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
return {
...prev,
[cur.name]: decodedEvent.args[index].toHuman()
};
}, {});
const expectedEvent = {
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
value: '123.4567 MUnit'
};
expect(decodedEventHuman).toEqual(expectedEvent);
});
it('decoding >=ink!v5 anonymous event', (): void => {
const abiJson = abis['ink_v5_erc20AnonymousTransferMetadata'];
expect(abiJson).toBeDefined();
const abi = new Abi(abiJson);
expect(abi.events[0].identifier).toEqual('erc20::erc20::Transfer');
expect(abi.events[0].signatureTopic).toEqual(null);
const eventRecordWithAnonymousEventHex = '0x00010000000803538e726248a9c155911e7d99f4f474c3408630a2f6275dd501d4471c7067ad2c490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb1060000000000000008d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
const record = registry.createType('EventRecord', eventRecordWithAnonymousEventHex);
const decodedEvent = abi.decodeEvent(record);
expect(decodedEvent.event.args.length).toEqual(3);
expect(decodedEvent.args.length).toEqual(3);
expect(decodedEvent.event.identifier).toEqual('erc20::erc20::Transfer');
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
return {
...prev,
[cur.name]: decodedEvent.args[index].toHuman()
};
}, {});
const expectedEvent = {
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
value: '123.4567 MUnit'
};
expect(decodedEventHuman).toEqual(expectedEvent);
});
});
});
+201 -50
View File
@@ -1,16 +1,26 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Bytes } from '@polkadot/types';
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces';
import type { Codec, Registry } from '@polkadot/types/types';
import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types';
import type { Bytes, Vec } from '@polkadot/types';
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventParamSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataV4, ContractMetadataV5, ContractProjectInfo, ContractTypeSpec, EventRecord } from '@polkadot/types/interfaces';
import type { Codec, Registry, TypeDef } from '@polkadot/types/types';
import type { AbiConstructor, AbiEvent, AbiEventParam, AbiMessage, AbiMessageParam, AbiParam, DecodedEvent, DecodedMessage } from '../types.js';
import { TypeRegistry } from '@polkadot/types';
import { Option, TypeRegistry } from '@polkadot/types';
import { TypeDefInfo } from '@polkadot/types-create';
import { assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
import { assertReturn, compactAddLength, compactStripLength, isBn, isNumber, isObject, isString, isUndefined, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
import { convertVersions, enumVersions } from './toLatest';
import { convertVersions, enumVersions } from './toLatestCompatible.js';
interface AbiJson {
version?: string;
[key: string]: unknown;
}
type EventOf<M> = M extends {spec: { events: Vec<infer E>}} ? E : never
export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5;
type ContractEventSupported = EventOf<ContractMetadataSupported>;
const l = logger('Abi');
@@ -26,27 +36,41 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
}
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
function getMetadata (registry: Registry, json: AbiJson): ContractMetadataSupported {
// this is for V1, V2, V3
const vx = enumVersions.find((v) => isObject(json[v]));
const metadata = registry.createType('ContractMetadata',
// this was added in V4
const jsonVersion = json.version;
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
throw new Error(`Unable to handle version ${jsonVersion}`);
}
const metadata = registry.createType<ContractMetadata>('ContractMetadata',
vx
? { [vx]: json[vx] }
: { V0: json }
) as unknown as ContractMetadata;
: jsonVersion
? { [`V${jsonVersion}`]: json }
: { V0: json }
);
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
if (!converter) {
throw new Error(`Unable to convert ABI with version ${metadata.type} to latest`);
throw new Error(`Unable to convert ABI with version ${metadata.type} to a supported version`);
}
return converter[1](registry, metadata[`as${converter[0]}`]);
const upgradedMetadata = converter[1](registry, metadata[`as${converter[0]}`]);
return upgradedMetadata;
}
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataSupported, ContractProjectInfo] {
const registry = new TypeRegistry();
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
const latest = getLatestMeta(registry, json);
const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
const metadata = getMetadata(registry, json as unknown as AbiJson);
const lookup = registry.createType('PortableRegistry', { types: metadata.types }, true);
// attach the lookup to the registry - now the types are known
registry.setLookup(lookup);
@@ -60,23 +84,34 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
lookup.getTypeDef(id)
);
return [json, registry, latest, info];
return [json, registry, metadata, info];
}
/**
* @internal
* Determines if the given input value is a ContractTypeSpec
*/
function isTypeSpec (value: Codec): value is ContractTypeSpec {
return !!value && value instanceof Map && !isUndefined((value as ContractTypeSpec).type) && !isUndefined((value as ContractTypeSpec).displayName);
}
/**
* @internal
* Determines if the given input value is an Option
*/
function isOption (value: Codec): value is Option<Codec> {
return !!value && value instanceof Option;
}
export class Abi {
public readonly events: AbiEvent[];
public readonly constructors: AbiConstructor[];
public readonly info: ContractProjectInfo;
public readonly json: Record<string, unknown>;
public readonly messages: AbiMessage[];
public readonly metadata: ContractMetadataLatest;
public readonly registry: Registry;
readonly events: AbiEvent[];
readonly constructors: AbiConstructor[];
readonly info: ContractProjectInfo;
readonly json: Record<string, unknown>;
readonly messages: AbiMessage[];
readonly metadata: ContractMetadataSupported;
readonly registry: Registry;
readonly environment = new Map<string, TypeDef | Codec>();
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
[this.json, this.registry, this.metadata, this.info] = parseJson(
@@ -88,29 +123,105 @@ export class Abi {
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
this.#createMessage(spec, index, {
isConstructor: true,
isPayable: spec.payable.isTrue
isDefault: spec.default.isTrue,
isPayable: spec.payable.isTrue,
returnType: spec.returnType.isSome
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
: null
})
);
this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) =>
this.#createEvent(spec, index)
this.events = this.metadata.spec.events.map((_: ContractEventSupported, index: number) =>
this.#createEvent(index)
);
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage => {
const typeSpec = spec.returnType.unwrapOr(null);
return this.#createMessage(spec, index, {
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage =>
this.#createMessage(spec, index, {
isDefault: spec.default.isTrue,
isMutating: spec.mutates.isTrue,
isPayable: spec.payable.isTrue,
returnType: typeSpec
? this.registry.lookup.getTypeDef(typeSpec.type)
returnType: spec.returnType.isSome
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
: null
});
});
})
);
// NOTE See the rationale for having Option<...> values in the actual
// ContractEnvironmentV4 structure definition in interfaces/contractsAbi
// (Due to conversions, the fields may not exist)
for (const [key, opt] of this.metadata.spec.environment.entries()) {
if (isOption(opt)) {
if (opt.isSome) {
const value = opt.unwrap();
if (isBn(value)) {
this.environment.set(key, value);
} else if (isTypeSpec(value)) {
this.environment.set(key, this.registry.lookup.getTypeDef(value.type));
} else {
throw new Error(`Invalid environment definition for ${key}:: Expected either Number or ContractTypeSpec`);
}
}
} else {
throw new Error(`Expected Option<*> definition for ${key} in ContractEnvironment`);
}
}
}
/**
* Warning: Unstable API, bound to change
*/
public decodeEvent (data: Bytes | Uint8Array): DecodedEvent {
public decodeEvent (record: EventRecord): DecodedEvent {
switch (this.metadata.version.toString()) {
// earlier version are hoisted to v4
case '4':
return this.#decodeEventV4(record);
// Latest
default:
return this.#decodeEventV5(record);
}
}
#decodeEventV5 = (record: EventRecord): DecodedEvent => {
// Find event by first topic, which potentially is the signature_topic
const signatureTopic = record.topics[0];
const data = record.event.data[1] as Bytes;
if (signatureTopic) {
const event = this.events.find((e) => e.signatureTopic !== undefined && e.signatureTopic !== null && e.signatureTopic === signatureTopic.toHex());
// Early return if event found by signature topic
if (event) {
return event.fromU8a(data);
}
}
// If no event returned yet, it might be anonymous
const amountOfTopics = record.topics.length;
const potentialEvents = this.events.filter((e) => {
// event can't have a signature topic
if (e.signatureTopic !== null && e.signatureTopic !== undefined) {
return false;
}
// event should have same amount of indexed fields as emitted topics
const amountIndexed = e.args.filter((a) => a.indexed).length;
if (amountIndexed !== amountOfTopics) {
return false;
}
// If all conditions met, it's a potential event
return true;
});
if (potentialEvents.length === 1) {
return potentialEvents[0].fromU8a(data);
}
throw new Error('Unable to determine event');
};
#decodeEventV4 = (record: EventRecord): DecodedEvent => {
const data = record.event.data[1] as Bytes;
const index = data[0];
const event = this.events[index];
@@ -119,7 +230,7 @@ export class Abi {
}
return event.fromU8a(data.subarray(1));
}
};
/**
* Warning: Unstable API, bound to change
@@ -143,7 +254,7 @@ export class Abi {
return findMessage(this.messages, messageOrId);
}
#createArgs = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiParam[] => {
#createArgs = (args: ContractMessageParamSpecLatest[] | ContractEventParamSpecLatest[], spec: unknown): AbiParam[] => {
return args.map(({ label, type }, index): AbiParam => {
try {
if (!isObject(type)) {
@@ -181,8 +292,47 @@ export class Abi {
});
};
#createEvent = (spec: ContractEventSpecLatest, index: number): AbiEvent => {
const args = this.#createArgs(spec.args, spec);
#createMessageParams = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiMessageParam[] => {
return this.#createArgs(args, spec);
};
#createEventParams = (args: ContractEventParamSpecLatest[], spec: unknown): AbiEventParam[] => {
const params = this.#createArgs(args, spec);
return params.map((p, index): AbiEventParam => ({ ...p, indexed: args[index].indexed.toPrimitive() }));
};
#createEvent = (index: number): AbiEvent => {
// TODO TypeScript would narrow this type to the correct version,
// but version is `Text` so I need to call `toString()` here,
// which breaks the type inference.
switch (this.metadata.version.toString()) {
case '4':
return this.#createEventV4((this.metadata as ContractMetadataV4).spec.events[index], index);
default:
return this.#createEventV5((this.metadata as ContractMetadataV5).spec.events[index], index);
}
};
#createEventV5 = (spec: EventOf<ContractMetadataV5>, index: number): AbiEvent => {
const args = this.#createEventParams(spec.args, spec);
const event = {
args,
docs: spec.docs.map((d) => d.toString()),
fromU8a: (data: Uint8Array): DecodedEvent => ({
args: this.#decodeArgs(args, data),
event
}),
identifier: [spec.module_path, spec.label].join('::'),
index,
signatureTopic: spec.signature_topic.isSome ? spec.signature_topic.unwrap().toHex() : null
};
return event;
};
#createEventV4 = (spec: EventOf<ContractMetadataV4>, index: number): AbiEvent => {
const args = this.#createEventParams(spec.args, spec);
const event = {
args,
docs: spec.docs.map((d) => d.toString()),
@@ -198,7 +348,7 @@ export class Abi {
};
#createMessage = (spec: ContractMessageSpecLatest | ContractConstructorSpecLatest, index: number, add: Partial<AbiMessage> = {}): AbiMessage => {
const args = this.#createArgs(spec.args, spec);
const args = this.#createMessageParams(spec.args, spec);
const identifier = spec.label.toString();
const message = {
...add,
@@ -210,11 +360,12 @@ export class Abi {
}),
identifier,
index,
isDefault: spec.default.isTrue,
method: stringCamelCase(identifier),
path: identifier.split('::').map((s) => stringCamelCase(s)),
selector: spec.selector,
toU8a: (params: unknown[]) =>
this.#encodeArgs(spec, args, params)
this.#encodeMessageArgs(spec, args, params)
};
return message;
@@ -246,7 +397,7 @@ export class Abi {
return message.fromU8a(trimmed.subarray(4));
};
#encodeArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiParam[], data: unknown[]): Uint8Array => {
#encodeMessageArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiMessageParam[], data: unknown[]): Uint8Array => {
if (data.length !== args.length) {
throw new Error(`Expected ${args.length} arguments to contract message '${label.toString()}', found ${data.length}`);
}
-38
View File
@@ -1,38 +0,0 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { v0ToV1 } from './toV1';
import { v1ToV2 } from './toV2';
import { v2ToV3 } from './toV3';
// The versions where an enum is used, aka V0 is missing
// (Order from newest, i.e. we expect more on newest vs oldest)
export const enumVersions = <const> ['V3', 'V2', 'V1'];
type Versions = typeof enumVersions[number] | 'V0';
type Converter = (registry: Registry, vx: any) => ContractMetadataLatest;
// Helper to convert metadata from one step to the next
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataLatest, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataLatest {
return (registry: Registry, input: I): ContractMetadataLatest =>
next(registry, step(registry, input));
}
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
return v3;
}
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
export const convertVersions: [Versions, Converter][] = [
['V3', v3ToLatest],
['V2', v2ToLatest],
['V1', v1ToLatest],
['V0', v0ToLatest]
];
@@ -1,15 +1,17 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
/// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types';
import abis from '../test/contracts';
import abis from '../test/contracts/index.js';
import { v0ToLatestCompatible, v1ToLatestCompatible, v2ToLatestCompatible, v3ToLatestCompatible, v4ToLatestCompatible, v5ToLatestCompatible } from './toLatestCompatible.js';
describe('v0ToLatest', (): void => {
describe('v0ToLatestCompatible', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V0: abis.ink_v0_erc20 });
const latest = v0ToLatest(registry, contract.asV0);
const contract = registry.createType('ContractMetadata', { V0: abis['ink_v0_erc20'] });
const latest = v0ToLatestCompatible(registry, contract.asV0);
it('has the correct constructors', (): void => {
expect(
@@ -46,12 +48,16 @@ describe('v0ToLatest', (): void => {
latest.spec.events[0].args.map(({ label }) => label.toString())
).toEqual(['from', 'to', 'value']);
});
it('has the latest compatible version number', (): void => {
expect(latest.version.toString()).toEqual('4');
});
});
describe('v1ToLatest', (): void => {
describe('v1ToLatestCompatible', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_flipper.V1 });
const latest = v1ToLatest(registry, contract.asV1);
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_flipper']['V1'] });
const latest = v1ToLatestCompatible(registry, contract.asV1);
it('has the correct constructors', (): void => {
expect(
@@ -66,8 +72,8 @@ describe('v1ToLatest', (): void => {
});
it('has the correct messages with namespaced method name', (): void => {
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 });
const latest = v1ToLatest(registry, contract.asV1);
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_psp22']['V1'] });
const latest = v1ToLatestCompatible(registry, contract.asV1);
expect(
latest.spec.messages.map(({ label }) => label.toString())
@@ -81,24 +87,32 @@ describe('v1ToLatest', (): void => {
latest.spec.constructors[0].args.map(({ label }) => label.toString())
).toEqual(['init_value']);
});
it('has the latest compatible version number', (): void => {
expect(latest.version.toString()).toEqual('4');
});
});
describe('v2ToLatest', (): void => {
describe('v2ToLatestCompatible', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 });
const latest = v2ToLatest(registry, contract.asV2);
const contract = registry.createType('ContractMetadata', { V2: abis['ink_v2_flipper']['V2'] });
const latest = v2ToLatestCompatible(registry, contract.asV2);
it('has the correct constructor flag', (): void => {
expect(
latest.spec.constructors[0].payable.isTrue
).toEqual(true);
});
it('has the latest compatible version number', (): void => {
expect(latest.version.toString()).toEqual('4');
});
});
describe('v3ToLatest', (): void => {
describe('v3ToLatestCompatible', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 });
const latest = v3ToLatest(registry, contract.asV3);
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_flipper']['V3'] });
const latest = v3ToLatestCompatible(registry, contract.asV3);
it('has the correct constructor flags', (): void => {
expect(
@@ -110,8 +124,8 @@ describe('v3ToLatest', (): void => {
});
it('has the correct messages', (): void => {
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 });
const latest = v3ToLatest(registry, contract.asV3);
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_traitErc20']['V3'] });
const latest = v3ToLatestCompatible(registry, contract.asV3);
expect(
latest.spec.messages.map(({ label }) => label.toString())
@@ -119,4 +133,61 @@ describe('v3ToLatest', (): void => {
'BaseErc20::total_supply', 'BaseErc20::balance_of', 'BaseErc20::allowance', 'BaseErc20::transfer', 'BaseErc20::approve', 'BaseErc20::transfer_from'
]);
});
it('has the latest compatible version number', (): void => {
expect(latest.version.toString()).toEqual('4');
});
});
describe('v4ToLatestCompatible', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V4: abis['ink_v4_flipperContract'] });
const latest = v4ToLatestCompatible(registry, contract.asV4);
it('has the correct constructor flags', (): void => {
expect(
latest.spec.constructors[0].payable.isTrue
).toEqual(false);
expect(
latest.spec.constructors[1].payable.isTrue
).toEqual(false);
});
it('has the latest compatible version number', (): void => {
expect(latest.version.toString()).toEqual('4');
});
});
describe('v5ToLatestCompatible', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V5: abis['ink_v5_erc20Metadata'] });
const latest = v5ToLatestCompatible(registry, contract.asV5);
it('has the correct messages', (): void => {
expect(
latest.spec.messages.map(({ label }) => label.toString())
).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
});
it('has new event fields', (): void => {
expect(
latest.spec.events.length
).toEqual(2);
expect(
latest.spec.events.every((e) => e.has('module_path'))
).toEqual(true);
expect(latest.spec.events[0].module_path.toString()).toEqual('erc20::erc20');
expect(
latest.spec.events.every((e) => e.has('signature_topic'))
).toEqual(true);
expect(latest.spec.events[0].signature_topic.toHex()).toEqual('0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb');
});
it('has the latest compatible version number', (): void => {
expect(latest.version.toString()).toEqual('5');
});
});
@@ -0,0 +1,47 @@
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataV4, ContractMetadataV5 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import type { ContractMetadataSupported } from './index.js';
import { v0ToV1 } from './toV1.js';
import { v1ToV2 } from './toV2.js';
import { v2ToV3 } from './toV3.js';
import { v3ToV4 } from './toV4.js';
// The versions where an enum is used, aka V0 is missing
// (Order from newest, i.e. we expect more on newest vs oldest)
export const enumVersions = ['V5', 'V4', 'V3', 'V2', 'V1'] as const;
type Versions = typeof enumVersions[number] | 'V0';
type Converter = (registry: Registry, vx: any) => ContractMetadataSupported;
// Helper to convert metadata from one step to the next
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataSupported, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataSupported {
return (registry: Registry, input: I): ContractMetadataSupported =>
next(registry, step(registry, input));
}
export function v5ToLatestCompatible (_registry: Registry, v5: ContractMetadataV5): ContractMetadataV5 {
return v5;
}
export function v4ToLatestCompatible (_registry: Registry, v4: ContractMetadataV4): ContractMetadataV4 {
return v4;
}
export const v3ToLatestCompatible = /*#__PURE__*/ createConverter(v4ToLatestCompatible, v3ToV4);
export const v2ToLatestCompatible = /*#__PURE__*/ createConverter(v3ToLatestCompatible, v2ToV3);
export const v1ToLatestCompatible = /*#__PURE__*/ createConverter(v2ToLatestCompatible, v1ToV2);
export const v0ToLatestCompatible = /*#__PURE__*/ createConverter(v1ToLatestCompatible, v0ToV1);
export const convertVersions: [Versions, Converter][] = [
['V5', v5ToLatestCompatible],
['V4', v4ToLatestCompatible],
['V3', v3ToLatestCompatible],
['V2', v2ToLatestCompatible],
['V1', v1ToLatestCompatible],
['V0', v0ToLatestCompatible]
];
+5 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
@@ -21,6 +21,10 @@ function v0ToV1Names (all: Named[]): unknown[] {
}
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
if (!v0.metadataVersion.length) {
throw new Error('Invalid format for V0 (detected) contract metadata');
}
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
spec: objectSpread({}, v0.spec, {
constructors: v0ToV1Names(v0.spec.constructors),
+3 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Text } from '@polkadot/types';
@@ -23,11 +23,11 @@ interface ArgsEntry <T extends WithArgs> extends NamedEntry {
args: GetArgsType<T>['args'][0][];
}
const ARG_TYPES = <const> {
const ARG_TYPES = {
ContractConstructorSpec: 'ContractMessageParamSpecV2',
ContractEventSpec: 'ContractEventParamSpecV2',
ContractMessageSpec: 'ContractMessageParamSpecV2'
};
} as const;
function v1ToV2Label (entry: NamedEntry): { label: Text } {
return objectSpread({}, entry, {
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataV2, ContractMetadataV3 } from '@polkadot/types/interfaces';
+21
View File
@@ -0,0 +1,21 @@
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { objectSpread } from '@polkadot/util';
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
return registry.createType('ContractMetadataV4', objectSpread({}, v3, {
spec: objectSpread({}, v3.spec, {
constructors: v3.spec.constructors.map((c) =>
registry.createType('ContractConstructorSpecV4', objectSpread({}, c))
),
messages: v3.spec.messages.map((m) =>
registry.createType('ContractMessageSpecV3', objectSpread({}, m))
)
}),
version: registry.createType('Text', '4')
}));
}
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment';
+14 -13
View File
@@ -1,29 +1,23 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// Copyright 2017-2024 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiBase } from '@polkadot/api/base';
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { WeightV2 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { ApiBase } from '@polkadot/api/base';
import { isFunction } from '@polkadot/util';
import { Abi } from '../Abi';
import { Abi } from '../Abi/index.js';
export abstract class Base<ApiType extends ApiTypes> {
public readonly abi: Abi;
public readonly api: ApiBase<ApiType>;
readonly abi: Abi;
readonly api: ApiBase<ApiType>;
protected readonly _decorateMethod: DecorateMethod<ApiType>;
protected readonly _isWeightV1: boolean;
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
this.abi = abi instanceof Abi
? abi
: new Abi(abi, api.registry.getChainProperties());
this.api = api;
this._decorateMethod = decorateMethod;
if (!api || !api.isConnected || !api.tx) {
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
} else if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
@@ -31,6 +25,13 @@ export abstract class Base<ApiType extends ApiTypes> {
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
}
this.abi = abi instanceof Abi
? abi
: new Abi(abi, api.registry.getChainProperties());
this.api = api;
this._decorateMethod = decorateMethod;
this._isWeightV1 = !api.registry.createType<WeightV2>('Weight').proofSize;
}
public get registry (): Registry {
+28 -24
View File
@@ -1,29 +1,27 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiBase } from '@polkadot/api/base';
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
import type { ISubmittableResult } from '@polkadot/types/types';
import type { AbiConstructor, BlueprintOptions } from '../types';
import type { MapConstructorExec } from './types';
import type { Abi } from '../Abi/index.js';
import type { AbiConstructor, BlueprintOptions } from '../types.js';
import type { MapConstructorExec } from './types.js';
import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base';
import { BN_ZERO, isUndefined } from '@polkadot/util';
import { Abi } from '../Abi';
import { applyOnEvent } from '../util';
import { Base } from './Base';
import { Contract } from './Contract';
import { createBluePrintTx, encodeSalt } from './util';
import { applyOnEvent } from '../util.js';
import { Base } from './Base.js';
import { Contract } from './Contract.js';
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
export interface BlueprintConstructor<ApiType extends ApiTypes> {
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
}
export type BlueprintConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array) => Blueprint<ApiType>;
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly contract?: Contract<ApiType>;
readonly contract?: Contract<ApiType> | undefined;
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
super(result);
@@ -36,7 +34,7 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
/**
* @description The on-chain code hash for this blueprint
*/
public readonly codeHash: Hash;
readonly codeHash: Hash;
readonly #tx: MapConstructorExec<ApiType> = {};
@@ -57,16 +55,22 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
}
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
const encSalt = encodeSalt(salt);
return this.api.tx.contracts
.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, encParams, encSalt)
.withResultTransform((result: ISubmittableResult) =>
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
))
);
return this.api.tx.contracts.instantiate(
value,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore jiggle v1 weights, metadata points to latest
this._isWeightV1
? convertWeight(gasLimit).v1Weight
: convertWeight(gasLimit).v2Weight,
storageDepositLimit,
this.codeHash,
this.abi.findConstructor(constructorOrId).toU8a(params),
encodeSalt(salt)
).withResultTransform((result: ISubmittableResult) =>
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
))
);
};
}
+8 -7
View File
@@ -1,18 +1,19 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
import path from 'path';
/// <reference types="@polkadot/dev-test/globals.d.ts" />
import fs from 'node:fs';
import { toPromiseMethod } from '@polkadot/api';
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
import { Code } from './Code';
import { mockApi } from './mock';
import { Code } from './Code.js';
import { mockApi } from './mock.js';
const v0wasmFlipper = fs.readFileSync(path.join(__dirname, '../test/contracts/ink/v0/flipper.wasm'));
const v0wasmFlipper = fs.readFileSync(new URL('../test/contracts/ink/v0/flipper.wasm', import.meta.url), 'utf-8');
describe('Code', (): void => {
it('can construct with an individual ABI/WASM combo', (): void => {
@@ -27,7 +28,7 @@ describe('Code', (): void => {
).not.toThrow();
});
it.only('can construct with an .contract ABI (v1)', (): void => {
it('can construct with an .contract ABI (v1)', (): void => {
expect(
() => new Code(mockApi, v1contractFlipper as Record<string, unknown>, null, toPromiseMethod)
).not.toThrow();
+47 -38
View File
@@ -1,34 +1,32 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiBase } from '@polkadot/api/base';
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
import type { ISubmittableResult } from '@polkadot/types/types';
import type { Codec } from '@polkadot/types-codec/types';
import type { AbiConstructor, BlueprintOptions } from '../types';
import type { MapConstructorExec } from './types';
import type { Abi } from '../Abi/index.js';
import type { AbiConstructor, BlueprintOptions } from '../types.js';
import type { MapConstructorExec } from './types.js';
import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base';
import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
import { BN_ZERO, compactAddLength, isRiscV, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
import { Abi } from '../Abi';
import { applyOnEvent } from '../util';
import { Base } from './Base';
import { Blueprint } from './Blueprint';
import { Contract } from './Contract';
import { createBluePrintTx, encodeSalt } from './util';
import { applyOnEvent } from '../util.js';
import { Base } from './Base.js';
import { Blueprint } from './Blueprint.js';
import { Contract } from './Contract.js';
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
export interface CodeConstructor<ApiType extends ApiTypes> {
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
}
export type CodeConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) => Code<ApiType>;
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly blueprint?: Blueprint<ApiType>;
public readonly contract?: Contract<ApiType>;
readonly blueprint?: Blueprint<ApiType> | undefined;
readonly contract?: Contract<ApiType> | undefined;
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>, contract?: Contract<ApiType>) {
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType> | undefined, contract?: Contract<ApiType> | undefined) {
super(result);
this.blueprint = blueprint;
@@ -36,20 +34,26 @@ export class CodeSubmittableResult<ApiType extends ApiTypes> extends Submittable
}
}
// checks to see if the code (or at least the header)
// is a valid/supported format
function isValidCode (code: Uint8Array): boolean {
return isWasm(code) || isRiscV(code);
}
export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
public readonly code: Uint8Array;
readonly code: Uint8Array;
readonly #tx: MapConstructorExec<ApiType> = {};
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined, decorateMethod: DecorateMethod<ApiType>) {
super(api, abi, decorateMethod);
this.code = isWasm(this.abi.info.source.wasm)
this.code = isValidCode(this.abi.info.source.wasm)
? this.abi.info.source.wasm
: u8aToU8a(wasm);
if (!isWasm(this.code)) {
throw new Error('No WASM code provided');
if (!isValidCode(this.code)) {
throw new Error('Invalid code provided');
}
this.abi.constructors.forEach((c): void => {
@@ -64,23 +68,28 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
}
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
const encCode = compactAddLength(this.code);
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
const encSalt = encodeSalt(salt);
return this.api.tx.contracts
.instantiateWithCode(value, gasLimit, storageDepositLimit, encCode, encParams, encSalt)
.withResultTransform((result: ISubmittableResult) =>
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
this.api.events.contracts.Instantiated.is(event)
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
: this.api.events.contracts.CodeStored.is(event)
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
: [blueprint, contract],
[])
) || []))
);
return this.api.tx.contracts.instantiateWithCode(
value,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore jiggle v1 weights, metadata points to latest
this._isWeightV1
? convertWeight(gasLimit).v1Weight
: convertWeight(gasLimit).v2Weight,
storageDepositLimit,
compactAddLength(this.code),
this.abi.findConstructor(constructorOrId).toU8a(params),
encodeSalt(salt)
).withResultTransform((result: ISubmittableResult) =>
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
records.reduce<[Blueprint<ApiType> | undefined, Contract<ApiType> | undefined]>(([blueprint, contract], { event }) =>
this.api.events.contracts.Instantiated.is(event)
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
: this.api.events.contracts.CodeStored.is(event)
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
: [blueprint, contract],
[undefined, undefined])
) || [undefined, undefined]))
);
};
}

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