-
- All Implemented Interfaces:
-
org.bitcoindevkit.Disposable
public final class Input implements Disposable
A key-value map for an input of the corresponding index in the unsigned transaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classInput.Companion
-
Field Summary
Fields Modifier and Type Field Description private TransactionnonWitnessUtxoprivate TxOutwitnessUtxoprivate Map<String, ByteArray>partialSigsprivate StringsighashTypeprivate ScriptredeemScriptprivate ScriptwitnessScriptprivate Map<String, KeySource>bip32Derivationprivate ScriptfinalScriptSigprivate List<ByteArray>finalScriptWitnessprivate Map<String, ByteArray>ripemd160Preimagesprivate Map<String, ByteArray>sha256Preimagesprivate Map<String, ByteArray>hash160Preimagesprivate Map<String, ByteArray>hash256Preimagesprivate ByteArraytapKeySigprivate Map<TapScriptSigKey, ByteArray>tapScriptSigsprivate Map<ControlBlock, TapScriptEntry>tapScriptsprivate Map<String, TapKeyOrigin>tapKeyOriginsprivate StringtapInternalKeyprivate StringtapMerkleRootprivate Map<ProprietaryKey, ByteArray>proprietaryprivate Map<Key, ByteArray>unknown
-
Constructor Summary
Constructors Constructor Description Input(Transaction nonWitnessUtxo, TxOut witnessUtxo, Map<String, ByteArray> partialSigs, String sighashType, Script redeemScript, Script witnessScript, Map<String, KeySource> bip32Derivation, Script finalScriptSig, List<ByteArray> finalScriptWitness, Map<String, ByteArray> ripemd160Preimages, Map<String, ByteArray> sha256Preimages, Map<String, ByteArray> hash160Preimages, Map<String, ByteArray> hash256Preimages, ByteArray tapKeySig, Map<TapScriptSigKey, ByteArray> tapScriptSigs, Map<ControlBlock, TapScriptEntry> tapScripts, Map<String, TapKeyOrigin> tapKeyOrigins, String tapInternalKey, String tapMerkleRoot, Map<ProprietaryKey, ByteArray> proprietary, Map<Key, ByteArray> unknown)
-
Method Summary
Modifier and Type Method Description final TransactiongetNonWitnessUtxo()The non-witness transaction this input spends from. final UnitsetNonWitnessUtxo(Transaction nonWitnessUtxo)The non-witness transaction this input spends from. final TxOutgetWitnessUtxo()The transaction output this input spends from. final UnitsetWitnessUtxo(TxOut witnessUtxo)The transaction output this input spends from. final Map<String, ByteArray>getPartialSigs()A map from public keys to their corresponding signature as would be pushed to the stack from a scriptSig or witness for a non-taproot inputs. final UnitsetPartialSigs(Map<String, ByteArray> partialSigs)A map from public keys to their corresponding signature as would be pushed to the stack from a scriptSig or witness for a non-taproot inputs. final StringgetSighashType()The sighash type to be used for this input. final UnitsetSighashType(String sighashType)The sighash type to be used for this input. final ScriptgetRedeemScript()The redeem script for this input. final UnitsetRedeemScript(Script redeemScript)The redeem script for this input. final ScriptgetWitnessScript()The witness script for this input. final UnitsetWitnessScript(Script witnessScript)The witness script for this input. final Map<String, KeySource>getBip32Derivation()A map from public keys needed to sign this input to their corresponding master key fingerprints and derivation paths. final UnitsetBip32Derivation(Map<String, KeySource> bip32Derivation)A map from public keys needed to sign this input to their corresponding master key fingerprints and derivation paths. final ScriptgetFinalScriptSig()The finalized, fully-constructed scriptSig with signatures and any other scripts necessary for this input to pass validation. final UnitsetFinalScriptSig(Script finalScriptSig)The finalized, fully-constructed scriptSig with signatures and any other scripts necessary for this input to pass validation. final List<ByteArray>getFinalScriptWitness()The finalized, fully-constructed scriptWitness with signatures and any other scripts necessary for this input to pass validation. final UnitsetFinalScriptWitness(List<ByteArray> finalScriptWitness)The finalized, fully-constructed scriptWitness with signatures and any other scripts necessary for this input to pass validation. final Map<String, ByteArray>getRipemd160Preimages()RIPEMD160 hash to preimage map. final UnitsetRipemd160Preimages(Map<String, ByteArray> ripemd160Preimages)RIPEMD160 hash to preimage map. final Map<String, ByteArray>getSha256Preimages()SHA256 hash to preimage map. final UnitsetSha256Preimages(Map<String, ByteArray> sha256Preimages)SHA256 hash to preimage map. final Map<String, ByteArray>getHash160Preimages()HASH160 hash to preimage map. final UnitsetHash160Preimages(Map<String, ByteArray> hash160Preimages)HASH160 hash to preimage map. final Map<String, ByteArray>getHash256Preimages()HASH256 hash to preimage map. final UnitsetHash256Preimages(Map<String, ByteArray> hash256Preimages)HASH256 hash to preimage map. final ByteArraygetTapKeySig()Serialized taproot signature with sighash type for key spend. final UnitsetTapKeySig(ByteArray tapKeySig)Serialized taproot signature with sighash type for key spend. final Map<TapScriptSigKey, ByteArray>getTapScriptSigs()Map of <xonlypubkey>|<leafhash>with signature.final UnitsetTapScriptSigs(Map<TapScriptSigKey, ByteArray> tapScriptSigs)Map of <xonlypubkey>|<leafhash>with signature.final Map<ControlBlock, TapScriptEntry>getTapScripts()Map of Control blocks to Script version pair. final UnitsetTapScripts(Map<ControlBlock, TapScriptEntry> tapScripts)Map of Control blocks to Script version pair. final Map<String, TapKeyOrigin>getTapKeyOrigins()Map of tap root x only keys to origin info and leaf hashes contained in it. final UnitsetTapKeyOrigins(Map<String, TapKeyOrigin> tapKeyOrigins)Map of tap root x only keys to origin info and leaf hashes contained in it. final StringgetTapInternalKey()Taproot Internal key. final UnitsetTapInternalKey(String tapInternalKey)Taproot Internal key. final StringgetTapMerkleRoot()Taproot Merkle root. final UnitsetTapMerkleRoot(String tapMerkleRoot)Taproot Merkle root. final Map<ProprietaryKey, ByteArray>getProprietary()Proprietary key-value pairs for this input. final UnitsetProprietary(Map<ProprietaryKey, ByteArray> proprietary)Proprietary key-value pairs for this input. final Map<Key, ByteArray>getUnknown()Unknown key-value pairs for this input. final UnitsetUnknown(Map<Key, ByteArray> unknown)Unknown key-value pairs for this input. Unitdestroy()-
-
Constructor Detail
-
Input
Input(Transaction nonWitnessUtxo, TxOut witnessUtxo, Map<String, ByteArray> partialSigs, String sighashType, Script redeemScript, Script witnessScript, Map<String, KeySource> bip32Derivation, Script finalScriptSig, List<ByteArray> finalScriptWitness, Map<String, ByteArray> ripemd160Preimages, Map<String, ByteArray> sha256Preimages, Map<String, ByteArray> hash160Preimages, Map<String, ByteArray> hash256Preimages, ByteArray tapKeySig, Map<TapScriptSigKey, ByteArray> tapScriptSigs, Map<ControlBlock, TapScriptEntry> tapScripts, Map<String, TapKeyOrigin> tapKeyOrigins, String tapInternalKey, String tapMerkleRoot, Map<ProprietaryKey, ByteArray> proprietary, Map<Key, ByteArray> unknown)
-
-
Method Detail
-
getNonWitnessUtxo
final Transaction getNonWitnessUtxo()
The non-witness transaction this input spends from. Should only be
Option::Somefor inputs which spend non-segwit outputs or if it is unknown whether an input spends a segwit output.
-
setNonWitnessUtxo
final Unit setNonWitnessUtxo(Transaction nonWitnessUtxo)
The non-witness transaction this input spends from. Should only be
Option::Somefor inputs which spend non-segwit outputs or if it is unknown whether an input spends a segwit output.
-
getWitnessUtxo
final TxOut getWitnessUtxo()
The transaction output this input spends from. Should only be
Option::Somefor inputs which spend segwit outputs, including P2SH embedded ones.
-
setWitnessUtxo
final Unit setWitnessUtxo(TxOut witnessUtxo)
The transaction output this input spends from. Should only be
Option::Somefor inputs which spend segwit outputs, including P2SH embedded ones.
-
getPartialSigs
final Map<String, ByteArray> getPartialSigs()
A map from public keys to their corresponding signature as would be pushed to the stack from a scriptSig or witness for a non-taproot inputs.
-
setPartialSigs
final Unit setPartialSigs(Map<String, ByteArray> partialSigs)
A map from public keys to their corresponding signature as would be pushed to the stack from a scriptSig or witness for a non-taproot inputs.
-
getSighashType
final String getSighashType()
The sighash type to be used for this input. Signatures for this input must use the sighash type.
-
setSighashType
final Unit setSighashType(String sighashType)
The sighash type to be used for this input. Signatures for this input must use the sighash type.
-
getRedeemScript
final Script getRedeemScript()
The redeem script for this input.
-
setRedeemScript
final Unit setRedeemScript(Script redeemScript)
The redeem script for this input.
-
getWitnessScript
final Script getWitnessScript()
The witness script for this input.
-
setWitnessScript
final Unit setWitnessScript(Script witnessScript)
The witness script for this input.
-
getBip32Derivation
final Map<String, KeySource> getBip32Derivation()
A map from public keys needed to sign this input to their corresponding master key fingerprints and derivation paths.
-
setBip32Derivation
final Unit setBip32Derivation(Map<String, KeySource> bip32Derivation)
A map from public keys needed to sign this input to their corresponding master key fingerprints and derivation paths.
-
getFinalScriptSig
final Script getFinalScriptSig()
The finalized, fully-constructed scriptSig with signatures and any other scripts necessary for this input to pass validation.
-
setFinalScriptSig
final Unit setFinalScriptSig(Script finalScriptSig)
The finalized, fully-constructed scriptSig with signatures and any other scripts necessary for this input to pass validation.
-
getFinalScriptWitness
final List<ByteArray> getFinalScriptWitness()
The finalized, fully-constructed scriptWitness with signatures and any other scripts necessary for this input to pass validation.
-
setFinalScriptWitness
final Unit setFinalScriptWitness(List<ByteArray> finalScriptWitness)
The finalized, fully-constructed scriptWitness with signatures and any other scripts necessary for this input to pass validation.
-
getRipemd160Preimages
final Map<String, ByteArray> getRipemd160Preimages()
RIPEMD160 hash to preimage map.
-
setRipemd160Preimages
final Unit setRipemd160Preimages(Map<String, ByteArray> ripemd160Preimages)
RIPEMD160 hash to preimage map.
-
getSha256Preimages
final Map<String, ByteArray> getSha256Preimages()
SHA256 hash to preimage map.
-
setSha256Preimages
final Unit setSha256Preimages(Map<String, ByteArray> sha256Preimages)
SHA256 hash to preimage map.
-
getHash160Preimages
final Map<String, ByteArray> getHash160Preimages()
HASH160 hash to preimage map.
-
setHash160Preimages
final Unit setHash160Preimages(Map<String, ByteArray> hash160Preimages)
HASH160 hash to preimage map.
-
getHash256Preimages
final Map<String, ByteArray> getHash256Preimages()
HASH256 hash to preimage map.
-
setHash256Preimages
final Unit setHash256Preimages(Map<String, ByteArray> hash256Preimages)
HASH256 hash to preimage map.
-
getTapKeySig
final ByteArray getTapKeySig()
Serialized taproot signature with sighash type for key spend.
-
setTapKeySig
final Unit setTapKeySig(ByteArray tapKeySig)
Serialized taproot signature with sighash type for key spend.
-
getTapScriptSigs
final Map<TapScriptSigKey, ByteArray> getTapScriptSigs()
Map of
<xonlypubkey>|<leafhash>with signature.
-
setTapScriptSigs
final Unit setTapScriptSigs(Map<TapScriptSigKey, ByteArray> tapScriptSigs)
Map of
<xonlypubkey>|<leafhash>with signature.
-
getTapScripts
final Map<ControlBlock, TapScriptEntry> getTapScripts()
Map of Control blocks to Script version pair.
-
setTapScripts
final Unit setTapScripts(Map<ControlBlock, TapScriptEntry> tapScripts)
Map of Control blocks to Script version pair.
-
getTapKeyOrigins
final Map<String, TapKeyOrigin> getTapKeyOrigins()
Map of tap root x only keys to origin info and leaf hashes contained in it.
-
setTapKeyOrigins
final Unit setTapKeyOrigins(Map<String, TapKeyOrigin> tapKeyOrigins)
Map of tap root x only keys to origin info and leaf hashes contained in it.
-
getTapInternalKey
final String getTapInternalKey()
Taproot Internal key.
-
setTapInternalKey
final Unit setTapInternalKey(String tapInternalKey)
Taproot Internal key.
-
getTapMerkleRoot
final String getTapMerkleRoot()
Taproot Merkle root.
-
setTapMerkleRoot
final Unit setTapMerkleRoot(String tapMerkleRoot)
Taproot Merkle root.
-
getProprietary
final Map<ProprietaryKey, ByteArray> getProprietary()
Proprietary key-value pairs for this input.
-
setProprietary
final Unit setProprietary(Map<ProprietaryKey, ByteArray> proprietary)
Proprietary key-value pairs for this input.
-
getUnknown
final Map<Key, ByteArray> getUnknown()
Unknown key-value pairs for this input.
-
setUnknown
final Unit setUnknown(Map<Key, ByteArray> unknown)
Unknown key-value pairs for this input.
-
-
-
-