Adds a payload with class C (op-return) encoding to the transaction.
If no raw transaction is provided, a new transaction is created.
If the data encoding fails, then the transaction is not modified.
Arguments:
| Name | Type | Presence | Description |
|---|---|---|---|
rawtx |
string | required | the raw transaction to extend (can be null) |
payload |
string | required | the hex-encoded payload to add |
Result:
"rawtx" // (string) the hex-encoded modified raw transactionExample:
$ omnicore-cli "omni_createrawtx_opreturn" "01000000000000000000" "00000000000000020000000006dac2c0"