You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method allows users to sign a text string that is displayed on Ledger devices.
237
+
This method allows users to sign an off-chain message displayed on Ledger devices, following the [Solana off-chain message signing specification](https://docs.anza.xyz/proposals/off-chain-message-signing).
- The message to be signed, which will be displayed on the Ledger device.
258
+
- **Type:** `string|Uint8Array`
259
+
- The message to sign. Pass a `string` for V0/V1/Legacy (UTF-8 encoded automatically). Pass a `Uint8Array` for Raw mode when you have an already-formatted binary payload.
- `skipOpenApp`: Skip the automatic open-app step.
284
+
- `version`: The off-chain message signing mode. Defaults to `SignMessageVersion.V0`.
285
+
- **V0** (default) — original off-chain message header with `appDomain`, format detection, and up to 65 515 bytes. Falls back to Legacy on `6a81`.
286
+
- **V1** — simplified header: no `appDomain`, no format byte. Up to 65 535 bytes. Falls back to V0 -> Legacy on `6a81`. Not yet supported by released firmware.
287
+
- **Legacy** — compact header for backward compatibility with old Solana app firmware. Current firmware will reject it with `6a81`.
288
+
- **Raw** — pass-through mode: sends the caller-provided `Uint8Array` payload directly with no header wrapping. Use when you have already built a valid off-chain message. Returns a plain base58 signature (no envelope).
289
+
- `appDomain`: Application domain string for V0 headers. Encoded as UTF-8 and padded/truncated to 32 bytes. Ignored for V1, Legacy, and Raw.
259
290
260
291
#### **Returns**
261
292
262
293
- `observable` Emits DeviceActionState updates, including the following details:
263
294
264
295
```typescript
265
-
typeSignature=Uint8Array; // Signed message bytes
296
+
typeSignMessageOutput= {
297
+
signature: string; // base58 envelope (V1/V0/Legacy) or raw base58 signature (Raw)
298
+
};
266
299
```
267
300
268
301
- `cancel` A function to cancel the action on the Ledger device.
0 commit comments