Building custodial wallet

๐Ÿšง

Before integrating the Transaction APIs, please proceed with the following steps.

  1. Sign Up
  2. Generating Wallet
  3. Issuing API Tokens
  4. Register API Callable IP

Generally, custodial wallets are built as follows. Other features can be implemented in various ways depending on the type of service.





Building a Child Address System

Generating Child Addresses

Generates addresses to be issued to end users. Generally, one child address is issued to each end user. Child addresses are generated by calling respective APIs, and issued child addresses can be checked from the console.


Managing the Balance of Child Addresses

Assets deposited in the child addresses are gathered at the main address in the end, which makes the balance of the child addresses zero. Therefore, it is recommended for the client to make a DB of the balance of each child address and then display that to the end user to confirm.


๐Ÿ‘€

Most platforms have the same child address structure, but it may vary depending on the platform, so please check the detailed guide for each platform.





Building a Deposit System

Deposit Occurrence Confirmation

When an outside asset is deposited to Octetโ€™s address, the transaction data will be sent to the clientโ€™s server from Octetโ€™s server as an HTTP (post) request. When the client has built a system to receive this, the system can check deposits occurring in real-time without continuous polling.





Building a Gathering System

Gather

Transfers assets from the child address to the main address. You can gather by calling the gathering API when needed or by clicking the [Gather] button in [Gathering History] of the console.


Managing the Gathering Fee

A fee will be deducted from the assets to be gathered when gathering them. However, gathering tokens requires coins to be recharged to be used as a fee. For that, the fee address recharges the fee amount in coins. Therefore, you must check the balance of the fee address before gathering.


๐Ÿ‘€

Gathering methods may differ by platform, so please check the detailed guide for each platform.





Building a Withdrawal System

Withdraw

Withdraws the assets stored in the main address to the outside. You can request a withdrawal by calling the Withdrawal API or from the console. When necessary, it can be set to be able to withdraw only with administrator approval.

Setting Up Withdrawal Approval

All withdrawals proceed with administrator approval by default. However, it can be disabled for withdrawals using API, which makes withdrawal proceed when it is requested.

  • The administrator approval can be disabled on API withdrawal - [Wallet Settings] - [API Withdrawal Approval].
  • Console withdrawal - Administrator approval is required.

Withdrawal Completion Confirmation

When the main address asset is withdrawn, the transaction data will be sent to the clientโ€™s server from Octetโ€™s server as an HTTP (post) request. When the client has built a system to receive this, it can check the withdrawal completion in real-time without continuous polling.