Receiving MobileCoin
To receive MOB, you must provide the sender with an account address.
When you created your account 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 subaddress for the account at index 0.
Using the main_address
generated in the previous section, send a transaction from an account that already has some MOB.
After it has been sent, call get_account_status, which should return with a balance of unspent MOB of the amount that was sent by the sender.
Congratulations, you just received your first transaction!
Generating a Unique Subaddress
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 public address for each transaction 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 Assign Address For Account endpoint.
\
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 Get Address Status endpoint.
Last updated