On this page

latest contributor to this doc

Last Edit:

@gcharang

Dilithium Module Tutorial

This tutorial provides a front-end developer all the knowledge necessary to create a graphical user interface (GUI) for the Dilithium Antara Module. The tutorial touches only briefly on the actual use cases of the Dilithium module.

This documentation does not discuss the underlying math and principles of quantum-resistant blockchain computing. Please inquire with our team for more details.

Because quantum computing is not yet realized in the technology industry, Dilithium is listed in the documentation only for display purposes.

The following tutorial should be considered "Advanced," and we recommend that any user attempting to implement Dilithium skim the Advanced Tutorial Series to obtain a general understanding of the more technical aspects of working with Antara Module technology.

Please follow the instructions for installing Komodo software from source.

This installs the normal Komodo software.

In this tutorial we use the test chain MUSIG to display the Dilithium Module.

You may replace the MUSIG ticker with the relevant ticker of any Smart Chain in the tutorial komodo-cli commands and achieve the same effect.

To launch the MUSIG Smart Chain, enter the command below in the terminal.

./komodod -ac_name=MUSIG -ac_supply=100000 -ac_reward=10000000 -ac_cclib=sudoku -ac_cc=2 -addnode=5.9.102.210 -addnode=195.201.20.230 -addnode=195.201.137.5

Ensure that the chain is syncing properly by watching the returned values from the getinfo method. The count of blocks synced should increase.

Dilithium is not active on a default Komodo Smart Chain. For the Dilithium Antara Module to function on the MUSIG chain, we now add an additional feature to the default installation.

The user must download an associated C library (also called a cclib module) and include this library in the src directory when compiling Komodo from source. (We repeat the compilation process in a moment.)

Currently, this Dilithium cclib module is included as a part of the Soduku cclib module. This is a matter of convenience for the developers and testers.

If a Komodo customer is interested in implementing Dilithium, please inquire with our team. We would be happy to separate Dilithium's cclib module from the Sudoku cclib module, and make Dilithium available in the default Antara Modules.

Stop the MUSIG daemon. (If the chain has not finished syncing to the network, that is okay for the moment. We can allow the syncing process to complete later.)

./komodo-cli -ac_name=MUSIG stop

Return to the instructions for compiling Komodo software from source and follow them again until you complete the ./zcutil/build.sh step, and pause.

Instructions for installing Komodo software from source

Now execute the following commands. These add the necessary cclib module for Dilithium.

cd ~/komodo/src/cc
./makecclib
cp sudokucc.so ../libcc.so
cd ../..
make

The Dilithium walkthrough agenda is as follows.

  • Manually create a handle (a handle is a Dilithium address that is human readable)
  • Send coins to this handle
  • Send coins from this handle
  • Show code examples for implementing Dilithium into a user interface (UI)
    • A terminal user interface (TUI) with Dilithium functionality can me found here

The Dilithium Module's API documentation contains an explanation of the nature of Dilithium transactions. These are called "Q Transactions," and can be compared to the "Z transactions" that are prominently featured in privacy transactions.

Q Transactions are referenced frequently throughout the tutorial. If necessary, please read the Dilithium Module's API documentation's introduction before continuing.

Link to Dilithium Module API Introduction

Initiate komodod with an active -pubkey launch parameter.

For instructions on launching with a pubkey, follow these linked instructions.

./komodod -ac_name=MUSIG -ac_supply=100000 -ac_reward=10000000 -ac_cclib=sudoku -ac_cc=2 -addnode=5.9.102.210 -addnode=195.201.20.230 -addnode=195.201.137.5 -pubkey=0377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b

If you are using a chain other than MUSIG, and if this chain's launch commands include the -ac_pubkey parameter, do not change this ac_pubkey setting.

Simply add the -pubkey setting to the launch commands.

The -pubkey and -ac_pubkey parameters are entirely separate parameters with different functionality.

Once your Smart Chain's daemon finishes loading, check that the pubkey is set properly.

./komodo-cli -ac_name=MUSIG setpubkey
{
  "error": "Can only set pubkey once, to change it you need to restart your daemon.",
  "address": "RVXJpc9N4j35psbqmRZzgpKmo98w1CnvHA",
  "pubkey": "0377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b"
}

You should see the correct pubkey in the returned json object.

Use the dumpprivkey RPC to export the private key of your pubkey and save this in a safe location.

Without this private key, any handles created for Dilithium will not be accessible.

Link to dumpprivkey RPC

A Dilithium keypair is a matching set of a pubkey and privkey (private key).

Use a generated random string to create a keypair.

./komodo-cli -ac_name=MUSIG cclib keypair 19 "[%22rand%22]"

To understand the need for the %22 strings in the command, read this linked CC Lib Formatting documentation.

{
  "status": "using random high entropy seed",
  "seed": "e580f34e9bdfd23108409e76475c7df3f924d149d494d5cdbc24aeb280237d4a",
  "pubkey": "81ac54913ffbe1ce5f7ed5ff3bde2284ea5d4813f422a93e7f9a9e812e19dd6916cb7c2d5446c4635ed6b21d41cfb637534226b51d1298b5880bf7cacce0cea8f7c8d2dc8204bffb7eb163540a231fc2b6db321bf93395e0911f02b30c61e1080c67d555902430166f4eaac0b0eaae63497e976fc86875f1df192a17a180c5ba778ea864a37fc549ef06182bc9d9de06b67428f055df76a9d334f71d3e20352642404aee262c66c1f50aa7e0e4436e8ba2aa2933258e7da6bc28dde2a1ca953c96b9c0dd691665e290abdaabc0b992004a3e6832d89a80523163d48aa020e163d59b5d2be24abe67dca16195b33fe85d3b965db88bc823e96590ab92aa4b320136de92aaa78329da87ec43677abde3c05693985049a22419a719de9c70684d8ed2b5f74719fbfb741c574a12bd983e2d036c26b9d0ad132ca81fa265cea9919fded009ab2447e1f10384998dd199a0803ed2953ca489477a7c96ab4b78aec1ae75aa009f77dd904e440c9696073fb15dbd7d0ae65f53c28c7e1a01e87013e66b53736988be42b07b44082af19d8e9954b24ea8c0e88f33ba5dfe991d1acc4d2ee9b018ef8adf966e351b5c59b7501f7847c61c819efd8fe77cde980a3c2d316476e117eafe93310459325eb3ae80b1044aa9a7b1f29b934159779900d723abd675950bdf8fc8d803aae01e49dc7f716d120911dee86e832b7391db82a5dc4e35d232d918b3cb8a43d8da2f6c6caea42c85e48f2cda5d590f272c1e9f654c6e37403b03095ffefa318a78d3b2094fccf200c3e1b8dc29b58705e0d5608c61c6fa244129287cb00f9da73b9c5a3079b3a06d403eda3b6a162e3040294f06b7ed31ce1365c247cf497a560bfe3aa7d1b7589f9778ec4e321ee445423b2654721d61e36ef89152b6c3a32423f2c755e571a2fe6af296a7567a9823f407f2adb2503a6b7be0d13357e285f675307db6e06eb76e5914e8844a85fae9a845c1a2b5b73a1ccde847780acac512a247e505714b1a2065d96557d444bac6c79ded6ea987123b0209a22186511b8303d1e8a70facacd4fec90b38ff4ef8ab768017914d7f1105a2957ff55bb84593ddf5fdc331f6ecd543b3acbb5a4db355103ed705710bd63646c3913f5d34b23ce29541c10c17d9c2af70d17906a4abd477261e0112503f8bf012efea33d57beec0239a4ec79f9e1ade9fcd5fe0a38ae5fa58de46b298af7260964989a45aa626313d416be8795e2eff1a04e8da09f44986faf31c556d0b116475678cd1da9cd1c8a0f767305db1d4e4ca1637487cf62276ca909c6d7d84fb393c64e3b6681f85e190dca4fc27fa94a4a1248bdb5544dde5ac34546dcd5e47c370ce2f46f32bc5c7b9a82a306f42e6dcc242dfb129ec17723fa6127527fc80ba052cc90fbf21e5028f3d580882ba62445ffc6f505d2e424920ed5afd17170681623660dd180c9a2d99366decc8a92116d45ad9a88442d370b4cd94a9eb4e3db7b6cfdd1cd3b52dce66d1d8f52c167ef10f6cf104ee2fdab965e5776eed2b9e1ef886b0a0fbb6bd6429c910b49672976dc1eea0d48c10de0ae5e3dab6ec51311f0a25428354135ae6accaa31a002746458b3975416abd87ae46ff131abdf3393134ba7c046a05c59fcf246af8919d7608092a5fc6c11e0a30da90786cacef4fe1f156df506b35916bb723c991e4f4feaef0ba8856a99a7c158731f9e09a0714797fbaee34b65ed970692821a1823321162e2cd933d2d00dd75851daa4c4f3efca43f1dcb03350b6ed319273e88a0e16bee534e1b7ed5f2b2a4ea9369312f9d72a15f91e4050c0e36c3022d7065e7078d1fe4699281465abcd9a95a7ebd046c1f8906f26796939335077ae8dcfa6ef38414da9eb00e6a06f2a87f582f530e459737dd2cc17fda6a4081255e7bbff6888c1ac606e2dc28b9865e98d55e2b2be620b24579dd18568b751f9d4eed16a69aac8b0a471ed0f029ab22c2d5e723cb0a916008de0e9854e3bab83fa63cd15df65e093e933a2e0646d42bb1b7d69377e5b9f7e9220d6f041bece11690cbb6b63499e84e3dee3858181e2ee1fd4b36f31d16a0f1f36053d6310ce86570cfc7b7585a0498445fa3688ecee962e8abd608f4b03555700576cdff0c1adba3a8b0019ee478c00f90c828033a046fbd3a73dd84b71c054e8d520bf8796f7e1848bbe6315b37975f804c6a81dcb864654c816be0a6138254408ad670ec52faae1a4d21d8714aa1a5c384b41ae85d24637f9ab5dd97526dccda66a78bba77ce0dde94bf26ebb451689715f852ebb4237c94e361a0e538fbf3a13178adfa26485e0b96e415c2436d20fe8ca9fa4469de427ecb6f8d9e97951a5bcdf89a91d61daee70b1d1e3059c42b64ed2a099af59124ad8c8dfc6f24b9470c2186a03bcbeb8c0416418f68396b25b4b481576f2ec3bfe695ba7d9c77825f8b7e81261730e5f2f5878dc20f2ff265a95f0d0090dd1e9e19c0518",
  "privkey": "81ac54913ffbe1ce5f7ed5ff3bde2284ea5d4813f422a93e7f9a9e812e19dd6935a0b972ed823078525bf9ac8a1525f15b446fa627dfbebc9402ac0dc6a9304bf1db44574daaa1fa148e871e6bf3b7ccb7eaf04391382738298a20582144afbef76b861cb183c3ecea0a22cf1ef0c05228458c348d967182c189d3c69d2551a4421555005b055b30465d961e1963f32c16c61c296be54d980d548cd8c4ad8d24ebd0964ea9b8769d88534d845c354726d4a1d008a5254297e1605191b6c85cb199254dd694463575b7c253bdb0f520a1a4548821165b5444d8698dc5226acbc622595d96448db8860c1c561dc7a866d231eb5c0aaaa572ac389665c2098b863696d75011344d1c95613218ca92b8a90a62978959796aac32296d45f40c8c355b0a11a020ac33948893290b358065176eadbc4d18c10ddad4d1159c968b843905081740417945c18c21b041f2b06e09ab02984b44aeada89606c616d74a2657220ebb5a13572b8342aa093908aa2ac375a9702b8589e25a591b912e33a91a28378d2a3783c5d45683069aeb32a7e3dad1de088125ad4d2044501bc3c1c3a4cccc6ac0980254885a219093345387a5466b4c245489091200915023e13807e82c4aca3c90e51038a22dcaac196fcc56a26466395cb00c25ad81d8b82d05378a653355e016b7ad17af68c5a126dbc28b41978b694d0e1d241b525705dacc1d3ca71b83495b5c270b56af66aa05a9143596bc41616d058ba96d90daa5494c380920d5e5e29414897418e7cc16b4709a5d708cb9166638391e85520458b053b99158826a96ac228e508c539d98684b5505b3c6b1e83a00c8ce52052e8d0ad9341172aad1908440cf2826cd23604a72b5389e12259092985442b20a559b22c10d8ae26401498ee6a80a738438a4418b5d844dce20ba09323528d676493ac5668cb8a0eba261d1da1a4bda43ed948d5466b348d951cdd48a1a364aed862365b80e1a34719652e9127963456c22906deae80a9be751194a1264acc96a057934d3b61a44b7e5ca998494b195ad7adbea02313a0f0aab0d66588775d791882d6c31108ee2c60484c4124c082ea3c9998c1a7a5dc5922991ba1082816048909a5b2c0dcab55a444f0a02804eab71ea68234d9cc1b2652e984d21e8160a88608463b3da5b37a22109c0a1a2b9434c0a251d6f76168e300d571e8335569c549562c3694b460b625b9361570acd0c0500c40c26785d104c0c2c579090854b57d14d474e80096331e79455e69242e766198999f0a819c2540d108791cbd8ac5ae3145a20494e19448cba09681573d6d41856074b145b8618621640ad9914c52c9db32adb3c651939c26231d46b083760846d44d7298e4d781b3c67ca682c3006aca562738e87805b092e12d7245453168d408701cd320332152c2576b38964ea56a1d69848348db0069996eb582decd4881b12012d06599c94cc532c7a0aad11999c84abc5768206a94b0c86aca206c49c71a4a0d472a60ce84cd606419bf0b2d484aa54a0cac8705cd628bb68aac770141d571653810ea3c910190d1853a94117776cad5a058c96ee9431f6b8626aed64e2808a1222d9093a011415d39bc0704c6d4910477a096ab6969275b26c0da5246462478c68b97094349976f2149fc4154445f8c9ae9ce52887450833ea4e2b7c02339c1718f96da4d5ffcfd41a89084d5f8ffe6bfbbbeb8429473ce7fbc8cbe7a5bb2a8c8a9f0cfcb9cbd13b5285ed3413f1efe728a07f7f11ab5a9e739d985e3f19ab6344b4e5dd5f017c9252bcbf72e796ed430d521997a28b7051e68256cd438536b2ef747c60b2ee5f63efce8ce273d5d205c0f416b0059a4128d6e8413beef62aca7a21d268902a5238e22a5d15e10bc06f9ba985133ed713c4820d47b63c63e56021f0e0e6962cbc9fef454e3be93eb8646be713ea6447190a9139f9d6063cebfb87b777f01dfa206384c89603a6888c2e0a33de812c8ab6a0dff5647ac01530946497b9fef05dea6ebbae7b63031b88f95d986d709aee6587d0e13ff1678060863f97aae89ecad0f68634e0b65a0189186554a7d1438cb523c38c5af68e3a6531cfcaaca6637ad6e96f4e7c2fadabf057b32ffb9d7f8144facb19804b16b60e09e3bffb418ec2a60bc629f18596f43c6f88fd92777ddf7105be55e58e86e86b07439bce82adba20b6ae0430093793647500428b24828443b9e400c375252734b9518eda23e80bc05df16d905a5c68824b3c5306c3df85ba8906f3c8f789a1ea1f18e7bb8d65c304199399cb98a1664e4a93d788c5f21d301e815328336701beff0f5ad1500406574c7a70cb192e8f220ee2674b142a48213c7a9f72fc9c3419b090f3b256e2879deba5303d2cfa0e64e63a117d70a62eb5d6948bed567eca87a14e44de2c9a911bd19bb2ddff21d4492176c432724e1cb439b26d8877256888c346684f8f871255e61dd74ed3edfce45ec6d7fbb8e005127699e5733d5131f546a176204f980289763c8c527f8f5fd6c4d63eab7e61c84c23d99471bddf6c2cebba5a35c6fe0084a4a562391e5b1c395211b6db700c8da0fba8a61183fdb2f6d535bec64c712b67ce1f8338749a89b44c1bfffe310ecb87af2ca20dee5e0f18e07661b50909bc5ef5bf9d7b3ef0f1173f02fda819fb98993a9ce6a219c772fb1282216f3c81c9cb96f05b770497d6486dcf710b9e40b4b5d84dc2f8490357b3e4fffe80647e0c937c2fb790aa5d4c9bb0d8080c80e24ee384cc5c00954533225eae288369837fa68f3eca289bc51533992f718658c8dbfa48f3bc15f3eb165669fae22c15a3acec1e4ea99aa0a7192dc3697a9f24259351b290c53a32e336e85de760f6793c5c2a6dc2c7944033e9b41b841eb85ae4ae1c76376aa0e901b6cfeb3acaef197f1fb52aa765237acf4b89ff2c09e5e266185427f95a4285c164c3cf20065da2d34d645305565aeabe78502c0812b37b45eb7217ab3fa262f820209d3e1236f7fde74789275d418d90dc011b4a7de983c05822eb43525a38fa36996184027f7121306b381970ea17f72003687353b705f433774b8c1a0a8c5e0526d81a5c3086af3f70060326e0b0627187af84b1f1229c14fd6417e21b2144de6c844359dcaacf6d62dc9e55c423e4147588c347a3cb8a3feabecd39d14011b99fbafdf055014bc264f7483258290370edbd1c2b12577ddbe9486ace97ab93f76a426e7513ce5bb9644a73a95345ac9ccee7fa69d58480f4f636b2d5dabd7acfa2f615b0a9c26a7f4a5020cbd0dad0e4b46561742eba424e687b897104566a3898f6fc2d6d82f0b41feff32ed06847753757a56acdaef5e111b56cee649797e207e02789a2698a4be89567ec9eee54234ab7c8bf9c5da498c00eb91e9f04c5d63dbae096933655c48b74b7111b49f8ddb21860f5addef04657d42748d854801c159c21e4ac177d38e1a9732a1b03863afecb1b01ada6d158b5c01ff01dfb54fcceec9a2fbcc7957f2155a68ff21710f881a38122e1d4c66aa8c9668169efa0b0af314a6fd069a9290cb03a5914226af59e0f8161c762f8ea0adaf7126ba86966f55ad472cb3dbb888f96bf9b4cff9d0b293ff70621e4ae18f94d988c7b49a451541936c7a628968670d032279bb75afd3f26d02c8a7e0a72e220be6ba76685ff5fbc63bc690626bf31d4beb9a17b4c7702c6c2e8e0f4c7ead9dc97fd641a4e7a94a50b4dcf4b0a0a934077d63a43849aba2e66a95d03467f075a40fb9d36aaec2589a25d34e9ea338dfcc2a21d6d69a380638b0a8f302a98b02eec3de9ff4cb0f51b3b3d021f178d6ca3f8d9dbe3669618ad545fd4246c5118ad0264d240615c01b26505d0c67a78cca9f4d34ae57b1b54e581dd97b31bfe2415d466ef1445ac11ca3e94a276b8735cfc5b1a8b806cb157607f0800c258dcfb80d913b86b1ebd18ee72cf687d41a40995b0955e0761cbb5d8ec3192fbf841056e3909152718cace05d8cbc7ae4aebb7f156935b18c86e8b36ff8a60fc75f133bb5166ecf31511c3a3485f15f8cb8484cdf34777e8ffc2b630d9dce678d3818bbf28e77202bddfa3795c01ee27bab59b033e16d9642b2b6bef91de85f3a10ad4a45123f169f636d3cd0063cb3c656d613463a940f6432ef193f465aa01304e9d44ae9ac74b1da50e62a9b04b81539ea1aa24ce9aa371b0f8cfb86ffa53f485a75508f5fa2e6d077f406d9a1772dddbf4fa8bf2049abd6edfbf91ce6b03953480378474b538de11d5fc5d06fb4357d13687dc2290ea5eb84c4c05f556f2b70580e80d01a49a3865673d8c113639870298c8eb4327319d1005311b98e5da34e8fe6724aec3a634889e60fa4588ce03afdbf0a7e3299aee802edfd25f63ec83b21b82e59e4d536e81b25c1365bc8c863cedfc06c36e1200fecb03695c6f9070009edd48f9ebc59cd9ef4ef407ce2223ac7909281b5805e7b09a7ab64b5f6175cc4a221b125c9492ae8e15f8b85de88418c3f865c6af8804ea25b841241e3b4ba4bb2294e98e5a39227d1ea8ad742b9cc02ee9c9f9ffa5686cffa6e23ab22df7b2155ca48254dabaf3e1fca0e5ae9b511cb62fcf0e44d81e4c2ee97f12266e94835ee9da9f29f8d44c39fc4bce820d38b25f8c96478085f8d397566ea6704a51cda1021f1b23a2c7d005180ee7f5cca7b5b283dbf2087bfd30cd114617aacb38dc839306668aad026e50e6a4a73f80975e741be80e22ab8b624e3e77796a6d1b60d9b54ca712bd28bff14540fa73e1c9c0597cc65c35eff3413d917a5058695238dc1d2bcadad850dff0367ebea1525d87c3f7e5afce83b1852d048dd6a07876d472666f750e4d465fcc3eb700e293c50a1ccaf6536ed6fd617e997ab189da03ebb41f890a2ee26dd705b6108272499c6d48285522ab91b3e96fb4abb0e58f734a0f252af8484ab1a40e0523cb44d883e1fd9bd5d2af4e97c53a461682178b40238290b5a6737a228829a1308c3e5a0c311bf2e086e94ce6bbbd6c34b70ec96e4597f208956fd32e2e1fa70aa6d31139f9e4b830d7fe9d08707593bcf356ef036446483957c29349ffd382e290255a3318ccd94e6359087637abf0b8fd070fdbcf6baf151966a7d1dc9bb5e19623fd30e6ff5a8bfb48ebe5d53c2521bae51c15a408be0fd1e617ceebfb01fc0c74647d0f025fd4171abb5e8bfbc9307d39bc8123b8a9c42d4375b65cd4de271bd2cfa67a9bee370c2d8e985adf35e45fa729828747d7714044edca47326d762aef6d36b61f4412e1b12b3fbe5b10c781d8f3d794f9d711ec2da4efa5032d8fd9900753ab15dd8b9864b0f2e099b0eff791149ea86794eafa87b91c5411faa2f195bdd7dcc59dcbae26815962ad3093e16d185ad0e51585f369d084c0d88d50741d2f6059bd55e3f61df367f38805fd2f4cc136946c6203cc7cb7f8fd7fedca7cc6",
  "pkaddr": "PMrTr4qgErBbDkwxuSdfRNXkrSMoxbhb2R",
  "skaddr": "ScrFviWo9jaJdi7EHz3w2tX1xhvHR8e9Kb",
  "result": "success"
}
Response KeyValue Description
statusstates that we are using an automated random seed generator
seedthis randomly generated seed is the base value on which many private keys can be generated, including the private key below; this seed is sensitive information and should be stored in a safe and secret location
privkeythe private key (privkey) is also sensitive information; this privkey is the basis for the pubkey below
pubkeythe public key that receives funds; this public key will later be associated with a handle
pkaddra hashed representation of the Dilithium pubkey and privkey; this value is not necessary for Dilithium functionality, but rather is included as an easy method to compare Dilithium pubkeys and privkeys
skaddra hashed representation of the Dilithium pubkey and privkey; this value is not necessary for Dilithium functionality, but rather is included as an easy method to compare Dilithium pubkeys and privkeys
resultwhether the command executed successfully

