tidying ws client

This commit is contained in:
tiagosiebler
2022-09-14 23:55:24 +01:00
parent d1ed7971ad
commit 0e05a8d0ef
5 changed files with 205 additions and 135 deletions

View File

@@ -6,6 +6,16 @@ export const wsKeyLinearPublic = 'linearPublic';
export const wsKeySpotPrivate = 'spotPrivate';
export const wsKeySpotPublic = 'spotPublic';
export const WS_KEY_MAP = {
inverse: wsKeyInverse,
linearPrivate: wsKeyLinearPrivate,
linearPublic: wsKeyLinearPublic,
spotPrivate: wsKeySpotPrivate,
spotPublic: wsKeySpotPublic,
};
export const PUBLIC_WS_KEYS = [WS_KEY_MAP.linearPublic, WS_KEY_MAP.spotPublic];
export function getLinearWsKeyForTopic(topic: string): WsKey {
const privateLinearTopics = [
'position',