This file contains 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
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} | |
module CoreTypes ( | |
Record, Transaction, Block, | |
get_key, tx_dependencies, apply_tx, validate_block_header, | |
block_transactions | |
) where | |
class Ord k => Record r k | r -> k where | |
get_key :: r -> k |
This file contains 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
if (process.argv.length < 3) { | |
console.log('need address') | |
process.exit(1) | |
} | |
var rpc = require('node-json-rpc'); | |
var client = new rpc.Client({ | |
port: 80, | |
host: "regtest-controller.chromanode.com" | |
}); |
This file contains 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 rpc = require('node-json-rpc'); | |
var client = new rpc.Client({ | |
port: 80, | |
host: "regtest-controller.chromanode.com" | |
}); | |
client.call({method: 'add_confirmations', params: [1], id: 1}, | |
function(err, res) { | |
console.log(err || res) | |
}) |
This file contains 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 _ = require('lodash') | |
var bitcore = require('bitcore') // 0.12.5 | |
var network = bitcore.Networks.testnet | |
var totalKeys = 3 | |
var requiredSignatures = 2 | |
var rawPrivateKeys = [ | |
'cUTyK6kpESjzWRtvzb5KfenFB6PaGofwojkJMx68AQA6t2mQSKmV', | |
'cVQS3PFi9t1XWXAH2fKs5xczmeXKb5v4ZbwJ8u7vPgK9Xjx9CDts', |
This file contains 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
import qualified Data.Map as Map | |
type ColorKernel txPayload coinState = txPayload -> [coinState] -> [coinState] | |
data ColorTx txPayload = ColorTx { payload :: txPayload, | |
inputIndices :: [Int], | |
outputIndices :: [Int], | |
outputCount :: Int} | |
type TxId = String |
This file contains 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
class ITOGColorDefinition(GenesisColorDefinition): | |
CLASS_CODE = 'itog' | |
class GenesisDesc(object): | |
def __init__(self, exponent, mantissa): | |
self.exponent = exponent | |
self.mantissa = mantissa | |
@classmethod | |
def from_value(cls, value): |
This file contains 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
tx_queue = [genesis_tx] | |
for cur_block_height in xrange(genesis_height, max_height): | |
# remove txs from this block from the queue | |
block_tx_queue = [tx for tx in tx_queue if tx.block_height == cur_block_height] | |
tx_queue = [tx for tx in tx_queue if tx.block_height != cur_block_height] | |
block_txs = {} | |
while block_tx_queue: | |
tx = block_tx_queue.pop() | |
block_txs[tx.txhash] = tx |
This file contains 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
// | |
// bitcoinjs-gui server configuration defaults | |
// | |
// These settings are used as the defaults for all users connecting to | |
// this version of the client. | |
// | |
// If you don't wish to change a setting, it is recommended that you | |
// leave it commented out, so the global default will apply, which may | |
// be updated/improved in the future. | |
// |
This file contains 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 mockComm = { | |
postMessage : function (o) { console.log(o);} | |
}; | |
var mockWallet = { | |
getSomeAddress : function () { | |
return "111111111"; | |
} | |
}; |
This file contains 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="inputs"> | |
Inputs:<br /> | |
<select><option>---</option><option>Red</option><option>Blue</option><option>Uncolored</option><option>Mixed</option></select><input> <br /> |