Sign API
The single signing entry point. Every signature — transactions, messages, typed data, data, auth entries — goes through sign({ method, chainId, payload }).
Signature
await dcent.sign({
method: string, // 'signTransaction' | 'signMessage' | 'signTypedData' | 'signData' | 'signAuthEntry'
chainId: string, // full CAIP-19, e.g. 'eip155:1/slip44:60'
payload: {
keyPath: string, // BIP-44 (Cardano: CIP-1852; Bitcoin also m/49' · m/84' · m/86' — see the chain pages) — REQUIRED for every method
… // method- & network-specific (see Chain Reference)
}
}): Promise<V1Response>
The common request shell
| Field | Type | Required | Notes |
|---|---|---|---|
method | string | Required | Intent. The connector forwards it as an opaque string. |
chainId | string | Required | Target network — the full CAIP-19 string exactly as listed, including /slip44 where the chain has one (Cardano does not). |
payload.keyPath | string | Required | Derivation path, every method. |
payload.transaction / .message / .data … | object/string | per method | Defined per network — see Chain Reference. |
The connector is chain-agnostic. It validates keyPath + JSON-serializability (serialized payload ≤ 65,536 characters) and forwards payload opaquely. There is no per-chain branching and no method enum at the connector layer.
The common response shell
Success returns body.parameter; the field depends on the method:
| method | body.parameter |
|---|---|
signTransaction | { signature } — serialized signed tx (the exact form depends on the network — see the network page) |
signMessage | { signature } |
signTypedData | { signature } — EIP-712 |
signData | { signature, key } — Cardano CIP-30 DataSignature |
signAuthEntry | { signedAuthEntry, signerAddress } — Stellar Soroban |
signTransaction.signature is not "just a signature" — it's the serialized signed transaction (e.g. EVM = RLP-encoded signed raw tx for eth_sendRawTransaction) — on most networks broadcast-ready. Exact form is per-network; see each Chain Reference page.
signTransaction signs a complete, broadcast-ready transaction. DCENT does not fetch consensus fields for you — the App must supply a fully-formed transaction (nonce, fee, blockhash/sequence, and any other network-required field, already set). If a required consensus field is missing, signTransaction returns -32602 (Invalid params); some other fields have defaults or are signed as 0 when omitted (see each chain page). Freshness — keeping nonce and expiry-style fields (blockhash, LastLedgerSequence, etc.) current — is the App's responsibility. Exactly which fields are required is per-network; see each Chain Reference page.
Where to go next
Payload shapes live on the network pages, not here (no duplication):
Methods
signTransaction
Signs a transaction and returns a serialized signed transaction (the exact form depends on the network — see the network page). The payload shape is network-specific.
signMessage
Signs an arbitrary message. Supported on the Ethereum family, Kaia, Solana, Stellar, and Polkadot parachains — not on the non-EVM Conflux and VeChain families.
signTypedData
Signs EIP-712 typed data. EVM and Kaia only.
signData
Signs CIP-8 / CIP-30 / CIP-95 data and returns a DataSignature. Cardano.
signAuthEntry
Signs a Soroban SorobanAuthorizationEntry. Stellar.