Bitcoin Script
class BitcoinScript
Bitcoin script manipulating functions
Constructors
Link copied to clipboard
Creates an empty script.
Link copied to clipboard
Creates a script from a raw data representation.
Link copied to clipboard
Creates a script from a raw bytes and size.
Functions
Link copied to clipboard
Builds a standard 'pay to public key' script.
Link copied to clipboard
Builds a standard 'pay to public key hash' script.
Link copied to clipboard
Builds a standard 'pay to script hash' script.
Link copied to clipboard
Builds a pay-to-witness-public-key-hash (P2WPKH) script..
Link copied to clipboard
Builds a pay-to-witness-script-hash (P2WSH) script.
Link copied to clipboard
Determines whether 2 scripts have the same content
Link copied to clipboard
Return the default HashType for the given coin, such as TWBitcoinSigHashTypeAll.
Link copied to clipboard
Determines whether this is a pay-to-script-hash (P2SH) script.
Link copied to clipboard
Determines whether this is a pay-to-witness-public-key-hash (P2WPKH) script.
Link copied to clipboard
Determines whether this is a pay-to-witness-script-hash (P2WSH) script.
Link copied to clipboard
Determines whether this is a witness program script.
Link copied to clipboard
Builds a appropriate lock script for the given address..
Link copied to clipboard
open fun lockScriptForAddressReplay(address: String, coin: CoinType, blockHash: Array<Byte>, blockHeight: Long): BitcoinScript
Builds a appropriate lock script for the given address with replay.
Link copied to clipboard
Matches the script to a pay-to-public-key (P2PK) script.
Link copied to clipboard
Matches the script to a pay-to-public-key-hash (P2PKH).
Link copied to clipboard
Matches the script to a pay-to-script-hash (P2SH).
Link copied to clipboard
Matches the script to a pay-to-witness-public-key-hash (P2WPKH).
Link copied to clipboard
Matches the script to a pay-to-witness-script-hash (P2WSH).
Link copied to clipboard
Return script hash of a script