You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/docs/guides/web3_plugin_guide/plugin_authors.md
+25
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,31 @@ It is important to note that the plugin name should be structured as `@<organiza
34
34
35
35
When your users install your plugin, this will allow the package manager to make use of the user installed `web3` if available and if the version satisfies the version constraints instead of installing it's own version of `web3`.
36
36
37
+
## Add New Transaction Type
38
+
39
+
Furthermore, you have the flexibility to expand your range of transaction types, enhancing compatibility with the `web3.js` library.
40
+
41
+
42
+
```typescript
43
+
// create new TransactionType class which extends BaseTransaction class
Your plugin class should `extend` the `Web3PluginBase` abstract class. This class `extends`[Web3Context](/api/web3-core/class/Web3Context) and when the user registers your plugin with a class, your plugin's `Web3Context` will point to the module's `Web3Context` giving your plugin access to things such as user configured [requestManager](/api/web3-core/class/Web3Context#requestManager) and [accountProvider](/api/web3-core/class/Web3Context#accountProvider).
0 commit comments