Skip to content

Commit

Permalink
package move com.fluency03 -> com.github.fluency03
Browse files Browse the repository at this point in the history
  • Loading branch information
fluency03 committed May 4, 2018
1 parent 7469002 commit 7bcab2f
Show file tree
Hide file tree
Showing 54 changed files with 143 additions and 141 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This project is meant to learn and understand Bitcoin and Blockchain. I personal
Start the service, run this Class:

```
com.fluency03.blockchain.api.Server
com.github.fluency03.blockchain.api.Server
```

## REST APIs
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resolvers ++= Seq(
"Artima Maven Repository" at "http://repo.artima.com/releases"
)

organization := "com.fluency03"
organization := "com.github.fluency03"

name := "blockchain-in-scala"

Expand Down Expand Up @@ -45,4 +45,4 @@ libraryDependencies ++= {
} ++ httpDependencies ++ testDependencies


mainClass in assembly := Some("com.fluency03.blockchain.api.Server")
mainClass in assembly := Some("com.github.fluency03.blockchain.api.Server")
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ addSbtPlugin("com.artima.supersafe" %% "sbtplugin" % "1.1.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.4")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain

import java.math.BigInteger
import java.security._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api
package com.github.fluency03.blockchain.api

import de.heikoseeberger.akkahttpjson4s.Json4sSupport
import org.json4s.native.Serialization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api
package com.github.fluency03.blockchain.api

final case class Input(content: String)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api
package com.github.fluency03.blockchain.api

import akka.actor.{ActorRef, ActorSystem}
import akka.event.Logging
Expand All @@ -7,8 +7,8 @@ import akka.http.scaladsl.Http.ServerBinding
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import akka.stream.ActorMaterializer
import com.fluency03.blockchain.api.actors._
import com.fluency03.blockchain.api.routes._
import com.github.fluency03.blockchain.api.actors._
import com.github.fluency03.blockchain.api.routes._
import com.typesafe.config.ConfigFactory

import scala.concurrent.{Await, ExecutionContextExecutor, Future}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api.actors
package com.github.fluency03.blockchain.api.actors

import akka.actor.{Actor, ActorLogging}
import akka.util.Timeout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.fluency03.blockchain.api.actors
package com.github.fluency03.blockchain.api.actors

import akka.actor.{ActorSelection, Props}
import com.fluency03.blockchain.api.actors.BlockPoolActor._
import com.fluency03.blockchain.api._
import com.fluency03.blockchain.core.Block
import com.github.fluency03.blockchain.api.actors.BlockPoolActor._
import com.github.fluency03.blockchain.api._
import com.github.fluency03.blockchain.core.Block

import scala.collection.mutable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fluency03.blockchain.api.actors
package com.github.fluency03.blockchain.api.actors

import akka.actor.{ActorRef, ActorSelection, Props}
import akka.pattern.ask
import com.fluency03.blockchain.api.actors.BlockchainActor._
import com.fluency03.blockchain.api._
import com.fluency03.blockchain.core.{Block, Blockchain, Transaction}
import com.github.fluency03.blockchain.api.actors.BlockchainActor._
import com.github.fluency03.blockchain.api._
import com.github.fluency03.blockchain.core.{Block, Blockchain, Transaction}

import scala.collection.mutable
import scala.concurrent.Future
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.fluency03.blockchain.api.actors
package com.github.fluency03.blockchain.api.actors

import akka.actor.{ActorSelection, Props}
import akka.pattern.{ask, pipe}
import com.fluency03.blockchain.api._
import com.fluency03.blockchain.api.actors.NetworkActor._
import com.fluency03.blockchain.api.actors.PeerActor.GetPublicKeys
import com.fluency03.blockchain.core.Peer
import com.github.fluency03.blockchain.api._
import com.github.fluency03.blockchain.api.actors.NetworkActor._
import com.github.fluency03.blockchain.api.actors.PeerActor.GetPublicKeys
import com.github.fluency03.blockchain.core.Peer

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package api.actors

import java.security.KeyPair

import akka.actor.Props
import com.fluency03.blockchain.api.actors.PeerActor._
import com.fluency03.blockchain.core.{Peer, SingleWallet}
import com.github.fluency03.blockchain.api.actors.PeerActor._
import com.github.fluency03.blockchain.core.{Peer, SingleWallet}

import scala.collection.mutable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fluency03.blockchain.api.actors
package com.github.fluency03.blockchain.api.actors

