@substrate/connect
Advanced tools
Comparing version 0.7.4 to 0.7.5
@@ -5,10 +5,16 @@ # Changelog | ||
## 0.7.4 - 2022-05-05 | ||
## 0.7.5 - 2022-05-17 | ||
### Added | ||
- Added an optional configuration to `smoldot-light/createScClient` that allows customizing the maximum log level to use while the client is in use, allowing for better debuggability. ([#1027](https://github.com/paritytech/substrate-connect/pull/1027)) | ||
- Added an optional configuration to `createScClient` that allows forcing the use of the embedded client, and customizing the maximum log level to use while the embedded client client is in use, allowing for better debuggability. ([#1027](https://github.com/paritytech/substrate-connect/pull/1027), [#1044](https://github.com/paritytech/substrate-connect/pull/1044)) | ||
### Changed | ||
- Update @substrate/smoldot-light to [version 0.6.16](https://github.com/paritytech/smoldot/blob/main/bin/wasm-node/CHANGELOG.md#0616---2022-05-16) ([#1048](https://github.com/paritytech/substrate-connect/pull/1048)) | ||
## 0.7.4 - 2022-05-05 | ||
### Changed | ||
- Debug logs are no longer printed in the console. This should considerably decrease the number of messages being printed. ([#1027](https://github.com/paritytech/substrate-connect/pull/1027)) | ||
@@ -15,0 +21,0 @@ |
@@ -0,2 +1,4 @@ | ||
import { Config as EmbeddedNodeConfig } from "./smoldot-light.js"; | ||
export * from "./types.js"; | ||
export { EmbeddedNodeConfig }; | ||
/** | ||
@@ -20,2 +22,21 @@ * `true` if the substrate-connect extension is installed and available. | ||
/** | ||
* Configuration that can be passed to {createScClient}. | ||
*/ | ||
export interface Config { | ||
/** | ||
* If `true`, then the client will always use a node embedded within the page and never use | ||
* the substrate-connect extension. | ||
* | ||
* Defaults to `false`. | ||
*/ | ||
forceEmbeddedNode?: boolean; | ||
/** | ||
* Configuration to use for the embedded node. Ignored if the extension is present. | ||
* | ||
* If you want to make sure that this configuration isn't ignored, use this option in | ||
* conjunction with {Config.forceEmbeddedNode}. | ||
*/ | ||
embeddedNodeConfig?: EmbeddedNodeConfig; | ||
} | ||
/** | ||
* Returns a {@link ScClient} that connects to chains, either through the substrate-connect | ||
@@ -25,3 +46,3 @@ * extension or by executing a light client directly from JavaScript, depending on whether the | ||
*/ | ||
export declare const createScClient: (config?: import("./smoldot-light.js").Config | undefined) => import("./types.js").ScClient; | ||
export declare function createScClient(config?: Config): import("./types.js").ScClient; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { createScClient as smoldotScClient } from "./smoldot-light.js"; | ||
import { createScClient as smoldotScClient, } from "./smoldot-light.js"; | ||
import { createScClient as extensionScClient } from "./extension.js"; | ||
@@ -29,5 +29,8 @@ import { DOM_ELEMENT_ID } from "@substrate/connect-extension-protocol"; | ||
*/ | ||
export const createScClient = isExtensionPresent | ||
? extensionScClient | ||
: smoldotScClient; | ||
export function createScClient(config) { | ||
const forceEmbedded = config === null || config === void 0 ? void 0 : config.forceEmbeddedNode; | ||
if (!forceEmbedded && isExtensionPresent) | ||
return extensionScClient(); | ||
return smoldotScClient(config === null || config === void 0 ? void 0 : config.embeddedNodeConfig); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@substrate/connect", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "Substrate-connect to Smoldot clients. Using either substrate extension with predefined clients or an internal smoldot client based on chainSpecs provided.", | ||
@@ -32,3 +32,3 @@ "author": "Parity Team <admin@parity.io>", | ||
"@substrate/connect-extension-protocol": "^1.0.0", | ||
"@substrate/smoldot-light": "0.6.15", | ||
"@substrate/smoldot-light": "0.6.16", | ||
"eventemitter3": "^4.0.7" | ||
@@ -35,0 +35,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
744
0
2606577
+ Added@substrate/smoldot-light@0.6.16(transitive)
- Removed@substrate/smoldot-light@0.6.15(transitive)