@apolkingg8/changer
v1.0.4
Published
Pre-interview test for Perpetual Protocol.
Downloads
24
Readme
@apolkingg8/changer
Pre-interview test for Perpetual Protocol.
Use
yarn add @apolkingg8/changer
import changer, {Changer, EnumChangerCurrency} from "@apolkingg8/changer";
// set reserve
changer.setReserves(EnumChangerCurrency.twd, 100)
changer.setReserves(EnumChangerCurrency.usd, 200)
// trade
changer.trade(EnumChangerCurrency.twd, EnumChangerCurrency.usd, 50)
// multiple instance
let changer1 = new Changer()
let changer2 = new Changer()
Check the detail spec in changer.test.ts
Dev
- Test:
yarn test
- Build:
yarn build
CI/CD with GitHub actions config.
License
MIT