Native CRC Wallet
var CRC_Wallet = {
Address : '', // Wallet Address
Balance : 0.0, // Balance of the current token
Allowances: {}, // Allowances
/**
* Loads the smart contract info from the physical wallet
*
* address : Wallet address
*
*/
OpenWallet: function (address) { ... },
/**
* Saves the smart contract the smart contract info in the physical wallet
*
*/
CloseWallet: function() { ... },
/**
* Adds an allowance into the wallet allowances array. Creates a new allowance or updates the balance
* of an existing one
*
* allowanceAddress : address of the wallet granting the allowance
*
* Amount : Amount of the allowance
*
*/
AddAllowance: function (allowanceAddress, Amount) { ... },
/**
* Spends an allowance into the wallet allowances array. Deletes the allowances that go to balance = 0
*
* allowanceAddress : address of the wallet granting the allowance
*
* amountToSpend : Amount that is being spent
*
*/
SpendAllowance: function (allowanceAddress, amountToSpend) { ... },
/**
* Deletes an existing allowance
*
* allowanceAddress : address of the wallet granting the allowance
*
*/
DeleteAllowance: function (allowanceAddress) { ... };Last updated