Skip to content

Instantly share code, notes, and snippets.

Ryan Smith ryandotsmith

Block or report user

Report or block ryandotsmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ryandotsmith /
Last active Mar 2, 2016
A simple example of Chain's Java SDK
import com.chain.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
public class Main {
private static String projectID = "proj0ACRX7YMG091G";
ryandotsmith / limiter.go
Created Jul 31, 2015
HTTP token bucket rate limiting
View limiter.go
package main
import (
ryandotsmith /
Last active Oct 22, 2015
Chain's Asset Wallet - Creating, Issuing, and Transferring Assets

Tutorial - Creating, Issuing, and Transferring Assets


In this tutorial, we will do the following:

  1. Create an App Wallet
  2. Add the App Wallet Details to the Chain SDK
  3. Create a new Asset in the App Wallet called "Gold Stars"
  4. Create Buckets in the App Wallet for the Treasury and two users - Devon and Ryan
  5. Issue 10 Gold Stars into the Treasury
ryandotsmith / payload.json
Created Mar 18, 2015
Chain Notifications Webhook Payload
View payload.json
"id": "94d50194-05c8-48bb-94d1-588edf3d286c",
"sequence": 163201,
"created_at": "2015-03-18T18:18:18.446537Z",
"delivery_attempt": 1,
"notification_id": "2d2f54c4-73c8-415f-88b7-2b13452f6851",
"type": "webhook",
"block_chain": "bitcoin",
"transaction": {
"hash": "da02037c03337c24439be90ff6cab0e4b9dec03cc4dbe08d8863763a52dcc0ef",
ryandotsmith / x.html
Created Mar 17, 2015
Sending a transaction in the browser
View x.html
<!doctype html>
<script src="//"></script>
<p>Balance: <span id="balance"></span></p>
View ok-http.rb
require 'json'
require 'net/http'
require 'thread'
require 'openssl'
require 'uri'
module Okhttp
class Conn
def initialize(url)
ryandotsmith / op_return.rb
Created Feb 9, 2015 OP_RETRURN Transaction - Create Bitcoin OP_RETURN Transactions in Ruby
View op_return.rb
require 'bitcoin'
require 'chain'
Chain.block_chain = 'testnet3' = :testnet3
include Bitcoin::Builder
key = Bitcoin::Key.from_base58("cVVBKRBMoPLJSSMW7cM3hji7VmXz1zJWX3DypcjPcWpRBMEu2xF7")
builder =
ryandotsmith / main.go
Created Jan 15, 2015
Sending an OP_RETURN Bitcoin Transaction with Go using Chain's Bitcoin API
View main.go
package main
import (
ryandotsmith / block-chain-u.js
Last active Aug 29, 2015
Block Chain U Code Examples Week 1 Lecture 1
View block-chain-u.js
var bitcoin = require('bitcoinjs-lib');
var Chain = require('chain-node');
var chain = new Chain({
blockChain: "testnet3"
* key = bitcion.ECKey.makeRandom()
* key.toWIF()
You can’t perform that action at this time.