Methods
(static) init(vault) → {WalletClient}
Initialize Wallet API by passing in vault instance.
Parameters:
Name | Type | Description |
---|---|---|
vault |
Vault |
reference to vault |
- Source:
(async, inner) createAccountForToken(token) → {Promise}
Create a whitelisted multisig account for a particular ERC20 token for use by this application.
Parameters:
Name | Type | Description |
---|---|---|
token |
string |
ERC20 Token contract address |
- Source:
(async, inner) createPayment(token, amount, message) → {Promise}
Creates a new payment object and stores encrypted into IPFS.
Parameters:
Name | Type | Description |
---|---|---|
token |
string |
ERC20 Token contract address |
amount |
string |
Amount to send, in wei |
message |
string |
Customisable user message |
- Source:
(async, inner) getAccountForToken(address) → {Promise}
Get a users' ERC20 multisig account associated with a specific token contract address.
Parameters:
Name | Type | Description |
---|---|---|
address |
* |
ERC20 Token contract address |
- Source:
(async, inner) getPaymentInfo(ipfshash) → {Promise}
Downloads and decrypts payment object from IPFS and returns payment object.
Parameters:
Name | Type | Description |
---|---|---|
ipfshash |
string |
IPFS content address and decryption key tuple. |
- Source:
(async, inner) getTokenBalance(token) → {Promise}
Get the users' balance for specified Token.
Parameters:
Name | Type | Description |
---|---|---|
token |
* |
ERC20 Token contract address |
- Source:
(async, inner) redeemPayment(payment) → {Promise}
Redeems a PaymentObject payment into the appropriate users' wallet account.
Parameters:
Name | Type | Description |
---|---|---|
payment |
PaymentObject |
- Source: