Packages

package script

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package descriptor

Type Members

  1. sealed trait CLTVScriptPubKey extends ScriptPubKey with LockTimeScriptPubKey

    Represents a scriptPubKey that contains OP_CHECKLOCKTIMEVERIFY. Adds an absolute/defined locktime condition to any scriptPubKey.

    Represents a scriptPubKey that contains OP_CHECKLOCKTIMEVERIFY. Adds an absolute/defined locktime condition to any scriptPubKey. BIP65 Format: <locktime> OP_CLTV OP_DROP <scriptPubKey>

  2. sealed trait CLTVScriptSignature extends ScriptSignature with LockTimeScriptSignature
  3. sealed trait CSVScriptPubKey extends ScriptPubKey with LockTimeScriptPubKey

    Represents a scriptPubKey that contains OP_CHECKSEQUENCEVERIFY Adds a relative lockTime condition to any scriptPubKey.

    Represents a scriptPubKey that contains OP_CHECKSEQUENCEVERIFY Adds a relative lockTime condition to any scriptPubKey. BIP112 Format: <locktime> OP_CSV OP_DROP <scriptPubKey>

  4. sealed trait CSVScriptSignature extends ScriptSignature with LockTimeScriptSignature
  5. sealed trait ConditionalScriptPubKey extends ScriptPubKey with RawScriptPubKey

    Currently only supports a single OP_IF ...

    Currently only supports a single OP_IF ... OP_ELSE ... OP_ENDIF ScriptPubKey

  6. sealed trait ConditionalScriptSignature extends ScriptSignature

    ScriptSignature for both OP_IF and OP_NOTIF ScriptPubKeys

  7. sealed abstract class ControlBlock extends NetworkElement

    Control block as defined by BIP341

    Control block as defined by BIP341

    The last stack element is called the control block c, and must have length 33 + 32m, for a value of m that is an integer between 0 and 128[6], inclusive. Fail if it does not have such a length.

    See also

    https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#script-validation-rules

  8. sealed trait IfConditionalScriptPubKey extends ScriptPubKey with ConditionalScriptPubKey
  9. sealed trait LockTimeScriptPubKey extends ScriptPubKey with RawScriptPubKey
  10. sealed trait LockTimeScriptSignature extends ScriptSignature

    Parent type for all lock time script signatures, these spend LockTimeScriptPubKey

  11. sealed trait MultiSignatureScriptPubKey extends ScriptPubKey with RawScriptPubKey

    Represents a multisignature script public key https://bitcoin.org/en/developer-guide#multisig Format: <m> <A pubkey> [B pubkey] [C pubkey...] <n> OP_CHECKMULTISIG

  12. sealed trait MultiSignatureScriptSignature extends ScriptSignature

    Represents a multisignature script signature https://bitcoin.org/en/developer-guide#multisig Multisig script sigs have the following format OP_0 <A sig> [B sig] [C sig...]

  13. sealed trait MultiSignatureWithTimeoutScriptPubKey extends ScriptPubKey with IfConditionalScriptPubKey
  14. sealed trait NonStandardScriptPubKey extends ScriptPubKey with RawScriptPubKey
  15. sealed trait NonStandardScriptSignature extends ScriptSignature
  16. sealed trait NonWitnessScriptPubKey extends ScriptPubKey

    Trait for all Non-SegWit ScriptPubKeys

  17. sealed trait NotIfConditionalScriptPubKey extends ScriptPubKey with ConditionalScriptPubKey
  18. sealed trait P2PKHScriptPubKey extends ScriptPubKey with RawScriptPubKey

    Represents a pay-to-pubkey hash script pubkey

    Represents a pay-to-pubkey hash script pubkey

    Format: OP_DUP OP_HASH160 <PubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

  19. sealed trait P2PKHScriptSignature extends ScriptSignature

    P2PKH script signatures have only one public key https://bitcoin.org/en/developer-guide#pay-to-public-key-hash-p2pkh P2PKH scriptSigs follow this format <sig> <pubkey>

  20. sealed trait P2PKScriptPubKey extends ScriptPubKey with RawScriptPubKey

    Represents a pay to public key script public key Format: <pubkey> OP_CHECKSIG

  21. sealed trait P2PKScriptSignature extends ScriptSignature

    Represents a pay to public key script signature https://bitcoin.org/en/developer-guide#pubkey Signature script: <sig>

  22. sealed trait P2PKWithTimeoutScriptPubKey extends ScriptPubKey with RawScriptPubKey

    The type for ScriptPubKeys of the form: OP_IF <Public Key> OP_ELSE <Timeout> OP_CHECKSEQUENCEVERIFY OP_DROP <Timeout Public Key> OP_ENDIF OP_CHECKSIG

  23. sealed trait P2SHScriptPubKey extends ScriptPubKey with NonWitnessScriptPubKey

    Represents a pay-to-scripthash public key Format: OP_HASH160 <Hash160(redeemScript)> OP_EQUAL

  24. sealed trait P2SHScriptSignature extends ScriptSignature

    Represents a pay-to-script-hash script signature https://bitcoin.org/en/developer-guide#pay-to-script-hash-p2sh P2SH scriptSigs have the following format <sig> [sig] [sig...] <redeemScript>

  25. sealed abstract class P2WPKHWitnessSPKV0 extends WitnessScriptPubKeyV0

    Represents the pay-to-witness-pubkeyhash script pubkey type as defined in BIP141

  26. sealed abstract class P2WPKHWitnessV0 extends ScriptWitnessV0

    Represents a org.bitcoins.core.protocol.script.ScriptWitness that is needed to spend a P2WPKHWitnessV0 scriptPubKey https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#p2wpkh-nested-in-bip16-p2sh Format: <pubKey> <signature>

  27. sealed abstract class P2WSHWitnessSPKV0 extends WitnessScriptPubKeyV0

    Reprents the pay-to-witness-scripthash script pubkey type as defined in BIP141

  28. sealed abstract class P2WSHWitnessV0 extends ScriptWitnessV0

    Represents a ScriptWitness that is needed to spend a P2WSHWitnessV0 scriptPubKey https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#p2wsh Format: <redeem script> <scriptSig data1> <scriptSig data2> ...

    Represents a ScriptWitness that is needed to spend a P2WSHWitnessV0 scriptPubKey https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#p2wsh Format: <redeem script> <scriptSig data1> <scriptSig data2> ... <scriptSig dataN>

  29. sealed trait RawScriptPubKey extends ScriptPubKey with NonWitnessScriptPubKey

    Trait for all raw, non-nested ScriptPubKeys (no P2SH)

    Trait for all raw, non-nested ScriptPubKeys (no P2SH)

    Note that all WitnessScriptPubKeys including P2WPKH are not considered to be non-nested and hence not RawScriptPubKeys.

  30. abstract class Script extends NetworkElement

    This is meant to be a super type for scripts in the bitcoin protocol.

    This is meant to be a super type for scripts in the bitcoin protocol. This gives us access to the asm representation, and how to serialize the script

  31. trait ScriptFactory[T <: Script] extends Factory[T]

    Created by chris on 12/9/16.

  32. sealed abstract class ScriptPubKey extends Script

    Created by chris on 12/26/15.

  33. sealed trait ScriptPubKeyUpdateIndicator extends AnyRef

    Created by chris on 1/19/16.

  34. sealed abstract class ScriptSignature extends Script

    Created by chris on 12/26/15.

    Created by chris on 12/26/15.

    We only give standard types to ScriptSignatures that are Policy compliant. This is because if we wanted to be closer to Consensus compliant then it would be near impossible to type things.

    For example almost anything could be a ConditionalScriptSignature since in consensus logic almost any ScriptToken is interpreted as True, while under Policy only OP_TRUE is True.

  35. sealed abstract class ScriptWitness extends NetworkElement

    Created by chris on 11/10/16.

  36. sealed abstract class ScriptWitnessV0 extends ScriptWitness
  37. sealed trait SigVersionTaproot extends SignatureVersion
  38. sealed trait SignatureVersion extends AnyRef

    Represents the transaction digest algorithm for signature verification in Bitcoin Core With the implementation of segwit, we have added different algorithm, the first alternative being BIP143 https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki https://github.com/bitcoin/bitcoin/blob/53133c1c041d113c2a480a18e6ff38681d135dca/src/script/interpreter.h#L120-L124

  39. case class TapBranch(tree1: TapscriptTree, tree2: TapscriptTree) extends TapscriptTree with Product with Serializable
  40. case class TapLeaf(leafVersion: Byte, spk: ScriptPubKey) extends TapscriptTree with Product with Serializable
  41. case class TaprootKeyPath(signature: SchnorrDigitalSignature, hashTypeOpt: Option[HashType], annexOpt: Option[ByteVector]) extends ScriptWitness with TaprootWitness with Product with Serializable

    Spending a taproot output via the key path spend

  42. case class TaprootScriptPath(stack: Vector[ByteVector]) extends ScriptWitness with TaprootWitness with Product with Serializable

    Spending a taproot output via the script path

  43. case class TaprootScriptPubKey(asm: Vector[ScriptToken]) extends ScriptPubKey with WitnessScriptPubKey with Product with Serializable
  44. case class TaprootUnknownPath(stack: Vector[ByteVector]) extends ScriptWitness with TaprootWitness with Product with Serializable
  45. sealed trait TaprootWitness extends ScriptWitness
  46. case class TapscriptControlBlock(bytes: ByteVector) extends ControlBlock with Product with Serializable
  47. sealed abstract class TapscriptTree extends NetworkElement
  48. case class UnassignedWitness(version: ScriptNumberOperation) extends WitnessVersion with Product with Serializable

    The witness version that represents all witnesses that have not been allocated yet

  49. sealed trait UnassignedWitnessScriptPubKey extends ScriptPubKey with WitnessScriptPubKey

    Type to represent all WitnessScriptPubKeys we have not used yet in the bitcoin protocol

  50. case class UnknownControlBlock(bytes: ByteVector) extends ControlBlock with Product with Serializable

    A control block that does not have a leaf version defined as per BIP342 This is needed for future soft fork compatability where we introduce new leaf versions to correspond to new spending rules

  51. case class UpdateScriptPubKeyAsm(asm: Seq[ScriptToken]) extends ScriptPubKeyUpdateIndicator with Product with Serializable
  52. case class UpdateScriptPubKeyBytes(bytes: ByteVector) extends ScriptPubKeyUpdateIndicator with Product with Serializable
  53. sealed trait WitnessCommitment extends ScriptPubKey with RawScriptPubKey

    This trait represents the witness commitment found in the coinbase transaction This is needed to commit to the wtxids of all of the witness transactions, since the merkle tree does not commit to the witnesses for all WitnessTransaction See BIP141 for more info https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure

  54. sealed trait WitnessScriptPubKey extends ScriptPubKey

    This type represents a ScriptPubKey to evaluate a ScriptWitness

  55. sealed abstract class WitnessScriptPubKeyV0 extends ScriptPubKey with WitnessScriptPubKey

    Represents a BIP141 Witness program

  56. sealed trait WitnessVersion extends AnyRef

    Created by chris on 11/10/16.

    Created by chris on 11/10/16. The version of the WitnessScriptPubKey, this indicates how a ScriptWitness is rebuilt. BIP141

