reduce browser bundle size
reduces browser bundle size by ~612k or ~92%.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { createHmac } from 'crypto';
|
||||
|
||||
export interface RestClientOptions {
|
||||
// override the max size of the request window (in ms)
|
||||
recv_window?: number;
|
||||
@@ -23,12 +21,6 @@ export interface RestClientOptions {
|
||||
|
||||
export type GenericAPIResponse = Promise<any>;
|
||||
|
||||
export function signMessage(message: string, secret: string): string {
|
||||
return createHmac('sha256', secret)
|
||||
.update(message)
|
||||
.digest('hex');
|
||||
};
|
||||
|
||||
export function serializeParams(params: object = {}, strict_validation = false): string {
|
||||
return Object.keys(params)
|
||||
.sort()
|
||||
@@ -75,4 +67,4 @@ export function isWsPong(response: any) {
|
||||
response.ret_msg === 'pong' &&
|
||||
response.success === true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user