index.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829
  1. import { TronWeb } from '../../tronweb.js';
  2. import { Method } from './method.js';
  3. import type { ContractAbiInterface } from '../../types/ABI.js';
  4. import { Address } from '../../types/Trx.js';
  5. import { CreateSmartContractOptions } from '../../types/TransactionBuilder.js';
  6. export declare class Contract {
  7. tronWeb: TronWeb;
  8. abi: ContractAbiInterface;
  9. address: false | string;
  10. eventListener: any;
  11. bytecode?: false | string;
  12. deployed?: boolean;
  13. lastBlock?: false | number;
  14. methods: Record<string | number | symbol, (...args: any) => ReturnType<Method['onMethod']>>;
  15. methodInstances: Record<string | number | symbol, Method>;
  16. props: any[];
  17. [key: string | number | symbol]: any;
  18. constructor(tronWeb: TronWeb, abi: ContractAbiInterface | undefined, address: Address);
  19. hasProperty(property: number | string | symbol): any;
  20. loadAbi(abi: ContractAbiInterface): void;
  21. decodeInput(data: string): {
  22. name: string;
  23. params: any[];
  24. };
  25. new(options: CreateSmartContractOptions, privateKey?: string | false): Promise<this>;
  26. at(contractAddress: Address): Promise<this>;
  27. }
  28. export type { CallOptions, SendOptions, AbiFragmentNoErrConstructor } from './method.js';
  29. export { Method } from './method.js';