transactionConfigMaskHasPriorityFee
Checks whether the transaction config mask indicates a priority fee is present.
The priority fee uses bits 0 and 1 of the mask. Both bits must be set or both must be unset — having only one bit set is invalid and will throw an error.
Parameters
| Parameter | Type | Description |
|---|---|---|
mask | number | The transaction config mask to check. |
Returns
boolean
true if the mask indicates a priority fee is present, false otherwise.
Throws
Throws SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_MASK_PRIORITY_FEE_BITS
if only one of the two priority fee bits is set.
Example
Check if a mask has a priority fee.