1 | import { AccountInfo } from '../types/accounts';
|
2 | import { BackendInstance, BackendServices } from '../types/backend';
|
3 | export interface OneToOneOptions {
|
4 | spread: number;
|
5 | ratesApiUrl: string;
|
6 | getInfo: (accountId: string) => AccountInfo;
|
7 | getAssetCode: (accountId: string) => string;
|
8 | }
|
9 | export default class OneToOneBackend implements BackendInstance {
|
10 | protected spread: number;
|
11 | protected getInfo: (accountId: string) => AccountInfo | undefined;
|
12 | constructor(opts: OneToOneOptions, api: BackendServices);
|
13 | connect(): Promise<void>;
|
14 | getRate(sourceAccount: string, destinationAccount: string): Promise<number>;
|
15 | submitPayment(): Promise<void>;
|
16 | }
|