SigOperations class
PubKey Map
A map from (transaction hash, output number) to (script chunk index, pubKey). Whening signing a bitcoin transaction, we need to be able to sign an input with the correct key and also we need to know where to put signature when we get it. This mapping allows us to find the key for an associated input (which is identified by tx output hash and number) with which to sign the transaction and then also to know where to insert the signature into the input script. This gets us the public key, and we need a different method to get the private key. That is because we often know the public key to be used but may not have access to the private key until the entire tx is sent to where the private keys are.
Constructors
- SigOperations({Map? map})
Properties
Methods
-
addOne(
{required List< int> txHashBuf, int? txOutNum, int? nScriptChunk, String? type = SigOperations.SigType, String? addressStr, int? nHashType = Sig.SIGHASH_ALL | Sig.SIGHASH_FORKID}) → SigOperations -
fromJSON(
Map json) → SigOperations -
get(
List< int> txHashBuf, int? txOutNum) → dynamic - Get an address from the map
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMany(
{required List< int> txHashBuf, int? txOutNum, required List arr}) → SigOperations - Set a bunch of addresses for signing an input such as for use with multi-sig.
-
setOne(
{required List< int> txHashBuf, int? txOutNum, int? nScriptChunk, String type = SigOperations.SigType, String? addressStr, int nHashType = Sig.SIGHASH_ALL | Sig.SIGHASH_FORKID}) → SigOperations - Set an address to in the map for use with single-sig.
-
toJSON(
) → Map -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- PubKeyType → const String
- SigType → const String