i'm thinking of developing a bridge between Tron and Ethereum chains for my erc-20 token on Azure and store my private keys in Azure key vault. For ethereum i've found a nice library just for this: https://github.com/tmarkovski/ethereumjs-tx-keyvault, but will the same approach work in tronweb? tronweb uses elliptic.js for signatures:
export function ECKeySign(hashBytes, priKeyBytes) {
const ec = new EC("secp256k1");
const key = ec.keyFromPrivate(priKeyBytes, "bytes");
const signature = key.sign(hashBytes);
const r = signature.r;
const s = signature.s;
const id = signature.recoveryParam;
let rHex = r.toString("hex");
while (rHex.length < 64) {
rHex = `0${rHex}`;
}
let sHex = s.toString("hex");
while (sHex.length < 64) {
sHex = `0${sHex}`;
}
const idHex = byte2hexStr(id);
const signHex = rHex + sHex + idHex;
return signHex;
}