Skip to content

Instantly share code, notes, and snippets.

View coinables's full-sized avatar
💭
@coinables on Twitter

coinableS coinables

💭
@coinables on Twitter
View GitHub Profile
@coinables
coinables / test.php
Created May 3, 2018 02:15
coinpayments api generate new address example
<?php
// This example will create a new deposit address for a desired currency
// Link to the related documentation https://www.coinpayments.net/apidoc-get-deposit-address
////////////////////////////////////////////////////
// Fill these in from your API Keys page
$public_key = '';
$private_key = '';
@coinables
coinables / gist:c9f853ad863de09df006ad03e1f297e7
Created November 24, 2017 22:26
SegWit Private Key Sweep in NodeJS With BitcoinJS
var bitcoin = require("bitcoinjs-lib");
var request = require("request");
//push transaction
function pushTX(pload, callback){
request({
url: "https://api.blockcypher.com/v1/btc/main/txs/push",
method: "POST",
json: true,
headers: {"content-type": "application/json"},
<?php
$APIkey = "yourAPIkey"; //change to your apikey
$ClientId = "yourClientId"; //change to your clientID
$secret = "yourAPIsecret"; //change to your API secret, provided when you get your API key
$nonce = microtime();
$Data = $nonce.$APIkey.$ClientId;
$hmac = base64_encode(hash_hmac('sha256', $Data, $secret, true));
@coinables
coinables / example.html
Created June 20, 2017 03:01
coincap.io with socket.io example
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>
</head>
<body>
<script type="text/javascript">
var socket = io.connect('http://socket.coincap.io');
socket.on('trades', function (tradeMsg) {
Verifying that +coinables is my blockchain ID. https://onename.com/coinables