@wharfkit/transact-plugin-explorerlink
v1.0.1
Published
A transact plugin to display a link to a block explorer after a transaction is broadcast.
Downloads
33
Readme
@wharfkit/transact-plugin-explorerlink
A plugin to display a link to a block explorer after a transaction has been completed.
Usage
When instantiating your Session Kit, ensure you have the explorer
parameter defined on the ChainDefintion
for each blockchain, and then add the TransactPluginExplorerLink
as a transactPlugin
.
import {TransactPluginExplorerLink} from '@wharfkit/transact-plugin-resource-provider'
const kit = new SessionKit({
// ... all your other options
chains: [
{
id: '73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d',
url: 'https://jungle4.greymass.com',
// Make sure to define the structure of an explorer link for each chain in your chain definitions.
explorer: {
prefix: 'https://jungle4.eosq.eosnation.io/tx/',
suffix: '',
},
},
],
// Include the explorer link plugin
transactPlugins: [new TransactPluginExplorerLink()],
})
Developing
You need Make, node.js and yarn installed.
Clone the repository and run make
to checkout all dependencies and build the project. See the Makefile for other useful targets. Before submitting a pull request make sure to run make lint
.
Made with ☕️ & ❤️ by Greymass, if you find this useful please consider supporting us.