Skip to content
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

feat: add connection events and subscription to multiple addresses, t… #67

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
2 changes: 1 addition & 1 deletion src/helpers/healthCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {parseUrl} from './url';

import {GetNodeStatusResponseDto} from '../api/generated';
import {AdamantApiResult, getRandomIntInclusive} from './validator';
import {WebSocketClient, WsOptions} from './wsClient';
import {WebSocketClient, WsOptions} from './wsClient/wsClient';

export interface NodeManagerOptions {
nodes: string[];
Expand Down
15 changes: 15 additions & 0 deletions src/helpers/wsClient/error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export class AdamantWsConnectionError extends Error {
reason: string;
details: string;

constructor(reason: string, details: string | Error) {
const message = String(details);

super(message);

this.name = 'AdamantWsConnectionError';

this.reason = reason;
this.details = message;
}
}
Loading