TransactionBuilder class Null safety

Constructors

TransactionBuilder(String txType)
TransactionBuilder.allParams({String? type, Uint8List? address, Uint8List? previousPublicKey, Uint8List? previousSignature, Uint8List? originSignature, Data? data, int? validationStamp, int? version})
TransactionBuilder.fromJson(Map<String, dynamic> json)
factory

Properties

address Uint8List?
read / write
data Data?
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
originSignature Uint8List?
read / write
previousPublicKey Uint8List?
read / write
previousSignature Uint8List?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type String?
read / write
validationStamp int?
read / write
version int?
read / write

Methods

addAuthorizedKey(dynamic publicKey, dynamic encryptedSecretKey) TransactionBuilder
Add an authorized public key for secret decryption to the transaction with its encrypted secret key @param {String | Uint8List} publicKey Authorized public key (hexadecimal or or binary buffer) @param {String | Uint8List} encryptedSecretKey Encrypted secret key for the given public key (hexadecimal or binary buffer)
addNFTTransfer(dynamic to, double amount, dynamic nftAddress) TransactionBuilder
Add a NFT transfer to the transaction @param {String | Uint8List} to Address of the recipient (hexadecimal or binary buffer) @param {double} amount Amount of UCO to transfer @param {String | Uint8List} nftAddress Address of NFT to spend (hexadecimal or binary buffer)
addRecipient(dynamic to) TransactionBuilder
Add recipient to the transaction @param {String | Uint8List} to Recipient address (hexadecimal or binary buffer)
addUCOTransfer(dynamic to, double amount) TransactionBuilder
Add a UCO transfer to the transaction @param {String | Uint8List} to Address of the recipient (hexadecimal or binary buffer) @param {double} amount Amount of UCO to transfer
build(dynamic seed, int index, String curve, {String hashAlgo = 'sha256'}) TransactionBuilder
Generate the transaction address, keys and signatures @param {String | Uint8List} seed Transaction chain seed (hexadecimal or binary buffer) @param {Integer} index Number of transaction on the chain @param {String} curve Elliptic curve to use for the key generation @param {String} hashAlgo Hash algorithm to use for the address generation
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
originSign(dynamic privateKey) TransactionBuilder
Sign the transaction with an origin private key @param {String | Uint8List} originPv Origin Private Key (hexadecimal or binary buffer)
originSignaturePayload() Uint8List
previousSignaturePayload() Uint8List
Generate the payload for the previous signature by encoding address, type and data
setCode(String code) TransactionBuilder
Add smart contract code to the transaction @param {String} code Smart contract code
setContent(dynamic content) TransactionBuilder
Add a content to the transaction @param {String | Uint8List} content Hosted content
setSecret(dynamic secret) TransactionBuilder
Add a secret to the transaction @param {String | Uint8List} secret Secret encrypted (hexadecimal or binary buffer)
toJSON() → dynamic
Convert the transaction in JSON
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]
inherited

Operators

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