Releases: alsekaram/eosapi_async
Releases · alsekaram/eosapi_async
Release list
v2.2.2
Fixes
bytesABI fields accept a hex string, as in Antelope JSON and on the node (e.g.nonceinm.federation::mine). Before, serialization failed withTypeError: can't concat str to bytes.bytesvalues still work, and an invalid hex string raisesSerializationErrornaming the field.NodeExceptionandTransactionExceptionhavestatusandbody(parsed JSON or text). In async codee.respis an aiohttp response that is already closed, so its body can't be read;e.bodycan.e.respis unchanged.- Warnings point at your code. The plain HTTP
rpc_hostwarning and theFutureWarnings 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
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 raisedNodeException, which is not a subclass ofTransactionException, so code catching onlyTransactionExceptionbroke. - New
raise_on_node_errorparameter:TrueraisesNodeException(the 3.0 default),Falsekeeps 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 viacoincurve(libsecp256k1).- Without the extra, the pure Python path is used, as before. Signatures are byte-for-byte the same either way.
coincurvehas no wheel for Python 3.14 yet, so use the plain install there.
Proxy
proxynow applies to async requests too. Before, async requests ignored it and went out directly.yeomen_proxywas removed: passing it raisesTypeError.
Fixes
- Async works across event loops: a second
asyncio.run()no longer fails withEvent loop is closed. Newawait api.close()andasync with EosApi(...) as api. timeoutapplies 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_infoin async code is no longer cached for 5 minutes; a badget_inforesponse raisesNodeExceptioninstead ofKeyError. - An account without a contract raises
NodeExceptioninstead ofTypeError. push_transactionacceptscpu_usage=;push_transaction_async(trx, signatures)works, with aFutureWarning.- No
DeprecationWarningfromdatetime.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
Security release.
Fixes
- Sync client proxy was bypassed. The proxy was passed to
requestsas 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
printinNodeExceptionwas removed.
New
expected_chain_idparameter: 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_hostis validated: it must be anhttp(s)URL, and plain HTTP to a non-local host emits a warning.
Breaking changes
- Async requests now raise
NodeExceptionon any non-2xx response, as the sync ones do. Before, they returned the error body. - An
rpc_hostwithout a scheme now raisesValueError.
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