import { AccountInfo } from '../../types'; import { Observable } from 'rxjs'; export interface AccountSnapshot extends Readonly { readonly balancePayable: bigint; readonly balanceReceivable: bigint; } export interface Transaction { commit: () => Promise; rollback: () => Promise; } export interface AccountsService { readonly updated: Observable; get: (accountId: string) => Promise; adjustBalancePayable: (amount: bigint, accountId: string, callback: (trx: Transaction) => Promise) => Promise; adjustBalanceReceivable: (amount: bigint, accountId: string, callback: (trx: Transaction) => Promise) => Promise; } export * from './in-memory';