[CI Skip] 1.14.0-beta.18

skip-checks: true
This commit is contained in:
Github Actions
2020-05-13 07:44:25 +00:00
parent e3abb95111
commit 3baf36e9e6
17 changed files with 214 additions and 100 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "1.14.0-beta.17",
"version": "1.14.0-beta.18",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
"keywords": [
@@ -27,13 +27,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@polkadot/api-derive": "1.14.0-beta.17",
"@polkadot/api-derive": "1.14.0-beta.18",
"@polkadot/keyring": "^2.10.0-beta.5",
"@polkadot/metadata": "1.14.0-beta.17",
"@polkadot/rpc-core": "1.14.0-beta.17",
"@polkadot/rpc-provider": "1.14.0-beta.17",
"@polkadot/types": "1.14.0-beta.17",
"@polkadot/types-known": "1.14.0-beta.17",
"@polkadot/metadata": "1.14.0-beta.18",
"@polkadot/rpc-core": "1.14.0-beta.18",
"@polkadot/rpc-provider": "1.14.0-beta.18",
"@polkadot/types": "1.14.0-beta.18",
"@polkadot/types-known": "1.14.0-beta.18",
"@polkadot/util": "^2.10.0-beta.5",
"@polkadot/util-crypto": "^2.10.0-beta.5",
"bn.js": "^5.1.1",
+4
View File
@@ -216,6 +216,10 @@ declare module '@polkadot/metadata/Decorated/consts/types' {
* The base weight of executing a block, independent of the transactions in the block.
**/
blockExecutionWeight: AugmentedConst<Weight>;
/**
* The maximum number of blocks to allow in mortal eras.
**/
blockHashCount: AugmentedConst<BlockNumber>;
/**
* The weight of runtime database operations the runtime can invoke.
**/
+3 -3
View File
@@ -17,7 +17,7 @@ import { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity
import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
import { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Hash, KeyTypeId, Moment, Perbill, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, Perbill, ValidatorId } from '@polkadot/types/interfaces/runtime';
import { Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
import { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
@@ -754,9 +754,9 @@ declare module '@polkadot/api/types/storage' {
**/
allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>> & QueryableStorageEntry<ApiType>;
/**
* Total weight for all extrinsics put together, for the current block.
* Total weight for all extrinsics for the current block.
**/
allExtrinsicsWeight: AugmentedQuery<ApiType, () => Observable<Option<Weight>>> & QueryableStorageEntry<ApiType>;
allExtrinsicsWeight: AugmentedQuery<ApiType, () => Observable<ExtrinsicsWeight>> & QueryableStorageEntry<ApiType>;
/**
* Map of block numbers to block hashes.
**/
+112 -23
View File
@@ -8,9 +8,11 @@ import { MemberCount, ProposalIndex } from '@polkadot/types/interfaces/collectiv
import { CodeHash, Gas, Schedule } from '@polkadot/types/interfaces/contracts';
import { AccountVote, Conviction, PropIndex, Proposal, ReferendumIndex } from '@polkadot/types/interfaces/democracy';
import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
import { EquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
import { IdentityFields, IdentityInfo, IdentityJudgement, RegistrarIndex } from '@polkadot/types/interfaces/identity';
import { Heartbeat } from '@polkadot/types/interfaces/imOnline';
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Perbill } from '@polkadot/types/interfaces/runtime';
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Perbill, Weight } from '@polkadot/types/interfaces/runtime';
import { Period, Priority } from '@polkadot/types/interfaces/scheduler';
import { Keys } from '@polkadot/types/interfaces/session';
import { SocietyJudgement } from '@polkadot/types/interfaces/society';
import { CompactAssignments, EraIndex, PhragmenScore, RewardDestination, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
@@ -774,9 +776,16 @@ declare module '@polkadot/api/types/submittable' {
grandpa: {
[index: string]: SubmittableExtrinsicFunction<ApiType>;
/**
* Report some misbehavior.
* Report voter equivocation/misbehavior. This method will verify the
* equivocation proof and validate the given key ownership proof
* against the extracted offender. If both are valid, the offence
* will be reported.
*
* Since the weight of the extrinsic is 0, in order to avoid DoS by
* submission of invalid equivocation reports, a mandatory pre-validation of
* the extrinsic is implemented in a `SignedExtension`.
**/
reportMisbehavior: AugmentedSubmittable<(report: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
reportEquivocation: AugmentedSubmittable<(equivocationProof: EquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
};
identity: {
[index: string]: SubmittableExtrinsicFunction<ApiType>;
@@ -793,7 +802,6 @@ declare module '@polkadot/api/types/submittable' {
* - `O(R)` where `R` registrar-count (governance-bounded and code-bounded).
* - One storage mutation (codec `O(R)`).
* - One event.
* - Benchmark: 24.63 + R * 0.53 µs (min squares analysis)
* # </weight>
**/
addRegistrar: AugmentedSubmittable<(account: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -813,8 +821,7 @@ declare module '@polkadot/api/types/submittable' {
* - `O(R + X)`.
* - One balance-reserve operation.
* - One storage mutation `O(R + X)`.
* - One event.
* - Benchmark: 50.05 + R * 0.321 + X * 1.688 µs (min squares analysis)
* - One event
* # </weight>
**/
cancelRequest: AugmentedSubmittable<(regIndex: RegistrarIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -836,9 +843,6 @@ declare module '@polkadot/api/types/submittable' {
* - One balance-unreserve operation.
* - `2` storage reads and `S + 2` storage deletions.
* - One event.
* - Benchmarks:
* - 57.36 + R * 0.019 + S * 2.577 + X * 0.874 µs (median slopes analysis)
* - 57.06 + R * 0.006 + S * 2.579 + X * 0.878 µs (min squares analysis)
* # </weight>
**/
clearIdentity: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
@@ -861,7 +865,6 @@ declare module '@polkadot/api/types/submittable' {
* - One balance-reserve operation.
* - `S + 2` storage mutations.
* - One event.
* - Benchmark: 101.9 + R * 0.091 + S * 2.589 + X * 0.871 µs (min squares analysis)
* # </weight>
**/
killIdentity: AugmentedSubmittable<(target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -884,7 +887,6 @@ declare module '@polkadot/api/types/submittable' {
* - Up to one account-lookup operation.
* - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.
* - One event.
* - Benchmark: 47.77 + R * 0.336 + X * 1.664 µs (min squares analysis)
* # </weight>
**/
provideJudgement: AugmentedSubmittable<(regIndex: Compact<RegistrarIndex> | AnyNumber | Uint8Array, target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, judgement: IdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -911,7 +913,6 @@ declare module '@polkadot/api/types/submittable' {
* - One balance-reserve operation.
* - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.
* - One event.
* - Benchmark: 59.02 + R * 0.488 + X * 1.7 µs (min squares analysis)
* # </weight>
**/
requestJudgement: AugmentedSubmittable<(regIndex: Compact<RegistrarIndex> | AnyNumber | Uint8Array, maxFee: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -927,7 +928,7 @@ declare module '@polkadot/api/types/submittable' {
* # <weight>
* - `O(R)`.
* - One storage mutation `O(R)`.
* - Benchmark: 10.05 + R * 0.438 µs (min squares analysis)
* - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)
* # </weight>
**/
setAccountId: AugmentedSubmittable<(index: Compact<RegistrarIndex> | AnyNumber | Uint8Array, updated: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -943,7 +944,7 @@ declare module '@polkadot/api/types/submittable' {
* # <weight>
* - `O(R)`.
* - One storage mutation `O(R)`.
* - Benchmark: 8.848 + R * 0.425 µs (min squares analysis)
* - Benchmark: 7.315 + R * 0.329 µs (min squares analysis)
* # </weight>
**/
setFee: AugmentedSubmittable<(index: Compact<RegistrarIndex> | AnyNumber | Uint8Array, fee: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -959,7 +960,7 @@ declare module '@polkadot/api/types/submittable' {
* # <weight>
* - `O(R)`.
* - One storage mutation `O(R)`.
* - Benchmark: 8.985 + R * 0.413 µs (min squares analysis)
* - Benchmark: 7.464 + R * 0.325 µs (min squares analysis)
* # </weight>
**/
setFields: AugmentedSubmittable<(index: Compact<RegistrarIndex> | AnyNumber | Uint8Array, fields: IdentityFields) => SubmittableExtrinsic<ApiType>>;
@@ -982,7 +983,6 @@ declare module '@polkadot/api/types/submittable' {
* - One balance reserve operation.
* - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).
* - One event.
* - Benchmark: 59.44 + R * 0.389 + X * 1.434 µs (min squares analysis)
* # </weight>
**/
setIdentity: AugmentedSubmittable<(info: IdentityInfo | { additional?: any; display?: any; legal?: any; web?: any; riot?: any; email?: any; pgpFingerprint?: any; image?: any; twitter?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -1007,7 +1007,6 @@ declare module '@polkadot/api/types/submittable' {
* - One storage read (codec complexity `O(P)`).
* - One storage write (codec complexity `O(S)`).
* - One storage-exists (`IdentityOf::contains_key`).
* - Benchmark: 39.43 + P * 2.522 + S * 3.698 µs (min squares analysis)
* # </weight>
**/
setSubs: AugmentedSubmittable<(subs: Vec<ITuple<[AccountId, Data]>> | ([AccountId | string | Uint8Array, Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>>;
@@ -1309,6 +1308,61 @@ declare module '@polkadot/api/types/submittable' {
**/
vouchRecovery: AugmentedSubmittable<(lost: AccountId | string | Uint8Array, rescuer: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
};
scheduler: {
[index: string]: SubmittableExtrinsicFunction<ApiType>;
/**
* Cancel an anonymously scheduled task.
*
* # <weight>
* - S = Number of already scheduled calls
* - Base Weight: 22.15 + 2.869 * S µs
* - DB Weight:
* - Read: Agenda
* - Write: Agenda, Lookup
* - Will use base weight of 100 which should be good for up to 30 scheduled calls
* # </weight>
**/
cancel: AugmentedSubmittable<(when: BlockNumber | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Cancel a named scheduled task.
*
* # <weight>
* - S = Number of already scheduled calls
* - Base Weight: 24.91 + 2.907 * S µs
* - DB Weight:
* - Read: Agenda, Lookup
* - Write: Agenda, Lookup
* - Will use base weight of 100 which should be good for up to 30 scheduled calls
* # </weight>
**/
cancelNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Anonymously schedule a task.
*
* # <weight>
* - S = Number of already scheduled calls
* - Base Weight: 22.29 + .126 * S µs
* - DB Weight:
* - Read: Agenda
* - Write: Agenda
* - Will use base weight of 25 which should be good for up to 30 scheduled calls
* # </weight>
**/
schedule: AugmentedSubmittable<(when: BlockNumber | AnyNumber | Uint8Array, maybePeriodic: Option<Period> | null | object | string | Uint8Array, priority: Priority | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Schedule a named task.
*
* # <weight>
* - S = Number of already scheduled calls
* - Base Weight: 29.6 + .159 * S µs
* - DB Weight:
* - Read: Agenda, Lookup
* - Write: Agenda, Lookup
* - Will use base weight of 35 which should be good for more than 30 scheduled calls
* # </weight>
**/
scheduleNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array, when: BlockNumber | AnyNumber | Uint8Array, maybePeriodic: Option<Period> | null | object | string | Uint8Array, priority: Priority | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
};
session: {
[index: string]: SubmittableExtrinsicFunction<ApiType>;
/**
@@ -2107,6 +2161,19 @@ declare module '@polkadot/api/types/submittable' {
* # </weight>
**/
sudoAs: AugmentedSubmittable<(who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Authenticates the sudo key and dispatches a function call with `Root` origin.
* This function does not check the weight of the call, and instead allows the
* Sudo user to specify the weight of the call.
*
* The dispatch origin for this call must be _Signed_.
*
* # <weight>
* - O(1).
* - The weight of this call is defined by the caller.
* # </weight>
**/
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array, weight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
};
system: {
[index: string]: SubmittableExtrinsicFunction<ApiType>;
@@ -2117,18 +2184,25 @@ declare module '@polkadot/api/types/submittable' {
/**
* Kill all storage items with a key that starts with the given prefix.
*
* **NOTE:** We rely on the Root origin to provide us the number of subkeys under
* the prefix we are removing to accurately calculate the weight of this function.
*
* # <weight>
* - `O(P)` where `P` amount of keys with prefix `prefix`
* - `P` storage deletions.
* - Base Weight: 0.834 * P µs
* - Writes: Number of subkeys + 1
* # </weight>
**/
killPrefix: AugmentedSubmittable<(prefix: Key | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
killPrefix: AugmentedSubmittable<(prefix: Key | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Kill some items from storage.
*
* # <weight>
* - `O(VK)` where `V` length of `keys` and `K` length of one key
* - `V` storage deletions.
* - `O(IK)` where `I` length of `keys` and `K` length of one key
* - `I` storage deletions.
* - Base Weight: .378 * i µs
* - Writes: Number of items
* # </weight>
**/
killStorage: AugmentedSubmittable<(keys: Vec<Key> | (Key | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
@@ -2137,6 +2211,8 @@ declare module '@polkadot/api/types/submittable' {
*
* # <weight>
* - `O(1)`
* - Base Weight: 0.665 µs, independent of remark length.
* - No DB operations.
* # </weight>
**/
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -2144,9 +2220,12 @@ declare module '@polkadot/api/types/submittable' {
* Set the new changes trie configuration.
*
* # <weight>
* - `O(D)` where `D` length of `Digest`
* - `O(1)`
* - 1 storage write or delete (codec `O(1)`).
* - 1 call to `deposit_log`: `O(D)` (which depends on the length of `Digest`)
* - 1 call to `deposit_log`: Uses `append` API, so O(1)
* - Base Weight: 7.218 µs
* - DB Weight:
* - Writes: Changes Trie, System Digest
* # </weight>
**/
setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option<ChangesTrieConfiguration> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -2158,6 +2237,8 @@ declare module '@polkadot/api/types/submittable' {
* - 1 storage write (codec `O(C)`).
* - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).
* - 1 event.
* The weight of this function is dependent on the runtime, but generally this is very expensive.
* We will treat this as a full block.
* # </weight>
**/
setCode: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -2168,6 +2249,7 @@ declare module '@polkadot/api/types/submittable' {
* - `O(C)` where `C` length of `code`
* - 1 storage write (codec `O(C)`).
* - 1 event.
* The weight of this function is dependent on the runtime. We will treat this as a full block.
* # </weight>
**/
setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -2177,6 +2259,8 @@ declare module '@polkadot/api/types/submittable' {
* # <weight>
* - `O(1)`
* - 1 storage write.
* - Base Weight: 1.405 µs
* - 1 write to HEAP_PAGES
* # </weight>
**/
setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
@@ -2186,6 +2270,8 @@ declare module '@polkadot/api/types/submittable' {
* # <weight>
* - `O(I)` where `I` length of `items`
* - `I` storage writes (`O(1)`).
* - Base Weight: 0.568 * i µs
* - Writes: Number of items
* # </weight>
**/
setStorage: AugmentedSubmittable<(items: Vec<KeyValue> | (KeyValue)[]) => SubmittableExtrinsic<ApiType>>;
@@ -2196,6 +2282,9 @@ declare module '@polkadot/api/types/submittable' {
* # <weight>
* - `O(1)`
* - 1 storage read and deletion.
* --------------------
* Base Weight: 8.626 µs
* No DB Read or Write operations because caller is already in overlay
* # </weight>
**/
suicide: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
@@ -2311,7 +2400,7 @@ declare module '@polkadot/api/types/submittable' {
* - `O(T)` where `T` complexity of `on_timestamp_set`
* - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`)
* - 1 event handler `on_timestamp_set` `O(T)`.
* - Benchmark: 8.523 (min squares analysis)
* - Benchmark: 7.678 (min squares analysis)
* - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers.
* New benchmarking is needed when adding new handlers.
* # </weight>