-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NUT-17: WebSocket updates #202
base: development
Are you sure you want to change the base?
Conversation
export class WSConnection { | ||
public readonly url: URL; | ||
private readonly _WS: typeof WebSocket; | ||
private ws: WebSocket | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these private fields be prefixed by _
? like the classes in utils?
} | ||
} | ||
} catch (e) { | ||
console.log(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this try to call the errorCallback?
}; | ||
|
||
type JsonRpcSuccess<T = any> = { | ||
jsonrpc: '2.0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe make jsonrpc readonly
, to make sure the editor doesn't display the type as string
Fixes: none
Description
This adds WebSocket management, as well as a couple of methods on CashuWallet for full NUT-17 support
Changes
PR Tasks
npm run test
--> no failing unit testsnpm run format