Skip to content

getAlgoKmdClient

getAlgoKmdClient(config?): KmdClient

Defined in: algokit-utils-ts/src/network-client.ts:144

AlgoClientConfig

The config if you want to override the default (getting config from process.env)

KmdClient

Default (load from environment variables)

// Uses process.env.ALGOD_SERVER, process.env.KMD_PORT (or if not specified: port 4002) and process.env.ALGOD_TOKEN
const kmd = getAlgoKmdClient()

Custom (e.g. default LocalNet, although we recommend loading this into a .env and using the Default option instead)

const kmd = getAlgoKmdClient({server: 'http://localhost', port: '4002', token: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'})