Compare commits

...
27 Commits
Author SHA1 Message Date
github-actions[bot] bb75b42273 [CI Skip] release/stable 7.14.2
skip-checks: true
2022-03-28 05:23:21 +00:00
Jaco 949e429d04 Don't export ScProvider top-level in @polkadot/rpc-provider (#4694)
* Don't export `ScProvider` top-level in `@polkadot/rpc-provider`

* 7.14.2
2022-03-28 08:12:33 +03:00
github-actions[bot] 0b1c20efd7 [CI Skip] release/stable 7.14.1
skip-checks: true
2022-03-27 08:29:36 +00:00
Jaco 0536998766 Correct release to 7.14.1 (#4691) 2022-03-27 11:19:58 +03:00
Jaco 22651eb4b8 8.14.1 (#4690) 2022-03-27 11:00:19 +03:00
github-actions[bot] 48414bdb34 [CI Skip] release/beta 7.13.2-10
skip-checks: true
2022-03-27 06:34:39 +00:00
Jaco 2ff6a85fb3 Bump TypeScript (#4689) 2022-03-27 09:27:11 +03:00
github-actions[bot] 8be1f337a8 [CI Skip] release/beta 7.13.2-9
skip-checks: true
2022-03-25 16:31:07 +00:00
Jaco 2c7056da25 Bump dev (& update CHANGELOG) (#4687) 2022-03-25 18:20:15 +02:00
github-actions[bot] b53c22d6d3 [CI Skip] release/beta 7.13.2-8
skip-checks: true
2022-03-25 15:56:15 +00:00
Josep M SobrepereandJaco 17f316b7c7 Add smoldot rpc provider (#4672)
* Add smoldot rpc provider

* remove smoldot references and fix lint issues

* fix wrong export

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

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

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

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

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

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

* fix linting on `createScClient.ts`

* fix linting on `Health.ts`

* use @polkadotjs/utils

* remove @substrate/connect

* add @substrate/connect

* fixt linting issues

* export `ScProvider` class

* fix connecting to dependency

* make ScProvider lazy

* dendency -> sharedSandbox

* use @substrate/connect@0.7.0-alpha.0

* fix bundle.ts export

Co-authored-by: Jaco <jacogr@gmail.com>
2022-03-25 17:46:24 +02:00
github-actions[bot] b44fcc90b2 [CI Skip] release/beta 7.13.2-7
skip-checks: true
2022-03-24 18:19:20 +00:00
Jaco b4e477a8c1 Remove all README links (#4685) 2022-03-24 20:09:16 +02:00
github-actions[bot] 4b921c8a55 [CI Skip] release/beta 7.13.2-6
skip-checks: true
2022-03-24 10:13:45 +00:00
Yaroslav Bolyukin e53231b70a Support BTreeMap/BTreeSet in typegen (#4682) 2022-03-24 12:04:14 +02:00
github-actions[bot] afd1db58ac [CI Skip] release/beta 7.13.2-5
skip-checks: true
2022-03-23 14:18:04 +00:00
Jaco 63ba84a641 Clear connection timeout on disconnect (#4681) 2022-03-23 16:09:25 +02:00
github-actions[bot] 044aecbfc3 [CI Skip] release/beta 7.13.2-4
skip-checks: true
2022-03-23 05:29:10 +00:00
Jaco e573c26df3 Bump dev (#4679) 2022-03-23 07:19:33 +02:00
github-actions[bot] 31e7de31f3 [CI Skip] release/beta 7.13.2-3
skip-checks: true
2022-03-22 14:26:51 +00:00
Jaco 7cd9c16eae Add dev_getBlockStats RPC (#4677)
* Add dev_getBlockStats RPC

* CHANGELOG
2022-03-22 16:18:13 +02:00
github-actions[bot] 2b1a7da446 [CI Skip] release/beta 7.13.2-2
skip-checks: true
2022-03-22 07:49:36 +00:00
Jaco 9399c8d24f Output BitVec toHuman to LSB (limit support) (#4676) 2022-03-22 09:41:17 +02:00
github-actions[bot] 798e5fcc78 [CI Skip] release/beta 7.13.2-1
skip-checks: true
2022-03-22 07:05:38 +00:00
Jaco d8ad237b00 Add total.bytes{Recv, Sent} to provider stats (#4671) 2022-03-22 08:54:42 +02:00
github-actions[bot] 550cb10766 [CI Skip] release/beta 7.13.2-0
skip-checks: true
2022-03-22 06:52:53 +00:00
Jaco a44108c3f3 Exatra BitVec namespaces top-level (#4674) 2022-03-22 08:43:08 +02:00
60 changed files with 1997 additions and 449 deletions
+2
View File
@@ -48,3 +48,5 @@
6.10.3
7.0.2
7.14.2
+23
View File
@@ -1,5 +1,28 @@
# CHANGELOG
## 7.14.2 Mat 28, 2022
Changes:
- Don't export `ScProvider` top-level in `@polkadot/rpc-provider`
## 7.14.1 Mar 27, 2022
Contributed:
- Add `ScProvider` for `@substrate/substrate-connect` (Thanks to https://github.com/josepot)
- Add support for `BTree{Map, Set}` in typegen (Thanks to https://github.com/CertainLach)
Changes:
- Only explicitly support LSB on `BitVec` types
- Change `toHuman()` on `BitVec` to output default LSB
- Add `bytes{Sent, Recv}` to provider stats
- Clear connection timout on provider `disconnect()`
- Add support for `dev_getBlockStats` RPC
## 7.13.1 Mar 19, 2022
**Important** This contains an upgraded version of `@polkadot/wasm-crypto`. For users of asm.js, e.g. React Native, there are some additional upgrade instructions in the release notes for this version https://github.com/polkadot-js/wasm/releases/tag/v5.0.1
+3 -1
View File
@@ -1,4 +1,4 @@
2873 Jaco 7.13.1 (#4670)
2885 Jaco Don't export `ScProvider` top-level in `@polkadot/rpc-provider` (#4694)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
@@ -65,6 +65,7 @@
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
1 Joey don't throw error at `onSocketClose` (#4363)
1 Jordan Allow typegen for custom RPCs (#2876)
1 Josep M Sobrepere Add smoldot rpc provider (#4672)
1 JQQQ Allow rpc expose definition/ metadata (#3488)
1 Kian Paimani Update definitions.ts (#2514)
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
@@ -93,6 +94,7 @@
1 Sergei Pepyakin INK! -> ink! (#1347)
1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 Yaroslav Bolyukin Support BTreeMap/BTreeSet in typegen (#4682)
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)
-14
View File
@@ -14,17 +14,3 @@ If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.m
## tutorials
Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
## overview
The API is split up into a number of internal packages -
- [@polkadot/api](packages/api/) The API library, providing both Promise and RxJS Observable-based interfaces. This is the main user-facing entry point.
- [@polkadot/api-derive](packages/api-derive/) Derived results that are injected into the API, allowing for combinations of various query results (only used internally and exposed on the Api instances via `api.derive.*`)
- [@polkadot/metadata](packages/metadata/) Base extrinsic, storage and constant injectors for injection
- [@polkadot/rpc-core](packages/rpc-core/) Wrapper around all [JSON-RPC methods](https://polkadot.js.org/docs/substrate/rpc) exposed by a Polkadot network client
- [@polkadot/rpc-provider](packages/rpc-provider/) Providers for connecting to nodes, including WebSockets and Http
Type definitions for interfaces as exposed by Polkadot & Substrate clients -
- [@polkadot/types](packages/types/) Codecs for all Polkadot and Substrate primitives
+3
View File
@@ -15,5 +15,8 @@ module.exports = {
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
"transformIgnorePatterns": [
'/node_modules/(?!@polkadot|@substrate/connect|@babel/runtime/helpers/esm/)'
],
testTimeout: 30000
};
+3 -3
View File
@@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "7.13.1",
"version": "7.14.2",
"workspaces": [
"packages/*"
],
@@ -34,12 +34,12 @@
"@babel/core": "^7.17.8",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.8",
"@polkadot/dev": "^0.65.97",
"@polkadot/dev": "^0.65.101",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.4.1",
"copyfiles": "^2.4.1"
},
"resolutions": {
"typescript": "^4.6.2"
"typescript": "^4.6.3"
}
}
+8 -8
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/api-base": "7.13.1",
"@polkadot/rpc-augment": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-augment": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/util": "^8.6.1"
"@polkadot/api-base": "7.14.2",
"@polkadot/rpc-augment": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/types-augment": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/util": "^8.7.1"
},
"devDependencies": {
"@polkadot/types-support": "7.13.1"
"@polkadot/types-support": "7.14.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.14.2' };
+4 -4
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/rpc-core": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/rpc-core": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/util": "^8.7.1",
"rxjs": "^7.5.5"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.14.2' };
+9 -9
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/api": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/types-create": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/util-crypto": "^8.6.1",
"@polkadot/api": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/types-create": "7.14.2",
"@polkadot/util": "^8.7.1",
"@polkadot/util-crypto": "^8.7.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "7.13.1",
"@polkadot/keyring": "^8.6.1"
"@polkadot/api-augment": "7.14.2",
"@polkadot/keyring": "^8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.14.2' };
+14 -14
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/api": "7.13.1",
"@polkadot/api-augment": "7.13.1",
"@polkadot/api-base": "7.13.1",
"@polkadot/rpc-core": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/util-crypto": "^8.6.1",
"@polkadot/api": "7.14.2",
"@polkadot/api-augment": "7.14.2",
"@polkadot/api-base": "7.14.2",
"@polkadot/rpc-core": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/util": "^8.7.1",
"@polkadot/util-crypto": "^8.7.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api": "7.13.1",
"@polkadot/api-augment": "7.13.1",
"@polkadot/rpc-augment": "7.13.1",
"@polkadot/rpc-provider": "7.13.1",
"@polkadot/types-support": "7.13.1"
"@polkadot/api": "7.14.2",
"@polkadot/api-augment": "7.14.2",
"@polkadot/rpc-augment": "7.14.2",
"@polkadot/rpc-provider": "7.14.2",
"@polkadot/types-support": "7.14.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.14.2' };
+17 -17
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/api-augment": "7.13.1",
"@polkadot/api-base": "7.13.1",
"@polkadot/api-derive": "7.13.1",
"@polkadot/keyring": "^8.6.1",
"@polkadot/rpc-augment": "7.13.1",
"@polkadot/rpc-core": "7.13.1",
"@polkadot/rpc-provider": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-augment": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/types-create": "7.13.1",
"@polkadot/types-known": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/util-crypto": "^8.6.1",
"@polkadot/api-augment": "7.14.2",
"@polkadot/api-base": "7.14.2",
"@polkadot/api-derive": "7.14.2",
"@polkadot/keyring": "^8.7.1",
"@polkadot/rpc-augment": "7.14.2",
"@polkadot/rpc-core": "7.14.2",
"@polkadot/rpc-provider": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/types-augment": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/types-create": "7.14.2",
"@polkadot/types-known": "7.14.2",
"@polkadot/util": "^8.7.1",
"@polkadot/util-crypto": "^8.7.1",
"eventemitter3": "^4.0.7",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "7.13.1",
"@polkadot/types-support": "7.13.1"
"@polkadot/api-augment": "7.14.2",
"@polkadot/types-support": "7.14.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.14.2' };
+5 -5
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/rpc-core": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/util": "^8.6.1"
"@polkadot/rpc-core": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/util": "^8.7.1"
}
}
@@ -12,6 +12,7 @@ import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
import type { BlockStats } from '@polkadot/types/interfaces/dev';
import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
@@ -155,6 +156,12 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
**/
uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;
};
dev: {
/**
* Reexecute the specified `block_hash` and gather statistics while doing so
**/
getBlockStats: AugmentedRpc<(at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>>;
};
engine: {
/**
* Instructs the manual-seal authorship task to create a new block
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.14.2' };
+7 -7
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/rpc-augment": "7.13.1",
"@polkadot/rpc-provider": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/rpc-augment": "7.14.2",
"@polkadot/rpc-provider": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/util": "^8.7.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^8.6.1",
"@polkadot/rpc-augment": "7.13.1"
"@polkadot/keyring": "^8.7.1",
"@polkadot/rpc-augment": "7.14.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.14.2' };
+3 -1
View File
@@ -36,7 +36,9 @@ describe('replay', (): void => {
const observable = rpc.system.chain();
let a: any | undefined;
observable.subscribe((value?: unknown): void => { a = value; });
observable.subscribe((value?: unknown): void => {
a = value;
});
setTimeout((): void => {
// Subscribe again to the same observable, it should fire value immediately
+3 -1
View File
@@ -14,7 +14,9 @@ describe('drr', (): void => {
it('should not fire twice the same value', (done): void => {
let count = 0;
const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => { ++count; });
const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => {
++count;
});
setTimeout((): void => {
expect(count).toBe(1);
+23 -2
View File
@@ -4,9 +4,9 @@ Generic transport providers to handle the transport of method calls to and from
## Provider Selection
There are two flavours of the providers provided, one allowing for using HTTP as a transport mechanism, the other using WebSockets. It is generally recommended to use the [[WsProvider]] since in addition to standard calls, it allows for subscriptions where all changes to state can be pushed from the node to the client.
There are three flavours of the providers provided, one allowing for using HTTP as a transport mechanism, the other using WebSockets, and the third one uses substrate light-client through @substrate/connect. It is generally recommended to use the [[WsProvider]] since in addition to standard calls, it allows for subscriptions where all changes to state can be pushed from the node to the client.
Both providers are usable (as is the API), in both browser-based and Node.js environments. Polyfills for unsupported functionality are automatically applied based on feature-detection.
All providers are usable (as is the API), in both browser-based and Node.js environments. Polyfills for unsupported functionality are automatically applied based on feature-detection.
## Usage
@@ -39,3 +39,24 @@ const version = await provider.send('chain_getBlockHash', []);
console.log('latest block Hash', hash);
```
@substrate/connect Initialization -
Instantiating a Provider for the Polkadot Relay Chain:
```javascript
import { ScProvider } from '@polkadot/rpc-provider';
const provider = new ScProvider(SupportedChains.polkadot);
await provider.connect();
const version = await provider.send('chain_getBlockHash', []);
```
Instantiating a Provider for a Polkadot parachain:
```javascript
import { ScProvider } from '@polkadot/rpc-provider';
const polkadotProvider = new ScProvider(SupportedChains.polkadot);
const parachainProvider = new ScProvider(parachainSpec, polkadotProvider);
await parachainProvider.connect();
const version = await parachainProvider.send('chain_getBlockHash', []);
```
+10 -9
View File
@@ -20,18 +20,19 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/keyring": "^8.6.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-support": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/util-crypto": "^8.6.1",
"@polkadot/x-fetch": "^8.6.1",
"@polkadot/x-global": "^8.6.1",
"@polkadot/x-ws": "^8.6.1",
"@polkadot/keyring": "^8.7.1",
"@polkadot/types": "7.14.2",
"@polkadot/types-support": "7.14.2",
"@polkadot/util": "^8.7.1",
"@polkadot/util-crypto": "^8.7.1",
"@polkadot/x-fetch": "^8.7.1",
"@polkadot/x-global": "^8.7.1",
"@polkadot/x-ws": "^8.7.1",
"@substrate/connect": "0.7.0-alpha.0",
"eventemitter3": "^4.0.7",
"mock-socket": "^9.1.2",
"nock": "^13.2.4"
+3
View File
@@ -4,3 +4,6 @@
export { HttpProvider } from './http';
export { packageInfo } from './packageInfo';
export { WsProvider } from './ws';
// ESM-only, only export top-level when we have dual versions
// export { ScProvider } from './substrate-connect';
+7 -3
View File
@@ -56,7 +56,7 @@ export class HttpProvider implements ProviderInterface {
this.#headers = headers;
this.#stats = {
active: { requests: 0, subscriptions: 0 },
total: { cached: 0, requests: 0, subscriptions: 0, timeout: 0 }
total: { bytesRecv: 0, bytesSent: 0, cached: 0, requests: 0, subscriptions: 0, timeout: 0 }
};
}
@@ -142,6 +142,7 @@ export class HttpProvider implements ProviderInterface {
async #send <T> (body: string): Promise<T> {
this.#stats.active.requests++;
this.#stats.total.bytesSent += body.length;
try {
const response = await fetch(this.#endpoint, {
@@ -157,8 +158,11 @@ export class HttpProvider implements ProviderInterface {
assert(response.ok, () => `[${response.status}]: ${response.statusText}`);
const result = (await response.json()) as JsonRpcResponse;
const decoded = this.#coder.decodeResponse(result) as T;
const result = await response.text();
this.#stats.total.bytesRecv += result.length;
const decoded = this.#coder.decodeResponse(JSON.parse(result) as JsonRpcResponse) as T;
this.#stats.active.requests--;
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.14.2' };
@@ -0,0 +1,347 @@
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { assert } from '@polkadot/util';
export interface SmoldotHealth {
isSyncing: boolean
peers: number
shouldHavePeers: boolean
}
export interface HealthChecker {
setSendJsonRpc(sendRequest: (request: string) => void): void
start(healthCallback: (health: SmoldotHealth) => void): void
stop(): void
sendJsonRpc(request: string): void
responsePassThrough(response: string): string | null
}
/*
* Creates a new health checker.
*
* The role of the health checker is to report to the user the health of a smoldot chain.
*
* In order to use it, start by creating a health checker, and call `setSendJsonRpc` to set the
* way to send a JSON-RPC request to a chain. The health checker is disabled by default. Use
* `start()` in order to start the health checks. The `start()` function must be passed a callback called
* when an update to the health of the node is available.
*
* In order to send a JSON-RPC request to the chain, you **must** use the `sendJsonRpc` function
* of the health checker. The health checker rewrites the `id` of the requests it receives.
*
* When the chain send a JSON-RPC response, it must be passed to `responsePassThrough()`. This
* function intercepts the responses destined to the requests that have been emitted by the health
* checker and returns `null`. If the response doesn't concern the health checker, the response is
* simply returned by the function.
*
* # How it works
*
* The health checker periodically calls the `system_health` JSON-RPC call in order to determine
* the health of the chain.
*
* In addition to this, as long as the health check reports that `isSyncing` is `true`, the
* health checker also maintains a subscription to new best blocks using `chain_subscribeNewHeads`.
* Whenever a new block is notified, a health check is performed immediately in order to determine
* whether `isSyncing` has changed to `false`.
*
* Thanks to this subscription, the latency of the report of the switch from `isSyncing: true` to
* `isSyncing: false` is very low.
*
*/
export function healthChecker (): HealthChecker {
// `null` if health checker is not started.
let checker: null | InnerChecker = null;
let sendJsonRpc: null | ((request: string) => void) = null;
return {
responsePassThrough: (jsonRpcResponse) => {
if (checker === null) {
return jsonRpcResponse;
}
return checker.responsePassThrough(jsonRpcResponse);
},
sendJsonRpc: (request) => {
assert(
sendJsonRpc,
'setSendJsonRpc must be called before sending requests'
);
if (checker === null) {
sendJsonRpc(request);
} else {
checker.sendJsonRpc(request);
}
},
setSendJsonRpc: (cb) => {
sendJsonRpc = cb;
},
start: (healthCallback) => {
assert(
checker === null,
"Can't start the health checker multiple times in parallel"
);
assert(
sendJsonRpc,
'setSendJsonRpc must be called before starting the health checks'
);
checker = new InnerChecker(healthCallback, sendJsonRpc);
checker.update(true);
},
stop: () => {
if (checker === null) {
return;
} // Already stopped.
checker.destroy();
checker = null;
}
};
}
class InnerChecker {
#healthCallback: (health: SmoldotHealth) => void;
#currentHealthCheckId: string | null = null;
#currentHealthTimeout: ReturnType<typeof setTimeout> | null = null;
#currentSubunsubRequestId: string | null = null;
#currentSubscriptionId: string | null = null;
#requestToSmoldot: (request: string) => void;
#isSyncing = false;
#nextRequestId = 0;
constructor (
healthCallback: (health: SmoldotHealth) => void,
requestToSmoldot: (request: string) => void
) {
this.#healthCallback = healthCallback;
this.#requestToSmoldot = requestToSmoldot;
}
sendJsonRpc = (request: string): void => {
// Replace the `id` in the request to prefix the request ID with `extern:`.
let parsedRequest: {id: string | number};
try {
parsedRequest = JSON.parse(request) as {id: string | number};
} catch (err) {
return;
}
if (parsedRequest.id) {
const newId = 'extern:' + JSON.stringify(parsedRequest.id);
parsedRequest.id = newId;
}
this.#requestToSmoldot(JSON.stringify(parsedRequest));
};
responsePassThrough = (jsonRpcResponse: string): string | null => {
let parsedResponse: {id: string, result?: SmoldotHealth, params?: { subscription: string }};
try {
parsedResponse = JSON.parse(jsonRpcResponse) as {id: string, result: undefined | SmoldotHealth};
} catch (err) {
return jsonRpcResponse;
}
// Check whether response is a response to `system_health`.
if (parsedResponse.id && this.#currentHealthCheckId === parsedResponse.id) {
this.#currentHealthCheckId = null;
// Check whether query was successful. It is possible for queries to fail for
// various reasons, such as the client being overloaded.
if (!parsedResponse.result) {
this.update(false);
return null;
}
this.#healthCallback(parsedResponse.result);
this.#isSyncing = parsedResponse.result.isSyncing;
this.update(false);
return null;
}
// Check whether response is a response to the subscription or unsubscription.
if (
parsedResponse.id &&
this.#currentSubunsubRequestId === parsedResponse.id
) {
this.#currentSubunsubRequestId = null;
// Check whether query was successful. It is possible for queries to fail for
// various reasons, such as the client being overloaded.
if (!parsedResponse.result) {
this.update(false);
return null;
}
if (this.#currentSubscriptionId) {
this.#currentSubscriptionId = null;
} else {
this.#currentSubscriptionId = parsedResponse.result as unknown as string;
}
this.update(false);
return null;
}
// Check whether response is a notification to a subscription.
if (
parsedResponse.params &&
this.#currentSubscriptionId &&
parsedResponse.params.subscription === this.#currentSubscriptionId
) {
// Note that after a successful subscription, a notification containing
// the current best block is always returned. Considering that a
// subscription is performed in response to a health check, calling
// `startHealthCheck()` here will lead to a second health check.
// It might seem redundant to perform two health checks in a quick
// succession, but doing so doesn't lead to any problem, and it is
// actually possible for the health to have changed in between as the
// current best block might have been updated during the subscription
// request.
this.update(true);
return null;
}
// Response doesn't concern us.
if (parsedResponse.id) {
const id: string = parsedResponse.id;
// Need to remove the `extern:` prefix.
assert(id.startsWith('extern:'), 'State inconsistency in health checker');
const newId = JSON.parse(id.slice('extern:'.length)) as string;
parsedResponse.id = newId;
}
return JSON.stringify(parsedResponse);
};
update = (startNow: boolean): void => {
// If `startNow`, clear `#currentHealthTimeout` so that it is set below.
if (startNow && this.#currentHealthTimeout) {
clearTimeout(this.#currentHealthTimeout);
this.#currentHealthTimeout = null;
}
if (!this.#currentHealthTimeout) {
const startHealthRequest = () => {
this.#currentHealthTimeout = null;
// No matter what, don't start a health request if there is already one in progress.
// This is sane to do because receiving a response to a health request calls `update()`.
if (this.#currentHealthCheckId) {
return;
}
// Actual request starting.
this.#currentHealthCheckId = 'health-checker:'.concat(
this.#nextRequestId.toString()
);
this.#nextRequestId += 1;
this.#requestToSmoldot(
JSON.stringify({
id: this.#currentHealthCheckId,
jsonrpc: '2.0',
method: 'system_health',
params: []
})
);
};
if (startNow) {
startHealthRequest();
} else {
this.#currentHealthTimeout = setTimeout(startHealthRequest, 1000);
}
}
if (
this.#isSyncing &&
!this.#currentSubscriptionId &&
!this.#currentSubunsubRequestId
) {
this.startSubscription();
}
if (
!this.#isSyncing &&
this.#currentSubscriptionId &&
!this.#currentSubunsubRequestId
) {
this.endSubscription();
}
};
startSubscription = (): void => {
assert(
!this.#currentSubunsubRequestId && !this.#currentSubscriptionId,
'Internal error in health checker'
);
this.#currentSubunsubRequestId = 'health-checker:'.concat(
this.#nextRequestId.toString()
);
this.#nextRequestId += 1;
this.#requestToSmoldot(
JSON.stringify({
id: this.#currentSubunsubRequestId,
jsonrpc: '2.0',
method: 'chain_subscribeNewHeads',
params: []
})
);
};
endSubscription = (): void => {
assert(
!this.#currentSubunsubRequestId && this.#currentSubscriptionId,
'Internal error in health checker'
);
this.#currentSubunsubRequestId = 'health-checker:'.concat(
this.#nextRequestId.toString()
);
this.#nextRequestId += 1;
this.#requestToSmoldot(
JSON.stringify({
id: this.#currentSubunsubRequestId,
jsonrpc: '2.0',
method: 'chain_unsubscribeNewHeads',
params: [this.#currentSubscriptionId]
})
);
};
destroy = (): void => {
if (this.#currentHealthTimeout) {
clearTimeout(this.#currentHealthTimeout);
this.#currentHealthTimeout = null;
}
};
}
export class HealthCheckError extends Error {
readonly #cause: unknown;
getCause (): unknown {
return this.#cause;
}
constructor (
response: unknown,
message = 'Got error response asking for system health'
) {
super(message);
this.#cause = response;
}
}
@@ -0,0 +1,647 @@
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
/* eslint-disable promise/param-names */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/no-floating-promises */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/ban-types */
import type { Chain, JsonRpcCallback } from '@substrate/connect';
import type { HealthChecker, SmoldotHealth } from './Health';
import type { ScProviderClass } from './ScProvider';
import { jest } from '@jest/globals';
const wait = (ms: number) => new Promise((res) => setTimeout(res, ms));
type MockedHealthChecker = HealthChecker & {
_isActive: () => boolean
_triggerHealthUpdate: (update: SmoldotHealth) => void
}
const healthCheckerMock = (): MockedHealthChecker => {
let cb: (health: SmoldotHealth) => void = () => {};
let sendJsonRpc: (request: string) => void = () => {};
let isActive = false;
return {
setSendJsonRpc: (cb) => {
sendJsonRpc = cb;
},
start: (x) => {
isActive = true;
cb = x;
},
stop: () => {
isActive = false;
},
sendJsonRpc: (...args) => sendJsonRpc(...args),
responsePassThrough: (response) => response,
_isActive: () => isActive,
_triggerHealthUpdate: (update: SmoldotHealth) => {
cb(update);
}
};
};
const healthCheckerFactory = () => {
const _healthCheckers: MockedHealthChecker[] = [];
return {
healthChecker: () => {
const result = healthCheckerMock();
_healthCheckers.push(result);
return result;
},
_healthCheckers,
_latestHealthChecker: () => _healthCheckers.slice(-1)[0]
};
};
jest.mock('./Health', () => healthCheckerFactory());
type MockChain = Chain & {
_spec: () => string
_recevedRequests: () => string[]
_isTerminated: () => boolean
_triggerCallback: (response: string | {}) => void
_setTerminateInterceptor: (fn: () => void) => void
_setSendJsonRpcInterceptor: (fn: (rpc: string) => void) => void
_getLatestRequest: () => string
}
const getFakeChain = (spec: string, callback: JsonRpcCallback): MockChain => {
const _receivedRequests: string[] = [];
let _isTerminated = false;
let terminateInterceptor: Function = Function.prototype;
let sendJsonRpcInterceptor: Function = Function.prototype;
return {
_spec: () => spec,
_recevedRequests: () => _receivedRequests,
_isTerminated: () => _isTerminated,
_triggerCallback: (response) => {
callback(
typeof response === 'string' ? response : JSON.stringify(response)
);
},
_setSendJsonRpcInterceptor: (fn) => {
sendJsonRpcInterceptor = fn;
},
_setTerminateInterceptor: (fn) => {
terminateInterceptor = fn;
},
sendJsonRpc: (rpc) => {
sendJsonRpcInterceptor(rpc);
_receivedRequests.push(rpc);
},
remove: () => {
terminateInterceptor();
_isTerminated = true;
},
_getLatestRequest: () => _receivedRequests[_receivedRequests.length - 1]
};
};
const getFakeClient = () => {
const chains: MockChain[] = [];
let addChainInterceptor: Promise<void> = Promise.resolve();
let addWellKnownChainInterceptor: Promise<void> = Promise.resolve();
return {
_chains: () => chains,
_setAddChainInterceptor: (interceptor: Promise<void>) => {
addChainInterceptor = interceptor;
},
_setAddWellKnownChainInterceptor: (interceptor: Promise<void>) => {
addWellKnownChainInterceptor = interceptor;
},
addChain: (chainSpec: string, cb: JsonRpcCallback): Promise<MockChain> =>
addChainInterceptor.then(() => {
const result = getFakeChain(chainSpec, cb);
chains.push(result);
return result;
}),
addWellKnownChain: (
wellKnownChain: string,
cb: JsonRpcCallback
): Promise<MockChain> =>
addWellKnownChainInterceptor.then(() => {
const result = getFakeChain(wellKnownChain, cb);
chains.push(result);
return result;
})
};
};
enum WellKnownChain {
polkadot = 'polkadot',
ksmcc3 = 'ksmcc3',
rococo_v2_1 = 'rococo_v2_1',
westend2 = 'westend2'
}
const connectorFactory = () => {
const clients: ReturnType<typeof getFakeClient>[] = [];
const latestClient = () => clients[clients.length - 1];
return {
WellKnownChain,
createScClient: () => {
const result = getFakeClient();
clients.push(result);
return result;
},
_clients: () => clients,
latestClient,
latestChain: () =>
latestClient()._chains()[latestClient()._chains().length - 1]
};
};
jest.mock('@substrate/connect', () => connectorFactory());
let ScProvider: ScProviderClass;
let mockedConnector: ReturnType<typeof connectorFactory>;
let mockedHealthChecker: ReturnType<typeof healthCheckerFactory>;
const getCurrentHealthChecker = () => mockedHealthChecker._latestHealthChecker();
const setChainSyncyingStatus = (isSyncing: boolean) => {
getCurrentHealthChecker()._triggerHealthUpdate({
isSyncing,
peers: 1,
shouldHavePeers: true
});
};
beforeAll(async () => {
({ ScProvider } = await import('./ScProvider'));
mockedConnector = (await import(
'@substrate/connect'
)) as unknown as ReturnType<typeof connectorFactory>;
mockedHealthChecker = await (import('./Health') as any);
});
describe('ScProvider', () => {
describe('on', () => {
it('emits `connected` as soon as the chain is not syncing', async () => {
const provider = new ScProvider('');
await provider.connect();
const onConnected = jest.fn();
provider.on('connected', onConnected);
expect(onConnected).not.toHaveBeenCalled();
setChainSyncyingStatus(false);
expect(onConnected).toHaveBeenCalled();
});
it('stops receiving notifications after unsubscribing', async () => {
const provider = new ScProvider('');
await provider.connect();
const onConnected = jest.fn();
provider.on('connected', onConnected)();
expect(onConnected).not.toHaveBeenCalled();
setChainSyncyingStatus(false);
expect(onConnected).not.toHaveBeenCalled();
});
it('synchronously emits connected if the Provider is already `connected`', async () => {
const provider = new ScProvider('');
await provider.connect();
setChainSyncyingStatus(false);
const onConnected = jest.fn();
provider.on('connected', onConnected);
expect(onConnected).toHaveBeenCalled();
});
it('emits `disconnected` once the chain goes back to syncing', async () => {
const provider = new ScProvider('');
await provider.connect();
setChainSyncyingStatus(false);
const onConnected = jest.fn();
provider.on('connected', onConnected);
const onDisconnected = jest.fn();
provider.on('disconnected', onDisconnected);
expect(onConnected).toHaveBeenCalled();
expect(onDisconnected).not.toHaveBeenCalled();
onConnected.mockRestore();
setChainSyncyingStatus(true);
expect(onConnected).not.toHaveBeenCalled();
expect(onDisconnected).toHaveBeenCalled();
});
});
describe('hasSubscriptions', () => {
it('supports subscriptions', async () => {
const provider = new ScProvider('');
await provider.connect();
expect(provider.hasSubscriptions).toBe(true);
});
});
describe('clone', () => {
it('can not be clonned', async () => {
const provider = new ScProvider('');
await provider.connect();
expect(() => provider.clone()).toThrowError();
});
});
describe('connect', () => {
it('does not create a new chain when trying to re-connect while the current chain is syncing', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
await provider.connect();
expect(chain).toBe(mockedConnector.latestChain());
});
it('throws when trying to connect on an already connected Provider', async () => {
const provider = new ScProvider('');
await provider.connect();
setChainSyncyingStatus(false);
await expect(provider.connect()).rejects.toThrowError(
'Already connected!'
);
});
});
describe('disconnect', () => {
it('removes the chain and cleans up', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
await provider.disconnect();
expect(chain._isTerminated()).toBe(true);
});
it('does not throw when disconnecting on an already disconnected Provider', async () => {
const provider = new ScProvider('');
await provider.connect();
await provider.disconnect();
await expect(provider.disconnect()).resolves.not.toThrow();
});
});
describe('send', () => {
it('throws when trying to send a request while the Provider is not connected', async () => {
const provider = new ScProvider('');
await provider.connect();
await expect(provider.send('', [])).rejects.toThrow();
});
it('receives responses to its requests', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
setChainSyncyingStatus(false);
const responsePromise = provider.send('getData', ['foo']);
await wait(0);
expect(chain._getLatestRequest()).toEqual(
'{"id":1,"jsonrpc":"2.0","method":"getData","params":["foo"]}'
);
const result = { foo: 'foo' };
chain._triggerCallback({
jsonrpc: '2.0',
id: 1,
result
});
const response = await responsePromise;
expect(response).toEqual(result);
});
it("rejects when the response can't be deserialized", async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
setChainSyncyingStatus(false);
setTimeout(() => {
chain._triggerCallback({
jsonrpc: '2.0',
id: 1
});
}, 0);
await expect(provider.send('getData', ['foo'])).rejects.toThrow();
});
it('rejects when the smoldot chain has crashed', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
setChainSyncyingStatus(false);
await wait(0);
chain._setSendJsonRpcInterceptor(() => {
throw new Error('boom!');
});
await expect(provider.send('getData', ['foo'])).rejects.toThrowError(
'Disconnected'
);
expect(provider.isConnected).toBe(false);
});
});
describe('subscribe', () => {
it('subscribes and recives messages until it unsubscribes', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
setChainSyncyingStatus(false);
const unsubscribeToken = 'unsubscribeToken';
setTimeout(() => {
chain._triggerCallback({
jsonrpc: '2.0',
id: 1,
result: unsubscribeToken
});
}, 0);
const cb = jest.fn();
const token = await provider.subscribe(
'foo',
'chain_subscribeNewHeads',
['baz'],
cb
);
expect(token).toBe(unsubscribeToken);
expect(cb).not.toHaveBeenCalled();
chain._triggerCallback({
jsonrpc: '2.0',
method: 'foo',
params: {
result: 1,
subscription: token
}
});
expect(cb).toHaveBeenCalledTimes(1);
expect(cb).toHaveBeenLastCalledWith(null, 1);
chain._triggerCallback({
jsonrpc: '2.0',
method: 'foo',
params: {
result: 2,
subscription: token
}
});
expect(cb).toHaveBeenCalledTimes(2);
expect(cb).toHaveBeenLastCalledWith(null, 2);
provider.unsubscribe('foo', 'chain_unsubscribeNewHeads', unsubscribeToken);
chain._triggerCallback({
jsonrpc: '2.0',
method: 'foo',
params: {
result: 3,
subscription: token
}
});
expect(cb).toHaveBeenCalledTimes(2);
expect(cb).toHaveBeenLastCalledWith(null, 2);
});
it('ignores subscription messages that were received before the subscription token', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
setChainSyncyingStatus(false);
const unsubscribeToken = 'unsubscribeToken';
chain._triggerCallback({
jsonrpc: '2.0',
method: 'foo',
params: {
result: 1,
subscription: unsubscribeToken
}
});
setTimeout(() => {
chain._triggerCallback({
jsonrpc: '2.0',
id: 1,
result: unsubscribeToken
});
}, 0);
const cb = jest.fn();
const token = await provider.subscribe(
'foo',
'chain_subscribeNewHeads',
['baz'],
cb
);
expect(token).toBe(unsubscribeToken);
expect(cb).not.toHaveBeenCalled();
});
it('emits the error when the message has an error', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
setChainSyncyingStatus(false);
await wait(0);
const unsubscribeToken = 'unsubscribeToken';
setTimeout(() => {
chain._triggerCallback({
jsonrpc: '2.0',
id: 1,
result: unsubscribeToken
});
}, 0);
const cb = jest.fn();
const token = await provider.subscribe(
'foo',
'chain_subscribeNewHeads',
['baz'],
cb
);
chain._triggerCallback({
jsonrpc: '2.0',
method: 'foo',
params: {
error: 'boom',
subscription: unsubscribeToken
}
});
expect(token).toBe(unsubscribeToken);
expect(cb).toHaveBeenCalledTimes(1);
expect(cb.mock.lastCall![0]).toBeInstanceOf(Error);
expect(cb.mock.lastCall![1]).toBe(undefined);
});
it('errors when subscribing to an unsupported method', async () => {
const provider = new ScProvider('');
await provider.connect();
setChainSyncyingStatus(false);
await wait(0);
await expect(
provider.subscribe('foo', 'bar', ['baz'], () => {})
).rejects.toThrowError('Unsupported subscribe method: bar');
});
});
describe('unsubscribe', () => {
it('rejects when trying to unsubscribe from un unexisting subscription', async () => {
const provider = new ScProvider('');
await provider.connect();
setChainSyncyingStatus(false);
await expect(provider.unsubscribe('', '', '')).rejects.toThrowError(
'Unable to find active subscription=::'
);
});
});
it('cleans up the stale subscriptions once it reconnects', async () => {
const provider = new ScProvider('');
await provider.connect();
const chain = mockedConnector.latestChain();
// setting the syncing status of the chain to fals so that the Provider
// gets `connected`
setChainSyncyingStatus(false);
// while connected we create a subscription
const unsubscribeToken = 'unsubscribeToken';
setTimeout(() => {
chain._triggerCallback({
jsonrpc: '2.0',
id: 1,
result: unsubscribeToken
});
}, 0);
const cb = jest.fn();
const token = await provider.subscribe(
'foo',
'chain_subscribeNewHeads',
['baz'],
cb
);
// setting the syncing status of the chain to fals so that the Provider
// gets `disconnected`
setChainSyncyingStatus(true);
// let's wait some time in order to ensure that the stale unsubscription
// messages are not sent until the chain syncing status changes back to false
await wait(200);
// before we let the healthChecker know that the chain is no longer syncing,
// let's make sure that the chain has received the correct request, and
// most importantly that it has not received a request for unsubscribing
// from the stale subscription, since that request should happen once the
// chain is no longer syncing
expect(chain._recevedRequests()).toEqual([
'{"id":1,"jsonrpc":"2.0","method":"chain_subscribeNewHeads","params":["baz"]}'
]);
// lets change the sync status back to false
setChainSyncyingStatus(false);
// let's wait one tick to ensure that the microtasks got processed
await wait(0);
// let's make sure that we have now sent the request for killing the
// stale subscription
expect(chain._recevedRequests()).toEqual([
'{"id":1,"jsonrpc":"2.0","method":"chain_subscribeNewHeads","params":["baz"]}',
`{"id":2,"jsonrpc":"2.0","method":"chain_unsubscribeNewHeads","params":["${token}"]}`
]);
});
});
@@ -0,0 +1,345 @@
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types';
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
import EventEmitter from 'eventemitter3';
import { assert, isError } from '@polkadot/util';
import { RpcCoder } from '../coder';
import { healthChecker } from './Health';
type ResponseCallback = (response: string | Error) => void
// These methods have been taken from:
// https://github.com/paritytech/smoldot/blob/17425040ddda47d539556eeaf62b88c4240d1d42/src/json_rpc/methods.rs#L338-L462
// It's important to take into account that smoldot is adding support to the new
// json-rpc-interface https://paritytech.github.io/json-rpc-interface-spec/
// However, at the moment this list only includes methods that belong to the "old" API
const subscriptionUnsubscriptionMethods = new Map<string, string>([
['author_submitAndWatchExtrinsic', 'author_unwatchExtrinsic'],
['chain_subscribeAllHeads', 'chain_unsubscribeAllHeads'],
['chain_subscribeFinalizedHeads', 'chain_unsubscribeFinalizedHeads'],
['chain_subscribeFinalisedHeads', 'chain_subscribeFinalisedHeads'],
['chain_subscribeNewHeads', 'chain_unsubscribeNewHeads'],
['chain_subscribeNewHead', 'chain_unsubscribeNewHead'],
['chain_subscribeRuntimeVersion', 'chain_unsubscribeRuntimeVersion'],
['subscribe_newHead', 'unsubscribe_newHead'],
['state_subscribeRuntimeVersion', 'state_unsubscribeRuntimeVersion'],
['state_subscribeStorage', 'state_unsubscribeStorage']
]);
const wellKnownChains = new Set(Object.values(WellKnownChain));
const scClients = new WeakMap<ScProvider, ScClient>();
export class ScProvider implements ProviderInterface {
readonly #coder: RpcCoder = new RpcCoder();
readonly #spec: string | WellKnownChain;
readonly #sharedSandbox?: ScProvider;
readonly #subscriptions: Map<
string,
[ResponseCallback, { unsubscribeMethod: string; id: string | number }]
> = new Map();
readonly #requests: Map<number, ResponseCallback> = new Map();
readonly #eventemitter: EventEmitter = new EventEmitter();
#chain: Promise<Chain> | null = null;
#isChainReady = false;
public constructor (spec: string | WellKnownChain, sharedSandbox?: ScProvider) {
this.#spec = spec;
this.#sharedSandbox = sharedSandbox;
}
public get hasSubscriptions (): boolean {
// Indicates that subscriptions are supported
return true;
}
public get isConnected (): boolean {
return !!this.#chain && this.#isChainReady;
}
public clone (): ProviderInterface {
throw new Error('clone() is not supported.');
}
async connect (): Promise<void> {
assert(!this.isConnected, 'Already connected!');
// it could happen that after emitting `disconnected` due to the fact taht
// smoldot is syncing, the consumer tries to reconnect after a certain amount
// of time... In which case we want to make sure that we don't create a new
// chain.
if (this.#chain) {
await this.#chain;
return;
}
if (this.#sharedSandbox && !this.#sharedSandbox.isConnected) {
await this.#sharedSandbox.connect();
}
const client = this.#sharedSandbox
? scClients.get(this.#sharedSandbox)
: createScClient();
assert(client, 'Unkown ScProvider!');
scClients.set(this, client);
const hc = healthChecker();
const onResponse = (res: string): void => {
const hcRes = hc.responsePassThrough(res);
if (!hcRes) {
return;
}
const response = JSON.parse(hcRes) as JsonRpcResponse;
let decodedResponse: string | Error;
try {
decodedResponse = this.#coder.decodeResponse(response) as string;
} catch (e) {
decodedResponse = e as Error;
}
// It's not a subscription message, but rather a standar RPC response
if (response.params?.subscription === undefined || !response.method) {
return this.#requests.get(response.id)?.(decodedResponse);
}
// We are dealing with a subscription message
const subscriptionId = `${response.method}::${response.params.subscription}`;
const callback = this.#subscriptions.get(subscriptionId)?.[0];
callback?.(decodedResponse);
};
const addChain = wellKnownChains.has(this.#spec as WellKnownChain)
? client.addWellKnownChain
: client.addChain;
this.#chain = addChain(this.#spec as WellKnownChain, onResponse).then((chain) => {
hc.setSendJsonRpc(chain.sendJsonRpc);
this.#isChainReady = false;
const cleanup = () => {
// If there are any callbacks left, we have to reject/error them.
// Otherwise, that would cause a memory leak.
const disconnectionError = new Error('Disconnected');
this.#requests.forEach((cb) => cb(disconnectionError));
this.#subscriptions.forEach(([cb]) => cb(disconnectionError));
this.#subscriptions.clear();
};
const staleSubscriptions: {
unsubscribeMethod: string
id: number | string
}[] = [];
const killStaleSubscriptions = () => {
if (staleSubscriptions.length === 0) {
return;
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const { id, unsubscribeMethod } = staleSubscriptions.pop()!;
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Promise.race([
this.send(unsubscribeMethod, [id]).catch(Function.prototype as () => void),
new Promise((resolve) => setTimeout(resolve, 500))
]).then(killStaleSubscriptions);
};
hc.start((health) => {
const isReady =
!health.isSyncing && (health.peers > 0 || !health.shouldHavePeers);
// if it's the same as before, then nothing has changed and we are done
if (this.#isChainReady === isReady) {
return;
}
this.#isChainReady = isReady;
if (!isReady) {
// If we've reached this point, that means that the chain used to be "ready"
// and now we are about to emit `disconnected`.
//
// This will cause the PolkadotJs API think that the connection is
// actually dead. In reality the smoldot chain is not dead, of course.
// However, we have to cleanup all the existing callbacks because when
// the smoldot chain stops syncing, then we will emit `connected` and
// the PolkadotJs API will try to re-create the previous
// subscriptions and requests. Although, now is not a good moment
// to be sending unsubscription messages to the smoldot chain, we
// should wait until is no longer syncing to send the unsubscription
// messages from the stale subscriptions of the previous connection.
//
// That's why -before we perform the cleanup of `this.#subscriptions`-
// we keep the necessary information that we will need later on to
// kill the stale subscriptions.
[...this.#subscriptions.values()].forEach((s) => {
staleSubscriptions.push(s[1]);
});
cleanup();
} else {
killStaleSubscriptions();
}
this.#eventemitter.emit(isReady ? 'connected' : 'disconnected');
});
return {
...chain,
remove: () => {
hc.stop();
chain.remove();
cleanup();
},
sendJsonRpc: hc.sendJsonRpc.bind(hc)
};
});
try {
await this.#chain;
} catch (e) {
this.#chain = null;
this.#eventemitter.emit('error', e);
throw e;
}
}
async disconnect (): Promise<void> {
if (!this.#chain) {
return;
}
const chain = await this.#chain;
this.#chain = null;
this.#isChainReady = false;
try {
chain.remove();
} catch (_) {}
this.#eventemitter.emit('disconnected');
}
public on (
type: ProviderInterfaceEmitted,
sub: ProviderInterfaceEmitCb
): () => void {
// It's possible. Although, quite unlikely, that by the time that polkadot
// subscribes to the `connected` event, the Provider is already connected.
// In that case, we must emit to let the consumer know that we are connected.
if (type === 'connected' && this.isConnected) {
sub();
}
this.#eventemitter.on(type, sub);
return (): void => {
this.#eventemitter.removeListener(type, sub);
};
}
public async send<T = any> (method: string, params: unknown[]): Promise<T> {
assert(this.isConnected, 'Provider is not connected');
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const chain = await this.#chain!;
const json = this.#coder.encodeJson(method, params);
const id = this.#coder.getId();
const result = new Promise<T>((resolve, reject): void => {
this.#requests.set(id, (response) => {
(isError(response) ? reject : resolve)(response as unknown as T);
});
try {
chain.sendJsonRpc(json);
} catch (e) {
this.#chain = null;
try {
chain.remove();
} catch (_) {}
this.#eventemitter.emit('error', e);
}
});
try {
return await result;
} finally {
// let's ensure that once the Promise is resolved/rejected, then we remove
// remove its entry from the internal #requests
this.#requests.delete(id);
}
}
public async subscribe (
type: string,
method: string,
params: any[],
callback: ProviderInterfaceCallback
): Promise<number | string> {
assert(
subscriptionUnsubscriptionMethods.has(method),
`Unsupported subscribe method: ${method}`
);
const id = await this.send<number | string>(method, params);
const subscriptionId = `${type}::${id}`;
const cb = (response: Error | string) => {
if (response instanceof Error) {
callback(response, undefined);
} else {
callback(null, response);
}
};
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method)!;
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
return id;
}
public unsubscribe (
type: string,
method: string,
id: number | string
): Promise<boolean> {
assert(
this.isConnected,
'Provider is not connected'
);
const subscriptionId = `${type}::${id}`;
if (!this.#subscriptions.has(subscriptionId)) {
return Promise.reject(
new Error(`Unable to find active subscription=${subscriptionId}`)
);
}
this.#subscriptions.delete(subscriptionId);
return this.send(method, [id]);
}
}
export type ScProviderClass = typeof ScProvider
@@ -0,0 +1,4 @@
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './ScProvider';
+2
View File
@@ -68,6 +68,8 @@ export interface ProviderStats {
subscriptions: number;
};
total: {
bytesRecv: number;
bytesSent: number;
cached: number;
requests: number;
subscriptions: number;
+14 -5
View File
@@ -107,6 +107,8 @@ export class WsProvider implements ProviderInterface {
#subscriptions: Record<string, WsStateSubscription> = {};
#timeoutId?: NodeJS.Timeout | null = null;
#websocket: WebSocket | null;
/**
@@ -133,7 +135,7 @@ export class WsProvider implements ProviderInterface {
this.#websocket = null;
this.#stats = {
active: { requests: 0, subscriptions: 0 },
total: { cached: 0, requests: 0, subscriptions: 0, timeout: 0 }
total: { bytesRecv: 0, bytesSent: 0, cached: 0, requests: 0, subscriptions: 0, timeout: 0 }
};
if (autoConnectMs > 0) {
@@ -147,9 +149,6 @@ export class WsProvider implements ProviderInterface {
resolve(this);
});
});
// timeout any handlers that have not had a response
setInterval(() => this.#timeout(), TIMEOUT_INTERVAL);
}
/**
@@ -209,6 +208,9 @@ export class WsProvider implements ProviderInterface {
this.#websocket.onerror = this.#onSocketError;
this.#websocket.onmessage = this.#onSocketMessage;
this.#websocket.onopen = this.#onSocketOpen;
// timeout any handlers that have not had a response
this.#timeoutId = setInterval(() => this.#timeout(), TIMEOUT_INTERVAL);
} catch (error) {
l.error(error);
@@ -333,7 +335,7 @@ export class WsProvider implements ProviderInterface {
start: Date.now(),
subscription
};
this.#stats.total.bytesSent += json.length;
this.#websocket.send(json);
} catch (error) {
reject(error);
@@ -414,6 +416,11 @@ export class WsProvider implements ProviderInterface {
this.#websocket = null;
}
if (this.#timeoutId) {
clearInterval(this.#timeoutId);
this.#timeoutId = null;
}
this.#emit('disconnected');
// reject all hanging requests
@@ -444,6 +451,8 @@ export class WsProvider implements ProviderInterface {
#onSocketMessage = (message: MessageEvent<string>): void => {
l.debug(() => ['received', message.data]);
this.#stats.total.bytesRecv += message.data.length;
const response = JSON.parse(message.data) as JsonRpcResponse;
return isUndefined(response.method)
+13 -13
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -33,20 +33,20 @@
"@babel/core": "^7.17.8",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.8",
"@polkadot/api": "7.13.1",
"@polkadot/api-augment": "7.13.1",
"@polkadot/rpc-augment": "7.13.1",
"@polkadot/rpc-provider": "7.13.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-augment": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/types-create": "7.13.1",
"@polkadot/types-support": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/x-ws": "^8.6.1",
"@polkadot/api": "7.14.2",
"@polkadot/api-augment": "7.14.2",
"@polkadot/rpc-augment": "7.14.2",
"@polkadot/rpc-provider": "7.14.2",
"@polkadot/types": "7.14.2",
"@polkadot/types-augment": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/types-create": "7.14.2",
"@polkadot/types-support": "7.14.2",
"@polkadot/util": "^8.7.1",
"@polkadot/x-ws": "^8.7.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^17.3.1"
"yargs": "^17.4.0"
},
"devDependencies": {
"@types/websocket": "^1.0.5",
+4
View File
@@ -77,6 +77,8 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
case TypeDefInfo.Struct:
case TypeDefInfo.Tuple:
case TypeDefInfo.Vec:
case TypeDefInfo.BTreeMap:
case TypeDefInfo.BTreeSet:
case TypeDefInfo.Option:
case TypeDefInfo.VecFixed:
case TypeDefInfo.WrapperKeepOpaque:
@@ -125,6 +127,8 @@ function tsResultGetter (registry: Registry, definitions: Record<string, ModuleT
case TypeDefInfo.Si:
case TypeDefInfo.Tuple:
case TypeDefInfo.Vec:
case TypeDefInfo.BTreeMap:
case TypeDefInfo.BTreeSet:
case TypeDefInfo.WrapperKeepOpaque:
case TypeDefInfo.WrapperOpaque:
return `${isGetter}${asGetter}`;
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.14.2' };
+4 -4
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/types": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/util": "^8.6.1"
"@polkadot/types": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/util": "^8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.14.2' };
@@ -22,6 +22,7 @@ import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, Contract
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
import type { BlockStats } from '@polkadot/types/interfaces/dev';
import type { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
@@ -152,6 +153,7 @@ declare module '@polkadot/types/types/registry' {
BlockNumber: BlockNumber;
BlockNumberFor: BlockNumberFor;
BlockNumberOf: BlockNumberOf;
BlockStats: BlockStats;
BlockTrace: BlockTrace;
BlockTraceEvent: BlockTraceEvent;
BlockTraceEventData: BlockTraceEventData;
+6 -6
View File
@@ -20,16 +20,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/util": "^8.6.1"
"@polkadot/util": "^8.7.1"
},
"devDependencies": {
"@polkadot/types": "7.13.1",
"@polkadot/types-augment": "7.13.1",
"@polkadot/types-support": "7.13.1",
"@polkadot/util-crypto": "^8.6.1"
"@polkadot/types": "7.14.2",
"@polkadot/types-augment": "7.14.2",
"@polkadot/types-support": "7.14.2",
"@polkadot/util-crypto": "^8.7.1"
}
}
@@ -11,24 +11,41 @@ const TESTS = ['0x00', '0x0817', '0x0837', '0x087b', '0x0c33'];
const registry = new TypeRegistry();
describe('BitVec', (): void => {
TESTS.forEach((test): void => {
describe(test, (): void => {
const input = hexToU8a(test);
describe('decoding known', (): void => {
TESTS.forEach((test): void => {
describe(test, (): void => {
const input = hexToU8a(test);
const bitvec = new BitVec(registry, input);
it('has the right encodedLength', (): void => {
expect(
new BitVec(registry, input).encodedLength
).toEqual((test.length - 2) / 2);
});
it('has the right encodedLength', (): void => {
expect(
bitvec.encodedLength
).toEqual((test.length - 2) / 2);
});
it('re-encodes to the same input value', (): void => {
expect(
new BitVec(registry, input).toU8a()
).toEqual(input);
it('re-encodes to the same input value', (): void => {
expect(
bitvec.toU8a()
).toEqual(input);
});
});
});
});
describe('toHuman() ordering', (): void => {
it('defaults to Lsb', (): void => {
expect(
new BitVec(registry, '0x0100010500').toHuman()
).toEqual('0b10000000_00000000_10000000_10100000_00000000');
});
it('can output to Msb', (): void => {
expect(
new BitVec(registry, '0x0100010500', true).toHuman()
).toEqual('0b00000001_00000000_00000001_00000101_00000000');
});
});
it('has a sane inspect', (): void => {
expect(
new BitVec(registry, '0x0837').inspect()
+12 -2
View File
@@ -41,13 +41,18 @@ function decodeBitVec (value?: AnyU8a): [number, Uint8Array] {
*/
export class BitVec extends Raw {
readonly #decodedLength: number;
readonly #isMsb?: boolean;
constructor (registry: Registry, value?: AnyU8a) {
// In lieu of having the Msb/Lsb identifiers passed through, we default to assuming
// we are dealing with Lsb, which is the default (as of writing) BitVec format used
// in the Polkadot code (this only affects the toHuman displays)
constructor (registry: Registry, value?: AnyU8a, isMsb = false) {
const [decodedLength, u8a] = decodeBitVec(value);
super(registry, u8a);
this.#decodedLength = decodedLength;
this.#isMsb = isMsb;
}
/**
@@ -67,7 +72,12 @@ export class BitVec extends Raw {
}
public override toHuman (): string {
return `0b${[...this.toU8a(true)].map((d) => `00000000${d.toString(2)}`.slice(-8)).join('_')}`;
return `0b${
[...this.toU8a(true)]
.map((d) => `00000000${d.toString(2)}`.slice(-8))
.map((s) => this.#isMsb ? s : s.split('').reverse().join(''))
.join('_')
}`;
}
/**
+3 -1
View File
@@ -23,7 +23,9 @@ describe('Text', (): void => {
testDecode('Raw', new Raw(registry, Uint8Array.from([102, 111, 111])), 'foo', 'toHuman'); // no length
testDecode('Bytes', new Bytes(registry, Uint8Array.from([12, 102, 111, 111])), 'foo'); // length-aware encoding
testDecode('Bytes', new Bytes(registry, Uint8Array.from([12, 102, 111, 111])), 'foo', 'toHuman'); // length-aware encoding
testDecode('object with `toString()`', { toString (): string { return 'foo'; } }, 'foo');
testDecode('object with `toString()`', { toString (): string {
return 'foo';
} }, 'foo');
testDecode('hex input value', new Text(registry, '0x12345678'), '0x12345678', 'toHex');
testDecode('null', null, '');
});
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '7.14.2' };
+4 -4
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/types-codec": "7.13.1",
"@polkadot/util": "^8.6.1"
"@polkadot/types-codec": "7.14.2",
"@polkadot/util": "^8.7.1"
},
"devDependencies": {
"@polkadot/types": "7.13.1"
"@polkadot/types": "7.14.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '7.14.2' };
+6 -6
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/networks": "^8.6.1",
"@polkadot/types": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/types-create": "7.13.1",
"@polkadot/util": "^8.6.1"
"@polkadot/networks": "^8.7.1",
"@polkadot/types": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/types-create": "7.14.2",
"@polkadot/util": "^8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '7.14.2' };
+2 -2
View File
@@ -20,10 +20,10 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/util": "^8.6.1"
"@polkadot/util": "^8.7.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '7.14.2' };
+9 -9
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.13.1",
"version": "7.14.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/keyring": "^8.6.1",
"@polkadot/types-augment": "7.13.1",
"@polkadot/types-codec": "7.13.1",
"@polkadot/types-create": "7.13.1",
"@polkadot/util": "^8.6.1",
"@polkadot/util-crypto": "^8.6.1",
"@polkadot/keyring": "^8.7.1",
"@polkadot/types-augment": "7.14.2",
"@polkadot/types-codec": "7.14.2",
"@polkadot/types-create": "7.14.2",
"@polkadot/util": "^8.7.1",
"@polkadot/util-crypto": "^8.7.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^8.6.1",
"@polkadot/types-support": "7.13.1"
"@polkadot/keyring": "^8.7.1",
"@polkadot/types-support": "7.14.2"
}
}
@@ -14,6 +14,7 @@ export { default as collective } from './collective/definitions';
export { default as consensus } from './consensus/definitions';
export { default as contracts } from './contracts/definitions';
export { default as democracy } from './democracy/definitions';
export { default as dev } from './dev/definitions';
export { default as elections } from './elections/definitions';
export { default as engine } from './engine/definitions';
export { default as evm } from './evm/definitions';
@@ -0,0 +1,31 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
import type { Definitions } from '../../types';
export default {
rpc: {
getBlockStats: {
description: 'Reexecute the specified `block_hash` and gather statistics while doing so',
params: [
{
name: 'at',
type: 'Hash',
isHistoric: true
}
],
type: 'Option<BlockStats>'
}
},
types: {
BlockStats: {
witnessLen: 'u64',
witnessCompactLen: 'u64',
blockLen: 'u64',
blockNumExtrinsics: 'u64'
}
}
} as Definitions;
@@ -0,0 +1,4 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './types';
@@ -0,0 +1,14 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Struct, u64 } from '@polkadot/types-codec';
/** @name BlockStats */
export interface BlockStats extends Struct {
readonly witnessLen: u64;
readonly witnessCompactLen: u64;
readonly blockLen: u64;
readonly blockNumExtrinsics: u64;
}
export type PHANTOM_DEV = 'dev';
+1
View File
@@ -20,6 +20,7 @@ export * from './contractsAbi/types';
export * from './crowdloan/types';
export * from './cumulus/types';
export * from './democracy/types';
export * from './dev/types';
export * from './elections/types';
export * from './engine/types';
export * from './eth/types';
@@ -46,6 +46,11 @@ const PATHS_SET = splitNamespace([
'pallet_identity::types::BitFlags'
]);
// These are the set namespaces for BitVec definitions (the last 2 appear in types as well)
const BITVEC_NS_LSB = ['bitvec::order::Lsb0', 'BitOrderLsb0'];
const BITVEC_NS_MSB = ['bitvec::order::Msb0', 'BitOrderMsb0'];
const BITVEC_NS = [...BITVEC_NS_LSB, ...BITVEC_NS_MSB];
// These we never use these as top-level names, they are wrappers
const WRAPPERS = ['BoundedBTreeMap', 'BoundedVec', 'Box', 'BTreeMap', 'Cow', 'Result', 'Option', 'WeakBoundedVec', 'WrapperKeepOpaque', 'WrapperOpaque'];
@@ -518,14 +523,14 @@ export class PortableRegistry extends Struct implements ILookup {
// the order. With that in-mind, we apply a detection for LSb0/Msb and set accordingly
const a = this.#createSiDef(bitOrderType);
const b = this.#createSiDef(bitStoreType);
const [bitOrder, bitStore] = ['bitvec::order::Lsb0', 'bitvec::order::Msb0'].includes(a.namespace || '')
const [bitOrder, bitStore] = BITVEC_NS.includes(a.namespace || '')
? [a, b]
: [b, a];
// NOTE: Currently the BitVec type is one-way only, i.e. we only use it to decode, not
// re-encode stuff. As such we ignore the msb/lsb identifier given by bitOrderType, or rather
// we don't pass it though at all
assert(['bitvec::order::Lsb0', 'bitvec::order::Msb0'].includes(bitOrder.namespace || ''), () => `Unexpected bitOrder found as ${bitOrder.namespace || '<unknown>'}`);
// we don't pass it though at all, however we only currently cater for the default Lsb
assert(BITVEC_NS_LSB.includes(bitOrder.namespace || ''), () => `Unexpected bitOrder found as ${bitOrder.namespace || '<unknown>'}`);
assert(bitStore.info === TypeDefInfo.Plain && bitStore.type === 'u8', () => `Only u8 bitStore is currently supported, found ${bitStore.type}`);
return {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '7.13.1' };
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '7.14.2' };
+316 -269
View File
@@ -1902,29 +1902,29 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/api-augment@7.13.1, @polkadot/api-augment@workspace:packages/api-augment":
"@polkadot/api-augment@7.14.2, @polkadot/api-augment@workspace:packages/api-augment":
version: 0.0.0-use.local
resolution: "@polkadot/api-augment@workspace:packages/api-augment"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/api-base": 7.13.1
"@polkadot/rpc-augment": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/types-augment": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/api-base": 7.14.2
"@polkadot/rpc-augment": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/types-augment": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/api-base@7.13.1, @polkadot/api-base@workspace:packages/api-base":
"@polkadot/api-base@7.14.2, @polkadot/api-base@workspace:packages/api-base":
version: 0.0.0-use.local
resolution: "@polkadot/api-base@workspace:packages/api-base"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/rpc-core": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/rpc-core": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/util": ^8.7.1
rxjs: ^7.5.5
languageName: unknown
linkType: soft
@@ -1934,66 +1934,66 @@ __metadata:
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/api": 7.13.1
"@polkadot/api-augment": 7.13.1
"@polkadot/keyring": ^8.6.1
"@polkadot/types": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-create": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/util-crypto": ^8.6.1
"@polkadot/api": 7.14.2
"@polkadot/api-augment": 7.14.2
"@polkadot/keyring": ^8.7.1
"@polkadot/types": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-create": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/util-crypto": ^8.7.1
rxjs: ^7.5.5
languageName: unknown
linkType: soft
"@polkadot/api-derive@7.13.1, @polkadot/api-derive@workspace:packages/api-derive":
"@polkadot/api-derive@7.14.2, @polkadot/api-derive@workspace:packages/api-derive":
version: 0.0.0-use.local
resolution: "@polkadot/api-derive@workspace:packages/api-derive"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/api": 7.13.1
"@polkadot/api-augment": 7.13.1
"@polkadot/api-base": 7.13.1
"@polkadot/rpc-augment": 7.13.1
"@polkadot/rpc-core": 7.13.1
"@polkadot/rpc-provider": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/util-crypto": ^8.6.1
"@polkadot/api": 7.14.2
"@polkadot/api-augment": 7.14.2
"@polkadot/api-base": 7.14.2
"@polkadot/rpc-augment": 7.14.2
"@polkadot/rpc-core": 7.14.2
"@polkadot/rpc-provider": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/util-crypto": ^8.7.1
rxjs: ^7.5.5
languageName: unknown
linkType: soft
"@polkadot/api@7.13.1, @polkadot/api@workspace:packages/api":
"@polkadot/api@7.14.2, @polkadot/api@workspace:packages/api":
version: 0.0.0-use.local
resolution: "@polkadot/api@workspace:packages/api"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/api-augment": 7.13.1
"@polkadot/api-base": 7.13.1
"@polkadot/api-derive": 7.13.1
"@polkadot/keyring": ^8.6.1
"@polkadot/rpc-augment": 7.13.1
"@polkadot/rpc-core": 7.13.1
"@polkadot/rpc-provider": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/types-augment": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-create": 7.13.1
"@polkadot/types-known": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/util-crypto": ^8.6.1
"@polkadot/api-augment": 7.14.2
"@polkadot/api-base": 7.14.2
"@polkadot/api-derive": 7.14.2
"@polkadot/keyring": ^8.7.1
"@polkadot/rpc-augment": 7.14.2
"@polkadot/rpc-core": 7.14.2
"@polkadot/rpc-provider": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/types-augment": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-create": 7.14.2
"@polkadot/types-known": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/util-crypto": ^8.7.1
eventemitter3: ^4.0.7
rxjs: ^7.5.5
languageName: unknown
linkType: soft
"@polkadot/dev@npm:^0.65.97":
version: 0.65.97
resolution: "@polkadot/dev@npm:0.65.97"
"@polkadot/dev@npm:^0.65.101":
version: 0.65.101
resolution: "@polkadot/dev@npm:0.65.101"
dependencies:
"@babel/cli": ^7.17.6
"@babel/core": ^7.17.8
@@ -2017,8 +2017,8 @@ __metadata:
"@rollup/plugin-json": ^4.1.0
"@rollup/plugin-node-resolve": ^13.1.3
"@rushstack/eslint-patch": ^1.1.1
"@typescript-eslint/eslint-plugin": 5.15.0
"@typescript-eslint/parser": 5.15.0
"@typescript-eslint/eslint-plugin": 5.16.0
"@typescript-eslint/parser": 5.16.0
"@vue/component-compiler-utils": ^3.3.0
babel-jest: ^27.5.1
babel-plugin-module-extension-resolver: ^1.0.0-rc.2
@@ -2026,7 +2026,7 @@ __metadata:
babel-plugin-styled-components: ^2.0.6
browserslist: ^4.20.2
coveralls: ^3.1.1
eslint: ^8.11.0
eslint: ^8.12.0
eslint-config-standard: ^16.0.3
eslint-import-resolver-node: ^0.3.6
eslint-plugin-header: ^3.1.1
@@ -2051,12 +2051,12 @@ __metadata:
madge: ^5.0.1
minimatch: ^5.0.1
mkdirp: ^1.0.4
prettier: ^2.6.0
prettier: ^2.6.1
rimraf: ^3.0.2
rollup: ^2.70.1
rollup-plugin-cleanup: ^3.2.1
typescript: ^4.6.2
yargs: ^17.3.1
typescript: ^4.6.3
yargs: ^17.4.0
bin:
polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.mjs
polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.mjs
@@ -2079,74 +2079,75 @@ __metadata:
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
checksum: 9485cfb6244e831344d2a35265854216a6e177da284dc2c9cb74b70b2ba808e2901c964e2cbb5ef163494dfb590a1535953cadf83aa49cb3782f28625910204a
checksum: de3f0b24ac45f8b10bb7a930932d4a209352675298276b9af4e3491232742199204e5c87c1e7757425e159fd4eb59b1589169ba797b7cdb21ce767ab1df0537a
languageName: node
linkType: hard
"@polkadot/keyring@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/keyring@npm:8.6.1"
"@polkadot/keyring@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/keyring@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/util": 8.6.1
"@polkadot/util-crypto": 8.6.1
"@polkadot/util": 8.7.1
"@polkadot/util-crypto": 8.7.1
peerDependencies:
"@polkadot/util": 8.6.1
"@polkadot/util-crypto": 8.6.1
checksum: 12307cea2aaef2d153605a7653a21a6dab0f506f0e5f57f2a45def30d15ff3ebefeb591ae10002397ab3dd1ff13f9c17afa8fc93b074d0b91327dc068ac60cfc
"@polkadot/util": 8.7.1
"@polkadot/util-crypto": 8.7.1
checksum: 540a092d5e83a578265729ce872f67fbf035470ae85b7dc35e781a0003d111727538fed9a3c1d5624c276fcd69412ee2be92109d6b382b3d868a63ac4d929946
languageName: node
linkType: hard
"@polkadot/networks@npm:8.6.1, @polkadot/networks@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/networks@npm:8.6.1"
"@polkadot/networks@npm:8.7.1, @polkadot/networks@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/networks@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/util": 8.6.1
"@polkadot/util": 8.7.1
"@substrate/ss58-registry": ^1.17.0
checksum: 9f7dd054bae8a66048f86aaa25050e9e8ffda9ad3b5d3eeeaedc6022d8e4165a000bf51e5d877aa18cff807b581ee78c0b9883d61f1f3c0617ef9ed0b016b9bb
checksum: 8934295fca208843da3de5bc72de36f8a0885a43e88019e14563bb2066f8bfae20140d5b8b38f665cfe7c7084c4f18812bccf5b740345296038931229228a40b
languageName: node
linkType: hard
"@polkadot/rpc-augment@7.13.1, @polkadot/rpc-augment@workspace:packages/rpc-augment":
"@polkadot/rpc-augment@7.14.2, @polkadot/rpc-augment@workspace:packages/rpc-augment":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-augment@workspace:packages/rpc-augment"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/rpc-core": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/rpc-core": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/util": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/rpc-core@7.13.1, @polkadot/rpc-core@workspace:packages/rpc-core":
"@polkadot/rpc-core@7.14.2, @polkadot/rpc-core@workspace:packages/rpc-core":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/keyring": ^8.6.1
"@polkadot/rpc-augment": 7.13.1
"@polkadot/rpc-provider": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/keyring": ^8.7.1
"@polkadot/rpc-augment": 7.14.2
"@polkadot/rpc-provider": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/util": ^8.7.1
rxjs: ^7.5.5
languageName: unknown
linkType: soft
"@polkadot/rpc-provider@7.13.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
"@polkadot/rpc-provider@7.14.2, @polkadot/rpc-provider@workspace:packages/rpc-provider":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/keyring": ^8.6.1
"@polkadot/types": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/util-crypto": ^8.6.1
"@polkadot/x-fetch": ^8.6.1
"@polkadot/x-global": ^8.6.1
"@polkadot/x-ws": ^8.6.1
"@polkadot/keyring": ^8.7.1
"@polkadot/types": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/util-crypto": ^8.7.1
"@polkadot/x-fetch": ^8.7.1
"@polkadot/x-global": ^8.7.1
"@polkadot/x-ws": ^8.7.1
"@substrate/connect": 0.7.0-alpha.0
eventemitter3: ^4.0.7
mock-socket: ^9.1.2
nock: ^13.2.4
@@ -2160,22 +2161,22 @@ __metadata:
"@babel/core": ^7.17.8
"@babel/register": ^7.17.7
"@babel/runtime": ^7.17.8
"@polkadot/api": 7.13.1
"@polkadot/api-augment": 7.13.1
"@polkadot/rpc-augment": 7.13.1
"@polkadot/rpc-provider": 7.13.1
"@polkadot/types": 7.13.1
"@polkadot/types-augment": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-create": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/x-ws": ^8.6.1
"@polkadot/api": 7.14.2
"@polkadot/api-augment": 7.14.2
"@polkadot/rpc-augment": 7.14.2
"@polkadot/rpc-provider": 7.14.2
"@polkadot/types": 7.14.2
"@polkadot/types-augment": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-create": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/x-ws": ^8.7.1
"@types/websocket": ^1.0.5
"@types/yargs": ^17.0.10
handlebars: ^4.7.7
websocket: ^1.0.34
yargs: ^17.3.1
yargs: ^17.4.0
bin:
polkadot-types-chain-info: ./scripts/polkadot-types-chain-info.cjs
polkadot-types-from-chain: ./scripts/polkadot-types-from-chain.cjs
@@ -2185,222 +2186,222 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/types-augment@7.13.1, @polkadot/types-augment@workspace:packages/types-augment":
"@polkadot/types-augment@7.14.2, @polkadot/types-augment@workspace:packages/types-augment":
version: 0.0.0-use.local
resolution: "@polkadot/types-augment@workspace:packages/types-augment"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/types": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/types": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/util": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/types-codec@7.13.1, @polkadot/types-codec@workspace:packages/types-codec":
"@polkadot/types-codec@7.14.2, @polkadot/types-codec@workspace:packages/types-codec":
version: 0.0.0-use.local
resolution: "@polkadot/types-codec@workspace:packages/types-codec"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/types": 7.13.1
"@polkadot/types-augment": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/util-crypto": ^8.6.1
"@polkadot/types": 7.14.2
"@polkadot/types-augment": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/util-crypto": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/types-create@7.13.1, @polkadot/types-create@workspace:packages/types-create":
"@polkadot/types-create@7.14.2, @polkadot/types-create@workspace:packages/types-create":
version: 0.0.0-use.local
resolution: "@polkadot/types-create@workspace:packages/types-create"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/types": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/types": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/util": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/types-known@7.13.1, @polkadot/types-known@workspace:packages/types-known":
"@polkadot/types-known@7.14.2, @polkadot/types-known@workspace:packages/types-known":
version: 0.0.0-use.local
resolution: "@polkadot/types-known@workspace:packages/types-known"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/networks": ^8.6.1
"@polkadot/types": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-create": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/networks": ^8.7.1
"@polkadot/types": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-create": 7.14.2
"@polkadot/util": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/types-support@7.13.1, @polkadot/types-support@workspace:packages/types-support":
"@polkadot/types-support@7.14.2, @polkadot/types-support@workspace:packages/types-support":
version: 0.0.0-use.local
resolution: "@polkadot/types-support@workspace:packages/types-support"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/util": ^8.6.1
"@polkadot/util": ^8.7.1
languageName: unknown
linkType: soft
"@polkadot/types@7.13.1, @polkadot/types@workspace:packages/types":
"@polkadot/types@7.14.2, @polkadot/types@workspace:packages/types":
version: 0.0.0-use.local
resolution: "@polkadot/types@workspace:packages/types"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/keyring": ^8.6.1
"@polkadot/types-augment": 7.13.1
"@polkadot/types-codec": 7.13.1
"@polkadot/types-create": 7.13.1
"@polkadot/types-support": 7.13.1
"@polkadot/util": ^8.6.1
"@polkadot/util-crypto": ^8.6.1
"@polkadot/keyring": ^8.7.1
"@polkadot/types-augment": 7.14.2
"@polkadot/types-codec": 7.14.2
"@polkadot/types-create": 7.14.2
"@polkadot/types-support": 7.14.2
"@polkadot/util": ^8.7.1
"@polkadot/util-crypto": ^8.7.1
rxjs: ^7.5.5
languageName: unknown
linkType: soft
"@polkadot/util-crypto@npm:8.6.1, @polkadot/util-crypto@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/util-crypto@npm:8.6.1"
"@polkadot/util-crypto@npm:8.7.1, @polkadot/util-crypto@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/util-crypto@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@noble/hashes": 1.0.0
"@noble/secp256k1": 1.5.5
"@polkadot/networks": 8.6.1
"@polkadot/util": 8.6.1
"@polkadot/wasm-crypto": ^5.0.1
"@polkadot/x-bigint": 8.6.1
"@polkadot/x-randomvalues": 8.6.1
"@polkadot/networks": 8.7.1
"@polkadot/util": 8.7.1
"@polkadot/wasm-crypto": ^5.1.1
"@polkadot/x-bigint": 8.7.1
"@polkadot/x-randomvalues": 8.7.1
"@scure/base": 1.0.0
ed2curve: ^0.3.0
tweetnacl: ^1.0.3
peerDependencies:
"@polkadot/util": 8.6.1
checksum: 46b97f98ae93fa0101e134eb2b02089888daa3d49af084af3b601ed8f491a87169d7608c7255e12910b354bacba8a5857a799c8fff7d7f06732bca49c31d3096
"@polkadot/util": 8.7.1
checksum: ded90fcca468361102206eff91b807dc5c0f43b2785dbd2b9e2d1f515384785fdc9a97e2a187afd029ab14f9321f0eb1db2bd03a92526b62108ca81448dee05a
languageName: node
linkType: hard
"@polkadot/util@npm:8.6.1, @polkadot/util@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/util@npm:8.6.1"
"@polkadot/util@npm:8.7.1, @polkadot/util@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/util@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-bigint": 8.6.1
"@polkadot/x-global": 8.6.1
"@polkadot/x-textdecoder": 8.6.1
"@polkadot/x-textencoder": 8.6.1
"@polkadot/x-bigint": 8.7.1
"@polkadot/x-global": 8.7.1
"@polkadot/x-textdecoder": 8.7.1
"@polkadot/x-textencoder": 8.7.1
"@types/bn.js": ^5.1.0
bn.js: ^5.2.0
ip-regex: ^4.3.0
checksum: c2e0a16158a0f2569cedd863f31b95139b8cca4b55baeee2b1a1f9ce84732d6a4b980201d6356d81d8457cf8bbf0ed924c23ad44e6e238f8b1473bf66bc532fa
checksum: cd63352d1f691b4604fbbdb9133b1b6a3db33fee02b25c596ad58048105854378af2431e3b9ce4059207c1293276ba4c7dc42bc7372881b33abe3e6a1c56fe05
languageName: node
linkType: hard
"@polkadot/wasm-crypto-asmjs@npm:^5.0.1":
version: 5.0.1
resolution: "@polkadot/wasm-crypto-asmjs@npm:5.0.1"
"@polkadot/wasm-crypto-asmjs@npm:^5.1.1":
version: 5.1.1
resolution: "@polkadot/wasm-crypto-asmjs@npm:5.1.1"
dependencies:
"@babel/runtime": ^7.17.8
peerDependencies:
"@polkadot/util": "*"
checksum: c32208930de69759a14376b0c86d7944fe88cc89e34681819acaec3636e6b6725d41036de456d6becad45886e316a1be6c22c6621b7c9b791be1c3f06bc030b6
checksum: fd5906a45ba2fa7c5c9b12c761b4343bb91b21af9b1f854dabad190c822cbd4d8e090c75786f4869190fd0441204c5d225433928ef268b9ff1166875cd774e34
languageName: node
linkType: hard
"@polkadot/wasm-crypto-wasm@npm:^5.0.1":
version: 5.0.1
resolution: "@polkadot/wasm-crypto-wasm@npm:5.0.1"
"@polkadot/wasm-crypto-wasm@npm:^5.1.1":
version: 5.1.1
resolution: "@polkadot/wasm-crypto-wasm@npm:5.1.1"
dependencies:
"@babel/runtime": ^7.17.8
peerDependencies:
"@polkadot/util": "*"
checksum: 167f9e7c4afc82c307a88a3f40d49458f0b8b1eeac6aec501a26ecfe8ed63f3cfc4132f3b4c8894ec1ee664cb205fa2607264b6c84846231bc705eedfc25972e
checksum: 881c045e04dec8f01e97e62ee8061c5884283d7566d7cc45219c2c1605ffb85a225c800677f7e09896c37e38347817f471f5123e5bffba353efae3bf21b30cc1
languageName: node
linkType: hard
"@polkadot/wasm-crypto@npm:^5.0.1":
version: 5.0.1
resolution: "@polkadot/wasm-crypto@npm:5.0.1"
"@polkadot/wasm-crypto@npm:^5.1.1":
version: 5.1.1
resolution: "@polkadot/wasm-crypto@npm:5.1.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/wasm-crypto-asmjs": ^5.0.1
"@polkadot/wasm-crypto-wasm": ^5.0.1
"@polkadot/wasm-crypto-asmjs": ^5.1.1
"@polkadot/wasm-crypto-wasm": ^5.1.1
peerDependencies:
"@polkadot/util": "*"
"@polkadot/x-randomvalues": "*"
checksum: 4116a87c1a047de026b0feb6b68b2e46f4115f2ba7504104421ed240f111e1f5a609e954a1c1f8fd5f0b727eadabfacd1edd939197222988a889d7e40b3e30ef
checksum: 713a6a36b6cce8cf56d455fdfad09c2c13038f863592b746eafe8fa7919bf3f9af06266c8531265db06260bec00add7ee5f87431eb3ab71dbaa176f0417034f4
languageName: node
linkType: hard
"@polkadot/x-bigint@npm:8.6.1":
version: 8.6.1
resolution: "@polkadot/x-bigint@npm:8.6.1"
"@polkadot/x-bigint@npm:8.7.1":
version: 8.7.1
resolution: "@polkadot/x-bigint@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-global": 8.6.1
checksum: 256c57fff6d55b548a831c790b680b8840734868b5a29b76ff13bdc32f4d15332da353f33af3d4e8a1bf30738759b476d8e29e2ad685051502ae2c4237fc9163
"@polkadot/x-global": 8.7.1
checksum: 2c1e0a6423757860a17a5e80f44b9048ddaa273f6f0901ce5679d0aa98075c84e71022ade7fb49eb6bf35cc65fca4aa94a09d36d024adaaa1f182a93d5348a0d
languageName: node
linkType: hard
"@polkadot/x-fetch@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/x-fetch@npm:8.6.1"
"@polkadot/x-fetch@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/x-fetch@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-global": 8.6.1
"@polkadot/x-global": 8.7.1
"@types/node-fetch": ^2.6.1
node-fetch: ^2.6.7
checksum: f534879fcb35c5d0492e446abe796cb87b32d92a7ad5ba6ef7f88c2f51be2aa314873d2b307957bd25a80d63d069ab7209fe4a8fb9895c39c893d75c12fd7f30
checksum: 1fc979e81e14c9dd3677e390d04f8b81be1dac8b526222b186121048d096b00dd8f046b294df07bf967fd016ae888dc0ff63c5f1be937ff3e94ab4a9992d9942
languageName: node
linkType: hard
"@polkadot/x-global@npm:8.6.1, @polkadot/x-global@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/x-global@npm:8.6.1"
"@polkadot/x-global@npm:8.7.1, @polkadot/x-global@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/x-global@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
checksum: 10c5de96b630e596634abe3468a234f1ecc2b70579d8a34601ae0306bb70c60acbe8d13e29325cf5e37a34544e09b412953fbb96e584f04f1d5f1747ac3acb54
checksum: d2a888f2cfa31a8a99b92537799d5fd30115d8db7bd2b58f3e2a0ee929518fb9fc44b936dd6e98f79ac84420a587dd81fd2c592febc87f6176cddda436e622b3
languageName: node
linkType: hard
"@polkadot/x-randomvalues@npm:8.6.1":
version: 8.6.1
resolution: "@polkadot/x-randomvalues@npm:8.6.1"
"@polkadot/x-randomvalues@npm:8.7.1":
version: 8.7.1
resolution: "@polkadot/x-randomvalues@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-global": 8.6.1
checksum: 95968613313d4ab1355e527bc5785a9f88a7b55b856a6f94d9f7d89b21f63dcd0dc0c7b000ebe87487de9dc5eecbc41c113b7af95aa22fd4595f9c3d830f264d
"@polkadot/x-global": 8.7.1
checksum: a3abea5f753087354ffe9c253448b06b2bad9a1c623babbd1994f06a06116d2b0c8aa6490ff09861910468a652b15b52ef02edae4ad2c08f7d83506a2561d597
languageName: node
linkType: hard
"@polkadot/x-textdecoder@npm:8.6.1":
version: 8.6.1
resolution: "@polkadot/x-textdecoder@npm:8.6.1"
"@polkadot/x-textdecoder@npm:8.7.1":
version: 8.7.1
resolution: "@polkadot/x-textdecoder@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-global": 8.6.1
checksum: 35dff39b1e636569d9f9c243f43b216f5ed8ddae92fdca47a48d77a52eedbda3476855c1a1115cebc918551bae62fc09da70665f217110cf33176fd1ace09558
"@polkadot/x-global": 8.7.1
checksum: 00e20d74d1ec3b999c978ffd94eb0e62f00e8be53d2155a77105fe411fb994671046eca57ab8b6d1064228f023b31f40e18a59b5e2124d1992c4bcf45b698ca4
languageName: node
linkType: hard
"@polkadot/x-textencoder@npm:8.6.1":
version: 8.6.1
resolution: "@polkadot/x-textencoder@npm:8.6.1"
"@polkadot/x-textencoder@npm:8.7.1":
version: 8.7.1
resolution: "@polkadot/x-textencoder@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-global": 8.6.1
checksum: 88642324a3fb67919907504c237b9e26af44a8e109fcd83516c00f1014d352e9a05c6d28c0b83c807d284aad529009aa664a928e7df1accc165548c6a5332c17
"@polkadot/x-global": 8.7.1
checksum: 29f5c7a1f1c17fc1bb1a494781955645b72f434f5322e9ab8b79307c45c0c46e669426c609ae10a863f877063d735a0786ef84c93d28bd5f0b1b4713f2572e71
languageName: node
linkType: hard
"@polkadot/x-ws@npm:^8.6.1":
version: 8.6.1
resolution: "@polkadot/x-ws@npm:8.6.1"
"@polkadot/x-ws@npm:^8.7.1":
version: 8.7.1
resolution: "@polkadot/x-ws@npm:8.7.1"
dependencies:
"@babel/runtime": ^7.17.8
"@polkadot/x-global": 8.6.1
"@polkadot/x-global": 8.7.1
"@types/websocket": ^1.0.5
websocket: ^1.0.34
checksum: 4b9237555a892b8aff80f30e506576875a9f7d866dfcfe8fc45619a63d2145253b748d7da4658bf85b4023ae21c61ce3becacca3019d6f54dd1fca34dae15ab0
checksum: 9137f955bf92f49bf831457ebc10370ca26bb9f0dce1dee3b2fae4eeab3a90377a176940f845b13a11836b483c03482713eda64fa49958a620ee182495e20b76
languageName: node
linkType: hard
@@ -2524,6 +2525,35 @@ __metadata:
languageName: node
linkType: hard
"@substrate/connect-extension-protocol@npm:^1.0.0":
version: 1.0.0
resolution: "@substrate/connect-extension-protocol@npm:1.0.0"
checksum: a6f16f1b986eb3d517a8db909d780febc1f5094a2956c1d3f9332ee60e0c08f32f67f4f500c9522bacd166d63a5023738f90c28059768077bf26535dc5a82013
languageName: node
linkType: hard
"@substrate/connect@npm:0.7.0-alpha.0":
version: 0.7.0-alpha.0
resolution: "@substrate/connect@npm:0.7.0-alpha.0"
dependencies:
"@substrate/connect-extension-protocol": ^1.0.0
"@substrate/smoldot-light": 0.6.8
eventemitter3: ^4.0.7
checksum: 0b575dee5854c19ef3439d7fd3a4f931480d8b248f8cda3beda66021427da259f980fec73b44cdf12ae86f150968b6d3c77b5db7607380a3e73c6c72d1f33362
languageName: node
linkType: hard
"@substrate/smoldot-light@npm:0.6.8":
version: 0.6.8
resolution: "@substrate/smoldot-light@npm:0.6.8"
dependencies:
buffer: ^6.0.1
pako: ^2.0.4
websocket: ^1.0.32
checksum: 5319d6df1e3b8ff44342889824929109535662db06bc4320b6110c8835245e818a96c029693c9dd34500453773acf43987ae23282dbbc3b18887c37d97e9c4c7
languageName: node
linkType: hard
"@substrate/ss58-registry@npm:^1.17.0":
version: 1.17.0
resolution: "@substrate/ss58-registry@npm:1.17.0"
@@ -2761,13 +2791,13 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/eslint-plugin@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/eslint-plugin@npm:5.15.0"
"@typescript-eslint/eslint-plugin@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/eslint-plugin@npm:5.16.0"
dependencies:
"@typescript-eslint/scope-manager": 5.15.0
"@typescript-eslint/type-utils": 5.15.0
"@typescript-eslint/utils": 5.15.0
"@typescript-eslint/scope-manager": 5.16.0
"@typescript-eslint/type-utils": 5.16.0
"@typescript-eslint/utils": 5.16.0
debug: ^4.3.2
functional-red-black-tree: ^1.0.1
ignore: ^5.1.8
@@ -2780,42 +2810,42 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 730ec621b5d87a22ea53cb2a67cae15fd241ccec9cff1bc3bdd24622feb11ea39b186544b845c730afa22112d8922008f17d9116a06b1e2dcd975429209a0c0c
checksum: 4007cc1599503424037300e7401fb969ca441b122ef8a8f2fc8d70f84d656fdf7ab7b0d00e506a3aaf702871616c3756da17eb1508ff315dfb25170f2d28a904
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/parser@npm:5.15.0"
"@typescript-eslint/parser@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/parser@npm:5.16.0"
dependencies:
"@typescript-eslint/scope-manager": 5.15.0
"@typescript-eslint/types": 5.15.0
"@typescript-eslint/typescript-estree": 5.15.0
"@typescript-eslint/scope-manager": 5.16.0
"@typescript-eslint/types": 5.16.0
"@typescript-eslint/typescript-estree": 5.16.0
debug: ^4.3.2
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 6b3047236349680e3a408aedf7490d304ad14d3f3264190eb058a472caeec07f85e8f298e6e774fd91cb001c9fd65a5fa558a9906afd30744bc05d8764cec250
checksum: 40006578e9ac451c80dc4b4b7e29af97b53fb9e9ea660d6ca17fb98b5c9858c648f9b17523c9de9b9b9e4155af17b65435e6163f02c4a2dfacf48274f45cba21
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/scope-manager@npm:5.15.0"
"@typescript-eslint/scope-manager@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/scope-manager@npm:5.16.0"
dependencies:
"@typescript-eslint/types": 5.15.0
"@typescript-eslint/visitor-keys": 5.15.0
checksum: 39fa688691c5cc207d44cc1f5a3ba0ecb3c34144505b32c1267df9e9368cc29373acd7e85e27d6fe84a0012417e40745887baeec6719f33b8a5ae4232d0db061
"@typescript-eslint/types": 5.16.0
"@typescript-eslint/visitor-keys": 5.16.0
checksum: 008a6607d3e6ebcc59a9b28cddcc25703f39a88e27a96c69a6d988acc50a1ea7dbf50963c165ffa5b85a101209a0da3a7ec6832633a162ca4ecc78c0e54acd9f
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/type-utils@npm:5.15.0"
"@typescript-eslint/type-utils@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/type-utils@npm:5.16.0"
dependencies:
"@typescript-eslint/utils": 5.15.0
"@typescript-eslint/utils": 5.16.0
debug: ^4.3.2
tsutils: ^3.21.0
peerDependencies:
@@ -2823,7 +2853,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: ecefdec695602b04f5d403c741336c56a8aa4f5fa3cc48a202a7b3f548d4d470f44cec5632a3db819fe1ca27c9980dbd3100b8c93e4fd7e9a3fa4253c03f4c04
checksum: 86d9f1dff6a096c8465453b8c7d0cc667b87a769f19073bfa9bbd36f8baa772c0384ec396b1132052383846bbbcf0d051345ed7d373260c1b506ed27100b383d
languageName: node
linkType: hard
@@ -2834,19 +2864,19 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/types@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/types@npm:5.15.0"
checksum: 749d6eb366cb103924b51bcbe69d1c0fd6f7a00f5be4c01b3d6de3134537db956653db9958cdd8cc32f375bca818ea804f8e07697122943faff06232519529a1
"@typescript-eslint/types@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/types@npm:5.16.0"
checksum: 0450125741c3eef9581da0b75b4a987a633d77009cfb03507c3db29885b790ee80e3c0efc4f9a0dd3376ba758b49c7829722676153472616a57bb04bce5cc4fa
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/typescript-estree@npm:5.15.0"
"@typescript-eslint/typescript-estree@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/typescript-estree@npm:5.16.0"
dependencies:
"@typescript-eslint/types": 5.15.0
"@typescript-eslint/visitor-keys": 5.15.0
"@typescript-eslint/types": 5.16.0
"@typescript-eslint/visitor-keys": 5.16.0
debug: ^4.3.2
globby: ^11.0.4
is-glob: ^4.0.3
@@ -2855,7 +2885,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 84fbb5030db5c1ac34527860725a9ea5b104fa1c49072a69306954b4b8516242427e70cb6a657ec2b822789432179a0df7a866e4618a29ee54b4285ca23556c8
checksum: 930ead4655712c3bd40885fb6b2074cd3c10fb03da864dd7a7dd2e43abfd330bb07e505f0aec8b4846178bff8befbb017f9f3370c67e9c717e4cb8d3df6e16ef
languageName: node
linkType: hard
@@ -2877,19 +2907,19 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/utils@npm:5.15.0"
"@typescript-eslint/utils@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/utils@npm:5.16.0"
dependencies:
"@types/json-schema": ^7.0.9
"@typescript-eslint/scope-manager": 5.15.0
"@typescript-eslint/types": 5.15.0
"@typescript-eslint/typescript-estree": 5.15.0
"@typescript-eslint/scope-manager": 5.16.0
"@typescript-eslint/types": 5.16.0
"@typescript-eslint/typescript-estree": 5.16.0
eslint-scope: ^5.1.1
eslint-utils: ^3.0.0
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
checksum: 406725b3e1282064612c9e69f346ceae5cf8e3fe4ae37295eaa1d594fb1b7ed3abd161c32b96622b00ca56e7b1120ea43b584954cd0cefad904a46d65b20960e
checksum: 46749091a204d7cf80d81b04704e23a86903a142a7e35cc5068a821c147c3bf098a7eff99af2b0e2ea7310013ca90300db9bab33ae5e3b5f773ed1d2961a5ed4
languageName: node
linkType: hard
@@ -2903,13 +2933,13 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:5.15.0":
version: 5.15.0
resolution: "@typescript-eslint/visitor-keys@npm:5.15.0"
"@typescript-eslint/visitor-keys@npm:5.16.0":
version: 5.16.0
resolution: "@typescript-eslint/visitor-keys@npm:5.16.0"
dependencies:
"@typescript-eslint/types": 5.15.0
"@typescript-eslint/types": 5.16.0
eslint-visitor-keys: ^3.0.0
checksum: a3f231bf55794547680284aa23ba495efa1e52f864583fe53e1ff8b2c011db070ca48633eb8a333bfc93be0bdbb76ffa98e81bf032fd2737a5e0f0b1b81bbc22
checksum: b587bf3b0da95bb58ff877b75fefcee6472222de1e3ec76aa4b94cae66078b62a372c7d0343374a16aab15cdcbae3f9e019624028b35827f68ef6559389f7fd0
languageName: node
linkType: hard
@@ -3587,6 +3617,16 @@ __metadata:
languageName: node
linkType: hard
"buffer@npm:^6.0.1":
version: 6.0.3
resolution: "buffer@npm:6.0.3"
dependencies:
base64-js: ^1.3.1
ieee754: ^1.2.1
checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9
languageName: node
linkType: hard
"bufferutil@npm:^4.0.1":
version: 4.0.3
resolution: "bufferutil@npm:4.0.3"
@@ -4905,9 +4945,9 @@ __metadata:
languageName: node
linkType: hard
"eslint@npm:^8.11.0":
version: 8.11.0
resolution: "eslint@npm:8.11.0"
"eslint@npm:^8.12.0":
version: 8.12.0
resolution: "eslint@npm:8.12.0"
dependencies:
"@eslint/eslintrc": ^1.2.1
"@humanwhocodes/config-array": ^0.9.2
@@ -4946,7 +4986,7 @@ __metadata:
v8-compile-cache: ^2.0.3
bin:
eslint: bin/eslint.js
checksum: a06a2ea37002d6c0a4f462fe31b4411185dc3da7857fafb896eb392ba95a1289cc3538056474b2f44f08012f265bede01a39d46df4ac39ebc6d7be90e2c8f9fa
checksum: 111bf9046b7a463049788dd00d7f4cd91e024029982352dff4811ce5dfa8cb1136aa127cd8a7a91508234d3e1b4fb6f638a1f5ef9ea08b1af93a18703a4a8dc1
languageName: node
linkType: hard
@@ -5964,7 +6004,7 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"ieee754@npm:^1.1.13":
"ieee754@npm:^1.1.13, ieee754@npm:^1.2.1":
version: 1.2.1
resolution: "ieee754@npm:1.2.1"
checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e
@@ -8142,6 +8182,13 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"pako@npm:^2.0.4":
version: 2.0.4
resolution: "pako@npm:2.0.4"
checksum: 82b9b0b99dd830c9103856a6dbd10f0cb2c8c32b9768184727ea381a99666de9a47a069d2e6efe6acf09336f363956b50835c196ef9311b34b7274d420eb0d88
languageName: node
linkType: hard
"parent-module@npm:^1.0.0":
version: 1.0.1
resolution: "parent-module@npm:1.0.1"
@@ -8420,12 +8467,12 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"prettier@npm:^1.18.2 || ^2.0.0, prettier@npm:^2.6.0":
version: 2.6.0
resolution: "prettier@npm:2.6.0"
"prettier@npm:^1.18.2 || ^2.0.0, prettier@npm:^2.6.1":
version: 2.6.1
resolution: "prettier@npm:2.6.1"
bin:
prettier: bin-prettier.js
checksum: 3e527ad62279676778a8404d18174d7ca2365ada4caba6eebbcdd9907d1187afd3bc6ade5b4e5f5d4549bb9fb71e45ca8930d71500017635524f8fc05bc52e93
checksum: 78be1f8a3ddfad7c3d8a854b6c8941a3bb1ddfca4225c38d778e0fe1029a55368f71b3bbefff82c689015fbb4d391ec44add957f01308ad2725e01a7c1f37cb6
languageName: node
linkType: hard
@@ -8976,7 +9023,7 @@ resolve@^2.0.0-next.3:
"@babel/core": ^7.17.8
"@babel/register": ^7.17.7
"@babel/runtime": ^7.17.8
"@polkadot/dev": ^0.65.97
"@polkadot/dev": ^0.65.101
"@polkadot/typegen": "workspace:packages/typegen"
"@types/jest": ^27.4.1
copyfiles: ^2.4.1
@@ -9876,23 +9923,23 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"typescript@npm:^4.6.2":
version: 4.6.2
resolution: "typescript@npm:4.6.2"
"typescript@npm:^4.6.3":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 8a44ed7e6f6c4cb1ebe8cf236ecda2fb119d84dcf0fbd77e707b2dfea1bbcfc4e366493a143513ce7f57203c75da9d4e20af6fe46de89749366351046be7577c
checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A^4.6.2#~builtin<compat/typescript>":
version: 4.6.2
resolution: "typescript@patch:typescript@npm%3A4.6.2#~builtin<compat/typescript>::version=4.6.2&hash=bda367"
"typescript@patch:typescript@npm%3A^4.6.3#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=bda367"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 40b493a71747fb89fa70df104e2c4a5e284b43750af5bea024090a5261cefa387f7a9372411b13030f7bf5555cee4275443d08805642ae5c74ef76740854a4c7
checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
languageName: node
linkType: hard
@@ -10165,7 +10212,7 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"websocket@npm:^1.0.34":
"websocket@npm:^1.0.32, websocket@npm:^1.0.34":
version: 1.0.34
resolution: "websocket@npm:1.0.34"
dependencies:
@@ -10416,9 +10463,9 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"yargs@npm:^17.0.0, yargs@npm:^17.3.1":
version: 17.3.1
resolution: "yargs@npm:17.3.1"
"yargs@npm:^17.0.0, yargs@npm:^17.4.0":
version: 17.4.0
resolution: "yargs@npm:17.4.0"
dependencies:
cliui: ^7.0.2
escalade: ^3.1.1
@@ -10427,6 +10474,6 @@ resolve@^2.0.0-next.3:
string-width: ^4.2.3
y18n: ^5.0.5
yargs-parser: ^21.0.0
checksum: 64fc2e32c56739f1d14d2d24acd17a6944c3c8e3e3558f09fc1953ac112e868cc16013d282886b9d5be22187f8b9ed4f60741a6b1011f595ce2718805a656852
checksum: 63985bddddf1fb6b9c98744591e8b70f99839591521cb84eea60903d52ec0da35ab46c42c325d151f3ab5c41935f976c10da096b5a7067c217714a91c0bd4be3
languageName: node
linkType: hard