Save the seed value in a safe and secret location. Optimally, you may save the response as well.

Use the handleinfo RPC to check for handle availability.

./komodo-cli -ac_name=MUSIG cclib handleinfo 19 "[%22KomodoHaxor%22]"
{
  "result": "success",
  "handle": "KomodoHaxor",
  "status": "available"
}

Use the seed to register the handle.

./komodo-cli -ac_name=MUSIG cclib register 19 "[%22KomodoHaxor%22,%22e580f34e9bdfd23108409e76475c7df3f924d149d494d5cdbc24aeb280237d4a%22]"

The returned hex value is a signed raw transaction and must be broadcast using sendrawtransaction.

./komodo-cli -ac_name=MUSIG sendrawtransaction 0400008085202f890273ccc419787826042c7c7d667325c5222d2d9d4fab1c142264aed0299063ad0a000000007b4c79a276a072a26ba067a565802102f1c7993a9bf3863c77853315af7e37c12008ea1c5c3d8722c91bc3b5a01965268140ea59eb26a237141c38dfdafc61d50acdbdd3a8d33aaae303908aa613422cf7712de50ba7e4070334044789081a71604e671900cc7f0260be3e9a2a09d1f4842aa100af03800113a10001ffffffff0442dedd2673eb3f4cc151b1d9945f3ccc0023ba7422e9f4b6eff1ecca2cf39b010000006a47304402206d9eb56d476364409e2c3a12dcaadcaab0f9b3080cdb5bdcc09601b8b7683019022025bc2db845cdc716f9459d0f32d60e5103c3bb78267ed763733adffaa4d3c46401210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3bffffffff06204e000000000000302ea22c8020979f9b424db4e028cdba433622c6cd17b9193763e68b4572cd7f3727dcd335978103120c008203000401cc1027000000000000302ea22c80200c0396b7e2db09ab239f0b337fbc7df888273e60323a63d0caa862116bcf51a48103120c008203000401cc00e1f50500000000302ea22c8020e029c511da55523565835887e412e5a0c9b920801b007000df45e545f25028248103120c008203000401cc1027000000000000302ea22c8020979f9b424db4e028cdba433622c6cd17b9193763e68b4572cd7f3727dcd335978103120c008203000401ccd08d154e0200000023210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3bac0000000000000000fd17076a4d130713520b4b6f6d6f646f4861786f72210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3bfde00681ac54913ffbe1ce5f7ed5ff3bde2284ea5d4813f422a93e7f9a9e812e19dd6916cb7c2d5446c4635ed6b21d41cfb637534226b51d1298b5880bf7cacce0cea8f7c8d2dc8204bffb7eb163540a231fc2b6db321bf93395e0911f02b30c61e1080c67d555902430166f4eaac0b0eaae63497e976fc86875f1df192a17a180c5ba778ea864a37fc549ef06182bc9d9de06b67428f055df76a9d334f71d3e20352642404aee262c66c1f50aa7e0e4436e8ba2aa2933258e7da6bc28dde2a1ca953c96b9c0dd691665e290abdaabc0b992004a3e6832d89a80523163d48aa020e163d59b5d2be24abe67dca16195b33fe85d3b965db88bc823e96590ab92aa4b320136de92aaa78329da87ec43677abde3c05693985049a22419a719de9c70684d8ed2b5f74719fbfb741c574a12bd983e2d036c26b9d0ad132ca81fa265cea9919fded009ab2447e1f10384998dd199a0803ed2953ca489477a7c96ab4b78aec1ae75aa009f77dd904e440c9696073fb15dbd7d0ae65f53c28c7e1a01e87013e66b53736988be42b07b44082af19d8e9954b24ea8c0e88f33ba5dfe991d1acc4d2ee9b018ef8adf966e351b5c59b7501f7847c61c819efd8fe77cde980a3c2d316476e117eafe93310459325eb3ae80b1044aa9a7b1f29b934159779900d723abd675950bdf8fc8d803aae01e49dc7f716d120911dee86e832b7391db82a5dc4e35d232d918b3cb8a43d8da2f6c6caea42c85e48f2cda5d590f272c1e9f654c6e37403b03095ffefa318a78d3b2094fccf200c3e1b8dc29b58705e0d5608c61c6fa244129287cb00f9da73b9c5a3079b3a06d403eda3b6a162e3040294f06b7ed31ce1365c247cf497a560bfe3aa7d1b7589f9778ec4e321ee445423b2654721d61e36ef89152b6c3a32423f2c755e571a2fe6af296a7567a9823f407f2adb2503a6b7be0d13357e285f675307db6e06eb76e5914e8844a85fae9a845c1a2b5b73a1ccde847780acac512a247e505714b1a2065d96557d444bac6c79ded6ea987123b0209a22186511b8303d1e8a70facacd4fec90b38ff4ef8ab768017914d7f1105a2957ff55bb84593ddf5fdc331f6ecd543b3acbb5a4db355103ed705710bd63646c3913f5d34b23ce29541c10c17d9c2af70d17906a4abd477261e0112503f8bf012efea33d57beec0239a4ec79f9e1ade9fcd5fe0a38ae5fa58de46b298af7260964989a45aa626313d416be8795e2eff1a04e8da09f44986faf31c556d0b116475678cd1da9cd1c8a0f767305db1d4e4ca1637487cf62276ca909c6d7d84fb393c64e3b6681f85e190dca4fc27fa94a4a1248bdb5544dde5ac34546dcd5e47c370ce2f46f32bc5c7b9a82a306f42e6dcc242dfb129ec17723fa6127527fc80ba052cc90fbf21e5028f3d580882ba62445ffc6f505d2e424920ed5afd17170681623660dd180c9a2d99366decc8a92116d45ad9a88442d370b4cd94a9eb4e3db7b6cfdd1cd3b52dce66d1d8f52c167ef10f6cf104ee2fdab965e5776eed2b9e1ef886b0a0fbb6bd6429c910b49672976dc1eea0d48c10de0ae5e3dab6ec51311f0a25428354135ae6accaa31a002746458b3975416abd87ae46ff131abdf3393134ba7c046a05c59fcf246af8919d7608092a5fc6c11e0a30da90786cacef4fe1f156df506b35916bb723c991e4f4feaef0ba8856a99a7c158731f9e09a0714797fbaee34b65ed970692821a1823321162e2cd933d2d00dd75851daa4c4f3efca43f1dcb03350b6ed319273e88a0e16bee534e1b7ed5f2b2a4ea9369312f9d72a15f91e4050c0e36c3022d7065e7078d1fe4699281465abcd9a95a7ebd046c1f8906f26796939335077ae8dcfa6ef38414da9eb00e6a06f2a87f582f530e459737dd2cc17fda6a4081255e7bbff6888c1ac606e2dc28b9865e98d55e2b2be620b24579dd18568b751f9d4eed16a69aac8b0a471ed0f029ab22c2d5e723cb0a916008de0e9854e3bab83fa63cd15df65e093e933a2e0646d42bb1b7d69377e5b9f7e9220d6f041bece11690cbb6b63499e84e3dee3858181e2ee1fd4b36f31d16a0f1f36053d6310ce86570cfc7b7585a0498445fa3688ecee962e8abd608f4b03555700576cdff0c1adba3a8b0019ee478c00f90c828033a046fbd3a73dd84b71c054e8d520bf8796f7e1848bbe6315b37975f804c6a81dcb864654c816be0a6138254408ad670ec52faae1a4d21d8714aa1a5c384b41ae85d24637f9ab5dd97526dccda66a78bba77ce0dde94bf26ebb451689715f852ebb4237c94e361a0e538fbf3a13178adfa26485e0b96e415c2436d20fe8ca9fa4469de427ecb6f8d9e97951a5bcdf89a91d61daee70b1d1e3059c42b64ed2a099af59124ad8c8dfc6f24b9470c2186a03bcbeb8c0416418f68396b25b4b481576f2ec3bfe695ba7d9c77825f8b7e81261730e5f2f5878dc20f2ff265a95f0d0090dd1e9e19c0518000000008d6c00000000000000000000000000

Execute the handleinfo RPC again to check that we have successfully registered the handle.

./komodo-cli -ac_name=MUSIG cclib handleinfo 19 "[%22KomodoHaxor%22]"
{
  "result": "success",
  "handle": "KomodoHaxor",
  "destpubtxid": "d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940",
  "pkaddr": "PMrTr4qgErBbDkwxuSdfRNXkrSMoxbhb2R",
  "pubkey": "0377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b"
}

The destpubtxid value above can be thought of as the Dilithium address.

The handle and pubkey used to create the destpubtxid are now tied to the Dilithium pkaddr public key, PMrTr4qgErBbDkwxuSdfRNXkrSMoxbhb2R.

This pkaddr keypair can be changed later.

However, the pubkey associated with the handle cannot be changed.

Use the Dilithium send RPC to send coins from a t address to our new q address.

The paramters for this RPC are handle, destpubtxid, and amount.

./komodo-cli -ac_name=MUSIG cclib send 19 "[%22KomodoHaxor%22,%22d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940%22,7.77]"
./komodo-cli -ac_name=MUSIG sendrawtransaction 0400008085202f89014009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd604000000494830450221008e7c4905498d2cf1597e044dbc79a489ce48c81c5ca421b98e84f4158d876b1c022024901a2862245685fe16ab865a49c9ea939bfed7ea5a9a71d7ac12f84d42be9501ffffffff034014502e00000000302ea22c80200c0396b7e2db09ab239f0b337fbc7df888273e60323a63d0caa862116bcf51a48103120c008203000401cc8052c51f0200000023210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3bac0000000000000000246a2213784009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd600000000936c00000000000000000000000000
c314304cecded6cd593daeddf676b2a8c424a604f973e68e6777b84e39ef8548

Our handle, KomodoHaxor, has 7.77 coins.

You can specify outputs of a Qsend transaction in two ways.

  • the ScriptPubKey for a given normal address
    • this can also be called an "R address", as all Komodo base58 encoded addresses begin with R
  • the destpubtxid for a given Dilithium handle

In this tutorial we send 0.1 coins to the handle KomodoFan.

Assume this handle already exists.

Because we are sending coins from one Q handle to another, this is a q -> q transaction, and therefore we use the Qsend RPC

To send funds to the KomodoFan handle, we first need the destpubtxid associated with this handle.

Use the handleinfo RPC to this effect.

./komodo-cli -ac_name=MUSIG cclib handleinfo 19 "[%22KomodoFan%22]"
{
  "result": "success",
  "handle": "KomodoFan",
  "destpubtxid": "af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b6",
  "pkaddr": "PRZniLRiLY5Laoqbg7CjQSktX34x99jdCp",
  "pubkey": "03cebc558e6ba1c0f56f4ad490391c93336b5ccd8b08d123f4e7f1cdd4d5d21e61"
}

In the next step, we encounter the term "qUTXO" or "qutxo" for simplicity.

A "qutxo" is a utxo that is related to the Dilithium Module.

For more general information about utxos, please read the Core Technology Disucssion section here.

The first two arguments for the Qsend RPC are the destpubtxid and seed values of the handle that is sending coins. We refer to this destpubtxid value as mypubtxid in the following examples, for simplicity's sake.

The remaining arguments in the Qsend RPC specify each output of the transaction. The inputs are chosen automatically.

The module also automatically creates a Dilithium "change" output from a qutxo. (Recall that "change" is the amount leftover from a utxo that must be returned to the sender.) In the Dilithium module, change is sent to the "mypubtxid" address.

./komodo-cli -ac_name=MUSIG cclib Qsend 19 "[%22d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940%22,%22e580f34e9bdfd23108409e76475c7df3f924d149d494d5cdbc24aeb280237d4a%22,%22af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b6%22,0.1]"

Broadcast this transaction.

./komodo-cli -ac_name=MUSIG sendrawtransaction 0400008085202f89014885ef394eb877678ee673f904a624c4a8b276f6ddae3d59cdd6deec4c3014c3000000007b4c79a276a072a26ba067a56580210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b814057c2e1283008cc9a3b140705c1550be6f691d79cadcb422714b62038ebd1b9682a124ac45c939653c66f83f0ac919deadb390b07964dade6d3b904bcbe27d339a100af03800113a10001ffffffff038096980000000000302ea22c802008b4a3a211fa1ecb9d245b3267827a56924653fe9bb4697510cf5d65e4bbfea98103120c008203000401ccb056b72d00000000302ea22c80200c0396b7e2db09ab239f0b337fbc7df888273e60323a63d0caa862116bcf51a48103120c008203000401cc0000000000000000fdb00d6a4dac0d13514009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6fd460d27a46ee2b83f54a05dede8982e0b65247365b108e42493ddc6cedb0ad0b73c109451aecdbb5adbfbf887f078bc6f66ef9a323abf440535248e2851ccdcdb732678a10e34a5c01127696d220057227b8b078a99c31b8c51c3695c62ca82630aaba41653d4a3743044056365797ad6fed6ef1aee88e0f7e3a56b6aba07cea2e9f7890808b27f4bb825b3050f2ca526002edac45d5c7b0db51e01d203b25578d311a268766f51f3c9dcf93818f5f7c3b2df5aa66c43bcb5f4f460a1cf17fe8b201459fd6a2aed7c5a368b1ffb13ef407053b9314cdef3012e6a38d12ff43fbd7771eeceb59f0cc37d7614efbf2c3decb515e7dc7b7f7a80d8406a85c7ca088127af72a83577303275ac6a8d3d261780c3e7c4f6419809bd73e90427d89aa51477eda1c4089e6dc9f40e7aa4b22d4ac3156f4ab0d13ea589cf56507177eeac1f33830e67fd359e788e9015b8d7cca0ba6fb4d60c2d6171975965db54e94296d853d495fa3139b8638c7c7758f515e78c598a27996ae86378eff6269aa202660b7194b4784b185a5b9116b837c480d9f2c09c15f663f99d4d9464a94817f9a13e906675a979ba4f08d321a83dbbc849e243db47e903d575b5bbf693ca81ebd2f31edb09b206861dc9a4979214ce0db48c3e1254fbfd3cbc1e23ce715da0070e6126af21bdad5d54d5c7ac6f4a70877b090c9103891726797e3cdf79080eac27875aeacf5c58a3c656f6514951e201ffe97a83fec4ee0ed1b0c19b4ea86f1ffd1461003ad48e783a6e4a4bd8372171e3a8363f92aa800fa0667ce0d0802293996e318e42259d1ca30d219048e09a0ac7ee3bda103d02c9d8b5379b10a226fa4169a51a366a4b8e2c42cb55df56a55cdad844400d64daa3be042b893485010611410fa19b7e4b28d35f2a9a44505dd4b105b92612c7e65b659a18e2459d53749f0d2a08c252978f39526311fcbc13b22c816ca4ab8ea9370161aecda22d6080ab1b0e58ef67740d2ae951ef562ae90652a9260dfa68d40e93796ca1e00d1ea63d45e9e9c384b2c0c7f847c94586ddda9939553574a373d2dd8f309b39b3af5d2962e16d132959b229d590ddc79f0a292db2180712b54a74246cf428d1b1772a89346b824822b0f76290d4d32bc55607ad77b1184fdf16ee23039abf2f64e567e5e9fe97193245562284638290a5b024f170b05dcb9db843350e8c757998f003122f89207e72ada0cefe02d7e42d5aecc9044eee13de5f4282c935f2bfbc8f1e987e01cd5030c39588bcd9d4dd064a9b7e1dbab5914ff1204f2321c4d6e438496f86dc1b5b9556c75fbf3155025679c4f8ad9bc784ea58c8ace5674fc69662da2a76e10d030d3e0af2909dffa005889f01a465bfdd8944cdf4a08432377c9c751f150a430b60a665e8351ca1d708dd7be9637dd0d4deb9c1e402b15c05ffee8a1fc6fe750d5a9f49f8bb13321b30c3d14f859a322595f19800f1da8c84a5a9c036de27b014f8a070d2f2b173c33cf3cc62f799d37f125055446d9d156999e267a2a9299fb95feb99e3da76285580597374c90ac51a858933a85450716842ab56d5fb9e8dd748b04e190b18111de7d9622462fde10a1a524ca886e4f1f7a3ee2cdb590b500033da27dddc5f1879b5031cd7347469a58f0401b600f71c6b59bf9feedd9be50e76b6e7bd69247e0d1ffb75d8099ccfbae3cd86db81b8845ec37f812918bb2f61d1e92fc488ea1e8a2fac18062b8877a8833b4d1823d23792faba5ce210df7cf5b433082b9844de3bbe9552422edd0f07973ee8219512a4050834eedc1be50962565a5d4b7d5b7d05fff4b9144439b3f1d7f5c0930127a418b3298f220737a6232b06042f8058aa9805396feae77e1024c950e4f7b8ba91dcff086e28fd3bfbc0e29683dabe09a80df58d74eeeef7787ce4848b9e62acd87fa6647257f728137326b89c544bfa6b3f38d75ca151e16786e781ee7a6619b70d78f0dd84e71f6314f6d8cda21ac823db28e2303a1b44ecc3f2b5de22deb91942e758da9427452bec2a695fd9b7531cf77bdcf32f9fccd46879b3bfa9b33e4a21b485ad8d04cc6ce89ad45b7d43182975a7c458145598de71c95b803038c315c68ac3927ba6e7c14964176068b0a85bd7b50da987fa0ca2f6fe270decb81be28d54cedbd53adeceaf50cedd1fbe825811838723aa332621b0af0547b1c142e818ed5f200cd88f5d22cc83d276992182928123923a9ee66bcc91fd790bf12e0e116516fcf11137eb7c8fde1ef8269f001ffb2a9b5d12f9f643f3274eed98db6d62db35810521473b4962542706d1ac9740fc9a9fc417e06012c69462e37d724e4e86a1181d254351baf147c10ecf90274416ca86c494c66e7dad4f40d2de90b3055b7dc67c50e33ac2e81bfcf5160d8fc7ba573db2e5ad2ab10708206f59ea65523211456313d44c59b56eaaa576f6973ca1c41afd8ab88d719857c306a77af2a3ff9c37b317e778eb9cf274a920dd030ac407a7a29b57aa849b5aa2bd5416c7b1d6f4e892cdff1a26bf0822cadb4901a9d61c6453dfd419428dce701d2e569ada451cc3fbb1b527731cbd428681c8f3967d59b812d24d3437380294e766a8d74aa9185d17e150d126f4600057794a7e84722aa0fdf990bb9f271935f2c82f957a1af8ba36bdbb592193e358df04d311cd687ab57fef240443f5c0d2e443f9da2e91742d35d7995d648cdcc5961cc176b21ce4c9045a20654741551cb908f4a2237d6e2e38d1254990a60d2e2ec90305f594469a9fe347bbf20f64bcbb0983b1fec37b6c3356e0ffc7bab225249650dff4e7cc403eb2bb900faf96db6eee468cd6bb4ff40663d26c8dfb5f710036a673be8d1f3d14f6e4594771c15269b404c12f4a1a1746e8b70e5b0524515d4ff394386355e0b0df36d7c1d298d3a3757111a6519a7d8503f2efdac07112ed8f127be8d899dc5b3591b20d4305c9e3517a5ffac0b2a68c3079f7bae30fc28a2cb2d68e1d5640be3cd24ef3a7961d1c4325a2562fe412a1096a03c8f62cdd45a6be28df3e812d2c6f9e2b009fc5ec76b34e2a06df5d13a1c19f236a8a37a2303e6a0527909ec120b3f77a5a9ec3c4f3a61de00b1a02b3dcb1a1be67ba3da69a8919a331d343828b013667664e800fbfb3bc69d91e5c426089fc13517216aa6e277562b5800adccb897f096e30a08cd8f2edbc54be3ed6d37b713c789119f0af7eb88b0ca262cc7a84bcf56b4b620a140b284ef2278d05ea9de113b01724331c84f7e8a3d42c421e9856439e2aafa1e50e68104a5a9c54ebf2e8889a20553daece7dc4156324f3400c60e574d0ca4fa627afd60dd3850aa60759733a3ecbb2cb6abe61be7d92120ee2404ad8fa6185c8825b7e325937195c3bf86b5458dd1c946642565b9c7bf9cd1c4e21e9648466a9ec8581ab7644db95dcc2b386afeaeb3b39099ddf0e38a500d6c6ce7a4eb8d4647524f02a4e877cc397138a0856058e6ec0d47f2a6da3746174e56c6107a5f4b67632b3730d467fd14a848f111f09df42e53b3a80260a26fe053527b7ffe830a3399ea8b92f3c13e7b8894688bcf782ab9906c9d4154244cfdadf99043f1d3da7a95f57e07048602640268c4d871b2500e677359bbaf299a80f12d747223b8110ef5af3b29fd2669a0eb5e6dc9ad89d00aaf8588d16607057de76063b9927a6bcba45b9d92f579e232d93e3061ccab36a3ba2cbe183d95c0f28ee132de264f411f712f3fa3c12e520968e70d5635e4756d114ed96407eb4127d1c98e267e54b7d1327b0c11034d27ea761219b2e5cfe9818d86cffe99eef3dc97cc017aee64cd55cc3b73435adf2ab5bcab05a07c353572988a2eafa94df23d9eb316a690ee1fa715322df77c9646eb60615f109808697afd27d2a7a0b47de845eba0989130e198b6554e8142693937e13ee70fed08a46afcd3ed3e488145c984597da6cff5ac9b105df38d2fcdb90ac40c29db5fe5683f360564fdc715e384f9ab30bbeb690b3de0538d3891bd278245e4cbd9f0fb77c1f0c0fd53a10a2676d77ee0d4c2839631dff8e887130787bd74038d1a95159960d7b36415ac2cbc2efebdd4cf914c2fcafc3527c989658c46f71ee3d982ab03c79ea1da0b0d2e34f55753b8c47de372f41d89225374a79511ffcfd23ee5283d7f74d7a5fd1af611092afd9d62eef91a72ae605838329e0d7c5d49a0980a86b08702bd2d427d6b7069b6ae72a1dc9a51371697c0b0099208d68eff71dd4e9279908dde601043a058dfb54985ac486428239c3806da39bd19a7ec87c0ceef07438c54229bee00b16ec8fbc6c6c63e8e2e64af76188e338e72ba671748d089dcf1e59898fa1e3eb5b768f7883d69bbfac5b4ca995b6d86e3b29ba0a611ce171b66e28e2693f544d2aa083748d6682f32bb77b216658cfdf4fdd6dd0b770586f0d41382a5c9d55fcbe2e29026b136ba3b6993da0401291dbca537fa1d776e7edd9c36da8a4e8b0d43b4ff56fc24be4e975ff2aeaae233978e5453151b004242531436378838e96a2b1b2c5050b2123393f43474b546a7274828a9ebecce7f603040d1e626d818cc6d3d6dbe2e3090a1219252a2c3b5a707376787b878ccad6f6242a3943526e709facb1c7ce21294b65676d6f90acbfc7f700000000000000000000000000000000000000000000000000000000000e2230434f5bd900128a030a4584009a2a4880018077042031214040844084041004100482506c8bcaf4ac2d88019870b73ef275bea210fd3d73d32aa9c2b927f074ae1c8293adb13b4bad0c40dc02b6c4e4f03aeb278b308f22d52a00a99ec34cbc031840ee5645b5aed60f0c71af4009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd600000000a16c00000000000000000000000000

