ain.provider module
- class ain.provider.Provider(ain: Ain, endpoint: str)
Bases:
object
Class for the AIN Blockchain node provider.
- async getAddress() str
Fetches the blockchain node’s address.
Args:
- Returns:
The return value of the blockchain API.
- async send(rpcMethod: str, params: dict = {})
Creates the JSON-RPC payload and sends it to the node.
- Parameters:
rpcMethod (str) – The JSON-RPC method name.
params (dict) – The parameters for the payload.
- Returns:
The response result.
- apiEndPoint: str
The JSON-RPC API endpoint of the node provider.
- endPoint: str
The endpoint of the node provider.