|
4 | 4 | # Licensed under the MIT License. |
5 | 5 | # See License.txt in the project root for license information. |
6 | 6 | # -------------------------------------------------------------------- |
| 7 | +from typing import Union, Any |
7 | 8 |
|
8 | 9 | import ecdsa |
9 | 10 | from eth_utils import apply_to_return_value, to_hex |
@@ -52,16 +53,18 @@ class Tron: |
52 | 53 | # Validate address |
53 | 54 | isAddress = staticmethod(is_address) |
54 | 55 |
|
55 | | - def __init__(self, full_node, solidity_node, |
56 | | - event_server=None, |
57 | | - private_key=None, |
58 | | - modules=None): |
| 56 | + def __init__(self, |
| 57 | + full_node: Union[str, HttpProvider], |
| 58 | + solidity_node: Union[str, HttpProvider], |
| 59 | + event_server: Union[str, HttpProvider]=None, |
| 60 | + private_key: str=None, |
| 61 | + modules: Any=None): |
59 | 62 | """Connect to the Tron network. |
60 | 63 |
|
61 | 64 | Args: |
62 | | - full_node (:obj:`str`): A provider connected to a valid full node |
63 | | - solidity_node (:obj:`str`): A provider connected to a valid solidity node |
64 | | - event_server (:obj:`str`, optional): Optional for smart contract events. Expects a valid event server URL |
| 65 | + full_node (Any): A provider connected to a valid full node |
| 66 | + solidity_node (Any): A provider connected to a valid solidity node |
| 67 | + event_server (Any): Optional for smart contract events. Expects a valid event server URL |
65 | 68 | private_key (str): Optional default private key used when signing transactions |
66 | 69 |
|
67 | 70 | """ |
|
0 commit comments