chore(): update readme with WS API examples

This commit is contained in:
tiagosiebler
2025-01-23 12:37:21 +00:00
parent cd37a1b6b9
commit d8bd68ed24
5 changed files with 230 additions and 107 deletions

View File

@@ -130,6 +130,7 @@ export interface WSClientConfigurableOptions {
restOptions?: RestClientOptions;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
requestOptions?: any;
wsUrl?: string;
/**

View File

@@ -167,20 +167,11 @@ export abstract class BaseWebsocketClient<
...options,
};
this.options.restOptions = {
...this.options.restOptions,
testnet: this.options.testnet,
};
// this.prepareRESTClient();
// add default error handling so this doesn't crash node (if the user didn't set a handler)
// eslint-disable-next-line @typescript-eslint/no-empty-function
this.on('error', () => {});
}
// protected abstract prepareRESTClient(): void;
/**
* Return true if this wsKey connection should automatically authenticate immediately after connecting
*/