Economy
To interact with Arianee Protocol, you need the native crypto tokens (currently POA or MATIC) and $ARIA20.
Request POA
Ask for POA Faucet and receive 0.05 POA if your wallet is below.
Method
ArianeeWallet.requestPoa();
Output
promise
returns object
: an object representing the receipt from the Blockchain transaction or {"return":"enough_ether"}.
Example
await wallet.requestPoa()
.then(i => console.log('success'))
.catch(i => console.log('fail'));
Get POA Balance
Method
ArianeeWallet.methods.balanceOfGas()
Output
promise
returns number|string: Gas in wei.
Example
let gas = wallet.methods.balanceOfPoa();
Request $ARIA20
Method
ArianeeWallet.requestAria();
Output
promise
returns object
: an object representing the receipt from the blockchain transaction.
Example
await wallet.requestAria()
.then(i => console.log('success'))
.catch(i => console.log('fail'));
$ARIA20 Faucet is available only on testnet. You need to buy $ARIA20 tokens directly on exchange or through Arianee - [email protected].
Get $ARIA20 Balance
Method
ArianeeWallet.methods.balanceOfAria()
Output
promise
returns number|string: $ARIA20 in wei.
Example
let aria = await wallet.methods.balanceOfAria();
Request $ARIA20
Method
ArianeeWallet.requestAria();
Output
promise
returns object
: an object representing the receipt from the blockchain transaction.
Example
await wallet.requestAria()
.then(i => console.log('success'))
.catch(i => console.log('fail'));
Get $ARIA20 Balance
Method
ArianeeWallet.methods.balanceOfAria()
Output
promise
returns number|string: $ARIA20 in wei.
Example
let aria = await wallet.methods.balanceOfAria();
Approve Arianee Protocol
Arianee Protocol is using $ARIA20 tokens. Because $ARIA20 are yours, we cannot take it without your permission. To let the Arianee Protocol spend your $ARIA20 tokens, your wallet needs to approve the Arianee Protocol.
This method performs a blockchain transaction. It costs Gas.
Method
await wallet.methods.approveStore()
.then(i => console.log('arianee approved')
.catch(i => console.log('fail'));
Output
promise
returns object: an object representing the receipt from the blockchain transaction.
Buy Credits
Credits are mandatory to use each charged feature on the Arianee Protocol.
This method performs a blockchain transaction. It costs $ARIA20 and Gas.
Method
ArianeeWallets.methods.buyCredits(creditType, numberOfCredit [, publicAddress])
Parameter | Type | Mandatory | Description |
---|---|---|---|
creditType | String | ✅ | The type of credit 'certificate' which corresponds to NFTs, 'event', 'message'. |
numberOfCredit | Integer | ✅ | The number of credit to buy. |
publicAddress | String | ❌ | The public address of credit receiver. Default: current wallet public address. |
Output
promise
returns object
: The receipt of the blockchain transaction.
Example
// Buy 5 certificate credits
await wallet.methods.buyCredits('certificate', 5).send()
.then(i => console.log("Buying credits"))
.catch(i => console.log("Fail" ));
You need $ARIA20 tokens and your wallet needs to approve the Arianee Protocol (see above).
Updated over 1 year ago