UNPKG

@lunch-money/kraken-extension

Version:

A wrapper around the Kraken API for enabling Lunch Money to gather information about a user's account.

18 lines (17 loc) 1.08 kB
import { CryptoBalance, LunchMoneyCryptoConnection } from './types/lunchMoney'; import { KrakenResponse, KrakenValidation, KrakenWarnings, LunchMoneyKrakenConnectionConfig, LunchMoneyKrakenConnectionContext } from './types/kraken'; import { AxiosResponse } from 'axios'; export { LunchMoneyCryptoConnection } from './types/lunchMoney'; export declare const LunchMoneyKrakenConnection: LunchMoneyCryptoConnection<LunchMoneyKrakenConnectionConfig, LunchMoneyKrakenConnectionContext>; /** * Checks against faulty formats, non-200 status and parses errors / warnings from response if available. * Kraken prefixes errors (E) and warnings (W), some common errors are: * * - EAPI:Invalid signature (OTP required) * - EGeneral:Permission denied (Wrong or none permission granted) */ export declare function validateResponse(response: AxiosResponse<KrakenResponse<unknown>>): KrakenValidation<unknown, KrakenWarnings>; /** * If passed, increases crypto balance by given value */ export declare function updateBalance(balance: CryptoBalance | null, value: string): CryptoBalance | null;