Skip to content

A Simple, Powerful, Modular Library for Bitcoin Blockchain As a Service(BAAS)

License

Notifications You must be signed in to change notification settings

keyfuse/tokucore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tokucore – A Simple, Powerful Library for Bitcoin Apps.

Build Status GolangCI Go Report Card codecov.io BSD License

tokucore

tokucore is a simple Go (golang) library for creating and manipulating bitcoin data structures like creating keys and addresses (HD/BIP32/BIP39/SegWit) or parsing, creating and signing transactions.

Overview

  • Base58 encoding/decoding
  • Block headers, block and transaction parsing
  • Transaction creation, signature and verification
  • Script parsing and execution
  • BIP 32 (deterministic wallets)
  • BIP 39 (mnemonic code for generating deterministic keys)
  • BIP 173 (Base32 address format for native v0-16 witness outputs)
  • Two-Party ECDSA Threshold Signature Scheme (TSS)
  • Mult-Party Schnorr Threshold Signature Scheme (TSS)
  • Scriptless Adaptor Signature

Focus

  • Simple and easy to use
  • No external dependencies
  • Full test coverage

Tests

$ export GOPATH=`pwd`
$ go get -u github.com/keyfuse/tokucore/xcore
$ cd src/github.com/keyfuse/tokucore/
$ make test

Examples

Performance

The performance was done on an Intel i5 (2.50GHz) with golang benchmark.

Implementation
2P-ECDSA KeyGen 2.13 ms
2P-ECDSA Signing 426.05 ms
2P-Schnorr KeyGen 0.01 ms
2P-Schnorr Signing 4.31 ms
$ go test -bench=BenchmarkMpc*  ./xcrypto

goos: linux
goarch: amd64
pkg: github.com/keyfuse/tokucore/xcrypto
BenchmarkMpcEcdsaKeyGen-4      	    1000	   2133566 ns/op
BenchmarkMpcEcdsaSigning-4     	       3	 426058258 ns/op
BenchmarkMpcSchnorrKeyGen-4    	  100000	     11310 ns/op
BenchmarkMpcSchnorrSigning-4   	     300	   4315631 ns/op

Can I trust this code?

Don't trust. Verify.

License

tokucore is released under the BSD License.