import { trace } from "loglevel" import { TricksterAccount, TricksterInventory } from "../trickster" import { v4 as uuidv4 } from 'uuid'; export interface LTOApi { GetInventory:(path:string)=>Promise GetAccounts:() =>Promise> GetLoggedin: ()=>Promise } export const TxnStates = ["PENDING","INFLIGHT","WAITING","ERROR","SUCCESS"] as const export type TxnState = typeof TxnStates[number] export interface TxnDetails { item_uid: string | "galders" count:number origin:string target:string } export abstract class BankReceipt { action_id: string details:TxnDetails created:Date constructor(details:TxnDetails) { this.details = details this.created = new Date() this.action_id = uuidv4(); } abstract state():Promise abstract status():string abstract progress():[number, number] abstract error():string } export interface BankApi { SendTxn: (txn:TxnDetails) => Promise }