Skip to Content
Hardware
On this page

xrpSignTransaction

Ripple: sign transaction

Requests a transaction signature. The user reviews and confirms the request on the device.

const response = await HardwareSDK.xrpSignTransaction(connectId, deviceId, params)

Params

Optional common params

  • path - required string | Array<number> SDK minimum length is 5. Path format
  • transaction - required XrpTransaction type

XrpTransaction Type

type XrpTransaction = { fee: string; flags?: number; sequence: number; maxLedgerVersion?: number; // Proto: "last_ledger_sequence" payment: XrpPayment; } type XrpPayment = { amount: number; destination: string; destinationTag?: number; }

The current SDK runtime expects { path, transaction } and validates transaction.payment.amount as a number. Its exported TypeScript declaration is inconsistent with that runtime shape. The example below follows the runtime contract; check the declaration in your installed SDK version before compiling the integration. Amounts are in drops.

Example

HardwareSDK.xrpSignTransaction(connectId, deviceId, { path: "m/44'/144'/0'/0/0", transaction: { fee: '12', flags: 0, sequence: 32841006, maxLedgerVersion: 32841630, payment: { amount: 1000000, destination: 'rwgumKP89VhMrJ4dRkGVS4tafRfAmZmKf8', } } });

Result

{ success: true, payload: { signature: string; serializedTx: string; } }

Error

{ success: false, payload: { error: string, // error message code?: string | number // error code } }
Last updated on