Bitcoin (BTC)
Wallet structure
A Bitcoin wallet has the following structure.
- Main address
- Child address
TIP Bitcoin does not use a fee address.
Deposit
Deposit status
When an asset sent from the outside arrives at the main address or a child address, Octet recognizes it as a deposit. However, the deposit is not processed as completed even if the deposit transaction is included in a block. To ensure the finality of the transaction, additional blocks must be generated before the transaction is processed as completed (FINALIZED). When an asset is sent from the outside but has not arrived at the main address or a child address, that transaction is not recognized. Therefore, there is no failed (FAILED) status for deposit transactions.
| Status name | Description |
|---|---|
UNFINALIZED | Deposit transaction is included in a block |
FINALIZED | Deposit transaction is included in a block and the next block is generated |
Gathering
Gathering is only available in centralized wallets.
Gathering process
Assets stored in child addresses do not move to the main address until gathering is requested. Therefore, you should gather regularly to avoid a deficit in the main address. When gathering is requested, the assets stored in every child address are transferred to the main address as one transaction. (However, only UTXOs in FINALIZED status are gathered.)
A gathering fee occurs once per transaction, and it is deducted from the assets to be gathered. If the sum of the assets to be gathered is less than 0.001 BTC, the gathering does not proceed. The gathering process is as follows.
- Request gathering.
- The assets of multiple child addresses are collected into one transaction.
- The optimal fee is calculated and the transaction is propagated.
- The gathering is completed when the transaction is included in a block.
Gathering status
Gathering status is divided into four statuses depending on the gathering process. Assets stored in child addresses are in awaiting gathering (AWAITING_GATHERING) status.
When gathering is requested and a gathering transaction is created, the asset status changes to gathering (GATHERING). When the transaction is included in a block, the asset status is processed as gathering completed (COMPLETED) and the gathering is finished.
When gathering is attempted but the transaction fails, the asset status is processed as gathering failed (GATHERING_FAILED). Assets in gathering failed status are included in the gathering targets again. When gathering is attempted but the transaction could not be created due to insufficient fees, it remains in awaiting gathering (AWAITING_GATHERING) status.
| Status name | Description |
|---|---|
AWAITING_GATHERING | Awaiting gathering |
GATHERING | Gathering transaction created |
COMPLETED | Gathering transaction completed |
GATHERING_FAILED | Gathering transaction failed |
Withdrawal
Withdrawal process
To send assets from a centralized wallet to the outside, you must withdraw from the main address. Assets cannot be withdrawn to the outside from child addresses.
- Request a withdrawal.
- A transaction is created.
- The optimal fee is calculated and the transaction is propagated.
- The withdrawal is completed when the transaction is included in a block.
Withdrawal status
Unlike deposits, a withdrawal is processed as withdrawal completed (FINALIZED) as soon as the transaction is included in a block.
| Status name | Description |
|---|---|
AWAITING_DECISION | Awaiting withdrawal approval |
REJECTED | Withdrawal is rejected |
AWAITING_WITHDRAWAL | Withdrawal is approved and awaiting withdrawal |
PENDING | Withdrawal transaction is created |
FINALIZED | Withdrawal transaction is included in a block |
FAILED | Withdrawal transaction failed |
Balance lookup criteria
You can check the balance of the assets stored in a specific address by calling the Get Address Balance API. The balance returned is divided into total balance and liquid balance.
- Total balance is the sum of assets awaiting deposit, deposited assets, UTXOs awaiting withdrawal, and UTXOs being withdrawn. This means all assets with a confirmation of 1 or more.
- Liquid balance counts only the assets awaiting deposit out of the total balance. The liquid balance of a child address means the assets that can be gathered, and the liquid balance of the main address means the assets that can be withdrawn.
Fees
Bitcoin does not provide an estimated fee formula.