1.0.0 • Published 2 months ago

@wharfkit/transact-plugin-finality-callback v1.0.0

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
2 months ago

@wharfkit/transact-plugin-finality-callback

A WharfKit transact plugin plugin that calls a callback function when a transaction has reached finality.

Usage

Install the plugin:

npm install @wharfkit/transact-plugin-finality-callback --save
# or
yarn add @wharfkit/transact-plugin-finality-callback

Then, when instantiating the SessionKit, add the TransactPluginFinalityCallback plugin to the transactPlugins array. The plugin will call the onFinalityCallback function when transactions reach finality.

new SessionKit(sessionArgs, {
    ...
    transactPlugins: [
        new TransactPluginFinalityCallback({
            onFinalityCallback: (getTransactionStatusResponse) => {
                // This will be called when the transaction has reached finality
            },
        }),
    ],
})

## Developing

You need [Make](https://www.gnu.org/software/make/), [node.js](https://nodejs.org/en/) and [yarn](https://classic.yarnpkg.com/en/docs/install) installed.

Clone the repository and run `make` to checkout all dependencies and build the project. See the [Makefile](./Makefile) for other useful targets. Before submitting a pull request make sure to run `make lint`.

---

Made with ☕️ & ❤️ by [Greymass](https://greymass.com), if you find this useful please consider [supporting us](https://greymass.com/support-us).
1.0.0

2 months ago

0.1.1

12 months ago

0.1.0

12 months ago