Use the getrawtransaction RPC to observe the vins and vouts of our qutxos.

./komodo-cli -ac_name=MUSIG getrawtransaction 16f68e6e0d5a93f0f5b9fd336e6bcbfc8ccfc65916278bad5ae0afa44df4216c 2

Let's pull this apart piece by piece. We begin with the input.

{
  "vin": [
    {
      "txid": "c314304cecded6cd593daeddf676b2a8c424a604f973e68e6777b84e39ef8548",
      "vout": 0,
      "address": "RWzd2iZT7rTU91mJVXzXpK8NWseMgZnW74",
      "scriptSig": {
        "asm": "a276a072a26ba067a56580210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b814057c2e1283008cc9a3b140705c1550be6f691d79cadcb422714b62038ebd1b9682a124ac45c939653c66f83f0ac919deadb390b07964dade6d3b904bcbe27d339a100af03800113a10001",
        "hex": "4c79a276a072a26ba067a56580210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b814057c2e1283008cc9a3b140705c1550be6f691d79cadcb422714b62038ebd1b9682a124ac45c939653c66f83f0ac919deadb390b07964dade6d3b904bcbe27d339a100af03800113a10001"
      },
      "value": 7.77,
      "valueSat": 777000000,
      "address": "RWzd2iZT7rTU91mJVXzXpK8NWseMgZnW74",
      "sequence": 4294967295
    }
  ]
}

We see that this input comes from our transaction created in a previous step. The address RWzd2iZT7rTU91mJVXzXpK8NWseMgZnW74 is associated with our handle.

An important rule to point out here is that there can be any number of inputs (technically called "vins"), but they all must come from the same handle.

{
  "vout": [
    {
      "value": 0.1,
      "valueSat": 10000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "a22c802008b4a3a211fa1ecb9d245b3267827a56924653fe9bb4697510cf5d65e4bbfea98103120c008203000401 OP_CHECKCRYPTOCONDITION",
        "hex": "2ea22c802008b4a3a211fa1ecb9d245b3267827a56924653fe9bb4697510cf5d65e4bbfea98103120c008203000401cc",
        "reqSigs": 1,
        "type": "cryptocondition",
        "addresses": ["RGBrSwrGR4ypFFufyvHEuMMbxs7ETD8Xv7"]
      },
      "spentTxId": "6638c62562a9a9e5cf78cdcd7c77aa54746822bddce9b318d09f5ede565145f5",
      "spentIndex": 0,
      "spentHeight": 27853
    },
    {
      "value": 7.6699,
      "valueSat": 766990000,
      "n": 1,
      "scriptPubKey": {
        "asm": "a22c80200c0396b7e2db09ab239f0b337fbc7df888273e60323a63d0caa862116bcf51a48103120c008203000401 OP_CHECKCRYPTOCONDITION",
        "hex": "2ea22c80200c0396b7e2db09ab239f0b337fbc7df888273e60323a63d0caa862116bcf51a48103120c008203000401cc",
        "reqSigs": 1,
        "type": "cryptocondition",
        "addresses": ["RWzd2iZT7rTU91mJVXzXpK8NWseMgZnW74"]
      },
      "spentTxId": "5aaf4007d6d9af7883da1ad464b63fff9d97453efe0b181d19558cc15f6ff668",
      "spentIndex": 0,
      "spentHeight": 27878
    },
    {
      "value": 0.0,
      "valueSat": 0,
      "n": 2,
      "scriptPubKey": {
        "asm": "OP_RETURN 13514009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6fd460d27a46ee2b83f54a05dede8982e0b65247365b108e42493ddc6cedb0ad0b73c109451aecdbb5adbfbf887f078bc6f66ef9a323abf440535248e2851ccdcdb732678a10e34a5c01127696d220057227b8b078a99c31b8c51c3695c62ca82630aaba41653d4a3743044056365797ad6fed6ef1aee88e0f7e3a56b6aba07cea2e9f7890808b27f4bb825b3050f2ca526002edac45d5c7b0db51e01d203b25578d311a268766f51f3c9dcf93818f5f7c3b2df5aa66c43bcb5f4f460a1cf17fe8b201459fd6a2aed7c5a368b1ffb13ef407053b9314cdef3012e6a38d12ff43fbd7771eeceb59f0cc37d7614efbf2c3decb515e7dc7b7f7a80d8406a85c7ca088127af72a83577303275ac6a8d3d261780c3e7c4f6419809bd73e90427d89aa51477eda1c4089e6dc9f40e7aa4b22d4ac3156f4ab0d13ea589cf56507177eeac1f33830e67fd359e788e9015b8d7cca0ba6fb4d60c2d6171975965db54e94296d853d495fa3139b8638c7c7758f515e78c598a27996ae86378eff6269aa202660b7194b4784b185a5b9116b837c480d9f2c09c15f663f99d4d9464a94817f9a13e906675a979ba4f08d321a83dbbc849e243db47e903d575b5bbf693ca81ebd2f31edb09b206861dc9a4979214ce0db48c3e1254fbfd3cbc1e23ce715da0070e6126af21bdad5d54d5c7ac6f4a70877b090c9103891726797e3cdf79080eac27875aeacf5c58a3c656f6514951e201ffe97a83fec4ee0ed1b0c19b4ea86f1ffd1461003ad48e783a6e4a4bd8372171e3a8363f92aa800fa0667ce0d0802293996e318e42259d1ca30d219048e09a0ac7ee3bda103d02c9d8b5379b10a226fa4169a51a366a4b8e2c42cb55df56a55cdad844400d64daa3be042b893485010611410fa19b7e4b28d35f2a9a44505dd4b105b92612c7e65b659a18e2459d53749f0d2a08c252978f39526311fcbc13b22c816ca4ab8ea9370161aecda22d6080ab1b0e58ef67740d2ae951ef562ae90652a9260dfa68d40e93796ca1e00d1ea63d45e9e9c384b2c0c7f847c94586ddda9939553574a373d2dd8f309b39b3af5d2962e16d132959b229d590ddc79f0a292db2180712b54a74246cf428d1b1772a89346b824822b0f76290d4d32bc55607ad77b1184fdf16ee23039abf2f64e567e5e9fe97193245562284638290a5b024f170b05dcb9db843350e8c757998f003122f89207e72ada0cefe02d7e42d5aecc9044eee13de5f4282c935f2bfbc8f1e987e01cd5030c39588bcd9d4dd064a9b7e1dbab5914ff1204f2321c4d6e438496f86dc1b5b9556c75fbf3155025679c4f8ad9bc784ea58c8ace5674fc69662da2a76e10d030d3e0af2909dffa005889f01a465bfdd8944cdf4a08432377c9c751f150a430b60a665e8351ca1d708dd7be9637dd0d4deb9c1e402b15c05ffee8a1fc6fe750d5a9f49f8bb13321b30c3d14f859a322595f19800f1da8c84a5a9c036de27b014f8a070d2f2b173c33cf3cc62f799d37f125055446d9d156999e267a2a9299fb95feb99e3da76285580597374c90ac51a858933a85450716842ab56d5fb9e8dd748b04e190b18111de7d9622462fde10a1a524ca886e4f1f7a3ee2cdb590b500033da27dddc5f1879b5031cd7347469a58f0401b600f71c6b59bf9feedd9be50e76b6e7bd69247e0d1ffb75d8099ccfbae3cd86db81b8845ec37f812918bb2f61d1e92fc488ea1e8a2fac18062b8877a8833b4d1823d23792faba5ce210df7cf5b433082b9844de3bbe9552422edd0f07973ee8219512a4050834eedc1be50962565a5d4b7d5b7d05fff4b9144439b3f1d7f5c0930127a418b3298f220737a6232b06042f8058aa9805396feae77e1024c950e4f7b8ba91dcff086e28fd3bfbc0e29683dabe09a80df58d74eeeef7787ce4848b9e62acd87fa6647257f728137326b89c544bfa6b3f38d75ca151e16786e781ee7a6619b70d78f0dd84e71f6314f6d8cda21ac823db28e2303a1b44ecc3f2b5de22deb91942e758da9427452bec2a695fd9b7531cf77bdcf32f9fccd46879b3bfa9b33e4a21b485ad8d04cc6ce89ad45b7d43182975a7c458145598de71c95b803038c315c68ac3927ba6e7c14964176068b0a85bd7b50da987fa0ca2f6fe270decb81be28d54cedbd53adeceaf50cedd1fbe825811838723aa332621b0af0547b1c142e818ed5f200cd88f5d22cc83d276992182928123923a9ee66bcc91fd790bf12e0e116516fcf11137eb7c8fde1ef8269f001ffb2a9b5d12f9f643f3274eed98db6d62db35810521473b4962542706d1ac9740fc9a9fc417e06012c69462e37d724e4e86a1181d254351baf147c10ecf90274416ca86c494c66e7dad4f40d2de90b3055b7dc67c50e33ac2e81bfcf5160d8fc7ba573db2e5ad2ab10708206f59ea65523211456313d44c59b56eaaa576f6973ca1c41afd8ab88d719857c306a77af2a3ff9c37b317e778eb9cf274a920dd030ac407a7a29b57aa849b5aa2bd5416c7b1d6f4e892cdff1a26bf0822cadb4901a9d61c6453dfd419428dce701d2e569ada451cc3fbb1b527731cbd428681c8f3967d59b812d24d3437380294e766a8d74aa9185d17e150d126f4600057794a7e84722aa0fdf990bb9f271935f2c82f957a1af8ba36bdbb592193e358df04d311cd687ab57fef240443f5c0d2e443f9da2e91742d35d7995d648cdcc5961cc176b21ce4c9045a20654741551cb908f4a2237d6e2e38d1254990a60d2e2ec90305f594469a9fe347bbf20f64bcbb0983b1fec37b6c3356e0ffc7bab225249650dff4e7cc403eb2bb900faf96db6eee468cd6bb4ff40663d26c8dfb5f710036a673be8d1f3d14f6e4594771c15269b404c12f4a1a1746e8b70e5b0524515d4ff394386355e0b0df36d7c1d298d3a3757111a6519a7d8503f2efdac07112ed8f127be8d899dc5b3591b20d4305c9e3517a5ffac0b2a68c3079f7bae30fc28a2cb2d68e1d5640be3cd24ef3a7961d1c4325a2562fe412a1096a03c8f62cdd45a6be28df3e812d2c6f9e2b009fc5ec76b34e2a06df5d13a1c19f236a8a37a2303e6a0527909ec120b3f77a5a9ec3c4f3a61de00b1a02b3dcb1a1be67ba3da69a8919a331d343828b013667664e800fbfb3bc69d91e5c426089fc13517216aa6e277562b5800adccb897f096e30a08cd8f2edbc54be3ed6d37b713c789119f0af7eb88b0ca262cc7a84bcf56b4b620a140b284ef2278d05ea9de113b01724331c84f7e8a3d42c421e9856439e2aafa1e50e68104a5a9c54ebf2e8889a20553daece7dc4156324f3400c60e574d0ca4fa627afd60dd3850aa60759733a3ecbb2cb6abe61be7d92120ee2404ad8fa6185c8825b7e325937195c3bf86b5458dd1c946642565b9c7bf9cd1c4e21e9648466a9ec8581ab7644db95dcc2b386afeaeb3b39099ddf0e38a500d6c6ce7a4eb8d4647524f02a4e877cc397138a0856058e6ec0d47f2a6da3746174e56c6107a5f4b67632b3730d467fd14a848f111f09df42e53b3a80260a26fe053527b7ffe830a3399ea8b92f3c13e7b8894688bcf782ab9906c9d4154244cfdadf99043f1d3da7a95f57e07048602640268c4d871b2500e677359bbaf299a80f12d747223b8110ef5af3b29fd2669a0eb5e6dc9ad89d00aaf8588d16607057de76063b9927a6bcba45b9d92f579e232d93e3061ccab36a3ba2cbe183d95c0f28ee132de264f411f712f3fa3c12e520968e70d5635e4756d114ed96407eb4127d1c98e267e54b7d1327b0c11034d27ea761219b2e5cfe9818d86cffe99eef3dc97cc017aee64cd55cc3b73435adf2ab5bcab05a07c353572988a2eafa94df23d9eb316a690ee1fa715322df77c9646eb60615f109808697afd27d2a7a0b47de845eba0989130e198b6554e8142693937e13ee70fed08a46afcd3ed3e488145c984597da6cff5ac9b105df38d2fcdb90ac40c29db5fe5683f360564fdc715e384f9ab30bbeb690b3de0538d3891bd278245e4cbd9f0fb77c1f0c0fd53a10a2676d77ee0d4c2839631dff8e887130787bd74038d1a95159960d7b36415ac2cbc2efebdd4cf914c2fcafc3527c989658c46f71ee3d982ab03c79ea1da0b0d2e34f55753b8c47de372f41d89225374a79511ffcfd23ee5283d7f74d7a5fd1af611092afd9d62eef91a72ae605838329e0d7c5d49a0980a86b08702bd2d427d6b7069b6ae72a1dc9a51371697c0b0099208d68eff71dd4e9279908dde601043a058dfb54985ac486428239c3806da39bd19a7ec87c0ceef07438c54229bee00b16ec8fbc6c6c63e8e2e64af76188e338e72ba671748d089dcf1e59898fa1e3eb5b768f7883d69bbfac5b4ca995b6d86e3b29ba0a611ce171b66e28e2693f544d2aa083748d6682f32bb77b216658cfdf4fdd6dd0b770586f0d41382a5c9d55fcbe2e29026b136ba3b6993da0401291dbca537fa1d776e7edd9c36da8a4e8b0d43b4ff56fc24be4e975ff2aeaae233978e5453151b004242531436378838e96a2b1b2c5050b2123393f43474b546a7274828a9ebecce7f603040d1e626d818cc6d3d6dbe2e3090a1219252a2c3b5a707376787b878ccad6f6242a3943526e709facb1c7ce21294b65676d6f90acbfc7f700000000000000000000000000000000000000000000000000000000000e2230434f5bd900128a030a4584009a2a4880018077042031214040844084041004100482506c8bcaf4ac2d88019870b73ef275bea210fd3d73d32aa9c2b927f074ae1c8293adb13b4bad0c40dc02b6c4e4f03aeb278b308f22d52a00a99ec34cbc031840ee5645b5aed60f0c71af4009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6",
        "hex": "6a4dac0d13514009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6fd460d27a46ee2b83f54a05dede8982e0b65247365b108e42493ddc6cedb0ad0b73c109451aecdbb5adbfbf887f078bc6f66ef9a323abf440535248e2851ccdcdb732678a10e34a5c01127696d220057227b8b078a99c31b8c51c3695c62ca82630aaba41653d4a3743044056365797ad6fed6ef1aee88e0f7e3a56b6aba07cea2e9f7890808b27f4bb825b3050f2ca526002edac45d5c7b0db51e01d203b25578d311a268766f51f3c9dcf93818f5f7c3b2df5aa66c43bcb5f4f460a1cf17fe8b201459fd6a2aed7c5a368b1ffb13ef407053b9314cdef3012e6a38d12ff43fbd7771eeceb59f0cc37d7614efbf2c3decb515e7dc7b7f7a80d8406a85c7ca088127af72a83577303275ac6a8d3d261780c3e7c4f6419809bd73e90427d89aa51477eda1c4089e6dc9f40e7aa4b22d4ac3156f4ab0d13ea589cf56507177eeac1f33830e67fd359e788e9015b8d7cca0ba6fb4d60c2d6171975965db54e94296d853d495fa3139b8638c7c7758f515e78c598a27996ae86378eff6269aa202660b7194b4784b185a5b9116b837c480d9f2c09c15f663f99d4d9464a94817f9a13e906675a979ba4f08d321a83dbbc849e243db47e903d575b5bbf693ca81ebd2f31edb09b206861dc9a4979214ce0db48c3e1254fbfd3cbc1e23ce715da0070e6126af21bdad5d54d5c7ac6f4a70877b090c9103891726797e3cdf79080eac27875aeacf5c58a3c656f6514951e201ffe97a83fec4ee0ed1b0c19b4ea86f1ffd1461003ad48e783a6e4a4bd8372171e3a8363f92aa800fa0667ce0d0802293996e318e42259d1ca30d219048e09a0ac7ee3bda103d02c9d8b5379b10a226fa4169a51a366a4b8e2c42cb55df56a55cdad844400d64daa3be042b893485010611410fa19b7e4b28d35f2a9a44505dd4b105b92612c7e65b659a18e2459d53749f0d2a08c252978f39526311fcbc13b22c816ca4ab8ea9370161aecda22d6080ab1b0e58ef67740d2ae951ef562ae90652a9260dfa68d40e93796ca1e00d1ea63d45e9e9c384b2c0c7f847c94586ddda9939553574a373d2dd8f309b39b3af5d2962e16d132959b229d590ddc79f0a292db2180712b54a74246cf428d1b1772a89346b824822b0f76290d4d32bc55607ad77b1184fdf16ee23039abf2f64e567e5e9fe97193245562284638290a5b024f170b05dcb9db843350e8c757998f003122f89207e72ada0cefe02d7e42d5aecc9044eee13de5f4282c935f2bfbc8f1e987e01cd5030c39588bcd9d4dd064a9b7e1dbab5914ff1204f2321c4d6e438496f86dc1b5b9556c75fbf3155025679c4f8ad9bc784ea58c8ace5674fc69662da2a76e10d030d3e0af2909dffa005889f01a465bfdd8944cdf4a08432377c9c751f150a430b60a665e8351ca1d708dd7be9637dd0d4deb9c1e402b15c05ffee8a1fc6fe750d5a9f49f8bb13321b30c3d14f859a322595f19800f1da8c84a5a9c036de27b014f8a070d2f2b173c33cf3cc62f799d37f125055446d9d156999e267a2a9299fb95feb99e3da76285580597374c90ac51a858933a85450716842ab56d5fb9e8dd748b04e190b18111de7d9622462fde10a1a524ca886e4f1f7a3ee2cdb590b500033da27dddc5f1879b5031cd7347469a58f0401b600f71c6b59bf9feedd9be50e76b6e7bd69247e0d1ffb75d8099ccfbae3cd86db81b8845ec37f812918bb2f61d1e92fc488ea1e8a2fac18062b8877a8833b4d1823d23792faba5ce210df7cf5b433082b9844de3bbe9552422edd0f07973ee8219512a4050834eedc1be50962565a5d4b7d5b7d05fff4b9144439b3f1d7f5c0930127a418b3298f220737a6232b06042f8058aa9805396feae77e1024c950e4f7b8ba91dcff086e28fd3bfbc0e29683dabe09a80df58d74eeeef7787ce4848b9e62acd87fa6647257f728137326b89c544bfa6b3f38d75ca151e16786e781ee7a6619b70d78f0dd84e71f6314f6d8cda21ac823db28e2303a1b44ecc3f2b5de22deb91942e758da9427452bec2a695fd9b7531cf77bdcf32f9fccd46879b3bfa9b33e4a21b485ad8d04cc6ce89ad45b7d43182975a7c458145598de71c95b803038c315c68ac3927ba6e7c14964176068b0a85bd7b50da987fa0ca2f6fe270decb81be28d54cedbd53adeceaf50cedd1fbe825811838723aa332621b0af0547b1c142e818ed5f200cd88f5d22cc83d276992182928123923a9ee66bcc91fd790bf12e0e116516fcf11137eb7c8fde1ef8269f001ffb2a9b5d12f9f643f3274eed98db6d62db35810521473b4962542706d1ac9740fc9a9fc417e06012c69462e37d724e4e86a1181d254351baf147c10ecf90274416ca86c494c66e7dad4f40d2de90b3055b7dc67c50e33ac2e81bfcf5160d8fc7ba573db2e5ad2ab10708206f59ea65523211456313d44c59b56eaaa576f6973ca1c41afd8ab88d719857c306a77af2a3ff9c37b317e778eb9cf274a920dd030ac407a7a29b57aa849b5aa2bd5416c7b1d6f4e892cdff1a26bf0822cadb4901a9d61c6453dfd419428dce701d2e569ada451cc3fbb1b527731cbd428681c8f3967d59b812d24d3437380294e766a8d74aa9185d17e150d126f4600057794a7e84722aa0fdf990bb9f271935f2c82f957a1af8ba36bdbb592193e358df04d311cd687ab57fef240443f5c0d2e443f9da2e91742d35d7995d648cdcc5961cc176b21ce4c9045a20654741551cb908f4a2237d6e2e38d1254990a60d2e2ec90305f594469a9fe347bbf20f64bcbb0983b1fec37b6c3356e0ffc7bab225249650dff4e7cc403eb2bb900faf96db6eee468cd6bb4ff40663d26c8dfb5f710036a673be8d1f3d14f6e4594771c15269b404c12f4a1a1746e8b70e5b0524515d4ff394386355e0b0df36d7c1d298d3a3757111a6519a7d8503f2efdac07112ed8f127be8d899dc5b3591b20d4305c9e3517a5ffac0b2a68c3079f7bae30fc28a2cb2d68e1d5640be3cd24ef3a7961d1c4325a2562fe412a1096a03c8f62cdd45a6be28df3e812d2c6f9e2b009fc5ec76b34e2a06df5d13a1c19f236a8a37a2303e6a0527909ec120b3f77a5a9ec3c4f3a61de00b1a02b3dcb1a1be67ba3da69a8919a331d343828b013667664e800fbfb3bc69d91e5c426089fc13517216aa6e277562b5800adccb897f096e30a08cd8f2edbc54be3ed6d37b713c789119f0af7eb88b0ca262cc7a84bcf56b4b620a140b284ef2278d05ea9de113b01724331c84f7e8a3d42c421e9856439e2aafa1e50e68104a5a9c54ebf2e8889a20553daece7dc4156324f3400c60e574d0ca4fa627afd60dd3850aa60759733a3ecbb2cb6abe61be7d92120ee2404ad8fa6185c8825b7e325937195c3bf86b5458dd1c946642565b9c7bf9cd1c4e21e9648466a9ec8581ab7644db95dcc2b386afeaeb3b39099ddf0e38a500d6c6ce7a4eb8d4647524f02a4e877cc397138a0856058e6ec0d47f2a6da3746174e56c6107a5f4b67632b3730d467fd14a848f111f09df42e53b3a80260a26fe053527b7ffe830a3399ea8b92f3c13e7b8894688bcf782ab9906c9d4154244cfdadf99043f1d3da7a95f57e07048602640268c4d871b2500e677359bbaf299a80f12d747223b8110ef5af3b29fd2669a0eb5e6dc9ad89d00aaf8588d16607057de76063b9927a6bcba45b9d92f579e232d93e3061ccab36a3ba2cbe183d95c0f28ee132de264f411f712f3fa3c12e520968e70d5635e4756d114ed96407eb4127d1c98e267e54b7d1327b0c11034d27ea761219b2e5cfe9818d86cffe99eef3dc97cc017aee64cd55cc3b73435adf2ab5bcab05a07c353572988a2eafa94df23d9eb316a690ee1fa715322df77c9646eb60615f109808697afd27d2a7a0b47de845eba0989130e198b6554e8142693937e13ee70fed08a46afcd3ed3e488145c984597da6cff5ac9b105df38d2fcdb90ac40c29db5fe5683f360564fdc715e384f9ab30bbeb690b3de0538d3891bd278245e4cbd9f0fb77c1f0c0fd53a10a2676d77ee0d4c2839631dff8e887130787bd74038d1a95159960d7b36415ac2cbc2efebdd4cf914c2fcafc3527c989658c46f71ee3d982ab03c79ea1da0b0d2e34f55753b8c47de372f41d89225374a79511ffcfd23ee5283d7f74d7a5fd1af611092afd9d62eef91a72ae605838329e0d7c5d49a0980a86b08702bd2d427d6b7069b6ae72a1dc9a51371697c0b0099208d68eff71dd4e9279908dde601043a058dfb54985ac486428239c3806da39bd19a7ec87c0ceef07438c54229bee00b16ec8fbc6c6c63e8e2e64af76188e338e72ba671748d089dcf1e59898fa1e3eb5b768f7883d69bbfac5b4ca995b6d86e3b29ba0a611ce171b66e28e2693f544d2aa083748d6682f32bb77b216658cfdf4fdd6dd0b770586f0d41382a5c9d55fcbe2e29026b136ba3b6993da0401291dbca537fa1d776e7edd9c36da8a4e8b0d43b4ff56fc24be4e975ff2aeaae233978e5453151b004242531436378838e96a2b1b2c5050b2123393f43474b546a7274828a9ebecce7f603040d1e626d818cc6d3d6dbe2e3090a1219252a2c3b5a707376787b878ccad6f6242a3943526e709facb1c7ce21294b65676d6f90acbfc7f700000000000000000000000000000000000000000000000000000000000e2230434f5bd900128a030a4584009a2a4880018077042031214040844084041004100482506c8bcaf4ac2d88019870b73ef275bea210fd3d73d32aa9c2b927f074ae1c8293adb13b4bad0c40dc02b6c4e4f03aeb278b308f22d52a00a99ec34cbc031840ee5645b5aed60f0c71af4009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6",
        "type": "nulldata"
      }
    }
  ]
}

