Sign Wizard
This guide focuses on "how an application can safely hand over data to be signed to UKey Wallet and obtain a verifiable signature result." The transaction structure of different chains is very different, so the document is split by chain, describing the path, inputs, device confirmation content and signature verification method respectively. Read request basis first for the surrounding flow.
Outline
- Prerequisites: firmware version, SDK entry, transmission method and whether device confirmation is required.
- Signature link: Connect the device → Select the account path → Construct the request → Device-side review → Return the signature → Application-side signature verification.
- Minimal example: retain necessary event listening, core request inputs and result verification.
- Troubleshooting directions: path error, data format mismatch, device rejection, request timeout, network broadcast failure.
Preflight Check
| Checkpoint | Remarks |
|---|---|
| Version check | Keep firmware and SDK versions aligned, then pick WebUSB, BLE, or the low-level plug-in path by platform. |
| HD path | Each chain has its own HD Path rules; hardened and non-hardened segments need separate attention. |
| Session data | Most chain calls need connectId + deviceId; refresh deviceId after a device reset. |
| Hidden wallet | Any flow that uses Passphrase should carry or refresh passphraseState. |
| UI handling | Subscribe to UI_EVENT first, then answer PIN, Passphrase, or confirmation prompts with uiResponse. |
| Result check | Validate success first, then verify the address, signature, or serialized transaction with the chain library. |
| Safety | If the device display does not match the app expectation, let the user reject the request and do not auto-replay it. |
Wizard List
- EVM Signer — EIP-1559/Legacy Transactions, Message Signing, Typed Data and Pre-Broadcast Verification.
- BTC Signer — UTXO, script type, pre-sequence transaction, change and fee verification.
- Solana Signer — Full hardened path, rawTx preparation, signature appending and result verification.