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
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <p>Balance: <span id="balance"></span></p> | |
| </body> |
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 'json' | |
| require 'net/http' | |
| require 'thread' | |
| require 'openssl' | |
| require 'uri' | |
| module Okhttp | |
| class Conn | |
| def initialize(url) |
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 'bitcoin' | |
| require 'chain' | |
| Chain.block_chain = 'testnet3' | |
| Bitcoin.network = :testnet3 | |
| include Bitcoin::Builder | |
| key = Bitcoin::Key.from_base58("cVVBKRBMoPLJSSMW7cM3hji7VmXz1zJWX3DypcjPcWpRBMEu2xF7") | |
| builder = Bitcoin::Builder::TxBuilder.new |
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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "encoding/json" | |
| "io/ioutil" | |
| "log" | |
| "net/http" |
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 Chain = require('chain-node'); | |
| var chain = new Chain({ | |
| blockChain: "testnet3" | |
| }); | |
| /* | |
| * key = bitcion.ECKey.makeRandom() | |
| * 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
| +------------------+ +-------------------+ | |
| | SDK/Your Process | | Chain API | | |
| +------------------+ +-------------------+ | |
| build transaction | |
| +-------------------------------------> | |
| transaction template | |
| <-------------------------------------+ |
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
| { | |
| "inputs": [{ | |
| "address": "mxLGQRD9p3MayF7WrUJsyuY4cZdPSH2yA4", | |
| "signatures_required": 1, | |
| "signatures": [{ | |
| "address": "mxLGQRD9p3MayF7WrUJsyuY4cZdPSH2yA4", | |
| "public_key": "<insert public key>", | |
| "hash_to_sign": "ac366bdd3eb0ecd64d3d08a7d519d7fe5ceb263a499b135e3158fea04c87a89c", | |
| "signature": "<insert signature>" | |
| }] |
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 Chain = require('chain-node'); | |
| var chain = new Chain(blockChain: 'testnet3'); | |
| var req = { | |
| inputs: [{ | |
| address: "mxLGQRD9p3MayF7WrUJsyuY4cZdPSH2yA4", | |
| // Private key never leaves this process! | |
| private_key: "cNX5yYSnj6Bd3BEjsfV6ZQyn8hQYYDQB79vjHNkv7NAPazo9GBJT", | |
| }], | |
| outputs: [{ |
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 util = require('util'); | |
| var bitcoin = require('bitcoinjs-lib'); | |
| var Chain = require('chain-node'); | |
| var chain = new Chain({blockChain: "testnet3"}); | |
| var b = new Buffer("Hello, world."); | |
| var t = new bitcoin.Transaction(); | |
| t.addInput("ca7e12c753bd2a268e6f038509d72f3c44fd24064ed5ef8cde13ec987d495a64", 0); |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <ul id="thashlist"></ul> | |
| </body> | |
| <script type="text/javascript"> | |
| $(function() { |