UNPKG

chaingate

Version:

Multi-chain cryptocurrency SDK for TypeScript — unified API for Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Cash, Polygon, Arbitrum, and any EVM-compatible chain. Create wallets, query balances, send transactions, and manage tokens and NFTs across UTXO

44 lines (43 loc) 1.21 kB
type Slot = 'body' | 'headers' | 'path' | 'query'; export type Field = { in: Exclude<Slot, 'body'>; /** * Field name. This is the name we want the user to see and use. */ key: string; /** * Field mapped name. This is the name we want to use in the request. * If omitted, we use the same value as `key`. */ map?: string; } | { in: Extract<Slot, 'body'>; /** * Key isn't required for bodies. */ key?: string; map?: string; } | { /** * Field name. This is the name we want the user to see and use. */ key: string; /** * Field mapped name. This is the name we want to use in the request. * If `in` is omitted, `map` aliases `key` to the transport layer. */ map: Slot; }; export interface Fields { allowExtra?: Partial<Record<Slot, boolean>>; args?: ReadonlyArray<Field>; } export type FieldsConfig = ReadonlyArray<Field | Fields>; interface Params { body: unknown; headers: Record<string, unknown>; path: Record<string, unknown>; query: Record<string, unknown>; } export declare const buildClientParams: (args: ReadonlyArray<unknown>, fields: FieldsConfig) => Params; export {};