TxBuilder class

Used for building transactions.

Inheritance

Constructors

TxBuilder.new(TransactionBuilderAccount sourceAccount)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdkBuilder ↔ TransactionBuilder
getter/setter pairinherited
sourceAccount ↔ TransactionBuilderAccount
getter/setter pairinherited

Methods

accountMerge({required String destinationAddress, String? sourceAddress}) TxBuilder
Merges account into a destination account. Warning: This operation will give full control of the account to the destination account, effectively removing the merged account from the network. Params: destinationAddress of the stellar account to merge into. Optional sourceAddress account id of the account that is being merged. If not given then will default to the TransactionBuilder source account.
addAccountSigner(AccountKeyPair signerAddress, int signerWeight) CommonTxBuilder<TxBuilder>
inherited
addAssetSupport(IssuedAssetId asset, {String limit = '922337203685.4775807'}) CommonTxBuilder<TxBuilder>
inherited
addOperation(Operation operation) TxBuilder
build() → Transaction
inherited
createAccount(AccountKeyPair newAccount, {String startingBalance = "1"}) TxBuilder
lockAccountMasterKey() CommonTxBuilder<TxBuilder>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathPay({required String destinationAddress, required StellarAssetId sendAsset, required StellarAssetId destinationAsset, String? sendAmount, String? destAmount, String? destMin, String? sendMax, List<StellarAssetId>? path}) TxBuilder
Creates and adds a path payment operation to the transaction builder. Params: The destinationAddress to which the payment is sent, the sendAsset - asset to be sent. The destinationAsset the destination will receive. The amount to be sent sendAmount, The destAmount to be received by the destination. Must specify either sendAmount or destAmount, but not both. destMin - the minimum amount of the destination asset to be receive. This is a protective measure, it allows you to specify a lower bound for an acceptable conversion. Only used if using sendAmount (optional, default is ".0000001"). sendMax - the maximum amount of the destination asset to be sent. This is a protective measure, it allows you to specify an upper bound for an acceptable conversion. Only used if using destAmount (optional, default is int64 max). And optional the payment path, that can be selected from the result of using Stellar.findStrictSendPathForDestinationAddress or Stellar.findStrictSendPathForDestinationAssets if sendAmount is given, or Stellar.findStrictReceivePathForSourceAssets or Stellar.findStrictReceivePathForSourceAddress if destAmount is given. Returns the current instance of the TransactionBuilder for method chaining.
removeAccountSigner(AccountKeyPair signerAddress) CommonTxBuilder<TxBuilder>
inherited
removeAssetSupport(IssuedAssetId asset) CommonTxBuilder<TxBuilder>
inherited
setBaseFee(int baseFeeInStoops) TxBuilder
setMemo(Memo memo) TxBuilder
setThreshold({required int low, required int medium, required int high}) CommonTxBuilder<TxBuilder>
inherited
setTimeBounds(TimeBounds timeBounds) TxBuilder
sponsoring(AccountKeyPair sponsorAccount, dynamic buildingFunction(SponsoringBuilder builder), {AccountKeyPair? sponsoredAccount}) TxBuilder
strictReceive({required StellarAssetId sendAssetId, required String destinationAddress, required StellarAssetId destinationAssetId, required String destinationAmount, required String? sendMaxAmount, List<StellarAssetId>? path}) TxBuilder
Creates and adds a strict receive path payment operation to the transaction builder. Params: The sendAsset - asset to be sent. The destinationAddress to which the payment is sent, the asset identified by destinationAssetId the destination will receive. The destinationAmount to be received by the destination. Optional sendMaxAmount - the maximum amount of the destination asset to be sent. This is a protective measure, it allows you to specify an upper bound for an acceptable conversion (optional, default is int64 max). And optional the payment path, that can be selected from the result of using Stellar.findStrictReceivePathForSourceAssets or Stellar.findStrictReceivePathForSourceAddress.
strictSend({required StellarAssetId sendAssetId, required String sendAmount, required String destinationAddress, required StellarAssetId destinationAssetId, String? destinationMinAmount, List<StellarAssetId>? path}) TxBuilder
Creates and adds a strict send path payment operation to the transaction builder. Params: The sendAssetId - asset to be sent. The amount to be sent sendAmount, The destinationAddress to which the payment is sent, the asset identified by destinationAssetId the destination will receive. destinationMinAmount - the minimum amount of the destination asset to be receive. This is a protective measure, it allows you to specify a lower bound for an acceptable conversion (optional, default is ".0000001"). And optional the payment path, that can be selected from the result of using Stellar.findStrictSendPathForDestinationAddress or Stellar.findStrictSendPathForDestinationAssets.
swap({required StellarAssetId fromAsset, required StellarAssetId toAsset, required String amount, String? destMin, List<StellarAssetId>? path}) TxBuilder
Swap assets using the Stellar network. This swaps using the pathPaymentStrictSend operation. Params: The source asset to be sent fromAsset. The destination asset to receive toAsset. The amount of the source asset to be sent. (Optional) The minimum amount of the destination asset to be received destMin. And optional the payment path, that can be selected from the result of using Stellar.findStrictSendPathForDestinationAddress or Stellar.findStrictSendPathForDestinationAssets Returns the current instance of the TransactionBuilder for method chaining.
toString() String
A string representation of this object.
inherited
transfer(String destinationAddress, StellarAssetId assetId, String amount) TxBuilder

Operators

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