scdoSignTransaction
Use requirement
Firmware version required
Touch: 4.10.0
SCDO: sign transaction
Signs transaction using the private key derived by given BIP32 path.
const response = await HardwareSDK.scdoSignTransaction(connectId, deviceId, {
path: "m/44'/541'/0'/0/0",
nonce: "0x0",
gasPrice: "0xbebc200",
gasLimit: "0x5208",
to: "1S0118a02f993fc7a4348fd36b7f7a596948f02b31",
value: "0xf4240",
timestamp: "0",
data: "0x", // optional
txType: 0 // optional
});
Params
Optional common params
path
— requiredstring | Array<number>
minimum length is 3. read morenonce
— requiredstring
transaction nonce in hexgasPrice
— requiredstring
transaction gas price in hexgasLimit
— requiredstring
transaction gas limit in hexto
— requiredstring
destination addressvalue
— requiredstring
transaction value in hextimestamp
— optionalstring
transaction timestampdata
— optionalstring
transaction data in hextxType
— optionalnumber
transaction type
Example
const response = await HardwareSDK.scdoSignTransaction(connectId, deviceId, {
path: "m/44'/541'/0'/0/0",
nonce: "0x0",
gasPrice: "0xbebc200",
gasLimit: "0x5208",
to: "1S0118a02f993fc7a4348fd36b7f7a596948f02b31",
value: "0xf4240",
timestamp: "0"
});
Result
{
success: true,
payload: {
signature: string,
data_length: number,
path: string
}
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}
Last updated
Was this helpful?