assertAccountExists
Given a MaybeAccount, asserts that the account exists and allows it to be used as an Account type 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 |
---|---|
account | MaybeAccount <TData , TAddress > |
Returns
asserts account is BaseAccount & { address: Address<TAddress>; data: TData } & { exists: true }