Get Explorer Link
Get a link to view an address, transaction, or token on Solana Explorer. The link will automatically use your RPC.
Returns: string
- Explorer URL
Examples
Get a link to view an address:
const addressLink = connection.getExplorerLink("address", "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn");
Get a link to view a transaction:
const transactionLink = connection.getExplorerLink(
"transaction",
"5rUQ2tX8bRzB2qJWnrBhHYgHsafpqVZwGwxVrtyYFZXJZs6yBVwerZHGbwsrDHKbRtKpxnWoHKmBgqYXVbU5TrHe",
);
Or if you like abbreviations:
const transactionLink = connection.getExplorerLink(
"tx",
"5rUQ2tX8bRzB2qJWnrBhHYgHsafpqVZwGwxVrtyYFZXJZs6yBVwerZHGbwsrDHKbRtKpxnWoHKmBgqYXVbU5TrHe",
);
Get a link to view a block:
const blockLink = connection.getExplorerLink("block", "180392470");
Options
linkType
:"transaction" | "tx" | "address" | "block"
- Type of entity to link toid
:string
- The address, signature, or block to link to
See also: Get Recent Signature Confirmation, Get Logs
Last updated on