Skip to content

Commit

Permalink
add references in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fluency03 committed May 9, 2018
1 parent 23089af commit 46be579
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ POST /generic/time-from-epoch



## References

- [Bitcoin White Paper](https://bitcoin.org/bitcoin.pdf)
- [bitcoin.org](https://bitcoin.org/en/)
- [Mastering Bitcoin: Unlocking Digital Crypto-Currencies, Andreas M. Antonopoulos](https://bitcoinbook.info/)


## Todos

- Complete APIs' Todos
Expand Down
6 changes: 5 additions & 1 deletion src/main/scala/com/github/fluency03/blockchain/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ package object blockchain {

type Bytes = Array[Byte]
type UTXO = (TxIn, TxOut)
type Hex = String
type Binary = String
type Base64 = String
type Base58 = String

implicit val formats: AnyRef with Formats = Serialization.formats(NoTypeHints)

Expand All @@ -40,7 +44,7 @@ package object blockchain {
implicit class StringImplicit(val str: String) {
def hex2Long: Long = java.lang.Long.parseLong(str, 16)
def hex2BigInt: BigInt = BigInt(str, 16)
def hex2Bytes: Array[Byte] = Hex.decode(str)
def hex2Bytes: Bytes = Hex.decode(str)
def hex2Binary: String = binaryOfHex(str)
def toBase64: String = base64Of(str.getBytes)
def toSha256: String = SHA256.hash(str)
Expand Down

0 comments on commit 46be579

Please sign in to comment.