UNPKG

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