You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The session classes now provide all the SDK functionalities.
The `synchronous` and `asynchronous` modules are removed in
favor of the `UserSession` and `AuthenticatedUserSession` classes.
`UserSession` is intended as a read-only session to access public
API endpoints, while `AuthenticatedUserSession` requires a chain
account and allows the user to post messages to the Aleph network.
Example usage:
```
from aleph_client import AuthenticatedUserSession
async def post_message():
async with AuthenticatedUserSession(
account=fixture_account, api_server=emitter_node
) as session:
post_message, message_status = await session.create_post(
post_content={"Hello": "World"},
)
```
Both classes provide a synchronous context manager and an equivalent
sync class for non-async code.
Breaking changes:
- Everything: the SDK API is entirely modified.
0 commit comments