import { AptosClient } from "aptos"; import { AptosParserRepo, AptosLocalCache, AptosSyncedCache } from "@manahippo/move-to-ts"; import * as Coin_list from './coin_list'; import * as Iterable_table from './iterable_table'; import * as Testnet_coins from './testnet_coins'; export * as Coin_list from './coin_list'; export * as Iterable_table from './iterable_table'; export * as Testnet_coins from './testnet_coins'; export function loadParsers(repo: AptosParserRepo) { Coin_list.loadParsers(repo); Iterable_table.loadParsers(repo); Testnet_coins.loadParsers(repo); } export function getPackageRepo(): AptosParserRepo { const repo = new AptosParserRepo(); loadParsers(repo); repo.addDefaultParsers(); return repo; } export type AppType = { client: AptosClient, repo: AptosParserRepo, cache: AptosLocalCache, }; export class App { coin_list : Coin_list.App iterable_table : Iterable_table.App testnet_coins : Testnet_coins.App constructor( public client: AptosClient, public repo: AptosParserRepo, public cache: AptosLocalCache, ) { this.coin_list = new Coin_list.App(client, repo, cache); this.iterable_table = new Iterable_table.App(client, repo, cache); this.testnet_coins = new Testnet_coins.App(client, repo, cache); } }