-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: make smoldot discovery interface conform to smoldot interface (#…
- Loading branch information
1 parent
d183f3d
commit e2a5cef
Showing
13 changed files
with
270 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
"@substrate/connect": major | ||
"@substrate/smoldot-discovery": major | ||
"@substrate/smoldot-discovery-connector": minor | ||
--- | ||
|
||
## Breaking Changes | ||
|
||
- Modified `addChain` and `addWellKnownChain` methods: | ||
- Now accept a single `options` object parameter instead of separate `jsonRpcCallback` and `databaseContent` parameters | ||
- The `jsonRpcCallback` is now passed as `options.jsonRpcCallback` | ||
- The `databaseContent` is now passed as `options.databaseContent` | ||
|
||
- Removed `JsonRpcCallback` type export. Use the callback type from the `options` parameter of `addChain` and `addWellKnownChain` instead. | ||
|
||
- Updated peer dependency for `@substrate/smoldot-discovery` to "^3" | ||
|
||
## 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 response | ||
- `jsonRpcResponses`: 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` and `addWellKnownChain`, and adapt to the removed `JsonRpcCallback` 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.