Bitcoin Pricing

Bitcoin Price (USD - 24h): $Error! Error retrieving JSON file from source.

Module from GrnLight.net

 

Generated 3 new addresses for 2-of-3 multisig.
Transaction 805850271501c0123e88e18bf503453daccbd0e4414837dae9c0d67f78585e7e to address 2N9pbPmxLGSYvhxLnQoTJD81wasLjDpCJMX of 0.00025 BTC sent.
Waiting for confirmation... (may take > 10 min)

Note: this sample uses bitcoinjs to generate signatures in your browser. If you're experiencing issues please make sure your browser is supported by checking the project page.

var bytesToHex = Bitcoin.convert.bytesToHex;
var hexToBytes = Bitcoin.convert.hexToBytes;

var rootUrl = "https://api.blockcypher.com/v1/btc/test3";
// please do not drain our test account, if you need testnet BTC use a faucet
// https://tpfaucet.appspot.com/
var source = {
  private : "1af97b1f428ac89b7d35323ea7a68aba8cad178a04eddbbf591f65671bae48a2",
  public  : "03bb318b00de944086fad67ab78a832eb1bf26916053ecd3b14a3f48f9fbe0821f",
  address : "mtWg6ccLiZWw2Et7E5UqmHsYgrAi5wqiov"
}
var key   = Bitcoin.ECKey.fromHex(source.private);

var addrs = [];

// 0. We get 3 newly generated address
function logAddrs(dest1, dest2, dest3) {
  addrs[0] = dest1[0];
  addrs[1] = dest2[0];
  addrs[2] = dest3[0];
  log("Generated 3 new addresses for 2-of-3 multisig.");
}

// 1. Post our funding transaction, sending money from a standard address to the multisig
// address for our 3 keys.
function newFundingTransaction() {
  var newtx = {
    "inputs": [{"addresses": [source.address]}],
    "outputs": [{
      "addresses"   : [addrs[0].public, addrs[1].public, addrs[2].public],
      "script_type" : "multisig-2-of-3",
      "value"       : 25000,
    }]
  }
  return $.post(rootUrl+"/txs/new", JSON.stringify(newtx));
}

// 2. Sign the hexadecimal strings returned with the fully built transaction and include
//    the source public address.
function signAndSend(newtx) {
  if (checkError(newtx)) return;

  newtx.pubkeys     = [];
  newtx.signatures  = newtx.tosign.map(function(tosign) {
    newtx.pubkeys.push(source.public);
    return bytesToHex(key.sign(hexToBytes(tosign)));
  });
  return $.post(rootUrl+"/txs/send", JSON.stringify(newtx));
}

// 3. Open a websocket to wait for confirmation the transaction has been accepted in a block.
function waitForConfirmation(finaltx) {
  if (checkError(finaltx)) return;
  console.log(finaltx);
  log("Transaction " + finaltx.tx.hash + " to address " + finaltx.tx.outputs[0].addresses[0] + " of " +
        finaltx.tx.outputs[0].value/100000000 + " BTC sent.");

  var confirmed = $.Deferred();
  var ws = new WebSocket("ws://socket.blockcypher.com/v1/btc/test3");
  ws.onmessage = function (event) {
    log("Transaction confirmed.");
    confirmed.resolve();
    ws.close();
  }
  ws.onopen = function(event) {
    ws.send(JSON.stringify({filter: "event=new-block-tx&hash="+finaltx.tx.hash}));
  }
  log("Waiting for confirmation... (may take > 10 min)");
  return confirmed;
}

function newTwoOfThreeTransaction() {
  var newtx = {
    "inputs": [{
      "addresses"   : [addrs[0].public, addrs[1].public, addrs[2].public],
      "script_type" : "multisig-2-of-3"
    }],
    "outputs": [{
      "addresses" : [source.address],
      "value"     : 15000
    }]
  }
  return $.post(rootUrl+"/txs/new", JSON.stringify(newtx));
}

