I have a JSON representation of an XRPL transaction, like the one below, and I want to sign it in C++ using rippled. How can I?
{
"TransactionType" : "Payment",
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Amount" : "1000000"
}
STTx(which stands for "serialized type: transaction"), from JSON. ripple-libpp has good example code.SecretKey. If you have a Base58-encoded signing key, you can useparseBase58(passTokenType::AccountSecretfor the first parameter).PublicKey) from the signing key withderivePublicKey(passKeyType::secp256k1orKeyType::ed25519for the first parameter, depending on the signing algorithm you choose to use).STTx::sign.Blob const signature = sttx.getFieldVL(sfTxnSignature)(aBlobis a vector of bytes).