🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@substrate/connect

Package Overview
Dependencies
Maintainers
16
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/connect - npm Package Compare versions

Comparing version

to
1.0.1

14

CHANGELOG.md

@@ -7,2 +7,16 @@ # Changelog

## 1.0.1 - 2024-06-17
- Version bump
## 1.0.0 - 2024-07-26
### Breaking
- Drop support for `lightClient:requestProvider` events [#2221](https://github.com/paritytech/substrate-connect/pull/2221)
### Changed
- Add support for @substrate/discovery protocol [#2221](https://github.com/paritytech/substrate-connect/pull/2221)
## 0.8.11 - 2024-05-24

@@ -9,0 +23,0 @@

42

dist/index.js

@@ -100,4 +100,3 @@ var __defProp = Object.defineProperty;

var getStart = () => {
if (startPromise)
return startPromise;
if (startPromise) return startPromise;
startPromise = import("smoldot").then((sm) => {

@@ -111,4 +110,3 @@ QueueFullError = sm.QueueFullError;

var getStartWithByteCode = () => {
if (startWithByteCodePromise)
return startWithByteCodePromise;
if (startWithByteCodePromise) return startWithByteCodePromise;
startWithByteCodePromise = import("smoldot/no-auto-bytecode").then(

@@ -127,6 +125,4 @@ (sm) => sm.startWithBytecode

clientReferences.push(config);
if (clientPromise instanceof Promise)
return clientPromise;
else
return Promise.resolve(clientPromise);
if (clientPromise instanceof Promise) return clientPromise;
else return Promise.resolve(clientPromise);
}

@@ -152,4 +148,3 @@ let worker = void 0;

logCallback: (level, target, message) => {
if (level > clientReferencesMaxLogLevel)
return;
if (level > clientReferencesMaxLogLevel) return;
if (level <= 1) {

@@ -171,6 +166,4 @@ console.error("[%s] %s", target, message);

bytecode: new Promise((resolve) => {
if (isBrowser)
worker.onmessage = (event) => resolve(event.data);
else
worker.on("message", (message) => resolve(message));
if (isBrowser) worker.onmessage = (event) => resolve(event.data);
else worker.on("message", (message) => resolve(message));
})

@@ -181,6 +174,4 @@ }));

newClientPromise.then((client) => {
if (clientPromise === newClientPromise)
clientPromise = client;
else
client.terminate();
if (clientPromise === newClientPromise) clientPromise = client;
else client.terminate();
return client;

@@ -193,4 +184,3 @@ });

const idx = clientReferences.indexOf(config);
if (idx === -1)
throw new Error("Internal error within smoldot");
if (idx === -1) throw new Error("Internal error within smoldot");
clientReferences.splice(idx, 1);

@@ -213,6 +203,4 @@ clientReferencesMaxLogLevel = 3;

const error = e;
if ((error == null ? void 0 : error.name) === "JsonRpcDisabledError")
throw new JsonRpcDisabledError();
if ((error == null ? void 0 : error.name) === "CrashError")
throw new CrashError(error.message);
if ((error == null ? void 0 : error.name) === "JsonRpcDisabledError") throw new JsonRpcDisabledError();
if ((error == null ? void 0 : error.name) === "CrashError") throw new CrashError(error.message);
if ((error == null ? void 0 : error.name) === "AlreadyDestroyedError")

@@ -336,4 +324,3 @@ throw new AlreadyDestroyedError();

);
if (!foundChain)
throw new Error("Unknown well-known chain");
if (!foundChain) throw new Error("Unknown well-known chain");
chain = foundChain;

@@ -399,4 +386,3 @@ } else {

function getExtensionLightClientProviderPromise() {
if (typeof document !== "object" || typeof CustomEvent !== "function")
return;
if (typeof document !== "object" || typeof CustomEvent !== "function") return;
const lightClientProvider = Unstable.getSubstrateConnectExtensionProviders().filter(

@@ -403,0 +389,0 @@ (detail) => detail.info.rdns.startsWith("io.github.paritytech.SubstrateConnect")

{
"name": "@substrate/connect",
"version": "1.0.0",
"version": "1.0.1",
"description": "Substrate-connect to Smoldot clients. Using either substrate extension with predefined clients or an internal smoldot client based on chainSpecs provided.",

@@ -37,7 +37,7 @@ "author": "Parity Team <admin@parity.io>",

"dependencies": {
"smoldot": "2.0.26",
"smoldot": "2.0.29",
"@substrate/connect-extension-protocol": "^2.0.0",
"@substrate/connect-discovery": "^0.0.6",
"@substrate/smoldot-discovery": "^0.0.6",
"@substrate/connect-discovery": "^0.0.6",
"@substrate/connect-known-chains": "^1.1.5",
"@substrate/connect-extension-protocol": "^2.0.0"
"@substrate/connect-known-chains": "^1.1.6"
},

@@ -44,0 +44,0 @@ "devDependencies": {

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 not supported yet

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 not supported yet