In the first output (technically called a "vout") we see the address associated with the KomodoFan handle: RGBrSwrGR4ypFFufyvHEuMMbxs7ETD8Xv7

0.1 coins are sent to this address.

The type key shows a value of cryptoconditions, indicating that this transaction is now associated with the Dilithium Antara Module.

Recall that in the Antara Framework every pubkey address has a unique Antara Address for each module.

All handles created under the same pubkey will store their Qutxos in an Antara Address that is unique both to the pubkey and to the Dilithium Module.

Therefore, the Dilithium handle is tied to the associated Dilithium Antara Address and pubkey as well.

Use the cclibaddress RPC to verify that we have KomodoFan's Antara Address.

To achieve this, we use the pubkey returned from the cclib handleinfo 19 "[%22KomodoFan%22]" command we executed previously.

./komodo-cli -ac_name=MUSIG cclibaddress 19 03cebc558e6ba1c0f56f4ad490391c93336b5ccd8b08d123f4e7f1cdd4d5d21e61
{
  "result": "success",
  "CClibCCAddress": "RJxChTpGrT8Y64NxTK95TVs3r8wPCwswKF",
  "CClibCCBalance": 0.0098,
  "CClibNormalAddress": "RCUDfxQCgXpB8bKqkzwBrR4cG8HxjAzJ7Y",
  "CClibNormalBalance": 0.0,
  "CClibCCTokensAddress": "RJzz5iNW4fa8epQJH81CNK5vqPv8PzGz6A",
  "PubkeyCCaddress(CClib)": "RGBrSwrGR4ypFFufyvHEuMMbxs7ETD8Xv7",
  "PubkeyCCbalance(CClib)": 5.3996,
  "myCCAddress(CClib)": "RWzd2iZT7rTU91mJVXzXpK8NWseMgZnW74",
  "myCCbalance(CClib)": 7.67,
  "myaddress": "RVXJpc9N4j35psbqmRZzgpKmo98w1CnvHA",
  "mybalance": 91.2296
}

As shown above, the "PubkeyCCaddress(CClib)" provides a matching address for KomodoFan.

The second output (also called vout1) is the change qutxo that sends our leftover funds back to our KomodoHaxor Antara Address.

To verify that this is the correct Antara address, we can again utlize the cclibaddress RPC.

./komodo-cli -ac_name=MUSIG cclibaddress 19
{
  "result": "success",
  "CClibCCAddress": "RJxChTpGrT8Y64NxTK95TVs3r8wPCwswKF",
  "CClibCCBalance": 0.0098,
  "CClibNormalAddress": "RCUDfxQCgXpB8bKqkzwBrR4cG8HxjAzJ7Y",
  "CClibNormalBalance": 0.0,
  "CClibCCTokensAddress": "RJzz5iNW4fa8epQJH81CNK5vqPv8PzGz6A",
  "myCCAddress(CClib)": "RWzd2iZT7rTU91mJVXzXpK8NWseMgZnW74",
  "myCCbalance(CClib)": 7.67,
  "myaddress": "RVXJpc9N4j35psbqmRZzgpKmo98w1CnvHA",
  "mybalance": 91.2296
}

The value of "myCCAddress(CClib)" matches the output.

The final output (which we can also call vout2 or opreturn vout) contains our OP_RETURN data.

This hex value of this output contains needed information about the destpubtxid of the inputs and the destpubtxids of the outputs.

