LogicSignature class

Most Algorand transactions are authorized by a signature from a single account or a multisignature account.

Algorand’s stateful smart contracts allow for a third type of signature using a Transaction Execution Approval Language (TEAL) program, called a logic signature (LogicSig).

Stateless smart contracts provide two modes for TEAL logic to operate as a LogicSig, to create a contract account that functions similar to an escrow or to delegate signature authority to another account.

More information, see https://developer.algorand.org/docs/features/asc1/stateless/sdks/

Annotations
  • @JsonSerializable(fieldRename: FieldRename.kebab)

Constructors

LogicSignature({required Uint8List logic, List<Uint8List>? arguments, Signature? signature, MultiSignature? multiSignature})
Create a new logic signature. Throws an AlgorandException if unable to check the logic.
LogicSignature.fromJson(Map<String, dynamic> json)
factory
LogicSignature.fromProgram({required TEALProgram program, List<Uint8List>? arguments, Signature? signature})
Create a new logic signature from a given TEAL program. Throws an AlgorandException if unable to check the logic.

Properties

arguments List<Uint8List>?
final
hashCode int
The hash code for this object.
no setterinherited
logic Uint8List
final
multiSignature MultiSignature?
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signature Signature?
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

append({required Account account}) Future<LogicSignature>
Appends a signature to multisig logic signed transaction
copyWith({Uint8List? logic, List<Uint8List>? arguments, Signature? signature, MultiSignature? multiSignature}) LogicSignature
getEncodedProgram() Uint8List
Get the encoded representation of the program with a prefix suitable for signing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign({required Account account, MultiSigAddress? multiSigAddress}) Future<LogicSignature>
Sign a logic signature with account secret key.
signTransaction({required RawTransaction transaction}) Future<SignedTransaction>
Create a signed transaction from a LogicSignature and transaction. LogicSignature must be valid and verifiable against transaction sender field.
toAddress() Address
Generate escrow address from logic sig program. Returns the address for the encoded program.
toBase64() String
Get the base64-encoded representation of the transaction..
toJson() Map<String, dynamic>
toMessagePack() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
verify(Address address) Future<bool>
Perform signature verification against the sender address.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

LOGIC_PREFIX → const String