UNPKG

wowok

Version:

Wowok Blockchain TypeScript API

58 lines (57 loc) 1.6 kB
type HeadersInit = Record<string, string>; export declare class FaucetRateLimitError extends Error { } type FaucetCoinInfo = { amount: number; id: string; transferTxDigest: string; }; type FaucetResponse = { transferredGasObjects: FaucetCoinInfo[]; error?: string | null; }; type BatchFaucetResponse = { task?: string | null; error?: string | null; }; type BatchSendStatusType = { status: "INPROGRESS" | "SUCCEEDED" | "DISCARDED"; transferred_gas_objects: { sent: FaucetCoinInfo[]; }; }; type BatchStatusFaucetResponse = { status: BatchSendStatusType; error?: string | null; }; type FaucetResponseV2 = { status: "Success" | FaucetFailure; coins_sent: FaucetCoinInfo[] | null; }; type FaucetFailure = { Failure: { internal: string; }; }; export declare function requestWowFromFaucetV0(input: { host: string; recipient: string; headers?: HeadersInit; }): Promise<FaucetResponse>; export declare function requestWowFromFaucetV1(input: { host: string; recipient: string; headers?: HeadersInit; }): Promise<BatchFaucetResponse>; export declare function requestWowFromFaucetV2(input: { host: string; recipient: string; headers?: HeadersInit; }): Promise<FaucetResponseV2>; export declare function getFaucetRequestStatus(input: { host: string; taskId: string; headers?: HeadersInit; }): Promise<BatchStatusFaucetResponse>; export declare function getFaucetHost(network: "testnet" | "devnet" | "localnet"): "https://faucet.testnet.wowok.net" | "http://127.0.0.1:9123"; export {};