Receiving MobileCoin
Last updated
Was this helpful?
Last updated
Was this helpful?
To receive , you must provide the sender with an account address.
When you created your in the previous section, the API response included a main_address
that you can share to receive funds by default. The main_address
is the for the at index 0.
Using the main_address
generated in the previous section, send a transaction from an account that already has some .
After it has been sent, call , which should return with a balance of unspent of the amount that was sent by the sender.
Congratulations, you just received your first transaction!
If an Exchange wants to have multiple people paying them, the Exchange will not be able to tell which customers have paid because MobileCoin is private, unlike some other cryptocurrencies. MobileCoin has provided public addresses for subaddresses in order to provide a unique for each with a customer.
All subaddresses up to unsigned int max (18_446_744_073_709_551_615) are automatically associated with an account; however, the Exchange will need to assign a range of subaddresses during or after account creation in order to get the public address for that subaddress or to check the balance to see if the customer has deposited funds at that subaddress.
To generate a new unique subaddress, you can call the .
\
It is important that you keep track of which subaddress is for which customer depositing to your account
Using the public address that we just created, send some MOB to it.
To check the balance of this specific subaddress, you can call the .