1 |
|
2 | import Accounts from './accounts';
|
3 | import RoutingTable from './routing-table';
|
4 | import RateBackend from './rate-backend';
|
5 | import Config from './config';
|
6 | import reduct = require('reduct');
|
7 | import * as IlpPacket from 'ilp-packet';
|
8 | export default class RouteBuilder {
|
9 | protected accounts: Accounts;
|
10 | protected routingTable: RoutingTable;
|
11 | protected backend: RateBackend;
|
12 | protected config: Config;
|
13 | protected isTrivialRate: boolean;
|
14 | constructor(deps: reduct.Injector);
|
15 | getNextHop(sourceAccount: string, destinationAccount: string): string;
|
16 | getNextHopPacket(sourceAccount: string, sourcePacket: IlpPacket.IlpPrepare): Promise<{
|
17 | nextHop: string;
|
18 | nextHopPacket: {
|
19 | amount: string;
|
20 | expiresAt: Date;
|
21 | executionCondition: Buffer;
|
22 | destination: string;
|
23 | data: Buffer;
|
24 | };
|
25 | }>;
|
26 | _getDestinationExpiry(sourceExpiry: Date): Date;
|
27 | _verifyPluginIsConnected(account: string): void;
|
28 | }
|