assertAccountsExist
Given an array of MaybeAccounts, asserts that all the accounts exist and allows them to be used as an array of Accounts going forward.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TData extends | object | Uint8Array<ArrayBufferLike> | - | The nature of this account's data. It can be represented as either a Uint8Array – meaning the account is encoded – or a custom data type – meaning the account is decoded. |
TAddress extends string | string | Supply a string literal to define an account having a particular address. |
Parameters
| Parameter | Type |
|---|---|
accounts | MaybeAccount<TData, TAddress>[] |
Returns
asserts accounts is (BaseAccount & { address: Address<TAddress>; data: TData } & { exists: true })[]