Value Members

  1. object CLTVScriptPubKey extends Factory[CLTVScriptPubKey] with ScriptFactory[CLTVScriptPubKey]
  2. object CLTVScriptSignature extends Factory[CLTVScriptSignature] with ScriptFactory[CLTVScriptSignature]

    Note that extend org.bitcoins.core.protocol.script.ScriptFactory here but technically ANYTHING can be a CLTVScriptSignature since the CLTVScriptPubKey does not manipulate the stack

  3. object CSVScriptPubKey extends Factory[CSVScriptPubKey] with ScriptFactory[CSVScriptPubKey]
  4. object CSVScriptSignature extends Factory[CSVScriptSignature] with ScriptFactory[CSVScriptSignature]
  5. object ConditionalScriptPubKey
  6. object ConditionalScriptSignature extends Factory[ConditionalScriptSignature] with ScriptFactory[ConditionalScriptSignature]
  7. object ControlBlock extends Factory[ControlBlock]
  8. case object EmptyScriptPubKey extends ScriptPubKey with RawScriptPubKey with Product with Serializable

    Represents the empty ScriptPubKey

  9. case object EmptyScriptSignature extends ScriptSignature with Product with Serializable

    Represents the empty script signature

  10. case object EmptyScriptWitness extends ScriptWitness with Product with Serializable
  11. object LockTimeScriptPubKey extends Factory[LockTimeScriptPubKey] with ScriptFactory[LockTimeScriptPubKey]
  12. object MultiSignatureScriptPubKey extends Factory[MultiSignatureScriptPubKey] with ScriptFactory[MultiSignatureScriptPubKey]
  13. object MultiSignatureScriptSignature extends Factory[MultiSignatureScriptSignature] with ScriptFactory[MultiSignatureScriptSignature]
  14. object MultiSignatureWithTimeoutScriptPubKey extends Factory[MultiSignatureWithTimeoutScriptPubKey] with ScriptFactory[MultiSignatureWithTimeoutScriptPubKey]
  15. object NonStandardIfConditionalScriptPubKey extends Factory[IfConditionalScriptPubKey] with ScriptFactory[IfConditionalScriptPubKey]
  16. object NonStandardNotIfConditionalScriptPubKey extends Factory[NotIfConditionalScriptPubKey] with ScriptFactory[NotIfConditionalScriptPubKey]
  17. object NonStandardScriptPubKey extends Factory[NonStandardScriptPubKey] with ScriptFactory[NonStandardScriptPubKey]
  18. object NonStandardScriptSignature extends Factory[NonStandardScriptSignature] with ScriptFactory[NonStandardScriptSignature]
  19. object NonWitnessScriptPubKey extends Factory[NonWitnessScriptPubKey] with ScriptFactory[NonWitnessScriptPubKey]
  20. object P2PKHScriptPubKey extends Factory[P2PKHScriptPubKey] with ScriptFactory[P2PKHScriptPubKey]
  21. object P2PKHScriptSignature extends Factory[P2PKHScriptSignature] with ScriptFactory[P2PKHScriptSignature]
  22. object P2PKScriptPubKey extends Factory[P2PKScriptPubKey] with ScriptFactory[P2PKScriptPubKey]
  23. object P2PKScriptSignature extends Factory[P2PKScriptSignature] with ScriptFactory[P2PKScriptSignature]
  24. object P2PKWithTimeoutScriptPubKey extends Factory[P2PKWithTimeoutScriptPubKey] with ScriptFactory[P2PKWithTimeoutScriptPubKey]
  25. object P2PKWithTimeoutScriptSignature extends Factory[ConditionalScriptSignature] with ScriptFactory[ConditionalScriptSignature]
  26. object P2SHScriptPubKey extends Factory[P2SHScriptPubKey] with ScriptFactory[P2SHScriptPubKey]
  27. object P2SHScriptSignature extends Factory[P2SHScriptSignature] with ScriptFactory[P2SHScriptSignature]
  28. object P2WPKHWitnessSPKV0 extends Factory[P2WPKHWitnessSPKV0] with ScriptFactory[P2WPKHWitnessSPKV0]
  29. object P2WPKHWitnessV0
  30. object P2WSHWitnessSPKV0 extends Factory[P2WSHWitnessSPKV0] with ScriptFactory[P2WSHWitnessSPKV0]
  31. object P2WSHWitnessV0
  32. object RawScriptPubKey extends Factory[RawScriptPubKey] with ScriptFactory[RawScriptPubKey]
  33. object ScriptPubKey extends Factory[ScriptPubKey] with ScriptFactory[ScriptPubKey]

    Factory companion object used to create ScriptPubKey objects

  34. object ScriptSignature extends Factory[ScriptSignature] with ScriptFactory[ScriptSignature]
  35. object ScriptWitness extends Factory[ScriptWitness]
  36. case object SigVersionBase extends SignatureVersion with Product with Serializable

    The original digest algorithm created by Satoshi

  37. case object SigVersionTaprootKeySpend extends SigVersionTaproot with Product with Serializable

    For keypath spends

    For keypath spends

    See also

    https://github.com/bitcoin/bitcoin/blob/e826b22da252e0599c61d21c98ff89f366b3120f/src/script/interpreter.h#L191

  38. case object SigVersionTapscript extends SigVersionTaproot with Product with Serializable

    For script path spends

    For script path spends

    See also

    https://github.com/bitcoin/bitcoin/blob/e826b22da252e0599c61d21c98ff89f366b3120f/src/script/interpreter.h#L192

  39. case object SigVersionWitnessV0 extends SignatureVersion with Product with Serializable

    The digest algorithm implemented by BIP143 https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki

  40. object TapLeaf extends Serializable
  41. object TaprootKeyPath extends Factory[TaprootKeyPath] with Serializable
  42. object TaprootScriptPath extends Factory[TaprootScriptPath] with Serializable
  43. object TaprootScriptPubKey extends Factory[TaprootScriptPubKey] with ScriptFactory[TaprootScriptPubKey] with Serializable
  44. object TaprootWitness extends Factory[TaprootWitness]
  45. object TapscriptControlBlock extends Factory[TapscriptControlBlock] with Serializable
  46. object TapscriptTree
  47. case object TrivialTrueScriptSignature extends ScriptSignature with Product with Serializable

    A script signature to be used in tests for signing EmptyScriptPubKey.

    A script signature to be used in tests for signing EmptyScriptPubKey. This script pushes a true onto the stack, causing a successful spend.

  48. object UnassignedWitnessScriptPubKey extends Factory[UnassignedWitnessScriptPubKey] with ScriptFactory[UnassignedWitnessScriptPubKey]
  49. object UnknownControlBlock extends Factory[UnknownControlBlock] with Serializable
  50. object WitnessCommitment extends Factory[WitnessCommitment] with ScriptFactory[WitnessCommitment]
  51. object WitnessScriptPubKey extends Factory[WitnessScriptPubKey] with ScriptFactory[WitnessScriptPubKey]
  52. object WitnessScriptPubKeyV0 extends Factory[WitnessScriptPubKeyV0] with ScriptFactory[WitnessScriptPubKeyV0]
  53. object WitnessVersion
  54. case object WitnessVersion0 extends WitnessVersion with Product with Serializable
  55. case object WitnessVersion1 extends WitnessVersion with Product with Serializable

Ungrouped