UNPKG

1.01 kBTypeScriptView Raw
1/// <reference types="node" />
2import Accounts from './accounts';
3import RoutingTable from './routing-table';
4import RateBackend from './rate-backend';
5import Config from './config';
6import reduct = require('reduct');
7import * as IlpPacket from 'ilp-packet';
8export 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}