function signForAddressAndSend(addressNum) {
  return function(newtx) {
    if (checkError(newtx)) return;
    console.log(addrs[addressNum-1]);

    var key = Bitcoin.ECKey.fromHex(addrs[addressNum-1].private);
    newtx.signatures  = newtx.tosign.map(function(tosign) {
      return bytesToHex(key.sign(hexToBytes(tosign)));
    });
    return $.post(rootUrl+"/txs/send", JSON.stringify(newtx));
  }
}

function checkError(msg) {
  if (msg.errors && msg.errors.length) {
    log("Errors occured!!/n" + msg.errors.join("/n"));
    return true;
  }
}

function log(msg) {
  $("div.log").append("<div>" + msg + "</div>")
}

// Chaining
$.when($.post(rootUrl+"/addrs?a"), $.post(rootUrl+"/addrs?b"), $.post(rootUrl+"/addrs?c"))
  .then(logAddrs)
  // funding transaction to multisig address
  .then(newFundingTransaction)
  .then(signAndSend)
  .then(waitForConfirmation)
  // transfer signing with key #3
  .then(newTwoOfThreeTransaction)
  .then(signForAddressAndSend(3))
  // transfer signing with key #1
  .then(newTwoOfThreeTransaction)
  .then(signForAddressAndSend(1))
  // final confirmation
  .then(waitForConfirmation);

 

BITCOINPATRON.COM BITCOINTAG.COM BTCARDGAME.COM BTCARDS.COM BTCASINOS.COM BTCATALOGS.COM BTCAUCTIONEER.COM BTCBANKER.COM BTCDICEGAME.COM BTCHARGERS.COM BTCHARITY.COM BTCHIN.COM BTCLUXURY.COM BTCMETERS.COM BTCOIN.INFO BTCOIN.ME BTCOIN.US BTCOIN4X.COM BTCOINASIA.COM BTCOINBANK.COM BTCOINBAY.COM BTCOINBOX.COM BTCOINCAR.COM BTCOINDOMAINS.COM BTCOINEU.COM BTCOINEWS.COM BTCOINGAMES.COM BTCOINID.COM BTCOINLENDER.COM BTCOINLOANS.COM BTCOINLOCAL.COM BTCOINLOTTERY.COM BTCOINMEDIA.COM BTCOINMERCHANT.COM BTCOINMINER.COM BTCOINMUSIC.COM BTCOINPARK.COM BTCOINPAY.COM BTCOINPLAY.COM BTCOINPOKER.COM BTCOINRAFFLE.COM BTCOINSHOP.COM BTCOINSTORE.COM BTCOINTELLIGENCE.COM BTCOINTEREST.COM BTCOINTICKET.COM BTCOINTRADES.COM BTCOINTRAVEL.COM BTCOINVESTOR.COM BTCOINWALLET.COM BTCOINX.COM BTCONTENT.COM BTCOUPON.COM BTCPATRON.COM BTCPOKERGAME.COM BTCRAPS.COM BTCREDITS.COM BTCROWD.COM BTCSHOPPERS.COM BTCTAGS.COM BTCURRENCY.COM

Crypto-Currency Market Capitalizations

