Find Reference

Find the oldest transaction signature referencing a given public key.

def find_reference(client: Client, reference: PublicKey)
copy

Parameters

client: Client

A connection client to the cluster.

reference: PublicKey

The signature of the transaction to validate.

Returns TransactionSignature

Example

from solathon import Client
from solathon.solana_pay import find_reference
client = Client("https://api.devnet.solana.com")
# Some valid transfer reference obtained in `create_transfer`
reference = "XYZ"
sign: TransactionSignature = find_reference(client, reference)
copy

The complete example code can be found here.