Skip to content

Releases: alsekaram/eosapi_async

v2.2.2

Choose a tag to compare

@alsekaram alsekaram released this 30 Sep 21:08
a5acc4f

Fixes

  • bytes ABI fields accept a hex string, as in Antelope JSON and on the node (e.g. nonce in m.federation::mine). Before, serialization failed with TypeError: can't concat str to bytes. bytes values still work, and an invalid hex string raises SerializationError naming the field.
  • NodeException and TransactionException have status and body (parsed JSON or text). In async code e.resp is an aiohttp response that is already closed, so its body can't be read; e.body can. e.resp is unchanged.
  • Warnings point at your code. The plain HTTP rpc_host warning and the FutureWarnings now show the line in your code, not a line inside the library.

No breaking changes. Tested on Python 3.12, 3.13 and 3.14.

Install: pip install -U "eosapi-async[fast]==2.2.2" (on Python 3.14 without [fast]).

v2.2.1

Choose a tag to compare

@alsekaram alsekaram released this 30 Sep 19:58

Fixes a compatibility break from 2.2.0, adds optional ~27x faster signing, and fixes several bugs.

Changed back from 2.2.0

  • Async requests return the error body again on a non-2xx, non-500 node response, as before 2.2.0, now with a FutureWarning. In 2.2.0 they raised NodeException, which is not a subclass of TransactionException, so code catching only TransactionException broke.
  • New raise_on_node_error parameter: True raises NodeException (the 3.0 default), False keeps returning the error body without a warning.

Faster signing (optional)

  • pip install "eosapi-async[fast]" makes signing about 27x faster (~0.16 ms instead of ~4 ms): the elliptic curve multiplication runs in C via coincurve (libsecp256k1).
  • Without the extra, the pure Python path is used, as before. Signatures are byte-for-byte the same either way.
  • coincurve has no wheel for Python 3.14 yet, so use the plain install there.

Proxy

  • proxy now applies to async requests too. Before, async requests ignored it and went out directly.
  • yeomen_proxy was removed: passing it raises TypeError.

Fixes

  • Async works across event loops: a second asyncio.run() no longer fails with Event loop is closed. New await api.close() and async with EosApi(...) as api.
  • timeout applies to async requests (before, aiohttp's 5 minute default was used).
  • With a CPU payer set, the transaction dict passed in is no longer modified, so pushing the same dict again works.
  • A failed get_info in async code is no longer cached for 5 minutes; a bad get_info response raises NodeException instead of KeyError.
  • An account without a contract raises NodeException instead of TypeError.
  • push_transaction accepts cpu_usage=; push_transaction_async(trx, signatures) works, with a FutureWarning.
  • No DeprecationWarning from datetime.utcnow() on Python 3.12+.

Packaging

  • Dependencies are version ranges instead of exact pins; python_requires=">=3.12".
  • Added a test suite (pip install -e .[test], pytest). Tested on Python 3.12, 3.13 and 3.14, with the latest and the minimum dependency versions.

Install: pip install -U "eosapi-async[fast]==2.2.1"

v2.2.0

Choose a tag to compare

@alsekaram alsekaram released this 30 Sep 18:22
40feadf

Security release.

Fixes

  • Sync client proxy was bypassed. The proxy was passed to requests as a bare string, which it silently ignores, so requests went out directly from the real IP. It is now passed as a {"http": ..., "https": ...} mapping.
  • Off-by-one in Proxy.get_random_proxy: it could pick a port outside the configured range.
  • Private keys are no longer shown in repr(Account).
  • Async requests no longer log request data, and a debug print in NodeException was removed.

New

  • expected_chain_id parameter: transactions are signed only if the node reports this chain id.
  • set_abi(code, abi): use a trusted local ABI instead of the one served by the node.
  • rpc_host is validated: it must be an http(s) URL, and plain HTTP to a non-local host emits a warning.

Breaking changes

  • Async requests now raise NodeException on any non-2xx response, as the sync ones do. Before, they returned the error body.
  • An rpc_host without a scheme now raises ValueError.

Dependencies

Raised minimum versions: aiohttp>=3.12.14, requests>=2.32.4, pycryptodome>=3.19.1.

Install: pip install -U eosapi-async==2.2.0