UNPKG

@eidolon-labs/player-sdk

Version:

@eidolon-labs/player-sdk is a lightweight API wrapper for the Eidolon Player API; the invisible gaming layer for blockchain.

40 lines (39 loc) 1.39 kB
import { SupportedRegions } from "./regions"; import { type SupportedChains, type CreatePlayerResponse, type SendTransactionResponse, type EstimateGasResponse, type GetPlayerResponse } from "./types"; declare class PlayerApi { #private; constructor({ region, apiKey, }: { region: SupportedRegions; apiKey: string; }); changeRegion(region: SupportedRegions): void; setApiKey(apiKey: string): void; createPlayer({ chainName, suppliedId, }: { chainName: SupportedChains; suppliedId: string; }): Promise<CreatePlayerResponse>; sendTransaction({ chainName, data, playerId, value, to, }: { chainName: SupportedChains; playerId: string; data?: `0x${string}`; value?: number | string; to: `0x${string}`; }): Promise<SendTransactionResponse>; estimateGas({ chainName, data, playerId, value, to, }: { chainName: SupportedChains; playerId: string; data?: `0x${string}`; value?: number | string; to: `0x${string}`; }): Promise<EstimateGasResponse>; getPlayer({ playerId }: { playerId: string; }): Promise<GetPlayerResponse>; getPlayerBySuppliedId({ suppliedId }: { suppliedId: string; }): Promise<GetPlayerResponse>; } export { PlayerApi }; export * from "./regions"; export * from "./types"; export * from "./urls";