UNPKG

1.02 kBSource Map (JSON)View Raw
1{"version":3,"file":"backend.js","sourceRoot":"","sources":["backend.ts"],"names":[],"mappings":"","sourcesContent":["import Accounts from '../services/accounts'\nimport { AccountInfo } from '../types/accounts'\nimport * as IlpPacket from 'ilp-packet'\n\nexport interface SubmitPaymentParams {\n sourceAccount: string\n destinationAccount: string\n sourceAmount: string\n destinationAmount: string\n parsedPacket?: IlpPacket.IlpPrepare\n result?: Buffer\n}\n\n/** API exposed by the connector to its backends */\nexport interface BackendServices {\n getInfo: (accountId: string) => AccountInfo | undefined\n accounts?: Accounts\n}\n\nexport interface BackendConstructor {\n new (options: object, api: BackendServices): BackendInstance\n}\n\nexport interface BackendInstance {\n connect (): Promise<void>\n getRate (sourceAccount: string, destinationAccount: string): Promise<number>\n submitPayment (params: SubmitPaymentParams): Promise<void>\n submitPacket? (params: SubmitPaymentParams): Promise<void>\n}\n"]}
\No newline at end of file