mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-20 02:11:40 +01:00
Adding ScriptSignature, ScriptPubKey
This commit is contained in:
parent
8f1cf4295d
commit
37cc7e4b50
@ -0,0 +1,16 @@
|
||||
package org.scalacoin.protocol.script
|
||||
|
||||
import org.scalacoin.protocol.BitcoinAddress
|
||||
|
||||
/**
|
||||
* Created by chris on 12/26/15.
|
||||
*/
|
||||
trait ScriptPubKey extends ScriptSignature {
|
||||
|
||||
def reqSigs : Int
|
||||
def addressType : String
|
||||
def addresses : Seq[BitcoinAddress]
|
||||
|
||||
}
|
||||
|
||||
case class ScriptPubKeyImpl(reqSigs : Int, addressType : String, addresses : Seq[BitcoinAddress])
|
@ -0,0 +1,11 @@
|
||||
package org.scalacoin.protocol.script
|
||||
|
||||
/**
|
||||
* Created by chris on 12/26/15.
|
||||
*/
|
||||
trait ScriptSignature {
|
||||
def asm : String
|
||||
def hex : String
|
||||
}
|
||||
|
||||
case class ScriptSignatureImpl(asm : String, hex : String) extends ScriptSignature
|
@ -1,16 +1,16 @@
|
||||
package org.scalacoin.protocol.transaction
|
||||
|
||||
import org.scalacoin.protocol.VarInt
|
||||
import org.scalacoin.protocol.script.ScriptSignature
|
||||
|
||||
/**
|
||||
* Created by chris on 12/26/15.
|
||||
*/
|
||||
trait TransactionInput {
|
||||
def previousOutput : TransactionOutPoint
|
||||
def scriptLength : VarInt
|
||||
def scriptSignature : Seq[Char]
|
||||
def scriptSignature : ScriptSignature
|
||||
def sequence : Long
|
||||
}
|
||||
|
||||
case class TransactionInputImpl(previousOutput : TransactionOutPoint, scriptLength : VarInt,
|
||||
scriptSignature : Seq[Char], sequence : Long) extends TransactionInput
|
||||
case class TransactionInputImpl(previousOutput : TransactionOutPoint,
|
||||
scriptSignature : Seq[String], sequence : Long) extends TransactionInput
|
||||
|
@ -4,8 +4,8 @@ package org.scalacoin.protocol.transaction
|
||||
* Created by chris on 12/26/15.
|
||||
*/
|
||||
trait TransactionOutPoint {
|
||||
def hash : Seq[Char]
|
||||
def hash : Seq[String]
|
||||
def index : Long
|
||||
}
|
||||
|
||||
case class TransactionOutPointImpl(hash : Seq[Char], index : Long) extends TransactionOutPoint
|
||||
case class TransactionOutPointImpl(hash : Seq[String], index : Long) extends TransactionOutPoint
|
@ -1,6 +1,6 @@
|
||||
package org.scalacoin.protocol.transaction
|
||||
|
||||
import org.scalacoin.currency.Satoshis
|
||||
import org.scalacoin.currency.{CurrencyUnit, Satoshis}
|
||||
import org.scalacoin.protocol.VarInt
|
||||
|
||||
/**
|
||||
@ -8,11 +8,11 @@ import org.scalacoin.protocol.VarInt
|
||||
*/
|
||||
trait TransactionOutput {
|
||||
|
||||
def value : Satoshis
|
||||
def value : CurrencyUnit
|
||||
def pkScriptLength : VarInt
|
||||
def pkScript : Seq[Char]
|
||||
def pkScript : Seq[String]
|
||||
|
||||
}
|
||||
|
||||
|
||||
case class TransactionOutputImpl(value : Satoshis, pkScriptLength : VarInt, pkScript : Seq[Char]) extends TransactionOutput
|
||||
case class TransactionOutputImpl(value : Satoshis, pkScriptLength : VarInt, pkScript : Seq[String]) extends TransactionOutput
|
Loading…
Reference in New Issue
Block a user