Move-to-TypeScript Transpiler
`move-to-ts` is a Move-to-TypeScript transpiler and development framework for Aptos.
const {client, account} = ...;
// Load auto-generated App
const app = new App(client).hippo_tutorial.lend2;
// load User and LendingProtocol struct from chain
const user = await app.loadUser(account.address());
const protocol = await app.loadLendingProtocol(app.moduleAddress, false);
// call user_get_limits to compute some info about user's state
const [isUserHealthy, totalBorrow, totalDeposit] = user.user_get_limits(protocol);
console.log(isUserHealthy, totalBorrow, totalDeposit);
// make a withdrawal
await app.withdraw(account, u64(1000000), [app.FakeBTC.getTag()]);Installation
Generate TypeScript SDK
Interact with contract using generated SDK
Interact with contract using generated CLI utility
Debug Move unit tests
Last updated