SigningInput class
Input data necessary to create a signed transaction.
- Inheritance
-
- Object
- GeneratedMessage
- SigningInput
- Available extensions
Constructors
-
SigningInput({int? hashType, Int64? amount, Int64? byteFee, String? toAddress, String? changeAddress, Iterable<
List< ? privateKey, Map<int> >String, List< ? scripts, Iterable<int> >UnspentTransaction> ? utxo, bool? useMaxAmount, int? coinType, TransactionPlan? plan, int? lockTime, List<int> ? outputOpReturn, Iterable<OutputAddress> ? extraOutputs, bool? useMaxUtxo, bool? disableDustFilter, int? time, bool? zip0317, SigningInput? signingV2, Int64? fixedDustThreshold, OutputIndex? outputOpReturnIndex}) -
factory
-
SigningInput.fromBuffer(List<
int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) -
factory
- SigningInput.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- amount ↔ Int64
-
Amount to send. Transaction created will have this amount in its output,
except when use_max_amount is set, in that case this amount is not relevant, maximum possible amount will be used (max avail less fee).
If amount is equal or more than the available amount, also max amount will be used.
getter/setter pair
- byteFee ↔ Int64
-
Transaction fee rate, satoshis per byte, used to compute required fee (when planning)
getter/setter pair
- changeAddress ↔ String
-
Change address, as string.
getter/setter pair
- coinType ↔ int
-
Coin type (used by forks).
getter/setter pair
- disableDustFilter ↔ bool
-
If disable dust filter.
getter/setter pair
- eventPlugin → EventPlugin?
-
Subclasses can override this getter to be notified of changes
to protobuf fields.
no setterinherited
-
extraOutputs
→ List<
OutputAddress> -
Optional additional destination addresses, additional to first to_address output
no setter
- fixedDustThreshold ↔ Int64
-
Use a constant "Dust" threshold.
getter/setter pair
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- hashType ↔ int
-
Hash type to use when signing.
getter/setter pair
- info_ → BuilderInfo
-
no setteroverride
- isFrozen → bool
-
Returns
trueif this message is marked read-only. Otherwisefalse.no setterinherited - lockTime ↔ int
-
Optional lockTime, default value 0 means no time locking.
If all inputs have final (
0xffffffff) sequence numbers thenlockTimeis irrelevant. Otherwise, the transaction may not be added to a block until afterlockTime. value < 500000000 : Block number at which this transaction is unlocked value >= 500000000 : UNIX timestamp at which this transaction is unlockedgetter/setter pair -
outputOpReturn
↔ List<
int> -
Optional zero-amount, OP_RETURN output
getter/setter pair
- outputOpReturnIndex ↔ OutputIndex
-
Optional index of the OP_RETURN output in the transaction.
If not set, OP_RETURN output will be pushed as the latest output.
getter/setter pair
- plan ↔ TransactionPlan
-
Optional transaction plan. If missing, plan will be computed.
getter/setter pair
-
privateKey
→ List<
List< int> > -
The available secret private key or keys required for signing (32 bytes each).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scripts
→ Map<
String, List< int> > -
Available redeem scripts indexed by script hash.
no setter
- signingV2 ↔ SigningInput
-
If set, uses Bitcoin 2.0 Signing protocol.
As a result,
Bitcoin.Proto.SigningOutput.signing_result_v2is set.getter/setter pair - time ↔ int
-
transaction creation time that will be used for verge(xvg)
getter/setter pair
- toAddress ↔ String
-
Recipient's address, as string.
getter/setter pair
- unknownFields → UnknownFieldSet
-
no setterinherited
- useMaxAmount ↔ bool
-
Set if sending max amount is requested.
getter/setter pair
- useMaxUtxo ↔ bool
-
If use max utxo.
getter/setter pair
-
utxo
→ List<
UnspentTransaction> -
Available input unspent transaction outputs.
no setter
- zip0317 ↔ bool
-
Whether to calculate the fee according to ZIP-0317 for the given transaction
https://zips.z.cash/zip-0317#fee-calculation
getter/setter pair
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
anyCompileWithSignatures(
{required TWCoinType coin, required List< Uint8List> signatures, required List<Uint8List> publicKeys, TWPublicKeyType? pubKeyType}) → Uint8List -
Available on GeneratedMessage, provided by the TWPreImageHashesExtension extension
Compiles a complete transation with one or more external signatures. \paramcoincoin type. \paramsignaturessignatures to compile. \parampublicKeyspublic keys for signers to match private keys. \parampubKeyTypepublic key type. \return serialized data of a proto objectSigningOutput. -
anyCompileWithSignaturesToOutput<
T extends GeneratedMessage> ({required TWCoinType coin, required List< Uint8List> signatures, required List<Uint8List> publicKeys, TWPublicKeyType? pubKeyType, required T output}) → T -
Available on GeneratedMessage, provided by the TWPreImageHashesExtension extension
Compiles a complete transation with one or more external signatures. \paramcoincoin type. \paramsignaturessignatures to compile. \parampublicKeyspublic keys for signers to match private keys. \parampublicKeyspublic keys for signers to match private keys. \parampubKeyTypepublic key type. \paramoutputEmptySigningOutputproto object. \returnoutputafter serialization data is filled. -
anyPlan(
TWCoinType coin) → Uint8List -
Available on GeneratedMessage, provided by the TWAnySignExtension extension
Any plan. \paramcoincoin type. \return The serialized data of aTransactionPlanproto object. -
anyPlanToOutput<
T extends GeneratedMessage> (TWCoinType coin, T output) → T -
Available on GeneratedMessage, provided by the TWAnySignExtension extension
Any plan to output. \paramcoincoin type. \paramoutputEmptyTransactionPlanproto object. \returnoutputafter serialization data is filled. -
anyPreImageHashes(
TWCoinType coin) → Uint8List -
Available on GeneratedMessage, provided by the TWPreImageHashesExtension extension
Obtain pre-signing hashes of a transaction. \paramcoincoin type. \return serialized data of a proto objectPreSigningOutputincludes hash. -
anyPreImageHashesToOutput<
T extends GeneratedMessage> (TWCoinType coin, T output) → T -
Available on GeneratedMessage, provided by the TWPreImageHashesExtension extension
Obtain pre-signing hashes of a transaction. \paramcoincoin type. \paramoutputEmptyPreSigningOutputproto object. \returnoutputafter serialization data is filled. -
anySign(
TWCoinType coin) → Uint8List -
Available on GeneratedMessage, provided by the TWAnySignExtension extension
Any sign. \paramcoinThe given coin type to sign the transaction for. \return The serialized data of aSigningOutputproto object. (e.g. TW.Bitcoin.Proto.SigningOutput). -
anySignToOutput<
T extends GeneratedMessage> (TWCoinType coin, T output) → T -
Available on GeneratedMessage, provided by the TWAnySignExtension extension
Any sign to output. \paramcoincoin type. \paramoutputEmptySigningOutputproto object. (e.g. TW.Bitcoin.Proto.SigningOutput). \returnoutputafter serialization data is filled. -
check(
) → void -
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearAmount(
) → void -
clearByteFee(
) → void -
clearChangeAddress(
) → void -
clearCoinType(
) → void -
clearDisableDustFilter(
) → void -
clearDustPolicy(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearFixedDustThreshold(
) → void -
clearHashType(
) → void -
clearLockTime(
) → void -
clearOutputOpReturn(
) → void -
clearOutputOpReturnIndex(
) → void -
clearPlan(
) → void -
clearSigningV2(
) → void -
clearTime(
) → void -
clearToAddress(
) → void -
clearUseMaxAmount(
) → void -
clearUseMaxUtxo(
) → void -
clearZip0317(
) → void -
clone(
) → SigningInput -
Creates a deep copy of the fields in this message.
(The generated code uses mergeFromMessage.)
override
-
compileWithSignatures(
{TWCoinType coin = TWCoinType.Bitcoin, required List< Uint8List> signatures, required List<Uint8List> publicKeys, TWPublicKeyType? pubKeyType}) → SigningOutput -
Available on SigningInput, provided by the TWBitcoinExtension extension
Compiles a complete transation with one or more external signatures. \paramcoincoin type. \paramsignaturessignatures to compile. \parampublicKeyspublic keys for signers to match private keys. \parampublicKeyspublic keys for signers to match private keys. \parampubKeyTypepublic key type. \return BitcoinSigningOutputproto object. -
compileWithSignaturesDecred(
{TWCoinType coin = TWCoinType.Decred, required List< Uint8List> signatures, required List<Uint8List> publicKeys, TWPublicKeyType? pubKeyType}) → SigningOutput -
Available on SigningInput, provided by the TWDecredExtension extension
Compiles a complete transation with one or more external signatures. \paramcoincoin type. \paramsignaturessignatures to compile. \parampublicKeyspublic keys for signers to match private keys. \parampublicKeyspublic keys for signers to match private keys. \parampubKeyTypepublic key type. \return DecredSigningOutputproto object. -
copyWith(
void updates(SigningInput)) → SigningInput -
Apply
updatesto a copy of this message.override -
createEmptyInstance(
) → SigningInput -
Creates an empty instance of the same message type as this.
override
-
createMapField<
K, V> (int tagNumber, MapFieldInfo< K, V> fi) → Map<K, V> -
Creates a Map representing a map field.
inherited
-
createRepeatedField<
T> (int tagNumber, FieldInfo< T> fi) → List<T> -
Creates List implementing a mutable repeated field.
inherited
-
ensureOutputOpReturnIndex(
) → OutputIndex -
ensurePlan(
) → TransactionPlan -
ensureSigningV2(
) → SigningInput -
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasAmount(
) → bool -
hasByteFee(
) → bool -
hasChangeAddress(
) → bool -
hasCoinType(
) → bool -
hasDisableDustFilter(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
trueif a value ofextensionis present.inherited -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber.inherited -
hasFixedDustThreshold(
) → bool -
hasHashType(
) → bool -
hasLockTime(
) → bool -
hasOutputOpReturn(
) → bool -
hasOutputOpReturnIndex(
) → bool -
hasPlan(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasSigningV2(
) → bool -
hasTime(
) → bool -
hasToAddress(
) → bool -
hasUseMaxAmount(
) → bool -
hasUseMaxUtxo(
) → bool -
hasZip0317(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
inherited
-
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data, a JSON object, encoded as described byGeneratedMessage.writeToJson.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
otherinto this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preImageHashes(
[TWCoinType coin = TWCoinType.Bitcoin]) → PreSigningOutput -
Available on SigningInput, provided by the TWBitcoinExtension extension
Obtain pre-signing hashes of a transaction. \paramcoincoin type \return BitcoinPreSigningOutputproto object. -
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber.inherited -
sign(
[TWCoinType coin = TWCoinType.Bitcoin]) → SigningOutput -
Available on SigningInput, provided by the TWBitcoinExtension extension
Sign \paramcoincoin type \return BitcoinSigningOutputproto object. -
signDecred(
[TWCoinType coin = TWCoinType.Decred]) → SigningOutput -
Available on SigningInput, provided by the TWDecredExtension extension
Sign \paramcoincoin type \return DecredSigningOutputproto object. -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toPlan(
[TWCoinType coin = TWCoinType.Bitcoin]) → TransactionPlan -
Available on SigningInput, provided by the TWBitcoinExtension extension
Plan \paramcoincoin type \returnoutputBitcoinTransactionPlanproto object. -
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
whichDustPolicy(
) → SigningInput_DustPolicy -
writeToBuffer(
) → Uint8List -
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
inherited
-
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → SigningInput -
createRepeated(
) → PbList< SigningInput> -
getDefault(
) → SigningInput