@xchainjs/xchain-util
Version:
Helper utilities for XChain clients
17 lines (16 loc) • 593 B
TypeScript
export declare const XCHAINJS_IDENTIFIER = "xchainjs-client";
export declare const NINE_REALMS_CLIENT_HEADER = "x-client-id";
/**
* Middleware to add custom header to requests (9R endpoints only)
*
* @param request RequestArgs (rxjs/ajax) | AxiosRequestConfig (axios)
* @returns RequestArgs (rxjs/ajax) | AxiosRequestConfig (axios)
*/
export declare const add9Rheader: <T extends {
url?: string;
headers?: Record<string, string>;
}>(request: T) => T;
/**
* Adds custom header to axios requests (9R endpoints only)
*/
export declare const register9Rheader: (axios: any) => void;