chore(): deprecate pre-V5 authentication workflows
This commit is contained in:
@@ -207,39 +207,13 @@ export function isTopicSubscriptionConfirmation(
|
||||
return true;
|
||||
}
|
||||
|
||||
export function isWSAPIResponse(
|
||||
msg: unknown,
|
||||
): msg is Omit<WSAPIResponse, 'wsKey'> {
|
||||
if (typeof msg !== 'object' || !msg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof msg['op'] !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (WS_API_Operations as string[]).includes(msg['op']);
|
||||
}
|
||||
|
||||
export function isTopicSubscriptionSuccess(
|
||||
msg: unknown,
|
||||
): msg is WebsocketSucceededTopicSubscriptionConfirmationEvent {
|
||||
if (!isTopicSubscriptionConfirmation(msg)) return false;
|
||||
return msg.success === true;
|
||||
}
|
||||
|
||||
export const APIID = 'bybitapinode';
|
||||
|
||||
/**
|
||||
* Used to switch how authentication/requests work under the hood (primarily for SPOT since it's different there)
|
||||
*/
|
||||
export const REST_CLIENT_TYPE_ENUM = {
|
||||
accountAsset: 'accountAsset',
|
||||
inverse: 'inverse',
|
||||
inverseFutures: 'inverseFutures',
|
||||
linear: 'linear',
|
||||
spot: 'spot',
|
||||
v3: 'v3',
|
||||
v5: 'v5',
|
||||
} as const;
|
||||
|
||||
export type RestClientType =
|
||||
|
||||
Reference in New Issue
Block a user