Integration Guide
How to deposit and withdraw Minter coins
Deposit coins
- Generate
deposit address
for user and store its mnemonic phrase somewhere. - Scan blocks
https://api.minter.one/block?height=N
and check if there exists any tx ondeposit address
- Once found you should check:
- Transaction type is
Send
: tx.type == 1. Value
andCoin
(tx.data.value, tx.data.coin) are equal to expected values.- Transaction has no
code
field 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 address
tomaster address
using 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
code
field is missing or equal to0
.