{
  "value": 0.0,
  "valueZat": 0,
  "n": 2,
  "scriptPubKey": {
    "asm": "OP_RETURN 13514009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6fd460d27a46ee2b83f54a05dede8982e0b65247365b108e42493ddc6cedb0ad0b73c109451aecdbb5adbfbf887f078bc6f66ef9a323abf440535248e2851ccdcdb732678a10e34a5c01127696d220057227b8b078a99c31b8c51c3695c62ca82630aaba41653d4a3743044056365797ad6fed6ef1aee88e0f7e3a56b6aba07cea2e9f7890808b27f4bb825b3050f2ca526002edac45d5c7b0db51e01d203b25578d311a268766f51f3c9dcf93818f5f7c3b2df5aa66c43bcb5f4f460a1cf17fe8b201459fd6a2aed7c5a368b1ffb13ef407053b9314cdef3012e6a38d12ff43fbd7771eeceb59f0cc37d7614efbf2c3decb515e7dc7b7f7a80d8406a85c7ca088127af72a83577303275ac6a8d3d261780c3e7c4f6419809bd73e90427d89aa51477eda1c4089e6dc9f40e7aa4b22d4ac3156f4ab0d13ea589cf56507177eeac1f33830e67fd359e788e9015b8d7cca0ba6fb4d60c2d6171975965db54e94296d853d495fa3139b8638c7c7758f515e78c598a27996ae86378eff6269aa202660b7194b4784b185a5b9116b837c480d9f2c09c15f663f99d4d9464a94817f9a13e906675a979ba4f08d321a83dbbc849e243db47e903d575b5bbf693ca81ebd2f31edb09b206861dc9a4979214ce0db48c3e1254fbfd3cbc1e23ce715da0070e6126af21bdad5d54d5c7ac6f4a70877b090c9103891726797e3cdf79080eac27875aeacf5c58a3c656f6514951e201ffe97a83fec4ee0ed1b0c19b4ea86f1ffd1461003ad48e783a6e4a4bd8372171e3a8363f92aa800fa0667ce0d0802293996e318e42259d1ca30d219048e09a0ac7ee3bda103d02c9d8b5379b10a226fa4169a51a366a4b8e2c42cb55df56a55cdad844400d64daa3be042b893485010611410fa19b7e4b28d35f2a9a44505dd4b105b92612c7e65b659a18e2459d53749f0d2a08c252978f39526311fcbc13b22c816ca4ab8ea9370161aecda22d6080ab1b0e58ef67740d2ae951ef562ae90652a9260dfa68d40e93796ca1e00d1ea63d45e9e9c384b2c0c7f847c94586ddda9939553574a373d2dd8f309b39b3af5d2962e16d132959b229d590ddc79f0a292db2180712b54a74246cf428d1b1772a89346b824822b0f76290d4d32bc55607ad77b1184fdf16ee23039abf2f64e567e5e9fe97193245562284638290a5b024f170b05dcb9db843350e8c757998f003122f89207e72ada0cefe02d7e42d5aecc9044eee13de5f4282c935f2bfbc8f1e987e01cd5030c39588bcd9d4dd064a9b7e1dbab5914ff1204f2321c4d6e438496f86dc1b5b9556c75fbf3155025679c4f8ad9bc784ea58c8ace5674fc69662da2a76e10d030d3e0af2909dffa005889f01a465bfdd8944cdf4a08432377c9c751f150a430b60a665e8351ca1d708dd7be9637dd0d4deb9c1e402b15c05ffee8a1fc6fe750d5a9f49f8bb13321b30c3d14f859a322595f19800f1da8c84a5a9c036de27b014f8a070d2f2b173c33cf3cc62f799d37f125055446d9d156999e267a2a9299fb95feb99e3da76285580597374c90ac51a858933a85450716842ab56d5fb9e8dd748b04e190b18111de7d9622462fde10a1a524ca886e4f1f7a3ee2cdb590b500033da27dddc5f1879b5031cd7347469a58f0401b600f71c6b59bf9feedd9be50e76b6e7bd69247e0d1ffb75d8099ccfbae3cd86db81b8845ec37f812918bb2f61d1e92fc488ea1e8a2fac18062b8877a8833b4d1823d23792faba5ce210df7cf5b433082b9844de3bbe9552422edd0f07973ee8219512a4050834eedc1be50962565a5d4b7d5b7d05fff4b9144439b3f1d7f5c0930127a418b3298f220737a6232b06042f8058aa9805396feae77e1024c950e4f7b8ba91dcff086e28fd3bfbc0e29683dabe09a80df58d74eeeef7787ce4848b9e62acd87fa6647257f728137326b89c544bfa6b3f38d75ca151e16786e781ee7a6619b70d78f0dd84e71f6314f6d8cda21ac823db28e2303a1b44ecc3f2b5de22deb91942e758da9427452bec2a695fd9b7531cf77bdcf32f9fccd46879b3bfa9b33e4a21b485ad8d04cc6ce89ad45b7d43182975a7c458145598de71c95b803038c315c68ac3927ba6e7c14964176068b0a85bd7b50da987fa0ca2f6fe270decb81be28d54cedbd53adeceaf50cedd1fbe825811838723aa332621b0af0547b1c142e818ed5f200cd88f5d22cc83d276992182928123923a9ee66bcc91fd790bf12e0e116516fcf11137eb7c8fde1ef8269f001ffb2a9b5d12f9f643f3274eed98db6d62db35810521473b4962542706d1ac9740fc9a9fc417e06012c69462e37d724e4e86a1181d254351baf147c10ecf90274416ca86c494c66e7dad4f40d2de90b3055b7dc67c50e33ac2e81bfcf5160d8fc7ba573db2e5ad2ab10708206f59ea65523211456313d44c59b56eaaa576f6973ca1c41afd8ab88d719857c306a77af2a3ff9c37b317e778eb9cf274a920dd030ac407a7a29b57aa849b5aa2bd5416c7b1d6f4e892cdff1a26bf0822cadb4901a9d61c6453dfd419428dce701d2e569ada451cc3fbb1b527731cbd428681c8f3967d59b812d24d3437380294e766a8d74aa9185d17e150d126f4600057794a7e84722aa0fdf990bb9f271935f2c82f957a1af8ba36bdbb592193e358df04d311cd687ab57fef240443f5c0d2e443f9da2e91742d35d7995d648cdcc5961cc176b21ce4c9045a20654741551cb908f4a2237d6e2e38d1254990a60d2e2ec90305f594469a9fe347bbf20f64bcbb0983b1fec37b6c3356e0ffc7bab225249650dff4e7cc403eb2bb900faf96db6eee468cd6bb4ff40663d26c8dfb5f710036a673be8d1f3d14f6e4594771c15269b404c12f4a1a1746e8b70e5b0524515d4ff394386355e0b0df36d7c1d298d3a3757111a6519a7d8503f2efdac07112ed8f127be8d899dc5b3591b20d4305c9e3517a5ffac0b2a68c3079f7bae30fc28a2cb2d68e1d5640be3cd24ef3a7961d1c4325a2562fe412a1096a03c8f62cdd45a6be28df3e812d2c6f9e2b009fc5ec76b34e2a06df5d13a1c19f236a8a37a2303e6a0527909ec120b3f77a5a9ec3c4f3a61de00b1a02b3dcb1a1be67ba3da69a8919a331d343828b013667664e800fbfb3bc69d91e5c426089fc13517216aa6e277562b5800adccb897f096e30a08cd8f2edbc54be3ed6d37b713c789119f0af7eb88b0ca262cc7a84bcf56b4b620a140b284ef2278d05ea9de113b01724331c84f7e8a3d42c421e9856439e2aafa1e50e68104a5a9c54ebf2e8889a20553daece7dc4156324f3400c60e574d0ca4fa627afd60dd3850aa60759733a3ecbb2cb6abe61be7d92120ee2404ad8fa6185c8825b7e325937195c3bf86b5458dd1c946642565b9c7bf9cd1c4e21e9648466a9ec8581ab7644db95dcc2b386afeaeb3b39099ddf0e38a500d6c6ce7a4eb8d4647524f02a4e877cc397138a0856058e6ec0d47f2a6da3746174e56c6107a5f4b67632b3730d467fd14a848f111f09df42e53b3a80260a26fe053527b7ffe830a3399ea8b92f3c13e7b8894688bcf782ab9906c9d4154244cfdadf99043f1d3da7a95f57e07048602640268c4d871b2500e677359bbaf299a80f12d747223b8110ef5af3b29fd2669a0eb5e6dc9ad89d00aaf8588d16607057de76063b9927a6bcba45b9d92f579e232d93e3061ccab36a3ba2cbe183d95c0f28ee132de264f411f712f3fa3c12e520968e70d5635e4756d114ed96407eb4127d1c98e267e54b7d1327b0c11034d27ea761219b2e5cfe9818d86cffe99eef3dc97cc017aee64cd55cc3b73435adf2ab5bcab05a07c353572988a2eafa94df23d9eb316a690ee1fa715322df77c9646eb60615f109808697afd27d2a7a0b47de845eba0989130e198b6554e8142693937e13ee70fed08a46afcd3ed3e488145c984597da6cff5ac9b105df38d2fcdb90ac40c29db5fe5683f360564fdc715e384f9ab30bbeb690b3de0538d3891bd278245e4cbd9f0fb77c1f0c0fd53a10a2676d77ee0d4c2839631dff8e887130787bd74038d1a95159960d7b36415ac2cbc2efebdd4cf914c2fcafc3527c989658c46f71ee3d982ab03c79ea1da0b0d2e34f55753b8c47de372f41d89225374a79511ffcfd23ee5283d7f74d7a5fd1af611092afd9d62eef91a72ae605838329e0d7c5d49a0980a86b08702bd2d427d6b7069b6ae72a1dc9a51371697c0b0099208d68eff71dd4e9279908dde601043a058dfb54985ac486428239c3806da39bd19a7ec87c0ceef07438c54229bee00b16ec8fbc6c6c63e8e2e64af76188e338e72ba671748d089dcf1e59898fa1e3eb5b768f7883d69bbfac5b4ca995b6d86e3b29ba0a611ce171b66e28e2693f544d2aa083748d6682f32bb77b216658cfdf4fdd6dd0b770586f0d41382a5c9d55fcbe2e29026b136ba3b6993da0401291dbca537fa1d776e7edd9c36da8a4e8b0d43b4ff56fc24be4e975ff2aeaae233978e5453151b004242531436378838e96a2b1b2c5050b2123393f43474b546a7274828a9ebecce7f603040d1e626d818cc6d3d6dbe2e3090a1219252a2c3b5a707376787b878ccad6f6242a3943526e709facb1c7ce21294b65676d6f90acbfc7f700000000000000000000000000000000000000000000000000000000000e2230434f5bd900128a030a4584009a2a4880018077042031214040844084041004100482506c8bcaf4ac2d88019870b73ef275bea210fd3d73d32aa9c2b927f074ae1c8293adb13b4bad0c40dc02b6c4e4f03aeb278b308f22d52a00a99ec34cbc031840ee5645b5aed60f0c71af4009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6",
    "hex": "6a4dac0d13514009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6fd460d27a46ee2b83f54a05dede8982e0b65247365b108e42493ddc6cedb0ad0b73c109451aecdbb5adbfbf887f078bc6f66ef9a323abf440535248e2851ccdcdb732678a10e34a5c01127696d220057227b8b078a99c31b8c51c3695c62ca82630aaba41653d4a3743044056365797ad6fed6ef1aee88e0f7e3a56b6aba07cea2e9f7890808b27f4bb825b3050f2ca526002edac45d5c7b0db51e01d203b25578d311a268766f51f3c9dcf93818f5f7c3b2df5aa66c43bcb5f4f460a1cf17fe8b201459fd6a2aed7c5a368b1ffb13ef407053b9314cdef3012e6a38d12ff43fbd7771eeceb59f0cc37d7614efbf2c3decb515e7dc7b7f7a80d8406a85c7ca088127af72a83577303275ac6a8d3d261780c3e7c4f6419809bd73e90427d89aa51477eda1c4089e6dc9f40e7aa4b22d4ac3156f4ab0d13ea589cf56507177eeac1f33830e67fd359e788e9015b8d7cca0ba6fb4d60c2d6171975965db54e94296d853d495fa3139b8638c7c7758f515e78c598a27996ae86378eff6269aa202660b7194b4784b185a5b9116b837c480d9f2c09c15f663f99d4d9464a94817f9a13e906675a979ba4f08d321a83dbbc849e243db47e903d575b5bbf693ca81ebd2f31edb09b206861dc9a4979214ce0db48c3e1254fbfd3cbc1e23ce715da0070e6126af21bdad5d54d5c7ac6f4a70877b090c9103891726797e3cdf79080eac27875aeacf5c58a3c656f6514951e201ffe97a83fec4ee0ed1b0c19b4ea86f1ffd1461003ad48e783a6e4a4bd8372171e3a8363f92aa800fa0667ce0d0802293996e318e42259d1ca30d219048e09a0ac7ee3bda103d02c9d8b5379b10a226fa4169a51a366a4b8e2c42cb55df56a55cdad844400d64daa3be042b893485010611410fa19b7e4b28d35f2a9a44505dd4b105b92612c7e65b659a18e2459d53749f0d2a08c252978f39526311fcbc13b22c816ca4ab8ea9370161aecda22d6080ab1b0e58ef67740d2ae951ef562ae90652a9260dfa68d40e93796ca1e00d1ea63d45e9e9c384b2c0c7f847c94586ddda9939553574a373d2dd8f309b39b3af5d2962e16d132959b229d590ddc79f0a292db2180712b54a74246cf428d1b1772a89346b824822b0f76290d4d32bc55607ad77b1184fdf16ee23039abf2f64e567e5e9fe97193245562284638290a5b024f170b05dcb9db843350e8c757998f003122f89207e72ada0cefe02d7e42d5aecc9044eee13de5f4282c935f2bfbc8f1e987e01cd5030c39588bcd9d4dd064a9b7e1dbab5914ff1204f2321c4d6e438496f86dc1b5b9556c75fbf3155025679c4f8ad9bc784ea58c8ace5674fc69662da2a76e10d030d3e0af2909dffa005889f01a465bfdd8944cdf4a08432377c9c751f150a430b60a665e8351ca1d708dd7be9637dd0d4deb9c1e402b15c05ffee8a1fc6fe750d5a9f49f8bb13321b30c3d14f859a322595f19800f1da8c84a5a9c036de27b014f8a070d2f2b173c33cf3cc62f799d37f125055446d9d156999e267a2a9299fb95feb99e3da76285580597374c90ac51a858933a85450716842ab56d5fb9e8dd748b04e190b18111de7d9622462fde10a1a524ca886e4f1f7a3ee2cdb590b500033da27dddc5f1879b5031cd7347469a58f0401b600f71c6b59bf9feedd9be50e76b6e7bd69247e0d1ffb75d8099ccfbae3cd86db81b8845ec37f812918bb2f61d1e92fc488ea1e8a2fac18062b8877a8833b4d1823d23792faba5ce210df7cf5b433082b9844de3bbe9552422edd0f07973ee8219512a4050834eedc1be50962565a5d4b7d5b7d05fff4b9144439b3f1d7f5c0930127a418b3298f220737a6232b06042f8058aa9805396feae77e1024c950e4f7b8ba91dcff086e28fd3bfbc0e29683dabe09a80df58d74eeeef7787ce4848b9e62acd87fa6647257f728137326b89c544bfa6b3f38d75ca151e16786e781ee7a6619b70d78f0dd84e71f6314f6d8cda21ac823db28e2303a1b44ecc3f2b5de22deb91942e758da9427452bec2a695fd9b7531cf77bdcf32f9fccd46879b3bfa9b33e4a21b485ad8d04cc6ce89ad45b7d43182975a7c458145598de71c95b803038c315c68ac3927ba6e7c14964176068b0a85bd7b50da987fa0ca2f6fe270decb81be28d54cedbd53adeceaf50cedd1fbe825811838723aa332621b0af0547b1c142e818ed5f200cd88f5d22cc83d276992182928123923a9ee66bcc91fd790bf12e0e116516fcf11137eb7c8fde1ef8269f001ffb2a9b5d12f9f643f3274eed98db6d62db35810521473b4962542706d1ac9740fc9a9fc417e06012c69462e37d724e4e86a1181d254351baf147c10ecf90274416ca86c494c66e7dad4f40d2de90b3055b7dc67c50e33ac2e81bfcf5160d8fc7ba573db2e5ad2ab10708206f59ea65523211456313d44c59b56eaaa576f6973ca1c41afd8ab88d719857c306a77af2a3ff9c37b317e778eb9cf274a920dd030ac407a7a29b57aa849b5aa2bd5416c7b1d6f4e892cdff1a26bf0822cadb4901a9d61c6453dfd419428dce701d2e569ada451cc3fbb1b527731cbd428681c8f3967d59b812d24d3437380294e766a8d74aa9185d17e150d126f4600057794a7e84722aa0fdf990bb9f271935f2c82f957a1af8ba36bdbb592193e358df04d311cd687ab57fef240443f5c0d2e443f9da2e91742d35d7995d648cdcc5961cc176b21ce4c9045a20654741551cb908f4a2237d6e2e38d1254990a60d2e2ec90305f594469a9fe347bbf20f64bcbb0983b1fec37b6c3356e0ffc7bab225249650dff4e7cc403eb2bb900faf96db6eee468cd6bb4ff40663d26c8dfb5f710036a673be8d1f3d14f6e4594771c15269b404c12f4a1a1746e8b70e5b0524515d4ff394386355e0b0df36d7c1d298d3a3757111a6519a7d8503f2efdac07112ed8f127be8d899dc5b3591b20d4305c9e3517a5ffac0b2a68c3079f7bae30fc28a2cb2d68e1d5640be3cd24ef3a7961d1c4325a2562fe412a1096a03c8f62cdd45a6be28df3e812d2c6f9e2b009fc5ec76b34e2a06df5d13a1c19f236a8a37a2303e6a0527909ec120b3f77a5a9ec3c4f3a61de00b1a02b3dcb1a1be67ba3da69a8919a331d343828b013667664e800fbfb3bc69d91e5c426089fc13517216aa6e277562b5800adccb897f096e30a08cd8f2edbc54be3ed6d37b713c789119f0af7eb88b0ca262cc7a84bcf56b4b620a140b284ef2278d05ea9de113b01724331c84f7e8a3d42c421e9856439e2aafa1e50e68104a5a9c54ebf2e8889a20553daece7dc4156324f3400c60e574d0ca4fa627afd60dd3850aa60759733a3ecbb2cb6abe61be7d92120ee2404ad8fa6185c8825b7e325937195c3bf86b5458dd1c946642565b9c7bf9cd1c4e21e9648466a9ec8581ab7644db95dcc2b386afeaeb3b39099ddf0e38a500d6c6ce7a4eb8d4647524f02a4e877cc397138a0856058e6ec0d47f2a6da3746174e56c6107a5f4b67632b3730d467fd14a848f111f09df42e53b3a80260a26fe053527b7ffe830a3399ea8b92f3c13e7b8894688bcf782ab9906c9d4154244cfdadf99043f1d3da7a95f57e07048602640268c4d871b2500e677359bbaf299a80f12d747223b8110ef5af3b29fd2669a0eb5e6dc9ad89d00aaf8588d16607057de76063b9927a6bcba45b9d92f579e232d93e3061ccab36a3ba2cbe183d95c0f28ee132de264f411f712f3fa3c12e520968e70d5635e4756d114ed96407eb4127d1c98e267e54b7d1327b0c11034d27ea761219b2e5cfe9818d86cffe99eef3dc97cc017aee64cd55cc3b73435adf2ab5bcab05a07c353572988a2eafa94df23d9eb316a690ee1fa715322df77c9646eb60615f109808697afd27d2a7a0b47de845eba0989130e198b6554e8142693937e13ee70fed08a46afcd3ed3e488145c984597da6cff5ac9b105df38d2fcdb90ac40c29db5fe5683f360564fdc715e384f9ab30bbeb690b3de0538d3891bd278245e4cbd9f0fb77c1f0c0fd53a10a2676d77ee0d4c2839631dff8e887130787bd74038d1a95159960d7b36415ac2cbc2efebdd4cf914c2fcafc3527c989658c46f71ee3d982ab03c79ea1da0b0d2e34f55753b8c47de372f41d89225374a79511ffcfd23ee5283d7f74d7a5fd1af611092afd9d62eef91a72ae605838329e0d7c5d49a0980a86b08702bd2d427d6b7069b6ae72a1dc9a51371697c0b0099208d68eff71dd4e9279908dde601043a058dfb54985ac486428239c3806da39bd19a7ec87c0ceef07438c54229bee00b16ec8fbc6c6c63e8e2e64af76188e338e72ba671748d089dcf1e59898fa1e3eb5b768f7883d69bbfac5b4ca995b6d86e3b29ba0a611ce171b66e28e2693f544d2aa083748d6682f32bb77b216658cfdf4fdd6dd0b770586f0d41382a5c9d55fcbe2e29026b136ba3b6993da0401291dbca537fa1d776e7edd9c36da8a4e8b0d43b4ff56fc24be4e975ff2aeaae233978e5453151b004242531436378838e96a2b1b2c5050b2123393f43474b546a7274828a9ebecce7f603040d1e626d818cc6d3d6dbe2e3090a1219252a2c3b5a707376787b878ccad6f6242a3943526e709facb1c7ce21294b65676d6f90acbfc7f700000000000000000000000000000000000000000000000000000000000e2230434f5bd900128a030a4584009a2a4880018077042031214040844084041004100482506c8bcaf4ac2d88019870b73ef275bea210fd3d73d32aa9c2b927f074ae1c8293adb13b4bad0c40dc02b6c4e4f03aeb278b308f22d52a00a99ec34cbc031840ee5645b5aed60f0c71af4009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6",
    "type": "nulldata"
  }
}

The hex value contains more information than we need. The full value is as follows: E_MARSHAL(ss << evalcode << 'Q' << destpubtxid << sig << voutpubtxids)

For now, we are only interested in the destpubtxid and voutpubtxids values.

The information is hex-encoded and provided in little-endian format. We would like to convert the data into big-endian format.

There are many methods available for decoding a hex value, and the language of the developer often has built-in functions to accomplish this. For example, this linked Stack Exchange discussion provides possible methods for Python developers.

Once converted to big endian, we have the following.

d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b602dc400cad4b3bb1ad93821cae74f027b9c2a92ad3733dfd10a2be75f23eb7709801882dacf4ca8b6c5082041004100484408440402131200477800180482a9a0084450a038a1200d95b4f4330220e0000000000000000000000000000000000000000000000000000000000f7c7bfac906f6d67654b2921cec7b1ac9f706e5243392a24f6d6ca8c877b787673705a3b2c2a2519120a09e3e2dbd6d3c68c816d621e0d0403f6e7ccbe9e8a8274726a544b47433f3923210b05c5b2b1a2968e8378634331252404b0513145e5783923aeea2aff75e9e44bc26ff54f3bd4b0e8a4a86dc3d9ede776d7a17f53cadb911240a03d99b6a36b136b02292ebefc559d5c2a38410d6f5870b7d06ddd4fdfcf5866217bb72bf382668d7483a02a4d543f69e2286eb671e11c610aba293b6ed8b695a94c5bacbf9bd683788f765bebe3a18f89591ecf9d088d7471a62be738e38861f74ae6e2e8636c6cbc8fec160be0be2942c53874f0ee0c7cc87e9ad19ba36d80c339824286c45a9854fb8d053a0401e6dd089927e9d41df7ef688d2099000b7c697113a5c91d2ae76a9b06b7d627d4d22b70086ba880099ad4c5d7e029838305e62aa791ef2ed6d9af921061afd15f7a4df7d78352ee23fdfc1f51794a372592d8412f37de478c3b75554fe3d2b0a01dea793cb02a983dee716fc45896987c52c3affcc214f94cddebefc2cbc25a41367b0d965951a9d13840d77b783071888eff1d6339284c0dee776d67a2103ad50f0c1f7cb70f9fbd4c5e2478d21b89d33805deb390b6be0bb39a4f385e71dc4f5660f38356feb59dc240ac90dbfcd238df05b1c95aff6cda9745985c1488e4d33ecdaf468ad0fe70ee137e93932614e854658b190e138909ba5e84de470b7a2a7dd2af97868009f11506b66e64c977df225371fae10e696a31ebd923df94faeaa288295753c3075ab0ca5babf2ad3534b7c35cd54ce6ae17c07cc93def9ee9ff6cd81898fe5c2e9b2161a77ed23410c1b027137d4be567e2981c7d12b47e4096ed14d156475e63d5708e9620e5123cfaf312f711f464e22d13ee280f5cd983e1cba23b6ab3ca1c06e3932d239e572fd9b945babca627993b0676de577060168d58f8aa009dd89adce6b50e9a66d29fb2f35aef10813b2247d7120fa899f2ba9b3577e600251b874d8c264026604870e0575fa9a73d1d3f0499dfdacf444215d4c90699ab82f7bc884689b8e7133c2fb9a89e39a330e8ffb7273505fe260a26803a3be542df091f118f844ad17f460d73b33276b6f4a507616ce5746174a36d2a7fd4c06e8e0556088a1397c37c874e2af0247564d4b84e7acec6d600a5380edf9d09393bebeaaf86b3c2dc95db4476ab8185eca9668464e9214e1ccdf97b9c5b564266941cdd58546bf83b5c193759327e5b82c88561fad84a40e20e12927dbe61be6acbb2cb3e3a735907a60a85d30dd6af27a64fcad074e5600c40f3246315c47dceae3d55209a88e8f2eb549c5a4a10680ee5a1af2a9e4356981e422cd4a3e8f7841c332417b013e19dea058d27f24e280b140a624b6bf5bc847acc62a20c8bb87eaff01991783c717bd3d63ebe54bcedf2d88ca0306e097f89cbdc0a80b56275276eaa16725113fc8960425c1ed969bcb3bf0f804e666736018b8243d331a319899aa63dba67bea1b1dcb3021a0be01da6f3c4c39e5a7af7b320c19e9027056a3e30a2378a6a239fc1a1135ddf062a4eb376ecc59f002b9e6f2c2d813edf28bea645dd2cf6c8036a09a112e42f56a225431c1d96a7f34ed23cbe40561d8ed6b22c8ac20fe3baf779308ca6b2c0fa5f7a51e3c905430db291355bdc99d8e87b128fed1271c0daeff203857d9a51a6117175a3d398d2c1d736dfb0e055633894f34f5d5124055b0eb7e846171a4a2fc104b46952c1714759e4f6143d1f8dbe73a63600715ffb8d6cd26306f44fbbd68c46ee6edb96af0f90bbb23e40cce7f4df50962425b2bac7ffe056336c7bc3feb18309bbbc640ff2bb47e39f9a4694f50503c92e2e0da6904925d1382e6e7d23a2f408b91c55414765205a04c9e41cb276c11c96c5dc8c645d99d7352d74912edaf943e4d2c0f5430424ef7fb57a68cd11d304df58e3932159bbbd36baf81a7a952fc8f23519279fbb90f9fda02a72847e4a79570060f426d150e1175d18a94ad7a866e794023837344dd212b8597d96f3c8818642bd1c7327b5b1fbc31c45da9a562e1d70ce8d4219d4df53641cd6a90149dbca2208bf261affcd92e8f4d6b1c71654bda25a9b84aa579ba2a707c40a03dd20a974f29ceb78e717b3379cffa3f27aa706c35798718db88afd1ac4a13c97f676a5aa6eb5594cd413634511325265ea596f200807b12aade5b23d57bac78f0d16f5fc1be8c23ae3507cc67d5b05b390ded2404fad7d6ec694c486ca16442790cf0ec147f1ba5143251d18a1864e4e727de36294c61260e017c49f9afc4097acd106275462493b4721058135db626ddb98ed4e27f343f6f9125d9b2afb1f009f26f81ede8f7ceb3711f1fc1665110e2ef10b79fd91cc6be69e3a9223819282219976d283cc225d8fd80c205fed18e842c1b14705afb0212633aa238783115882be1fddce50afcede3ad5dbce548de21bb8ec0d27fef6a20cfa87a90db5d75ba8b06860176449c1e7a67b92c38ac615c33830805bc971de98551458c4a7752918437d5bd49ae86ccc048dad85b4214a3eb3a9bfb37968d4cc9f2ff3dc7bf71c53b7d95f692aec2b452794da58e74219b9de22deb5f2c3ec441b3a30e228db23c81aa2cdd8f614631fe784ddf0780db719667aee81e78667e151a15cd7383f6bfa4b549cb826731328f7577264a67fd8ac629e8b84e47c78f7eeee748df50da809beda8396e2c0fb3bfd286e08ffdc91bab8f7e450c924107ee7ea6f390598aa58802f04062b23a63707228f29b318a4270193c0f5d7f1b3394414b9f4ff057d5b7d4b5d5a566209e51bdcee340805a4129521e83e97070fdd2e425295be3bde44982b0833b4f57cdf10e25cbafa9237d223184d3b83a877882b0618ac2f8a1eea88c42fe9d1612fbb1829817fc35e84b881db86cde3bacf9c09d875fb1f0d7e2469bde7b6760ee59bddee9fbf596b1cf700b601048fa5697434d71c03b579185fdcdd27da3300500b59db2ceea3f7f1e486a84c521a0ae1fd622462d9e71d11180b194eb048d78d9efbd556ab4268715054a83389851ac50ac974735980552876dae399eb5fb99f29a9a267e29969159d6d445550127fd399f762ccf33cc373b1f2d270a0f814b027de36c0a9a5848cdaf10098f19525329a854fd1c3301b3213bbf8499f5a0d75fec61f8aeeff055cb102e4c1b9ded4d07d63e97bdd08d7a11c35e865a6600b430a151f759c7c373284a0f4cd4489ddbf65a4019f8805a0ff9d90f20a3e0d030de1762ada6296c64f67e5acc858ea84c79badf8c47956025531bf5fc756955b1bdc866f4938e4d6c421234f20f14f91b5ba1d7e9b4a06ddd4d9bc8895c33050cd017e981e8fbcbff235c982425fde13ee4e04c9ec5a2de4d702fecea0ad727e20892f1203f09879758c0e3543b89dcb5db070f124b0a590826384225645321997fee9e567e5642fbf9a0323ee16df4f18b177ad0756c52bd3d49062f7b02248826b34892a77b1d128f46c24744ab5120718b22d290a9fc7dd90d529b25929136de162295dafb3399b308fddd273a37435553999dadd8645c947f8c7c0b284c3e9e9453da61e0de0a16c79930ed468fa0d26a95206e92a56ef51e92a0d7467ef580e1bab80602da2cdae610137a98eaba46c812cb213bcfc116352398f9752c2082a0d9f74539d45e2189a655be6c71226b905b1d45d50449a2a5fd3284b7e9ba10f411106018534892b04bea3da640d4044d8da5ca556df55cb422c8e4b6a361aa56941fa26a2109b37b5d8c9023d10da3beec70a9ae04890210da31c9d25428e316e99932280d0e07c66a00f80aa923f36a8e3712137d84b4a6e3a788ed43a006114fd1f6fa84e9bc1b0d10eeec4fe837ae9ff01e2514951f656c6a3585ccfea5a8727ac0e0879df3c7e7926178903910c097b87704a6facc7d5545dadbd21af26610e07a05d71ce231ebc3cfdfb54123e8cb40dce149297a4c91d8606b209db1ef3d2eb81ca93f6bbb575d503e947db43e249c8bb3da821d3084fba79a97566903ea1f91748a964944d9df963f6159cc0f2d980c437b816915b5a184b78b494710b6602a29a26f6ef7863e86a99278a598ce715f558777c8c63b83931fa95d453d89642e954db65599771612d0cd6b46fbaa0ccd7b815908e789e35fd670e83331facee77715056cf89a53ed1b04a6f15c34a2db2a47a0ef4c96d9e08c4a1ed7714a59ad82704e973bd099841f6c4e7c38017263d8d6aac7532307735a872af278108cac7856a40d8807a7f7bdce715b5ec3d2cbfef14767dc30c9fb5ceee7177bd3ff42fd1386a2e01f3de4c31b9537040ef13fb1f8b365a7ced2a6afd5914208bfe17cfa160f4f4b5bc436ca65adfb2c3f7f51838f9dcc9f3516f7668a211d37855b203d2011eb50d7b5c5dc4da2e0026a52c0f05b325b84b7fb2080889f7e9a2ce07ba6a6ba5e3f7e088ee1aefd6fed67a79656305443074a3d45316a4ab0a6382ca625c69c3518c1bc3998a078b7b225700226d692711c0a5340ea1782673dbdccc51288e24350544bf3a329aef666fbc78f087f8fbdb5abbcdae5194103cb7d00adbcec6dd9324e408b1657324650b2e98e8ed5da0543fb8e26ea4270d46fdd60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f23094051130dac4d6a

