Skip to content

Instantly share code, notes, and snippets.

View educationofjon's full-sized avatar
💭
con gabriela

Jonathan Gonzalez educationofjon

💭
con gabriela
View GitHub Profile
(ns forms
(:require [clojure.data :as data]
[clojure.walk :as walk]
[castra.core :as castra]))
(defn- reset-vals! [map-of-cells default]
(doseq [v (vals map-of-cells)]
(reset! v default)))
@educationofjon
educationofjon / diff.js
Created March 20, 2017 02:52
part of bcoin mine
var assert = require('assert');
function rcmp(a, b) {
var i;
assert(a.length === b.length);
for (i = a.length - 1; i >= 0; i--) {
if (a[i] < b[i])
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "sha256.h"
#include "sysendian.h"
#include "crypto_scrypt.h"
'use strict'
var assert = require('assert');
var mul32 = Math.imul;
function Int64(num, signed, base) {
if (!(this instanceof Int64))
return new Int64(num, signed, base);
this.hi = 0;
this.lo = 0;
'use strict';
const assert = require('assert');
const Input = require('../lib/primitives/input');
const Output = require('../lib/primitives/output');
const KeyRing = require('../lib/primitives/keyring');
const Amount = require('../lib/btc/amount');
const Script = require('../lib/script/script');
const digest = require('../lib/crypto/digest');
const Address = require('../lib/primitives/address');
'0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4adae5494dffff001d1aa4ae180101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000'

Bcash Replay protection signature verification

Version 1.0.0-beta.14, 2017-07-16

Abstract

This document describes proposed requirements and design for a reusable signing mechanism ensuring replay protection in the event of a hard fork. It provides a way for users to create transactions which are invalid on forks lacking support for the mechanism and a fork-specific ID.

The proposed digest algorithm is adapted from BIP143[1] as it minimizes redundant data hashing in verification, covers the input value by the signature and is already implemented in a wide variety of applications[2].

@educationofjon
educationofjon / address.js
Created September 18, 2017 03:31
Lcoin addresses
/*!
* address.js - address object for bcoin
* Copyright (c) 2014-2015, Fedor Indutny (MIT License)
* Copyright (c) 2014-2017, Christopher Jeffrey (MIT License).
* https://github.com/bcoin-org/bcoin
*/
'use strict';
var assert = require('assert');
@educationofjon
educationofjon / network.js
Created September 18, 2017 03:32
lcoin network without bech32
/*!
* network.js - network object for bcoin
* Copyright (c) 2014-2015, Fedor Indutny (MIT License)
* Copyright (c) 2014-2017, Christopher Jeffrey (MIT License).
* https://github.com/bcoin-org/bcoin
*/
'use strict';
var assert = require('assert');
/*!
* network.js - bitcoin networks for bcoin
* Copyright (c) 2014-2015, Fedor Indutny (MIT License)
* Copyright (c) 2014-2017, Christopher Jeffrey (MIT License).
* https://github.com/bcoin-org/bcoin
*/
'use strict';
/**