Integration Guide
How to deposit and withdraw Minter coins
Deposit coins
- Generate
deposit addressfor user and store its mnemonic phrase somewhere. - Scan blocks
https://api.minter.one/block?height=Nand check if there exists any tx ondeposit address- Once found you should check:
- Transaction type is
Send: tx.type == 1. ValueandCoin(tx.data.value, tx.data.coin) are equal to expected values.- Transaction has no
codefield or it's equal to0. Otherwise transaction is failed and funds are not transferred. Here is an example of failed tx.
- Send coins from
deposit addresstomaster addressusing mnemonic phrase from step 1. - Deposit coins to user account.
Note: Minter is based on Tendermint Consensus Engine, which has instant finality property. It means what once block is committed by ⅔ validators of network it cannot be reverted. As a result – there is no need to wait more than 1 confirmation of incoming transaction.
Withdraw coins
- Generate
Send(orMultisend, if you expect to have multiple addresses as recipients) transaction. - Send transaction.
- Wait for tx to be included in block.
- Check that
codefield is missing or equal to0.