Skip to main content

Bitcoin Arbitrary Message

BTC arbitrary message signing can also be performed by Typed Message signing, which is considered more secure.
The example below illustrates the use of the Raw Signing feature for Bitcoin arbitrary message signing:
  1. Start by creating a transaction of type RAW, shown under operation (JS) or by using create_raw_transaction() (PY).
  2. Now, specify the source who is signing the message, which is the default vault (Id 0) in our case.
After sending the transaction for signing, wait for its completion so you can retrieve the signature. The loop in the example above waits for the status of the transaction to be COMPLETED, or until an issue arises. Once the transaction is complete, we print the full signature by accessing the transaction object signedMessages, then signature.