nimiq-rpc-client-ts
Version:
A Nimiq RPC client for TypeScript
21 lines (18 loc) • 718 B
text/typescript
import { n as Auth } from './shared/nimiq-rpc-client-ts.BvvqdQ38.mjs';
/**
* Determines if the code is running in a browser environment.
*/
declare function inBrowser(): boolean;
/**
* Initialize the client-wide URL and auth.
* Must be called before any RPC or WS call (unless you pass url/auth in options).
* This is optional if environment variables are set (Node.js environment only).
*/
declare function initRpcClient(config: {
url: string | URL;
auth?: Auth;
}): void;
/** Internal getters; prefixed names discourage direct use */
declare function __getBaseUrl(): Promise<URL>;
declare function __getAuth(): Promise<Auth | undefined>;
export { __getAuth, __getBaseUrl, inBrowser, initRpcClient };