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.
| Field | Value |
|---|---|
| Family | Bitcoin (UTXO) |
| coinType | 145 |
| keyPath | m/44'/145'/<accountIdx>'/0/0 |
| amount unit | satoshi |
| chainId | bip122:000000000000000000651ef99cb9fcbe/slip44:145 |
Supported Methods
| Method | Supported |
|---|---|
| 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.
| Method | DCENT Biometric Wallet | DCENT X |
|---|---|---|
getAddress | 1.5.1 or higher | 1.0.0 or higher |
signTransaction | 1.5.1 or higher | 1.0.0 or higher |
addressFormat
| Format | Path | Status |
|---|---|---|
cashaddr (P2PKH — bitcoincash:q…) | m/44'/145'/0'/0/0 | Only format |
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.
| Field | Type | Required | Source | Notes |
|---|---|---|---|---|
chainId | string | Required | App | Full CAIP-19 — bip122:000000000000000000651ef99cb9fcbe/slip44:145 |
keyPath | string | Required | App | BIP-44, default m/44'/145'/0'/0/0 |
addressFormat | enum | Optional | App | No 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
| Field | Type | Notes |
|---|---|---|
body.command | string | Always getAddress |
body.parameter.address | string | CashAddr P2PKH (bitcoincash:q…) — always this format |
header.status | string | success 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…"
]
}
]
}
| Field | Type | Required | Source | Unit | Description |
|---|---|---|---|---|---|
inputs[].rawTransaction | hex | Required-Real | Wallet | — | Full prev-tx hex of the UTXO being spent; must be device-owned |
inputs[].index | number | Required | App | — | UTXO output index (utxo_idx) |
inputs[].txType | enum | Required | App | — | Always p2pkh on Bitcoin Cash |
inputs[].keyPath | string | Required-Real | Wallet | — | Path that signs this input (default m/44'/145'/0'/0/0) |
inputs[].sequence | number | Optional | App | — | Not 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[].txType | enum | Required | App | — | Always p2pkh |
outputs[].amount | string | Required | App | satoshi | Output value (value in the preset) |
outputs[].addresses | string[] | Required-Real | App | — | CashAddr 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
| Field | Type | Notes |
|---|---|---|
body.parameter.signature | hex | The 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.command | string | Always signTransaction |
header.status | string | success 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
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 satoshi — amount is an integer in satoshi (1 BCH = 1e8).