Skip to main content

Bitcoin Cash (BCH)

Wallet structure​

The Bitcoin Cash wallet has the following structure.

  • Main address
  • Child address

TIP The Bitcoin Cash wallet does not use a fee address.





Deposit​

Deposit status​

When an asset from the outside arrives at the main or a child address, Octet recognizes it as a deposit. However, the deposit is not finalized even if the deposit transaction is included in the blocks. Additional blocks must be generated to finalize (FINALIZED) the transaction to ensure the integrity of the transaction. When an asset is sent to a main or a child address but has not arrived, that transaction is not recognized. Therefore, there is no FAILED status for the deposit transaction.

Status nameDescription
UNFINALIZEDDeposit transaction is included in the blocks
FINALIZEDDeposit transaction is included in the blocks and the next block is generated




Gathering​

Gathering is only available for centralized wallets.

Gathering process​

Assets stored in child addresses don't move to the main address unless gathering is requested. Therefore, gatherings should be made regularly to avoid a deficit in the main address. When gathering is requested, all assets stored in every child address are combined into one transaction and transferred to the main address. (However, only UTXOs in FINALIZED status are gathered.)

A gathering fee occurs once per transaction, and it is deducted from the asset to be gathered. Gathering will not proceed if the sum of the assets to be gathered is less than 0.001 BCH. The gathering process is as follows.

  1. Request gathering.
  2. Collect the assets of multiple child addresses and generate one transaction.
  3. Calculate the optimal fees and propagate the transaction.
  4. Gathering is completed when the transaction is confirmed in the blocks.


Gathering status​

Gathering status can be specified into four types, depending on the process. The asset stored in the child address is in AWAITING_GATHERING status.

When gathering is requested and a gathering transaction is generated, the status of the asset changes to GATHERING. When the transaction is included in the blocks, the status of the asset is processed to COMPLETED and the gathering is finished.

When a gathering is tried and the transaction failed, the status of the asset is processed to GATHERING_FAILED. Assets in gathering failed status are included in the gathering target again. When a gathering is tried but failed to generate a transaction due to insufficient fees, it remains in AWAITING_GATHERING status.

Status nameDescription
AWAITING_GATHERINGAwaiting gathering
GATHERINGGenerate gathering transaction
COMPLETEDComplete gathering transaction
GATHERING_FAILEDFailed gathering transaction




Withdrawal​

Withdrawal status​

When an asset moves from one address to another, Octet recognizes it as a withdrawal. However, the withdrawal is not finalized even if the withdrawal transaction is included in the blocks. Additional blocks must be generated to finalize (FINALIZED) the transaction to ensure the integrity of the transaction.

Status nameDescription
PENDINGWithdrawal transaction is generated
UNFINALIZEDWithdrawal transaction is included in the blocks
FINALIZEDWithdrawal transaction is included in the blocks and the next block is generated
FAILEDWithdrawal transaction failed



Fees​

Bitcoin Cash does not provide an estimated fee formula.




Balance lookup criteria​

You can check the balance of the asset stored in a specific address by calling the Get Address Balance API. The accessed balances are divided into total balance and liquid balance.

  • Total balance means all assets with a confirmation of 1 or above. Therefore, it is the sum of the assets awaiting deposit, deposited assets, UTXOs awaiting withdrawal, and UTXOs being withdrawn.
  • Liquid balance means the assets that can be gathered or withdrawn. The liquid balance of a child address represents the assets that can be gathered, while the liquid balance of the main address represents the assets that can be withdrawn.