usdao
v1.0.4
Published
SDK for USDAO stablecoin dapp development
Downloads
10
Maintainers
Readme
USDAO-SDK
USDAO-SDK is a quick start tool to minimise software development time in building apps on top of USDAO stablecoin.
This package comes with built in wallet connection, USDAO smart contracts instances and simplified functions so that developers can just focus on building application.
Installation
Use the package manager npm to install this package.
npm install usdao --save
Usage
import { readUtil, writeUtil } from 'usdao';
# loads the USDAO contracts instances
# returns read functions
var readFunction = new readUtil(provider_url="Infura URL here)
#get balance
const usmBalance = await readFunction.balanceOf('usm');
# returns write functions
var writeContract = new writeUtil(provider_url="Infura URL here)
# Mint, burn, Fund, Defunnd
#const trDetails = await writeContract.transaction('token', 'amount', 'buy or sell');
const trDetails = await writeContract.transaction('usm', '.1', 'buy');
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.