Observe that once converted, the destpubtxid for the KomodoHaxor handle is the leading data: d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940.

Directly after is the destpubtxid for KomodoFan: af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b6.

From this we verify that vout0 was addressed to the KomodoFan handle and vout1 was addressed to the KomodoHaxor handle.

Since we know there are 2 vouts (aside from the opreturn vout), we know that vout1 can be found at index position [:64] and vout0 is found at [64:128].

We again see KomodoHaxor's destpubtxid, d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940 at [-76:-12].

This indicates the destpubtxid of the inputs. The destpubtxid of the sender will always be the same position in a Qsend transaction's OP_RETURN, [-76:-12].

The above Q transaction was relatively simple. Let's create a complex Q transaction that includes outputs to multiple R addresses and multiple Dilithium handles.

  • This transactions sends 7.6699 coins from the qUTXO of the previous transaction to the KomodoHaxor handle
  • This transaction sends 1 coin to to the KomodoFan handle, 1.1 coins to the handle LABSLover, and 1.2 coins to the R address RRyyejME7LRTuvdziWsXkAbSW1fdiohGwK
  • The transaction also sends 1.3 coins to bKnMWGuXC5HEyxk3GttsT1a9TtYWKbBpEP, a multisig address, to demonstrate that Dilithium Qsend transctions work with essentially any script hash

Qsend transactions do have one limitation. The Dilithium Module's functionality requires that any 32-byte hex string in a transaction be the destpubtxid.

Therefore, the Dilithium module cannot send a transaction to a 32-byte scriptPubkey.

This is an uncommon scriptPubkey under normal circumstances, and therefore this should not be an issue for most users.

This transaction automatically sends the change back to our handle, KomodoHaxor.

Our transaction requires that we first obtain the destpubtxid for all other handles, and the ScriptPubKey for the intended R addresses.

We obtained the destpubtxid to KomodoFan in the previous step.

Use the handleinfo RPC to obtain the destpubtxid for the LABSLover handle.

./komodo-cli -ac_name=MUSIG cclib handleinfo 19 "[%22LABSLover%22]"

We can use the validateaddress rpc command to obtain the "scriptPubKey value for both RRyyejME7LRTuvdziWsXkAbSW1fdiohGwK and bKnMWGuXC5HEyxk3GttsT1a9TtYWKbBpEP.

./komodo-cli -ac_name=MUSIG validateaddress RRyyejME7LRTuvdziWsXkAbSW1fdiohGwK
./komodo-cli -ac_name=MUSIG validateaddress bKnMWGuXC5HEyxk3GttsT1a9TtYWKbBpEP

We now have everything we need to assemble and send the complex Qsend transaction.

./komodo-cli -ac_name=MUSIG cclib Qsend 19 "[%22d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940%22,%22e580f34e9bdfd23108409e76475c7df3f924d149d494d5cdbc24aeb280237d4a%22,%22af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b6%22,1,%22b625e38064cb0c940a55f0dca7e6b60270aac090d0dd90d4e43e924d696564a2%22,1.1,%2276a914b738b1730cfb58960b1dd1765c6d3276993959e188ac%22,1.2,%22a9144d5e24fcd799f3a3fa15f98a6c69a5829596f56087%22,1.3]"

./komodo-cli -ac_name=MUSIG sendrawtransaction 0400008085202f89016c21f44da4afe05aad8b271659c6cf8cfccb6b6e33fdb9f5f0935a0d6e8ef616010000007b4c79a276a072a26ba067a56580210377ffe2b64443ac5e746f29b021e22411c7731d675f169d32423f8f3d6fc9ea3b8140ccb5db05dc45a4ec747705d76f2e71f3ab43830693f093536d23e6ab31c18b0c04c2906a8e600629b9264043d4534da3c22c1fe1dbe2192ebce23b8a99cf35eaa100af03800113a10001ffffffff0600e1f50500000000302ea22c802008b4a3a211fa1ecb9d245b3267827a56924653fe9bb4697510cf5d65e4bbfea98103120c008203000401cc80778e0600000000302ea22c802008b4a3a211fa1ecb9d245b3267827a56924653fe9bb4697510cf5d65e4bbfea98103120c008203000401cc000e2707000000001976a914b738b1730cfb58960b1dd1765c6d3276993959e188ac80a4bf070000000017a9144d5e24fcd799f3a3fa15f98a6c69a5829596f56087a0244c1200000000302ea22c80200c0396b7e2db09ab239f0b337fbc7df888273e60323a63d0caa862116bcf51a48103120c008203000401cc0000000000000000fd100e6a4d0c0e13514009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd6fd460de9fbac397128243cdfe192f73c9eb327fcc75338e694a94f4df8bcf7d668868731be4f2b886f5d1292e3542f31f01a390fcd7491d730b57ce1fcd6abd792efbeb4047f2cc24b98d07577f3121a74a141d1a7ce94b1e03fa69031e91baa38ef209866fb9db448445fc4794331f5efaaadd1ee58c58deac4b26012ed65f876fb056711d3902500d2d45c0e4e082d8a058a7a671a2fd2a855bd882ee5a06962ab72d93783c7f1fcfead9f712dd3af0424572ce58a36b4e558bc9c95650351794134f1d74f8f275500f19bc967a64ee0baef222bf34c50f0bb771759afee0b202a542d4a349e2224820a2fc29259192e1dc1c2648b161a31454d9a6489fb26b280ad6dd3f1916cae118150d49c52401665c8b299608760c83659f88783120974f85f22d9af9b5ea1dd4a145b29aca2929ffa0449dc821cbe0dd8f86017a37573ad8ca33901e10664822a0ff0825f957bda6148a41d8bd48ae42a7fd10e73e4f28198e767abd1b2c1297055729ddbb613d3d4476b8cf228be84248bef116546ec8d773d271b2a850711f2a8cafd3502575c94a5c258c322f1a0123f439d796239dc7a40e996ff282eb605b7bea9336fa2d6443924a3487f3275095a8fbe136918cb6a69afa2881d793d0d70433c0e16ac5218da88ce76194d86ae8c283184249cd4fc3824614f95af655556e3c3c90765358a63c411cf5df4075546c9555feb2fa1057f540a79a30ddf997248e47076418b31514607236ee23f56b8bd7ee03e09dd063199c45b0b120af1e44920b535aae890d51d0134ee24872a995b991efa31bd4bf9e551727a877d29ef269b83efc0368d042086535b6bd956c2f7bbc3b686dbd765d092a98e825911a13ea92ad2cd7604288c0e7595ee3763849a4d61c90ed7686a3902417eb90d59e40350b12353fd5fcffc53c52759ee393e68227018c924ac9c0390d3029fd26dcd93609d57f19868abfce563dbb93921837f85b092b8539447e2696a9d60345fe390200ce741eae671561b54ee0f58c32e944a954143dd274e41179907a99394c9c1c978a964555d91d0acdda655064a824c7673dc84d1d5a94f06ca6b19078dcd657acb9d84518b94c2f56e4aed02c50a1861d536fe19c29cfede262d8cdf1fba7848f017ce53bb99eb9b40d0b2e5951b47099d8d975bf3054baa8019a9299794e9c4e1f7117974d15dcd4bf1f75b732ac65cbbcd9d2c232e8445d93f422a9315d7c7627d5e4d424094d04c6e419e9805b7bb7849214d35e02139463e73989d019cd1ea3a9084f353f3145df38f88ad0baafee1f0e95477cacc7b0246db8b4ed485db10c999c508506d0bbff6185c53903f8565edd90fc16e3f6be972463e3246a73cb1e2cb294209c71838ae86732cab6f648d10459123d30a59c1bf63a2232d32c8cfe0d06c4797c883d0ad452643496dbec37f87a1a90b525a938cf3367c9917e57c506d0fa422e530753589bd9317a775af64de696857705c5efed3037ad7ad7e1a4789ef238c6473cb433eda187484592e48e5d237d73f558cfe24f68bad4ee85b77c01b9924e262534c9a2486432a5be199aea85a935f6b2424a4fbf3a5dc7afc1866692404de45f41393aecc7ca5761c25fa5922ccebeb8b0580633c75a944d473d18318fe0fb999dd61259813bd0f5c62ff50df1148c6d12757b2de3be3098e7c283eaa3acea5049f4a7e1393235dfeda7b0fdcca6cdeee5410f023bc4c1a157cda0044edacb30b4f00d3c647e83aec5b966ed4e1829eb1f9ab7da7715f34e07e17ed59e45922500f493d74ab8f8f645f3e9002d202f9c2ed14ec698548b7d0ea182c8ea9de1b9146b3a77df43e80a2d085636eb5a80f9d643682d211ae13bb6569ce3411aaca39727850155274aa842baef36ade2173aec3d6c3f4039038d55ff69a7a35ef2d08b5478106b9f0364a8c0e95cd4751bd905c4c38dca63bbcdce24538bd08fb0cc7d9cd1f5dfc1853d502e1f38adaad6c468d9e50ff81d2a6b8dd3db7602bc272675d2efb70382dc19b9039a0b32d876787f2d0e0671b11adde48aafef6d684c517e77217be631366bf99f1109e55a389436e915d847f212b07a5c6fb94db999662ba20e92e642e88bce288cdce3dbffc0d52607af784f802eb18e810d49766ca752a6534d7459a97a2bf07787c63cd836862eb05347cebd3882df760b37b873b79d935cc4fa6f444a6f4d2bae51dab832432a258c1d741d7c133e55302920527e02f1ec8b0ab2703df6fb4c3d357efa75a53c91666b59ed6135907edee5b7ce73c3730c90e235cde4e384dd51f7d7e1b82e3c7cedff649fd6a5f247e829ea9e00d58c37ffd545cd311ad369928ac396cb5dbdfad2c6de10d0a0b1047df15f26c51b225ee148d95dd9c5aea4a4da592cd59b3fcdd8478ee264ed68e61aee55585c32b6dee251f593e8a9f492b9003208af4e04d0e5ee00afee4d0d074ae9aeaa8fda26e89fdf4825da2f0211b5c9a8eae9f1070f401cd6583d0296057c9707a481983aa45b76b290aa249cc5a545fe8956000fc2d48c4803dbc642e1ef9ac3904652ddfa3b6a29e405984a2188b31eb358ea04462ac751937ef5a153d865e6b5951392dd6b4c6ee16224705486de08d380827554419ab24b37b58bd351d157194640d9eba45c13dee0bb73429b497e3885568161f286a6b6f67d8054674a717c6d26defc68c734622dacb8a2fef4dfbd425ea78575402d15eeb9d8cc6f99b0ebf33738b34e14f34b4b990deba45abe2d3c81038d4fa3352a4e904d9d6b244585ba1b0f450c9da0fe84e711255846bf56fc483755dc006f74f816bd27c408c1d4102e2882702b7afb187096a1046cd47f1be2a10400040d310b862232ec7b8419764d05ffe3833bc8462c90ea3f4b65af3fb07b885c9403434b6e0326b05188f8c05d157e0e721a9514fc189dd7c6455d261482fc46c4c206d94ba737a1e456cd22a11e3daf0f2c5716af6ba28419cc17ffa7303ee25d52675a1612ec1cc3bb708c1f0a720d9f4e4c5b47d4bca46f393eced4e6de925262ef229adb4405c44c7ba73646ded1bad4879f8024e84eec05c8bd635bcc6372e1f420be1b7e7f764d966b8715b21b73efb19c4c2d612210cd13fe06bf45d79b0886bb67c9d8f7308cdabde24127d7d3181b3283582b27ad46e0076e03c3269c11b613a6e0375992cac30acbdfb42eb99d6b3cdd845a978845dc7acf67882eaa532641b56ab5626581fca7481e4d1f54f1fb6e1accaff130a66cbb61fde59bc2052c48325a45219818648791ac33046832b02cc9e6aa587aaedb6e7f5d2e18f9b2e6727763f9511b715a43d7a4f608cb3cd037f4e26a455f8b4f9706ec408d4d435be1e6482c2db2aa2f08f23a31900128d57f210e34cb61f73dea2614cb51c220789a40cbfa35c9d565e1f9b809c81f9e3bcdfd5fd814b619b9c7a579daac86c60abcb7293de50b0a3702e3b877f828777235a49920c9dbf5ed9ce3a3f885c2bf985c620b7d0dafd7366a22554b6601af7866b5ccef7e8d67a29345598d98f946a204c128487fb672acbc68097d722d9e12f625b62e8b9affbf05539e44b62e72f6e2d917f1660033dd2a171d37387002cc04cf857d6100409a47d2ce9926c781758d0b7405d9d40086f5835685cde5648495864ac138bf81dac0f6d972096e993b49973c7dfa9a942edc9fe8fffccceb312a0e25b3a335e3b4f06c34cfbe4828597aeccf738a8164fefd1e88b62b12d76d13a5cef333bf8f16135dcbb84fa257b24eaa1e2b7d9c9e9fef6bf5d908e57a05c75d950dbd9ed6ab6f72a45f29e8fa80987406cad82c8d57c744928e3c5b5dbb054df82952b6d995d8b981b532170b311d701b1c0613787b3dbba56c254ffd8ff11270888029d9b342f08c891d185f2ec769afbc8d2b5e232c2ff3365c038102e09094d7dba19552a773f5d2fd153b24ebf7950f7d8c9b857413461cd68c464eaacdfa050b05e4b67a842727ae83a560e692fd7c473552e0b4d6c33544bb3498e4f77061bd8b06a279e68e813ba1571744328f27ad2f9d92cd0e33897c649c6cf33f235604e092d002c1f7e5fbe5cbff16b92540e33e4b3afd99e7df80bc23eca979125c0f271eb1f3e309c9a4dc48e82873b918c1b75ef029f3fa80a65d0ba9a3d7739a0763bbeee1920cc953d46921dcecb65a57f608b9092221209f5dcdddd66998f295f043114fb4c263634381cd381fd75e6c9d21620d13a4544a1ff4a9b789ca115d8108f8ee063c4ee9fd4e21886d74c3a54fefae364fc924d9a7d0994796f6753f92b7fb77be7ceae095e8de8b064aa3ac04138fc9c92a5b63714644ca35c9a12559a0b406df0dade4bc2018c029e0f5e87326ba85360788188cfb03873255c2adaa347fe8265f1fc32d0a8b90ea49dfb8aacf01c69744cf0096298559670d515540cc929480b7fe97608111f17b6a39e3e4b9c127e027d4ce00a761c3e3336b91e4bedacaf3a84b44e3f69180d8da4c7ddaed25841351096d7e822ed97c87250f901365c656671b5b80b0c182126333945516f8f9294bdc6c7cef8fd1a1e5c686e8081949a9da4aab4bde0eb0a28292f373e4c51545cf9ff11425c6b6f7a7e7f848ca1a8c2cbdcedf0fbff03192527353e3f55878fb2ccd7fc0000000000000000000000000000000000000000000000000000000000000000081b2b374a588124700005070e14a0805080a84a430004891a4412051202000440190140c06261da92a73502f904c0eab1b16b2d2b60ec32c1863d95069848bfe717ae65f8d8b718f7dc2f5b9c0605b6c4e4f03aeb278b308f22d52a00a99ec34cbc031840ee5645b5aed60f0c71afa26465694d923ee4d490ddd090c0aa7002b6e6a7dcf0550a940ccb6480e325b6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004009234f4b9e071de316eb740134544ad8d72ea75c4c060705a455784d220dd600000000fa6c00000000000000000000000000

Use the getrawtransaction RPC to observe the inputs and outputs of the response.

./komodo-cli -ac_name=MUSIG getrawtransaction 5aaf4007d6d9af7883da1ad464b63fff9d97453efe0b181d19558cc15f6ff668 2

As seen above, this transaction spent the qutxo created in the previous step.

Convert the hex value of the opreturn to big endian.

