Skip to main content

Bitcoin Cash (BCH)

UTXO-based signing, same payload shape as Bitcoin. Provide the previous transactions for the inputs you spend; the device signs each input by its keyPath. Bitcoin Cash is legacy-only (P2PKH) — there is no SegWit or Taproot.

FieldValue
FamilyBitcoin (UTXO)
coinType145
keyPathm/44'/145'/<accountIdx>'/0/0
amount unitsatoshi
chainIdbip122:000000000000000000651ef99cb9fcbe/slip44:145

Supported Methods

MethodSupported
getAddress
signTransaction
signMessage
signTypedData

Requirements

Minimum firmware for each method. The two models are on different version lines, so DCENT Biometric Wallet and DCENT X are listed separately (the numbers are not comparable across models). Below this the request returns the firmware-update error (5005) and the bridge prompts to update.

MethodDCENT Biometric WalletDCENT X
getAddress1.5.1 or higher1.0.0 or higher
signTransaction1.5.1 or higher1.0.0 or higher

addressFormat

FormatPathStatus
cashaddr (P2PKH — bitcoincash:q…)m/44'/145'/0'/0/0Only format
warning

CashAddr only — addressFormat has no effect. Bitcoin Cash is a single-format chain: getAddress always returns a CashAddr P2PKH address (bitcoincash:q…). The device produces no 1… base58 form, so addressFormat is ignored, and addressFormat:'cashaddr' is not a recognised value — the bridge rejects it with param_error. No SegWit / no Taproot: txType is always p2pkh and the derivation purpose is always 44'.

getAddress — account address

Retrieves the Bitcoin Cash account address. Always returns a CashAddr P2PKH address (bitcoincash:q…). Bitcoin Cash is single-format, so addressFormat has no effect and the device does not return a 1… base58 form.

FieldTypeRequiredSourceNotes
chainIdstringRequiredAppFull CAIP-19 — bip122:000000000000000000651ef99cb9fcbe/slip44:145
keyPathstringRequiredAppBIP-44, default m/44'/145'/0'/0/0
addressFormatenumOptionalAppNo effect — Bitcoin Cash always returns CashAddr. Omit it. (cashaddr is rejected with param_error; legacy is accepted but has no effect.)

Request

await dcent.getAddress({
chainId: 'bip122:000000000000000000651ef99cb9fcbe/slip44:145',
keyPath: "m/44'/145'/0'/0/0"
})

Response

FieldTypeNotes
body.commandstringAlways getAddress
body.parameter.addressstringCashAddr P2PKH (bitcoincash:q…) — always this format
header.statusstringsuccess on completion
{
"header": {
"version": "1.0",
"status": "success"
},
"body": {
"command": "getAddress",
"parameter": {
"address": "bitcoincash:q…"
}
}
}

signTransaction — <payload.transaction>

payload.transaction:

{
"inputs": [
{
"rawTransaction": "<prev tx hex>",
"index": 0,
"txType": "p2pkh",
"keyPath": "m/44'/145'/0'/0/0",
"sequence": 4294967295
}
],
"outputs": [
{
"txType": "p2pkh",
"amount": "100000",
"addresses": [
"bitcoincash:q…"
]
}
]
}
FieldTypeRequiredSourceUnitDescription
inputs[].rawTransactionhexRequired-RealWalletFull prev-tx hex of the UTXO being spent; must be device-owned
inputs[].indexnumberRequiredAppUTXO output index (utxo_idx)
inputs[].txTypeenumRequiredAppAlways p2pkh on Bitcoin Cash
inputs[].keyPathstringRequired-RealWalletPath that signs this input (default m/44'/145'/0'/0/0)
inputs[].sequencenumberOptionalAppNot defaulted to 0xffffffff — when omitted the bridge uses 0xfffffffd for RBF-enabled coins and leaves it unset otherwise. Also note the first input's value applies to the whole transaction.
outputs[].txTypeenumRequiredAppAlways p2pkh
outputs[].amountstringRequiredAppsatoshiOutput value (value in the preset)
outputs[].addressesstring[]Required-RealAppCashAddr or legacy base58. Only addresses[0] is used, and exactly one non-change output is allowed — more than one destination is rejected with param_error. Use a second output with txType: 'change' for change.

Request

await dcent.sign({
method: 'signTransaction',
chainId: 'bip122:000000000000000000651ef99cb9fcbe/slip44:145',
payload: {
keyPath: "m/44'/145'/0'/0/0",
transaction: {
inputs: [
{
rawTransaction: '0100000001abcdef…88ac00000000',
index: 0,
txType: 'p2pkh',
keyPath: "m/44'/145'/0'/0/0",
sequence: 4294967295
}
],
outputs: [
{
txType: 'p2pkh',
amount: '100000',
addresses: [
'bitcoincash:q…'
]
}
]
}
}
}) // → body.parameter.signature

Response

FieldTypeNotes
body.parameter.signaturehexThe broadcast-ready serialized signed transaction — the full Bitcoin Cash raw tx hex, not a bare signature. Push it to a BCH node / broadcast API as-is.
body.commandstringAlways signTransaction
header.statusstringsuccess on completion
{
"header": {
"status": "success"
},
"body": {
"command": "signTransaction",
"parameter": {
"signature": "<signed raw tx hex>"
}
}
}

Variant — multi-step builder

As an alternative to the single-call form, the same UTXO builder used for Bitcoin is available (the playground drives it via btx:new / btx:addInput / btx:addOutput / btx:buildAndSign):

const tx = dcent.getBitcoinTransactionObject()
dcent.addBitcoinTransactionInput(tx, prevTxHex, utxoIndex, 'p2pkh', "m/44'/145'/0'/0/0")
dcent.addBitcoinTransactionOutput(tx, 'p2pkh', 100000, 'bitcoincash:q…')
// then sign

Common Mistakes

danger

Using a SegWit path or txType — Bitcoin Cash has no SegWit. txType must be p2pkh and the path must use purpose 44' with coinType 145 (never m/84' or m/49'). Expecting a base58 1… address — the DCENT device only returns CashAddr (bitcoincash:q…); there is no 1… output and addressFormat does not change it. Convert client-side if a receiver requires legacy base58. Missing change output — any input value not assigned to an output becomes the miner fee. Amounts not in satoshiamount is an integer in satoshi (1 BCH = 1e8).