2022-07-06 07:48:11 +00:00
|
|
|
import { trace } from "loglevel"
|
|
|
|
|
import { TricksterAccount, TricksterInventory } from "../trickster"
|
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
2022-07-07 07:54:36 +00:00
|
|
|
import axios, { AxiosRequestConfig, AxiosResponse } from "axios";
|
2022-07-06 07:48:11 +00:00
|
|
|
|
2022-08-10 01:39:44 +00:00
|
|
|
export const BankEndpoints = ["internal-xfer-item", "bank-item", "sell-item","buy-from-order","cancel-order"] as const
|
2022-07-07 07:54:36 +00:00
|
|
|
export type BankEndpoint = typeof BankEndpoints[number]
|
2022-07-06 07:48:11 +00:00
|
|
|
|
|
|
|
|
export interface LTOApi {
|
|
|
|
|
GetInventory:(path:string)=>Promise<TricksterInventory>
|
|
|
|
|
GetAccounts:() =>Promise<Array<TricksterAccount>>
|
2022-07-07 07:54:36 +00:00
|
|
|
GetLoggedin:() =>Promise<boolean>
|
2022-07-06 07:48:11 +00:00
|
|
|
|
2022-07-07 07:54:36 +00:00
|
|
|
BankAction:<T, D>(e:BankEndpoint, t:T) => Promise<D>
|
2022-07-06 07:48:11 +00:00
|
|
|
}
|