d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f23094000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b625e38064cb0c940a55f0dca7e6b60270aac090d0dd90d4e43e924d696564a2af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b605069c5b2fdcf718b7d8f865ae17e7bf489806953d86c132ec602b2d6bb1b1eac004f90235a792da6162c040011940040002120512441a890400434aa8805080a0140e070500702481584a372b1b080000000000000000000000000000000000000000000000000000000000000000fcd7ccb28f87553f3e3527251903fffbf0eddccbc2a8a18c847f7e7a6f6b5c4211fff95c54514c3e372f29280aebe0bdb4aaa49d9a9481806e685c1e1afdf8cec7c6bd94928f6f514539332621180c0bb8b57166655c3601f95072c897ed22e8d79610354158d2aeddc7a48d0d18693f4eb4843aafaced4b1eb936333e1c760ae04c7d027e129c4b3e9ea3b6171f110876e97f0b4829c90c5415d5709655986209f04c74691cf0ac8afb9da40eb9a8d032fcf16582fe47a3da2a5c257338b0cf8881786053a86b32875e0f9e028c01c24bdedaf06d400b9a55129a5ca34c641437b6a5929cfc3841c03aaa64b0e88d5e09aecee77bb77f2bf953676f7994097d9a4d92fc64e3fafe543a4cd78618e2d49feec463e08e8f10d815a19c789b4affa144453ad12016d2c9e675fd81d31c383436264cfb1431045f298f9966dddddcf509122292908b607fa565cbce1d92463d95cc2019eebe3b76a039773d9abad0650aa83f9f02ef751b8c913b87828ec44d9a9c303e1feb71f2c0259197ca3ec20bf87d9ed9afb3e4330e54926bf1bf5cbe5f7e1f2c002d094e6035f233cfc649c69738e3d02cd9f9d27af22843747115ba13e8689e276ab0d81b06774f8e49b34b54336c4d0b2e5573c4d72f690e563ae87a7242a8674b5eb050a0dfacea64c468cd61344157b8c9d8f75079bf4eb253d12f5d3f772a5519ba7d4d09092e1038c06533ffc232e2b5d2c8fb9a76ecf285d191c8082f349b9d0288082711ffd8ff54c256badbb3873761c0b101d711b37021531b988b5d996d2b9582df54b0dbb5c5e32849747cd5c882ad6c408709a88f9ef2452af7b66aedd9db50d9755ca0578e905dbff6fee9c9d9b7e2a1ea247b25fa84bbdc3561f1f83b33ef5c3ad1762db1628be8d1ef4f16a838f7ccae978582e4fb4cc3064f3b5e333a5be2a012b3ceccff8ffec9ed42a9a9dfc77399b493e99620976d0fac1df88b13ac6458494856de5c6835586f08409d5d40b7d05817786c92e92c7da4090410d657f84cc02c008773d371a1d23d0360167f912d6e2fe7624be43955f0fbafb9e8625b622fe1d922d79780c6cb2a67fb8784124c206a948fd9985534297ad6e8f7ce5c6b86f71a60b65425a26673fddad0b720c685f92b5c883f3aced95ebf9d0c92495a237787827f873b2e70a3b050de9372cbab606cc8aa9d577a9c9b614b81fdd5dfbce3f9819c809b1f5e569d5ca3bf0ca48907221cb54c61a2de731fb64ce310f2578d120019a3238ff0a22adbc282641ebe35d4d408c46e70f9b4f855a4264e7f03cdb38c604f7a3da415b711953f7627672e9b8fe1d2f5e7b6edaa87a56a9ecc022b834630c31a794886811952a42583c45220bc59de1fb6cb660a13ffcaace1b61f4ff5d1e48174ca1f582656ab561b6432a5ea8278f6acc75d8478a945d8cdb3d699eb42fbbdac30ac2c9975036e3a611bc169323ce076006ed47ab2823528b381317d7d1224deabcd08738f9d7cb66b88b0795df46be03fd10c2112d6c2c419fb3eb7215b71b866d964f7e7b7e10b421f2e37c6bc35d68b5cc0ee844e02f87948ad1bed6d6473bac7445c40b4ad29f22e2625e96d4eedec93f346ca4b7db4c5e4f4d920a7f0c108b73bccc12e61a17526d525ee0373fa7fc19c4128baf66a71c5f2f0dae3112ad26c451e7a73ba946d204c6cc42f4861d255647cdd89c14f51a921e7e057d1058c8f18056b32e0b6343440c985b807fbf35ab6f4a30ec96284bc3338fe5fd0649741b8c72e2362b810d3400040102abef147cd46106a0987b1afb7022788e202411d8c407cd26b814ff706c05d7583c46ff56b845512714ee80fdac950f4b0a15b5844b2d6d904e9a45233fad43810c8d3e2ab45bade90b9b4344fe1348b7333bf0e9bf9c68c9deb5ed102545778ea25d4fb4def2f8acbda2246738cc6ef6dd2c617a7744605d8676f6b6a281f16685588e397b42934b70bee3dc145ba9e0d649471151d35bd587bb324ab1944552708388de06d4805472216eec6b4d62d3951596b5e863d155aef371975ac6244a08e35eb318b18a28459409ea2b6a3df2d650439acf91e2e64bc3d80c4482dfc006095e85f545acc49a20a296bb745aa8319487a70c9576029d08365cd01f470109fae8e9a5c1b21f0a25d82f4fd896ea2fda8ea9aae74d0d0e4fe0ae05e0e4de0f48a2003902b499f8a3e591f25ee6d2bc38555e5ae618ed64e26ee7884ddfcb359cd92a54d4aea5a9cdd958d14ee25b2516cf215df47100b0a0de16d2caddfdbb56c39ac289936ad11d35c54fd7fc3580de0a99e827e245f6afd49f6dfcec7e3821b7e7d1fd54d384ede5c230ec930373ce77c5beeed075913d69eb56616c9535aa7ef57d3c3b46fdf0327abb0c81e2fe02705920253e533c1d741d7c158a2322483ab1de5bad2f4a644f4a64fcc35d9793b877bb360f72d88d3eb7c3405eb626883cd637c7807bfa2979a45d734652a75ca6697d410e818eb02f884f77a60520dfcbf3dcecd88e2bc882e642ee920ba629699db94fbc6a5072b217f845d916e4389a3559e10f199bf661363be1772e717c584d6f6feaa48dead111b67e0d0f28767872db3a039909bc12d3870fb2e5d6772c22b60b73dddb8a6d281ff509e8d466cadda8af3e102d55318fc5d1fcdd9c70cfb08bd3845e2dcbc3ba6dc384c5c90bd5147cd950e8c4a36f0b9068147b5082def357a9af65fd5389003f4c3d6c3ae7321de6af3ae2b84aa74521550787239caaa1134ce6965bb13ae11d28236649d0fa8b56e6385d0a2803ef47da7b346911bdea98e2c18ead0b7488569ec14edc2f902d202903e5f648f8fab743d490f502259e459ed177ee0345f71a77dabf9b19e82e1d46e965bec3ae847c6d3004f0bb3aced4400da7c151a4cbc23f01054eede6ccadc0f7bdafe5d2393137e4a9f04a5ce3aaa3e287c8e09e33bdeb25727d1c64811df50ff625c0fbd13982561dd99b90ffe1883d173d444a9753c6380058bebebcc2259fa251c76a57cccae9313f445de0424696618fc7adca5f3fba424246b5f935aa8ae99e15b2a4386249a4c5362e224991bc0775be84ead8bf624fe8c553fd737d2e5482e59847418da3e43cb73648c23ef89471a7eadd77a03d3fe5e5c70576869de64af75a71793bd89357530e522a40f6d507ce517997c36f38c935a520ba9a1877fc3be6d49432645add083c897476cd0e0cfc8322d23a263bfc1590ad3239145108d646fab2c7386ae3818c7094229cbe2b13ca746323e4672e96b3f6ec10fd9ed65853f90535c18f6bf0b6d5008c599c910db85d44e8bdb46027bccca7754e9f0e1feaa0bad888ff35d14f353f384903aead19c019d98733e463921e0354d214978bbb705989e416e4cd09440424d5e7d62c7d715932a423fd945842e232c9dcdbb5cc62a735bf7f14bcd5dd1747911f7e1c4e9949729a91980aa4b05f35b978d9d09471b95e5b2d0409beb99bb53ce17f04878ba1fdf8c2d26defe9cc219fe36d561180ac502ed4a6ef5c2948b51849dcb7a65cd8d07196bca064fa9d5d184dc73764c824a0655a6ddacd0915d5564a978c9c1c99493a9079917414e27dd4341954a942ec3580fee541b5671e6ea41e70c2090e35f34609d6a69e2479453b892b0857f832139b9db63e5fcab6898f1579d6093cd6dd29f02d390039cac24c9187022683e39ee5927c553fccf5ffd5323b15003e4590db97e4102396a68d70ec9614d9a846337ee95750e8c280476cdd22aa93ea11159828ea992d065d7db86b6c3bbf7c256d96b5b538620048d36c0ef839b26ef297d877a7251e5f94bbd31fa1e995b992a8724ee34011dd590e8aa35b52049e4f10a120b5bc4993106dd093ee07ebdb8563fe26e23074651318b417670e4487299df0da3790a547f05a12feb5f55c9465507f45dcf11c4638a356507c9c3e3565565af954f612438fcd49c248431288cae864d1976ce88da1852ac160e3c43700d3d791d88a2af696acb186913be8f5a0975327f48a3243944d6a26f33a9beb705b62e28ff96e9407adc3962799d433f12a0f122c358c2a5945c570235fdcaa8f21107852a1b273d778dec466511ef8b2484be28f28c6b47d4d313b6db9d72557029c1b2d1ab67e79881f2e4730ed17f2ae48ad48b1da44861da7b955f82f00f2a826406e10139a38cad7375a31760f8d80dbe1c82dc4904fa9f92a2ac295b144adda15e9bafd9225ff87409128387f85936c860876099b2c8651640529cd4508111ae6c91f1d36dad80b226fb89649a4d45311a168b64c2c11d2e195992c22f0a8224229e344a2d542a200beeaf591777bbf0504cf32b22efbae04ea667c99bf10055278f4fd7f1344179510365959cbc58e5b4368ae52c572404afd32d719fadfefcf1c78337d972ab6269a0e52e88bd55a8d22f1a677a8a058a2d084e0e5cd4d2002590d3116705fb76f865ed1260b2c4ea8dc558eed1adaaeff5314379c45f4448b49dfb669820ef38aa1be93190a63fe0b194cea7d141a1741a12f37775d0984bc22c7f04b4beef92d7abd6fce17cb530d79174cd0f391af0312f54e392125d6f882b4fbe31878668d6f7bcf84d4fa994e63853c7fc27b39e3cf792e1df3c24287139acfbe90d46fdd60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f23094051130e0c4d6a
  • At position [:64] we see the destpubtxid for vout 4: d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940
  • At position [64:128] is null bytes
    • Vout 3 is addressed to a normal address, as opposed to a Dilithium handle
  • At position [128:192] is null bytes
    • [128:192] is vout 2
  • At position [192:256] we see the destpubtxid for the LABSLover handle: b625e38064cb0c940a55f0dca7e6b60270aac090d0dd90d4e43e924d696564a2
  • At position [256:320] we see the destpubtxid for the KomodoFan handle: af710c0fd6aeb54556ee401803bc4cc39ea9002ad5228f308b27eb3af0e4c4b6
  • At position [-76:-12] we see the sender's destpubtxid: d60d224d7855a40507064c5ca72ed7d84a54340174eb16e31d079e4b4f230940

To find the balance in a normal address we might use the listunspent RPC.

A handle, however, is based on a Dilithium-related Antara Address, and these are more complicated. In this section of the tutorial, we use a series of RPCs and our own customized code to find all the utxos in a public Dilithium handle of our choosing.

We can call this customized action a "Q listunspent" function, by way of conversation.

Our target for this example is the LABSLover handle.

Use the handleinfo and cclibaddress RPC to obtain the Antara Address of this handle.

./komodo-cli -ac_name=MUSIG cclib handleinfo 19 "[%22LABSLover%22]"

Use the returned pubkey value with the cclibaddress RPC.

./komodo-cli -ac_name=MUSIG cclibaddress 19 03cebc558e6ba1c0f56f4ad490391c93336b5ccd8b08d123f4e7f1cdd4d5d21e61

The "PubkeyCCaddress(CClib)" value is the Antara Address for LABSLover: RGBrSwrGR4ypFFufyvHEuMMbxs7ETD8Xv7

Use the getaddressutxos RPC to find the utxos in this PubkeyCCaddress(CClib) address.

./komodo-cli -ac_name=MUSIG getaddressutxos '{"addresses": ["RGBrSwrGR4ypFFufyvHEuMMbxs7ETD8Xv7"]}'

In the returned response we observe many utxos.

We cannot assume that all of the returned utxos belong to the LABSLover handle, however. Recall that a handle must be associated with a single Antara Address, but an Antara Address can have multiple handles. Therefore, some of the above utxos belong to LABSLover, and some may belong to another handle.

To ascertain which utxos belong to which handle, we must write a script that performs several tasks. First, the script iterates over each utxo and checks whether the utxo is a "Dilithium send transaction" or a "Dilithium Qsend transaction". For those that are Qsend transactions, the script then checks whether each utxo belongs to the LABSLover handle.

Generally, any utxo with a value of 0.0001 coins can be ignored in this circumstance. These utxos are created by the Dilithium register RPC and are used to index handles for a given pubkey.

For this example, we select one of the above utxos for closer inspection. Our first task is to ascertain whether this utxo is related to Dilithium.

{
  "address": "RGBrSwrGR4ypFFufyvHEuMMbxs7ETD8Xv7",
  "txid": "5b5dab18abbfc0b85c6632ec6b4f71e30d7e28cbfa5e29a6a6e4d48f2fb730cf",
  "outputIndex": 0,
  "script": "2ea22c802008b4a3a211fa1ecb9d245b3267827a56924653fe9bb4697510cf5d65e4bbfea98103120c008203000401cc",
  "satoshis": 100000000,
  "height": 25034
}

Use the getrawtransaction RPC with the txid value.

./komodo-cli -ac_name=MUSIG getrawtransaction 5b5dab18abbfc0b85c6632ec6b4f71e30d7e28cbfa5e29a6a6e4d48f2fb730cf 2

Check whether this transaction has an opreturn vout. If there is no opreturn, move onto the next utxo from getaddresstxids.

This transaction does in fact have an opreturn output.

Use the decodeccopret RPC to decode the hex value of the opreturn.

(The only argument for the decodeccopret RPC here should be the hex value of the opreturn output.)

./komodo-cli -ac_name=MUSIG decodeccopret 6a4dac0d13516d2339f34230623ad14db1ab4adc6aa3062516dc0403d1edd6b33b48d9adebadfd460d09f633110175d9f8e08a310ad7fe88d97b4a41903dd0c0db05154d01eafd2ffb4ec74a5cb468cba9b963d6005091f53bd044cae57ae44b6879e66c19791d5f52239f1d980de5f8958a6aa5869bd9efa343d3cabd170d23904efab800cb2a8497b78d702fb8bf3a312a18635dc9c905919bc3e119f919dca5421e51ba10bf3aa31e816b884187c841683ef87aebf89bf72f0b9492d20c1156e27dbfdb991b40671dbb372004f0d40398dbecc26f745a164ce14116f004d68672d4200d04106a67708293d890d88e99f381d78230245fb6a420162e9ade3e7c61e2d72e812ab4b7d439996fd1c2a659fae4658ef7fc196ec1c8017672c1bd7838e59916795fe4171e126a09322f213c306eb4b4563f72ebf1bb91b61850f451cc79dc644e51625db5a82cf1985df5e94b6ead6e92aa91f6da67e0431c843def9125c2c33db4631720ed1e3ea53a0d86f5174c842bc54f710556c9de8aae18cd545094333fe539cc6ccac859ec6dd02271437bc0ec93f511030ad79b57f168e5bbc93e6907a144cbc3fcce8dec42e26a5b9ea445a4f53a33ca7939d7db03c8637d655db9629c108198f1be4d133e5a99801ac5baebf9a8065e6fb5f34d64e0fe1bd7a4383e62134ae0a7df3bfb6f03881308925685b52d80d4f99351e71c80763605fd47c44129028ac475860070209527d626a720d79218776de338bed124fed901944db74735e9ae021474bfa98b1bfff4347e65df70d6d9dc68bab40fa071e2a73cb55f98163d32fe094de1c608836591df0158faa061211783fded36759fd27f9e950e729a4210b18390ff7d7cda94ec6d844c2aa980295bde433ddbdc870c56e7226e105327b2615734e08e688d757eb7ae5a98d9a08b4e2f10b9d77c04e1de4a489068110b7d463facb2c232561c53a97d00230ccb8c056ffd3a52d76c17baed79b8123d8d6bd6ab0641d44b4a623ef0c54bd306bc8fbc4196e9e54c615a6eb43a2243f88756b00f567ed27bdddf929894ced73bdda70813e04160cb6de9e7da2568b9c56ab884dde1ad2a219878a727301e9597de33f00cb191caf3dc358c159abdacfd0239cf96f206eba195217ae5e3b19ce0687b0991b8483da09a74b9b9c7aff6e6178bc4a23bea2069a7dc7b0003273935e2ae25e67d3c6fd4b788a0be7e4c45e378af4f7d6af047c7e938560a25610f4dfcc4a8a0998a1f32c193b026cf6344d152e4764364b57278197ae0754794bbdbf329e966563d57e5bf039cd20482f04866f6d4e8912e3a6590f639b9d487a83792cb30b394d5783df4bae3b6201b3d0d215e0a0eea21baeb41a3c88dc09abfa4cffdb2ff02867344e1e01edf7d545d5e8118471f94da80fd8aeccb507abece80c6e9ee0bb92651f2129a216e4a417b5be6ce9fdb1a608ffea107b8ab2b7f158d3eda057e8fff79b0178c61c6491e136d1946ffc3598f6d87318be6d9dd941489cc4c0e363d7771d0514e83f41e875ae0eddd4c44fa60ed34091dfbab8810a3a0b0fdef1ba21f412254e92f63343e22bedfaf4c329202f24b7158021f82a18eb8aab64a1d6ef7861ed22c515cd892f9b38b0b4e26c12efff5fce1d5605fddd00bf3b72fe04da6b27ca9e54d24a1dbe77dc3793ca1055b73e64344535abf199124c6c46661386521608a65df19598dbc57b88e6a19f6a950eff6290e11029291c579a34e0dea645f08afe76cd1b654e1a3e89efd436c5fe24a6a46cb62a3e2c1c051f6b7e13c37781d38259d82b921852fc3dc70c49d5e7c2b81bf95a442f0f0bbaa0da47406464533ec8b26a1df27143ecda9ac680fb351bf46c35c2c8be959174e78c390d9c5aacbe12635952c144e454f27f141579eff7be53b1425dbc544337acd5497ff9e95c54ba9e83330c332bcbc424c3125af4f56e367a8a76ea9277956abc474a7a641ac52142330d9cf43bebdca704b44264bc3055e4a5267a8bc726ab12d7672a3794944375019a3abf4ad25f4aa9400798a745c5d27c404a103fbe9424fa6c216e21d58b23bc584c70704e155678835773da1337eca84172d2cba605f59c9c7c09d6aa7131024299ec43704bd199b66c2362c54a50f59709ead7c7e85b88bf21ff2d46d7362c2dede76867b9b28d76e47cb6fcf0f6a248b905b0021811472bb8c0006e86115d8997c4b4e8ca7c6f76cf0105ca5da3404674d8ac7b66738eaeab719378c2a5527c0abf93265cc4d3654cd19840285a5da86827016f07e3d432cdc43c26dc050daf0fdd785c8739220f57e61c8fd549be91a4219ecd3800c1b2049b3025a2c67aadfbc0a0a852af98d507c8ff0c74edc01de88795cc4d770f4653dbbe3c2ee5dda524b5d239888e2c663512601e1c95ef466fabd717089d1e1cd07a9690ba562f1dbda071759b9fad9a2f877022052b4a177c7092385527867390523eb5b3b1e2ad302ec98391d5540f4b3a583828bfcf8d8a44324da51d81219990cd8deea7a32cc156279650fec21e1ea323a6c05239a4716016b1b4da636e042b8be781802fe2cf21adbf9aba87e99d29bc9be1b495d7b4d3db08a8eb54648aa3055e890918d092ec4dc93e9a50b7a44eeceefba2b81c7ec416c62080d390460bec13da6fe6c1cf393dfdc9ae0aa40fe8640bad6b8244740ab9fed0e6702b117590961212372c31ad90b8acabf8da9f5a3d0b9896e941619681d54636905fc8e20c034d313ad1d59ece5c74fef6cf5c21e35b212ee37536a6423643466b79667eab34fb797aebbb5c263b72014a18f172d383af03343466b5d014f35943699d8a97a30f90cebae2dc772e7d45163d60dd7025f2ee03cacd039a4caa7cffb58ce015023a8f90ae03dd2a89ea26988701a1f9b27abf4feea25de6af90649a6eab86f47869f3b0363d782b7ea939629948cbcd2d3d7db471810fd46ea9bcdcbe75df0692a8f644f0e22e56bd327cfe26e578e929b67c29d326e6e8cfa317fa4383c9a775344837009c68f29398d0b7db44ef2b5a21b6b28c9acc5b5f954b2ca52f54e9cd2b2b3d6e8ea76b3bebd3e8d5a5fade34429054a9b535c9ad7414d116ecae7abf48e67dbed24f4f122d0949c28f38a0de8dec1eb52a180dbbd36fdd0208b71fe7b0ce8fe454b958057d4d28f90ad013c321846ab9b79fbbe2c764c94b1bea1a4131502f8c6a3f198e1deb2ec1a8f478f6c8f0076c524f1c4da99416dc4f065eea6d607d0e2dbdf20e9871c998ef41fb2cd1d89e66ed36d9ea54e3b7f1d05db9451377df0eb053242a9eb7a931f786de2b35ccae9ddb0fa126bb7c2aeaa8af2d0ef7d7f105ebe71abb7b999341a5113b1f846cd1a8037c83759f46674f6491e2c0149d725a6482730ed60398d8b31d661fde40e89acd66ed547f247e42037cdd6ab1649d7fe6b2a1a28a52c5298d7c192057dcbc26ed5ab0bd2945cd67e99b2ae8a9269c904b1c22f23873fa2505b3eee45ad9666782215bb21cba019b6461e382d0e454fdf17fa871b136a5989cdc06025655ffa0af728f8679bc82d2427b8d7df82d93dcdb41f6a5d80f1932214a7ba7d7c821c9d0de3ec2d954510372c69dd4edc33f4422678f1b1962c64961dcdc850c94377d846cd5cd2f123f454fa7ad01d672a03ee5db3c4a66fc1633c3440481447435951ff6acb1c7dec1d1d31dd80a855f96a278cf8e65fc923bfddf0c407251ef8253ec426842de97022bf0cde525b7bc0011ab116ca3d7e6884fefeb3bb58c1b800f5783282f69ffc18b4b440312ec35515ab11fab9e3f6efe4b9fe0dc4d4151efcbdbce309689301dedbe25d2d22adcf13206bbcdf33775a14e3ed2edf59cdd8f5d367414b42b8439fdcff90a397fe3578f765eda874b43ca34fe26ff1e940321209c27014296682244861b7519c914e72499e6dbfd012c6b8613436bc52b3285ef869878f404d52de6516a63cd669a9f2f703b68d681973b3080428515efab1183e87f14030c1dcb52e1f984a71c7b75fc5b1e93243261f1159a18d474b14ba13997a89fbed67a8eb9b1a82dab818e79cd0151937cd68e66d2444ac1db467322a942566d0c52c45bea2a49cf1e474f16edd169c37de235b8e53ac8a4c43890017a11e08a8260433d6a0222ea4024b3fbad06a0071d0669a56bd387ed33a49e8bbde613e4ea90dc337648705c07dd44ddd4eab96fc5b4b14f1c8c5cc57dfaa742e22e6ab2ac143e0f6901c972e94bf13129daefa9b7dd3bd10e18d8a17c6e5ac1e396a6f4c651b047de66d8c13ecf7dc651558ee474fa64365720196babf3b1229442a762501d881e7395b76ae981fee7ed0ecd01fb492451d701efc7e1d6a47be75d1bf5d7ba8ba1d461e4ab7e2a53e32c2efaafc7e2ad1a94a1fa2dd01a723351ce05e4764da17b46bd447edc8e7f5919f2bdb57a67558de74683416c8974036c5999172d00d56f1463d960110e7d125acb002c64a842100feeb8f3796168677d94fa621b863d5a639298b7ae686016d44fa9d51bb95f17264a2b4b975347d56e648715f3a3dba5960c187d3962a4d0b6ef71600da022d5c696b7e9ea2a9f32c3133353c595b7689939596c8e3e6f1090c3a404a5b5c5d6f7692b1bcbec4d4f7020a27677f879ba9bec2c4f805092d35394672a2a8a9b7fe081f212c3c43464d8692999fa5ef0000000000000000000000000000000000000000000000000000000000000000000000000000000a1a2b37435112a00464600c413880a4c02210040002a1020118400a23a19668480c300210081b5b40b9554af400711620f22e412b414fd2d6df6799ab0d264e83dc6e955aa192065f24d7d1325202a9e277e8c0b88dfc54b9f0f1c6100b65a885af1268b87ad5c01e09c17e066cfc6d2339f34230623ad14db1ab4adc6aa3062516dc0403d1edd6b33b48d9adebad

