aeternity-tokens
v3.0.0
Published
AEternity tokens
Downloads
8
Maintainers
Readme
aeternity-tokens
This package providing an easy way to create extendable AEX-9 fungible tokens in Sophia by using a simple API.
Build
npm run build
Test
npm run test
Installation
npm install aeternity-tokens
Usage
Javascript
const aeternityTokens = require('aeternity-tokens');
var newToken = aeternityTokens.newToken([]);
TypeScript
import * as aeternityTokens from 'aeternity-tokens';
console.log(aeternityTokens.newToken([]))
Supported extensions
- allowances
- mintable
- burnable
- swappable
Example use:
import * as aeternityTokens from 'aeternity-tokens';
const tokenAllowances = aeternityTokens.newToken(['allowances']);
const tokenMintable = aeternityTokens.newToken(['mintable']);
const tokenBurnable = aeternityTokens.newToken(['burnable']);
const tokenSwappable = aeternityTokens.newToken(['burnable', 'swappable']);
...
const tokenMintableBurnable = aeternityTokens.newToken(['mintable', 'burnable']);
...
const tokenMintableBurnableAllowances = aeternityTokens.newToken(['mintable', 'burnable', 'allowances']);