-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Middleware documentation / Guide #6963
Comments
Create plugin developers Guide for Middleware implementation:
2- Transaction Middleware: ( works for Eth and Contracts package )
Some code snippets in tests:
Eth Transaction middleware:
Contract Transaction middleware: web3.js/tools/web3-plugin-example/test/unit/contract_transaction_middleware.test.ts Line 30 in 9afaa61
|
@jdevcs why is it necessary to add a new property to the plugin class AND register the plugin in the |
@danforbes add a new property to the plugin class is not necessary, middleware can be injected in plugin, or plugin can have access to middleware via other ways, but registering (Transaction or Request ) middleware in link method is necessary because it will set middleware via web3-context to Web3-Eth & Web3-Contract or Web3-Request-Manager, so when normal request is sent via other web3 packages it can see if middleware is there or not for usage. |
* Add Plugin Middleware Documentation Closes #6963 * Clarify Request Middleware Response Processing
Related feature work can be found at:
#7134
#7002
#7003
The text was updated successfully, but these errors were encountered: