{"version":3,"file":"get-account-config-from-environment.mjs","names":[],"sources":["../../src/account/get-account-config-from-environment.ts"],"sourcesContent":["import { AccountConfig } from '../types/account'\n\n/**  @deprecated Use algokit.mnemonicAccountFromEnvironment, which doesn't need this function\n * Returns the Account configuration from environment variables\n *\n * @param accountName account name\n *\n * @example environment variables\n * {accountName}_MNEMONIC\n * {accountName}_SENDER\n *\n */\nexport function getAccountConfigFromEnvironment(accountName: string): AccountConfig {\n  if (!process || !process.env) {\n    throw new Error('Attempt to get account with private key from a non Node.js context; not supported!')\n  }\n\n  return {\n    accountMnemonic: process.env[`${accountName.toUpperCase()}_MNEMONIC`] || '',\n    senderAddress: process.env[`${accountName.toUpperCase()}_SENDER`],\n    accountName,\n  }\n}\n"],"mappings":";;;;;;;;;;;AAYA,SAAgB,gCAAgC,aAAoC;CAClF,IAAI,CAAC,WAAW,CAAC,QAAQ,KACvB,MAAM,IAAI,MAAM,oFAAoF;CAGtG,OAAO;EACL,iBAAiB,QAAQ,IAAI,GAAG,YAAY,YAAY,EAAE,eAAe;EACzE,eAAe,QAAQ,IAAI,GAAG,YAAY,YAAY,EAAE;EACxD;CACF;AACF"}