import akka.actor.{ActorSelection, Props}
import com.fluency03.blockchain.api.actors.TxPoolActor._
import com.fluency03.blockchain.api._
import com.fluency03.blockchain.core.{Outpoint, Transaction, TxOut}
import com.fluency03.blockchain.core.Transaction.hashOfTransaction
import com.github.fluency03.blockchain.api.actors.TxPoolActor._
import com.github.fluency03.blockchain.api._
import com.github.fluency03.blockchain.core.{Outpoint, Transaction, TxOut}
import com.github.fluency03.blockchain.core.Transaction.hashOfTransaction

import scala.collection.mutable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain

import com.fluency03.blockchain.core.{Block, Peer, Transaction}
import com.github.fluency03.blockchain.core.{Block, Peer, Transaction}

package object api {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api.routes
package com.github.fluency03.blockchain.api.routes

import akka.actor.ActorRef
import akka.event.Logging
Expand All @@ -9,9 +9,9 @@ import akka.http.scaladsl.server.directives.PathDirectives.path
import akka.http.scaladsl.server.directives.RouteDirectives.complete
import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq
import akka.pattern.ask
import com.fluency03.blockchain.api.{Blocks, Message}
import com.fluency03.blockchain.api.actors.BlockPoolActor._
import com.fluency03.blockchain.core.{Block, Transaction}
import com.github.fluency03.blockchain.api.{Blocks, Message}
import com.github.fluency03.blockchain.api.actors.BlockPoolActor._
import com.github.fluency03.blockchain.core.{Block, Transaction}

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api.routes
package com.github.fluency03.blockchain.api.routes

import akka.actor.ActorRef
import akka.event.Logging
Expand All @@ -9,9 +9,9 @@ import akka.http.scaladsl.server.directives.MethodDirectives.{delete, get, post}
import akka.http.scaladsl.server.directives.RouteDirectives.complete
import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq
import akka.pattern.ask
import com.fluency03.blockchain.api.{FailureMsg, Input, Message}
import com.fluency03.blockchain.api.actors.BlockchainActor._
import com.fluency03.blockchain.core.{Block, Blockchain, Transaction}
import com.github.fluency03.blockchain.api.{FailureMsg, Input, Message}
import com.github.fluency03.blockchain.api.actors.BlockchainActor._
import com.github.fluency03.blockchain.core.{Block, Blockchain, Transaction}

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package api.routes

import java.time.Instant
Expand All @@ -8,7 +8,7 @@ import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import akka.http.scaladsl.server.directives.MethodDirectives.post
import akka.http.scaladsl.server.directives.RouteDirectives.complete
import com.fluency03.blockchain.api.{Input, SuccessMsg}
import com.github.fluency03.blockchain.api.{Input, SuccessMsg}

trait GenericRoutes extends RoutesSupport {
lazy val log = Logging(system, classOf[GenericRoutes])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api.routes
package com.github.fluency03.blockchain.api.routes

import akka.actor.ActorRef
import akka.event.Logging
Expand All @@ -9,9 +9,9 @@ import akka.http.scaladsl.server.directives.PathDirectives.path
import akka.http.scaladsl.server.directives.RouteDirectives.complete
import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq
import akka.pattern.ask
import com.fluency03.blockchain.api.Message
import com.fluency03.blockchain.api.actors.NetworkActor._
import com.fluency03.blockchain.core.{Peer, PeerSimple}
import com.github.fluency03.blockchain.api.Message
import com.github.fluency03.blockchain.api.actors.NetworkActor._
import com.github.fluency03.blockchain.core.{Peer, PeerSimple}

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.fluency03.blockchain.api.routes
package com.github.fluency03.blockchain.api.routes

import akka.actor.ActorSystem
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.server.{RequestContext, StandardRoute}
import akka.http.scaladsl.server.directives.RouteDirectives.complete
import akka.util.Timeout
import com.fluency03.blockchain.api.{FailureMsg, JsonSupport, Message, SuccessMsg}
import com.github.fluency03.blockchain.api.{FailureMsg, JsonSupport, Message, SuccessMsg}

import scala.concurrent.Future
import scala.concurrent.duration._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api.routes
package com.github.fluency03.blockchain.api.routes

import akka.actor.ActorRef
import akka.event.Logging
Expand All @@ -10,9 +10,9 @@ import akka.http.scaladsl.server.directives.PathDirectives.path
import akka.http.scaladsl.server.directives.RouteDirectives.complete
import akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.CsvSeq
import akka.pattern.ask
import com.fluency03.blockchain.api.actors.TxPoolActor._
import com.fluency03.blockchain.api.{FailureMsg, Message, Transactions}
import com.fluency03.blockchain.core.Transaction
import com.github.fluency03.blockchain.api.actors.TxPoolActor._
import com.github.fluency03.blockchain.api.{FailureMsg, Message, Transactions}
import com.github.fluency03.blockchain.core.Transaction

import scala.concurrent.Future

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api
package com.github.fluency03.blockchain.api

import akka.http.scaladsl.model.{StatusCode, StatusCodes}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

import com.fluency03.blockchain.core.Block.allTransValidOf
import com.fluency03.blockchain.core.BlockHeader.hashOfHeaderFields
import com.fluency03.blockchain.core.Transaction.{createCoinbaseTx, validateCoinbaseTx, noDuplicateTxInOf}
import com.github.fluency03.blockchain.core.Block.allTransValidOf
import com.github.fluency03.blockchain.core.BlockHeader.hashOfHeaderFields
import com.github.fluency03.blockchain.core.Transaction.{createCoinbaseTx, validateCoinbaseTx, noDuplicateTxInOf}
import org.json4s.native.JsonMethods.{compact, render}
import org.json4s.{Extraction, JValue}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

import com.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader
import com.github.fluency03.blockchain.core.BlockHeader.hashOfBlockHeader
import org.json4s.native.JsonMethods.{compact, render}
import org.json4s.{Extraction, JValue}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

import com.fluency03.blockchain.core.Block.validLinkBetween
import com.fluency03.blockchain.core.Blockchain._
import com.github.fluency03.blockchain.core.Block.validLinkBetween
import com.github.fluency03.blockchain.core.Blockchain._
import org.json4s.native.JsonMethods.{compact, render}
import org.json4s.{Extraction, JValue}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

object Difficulty {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

import scala.annotation.tailrec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.core
package com.github.fluency03.blockchain.core

case class PeerSimple(name: String)
case class Peer(name: String, publicKeys: Set[String])
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

import java.security.KeyPair

import com.fluency03.blockchain.core.SingleWallet.balanceOfWallet
import com.fluency03.blockchain.core.Transaction.signTxIn
import com.github.fluency03.blockchain.core.SingleWallet.balanceOfWallet
import com.github.fluency03.blockchain.core.Transaction.signTxIn

import scala.collection.mutable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain
package core

import java.security.KeyPair

import com.fluency03.blockchain.Crypto.recoverPublicKey
import com.fluency03.blockchain.core.Transaction.{hashOfTransaction, validateTransaction}
import com.github.fluency03.blockchain.Crypto.recoverPublicKey
import com.github.fluency03.blockchain.core.Transaction.{hashOfTransaction, validateTransaction}
import org.json4s.native.JsonMethods.{compact, render}
import org.json4s.{Extraction, JValue}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.fluency03
package com.github.fluency03

import java.nio.charset.Charset
import java.security.{MessageDigest, PrivateKey, PublicKey}
import java.time.Instant

import com.fluency03.blockchain.Crypto.{privateKeyToHex, publicKeyToHex}
import com.fluency03.blockchain.core.{Peer, PeerSimple, TxIn, TxOut}
import com.github.fluency03.blockchain.Crypto.{privateKeyToHex, publicKeyToHex}
import com.github.fluency03.blockchain.core.{Peer, PeerSimple, TxIn, TxOut}
import org.bouncycastle.util.encoders.{Base64, Hex}
import org.json4s.native.Serialization
import org.json4s.{Formats, NoTypeHints}
Expand Down
5 changes: 0 additions & 5 deletions src/test/scala/com/fluency03/blockchain/api/ServerTest.scala

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain

import com.fluency03.blockchain.Crypto._
import com.github.fluency03.blockchain.Crypto._

import java.security.KeyPair

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain
package com.github.fluency03.blockchain

import java.time.format.DateTimeParseException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fluency03.blockchain.api
package com.github.fluency03.blockchain.api

import org.scalatest.{FlatSpec, Matchers}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.github.fluency03.blockchain.api

class ServerTest {

}
Loading

0 comments on commit 7bcab2f

Please sign in to comment.