getSignatureFromTransactionIfPresent
Given a transaction, this method will return the Signature that uniquely identifies it,
or undefined when its fee payer has not signed it yet.
Use this in preference to getSignatureFromTransaction when a transaction is legitimately allowed to be unsigned by its fee payer — for instance one that has been partially signed by an authority and is destined for a relayer that will pay for it.
Parameters
| Parameter | Type |
|---|---|
transaction | Transaction |
Returns
Signature | undefined
The transaction's signature, or undefined if its fee payer has not signed it.
Example
See
getSignatureFromTransaction if you expect the transaction to have been signed by its fee payer and want to throw otherwise.