Note that there is a returned key by the name of eval_code.

By design each Antara Module has its own unique eval code. This allows a developer to recognize which specific Antara Module a transaction regards.

The eval_code value here matches the eval code for the Dilithium Antara Module, and therefore we know that we are dealing with a Dilithium utxo.

(To learn more about eval codes, read this linked section of the Advanced Tutorial Series.)

By design, an Antara Module has unique types of transactions. The ability to create unique transactions is a key power of the Antara Framework.

Within an Antara Module can be numerous types of transactions, and therefore each transaction type needs its own identifier.

The function key in the structure of the response returned above is this identifier.

In our response above we see "function": "Q",. We need to interpret this Q value into a more common term.

To obtain a list of all types of transactions for all Antara Modules on a Smart Chain, use the cclibinfo RPC.

./komodo-cli -ac_name=MUSIG cclibinfo

Towards the bottom we see a json object with "funcid": "Q", and "method": "Qsend",.

This tells us that this transaction was executed using Dilithium's Qsend RPC.

The response also confirms that the eval code for Dilithium is 19 (or 0x13 in hex). (We discuss each of the Dilithium-related function types in the above response later in this document.)

Now that we know this is in fact a Dilithium Qsend transaction, let's use the same process as before to get the destpubtxids of the inputs and outputs.

First, convert the opreturn's hex value to big endian.

adebadd9483bb3d6edd10304dc162506a36adc4aabb14dd13a623042f339236dfc6c067ec1091ec0d57ab86812af85a8650b10c6f1f0b954fc8db8c0e877e2a9025232d1d7245f0692a15a956edc834e260dab9967dfd6d24f412b412ef220167100f44a55b9405b1b081002300c486896a1230a40180102a10200041022c0a48038410c606404a0125143372b1a0a000000000000000000000000000000000000000000000000000000000000000000000000000000efa59f9992864d46433c2c211f08feb7a9a8a2724639352d0905f8c4c2bea99b877f67270a02f7d4c4bebcb192766f5d5c5b4a403a0c09f1e6e3c896959389765b593c3533312cf3a9a29e7e6b695c2d02da0016f76e0b4d2a96d387c16059ba3d3a5f7148e6567d3475b9b4a26472f195bb519dfa446d0186e67a8b2939a6d563b821a64fd977861696378febfe0021844ac602b0ac25d1e71001963d46f1560dd0729199c5364097c816346874de5875a657db2b9f91f5e7c8ed47d46bb417da64475ee01c3523a701dda21f4aa9d12a7efcaaefc2323ea5e2b74a1e461dbaa87b5dbfd175be476a1d7efc1e701d4592b41fd0ecd07eee1f98ae765b39e781d80125762a4429123bbfba9601726543a64f47ee581565dcf7ec138c6de67d041b654c6f6a391eace5c6178a8de110bdd37d9bfaae9d1213bf942e971c90f6e043c12aabe6222e74aadf57ccc5c8f1144b5bfc96ab4edd4dd47dc005876437c30da94e3e61debbe8493ad37e38bd569a66d071006ad0ba3f4b02a42e22a0d6330426a8081ea1170089434c8aac538e5b23de379c16dd6ef174e4f19ca4a2be452cc5d06625942a3267b41dac44246de668cd371915d09ce718b8da821a9beba867edfb897a9913ba144b478da159111f264332e9b1c55fb7c7714a981f2eb5dcc13040f1873e18b1fa5e51280408b37319688db603f7f2a969d63ca61665de524d408f8769f85e28b352bc363461b8c612d0bf6d9e49724e919c51b76148248266291470c209123240e9f16fe24fa33cb474a8ed65f87625fe97a390ffdc9f43b8424b4167d3f5d8cd59df2eede3145a7733dfbc6b2013cfad222d5de2dbde01936809e3bcbdfc1e15d4c40dfeb9e4eff6e3b9fa11ab1555c32e3140b4b418fc9ff6823278f500b8c158bbb3fefe84687e3dca16b11a01c07b5b52de0cbf2270e92d8426c43e25f81e2507c4f0ddbf23c95fe6f88c276af955a880dd311d1dec7d1ccb6aff51594347144840343c63c16fa6c4b35dee032a671dd07afa54f423f1d25ccd46d87743c950c8cd1d96642c96b1f1782642f433dc4edd692c371045952dece30d9d1c827c7dbaa7142293f1805d6a1fb4cd3dd982dfd7b827242dc89b67f828f70afa5f652560c0cd89596a131b87fa17df4f450e2d381e46b619a0cb21bb1522786696ad45ee3e5b50a23f87232fc2b104c969928aaeb2997ed65c94d20babd56ec2cb7d0592c1d798522ca5281a2a6bfed74916abd6cd3720e447f247d56ed6ac890ee4fd61d6318b8d3960ed302748a625d749012c1e49f67466f45937c837801acd46f8b113511a3499b9b7ab71be5e107f7defd0f28aaaaec2b76b12fab0dde9ca5cb3e26d781f937aeba9423205ebf07d375194db051d7f3b4ea59e6dd36ee6891dcdb21ff48e991c87e920dfdbe2d007d6a6ee65f0c46d4199dac4f124c576008f6c8f478f1aecb2dee198f1a3c6f8021513a4a1beb1944c762cbefb799bab4618323c01ad908fd2d45780954b45fee80c7bfe718b20d0fd36bddb80a152ebc1dee80d8af3289c94d022f1f424eddb678ef4abe7ca6e114d41d79a5c539b4a052944e3ad5f5a8d3ebdbeb376eae8d6b3b2d29c4ef552cab254f9b5c5acc9286b1ba2b5f24eb47d0b8d39298fc60970834453779a3c38a47f31fa8c6e6e329dc2679b928e576ee2cf27d36be5220e4f648f2a69f05de7cbcd9bea46fd101847dbd7d3d2bc8c94299693eab782d763033b9f86476fb8eaa64906f96ade25eafef4ab279b1f1a708869a29ea8d23de00af9a8235001ce58fbcfa7caa439d0ac3ce02e5f02d70dd66351d4e772c72daeeb0cf9307aa9d8993694354f015d6b464333f03a382d178fa11420b763c2b5bbae97b74fb3ea6796b766346423646a5337ee12b2351ec2f56cef4fc7e5ec591dad13d334c0208efc056963541d681916946e89b9d0a3f5a98dbfca8a0bd91ac372232161095917b102670eed9fab404724b8d6ba4086fe40aae09adcdf93f31c6cfea63dc1be6004390d08626c41ecc7812bbaefceee447a0ba5e993dcc42e098d9190e85530aa4846b58e8ab03d4d7b5d491bbec99bd2997ea8abf9db1af22cfe021878beb842e036a64d1b6b0116479a23056c3a32eae121ec0f65796215cc327aeaded80c991912d851da2443a4d8f8fc8b8283a5b3f440551d3998ec02d32a1e3b5beb230539677852852309c777a1b452200277f8a2d9fab9591707dadbf162a50b69a907cde1d1897071bdfa66f45ec9e101265163c6e28898235d4b52da5deec2e3bb3d65f470d7c45c7988de01dc4ec7f08f7c508df92a850a0abcdfaa672c5a02b349201b0c80d3ec19421ae99b54fdc8617ef5209273c885d7fdf0da50c06dc243dc2c433d7ef016708286daa585028419cd54364dcc6532f9abc027552a8c3719b7eaea3867b6c78a4d670434daa55c10f06cf7c6a78c4e4b7c99d81561e806008cbb72148121005b908b246a0fcf6fcb476ed7289b7b8676dedec262736dd4f21ff28bb8857e7cad9e70590fa5542c36c2669b19bd0437c49e29241013a76a9dc0c7c9595f60ba2c2d1784ca7e33a13d7735886755e10407c784c53bb2581de216c2a64f42e9fb03a104c4275d5c748a790094aaf425adf4aba3195037444979a372762db16a72bca867524a5e05c34b26444b70cabdbe43cfd930231452ac41a6a774c4ab567927a96ea7a867e3564faf25314c42bcbc32c33033e8a94bc5959eff9754cd7a3344c5db25143be57bff9e5741f1274f454e142c953526e1cbaac5d990c3784e1759e98b2c5cc346bf51b30f68aca9cd3e1427dfa1268bec3345460674a40daabbf0f042a495bf812b7c5e9dc470dcc32f8521b9829d25381d78373ce1b7f651c0c1e2a362cb466a4ae25f6c43fd9ee8a3e154b6d16ce7af085f64ea0d4ea379c5919202110e29f6ef50a9f6196a8eb857bc8d5919df658a602165386166c4c6249119bf5a534443e6735b05a13c79c37de7dba1244de5a97cb2a64de02fb7f30bd0dd5f60d5e1fcf5ff2ec1264e0b8bb3f992d85c512cd21e86f76e1d4ab6aab88ea1821f0258714bf20292324cafdfbe223e34632fe95422411fa21beffdb0a0a31088abfb1d0934ed60fa444cddede05a871ef4834e51d071773d360e4ccc891494ddd9e68b31876d8f59c3ff46196d131e49c6618c17b079ff8f7e05da3e8d157f2babb807a1fe8f601adb9fcee65b7b414a6e219a12f25126b90beee9c680cebe7a50cbec8afd80da941f4718815e5d547ddf1ee0e144738602ffb2fdcfa4bf9ac08dc8a341ebba21ea0e0a5e210d3d1b20b6e3baf43d78d594b330cb9237a887d4b939f690653a2e91e8d4f66648f08204d29c03bfe5573d5666e929f3dbbb944775e07a197872b5644376e452d14463cf26b093c1321f8a99a0a8c4fc4d0f61250a5638e9c747f06a7d4faf78e3454c7ebea088b7d46f3c7de625aee235392703007bdca76920ea3ba2c48b17e6f6afc7b9b9749aa03d48b891097b68e09cb1e3e57a2195a1eb06f296cf3902fdacbd9a158c35dcf3ca91b10cf033de97951e3027a77898212aade1dd84b86ac5b96825dae7e96dcb6041e01308a7dd3bd7ce949892dfdd7bd27e560fb05687f843223ab46e5a614ce5e99641bc8fbc06d34bc5f03e624a4bd44106abd66b8d3d12b879edba176cd7523afd6f058ccb0c23007da9531c5632c2b2ac3f467d0b116890484adee1047cd7b9102f4e8ba0d9985aaeb77e758d688ee0345761b22753106e22e7560c87dcdb3d43de5b2980a92a4c846dec94da7c7dff9083b110429a720e959e7fd29f7536edfd83172161a0fa5801df91658308c6e14d09fe323d16985fb53ca7e271a00fb4ba68dcd9d670df657e34f4ff1b8ba9bf741402aee93547b74d9401d9fe24d1be38e36d771892d720a726d627952070008675c48a022941c447fd053676801ce75193f9d4802db5855692081388036ffb3bdfa7e04a13623e38a4d71bfee0644df3b56f5e06a8f9ebbac51a80995a3e134dbef19881109c62b95d657d63c803dbd73979ca333af5a445a49e5b6ae242ec8dcefcc3cb44a107693ec9bbe568f1579bd70a0311f593ecc07b437122d06dec59c8ca6ccc39e53f33945054cd18ae8adec95605714fc52b844c17f5860d3aa53e1eed201763b43dc3c22591ef3d841c43e067daf691aa926ead6e4be9f55d98f12ca8b55d62514e64dc79cc51f45018b691bbf1eb723f56b4b46e303c212f32096a121e17e45f791699e53878bdc1727601c8c16e19fcf78e65e4fa59a6c2d16f9939d4b7b42a812ed7e2617c3ede9a2e1620a4b65f243082d781f3998ed890d8938270676a10040d20d47286d604f01641e14c165a746fc2ecdb9803d4f0042037bb1d67401b99dbbf7de256110cd292940b2ff79bf8eb7af83e6841c88741886b811ea33abf10ba511e42a5dc19f919e1c39b9105c9c95d63182a313abfb82f708db797842acb00b8fa4e90230d17bdcad343a3efd99b86a56a8a95f8e50d981d9f23525f1d79196ce679684be47ae5ca44d03bf5915000d663b9a9cb68b45c4ac74efb2ffdea014d1505dbc0d03d90414a7bd988fed70a318ae0f8d975011133f6090d46fdadebadd9483bb3d6edd10304dc162506a36adc4aabb14dd13a623042f339236d51130dac4d6a`

From our getrawtransaction response earlier we already know this transaction has two outputs (besides the opreturn output). Therfore, the Dilithium handle's destpubtxid for vout1 is located at position [:64] and the destpubtixd for vout0 is located at [64:128].

In vout1's position we find adebadd9483bb3d6edd10304dc162506a36adc4aabb14dd13a623042f339236d.

In vout0's position we find fc6c067ec1091ec0d57ab86812af85a8650b10c6f1f0b954fc8db8c0e877e2a9.

Neither of these vouts match the destpubtxid for the LABSLover handle, and therefore this utxo does not belong to the LABSLover handle.

To find out which handles these do belong to, we need to write a more elaborate customized function in a programming language of our choice.

Any programming language that is capable of sending RPCs to the daemon is capable of creating this type of customized function.

For this tutorial, we use the Python language and the python3 toolset. We also use the slickrpc library to interact with the daemon.

(To learn how to use the slickrpc library, visit this linked documentation.

# function to get handle from register txid
def handle_get(register_txid, rpc_connection):
        tx = rpc_connection.getrawtransaction(register_txid, 1)
        OP_ret = tx['vout'][-1]['scriptPubKey']['hex']
        byte_length = OP_ret[12:14]
        byte_length_int = int(byte_length, 16)
        x = (byte_length_int * 2) + 14
        return(bytes.fromhex(OP_ret[14:x]).decode('utf-8'))

Use the getrawtransaction to obtain the opreturn for the destpubtxid: adebadd9483bb3d6edd10304dc162506a36adc4aabb14dd13a623042f339236d.

./komodo-cli -ac_name=MUSIG getrawtransaction adebadd9483bb3d6edd10304dc162506a36adc4aabb14dd13a623042f339236d 2

In all destpubtxids in the Dilithium Module, the value at the position [12:14] provides the length of the handle.

In this case, the value is 05. Therefore, the 5 bytes following this value is the handle, provided in ascii format.

Observe the following 5 bytes at [14:24] and we see 6e65773230.

Once converted from ascii to text this provides the value: new20.

This should be the handle that we seek.

Use the handleinfo RPC to verify that this is the handle for the destpubtxid of the value adebadd9483bb3d6edd10304dc162506a36adc4aabb14dd13a623042f339236d.

./komodo-cli -ac_name=MUSIG cclib handleinfo 19 "[%22new20%22]"

Repeat the same process for vout0, where the destpubtxid is fc6c067ec1091ec0d57ab86812af85a8650b10c6f1f0b954fc8db8c0e877e2a9 and returned response is the new21 handle.

Repeat this full process on each utxo provided in the getaddressutxos output above.

The customized approach we take for this tutorial is to use the dil_listunspent function provided in this linked repository. The source code and function here is also based on python3.

Having executed the dil_listunspent python3 function we receive the following response for our pubkey.

The dil_listunspent python3 function also decodes this tranasaction:

{
  "funcid": "x",
  "height": 28186,
  "received_from": ["REU3fRjFrfs6ir6g3qcJK1N1AzNafzCw7B"],
  "txid": "5d15a272a3cbd07611ccd64045fd55d49fdcbb41c0fb21df3b7e8d6011e8b5a9",
  "value": 0.333,
  "vout": 0
}

This is a t to q Dilithium send qutxo. Here is one possible method to decode this type of transaction.

./komodo-cli -ac_name=MUSIG getrawtransaction 5d15a272a3cbd07611ccd64045fd55d49fdcbb41c0fb21df3b7e8d6011e8b5a9 2

Use the decodeccopret RPC on this transaction's opreturn hex value and observe that the returned function value is x. This tell us that this transaction is a Dilithium send t -> q transaction.

./komodo-cli -ac_name=MUSIG decodeccopret 6a221378a26465694d923ee4d490ddd090c0aa7002b6e6a7dcf0550a940ccb6480e325b6

Convert this hex value to big endian:

b625e38064cb0c940a55f0dca7e6b60270aac090d0dd90d4e43e924d696564a27813226a

Take the first 32 bytes of this (position [:64]):

b625e38064cb0c940a55f0dca7e6b60270aac090d0dd90d4e43e924d696564a2

This is the matching destpubtxid to which vout0 was sent in our transaction.

Use the same handle_get function from the previous step and we find that this destpubtxid is associated with the handle LABSLover.

Collecting all the vouts of the qutxos that belong to this handle and creating a sum of their balances provides the total balance.