Sorry if that question sounds stupid, but I couldn't find any examples yet.
Could someone kindly post a simple example (or a link to) on how to notarize a string on flo blockchain with the help of the rpc-cli?
Maybe even how to access/decode the same string again from the rpc-cli.
Any help/example is greatly appreciated, TIA.
To put a floData message into the blockchain, you can use the qt-client, or use the RPC command
sendtoaddress like this:
sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" "flodata" )
Send an amount to a given address.
Arguments:
1. "address" (string, required) The flo address to send to.
2. "amount" (numeric or string, required) The amount in " + CURRENCY_UNIT + " to send. eg 0.1
3. "comment" (string, optional) A comment used to store what the transaction is for.
This is not part of the transaction, just kept in your wallet.
4. "comment_to" (string, optional) A comment to store the name of the person or organization
to which you're sending the transaction. This is not part of the
transaction, just kept in your wallet.
5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
The recipient will receive less flos than you enter in the amount field.
6. replaceable (boolean, optional) Allow this transaction to be replaced by a transaction with higher fees via BIP 125
7. conf_target (numeric, optional) Confirmation target (in blocks)
8. "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
"UNSET"
"ECONOMICAL"
"CONSERVATIVE"
9. floData (string, optional) Transaction floData (default = "").
Result:
"txid" (string) The transaction id.
Examples:
sendtoaddress FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP 0.1
bash# flo-cli sendtoaddress FCtjVwFt2Eg2sUSrLtsY4iPLg8Zzon3hHd 1.0 "" "" false false 150 "UNSET" "hello world"
45864c9920b631747297048f9de2218379b591b734072708801b5a1fd28dd0d2
bash# flo-cli getrawtransaction 45864c9920b631747297048f9de2218379b591b734072708801b5a1fd28dd0d2
02000000027793aa067fe142ddf1306f1aace825add49d1bb93279858a47eb1e21a4e91c74000000006a473044022055f692cbd3e94fb05c83e807c96f8f57d64604ac9a1a4a9f8489fa05117dd0fc022026efe134e83a17cd46b30693895729398f7df5acd97eb193cc5b82b36cbef81c0121022dc4b3c86c97416efcbf325074c89a122ab4433f00d7d0eed453594e60073157feffffffd90babfbcba28843386031a2ea28f8e5b8b59a01d354599d4544a5e35937d0e7010000006a4730440220395088483bd6554b2311a58e3031463ae4a29141a86db2485be473f7914c0641022049dbe70ce61188039d4fcb1a2934f612c3efb464c6b56285ceb600486864f37d01210268628141efa479512dfa2713ed912f0907cce73d72fad3b1ae2c56c592552cc1feffffff024e689100000000001976a9140edf21026b093aa53cb7ac5c03e6d9ed93c1bb3588ac00e1f505000000001976a9144d7835dbc57c4c05a15538c5f8016246a39ccf6b88ac756d34000b68656c6c6f20776f726c64
bash# flo-cli decoderawtransaction 02000000027793aa067fe142ddf1306f1aace825add49d1bb93279858a47eb1e21a4e91c74000000006a473044022055f692cbd3e94fb05c83e807c96f8f57d64604ac9a1a4a9f8489fa05117dd0fc022026efe134e83a17cd46b30693895729398f7df5acd97eb193cc5b82b36cbef81c0121022dc4b3c86c97416efcbf325074c89a122ab4433f00d7d0eed453594e60073157feffffffd90babfbcba28843386031a2ea28f8e5b8b59a01d354599d4544a5e35937d0e7010000006a4730440220395088483bd6554b2311a58e3031463ae4a29141a86db2485be473f7914c0641022049dbe70ce61188039d4fcb1a2934f612c3efb464c6b56285ceb600486864f37d01210268628141efa479512dfa2713ed912f0907cce73d72fad3b1ae2c56c592552cc1feffffff024e689100000000001976a9140edf21026b093aa53cb7ac5c03e6d9ed93c1bb3588ac00e1f505000000001976a9144d7835dbc57c4c05a15538c5f8016246a39ccf6b88ac756d34000b68656c6c6f20776f726c64
{
"txid": "45864c9920b631747297048f9de2218379b591b734072708801b5a1fd28dd0d2",
"hash": "45864c9920b631747297048f9de2218379b591b734072708801b5a1fd28dd0d2",
"version": 2,
"size": 384,
"vsize": 384,
"locktime": 3435893,
"vin": [
{
"txid": "741ce9a4211eeb478a857932b91b9dd4ad25e8ac1a6f30f1dd42e17f06aa9377",
"vout": 0,
"scriptSig": {
"asm": "3044022055f692cbd3e94fb05c83e807c96f8f57d64604ac9a1a4a9f8489fa05117dd0fc022026efe134e83a17cd46b30693895729398f7df5acd97eb193cc5b82b36cbef81c[ALL] 022dc4b3c86c97416efcbf325074c89a122ab4433f00d7d0eed453594e60073157",
"hex": "473044022055f692cbd3e94fb05c83e807c96f8f57d64604ac9a1a4a9f8489fa05117dd0fc022026efe134e83a17cd46b30693895729398f7df5acd97eb193cc5b82b36cbef81c0121022dc4b3c86c97416efcbf325074c89a122ab4433f00d7d0eed453594e60073157"
},
"sequence": 4294967294
},
{
"txid": "e7d03759e3a544459d5954d3019ab5b8e5f828eaa23160384388a2cbfbab0bd9",
"vout": 1,
"scriptSig": {
"asm": "30440220395088483bd6554b2311a58e3031463ae4a29141a86db2485be473f7914c0641022049dbe70ce61188039d4fcb1a2934f612c3efb464c6b56285ceb600486864f37d[ALL] 0268628141efa479512dfa2713ed912f0907cce73d72fad3b1ae2c56c592552cc1",
"hex": "4730440220395088483bd6554b2311a58e3031463ae4a29141a86db2485be473f7914c0641022049dbe70ce61188039d4fcb1a2934f612c3efb464c6b56285ceb600486864f37d01210268628141efa479512dfa2713ed912f0907cce73d72fad3b1ae2c56c592552cc1"
},
"sequence": 4294967294
}
],
"vout": [
{
"value": 0.09529422,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 0edf21026b093aa53cb7ac5c03e6d9ed93c1bb35 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9140edf21026b093aa53cb7ac5c03e6d9ed93c1bb3588ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"F7BkDkuNJdtgVADCwpjMweZxVHWVbxfV7V"
]
}
},
{
"value": 1.00000000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 4d7835dbc57c4c05a15538c5f8016246a39ccf6b OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9144d7835dbc57c4c05a15538c5f8016246a39ccf6b88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"FCtjVwFt2Eg2sUSrLtsY4iPLg8Zzon3hHd"
]
}
}
],
"floData": "hello world"
}
http://network.flo.cash/tx/45864c9920b631747297048f9de2218379b591b734072708801b5a1fd28dd0d2You can also use the javascript SDK
https://www.npmjs.com/package/js-oip