-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(core, client): extend docs, link modules
Signed-off-by: 0x009922 <[email protected]>
- Loading branch information
Showing
6 changed files
with
45 additions
and
10 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
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 |
---|---|---|
@@ -1,2 +1,30 @@ | ||
/** | ||
* Types and native implementation of a WebSocket transport. | ||
* | ||
* [The WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) | ||
* is not natively available everywhere. For when it is available, the built-in {@linkcode nativeWS} | ||
* transport is used. For when it is not, consider using | ||
* {@linkcode https://jsr.io/@iroha/client-web-socket-node|@iroha/client-web-socket-node} adapter or providing a custom | ||
* one. | ||
* | ||
* A custom adapter could be passed to the {@linkcode [default].WebSocketAPI | WebSocketAPI} as well as to the | ||
* {@linkcode [default].CreateClientParams | Client}. | ||
* | ||
* ### Note on Bun | ||
* | ||
* Although Bun provides "native" `WebSocket`, it's implementation is not spec-compliant (specifically, it uses Node's `Buffer`). | ||
* Using `@iroha/client-web-socket-node` would work in this case. | ||
* | ||
* @example Using Node.js adapter | ||
* ```ts | ||
* import { WebSocketAPI } from '@iroha/client' | ||
* import ws from '@iroha/client-web-socket-node' | ||
* | ||
* const api = new WebSocketAPI(new URL('http://localhost:8080'), ws) | ||
* ``` | ||
* | ||
* @module | ||
*/ | ||
|
||
export * from './types.ts' | ||
export { default as nativeWS } from './native.ts' |
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