Last active
July 26, 2019 07:00
-
-
Save crossle/787bf9e44d01ffa37c80403ba9d980e4 to your computer and use it in GitHub Desktop.
Revisions
-
crossle revised this gist
Jul 26, 2019 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,12 +31,12 @@ Example: "asset":"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc", "inputs":[ { "deposit": { "chain":"8dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27", "asset":"0xa974c709cfb4566686553a20790685a47aceaa33", "transaction":"0xc7c1132b58e1f64c263957d7857fe5ec5294fce95d30dcd64efef71da1000000", "index":0, "amount":"100.035" } } ], -
crossle revised this gist
Jul 26, 2019 . 1 changed file with 25 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,12 +25,35 @@ spend key: 0f7c6d8861b1fcdb936a1fd80f3acab452bb02e676ceb1949314bda8b915a902 Create a deposit transaction to account, MixinNetwork transaction like UTXO include inputs and outputs Example: { "version":1, "asset":"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc", "inputs":[ { "deposit": {"chain":"8dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27", "asset":"0xa974c709cfb4566686553a20790685a47aceaa33", "transaction":"0xc7c1132b58e1f64c263957d7857fe5ec5294fce95d30dcd64efef71da1000000", "index":0, "amount":"100.035" } } ], "outputs":[ { "type":0, "amount":"100.035", "script":"fffe01", "accounts":["XIN6zb31xAmmtiZfDoZwYxA39LvgzqKeJtT4X2D5gvFRbcmiucwg3Mz9HNAuBeTaiWGxvBtJZ7czi8CZWRdGEprDbYHYYfzc"] } ] } Sign the deposit transaction get the hex string Example: ./mixin signrawtransaction -n localhost:8001 -key xx -raw '{"version":1,"asset":"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc","inputs":[{"deposit":{"chain":"8dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27","asset":"0xa974c709cfb4566686553a20790685a47aceaa33","transaction":"0xc7c1132b58e1f64c263957d7857fe5ec5294fce95d30dcd64efef71da1000000","index":0,"amount":"100.035"}}],"outputs":[{"type":0,"amount":"100.035","script":"fffe01","accounts":["XIN6zb31xAmmtiZfDoZwYxA39LvgzqKeJtT4X2D5gvFRbcmiucwg3Mz9HNAuBeTaiWGxvBtJZ7czi8CZWRdGEprDbYHYYfzc"]}]}' key is your address view append spend string raw is above transaction raw string -
crossle revised this gist
Jul 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ 1. Mixin testnet launch $ ./mixin setuptestnet -
crossle revised this gist
Jul 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Send raw transaction ./mixin sendrawtransaction -n localhost:8001 -raw xx 4. Transfer asset transaction Create raw transaction -
crossle created this gist
Jul 25, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,75 @@ 1. Mixin testnet run $ ./mixin setuptestnet $ mixin kernel -dir /tmp/mixin-7001 -port 7001 $ mixin kernel -dir /tmp/mixin-7002 -port 7002 $ mixin kernel -dir /tmp/mixin-7003 -port 7003 $ mixin kernel -dir /tmp/mixin-7004 -port 7004 $ mixin kernel -dir /tmp/mixin-7005 -port 7005 $ mixin kernel -dir /tmp/mixin-7006 -port 7006 $ mixin kernel -dir /tmp/mixin-7007 -port 7007 2. Create Mixin Mainnet address $ ./mixin createaddress Example: address: XIN6zb31xAmmtiZfDoZwYxA39LvgzqKeJtT4X2D5gvFRbcmiucwg3Mz9HNAuBeTaiWGxvBtJZ7czi8CZWRdGEprDbYHYYfzc view key: 2f5320933fce783f36bc3192a7110660fff2dee256b17229a076f2b325dbfe03 spend key: 0f7c6d8861b1fcdb936a1fd80f3acab452bb02e676ceb1949314bda8b915a902 3. Deposit asset Create a deposit transaction to account, MixinNetwork transaction like UTXO include inputs and outputs Example: {"version":1,"asset":"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc","inputs":[{"deposit":{"chain":"8dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27","asset":"0xa974c709cfb4566686553a20790685a47aceaa33","transaction":"0xc7c1132b58e1f64c263957d7857fe5ec5294fce95d30dcd64efef71da1000000","index":0,"amount":"100.035"}}],"outputs":[{"type":0,"amount":"100.035","script":"fffe01","accounts":["XIN6zb31xAmmtiZfDoZwYxA39LvgzqKeJtT4X2D5gvFRbcmiucwg3Mz9HNAuBeTaiWGxvBtJZ7czi8CZWRdGEprDbYHYYfzc"]}]} Sign the deposit transaction get the hex string Example: ./mixin signrawtransaction -n localhost:8001 -key xx -raw 'xx' key is your address view append spend string raw is above transaction raw string Send raw transaction ./mixin sendrawtransaction -n localhost:8001 -raw xx 4. Transfer transaction Create raw transaction { "version": 1, "asset": "a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc", "extra": "", "outputs": [ { "type": 0, "amount": "115.06849309", "script": "fffe01", "accounts": [ "XINPXu5NBXszhpZDRJ8iA26TbQ2oWTSq1tXqKKeVeYWgLSz8yXGTtVhMogynYytoMewYVFR541wauLhy1YV33zg445E49YA7" ] } ], "inputs": [ { "hash": "20001842d6eff5129c11f7c053bf1209f0267bf223f1681c9cb9d19fc773a692", "index": 11 } ] } Sign the raw transaction get hex string ./mixin signrawtransaction -n localhost:8001 -key xx -raw '{"version":1,"asset":"a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc","extra":"","outputs":[{"type":0,"amount":"115.06849309","script":"fffe01fffe01","accounts":["XINPXu5NBXszhpZDRJ8iA26TbQ2oWTSq1tXqKKeVeYWgLSz8yXGTtVhMogynYytoMewYVFR541wauLhy1YV33zg445E49YA7"]}],"inputs":[{"hash":"20001842d6eff5129c11f7c053bf1209f0267bf223f1681c9cb9d19fc773a692","index":11}]}' Send raw transaction ./mixin sendrawtransaction -n localhost:8001 -raw xx