paritytech-substrate-connect-pr
released this
23 Oct 13:56
·
26 commits
to main
since this release
Major Changes
-
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"
New Features
- 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
Other Changes
- Updated internal implementation to use Effect for streaming JSON RPC responses in a Queue.
- Updated error handling to include
QueueFullError
.
Migration Guide
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 2 or higher of
@substrate/smoldot-discovery
as a peer dependency. - Modified