Initial commit of Full Node

all current code is forked from bitcore2
This commit is contained in:
Ryan X. Charles 2014-09-28 18:33:54 -07:00
parent f54edfb618
commit 8b0b30e226
6 changed files with 65 additions and 67 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
*.swp
coverage
node_modules
browser/bitcore.js
browser/fullnode.js
browser/tests.js

View File

@ -1,10 +1,10 @@
This software is licensed under the MIT License.
Copyright (c) 2014 BitPay Inc.
Parts of this software are based on privsec
Copyright (c) 2014 Ryan X. Charles <ryanxcharles@gmail.com>
Parts of this software are based on bitcore
Copyright (c) 2014 BitPay Inc.
Parts of this software are based on BitcoinJS
Copyright (c) 2011 Stefan Thomas <justmoon@members.fsf.org>

View File

@ -1,15 +1,13 @@
bitcore2
========
Full Node
=========
Bitcore 2 is a rewrite of bitcore. It is alpha quality. It will ultimately be
merged into upstream bitcore.
Our goals:
Full Node is a javascript implementation of bitcoin, forked from bitcore,
intended to satisfy certain goals:
1) Support ease-of-use by being internally consistent. It should not be
necessary to read the source code of a class or function to know how to use it.
I.e., where in old bitcore a "privkey" might be anything from a buffer to a hex
string to a key to a private key object, in bitcore 2 "privkey" is the same
I.e., where in bitcore a "privkey" might be anything from a buffer to a hex
string to a key to a private key object, in fullnode "privkey" is the same
type of object always and everywhere.
2) Have 100% test coverage so that the library is known to be reliable.
@ -23,12 +21,12 @@ formats such as transactions and blocks.
lib/. All BIPs are correctly implemented and saved as BIPxx.js in lib/ (since
that is their standard name). Any non-standard features (such as SINs and
stealth addresses) are placed in the lib/expmt/ folder and are accessible at
bitcore.expmt. Once they are standardized and given a BIP, they are renamed and
fullnode.expmt. Once they are standardized and given a BIP, they are renamed and
placed in lib/.
5) It is always possible to create a new object without using "new".
6) Compatible with browserify (i.e., using require('bitcore/lib/message')
6) Compatible with browserify (i.e., using require('fullnode/lib/message')
should work both in node, and be automatically work in the browser with used in
conjunction with browserify).

View File

