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 / nodes.json
Created June 13, 2018 04:41
nodes.json
{ "nodes" :
[
{ "nodeid" : "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e", "alias" : "???? EXANTE", "color" : "007f39", "last_timestamp" : 1516636793, "addresses" :
[
{ "type" : "ipv4", "address" : "148.251.53.235", "port" : 9735 } ] },
{ "nodeid" : "03867da6ba2e32bd6e6e32de8cc010711eeabd73235d6e49544a9229b02b3d35a2", "alias" : "WEIRDARK", "color" : "03867d", "last_timestamp" : 1516844101, "addresses" :
[ ] },
{ "nodeid" : "03b81284c8aba3409cd3720a96089011f4bd6512017ae7f81bf4175a9d22def343", "alias" : "EksiSozlukLN", "color" : "316293", "last_timestamp" : 1517650435, "addresses" :
[
{ "type" : "ipv4", "address" : "188.166.88.130", "port" : 9735 } ] },
@coinables
coinables / gist:97d8406c7044d0263257240116c2753f
Created February 25, 2020 04:25
its a secret to everybody
var s = window.speechSynthesis;
var enc = "Yml0Y29pbiBpcyB0aGUgYmVzdA==";
var u = new SpeechSynthesisUtterance(atob(enc));
s.speak(u);
@coinables
coinables / channels.json
Created June 13, 2018 04:40
channels.json
This file has been truncated, but you can view the full file.
{ "channels" :
[
{ "source" : "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e", "destination" : "035f1498c929d4cefba4701ae36a554691f526ff60b1766badd5a49b3c8b68e1d8", "short_channel_id" : "505198:1139:1", "flags" : 0, "active" : true, "public" : true, "last_update" : 1516847709, "base_fee_millisatoshi" : 546000, "fee_per_millionth" : 10, "delay" : 14 },
{ "source" : "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e", "destination" : "02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432", "short_channel_id" : "505206:1066:1", "flags" : 0, "active" : true, "public" : true, "last_update" : 1516636771, "base_fee_millisatoshi" : 546000, "fee_per_millionth" : 10, "delay" : 14 },
{ "source" : "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e", "destination" : "0387e3780a4325eb38421fb83000a6f6c0ffa4a69ea0c81db3f00e8e5015c9e8a1", "short_channel_id" : "505207:2408:1", "flags" : 0, "active" : true, "public" : true, "last_update" : 1516864360
@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"},
@coinables
coinables / bitcoin.php
Last active January 25, 2020 17:11
Uber Simple
<?php
//replace with your BIP32 extended public key
$xpub = "xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz";
$url = "https://api.blockchair.com/bitcoin/dashboards/xpub/".$xpub;
$fgc = json_decode(file_get_contents($url), true);
$addrlen = count($fgc["context"]["checked"]);
@coinables
coinables / keybase.md
Created November 19, 2019 19:49
keybase.md

Keybase proof

I hereby claim:

  • I am coinables on github.
  • I am m1xolyd1an (https://keybase.io/m1xolyd1an) on keybase.
  • I have a public key ASAOG__GbbKo00EB2D8YqNirmgp0gia8HiuM7JTePuTP3Ao

To claim this, I am signing this object:

@coinables
coinables / transaction.js
Created June 14, 2019 23:55
Create a testnet key pair
let bitcoin = require("bitcoinjs-lib");
function getNewAddress(){
let NETWORK = bitcoin.networks.testnet; //main net bitcoin.networks.bitcoin
let wif = bitcoin.ECPair.makeRandom({network: NETWORK}).toWIF();
let keyPair = bitcoin.ECPair.fromWIF(wif, NETWORK);
//p2pkh
let p2pkhAddr = keyPair.getAddress();
@coinables
coinables / index.html
Created June 13, 2018 04:51
lightning nodes & edges
<!DOCTYPE html>
<html>
<head>
<!-- START SIGMA IMPORTS -->
<script src="../src/sigma.core.js"></script>
<script src="../src/conrad.js"></script>
<script src="../src/utils/sigma.utils.js"></script>
<script src="../src/utils/sigma.polyfills.js"></script>
<script src="../src/sigma.settings.js"></script>
<script src="../src/classes/sigma.classes.dispatcher.js"></script>
$apikey = "your_key";
$apisecret = "your_secret":
function bittrexbalance($apikey, $apisecret){
$nonce=time();
$uri='https://bittrex.com/api/v1.1/account/getbalances?apikey='.$apikey.'&nonce='.$nonce;
$sign=hash_hmac('sha512',$uri,$apisecret);
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
const express = require("express");
const request = require("request");
const bodyparser = require("body-parser");
const bitcore = require("bitcore-lib");
const app = express();
app.use(
bodyparser.urlencoded({
extended: true