Sign API — per-coin functions → sign()
Every v1 getXxxSignedTransaction / getXxxSignedMessage becomes one sign() call — except getHederaSignedMessage, which has no v2 counterpart (Hedera has no signMessage; the request returns method_not_found -32601). The network's payload.transaction shape is on its Chain Reference page.
warning
The biggest semantic change: v1 had three input patterns — ① EVM positional, ② {unsignedTx,…}, and ③ {coinType, sigHash, …} (you computed the hash yourself). v2 takes the full transaction object for every network — you no longer pre-compute a sigHash. Some families also accept a payload you built yourself, alongside their structured forms (see each network page).
EVM example
v1
await dcent.getEthereumSignedTransaction(
dcent.coinType.ETHEREUM, '0x0', '0x3b9aca00', '0x5208',
'0xRecipient', '0x2386f26fc10000', '0x', "m/44'/60'/0'/0/0",
1, 2, { maxFeePerGas:'0x77359400', maxPriorityFeePerGas:'0x3b9aca00' })
v2
await dcent.sign({
method:'signTransaction',
chainId:'eip155:1/slip44:60',
payload:{
keyPath:"m/44'/60'/0'/0/0",
transaction:{
type:2,
nonce:'0x0',
gasLimit:'0x5208',
maxFeePerGas:'0x77359400',
maxPriorityFeePerGas:'0x3b9aca00',
to:'0xRecipient',
value:'0x2386f26fc10000',
data:'0x'
}
}
})
Mapping table (v1 input pattern → v2)
| v1 function | pattern | v2 |
|---|---|---|
getEthereumSignedTransaction | ① positional | signTransaction · eip155:N |
getTokenSignedTransaction | ① positional | signTransaction · eip155 (data=calldata) |
getBitcoinSignedTransaction | ② tx object | signTransaction · bip122 |
getXrpSignedTransaction | ② tx object | signTransaction · xrpl:0 |
getTronSignedTransaction | ② unsignedTx | signTransaction · tron |
getTrcTokenSignedTransaction | ② unsignedTx | signTransaction · tron |
getKlaytnSignedTransaction | ① positional | signTransaction · Kaia (eip155:8217/slip44:60) |
getHederaSignedTransaction | ② unsignedTx | signTransaction · hedera |
getStellarSignedTransaction | ② unsignedTx | signTransaction · stellar |
getCosmosSignedTransaction | ③ sigHash | signTransaction · cosmos:cosmoshub-4 |
getTezos/Vechain/Near/Havah/Polkadot/AlgorandSignedTransaction | ③ sigHash | signTransaction · (network chainId) |
getParachainSignedTransaction | ③ sigHash | signTransaction · (parachain chainId, e.g. Astar) |
getEthereumSignedMessage | — | signMessage · eip155:N |
getSignedMessage (coinType) | — | signMessage · (network chainId) |
getHederaSignedMessage | — | No v2 counterpart — method_not_found (-32601) |
getSignedData (per the v1 guide: hex data, e.g. an EIP-712 0x1901… pre-image, hashed and signed) | — | signTypedData · eip155:N — v2 takes the typed-data JSON (data, version), not the encoded hexv2 signData (Cardano CIP-8 / CIP-30 / CIP-95) is a new verb with no v1 counterpart |