confluxSignTransaction
Use requirement
- Firmware version required
- UKey Lite 24 / UKey Lite 25: 2.4.0
- UKey Core 26: 1.1.0
Conflux: Sign transaction
Asks device to sign given transaction. User is asked to confirm all transaction details on Ukey Wallet.
const response = await HardwareSDK.confluxSignTransaction(
connectId,
deviceId,
params,
);
Params
path- requiredstring | Array<number>minimum length is3. read moretransaction- requiredConfluxTransactiontypeto- requiredstringof address hex stringvalue- requiredstringof amount convert to BigInt hex stringgasLimit- requiredstringof gas limit convert to BigInt hex stringgasPrice- requiredstringof gas price convert to BigInt hex stringnonce- requiredstringof nonce convert to BigInt hex stringepochHeight- requiredstringof epoch height convert to BigInt hex stringstorageLimit- requiredstringof storage limit convert to BigInt hex stringchainId- requirednumberof the id of the chaindata- optionalstringof 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
}
}