# Name Market Cap Price Total Supply % Change (24h) Market Cap Graph (7d)
1  Bitcoin $ 1,366,209,678 $ 118.00 11,577,950 BTC +4.47 %
2  Ripple $ 533,113,802 $ 0.0053 100,000,000,000 XRP -4.26 %
3  Litecoin $ 56,662,745 $ 2.77 20,477,129 LTC -0.22 %
4  Namecoin $ 4,313,765 $ 0.68 6,357,743 NMC +0.61 %
5  PPCoin $ 3,308,447 $ 0.17 20,026,748 PPC -1.86 %
6  Feathercoin $ 2,014,763 $ 0.15 13,881,400 FTC -0.13 %
7  Novacoin $ 1,939,231 $ 5.39 359,764 NVC +3.10 %
8  Primecoin $ 1,356,941 $ 0.82 1,663,897 XPM -2.73 %
9  Terracoin $ 756,167 $ 0.21 3,640,990 TRC +8.79 %
10  Infinitecoin $ 427,028 $ 5.8e-06 73,415,262,208 IFC +9.19 %
11  Devcoin $ 307,536 $ 6e-05 5,110,220,050 DVC +6.66 %
12  GoldCoin $ 249,166 $ 0.0096 25,911,140 GLD -40.49 %
13  Digitalcoin $ 223,123 $ 0.031 7,242,732 DGC -13.71 %
14  Freicoin $ 176,506 $ 0.0072 24,477,129 FRC -4.67 %
15  WorldCoin $ 138,928 $ 0.0084 16,582,376 WDC +6.67 %
16  Yacoin $ 113,368 $ 0.02 5,718,669 YAC -3.54 %
17  Ixcoin $ 101,402 $ 0.0068 14,867,282 IXC +14.98 %
18  CryptogenicBullion $ 92,521 $ 0.14 642,677 CGB -0.22 %
19  Megacoin $ 85,675 $ 0.0054 15,780,250 MEC -7.60 %
20  Mincoin $ 74,750 $ 0.059 1,263,019 MNC -19.36 %
21  Phenixcoin $ 64,872 $ 0.019 3,472,900 PXC +3.39 %
22  BBQCoin $ 54,424 $ 0.0024 22,608,647 BQC -14.45 %
23  CHNCoin $ 37,218 $ 0.0071 5,256,730 CNC +4.43 %
24  Fastcoin $ 35,325 $ 0.0019 18,994,909 FST -5.57 %
25  Luckycoin $ 30,446 $ 0.005 6,069,592 LKY +3.75 %
26  Anoncoin $ 27,792 $ 0.066 420,577 ANC +6.13 %
27  Memecoin $ 26,237 $ 0.00094 27,966,550 MEM +65.12 %
28  Franko $ 23,891 $ 0.51 46,856 FRK -23.43 %
29  XenCoin $ 19,400 $ 0.00012 165,465,050 XNC +19.93 %
30  Bottlecaps $ 18,200 $ 0.025 719,383 CAP +-0.00 %
31  Bytecoin $ 17,024 $ 0.018 930,800 BTE +4.46 %
32  BitBar $ 12,876 $ 2.50 5,145 BTB +4.79 %
33  Argentum $ 12,040 $ 0.031 390,924 ARG -14.83 %
34  Doubloons $ 10,936 $ 0.019 583,053 DBL +187.35 %
35  AlphaCoin $ 9,750 $ 0.00086 11,303,500 ALF +5.28 %
36  Bitgem $ 9,677 $ 0.52 18,481 BTG +-0.00 %
37  EZCoin $ 9,632 $ 0.0014 6,960,821 EZC +115.78 %
38  GlobalCoin $ 8,390 $ 0.00058 14,363,100 GLC +12.04 %
39  CasinoCoin $ 7,752 $ 0.0035 2,234,400 CSC +30.28 %
40  Krugercoin $ 7,208 $ 0.00071 10,180,178 KGC -20.28 %
41  NanoToken $ 5,994 $ 0.0081 740,462 NAN +4.56 %
42  CraftCoin $ 5,792 $ 0.057 102,252 CRC +13.67 %
43  Emerald $ 5,750 $ 0.0035 1,652,330 EMD +37.61 %
44  Spots $ 5,097 $ 0.0074 687,666 SPT +9.66 %
45  Nibble $ 4,520 $ 0.0047 957,404 NBL -30.10 %
46  StableCoin $ 3,768 $ 0.00083 4,516,805 SBC -15.91 %
47  Hypercoin $ 3,082 $ 0.006 512,150 HYC -19.31 %
48  Elacoin $ 1,478 $ 0.065 22,589 ELC +54.54 %

 

Luxury Bitcoin Store