Asks device to sign given transaction. User is asked to confirm all transaction details on OneKey.
const response = await HardwareSDK.xrpSignTransaction(connectId, deviceId, params)
type XrpTransaction = {
fee: string;
flags?: number;
sequence: number;
maxLedgerVersion?: number; // Proto: "last_ledger_sequence"
payment: RipplePayment;
}
type XrpPayment = {
amount: string;
destination: string;
destinationTag?: number;
}
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',
}
}
});
{
success: true,
payload: {
signature: string;
serializedTx: string;
}
}
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}