Zcash (ZEC)
Reference for Zcash.
| Field | Value |
|---|---|
| coinType | 133 |
| keyPath | m/44'/133'/<accountIdx>'/0/0 |
| amount unit | zatoshi (1 ZEC = 1e8) |
| chainId | bip122:00040fe8ec8471911baa1db1266ea15d/slip44:133 |
Supported Methods
| Method | Supported |
|---|---|
| getAddress | ✓ |
| signTransaction | ✓ |
| signMessage | ✗ |
| signTypedData | ✗ |
| signData | ✗ |
| signAuthEntry | ✗ |
Notes
Fully signable UTXO chain. DCENT signs the transparent t-address path only — shielded z-addresses are not supported. The consensus branch ID is passed in option (below). For each input, pass the previous output in DCENT's simple format: 442743454e54ff20 + the txid in reversed byte order (32 bytes) + the output amount as an 8-byte big-endian hex — a raw Zcash transaction hex is rejected with -32602. Shares the Bitcoin-family signTransaction path.
option (consensus branch ID)
Zcash's option identifies which network upgrade is currently active. It is a 16-hex-char string: the first 8 chars are the currency's GroupId, the last 8 are the active consensus branch ID. Because the correct branch ID changes at every network-upgrade activation height and the signer has no network access, the app must supply the current value — a value baked in at build time is guaranteed to go stale eventually.
| Field | Type | Required | Source | Notes |
|---|---|---|---|---|
option, chars 1–8 | hex | Required | App | GroupId — 892F2085 for Zcash. |
option, chars 9–16 | hex | Required | App | Active consensus branch ID — changes at every network-upgrade activation height. The signer accepts 37A5165B (NU6.3, from height 3,428,143) and 5437F330 (NU6.2, from height 3,364,600); any other value → -32602 |
Don't hardcode this. Compute it at prepare time from the current chain height, and pass the result through unchanged. A GroupId that doesn't match, a branch ID the signer does not recognize, or a length other than 16 hex chars is rejected with -32602. A branch ID that is recognized but stale (for example NU6.2 after NU6.3 activated) is not detected — it still signs, so a successful signature does not prove the branch ID is current.
The signTransaction payload shape (inputs, outputs, previous transactions) matches the Bitcoin-family signing path — the address version, coinType, the previous-transaction format (rawTransaction) and the required option differ (see above). Per-parameter tables come from the DCENT Web Bridge and the connector presets.
signTransaction
await dcent.sign({
method: 'signTransaction',
chainId: 'bip122:00040fe8ec8471911baa1db1266ea15d/slip44:133',
payload: {
keyPath: "m/44'/133'/0'/0/0",
transaction: {
inputs: [
{ rawTransaction: '<DCENT simple-format prev output>', index: 0, txType: 'p2pkh', keyPath: "m/44'/133'/0'/0/0" }
],
outputs: [
{ txType: 'p2pkh', amount: '990000', addresses: ['<t1... recipient>'] }
],
option: '<16-hex-char GroupId+branchId, wallet-computed>'
}
}
}) // → body.parameter.signature
signTransaction — full field reference
| Field | Type | Required | Source | Unit | Notes |
|---|---|---|---|---|---|
inputs[].rawTransaction | hex | Required-Real | Wallet | — | The previous output in DCENT's simple format: 442743454e54ff20 + the txid in reversed byte order (32 bytes) + the output amount as an 8-byte big-endian hex. A raw Zcash transaction hex is rejected with -32602 |
inputs[].index | number | Required | App | — | UTXO output index |
inputs[].txType | enum | Required | App | — | Always p2pkh — Zcash has no SegWit variant |
inputs[].keyPath | string | Required-Real | Wallet | — | Path that signs this input |
inputs[].sequence | number | Optional | App | — | When omitted, no sequence is sent and DCENT X then uses 0xffffffff (only Bitcoin mainnet defaults to 0xfffffffd, opt-in RBF). Each input's value must be a valid uint32, but only the first input's value is used, and it applies to every input (a first-input value of 0 is not sent, so the default applies). |
outputs[].amount | string | Required | App | zatoshi | Output value |
outputs[].addresses | string[] | Required-Real | App | — | Recipient (transparent t-address only). Only addresses[0] is signed (later entries are not signed, but a Bitcoin Taproot address (bc1p… / tb1p…) among them is rejected with -32602 — send a single address), exactly one non-change output allowed — use a second output with txType: 'change' for change. The change output's addresses[0] is a BIP-32 derivation path on your own account (for example m/44'/133'/0'/1/0), not an address — the device derives the change address from that path itself. Use a path on the account you are signing with; the full rule is on the Bitcoin page. |
option | hex (16 chars) | Required | App | — | Consensus branch ID — sub-field breakdown above. |
Fee floor (ZIP-317). The fee is implicit — inputTotal − outputTotal. It must be at least the ZIP-317 conventional fee, 5000 × max(2, max(number of inputs, number of outputs)) zatoshi (for example 10,000 zatoshi for 1 input / 2 outputs). A lower fee is rejected with -32602; the signer does not adjust your amounts, so lower the output amounts to raise the fee.