setTransactionMessagePriorityFeeLamports
Sets the total priority fee for a v1 transaction message.
In v1 transactions, the priority fee is expressed as a total amount in lamports — what you set is what you pay, regardless of the compute unit limit.
Type Parameters
| Type Parameter | Description |
|---|---|
TTransactionMessage extends TransactionMessage & object | The transaction message type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
priorityFeeLamports | bigint | undefined | The priority fee amount in lamports, or undefined to remove the fee. |
transactionMessage | TTransactionMessage | The v1 transaction message to configure. |
Returns
TTransactionMessage
A new transaction message with the priority fee set.
Example
See
- getTransactionMessagePriorityFeeLamports
- setTransactionMessageComputeUnitPrice for legacy/v0 transactions.