This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pop8tab = [256]uint8{ | |
0x00, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x03, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, | |
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, | |
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, | |
0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, | |
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, | |
0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, | |
0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, 0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, | |
0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, | |
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
["Format is: [[wit..., amount]?, scriptSig, scriptPubKey, flags, expected_scripterror, ... comments]"], | |
["It is evaluated as if there was a crediting coinbase transaction with two 0"], | |
["pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,"], | |
["followed by a spending transaction which spends this output as only input (and"], | |
["correct prevout hash), using the given scriptSig. All nLockTimes are 0, all"], | |
["nSequences are max."], | |
["", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "Test the test: we should have an empty stack after scriptSig evaluation"], | |
[" ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "OK", "and multiple spaces should not change that."], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample bcoin config file (~/.bcoin/bcoin.conf) | |
# | |
# Options | |
# | |
network: main | |
# | |
# Node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1edb", MODE="0666" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let lastSep = 0; | |
let opCount = 0; | |
let negate = 0; | |
let minimal = false; | |
const opcodes = {}; | |
case opcodes.OP_CHECKMULTISIG: | |
case opcodes.OP_CHECKMULTISIGVERIFY: { | |
if (!tx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Options | |
# | |
network: main | |
# | |
# Node | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* sigcache.js - signature cache for bcoin | |
* Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). | |
* https://github.com/bcoin-org/bcoin | |
*/ | |
'use strict'; | |
const assert = require('bsert'); | |
const {BufferMap} = require('buffer-map'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Reproduce Bitcoin ABC's deterministic Schnorr signature near end of key_tests.cpp | |
from ecdsa.numbertheory import jacobi | |
from ecdsa import SECP256k1 | |
import hashlib | |
import hmac | |
G = SECP256k1.generator | |
p = SECP256k1.curve.p() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Reader, ReadResult, Writer } from "deno"; | |
import { assert } from "https://deno.land/x/testing/mod.ts"; | |
public static constant readonly PADDING = 0x80; | |
export class SHA256 implements Reader, Writer { | |
protected static readonly IV32: Uint32Array = new Uint32Array([ | |
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, | |
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, | |
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ "0000000000000000000000000000000000000000000000000000000000000001", | |
"0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", | |
"0000000000000000000000000000000000000000000000000000000000000000", | |
"787a848e71043d280c50470e8e1532b2dd5d20ee912a45dbdd2bd1dfbf187ef67031a98831859dc34dffeedda86831842ccd0079e1f92af177f7f22cc1dced05", | |
"true" | |
], | |
["b7e151628aed2a6abf7158809cf4f3c762e7160f38b4da56a784d9045190cfef", | |
"02dff1d77f2a671c5f36183726db2341be58feae1da2deced843240f7b502ba659", | |
"243f6a8885a308d313198a2e03707344a4093822299f31d0082efa98ec4e6c89", |