object BitcoinScriptUtil extends BitcoinScriptUtil

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BitcoinScriptUtil
  2. BitcoinScriptUtil
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asmToBytes(asm: Seq[ScriptToken]): ByteVector

    Converts a sequence of script tokens to them to their byte values

    Converts a sequence of script tokens to them to their byte values

    Definition Classes
    BitcoinScriptUtil
  6. def asmToHex(asm: Seq[ScriptToken]): String

    Takes in a sequence of script tokens and converts them to their hexadecimal value

    Takes in a sequence of script tokens and converts them to their hexadecimal value

    Definition Classes
    BitcoinScriptUtil
  7. def calculatePushOp(bytes: ByteVector): Seq[ScriptToken]
    Definition Classes
    BitcoinScriptUtil
  8. def calculatePushOp(scriptToken: ScriptToken): Seq[ScriptToken]

    Calculates the push operation for the given ScriptToken

    Calculates the push operation for the given ScriptToken

    Definition Classes
    BitcoinScriptUtil
  9. def calculateScriptForChecking(txSignatureComponent: TxSigComponent, signature: ECDigitalSignature, script: Seq[ScriptToken]): Seq[ScriptToken]

    Prepares the script we spending to be serialized for our transaction signature serialization algorithm We need to check if the scriptSignature has a redeemScript In that case, we need to pass the redeemScript to the TransactionSignatureChecker

    Prepares the script we spending to be serialized for our transaction signature serialization algorithm We need to check if the scriptSignature has a redeemScript In that case, we need to pass the redeemScript to the TransactionSignatureChecker

    In the case we have a P2SH(P2WSH) we need to pass the witness's redeem script to the TransactionSignatureChecker instead of passing the WitnessScriptPubKey inside of the P2SHScriptSignature's redeem script.

    Definition Classes
    BitcoinScriptUtil
  10. def calculateScriptForSigning(spendingTransaction: Transaction, signingInfo: InputSigningInfo[InputInfo], asm: Seq[ScriptToken]): Seq[ScriptToken]
    Definition Classes
    BitcoinScriptUtil
  11. def calculateScriptForSigning(txSignatureComponent: TxSigComponent, script: Seq[ScriptToken]): Seq[ScriptToken]
    Definition Classes
    BitcoinScriptUtil
  12. def castToBool(token: ScriptToken): Boolean

    Casts the given script token to a boolean value Mimics this function inside of Bitcoin Core https://github.com/bitcoin/bitcoin/blob/8c1dbc5e9ddbafb77e60e8c4e6eb275a3a76ac12/src/script/interpreter.cpp#L38 All bytes in the byte vector must be zero, unless it is the last byte, which can be 0 or 0x80 (negative zero)

    Casts the given script token to a boolean value Mimics this function inside of Bitcoin Core https://github.com/bitcoin/bitcoin/blob/8c1dbc5e9ddbafb77e60e8c4e6eb275a3a76ac12/src/script/interpreter.cpp#L38 All bytes in the byte vector must be zero, unless it is the last byte, which can be 0 or 0x80 (negative zero)

    Definition Classes
    BitcoinScriptUtil
  13. def checkPubKeyEncoding(key: ECPublicKeyBytes, flags: Seq[ScriptFlag]): Boolean
    Definition Classes
    BitcoinScriptUtil
  14. def checkPubKeyEncoding(key: ECPublicKeyBytes, program: ExecutionInProgressScriptProgram): Boolean

    Checks the ECPublicKey encoding according to bitcoin core's function: https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L202.

    Checks the ECPublicKey encoding according to bitcoin core's function: https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L202.

    Definition Classes
    BitcoinScriptUtil
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  16. def countOpCodes(opcodes: Vector[ScriptToken]): Int
    Definition Classes
    BitcoinScriptUtil
  17. def countSigOps(script: Seq[ScriptToken]): Long

    Counts the amount of sigops in a script.

    Counts the amount of sigops in a script. Bitcoin Core script.cpp

    script

    the script whose sigops are being counted

    returns

    the number of signature operations in the script

    Definition Classes
    BitcoinScriptUtil
  18. def countsTowardsScriptOpLimit(token: ScriptToken): Boolean

    Returns true if the given script token counts towards our max script operations in a script See interpreter.cpp#L269-L271 which is how Bitcoin Core handles this

    Returns true if the given script token counts towards our max script operations in a script See interpreter.cpp#L269-L271 which is how Bitcoin Core handles this

    Definition Classes
    BitcoinScriptUtil
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  21. def filterOpCodes(tokens: Vector[ScriptToken]): Vector[ScriptToken]
    Definition Classes
    BitcoinScriptUtil
  22. def filterPushOps(asm: Seq[ScriptToken]): Seq[ScriptToken]

    Filters out push operations in our sequence of script tokens this removes OP_PUSHDATA1, OP_PUSHDATA2, OP_PUSHDATA4, and all ByteToPushOntoStack tokens

    Filters out push operations in our sequence of script tokens this removes OP_PUSHDATA1, OP_PUSHDATA2, OP_PUSHDATA4, and all ByteToPushOntoStack tokens

    Definition Classes
    BitcoinScriptUtil
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. def getDataTokens(asm: Seq[ScriptToken]): Seq[ScriptToken]

    Returns only the data ScriptTokens in a script that are pushed onto the stack

    Returns only the data ScriptTokens in a script that are pushed onto the stack

    Definition Classes
    BitcoinScriptUtil
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def isCompressedOrUncompressedPubKey(key: ECPublicKeyBytes): Boolean

    Returns true if the key is compressed or uncompressed, false otherwise https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L66

    Returns true if the key is compressed or uncompressed, false otherwise https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L66

    key

    the public key that is being checked

    returns

    true if the key is compressed/uncompressed otherwise false

    Definition Classes
    BitcoinScriptUtil
  28. def isCompressedPubKey(key: ECPublicKeyBytes): Boolean

    Checks if the given public key is a compressed public key

    Checks if the given public key is a compressed public key

    Definition Classes
    BitcoinScriptUtil
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. def isMinimalPush(pushOp: ScriptToken, token: ScriptToken): Boolean

    Determines if the token being pushed onto the stack is being pushed by the SMALLEST push operation possible This is equivalent to Bitcoin Core interpreter.cpp#L209

    Determines if the token being pushed onto the stack is being pushed by the SMALLEST push operation possible This is equivalent to Bitcoin Core interpreter.cpp#L209

    pushOp

    the operation that is pushing the data onto the stack

    token

    the token that is being pushed onto the stack by the pushOp

    Definition Classes
    BitcoinScriptUtil
  31. def isMinimalToken(token: ScriptToken): Boolean

    Checks if the token is minimially encoded

    Checks if the token is minimially encoded

    Definition Classes
    BitcoinScriptUtil
  32. def isOnlyCompressedPubKey(spk: ScriptPubKey): Boolean

    Checks that all the ECPublicKey in this script is compressed public keys, this is required for BIP143

    Checks that all the ECPublicKey in this script is compressed public keys, this is required for BIP143

    Definition Classes
    BitcoinScriptUtil
  33. def isPushOnly(script: Seq[ScriptToken]): Boolean

    Determines if a script contains only script operations This is equivalent to Bitcoin Core script.cpp#L213

    Determines if a script contains only script operations This is equivalent to Bitcoin Core script.cpp#L213

    Definition Classes
    BitcoinScriptUtil
  34. def isShortestEncoding(hex: String): Boolean

    Whenever a script constant is interpreted to a number BIP62 should enforce that number to be encoded in the smallest encoding possible https://github.com/bitcoin/bitcoin/blob/a6a860796a44a2805a58391a009ba22752f64e32/src/script/script.h#L220-L237

    Whenever a script constant is interpreted to a number BIP62 should enforce that number to be encoded in the smallest encoding possible https://github.com/bitcoin/bitcoin/blob/a6a860796a44a2805a58391a009ba22752f64e32/src/script/script.h#L220-L237

    Definition Classes
    BitcoinScriptUtil
  35. def isShortestEncoding(bytes: ByteVector): Boolean
    Definition Classes
    BitcoinScriptUtil
  36. def isShortestEncoding(constant: ScriptConstant): Boolean

    Whenever a ScriptConstant is interpreted to a number BIP62 could enforce that number to be encoded in the smallest encoding possible https://github.com/bitcoin/bitcoin/blob/a6a860796a44a2805a58391a009ba22752f64e32/src/script/script.h#L220-L237

    Whenever a ScriptConstant is interpreted to a number BIP62 could enforce that number to be encoded in the smallest encoding possible https://github.com/bitcoin/bitcoin/blob/a6a860796a44a2805a58391a009ba22752f64e32/src/script/script.h#L220-L237

    Definition Classes
    BitcoinScriptUtil
  37. def isValidPubKeyEncoding(pubKey: ECPublicKeyBytes, sigVersion: SignatureVersion, flags: Seq[ScriptFlag]): Option[ScriptError]

    Determines if the given pubkey is valid in accordance to the given ScriptFlags and SignatureVersion.

    Determines if the given pubkey is valid in accordance to the given ScriptFlags and SignatureVersion. Mimics this function inside of Bitcoin Core https://github.com/bitcoin/bitcoin/blob/528472111b4965b1a99c4bcf08ac5ec93d87f10f/src/script/interpreter.cpp#L214-L223

    Definition Classes
    BitcoinScriptUtil
  38. def minimalDummy(asm: Seq[ScriptToken]): Seq[ScriptToken]

    Replaces the OP_0 dummy for OP_CHECKMULTISIG with ScriptNumber.zero

    Replaces the OP_0 dummy for OP_CHECKMULTISIG with ScriptNumber.zero

    Definition Classes
    BitcoinScriptUtil
  39. def minimalIfOp(asm: Seq[ScriptToken]): Seq[ScriptToken]

    Since witnesses are not run through the interpreter, replace OP_0/OP_1 with ScriptNumber.zero/ScriptNumber.one

    Since witnesses are not run through the interpreter, replace OP_0/OP_1 with ScriptNumber.zero/ScriptNumber.one

    Definition Classes
    BitcoinScriptUtil
  40. def minimalScriptNumberRepresentation(num: ScriptNumber): ScriptNumber
    Definition Classes
    BitcoinScriptUtil
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. def numPossibleSignaturesOnStack(program: ExecutionInProgressScriptProgram): ScriptNumber

    Parses the number of signatures on the stack This can only be called when an OP_CHECKMULTISIG operation is about to be executed on the stack For instance if this was a 2/3 multisignature script, it would return the number 3

    Parses the number of signatures on the stack This can only be called when an OP_CHECKMULTISIG operation is about to be executed on the stack For instance if this was a 2/3 multisignature script, it would return the number 3

    Definition Classes
    BitcoinScriptUtil
  45. def numRequiredSignaturesOnStack(program: ExecutionInProgressScriptProgram): ScriptNumber

    Returns the number of required signatures on the stack, for instance if this was a 2/3 multisignature script, it would return the number 2

    Returns the number of required signatures on the stack, for instance if this was a 2/3 multisignature script, it would return the number 2

    Definition Classes
    BitcoinScriptUtil
  46. def parseScript[T <: Script](bytes: ByteVector, f: (Vector[ScriptToken]) => T): T
    Definition Classes
    BitcoinScriptUtil
  47. def removeOpCodeSeparator(program: ExecutionInProgressScriptProgram): Seq[ScriptToken]

    Removes the OP_CODESEPARATOR in the original script according to the last code separator index in the script.

    Removes the OP_CODESEPARATOR in the original script according to the last code separator index in the script.

    Definition Classes
    BitcoinScriptUtil
  48. def removeSignatureFromScript(signature: ECDigitalSignature, script: Seq[ScriptToken]): Seq[ScriptToken]

    Removes the given ECDigitalSignature from the list of ScriptToken if it exists.

    Removes the given ECDigitalSignature from the list of ScriptToken if it exists.

    Definition Classes
    BitcoinScriptUtil
  49. def removeSignaturesFromScript(sigs: Seq[ECDigitalSignature], script: Seq[ScriptToken]): Seq[ScriptToken]

    Removes the list of ECDigitalSignature from the list of ScriptToken

    Removes the list of ECDigitalSignature from the list of ScriptToken

    Definition Classes
    BitcoinScriptUtil
  50. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  51. def toString(): String
    Definition Classes
    AnyRef → Any
  52. def verifyPSBTInputScript(tx: Transaction, inputMap: InputPSBTMap, index: Int, outputMap: PreviousOutputMap, flags: Seq[ScriptFlag] = Policy.standardFlags): Try[Transaction]
    Definition Classes
    BitcoinScriptUtil
  53. def verifyScript(tx: Transaction, utxos: Seq[ScriptSignatureParams[InputInfo]]): Boolean
    Definition Classes
    BitcoinScriptUtil
  54. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from BitcoinScriptUtil

Inherited from AnyRef

Inherited from Any

Ungrouped