Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make kmd argument optional in getAccount overload #93

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/code/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ The requested account with private key loaded from the environment variables or

[src/account.ts:92](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/account.ts#L92)

▸ **getAccount**(`account`, `algod`, `kmdClient`): `Promise`<`Account` \| [`SigningAccount`](../classes/types_account.SigningAccount.md)\>
▸ **getAccount**(`account`, `algod`, `kmdClient?`): `Promise`<`Account` \| [`SigningAccount`](../classes/types_account.SigningAccount.md)\>

Returns an Algorand account with private key loaded by convention based on the given name identifier.

Expand All @@ -523,7 +523,7 @@ If that code runs against LocalNet then a wallet called `ACCOUNT` will automatic
| `account.config` | [`AccountConfig`](../interfaces/types_account.AccountConfig.md) | - |
| `account.fundWith?` | [`AlgoAmount`](../classes/types_amount.AlgoAmount.md) | - |
| `algod` | `default` | An algod client |
| `kmdClient` | `undefined` \| `default` | An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables |
| `kmdClient?` | `default` | An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables |

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export async function getAccount(
export async function getAccount(
account: { config: AccountConfig; fundWith?: AlgoAmount },
algod: Algodv2,
kmdClient: Kmd | undefined,
kmdClient?: Kmd,
): Promise<Account | SigningAccount>

/**
Expand Down