Skip to content

AlgorandClient

The main entry point for interacting with the Algorand network. Provides access to all AlgoKit Utils functionality.

Creates a client configured for the default LocalNet.

const algorand = AlgorandClient.defaultLocalNet();

Creates a client configured for TestNet.

const algorand = AlgorandClient.testNet();

Creates a client configured for MainNet.

const algorand = AlgorandClient.mainNet();

Creates a client from a custom configuration.

ParameterTypeDescription
config.algodConfigAlgoClientConfigAlgod client configuration
config.indexerConfigAlgoClientConfigOptional indexer configuration
config.kmdConfigAlgoClientConfigOptional KMD configuration
const algorand = AlgorandClient.fromConfig({
algodConfig: { server: 'http://localhost', port: 4001, token: 'a]'.repeat(32) },
});

Returns an AccountManager instance for managing accounts.

Returns an AppManager instance for interacting with applications.

Returns a transaction sender for submitting transactions.

Provides access to the underlying algod, indexer, and KMD clients.

Creates a new TransactionComposer for building atomic transaction groups.

const result = await algorand
.newGroup()
.addPayment({ sender: alice, receiver: bob, amount: (1).algo() })
.addAssetTransfer({ sender: alice, receiver: bob, assetId: 123n, amount: 1n })
.send();