confluxSignTransaction
Use requirement
Firmware version required
Touch: 3.0.0
Classic/Mini: 2.4.0
Conflux: Sign transaction
Asks device to sign given transaction. User is asked to confirm all transaction details on OneKey.
const response = await HardwareSDK.confluxSignTransaction(connectId, deviceId, params)
Params
path
— requiredstring | Array<number>
minimum length is3
. read moretransaction
- requiredConfluxTransaction
typeto
- requiredstring
of address hex stringvalue
- requiredstring
of amount convert to BigInt hex stringgasLimit
- requiredstring
of gas limit convert to BigInt hex stringgasPrice
- requiredstring
of gas price convert to BigInt hex stringnonce
- requiredstring
of nonce convert to BigInt hex stringepochHeight
- requiredstring
of epoch height convert to BigInt hex stringstorageLimit
- requiredstring
of storage limit convert to BigInt hex stringchainId
- requirednumber
of the id of the chaindata
- optionalstring
of hex data
Example
HardwareSDK.confluxSignMessage(connectId, deviceId, {
path: "m/44'/503'/0'/0'/0",
transaction: {
to: "0x7314e0f1c0e28474bdb6be3e2c3e0453255188f8",
value: "0xf4240",
data: "0x01",
chainId: "1",
nonce: "0x00",
epochHeight: "0x00",
gasPrice: "0xbebc200",
gasLimit: "0x5208",
storageLimit: "0x5208",
}
});
Result
{
success: true,
payload: {
v: string;
r: string;
s: string;
}
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}
Last updated
Was this helpful?