Hello! I’d like to know whether it’s possible to sign and broadcast a raw bitcoin transaction encoded in hex.
What are my options to sign and send a bitcoin transaction? Without recurring to json formats to send the data.
I know of the method for signing raw messages but that’s an offchain operation.
Also I’d like to know if there’s a way to estimate a raw btc transaction using the provided endpoint.
Thank you very much.
Alec from Fireblocks here. You can use the raw signing feature to sign raw bitcoin transactions. This will allow you to sign the transaction through Fireblocks, but you will then need to retrieve the signature and broadcast it through a third-party node (or your own node).
You can estimate the fee by calculating the size of your raw transaction and using the /v1/estimate_network_fee endpoint to retrieve the recommended fees in sats/byte.
hi alec, thank you. The thing is that rawSigning method signs messages, not transactions per se. They are different formats. That endpoint even only accepts a sha256 message as input.
edit: I tried again sending a serialized bitcoin raw transaction, and it failed with “RAW_MSG_LEN_INVALID”
You should submit the sha256 hash of the serialized transaction. The returned signature will be valid for the transaction.