Adds a reference output to the transaction.
If no raw transaction is provided, a new transaction is created.
The output value is set to at least the dust threshold.
Arguments:
Name | Type | Presence | Description |
---|---|---|---|
rawtx |
string | required | the raw transaction to extend (can be null ) |
destination |
string | required | the reference address or destination |
amount |
number | optional | the optional reference amount (minimal by default) |
Result:
"rawtx" // (string) the hex-encoded modified raw transaction
Example:
$ omnicore-cli "omni_createrawtx_reference" \
"0100000001a7a9402ecd77f3c9f745793c9ec805bfa2e14b89877581c734c774864247e6f50400000000ffffffff03aa0a00000
00000001976a9146d18edfe073d53f84dd491dae1379f8fb0dfe5d488ac5c0d0000000000004751210252ce4bdd3ce38b4ebbc5a
6e1343608230da508ff12d23d85b58c964204c4cef3210294cc195fc096f87d0f813a337ae7e5f961b1c8a18f1f8604a909b3a51
21f065b52aeaa0a0000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac00000000" \
"1CE8bBr1dYZRMnpmyYsFEoexa1YoPz2mfB" \
0.005