@ -1,4 +1,4 @@
#!/bin/bash
browserify index.js -o browser/bitcore.js
browserify index.js -o browser/fullnode.js
ls test/*.js | xargs browserify -o browser/tests.js

View File

@ -1,56 +1,56 @@
var bitcore = module.exports;
var fullnode = module.exports;
//main bitcoin library
bitcore.Address = require('./lib/address');
bitcore.Base58 = require('./lib/base58');
bitcore.Base58Check = require('./lib/base58check');
bitcore.BIP32 = require('./lib/bip32');
bitcore.Block = require('./lib/block');
bitcore.Blockheader = require('./lib/blockheader');
bitcore.BN = require('./lib/bn');
bitcore.BufferReader = require('./lib/bufferreader');
bitcore.BufferWriter = require('./lib/bufferwriter');
bitcore.Constants = require('./lib/constants');
bitcore.ECDSA = require('./lib/ecdsa');
bitcore.Hash = require('./lib/hash');
bitcore.KDF = require('./lib/kdf');
bitcore.Keypair = require('./lib/keypair');
bitcore.Message = require('./lib/message');
bitcore.Opcode = require('./lib/opcode');
bitcore.Point = require('./lib/point');
bitcore.Privkey = require('./lib/privkey');
bitcore.Pubkey = require('./lib/pubkey');
bitcore.Random = require('./lib/random');
bitcore.Script = require('./lib/script');
bitcore.Signature = require('./lib/signature');
bitcore.Transaction = require('./lib/transaction');
bitcore.Txin = require('./lib/txin');
bitcore.Txout = require('./lib/txout');
bitcore.Varint = require('./lib/varint');
fullnode.Address = require('./lib/address');
fullnode.Base58 = require('./lib/base58');
fullnode.Base58Check = require('./lib/base58check');
fullnode.BIP32 = require('./lib/bip32');
fullnode.Block = require('./lib/block');
fullnode.Blockheader = require('./lib/blockheader');
fullnode.BN = require('./lib/bn');
fullnode.BufferReader = require('./lib/bufferreader');
fullnode.BufferWriter = require('./lib/bufferwriter');
fullnode.Constants = require('./lib/constants');
fullnode.ECDSA = require('./lib/ecdsa');
fullnode.Hash = require('./lib/hash');
fullnode.KDF = require('./lib/kdf');
fullnode.Keypair = require('./lib/keypair');
fullnode.Message = require('./lib/message');
fullnode.Opcode = require('./lib/opcode');
fullnode.Point = require('./lib/point');
fullnode.Privkey = require('./lib/privkey');
fullnode.Pubkey = require('./lib/pubkey');
fullnode.Random = require('./lib/random');
fullnode.Script = require('./lib/script');
fullnode.Signature = require('./lib/signature');
fullnode.Transaction = require('./lib/transaction');
fullnode.Txin = require('./lib/txin');
fullnode.Txout = require('./lib/txout');
fullnode.Varint = require('./lib/varint');
//experimental, nonstandard, or unstable features
bitcore.expmt = {};
bitcore.expmt.AES = require('./lib/expmt/aes');
bitcore.expmt.AESCBC = require('./lib/expmt/aescbc');
bitcore.expmt.CBC = require('./lib/expmt/cbc');
bitcore.expmt.ECIES = require('./lib/expmt/ecies');
bitcore.expmt.StealthAddress = require('./lib/expmt/stealthaddress');
bitcore.expmt.Stealthkey = require('./lib/expmt/stealthkey');
bitcore.expmt.StealthMessage = require('./lib/expmt/stealthmessage');
bitcore.expmt.StealthTx = require('./lib/expmt/stealthtx');
fullnode.expmt = {};
fullnode.expmt.AES = require('./lib/expmt/aes');
fullnode.expmt.AESCBC = require('./lib/expmt/aescbc');
fullnode.expmt.CBC = require('./lib/expmt/cbc');
fullnode.expmt.ECIES = require('./lib/expmt/ecies');
fullnode.expmt.StealthAddress = require('./lib/expmt/stealthaddress');
fullnode.expmt.Stealthkey = require('./lib/expmt/stealthkey');
fullnode.expmt.StealthMessage = require('./lib/expmt/stealthmessage');
fullnode.expmt.StealthTx = require('./lib/expmt/stealthtx');
//dependencies, subject to change
bitcore.deps = {};
bitcore.deps.aes = require('aes');
bitcore.deps.bnjs = require('bn.js');
bitcore.deps.bs58 = require('bs58');
bitcore.deps.Buffer = Buffer;
bitcore.deps.elliptic = require('elliptic');
bitcore.deps.hashjs = require('hash.js');
bitcore.deps.sha512 = require('sha512');
fullnode.deps = {};
fullnode.deps.aes = require('aes');
fullnode.deps.bnjs = require('bn.js');
fullnode.deps.bs58 = require('bs58');
fullnode.deps.Buffer = Buffer;
fullnode.deps.elliptic = require('elliptic');
fullnode.deps.hashjs = require('hash.js');
fullnode.deps.sha512 = require('sha512');
//bitcore.scriptexec = require('lib/scriptexec');
//bitcore.tx = require('lib/tx');
//bitcore.txpartial = require('lib/txpartial');
//fullnode.scriptexec = require('lib/scriptexec');
//fullnode.tx = require('lib/tx');
//fullnode.txpartial = require('lib/txpartial');
//bitcore.bip70 = require('lib/bip70');
//fullnode.bip70 = require('lib/bip70');

View File

@ -1,7 +1,8 @@
{
"name": "bitcore2",
"name": "fullnode",
"version": "0.0.0",
"description": "Bitcoin library.",
"description": "Bitcoin library, CLI and API.",
"author": "Ryan X. Charles <ryanxcharles@gmail.com>",
"main": "index.js",
"scripts": {
"test": "mocha"
@ -59,7 +60,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/ryanxcharles/bitcore2.git"
"url": "https://github.com/ryanxcharles/fullnode.git"
},
"dependencies": {
"aes": "=0.1.0",
@ -74,6 +75,5 @@
"mocha": "~1.21.0",
"browserify": "~5.9.1"
},
"author": "Ryan X. Charles <ryanxcharles@gmail.com>",
"license": "MIT"
}