getAddressFromResolvedInstructionAccount
Extracts the address from a resolved instruction account.
A resolved instruction account can be an Address, a ProgramDerivedAddress,
or any object exposing an address property — such as a TransactionSigner, an
account meta, or a framework's address wrapper class (see HasAddress). This
function extracts the underlying address from any of these types.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
T extends string | string | The address type, defaults to string. |
Parameters
| Parameter | Type | Description |
|---|---|---|
inputName | string | The name of the instruction input, used in error messages. |
value | | InstructionAccountInput<T> | InstructionSignerInput<T> | null | undefined | The resolved account value to extract the address from. |
Returns
Address<T>
The extracted address.
Throws
Throws a SolanaError if the value is null or undefined.