1.0.11 • Published 11 months ago

usdao-sdkt-2 v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months 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.

<<<<<<< HEAD
npm install usdao-sdk --save
=======
npm install usdao --save
>>>>>>> sdk-2

Usage

<<<<<<< HEAD
import * as usdaosdk from 'usdao-sdk';

# loads the USDAO contracts instances
usdaosdk.loadContracts(provider_url="Infura URL here", network=1)

# returns 'Infura' connection
usdaosdk.readConnection(provider_url="Infura URL here", network=1)

# returns 'wallet' connection such as Metamask
usdaosdk.writeConnection(provider_url="Infura URL here", network=1)

# returns 'abi' of all the contracts
usdaosdk.abi
usdaosdk.abi.usdao
=======
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');


>>>>>>> sdk-2

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.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago