1.0.4 • Published 3 years ago

usdao v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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.

License

MIT

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago