Skip to content

Instantly share code, notes, and snippets.

View rubensayshi's full-sized avatar

Ruben de Vries rubensayshi

  • Amsterdam, Netherlands
View GitHub Profile
<?php
namespace BlockTrail\Util;
class HexParser {
protected $position = 0;
protected $string = '';
<?php
namespace BlockTrail\SDK;
/**
* Class BIP32Path
*
* BIP32 path, does not mutate itself but returns new instance everytime
*
* @package BlockTrail\SDK
<?php
namespace BlockTrail\Util;
/**
* BaseCoinAddressHelper class
*
* Original By Mike Gogulski - All rights reversed http://www.unlicense.org/ (public domain)
* Modified By Ruben de Vries to remove static methods
* and using inheretance and instances to manage different protocols and versions
@rubensayshi
rubensayshi / gist:da922774d43976e0804c
Last active February 5, 2025 17:13
BlockTrail Wallet API

BlockTrail Wallet API

The BlockTrail Wallet API is a 2of3 Multi-Signature HD Wallet API that provides easy to use wallet functionality with the advantages of having a HD wallet with a secondary backup key and a blocktrail co-singing key.
While (with the SDKs) still remaining easy enough to use for any developer to integrate bitcoin functionality into their applications without any prior (technical) bitcoin knowledge.

Following is a draft of the 'spec' of how the various aspects of the wallet function under the hood.

PHP Implementation of the Client SDK: https://github.com/blocktrail/blocktrail-sdk-php
NodeJS Implementation of the Client SDK: https://github.com/blocktrail/blocktrail-sdk-nodejs/tree/wallet-api

@rubensayshi
rubensayshi / example-python2.7.py
Last active August 29, 2015 14:14
blocktrail-sdk-python-init-example
import blocktrail
client = blocktrail.APIClient(api_key="MY_APIKEY", api_secret="MY_APISECRET", network="BTC", testnet=False)
address = client.address('1NcXPMRaanz43b1kokpPuYDdk6GGDvxT2T')
latest_block = client.block_latest()
print address['balance'], latest_block['hash']
Hostname www.blocktrail.com
Host resolved to 162.159.244.232
Time to resolve IP 0.000s
Connection timed out
HTTP CRITICAL - Unable to open TCP socket
$a = "old";
$b = $a:
myext_fn($a); // modifies $a by ref
$b == $a == $compressed; // true, $b shouldn't be changed
var blocktrail = require('blocktrail-sdk');
var bitcoin = blocktrail.bitcoin;
var client = blocktrail.BlocktrailSDK({
apiKey : "MY_APIKEY",
apiSecret : "MY_APISECRET",
testnet : true
});
client.initWallet({
[katy][11:16:29] (blocktrail-v0.10.1a) /work/bitcoin$ bitcoin-cli -testnet getpeerinfo | grep -B3 "484633" | grep "subver"
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.8.6/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.9.4/",
"subver" : "/Satoshi:0.9.3/",
"subver" : "/Satoshi:0.10.0/",
"subver" : "/Satoshi:0.9.2.1/",
@rubensayshi
rubensayshi / keybase.md
Created August 6, 2015 12:22
keybase.md

Keybase proof

I hereby claim:

  • I am rubensayshi on github.
  • I am rubensayshi (https://keybase.io/rubensayshi) on keybase.
  • I have a public key whose fingerprint is F478 BE67 9D32 0E99 E463 8170 00DA 522E 6698 AA71

To claim this, I am signing this object: