git clone repo <dirname>
cd <dirname>
git checkout <branch>
heroku create
git push heroku <branch>:master
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 characters
| var bitcoin = require('bitcoinjs-lib') | |
| var net = function(network) { | |
| tmp = (network == 'testnet') ? bitcoin.networks.testnet : bitcoin.networks.bitcoin; | |
| return tmp; | |
| }; | |
| network = 'bitcoin' | |
| var key = bitcoin.ECPair.makeRandom({network: net(network)}); | |
| var bitcoinAddress = key.getAddress(net(network)).toString(); | |
| var privateKeyWif = key.toWIF(); |
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 characters
| wif='cNXxHLQwuzaLX7Z3apfSSEUDPPrQtUrwyzuaEZZakk2uWCcDS1Uo' | |
| address='miq6AWvTYZJ63hJfh1W7zozHAf1URDv5pS' | |
| unspent_txid = '067aabe97ff2e8051527d7f378266d046fd8e4c66e5b7dd671ec4e86b8a68cbb' | |
| unspent_vout = 0 | |
| keyPair = bitcoin.ECPair.fromWIF(wif,network) | |
| var txb = new bitcoin.TransactionBuilder(network) | |
| var data = new Buffer('assafshomer') | |
| var dataScript = bitcoin.script.nullDataOutput(data) | |
| txb.addInput(unspent_txid, unspent_vout) |
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 characters
| var bitcoin = require('bitcoinjs-lib') | |
| var keyPair = bitcoin.ECPair.makeRandom() | |
| // Print your private key (in WIF format) | |
| console.log(keyPair.toWIF()) | |
| // => Kxr9tQED9H44gCmp6HAdmemAzU3n84H3dGkuWTKvE23JgHMW8gct | |
| // Print your public key address | |
| console.log(keyPair.getAddress()) | |
| // => 14bZ7YWde4KdRb5YN7GYkToz3EHVCvRxkF |
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 characters
| Verifying issuance of colored coins asset with ID #U3uPyQeyNRafPy7popDfhZui8Hsw98B5XMUpP | |
| Verifying issuance of colored coins asset with ID #LKUYHRCMbqUNgfNCGFnXv1AvB5Pv8Lkk2EjoF | |
| Verifying issuance of colored coins asset with ID #U9a36XP1UwL5pxaYYiZYJ86sUqWAJ2dGbLaer | |
| Verifying issuance of colored coins asset with ID #LE2v9RbnNr6EJFArY5HZYEeWZgQppxaEEu7XL | |
| Verifying issuance of colored coins asset with ID #LH4noQ7f8dF2Q2jySihJTjK9NpoEKJ8sY575A | |
| Verifying issuance of colored coins asset with ID #LHEQJbm21GGzpHzwwuoraZUQ8LuApHXRqCrwk |
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 characters
| Verifying issuance of colored coins asset with asset_id: [LGbocSa7jQ6egewe3bmEkqjFUEDvY6c4xetMR] |
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 characters
| Verifying issuance of colored coins asset with asset_id: [LJEC6Q2h9JKNvZqEC87TbEXvxm4br1uivb2QX] |
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 characters
| # Make sure to first bundle install gem 'terminal-table' | |
| require 'terminal-table' | |
| MAX_EXP = 16 | |
| def max_num(mantis_bits,available_bits) | |
| mantis(mantis_bits)*(10**exponent(mantis_bits,available_bits)) | |
| end |
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 characters
| require 'terminal-table' | |
| def max_num(mantis_bits,available_bits) | |
| mantis(mantis_bits)*(10**exponent(mantis_bits,available_bits)) | |
| end | |
| def mantis(mantis_bits) | |
| 2**mantis_bits | |
| end |