plugin.d.ts 792 B

12345678910111213141516171819202122232425262728
  1. import { TronWeb } from '../tronweb.js';
  2. interface PluginConstructorOptions {
  3. disablePlugins?: boolean;
  4. }
  5. interface PluginClassInterface {
  6. new (tronWeb: TronWeb): {
  7. pluginInterface?: (options: PluginOptions) => PluginInterfaceReturn;
  8. };
  9. }
  10. interface PluginInterfaceReturn {
  11. requires: string;
  12. components?: Record<string | number | symbol, any>;
  13. fullClass?: boolean;
  14. }
  15. type PluginOptions = any;
  16. export declare class Plugin {
  17. tronWeb: TronWeb;
  18. pluginNoOverride: string[];
  19. disablePlugins: boolean;
  20. constructor(tronWeb: TronWeb, options?: PluginConstructorOptions);
  21. register(Plugin: PluginClassInterface, options?: PluginOptions): {
  22. libs: any[];
  23. plugged: any[];
  24. skipped: any[];
  25. error?: string;
  26. };
  27. }
  28. export {};