UNPKG

@xoxno/sdk-js

Version:

The SDK to interact with the XOXNO Protocol!

37 lines (36 loc) 961 B
import type { IChainID } from '@multiversx/sdk-core/out/interface'; type SafeHeaders = Record<string, string> & { authorization?: never; Authorization?: never; }; export type OurRequestInit = Omit<RequestInit, 'body' | 'headers'> & { headers?: SafeHeaders; }; export declare enum Chain { MAINNET = "1", DEVNET = "D" } export declare class XOXNOClient { apiUrl: string; chain: IChainID; init: OurRequestInit; config: { mediaUrl: string; gatewayUrl: string; XO_SC: string; FM_SC: string; DR_SC: string; KG_SC: string; Staking_SC: string; Manager_SC: string; P2P_SC: string; }; constructor({ chain, apiUrl, ...init }?: { chain?: Chain; apiUrl?: string; } & OurRequestInit); fetchWithTimeout: <T>(path: string, { params, ...options }?: RequestInit & { params?: Record<string, any>; }) => Promise<T>; } export {};