Skip to content

Instantly share code, notes, and snippets.

var bip39 = require('bip39');
var bitcoin = require('bitcoinjs-lib');
var Wallet = {};
// FILL IN: REDEEM_SCRIPT, MNEMONIC1, PASSPHRASE, MNEMONIC2, TARGET_ADDRESS, TXID, VALUE
// build like here: https://github.com/blocktrail/blocktrail-sdk-nodejs/blob/ff4bde6983385f5adff3a89e10959ddc323e4160/lib/wallet_sweeper.js#L228
var redeemScript = new Buffer('REDEEM_SCRIPT', 'hex');

Keybase proof

I hereby claim:

  • I am kobigurk on github.
  • I am kobigurk (https://keybase.io/kobigurk) on keybase.
  • I have a public key ASC5Lcvkhu5DkD9YZaw43OMLNt97xRw_YhTgTKIl-CMWLAo

To claim this, I am signing this object:

pragma solidity ^0.4.0;
contract SHA256Test {
function calc_sha() public returns (bytes32) {
bytes32 a = 0x5;
bytes32 b = 0x0;
return sha256(a, b);
}
}
@kobigurk
kobigurk / gist:b7777aec554bd40f97f18777cf7367a5
Created April 26, 2018 16:45
sha256 compression test vectors
in=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
out=da5698be17b9b46962335799779fbeca8ce5d491c0d26243bafef9ea1837a9d8
in=000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
out=fc99a2df88f42a7a7bb9d18033cdc6a20256755f9d5b9a5044a9cc315abe84a7
in=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
out=ef0c748df4da50a8d6c43c013edc3ce76c9d9fa9a1458ade56eb86c0a64492d2
in=243f6a8885a308d313198a2e03707344a4093822299f31d0082efa98ec4e6c89452821e638d01377be5466cf34e90c6cc0ac29b7c97c50dd3f84d5b5b5470917
@kobigurk
kobigurk / celo-stake-off.md
Created November 25, 2019 22:23
Want some gold

CELO_VALIDATOR_GROUP_ADDRESS=468847b978572efe6fb1d52a5b76dd537c8283e2 CELO_VALIDATOR_ADDRESS=b57d4b48f955d4f0606102dedff38ad1d7e2bd82

Attestation:
Message: https://www.aztecprotocol.com/ignition/participant/0x69dbe791cffd6295a1327f0d2015eaf6e2f52c1d/?timestamp=1578749888000
Hash: 0x541e4bc9f8c6f95e5a8b7ade214f258989a526d5fb19ec1f830e590609e1b24d
Signature: 0x9c2b6658586b8bdc4ecbb136c4aa5ded33ea4c9183e27ac4bc6b1cbf8cfe37767523256824c370dad81585a8e71b7e0cca2274ec558c46b3a1a318e3d7543c881c
@kobigurk
kobigurk / BLS_with_help.sol
Created August 25, 2020 15:51
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.17+commit.d19bba13.js&optimize=false&gist=
pragma solidity ^0.5.15;
contract BLS {
// Field order
uint256 constant N = 21888242871839275222246405745257275088696311157297823662689037894645226208583;
// Negated genarator of G2
uint256 constant nG2x1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
uint256 constant nG2x0 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
uint256 constant nG2y1 = 17805874995975841540914202342111839520379459829704422454583296818431106115052;
@kobigurk
kobigurk / add_peers.py
Last active January 15, 2021 14:50
add_peers
import sys
import subprocess
import re
import time
peers_file = 'peers.txt'
def extract_ip(peer):
return peer.split('/')[1]
@kobigurk
kobigurk / contribution.txt
Created January 22, 2021 11:12
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "ZKOPRU transaction circuit 1/2",
"ceremonyId": "Qiu6eLsJDyMokvJ7sGzH",
"time": "2021-01-22T11:12:03.292Z",
"contributionNumber": 47,
"hash": "0x68c0cf0df975b3cb0f35c43dad790d0ccfde2821a4487fb16b534a410483d22106c4064995433cff0dd0d00ddbf8e7ce87b0081fe58e377fc604babb32f98669"
}
@kobigurk
kobigurk / contribution.txt
Created January 22, 2021 11:13
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "zk_transaction_1_3",
"ceremonyId": "Ub0RJMsiVsk49FyTSeaj",
"time": "2021-01-22T11:13:43.280Z",
"contributionNumber": 11,
"hash": "0xa961506ff2d27f9ea020e6ec41bf6e1709f35ede153220b1062bca24451469d9eeeaa8821d156eab51fc87f39952ac33921e86db3f0a519340ddbac0179a81f2"
}