Algorand class

Constructors

Algorand({AlgorandOptions? options})
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compileTEAL(String sourceCode) Future<TealCompilation>
Compile TEAL source code to binary, produce its hash
createAccount() Future<Account>
Create a new, random generated account.
createApplicationCallTransaction({required Address sender, required int applicationId, List<Uint8List>? arguments, List<Address>? accounts, List<int>? foreignApps, List<int>? foreignAssets, List<AppBoxReference>? appBoxReferences, String? note, OnCompletion onCompletion = OnCompletion.NO_OP_OC, TransactionParams? suggestedParams}) Future<ApplicationBaseTransaction>
Create a new ApplicationBaseTransaction.
createApplicationCreateTransaction({required Address sender, required TEALProgram approvalProgram, required TEALProgram clearStateProgram, required StateSchema globalStateSchema, required StateSchema localStateSchema, bool optIn = false, List<Uint8List>? arguments, List<Address>? accounts, String? note, TransactionParams? suggestedParams}) Future<ApplicationCreateTransaction>
Create a new ApplicationCreateTransaction.
createApplicationDeleteTransaction({required Address sender, required int applicationId, List<Uint8List>? arguments, List<Address>? accounts, List<int>? foreignApps, List<int>? foreignAssets, List<AppBoxReference>? appBoxReferences, String? note, TransactionParams? suggestedParams}) Future<ApplicationBaseTransaction>
Create a new ApplicationBaseTransaction.
createApplicationOptInTransaction({required Address sender, required int applicationId, List<Uint8List>? arguments, List<Address>? accounts, List<int>? foreignApps, List<int>? foreignAssets, List<AppBoxReference>? appBoxReferences, String? note, TransactionParams? suggestedParams}) Future<ApplicationBaseTransaction>
Create a new application opt in transaction. A helper method to easily create a new ApplicationOptInTransaction.
createAssetCreationTransaction({required Address sender, required String assetName, required String unitName, required BigInt totalAssetsToCreate, required int decimals, bool defaultFrozen = false, Address? managerAddress, Address? reserveAddress, Address? freezeAddress, Address? clawbackAddress, String? url, String? note, Uint8List? metadataHash, TransactionParams? suggestedParams}) Future<AssetConfigTransaction>
Create a new AssetConfigTransaction.
createAssetOptInTransaction({required Address sender, required int assetId, String? note, TransactionParams? suggestedParams}) Future<AssetTransferTransaction>
Create a new AssetTransferTransaction.
createAssetTransferTransaction({required Address sender, int? assetId, BigInt? amount, Address? assetSender, Address? receiver, Address? closeTo, TransactionParams? suggestedParams}) Future<AssetTransferTransaction>
Create a new AssetTransferTransaction.
createPaymentTransaction({required Address sender, required Address receiver, required BigInt amount, String? note, TransactionParams? suggestedParams}) Future<PaymentTransaction>
Create a new PaymentTransaction.
dryrun(DryRunRequest request) Future<DryRunResponse>
Executes TEAL program(s) in context and returns debugging information about the execution. This endpoint is only enabled when a node's configuration file sets EnableDeveloperAPI to true. /v2/teal/dryrun
genesis() Future<String>
Gets the genesis information.
getAccountByAddress(String address, {Exclude? exclude, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<AccountInformation>
Get the account information of the given address, using Algod. Given a specific account public key, this call returns the accounts status, balance and spendable amounts.
getAssetsByAddress(String address, {int? assetId, bool? includeAll, int? perPage, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<List<AssetHolding>>
Get the assets owned of the given address. Given a specific account public key, this call returns the assets owned by the address.
getBalance(String address) Future<BigInt>
Get the balance (in microAlgos) of the given address. Given a specific account public key, this call returns the current balance.
getBlockByRound(BigInt round, {CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Block>
Lookup a block it the given round number.
getBox(int applicationId, String name, {CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<BoxResponse>
Get box information for a given application.
getBoxNames(int applicationId, {int? max, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<BoxNamesResponse>
Get all box names for a given application.
getCreatedApplicationsByAddress(String address, {int? applicationId, bool? includeAll, int? perPage, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<List<Application>>
Lookup created applications information by a given account id.
getCreatedAssetsByAddress(String address, {int? assetId, bool? includeAll, int? perPage, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<List<Asset>>
Get the assets created by the given account. Given a specific account public key, this call returns the assets created by the address.
getPendingTransactionById(String transactionId) Future<PendingTransaction>
Get a specific pending transaction.
getPendingTransactions({int max = 0}) Future<PendingTransactionsResponse>
Get the list of unconfirmed pending transactions currently in the transaction pool sorted by priority, in decreasing order, truncated at the end at MAX.
getPendingTransactionsByAddress(String address, {int max = 0}) Future<PendingTransactionsResponse>
Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX.
getSuggestedTransactionParams() Future<TransactionParams>
Get the suggested parameters for constructing a new transaction.
health() Future<bool>
Checks if the node is healthy.
indexer() AlgorandIndexer
Get the algorand indexer which lets you search the blockchain.
loadAccountFromPrivateKey(String privateKey) Future<Account>
Load an existing account from a private key. Private key is a hexadecimal representation of the seed.
loadAccountFromSeed(List<int> seed) Future<Account>
Load an existing account from an rfc8037 private key. Seed is the binary representation of the seed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerError(String key, AlgorandError error) → void
Register a new error supplier so the consumer can easily detect what caused the error to be thrown.
restoreAccount(List<String> words) Future<Account>
Load an existing account from a 25-word seed phrase.
sendPayment({required Account account, required Address recipient, required BigInt amount, String? note, bool waitForConfirmation = false, int? timeout}) Future<String>
Send a payment to the given recipient with the recommended transaction parameters.
sendRawTransaction(Uint8List transaction, {bool waitForConfirmation = false, int? timeout}) Future<String>
Broadcast a new (signed) transaction on the network.
sendRawTransactions(List<Uint8List> transactions, {bool waitForConfirmation = false, int? timeout}) Future<String>
Broadcast a list of (signed) transaction on the network.
sendTransaction(SignedTransaction transaction, {bool waitForConfirmation = false, int? timeout}) Future<String>
Broadcast a new (signed) transaction on the network.
sendTransactions(List<SignedTransaction> transactions, {bool waitForConfirmation = false, int? timeout}) Future<String>
Group a list of (signed) transactions and broadcast it on the network. This is mostly used for atomic transfers.
setAlgodOptions(void callback(BaseOptions options)) → void
Override the base options for the Algod HTTP client.
setAlgodUrl(String baseUrl) → void
Set the base url of the AlgodClient.
setIndexerOptions(void callback(BaseOptions options)) → void
Override the base options for the Indexer HTTP client.
setIndexerUrl(String baseUrl) → void
Set the base url of the IndexerClient.
status() Future<NodeStatus>
Gets the current node status.
statusAfterRound(int round) Future<NodeStatus>
Gets the node status after waiting for the given round.
supply() Future<LedgerSupply>
Get the current supply reported by the ledger.
toString() String
A string representation of this object.
inherited
waitForConfirmation(String transactionId, {int? timeout}) Future<PendingTransaction>
Utility function to wait on a transaction to be confirmed. The timeout parameter indicates how many rounds do you wish to check pending transactions for.

Operators

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