crypto-janitor
Version:
The Crypto Janitor provides a simple interface for fetching and cleaning crypto account data.
39 lines (38 loc) • 1.47 kB
TypeScript
import { CsvConnection, Transaction, Order } from "../target.types";
/**
* A Nexo Implementation of CsvConnection
*/
export default class Nexo extends CsvConnection {
transactionTypes: any;
symbols: Array<string>;
/**
* @description Create Nexo instance
* @param {string} fileName - CVS file with transactions
* @param {(fileName: string) => Array<any>} loadFileContents - Method used to load csv contents from filename
*/
constructor(fileName: string, loadFileContents: (fileName: string) => Array<any>);
/**
* ## HELPER ##
* @description Format transaction from raw nexo csv transaction
* @override CsvConnection._formatTransaction
* @param {any} transaction - Unformatted nexo transaction
* @param {string} type - Type of transaction
* @return {Transaction} Formatted transaction
*/
_formatTransaction(transaction: any): Transaction;
/**
* ## HELPER ##
* @description Format orders from raw nexo csv transaction
* @override CsvConnection._formatOrder
* @param {any} order - Unformatted nexo transaction
* @return {Order} Formatted Order
*/
_formatOrder(order: any): Order;
/**
* @description Download csv and clean transactions
* @override CsvConnection.initialize
* @param {boolean} forceReload - (Optional) Additional paramaters
* @return {Promise<void>}
*/
initialize(forceReload?: boolean): Promise<void>;
}