@airgap/beacon-dapp
Version:
Use this package on your dApp to instanciate a DAppClient object and communicate to wallets.
43 lines • 2.15 kB
JavaScript
import { NetworkType } from '@airgap/beacon-types';
import { BlockExplorer } from './block-explorer';
export class TzktBlockExplorer extends BlockExplorer {
rpcUrls;
constructor(rpcUrls = {
[]: 'https://tzkt.io',
[]: 'https://ghostnet.tzkt.io',
[]: 'https://weeklynet.tzkt.io',
[]: 'https://dailynet.tzkt.io',
[]: 'https://delphinet.tzkt.io',
[]: 'https://edonet.tzkt.io',
[]: 'https://florencenet.tzkt.io',
[]: 'https://granadanet.tzkt.io',
[]: 'https://hangzhounet.tzkt.io',
[]: 'https://ithacanet.tzkt.io',
[]: 'https://jakartanet.tzkt.io',
[]: 'https://kathmandunet.tzkt.io',
[]: 'https://limanet.tzkt.io',
[]: 'https://mumbainet.tzkt.io',
[]: 'https://nairobinet.tzkt.io',
[]: 'https://oxfordnet.tzkt.io',
[]: 'https://parisnet.tzkt.io',
[]: 'https://seoulnet.tzkt.io',
[]: 'https://quebecnet.tzkt.io',
[]: 'https://rionet.tzkt.io',
[]: 'https://seoulnet.tzkt.io',
[]: 'https://shadownet.tzkt.io',
[]: 'https://tallinnnet.tzkt.io',
[]: 'https://shadownet.tezlink.tzkt.io'
}) {
super(rpcUrls);
this.rpcUrls = rpcUrls;
}
async getAddressLink(address, network) {
const blockExplorer = await this.getLinkForNetwork(network);
return `${blockExplorer}/${address}`;
}
async getTransactionLink(transactionId, network) {
const blockExplorer = await this.getLinkForNetwork(network);
return `${blockExplorer}/${transactionId}`;
}
}
//# sourceMappingURL=tzkt-blockexplorer.js.map