Add token to beekeeper api calls
We need to add possibility to send token when performing api calls (other than create_session
) .
Currently we have such situation:
async def test_raw_create_session(beekeeper: Beekeeper) -> None:
ab = AsyncBeekeeper(http_url=beekeeper.http_endpoint)
token = (await ab.api.beekeeper.create_session(notifications_endpoint=beekeeper.notification_server_http_endpoint.as_string(with_protocol=False), salt="12314")).token
# NO WORKING
# await ab.api.beekeeper.create(wallet_name="wallet_name", password="pass")
# helpy._handles.abc.handle:_async_send:194 - sending to `http://127.0.0.1:39235`: `{"id": 0, "jsonrpc": "2.0", "method": "beekeeper_api.create", "params":{"wallet_name": "wallet_name", "password": "pass"}}`
# WORKING - BUT NEED TO PASS TOKEN EXPLICITLY, BUT MYPY COMPLAINS ABOUT IT
await ab.api.beekeeper.create(token=token, wallet_name="wallet_name", password="pass") # helpy._handles.abc.handle:_async_send:194 - sending to `http://127.0.0.1:40023`: `{"id": 0, "jsonrpc": "2.0", "method": "beekeeper_api.create", "params":{"token": "4fd6fb7aa0c6b359d5ec1cadc00048841a5171e3277f9b64be4d0e284f5bedd7", "wallet_name": "wallet_name", "password": "pass"}}`