Submit Data to Linkmark
Technical instructions for developers and advanced users on how to submit data marks using the Bitmark client.
Prerequisites & Setup
To submit data marks to Linkmark, you will need to use a specific version of the Bitmark client software. This version includes the necessary mark
Remote Procedure Call (RPC) command.
Required Bitmark Client:
Fork available at: https://github.com/bitmarkcc/bitmark/tree/lm
Ensure this client is properly installed and configured to communicate with the Bitmark network.
Submission Overview
When you submit a mark, the data (which can be a hash, a link, or a description) is carefully encoded and stored within one of the public keys (up to 65 bytes) in a multi-signature (multisig) transaction on the Bitmark blockchain. This method ensures the integrity and permanence of the association you are creating.
Example Usage
Below is a command-line example demonstrating how to use the mark
RPC command with the bitmark-cli
(aliased as bc
in the example). This shows the process of creating data files (m1
, m2
), submitting them, and retrieving the raw transaction details.
server@pi64:~ $ cat m1 {"hash":{"type":"sha256", "hex":"3b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f84128"}, "link":{"protocol":"https", "host":"example_com", "port":"443", "path":"p", "cert_hash":{"type":"sha256", "hex":"1e8ebd886b03d2dce74dad6350d7d83b28507e80935041800d242a661a4a4bce"}}} server@pi64 ~ $ bc mark "`cat m1`" &> t server@pi64 ~ $ cat t 1357300fc68070f2993030914f0639135908b546d898e6e06c3cd5873eefc49b server@pi64 ~ $ tx1=`cat t` server@pi64 ~ $ bc getrawtransaction $tx1 1 { "hex" : "010000000136cc496dc7878464d614cf768b53b82c9d31df6d2c738629acabce92fa0ee073000000006b483045022100f2fcaf84eb15dd7335fb923eec7f15a203d2e4dc3a9f65bb3dbd99938954c8d2022003868f8ada01fcf05baba1f377546eb1d0b0327f02dfe48f696e11f2202d518a0121032275ad245335ea1a7b520717e5f03ca5bd14bfd1d8c16956f7057c3025263084ffffffff02104a3377000000001976a914a463694dc05c330623cdd7eee70a44addfa5f87588ac1027000000000000c951410668148b3bed9f20203b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f8412800000000000000000000000000000000000000000000000041066c1402567ea1280162b4ead7ec3151321cf6411a548b3bed9f60201e8ebd886b03d2dce74dad6350d7d83b28507e80935041800d242a661a4a4bce00000000004104a123de04b061842192c3fa661985acd337f14c2cb4cc46705cab71bcb0ab05e215e07f2764172f26d25d83e21dc40c9a3d3a8f6442d777dc54bb30de26bc208653ae00000000", "txid" : "1357300fc68070f2993030914f0639135908b546d898e6e06c3cd5873eefc49b", "version" : 1, "locktime" : 0, "vin" : [ { "txid" : "73e00efa92ceabac2986732c6ddf319d2cb8538b76cf14d6648487c76d49cc36", "vout" : 0, "scriptSig" : { "asm" : "3045022100f2fcaf84eb15dd7335fb923eec7f15a203d2e4dc3a9f65bb3dbd99938954c8d2022003868f8ada01fcf05baba1f377546eb1d0b0327f02dfe48f696e11f2202d518a01 032275ad245335ea1a7b520717e5f03ca5bd14bfd1d8c16956f7057c3025263084", "hex" : "483045022100f2fcaf84eb15dd7335fb923eec7f15a203d2e4dc3a9f65bb3dbd99938954c8d2022003868f8ada01fcf05baba1f377546eb1d0b0327f02dfe48f696e11f2202d518a0121032275ad245335ea1a7b520717e5f03ca5bd14bfd1d8c16956f7057c3025263084" }, "sequence" : 4294967295 } ], "vout" : [ { "value" : 19.99850000, "n" : 0, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 a463694dc05c330623cdd7eee70a44addfa5f875 OP_EQUALVERIFY OP_CHECKSIG", "hex" : "76a914a463694dc05c330623cdd7eee70a44addfa5f87588ac", "reqSigs" : 1, "type" : "pubkeyhash", "addresses" : [ "bTiUburcHzqSJT2x3D6WbYo9kbtswaTDqR" ] } }, { "value" : 0.00010000, "n" : 1, "scriptPubKey" : { "asm" : "1 0668148b3bed9f20203b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f84128000000000000000000000000000000000000000000000000 066c1402567ea1280162b4ead7ec3151321cf6411a548b3bed9f60201e8ebd886b03d2dce74dad6350d7d83b28507e80935041800d242a661a4a4bce0000000000 04a123de04b061842192c3fa661985acd337f14c2cb4cc46705cab71bcb0ab05e215e07f2764172f26d25d83e21dc40c9a3d3a8f6442d777dc54bb30de26bc2086 3 OP_CHECKMULTISIG", "hex" : "51410668148b3bed9f20203b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f8412800000000000000000000000000000000000000000000000041066c1402567ea1280162b4ead7ec3151321cf6411a548b3bed9f60201e8ebd886b03d2dce74dad6350d7d83b28507e80935041800d242a661a4a4bce00000000004104a123de04b061842192c3fa661985acd337f14c2cb4cc46705cab71bcb0ab05e215e07f2764172f26d25d83e21dc40c9a3d3a8f6442d777dc54bb30de26bc208653ae", "reqSigs" : 1, "type" : "multisig", "addresses" : [ "bCrsf9F2dig6wZmCWocf9YnjdcyQJgfb9N", "bVxPyLz8PXfhwJT3fhLxptTCNNauTjXZ5w", "bYVweVP6zbARFVKUHSjdVWUSMjGgP3Bzzw" ], "marking" : { "hash type" : "sha256", "hash hex" : "3b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd9bf99f84128", "link protocol" : "https", "link host" : "example_com", "link port" : "443", "link path" : "p", "link cert hash type" : "sha256", "link cert hash hex" : "1e8ebd886b3d2dce74dad6350d7d83b28507e8093504180d242a661a4a4bce" } } } ] } server@pi64 ~ $ alias bc alias bc='bitmark-cli' server@pi64 ~ $ cat m2 {"hash":{"type":"sha256", "hex":"3b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f84128"}, "desc":{"lang":"en", "text":"example_description"}} server@pi64 ~ $ bc mark "`cat m2`" &> t server@pi64 ~ $ tx2=`cat t` server@pi64 ~ $ bc getrawtransaction $tx2 1 { "hex" : "01000000019bc4ef3e87d53c6ce0e698d846b508591339064f91303099f27080c60f305713000000006b483045022100dc62ee5f49daedde083b9f06294fae6a8014d4f6b543e0419d1210321b91d9d302206cf6bceda739e7dd4ec51b216f352f57fc6655fd181061ffb56cd1f6072cf4b201210304c5900beb698915207e80a8ef04bc2c6eba2eb6c943509ad3e73db9f31d2745ffffffff021027000000000000c951410668148b3bed9f20203b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f841280000000000000000000000000000000000000000000000004106641202522d057a9d55048d609d35d8ffb58a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004104220428936d930f1adc03ae8b5ee3da0b10fc38591981be2cbe867f76ad6b3866d7aa5276a5786e524c0daa0596fb99dcc2e4b2bbcae1a3821e7ba55c50f9d1f453ae00233377000000001976a914ab3e05d5d018fb44f56643932e38e5bba4c9e58e88ac00000000", "txid" : "1b744e6b1647921a70fcdf05b8da2cb3741c2b8275ee64a1a1199e4cf95f6366", "version" : 1, "locktime" : 0, "vin" : [ { "txid" : "1357300fc68070f2993030914f0639135908b546d898e6e06c3cd5873eefc49b", "vout" : 0, "scriptSig" : { "asm" : "3045022100dc62ee5f49daedde083b9f06294fae6a8014d4f6b543e0419d1210321b91d9d302206cf6bceda739e7dd4ec51b216f352f57fc6655fd181061ffb56cd1f6072cf4b201 0304c5900beb698915207e80a8ef04bc2c6eba2eb6c943509ad3e73db9f31d2745", "hex" : "483045022100dc62ee5f49daedde083b9f06294fae6a8014d4f6b543e0419d1210321b91d9d302206cf6bceda739e7dd4ec51b216f352f57fc6655fd181061ffb56cd1f6072cf4b201210304c5900beb698915207e80a8ef04bc2c6eba2eb6c943509ad3e73db9f31d2745" }, "sequence" : 4294967295 } ], "vout" : [ { "value" : 0.00010000, "n" : 0, "scriptPubKey" : { "asm" : "1 0668148b3bed9f20203b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f84128000000000000000000000000000000000000000000000000 06641202522d057a9d55048d609d35d8ffb58a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 04220428936d930f1adc03ae8b5ee3da0b10fc38591981be2cbe867f76ad6b3866d7aa5276a5786e524c0daa0596fb99dcc2e4b2bbcae1a3821e7ba55c50f9d1f4 3 OP_CHECKMULTISIG", "hex" : "51410668148b3bed9f20203b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd09bf99f841280000000000000000000000000000000000000000000000004106641202522d057a9d55048d609d35d8ffb58a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004104220428936d930f1adc03ae8b5ee3da0b10fc38591981be2cbe867f76ad6b3866d7aa5276a5786e524c0daa0596fb99dcc2e4b2bbcae1a3821e7ba55c50f9d1f453ae", "reqSigs" : 1, "type" : "multisig", "addresses" : [ "bCrsf9F2dig6wZmCWocf9YnjdcyQJgfb9N", "baxaFrgwgpTGoXZsrncS5fxA3fWMKiZEAk", "bKyHuAAdWjJRus4aUpCy6Eanj8cN58kM1u" ], "marking" : { "hash type" : "sha256", "hash hex" : "3b3aeeaa791c9d2dcea33897f71d89372e55fc1025f92dedcacd9bf99f84128", "desc language" : "en", "desc text" : "example_description" } } }, { "value" : 19.99840000, "n" : 1, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 ab3e05d5d018fb44f56643932e38e5bba4c9e58e OP_EQUALVERIFY OP_CHECKSIG", "hex" : "76a914ab3e05d5d018fb44f56643932e38e5bba4c9e58e88ac", "reqSigs" : 1, "type" : "pubkeyhash", "addresses" : [ "bULiYTEBRrTMUxuDN769QDPuXn7j6oCGWd" ] } } ] }
For submitting a bittorrent info hash and description, you can use the mark-torrent.py script with the hash as the first argument and the description as the second argument. Modify the tracker within the script. You can also use this script (slightly modified) for subitting other types of hashes/links.