Skip to content

getTestAccount

getTestAccount(params, algod, kmd?): Promise<Address & AddressWithTransactionSigner>

Defined in: src/testing/account.ts:20

GetTestAccountParams

The config for the test account to generate

AlgodClient

An algod client

KmdClient

A KMD client, if not specified then a default KMD client will be loaded from environment variables and if not found fallback to the default LocalNet KMD client

Promise<Address & AddressWithTransactionSigner>

The account, with private key loaded

getTestAccount(params, algorand): Promise<Address & object>

Defined in: src/testing/account.ts:34

Creates an ephemeral Algorand account for the purposes of testing. Returns a newly created random test account that is funded from the dispenser DO NOT USE THIS TO CREATE A MAINNET ACCOUNT! Note: By default this will log the mnemonic of the account.

GetTestAccountParams

The config for the test account to generate

AlgorandClient

An AlgorandClient client

Promise<Address & object>

The account, with private key loaded