-
09f1c22: chore(deps-dev): bump vitest from 2.0.5 to 2.1.4
Bumps vitest from 2.0.5 to 2.1.4.
updated-dependencies:
- dependency-name: vitest dependency-type: direct:development update-type: version-update:semver-minor ...
Signed-off-by: dependabot[bot] [email protected]
-
Updated dependencies [09f1c22]
- @substrate/[email protected]
-
e2a5cef: ## Breaking Changes
- Modified
addChain
andaddWellKnownChain
methods:- Now accept a single
options
object parameter instead of separatejsonRpcCallback
anddatabaseContent
parameters - The
jsonRpcCallback
is now passed asoptions.jsonRpcCallback
- The
databaseContent
is now passed asoptions.databaseContent
- Now accept a single
- Removed
JsonRpcCallback
type export. Use the callback type from theoptions
parameter ofaddChain
andaddWellKnownChain
instead. - Updated peer dependency for
@substrate/smoldot-discovery
to "^2"
- Added new methods to the Chain interface to conform with smoldot's interface:
nextJsonRpcResponse
: Returns a promise that resolves with the next JSON-RPC responsejsonRpcResponses
: Returns an async iterable of JSON-RPC responses
- Updated internal implementation to use Effect for streaming JSON RPC responses in a Queue.
- Updated error handling to include
QueueFullError
.
Users of this package will need to update their code to use the new method signatures for
addChain
andaddWellKnownChain
, and adapt to the removedJsonRpcCallback
type export. Please refer to the updated documentation for the new usage patterns.When upgrading, ensure you're using version 3 or higher of
@substrate/smoldot-discovery
as a peer dependency. - Modified
- 198b375: chore: catalog and upgrade papi dependencies
- Updated dependencies [198b375]
- @substrate/[email protected]
- b476e7e: update build system to tshy
- Updated dependencies [b476e7e]
- @substrate/[email protected]
- e8fef4e: update docs
- 0ce9864: simplify isSmoldotExtension
- Updated dependencies [e8fef4e]
- @substrate/[email protected]
-
4123a5e: ## Breaking Changes
- Removes the connector function and extracts its into a different package.
- Remove
@substrate/light-client-extension-helpers
dependency. - Re-export
@substrate/discovery
types
@substrate/smoldot-discovery
is intended for dapp consumption only. However by having a connector function that was used by extensions, we forced dapps to have a dependency on@substrate/light-client-extension-helpers
. This is unacceptable since@substrate/light-client-extension-helpers
should be used by extensions only. As a result, the connector function has been extracted into a separate package and the dependency onsubstrate/light-client-extension-helpers
has been removed.No code changes are required. Simply update the package and remove the
@substrate/light-client-extension-helpers
peer dependency.Extensions must install the
@substrate/smoldot-discovery-connector
package.Then the connector can be consumed as follows:
import { getLightClientProvider } from "@substrate/light-client-extension-helpers/web-page" import { make as makeSmoldotDiscoveryConnector, SmoldotExtensionProviderDetail, } from "@substrate/smoldot-discovery-connector" const CHANNEL_ID = "YOUR_CHANNEL_ID" const lightClientProvider = getLightClientProvider(CHANNEL_ID) // #region Smoldot Discovery Provider { const provider = lightClientProvider.then(makeSmoldotDiscoveryConnector) const detail: SmoldotExtensionProviderDetail = Object.freeze({ kind: "smoldot-v1", info: PROVIDER_INFO, provider, }) window.addEventListener( "substrateDiscovery:requestProvider", ({ detail: { onProvider } }) => onProvider(detail), ) window.dispatchEvent( new CustomEvent("substrateDiscovery:announceProvider", { detail, }), ) } // #endregion
- The connector
make
function now accepts two parameters instead of one. ThelightClientProvider
is now the first parameter.
- e35a0e8: add paseo testnet
- cef7d50: update chainspecs
- 444503f: chore: update READMEs across repo
- c358405: fix(smoldot-discovery): peer dependencies constraint
- bdd728d: fix: re-export missing types from light client ext helpers webpage
- 78ca884: chore: add smoldot discovery connector