Within a Vault account, user can generate multiple wallets. Most supported blockchain wallets follow bip39 standard for all coins with a 12 words mnemonic seed.
Wallets use hierarchical deterministic address creation following the path m/49'/0'/0'/0 and each generated address has an index price which increments with the new addresses generated.
Each wallet has a master address using path m/49'/0'/0'/1 which is used for withdrawals and serves as an admin managed address. This address is the main hot wallet.
In a multi wallet system for most blockchains when you generate an address, any funds sent to those addresses must be swept to the master address before you can spend it. Hence there is an operation called sweeping which is essential.
Vault support tokens on the blockchain and most chains that provide such feature already have a built in token support. You need to add the tokens to the Vault by providing the token's contract information (this process is manual now and ask our team for support).
In order to interact with tokens, you need to create the wallet based on their blockchain that they are using. So if you have a Binance Smart Chain (BSC) token you should create a BNB wallet first. After that you should be able to interact with any tokens in the BNB wallet. As explained in the RESTful API section, you can pass
currencywhich indicates the name of tokens while sending the request to your wallet.
In a deposit webhook when one of your wallet addresses receive a token contract deposit, the currency set in the webhook is the token symbol and you can find the wallet blockchain's name through the field
networkspecifying the blockchain e.g.
network: ethrefer to webhook for more information.
Any address generated, would automatically support tokens similar to the standard wallet so all the functionalities provided in the vault work the same way.
Sweeping is an advance feature used for multi address wallets used for businesses. When dealing with multiple addresses, sweeping balance to other addresses becomes crucial. Transactions in sub addresses can get swept to a the master hot wallet address or optionally to any address the wallet administrator wishes to send the funds. Vault provides a simple function to manage these transactions.
The sweeping occurs with the minimum blockchain transaction fee.
When sweeping the admin can decide the destination address for sweeping which by default is set to the master address.
There is a minimum sweep value which is set to
0by default. This value indicates the minimum requirements for the amount in the address to be sweeped. This can be used to avoid sweeping addresses with very small balance in them. Note that sweeping would result in blockchain fees so its important for this to be done efficiently to avoid paying too much fees to the blockchain (miners).
In case of wallets such as
bnbwhich support tokens, you need to have the coin e.g. ETH to be able to sweep your Ethereum based tokens. The Vault would automatically send
ETHto the addresses that hold the token balance and would then spend that as gas fee to withdraw the token amount to the master address.
Certain coins such as Ripple (XRP) have a simple way for identifying and creating unique deposit addresses by adding a Destination Tag in a transaction. All XRP addresses come with a random tag in the format as follows:
<master address> : <destination tag>
These addresses are separated by comma which is Vault standard. The tag in Vault is a 9 digit random code created and only associated with that specific address.
All funds regardless of their tag go to the master address however it is crucial to identify a transaction with a tag. Addresses receive funds that match the destination tag would only trigger the webhook notifications.
When making withdrawals, there is an optional meta field where user can add the recipient tag to attach in the transaction as well.