{"id":29068660,"url":"https://github.com/mixinnetwork/mixin","last_synced_at":"2025-06-27T11:09:14.117Z","repository":{"id":32089193,"uuid":"131300489","full_name":"MixinNetwork/mixin","owner":"MixinNetwork","description":"🚀 The Mixin-BFT-DAG network reference implementation.","archived":false,"fork":false,"pushed_at":"2025-05-23T14:42:33.000Z","size":15422,"stargazers_count":522,"open_issues_count":11,"forks_count":140,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-06-22T06:54:12.985Z","etag":null,"topics":["bft","bitcoin","blockchain","dag","lightning-network","mixin","mixinnetwork"],"latest_commit_sha":null,"homepage":"https://mixin.one/assets/Mixin-Draft-2018-07-01.pdf","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MixinNetwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-27T13:31:53.000Z","updated_at":"2025-05-23T14:42:36.000Z","dependencies_parsed_at":"2023-02-18T14:01:11.885Z","dependency_job_id":"cdcdc4ef-6c28-4498-a275-5841bd34a230","html_url":"https://github.com/MixinNetwork/mixin","commit_stats":null,"previous_names":["mixinmessenger/mixin"],"tags_count":260,"template":false,"template_full_name":null,"purl":"pkg:github/MixinNetwork/mixin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fmixin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fmixin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fmixin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fmixin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MixinNetwork","download_url":"https://codeload.github.com/MixinNetwork/mixin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MixinNetwork%2Fmixin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262244921,"owners_count":23281029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bft","bitcoin","blockchain","dag","lightning-network","mixin","mixinnetwork"],"created_at":"2025-06-27T11:09:00.103Z","updated_at":"2025-06-27T11:09:14.106Z","avatar_url":"https://github.com/MixinNetwork.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mixin\n\nThe Mixin BFT-DAG network reference implementation, the Trusted Execution Environment is not integrated into this repository yet.\n\n## Get Started\n\nInstall golang and setup `GOPATH` following this guide https://golang.org/doc/install.\n\n```bash\n$ git clone https://github.com/MixinNetwork/mixin.git\n$ cd mixin\n$ go build\n```\n\nThe `mixin` command is both the kernel node and tools to communicate with the node RPC interface.\n\n```\n$ mixin\n\nNAME:\n   mixin - A free, lightning fast and decentralized network for transferring digital assets.\n\nUSAGE:\n   mixin [global options] command [command options] [arguments...]\n\nVERSION:\n   v0.12.0\n\nCOMMANDS:\n   kernel, k                    Start the Mixin Kernel daemon\n   clone                        Clone a graph to initialize the kernel\n   setuptestnet                 Setup the test nodes and genesis\n   createaddress                Create a new Mixin address\n   decodeaddress                Decode an address as public view key and public spend key\n   decodesignature              Decode a signature\n   decryptghostkey              Decrypt a ghost key with the private view key\n   updateheadreference          Update the cache round external reference, never use it unless agree by other nodes\n   removegraphentries           Remove data entries by prefix from the graph data storage\n   validategraphentries         Validate transaction hash integration\n   signrawtransaction           Sign a JSON encoded transaction\n   sendrawtransaction           Broadcast a hex encoded signed raw transaction\n   decoderawtransaction         Decode a raw transaction as JSON\n   buildnodepledgetransaction   Build the transaction to pledge a node\n   buildnodecanceltransaction   Build the transaction to cancel a pledging node\n   decodenodepledgetransaction  Decode the extra info of a pledge transaction\n   getroundlink                 Get the latest link between two nodes\n   getroundbynumber             Get a specific round\n   getroundbyhash               Get a specific round\n   listsnapshots                List finalized snapshots\n   getsnapshot                  Get the snapshot by hash\n   gettransaction               Get the finalized transaction by hash\n   getcachetransaction          Get the transaction in cache by hash\n   getutxo                      Get the UTXO by hash and index\n   listmintworks                List mint works\n   listmintdistributions        List mint distributions\n   listallnodes                 List all nodes ever existed\n   getinfo                      Get info from the node\n   dumpgraphhead                Dump the graph head\n   help, h                      Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --node value, -n value  the node RPC endpoint (default: \"127.0.0.1:8239\")\n   --dir value, -d value   the data directory\n   --time                  print the runtime (default: false)\n   --help, -h              show help (default: false)\n   --version, -v           print the version (default: false)\n```\n\n## Mixin Kernel Address\n\nMixin Kernel address are a pair of ed25519 keys, following the [CryptoNote](https://cryptonote.org/standards/) protocol. To create a new address use the `createaddress` command.\n\n```\n$ mixin createaddress\n\naddress:\tXINJkpCdwVk3qFqmS3AAAoTmC5Gm2fR3iRF7Rtt7hayuaLXNrtztS3LGPSxTmq5KQh3KJ2qYXYE5a9w8BWXhZAdsJKXqcvUr\nview key:\t568302b687a2fa3e8853ff35d99ffdf3817b98170de7b51e43d0dcf4fe30470f\nspend key:\t7c2b5c97278ed371d75610cccd9681af31b0d99be4adc2d66983f3c455fc9702\n```\n\nShare the `address` to receive assets from other Mixin Kernel addresses, and keep `view key` and `spend key` privately and securely.\n\nBoth the `view key` and `spend key` are required to spend the assets received from others, and the `view key` itself is sufficient to decode and view all the transactions sent to `address`.\n\n\n## Sign and Send Raw Transaction\n\nBasic Mixin Kernel transaction is similar to the transaction in Bitcoin, with following format.\n\n```json\n{\n  \"version\": 5,\n  \"asset\": \"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc\",\n  \"extra\": \"34366362393932382d653636632d343966392d386165632d366462366137346666663638\",\n  \"outputs\": [\n    {\n      \"type\": 0,\n      \"amount\": \"115.06849309\",\n      \"script\": \"fffe01\",\n      \"accounts\": [\n        \"XINPXu5NBXszhpZDRJ8iA26TbQ2oWTSq1tXqKKeVeYWgLSz8yXGTtVhMogynYytoMewYVFR541wauLhy1YV33zg445E49YA7\"\n      ]\n    }\n  ],\n  \"inputs\": [\n    {\n      \"hash\": \"20001842d6eff5129c11f7c053bf1209f0267bf223f1681c9cb9d19fc773a692\",\n      \"index\": 11\n    }\n  ]\n}\n```\n\nThis is the same UTXO model used in Bitcoin, but with different field names. Among them `version`, `type` and `script` should not be modified unless you know some advanced topics.\n\nCompact the raw transaction JSON and sign it with the private view and spend key as following.\n\n```\n$ mixin -n mixin-node:8239 signrawtransaction \\\n    -key 0d48c96d383d325a97eea5295cbf3afa7766c49db477b68fd8032ff7f59b0b00d77e434f96f3f42c2d1796662c7cc90497feaf3863a5815f27ba49fd5e29b906 \\\n    -raw '{\"version\":5,\"asset\":\"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc\",\"extra\":\"34366362393932382d653636632d343966392d386165632d366462366137346666663638\",\"outputs\":[{\"type\":0,\"amount\":\"115.06849309\",\"script\":\"fffe01\",\"accounts\":[\"XINPXu5NBXszhpZDRJ8iA26TbQ2oWTSq1tXqKKeVeYWgLSz8yXGTtVhMogynYytoMewYVFR541wauLhy1YV33zg445E49YA7\"]}],\"inputs\":[{\"hash\":\"20001842d6eff5129c11f7c053bf1209f0267bf223f1681c9cb9d19fc773a692\",\"index\":11}]}'\n```\n\n\n## Start a Kernel Node\n\nTo start a node, create a directory `mixin` for the config and network data files, then put the genesis.json, nodes.json and config.toml files in it.\n\nThe main net genesis.json, nodes.json and an example config.example.toml files can be obtained from [here](https://github.com/MixinNetwork/mixin/tree/master/config), you only need to put your own signer spend key in the config.toml file.\n\nChanging the `consensus-only` option to `false` will allow the node to start in archive mode, which syncs all the graph data.\n\n```\n$ mixin help kernel\n\nNAME:\n   mixin kernel - Start the Mixin Kernel daemon\n\nUSAGE:\n   mixin kernel [command options] [arguments...]\n\nOPTIONS:\n   --dir value, -d value   the data directory\n   --port value, -p value  the peer port to listen (default: 7239)\n```\n\n## Local Test Net\n\nThis will set up a minimum local test net, with all nodes in a single device.\n\n```\n$ mixin setuptestnet\n=\u003e\nnetwork:    331c1956ffb45db8a61d30a2a16e3eb0a263b844a6781253acaa07dc4ad555a8\ncustodian:  XINVo9oZLCzQc39QuhcmApzN23s2RjnMfABrbZvGPsB74SsYqhCYLFsXSULrLs4rokgGXNY5oUZvVm7ZQgHzBv7PPPRW7kFm\nview key:   95974a5f8b90d685527f246605e13968dc73f3bc9a72e6db23128220a6579e08\nspend key:  109c54394e977d46c2c6385faf05b4a25024ddb476588529b889f6d71912ab0b\n```\n\nThe output above indicates the network id and default custodian key for the test net. The custodian key should be kept well for future deposit of the test net.\n\nTo boot the test net, just launch the node with each configuration directory.\n\n```\n$ mixin kernel -dir /tmp/mixin-6861\n$ mixin kernel -dir /tmp/mixin-6862\n$ mixin kernel -dir /tmp/mixin-6863\n$ mixin kernel -dir /tmp/mixin-6864\n$ mixin kernel -dir /tmp/mixin-6865\n$ mixin kernel -dir /tmp/mixin-6866\n$ mixin kernel -dir /tmp/mixin-6867\n```\n\nThen we can generate a test address and deposit some money into the address.\n\n```\n$ mixin createaddress\n=\u003e\naddress:    XINBpBaDKtcu5SBuuqE1pwMrdeFvyCwFChdjLS23ewKdoLbURL4iJYCXLvsXP1nVbB3CGRbWg6UgVH8AWVgjSgmenMsrgpRY\nview key:   be25d97ba8eb80336998facfb033f71713f9c1cabdc417478f831c749fcd9001\nspend key:  5189b286e5717ea36435a29dfb1aaddebad5e216b05e8b4de59693dfb9fe1f06\n\n$ mixin signcustodiandeposit -custodian CUSODIANPRIVATEVIEWPRIVATESPEND \\\n      -receiver XINBpBaDKtcu5SBuuqE1pwMrdeFvyCwFChdjLS23ewKdoLbURL4iJYCXLvsXP1nVbB3CGRbWg6UgVH8AWVgjSgmenMsrgpRY \\\n      -asset a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc \\\n      -chain 8dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27 \\\n      -asset_key 0xa974c709cfb4566686553a20790685a47aceaa33 \\\n      -transaction 0x13f805f2593c59becd0b89673390249415f833fc9c821288f69cce5e7c6eb09f \\\n      -index 0 \\\n      -amount 100.123\n=\u003e\n77770005a99c2e0e2b1da4d648...3c6cfb57f8cd1830c\n\n$ mixin -n 127.0.0.1:6861 sendrawtransaction -raw 77770005a99c2e0e2b1da4d648...3c6cfb57f8cd1830c\n=\u003e\n{\"hash\":\"bf7f2bdbed2f77c452e91febd48c4a8f876e42895737d2616f9da956fb622888\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixinnetwork%2Fmixin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmixinnetwork%2Fmixin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixinnetwork%2Fmixin/lists"}