The SDK is a wrapper for Huobi Chain services base on muta-sdk. Check out Muta service to learn more about how to use the SDK.
npm install [email protected] huobi-chain-sdk
const { AssetService } = require('huobi-chain-sdk');
async function main() {
const service = new AssetService();
const receipt = await service.write.create_asset({
name: 'MyToken',
supply: 10000000,
precision: 0,
symbol: 'MT',
relayable: false,
admin: '...',
init_mints: [{ addr: '...', balance: 10000000 }],
});
console.log(receipt.response);
}
main();