
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
async-substrate-interface
Advanced tools
Asyncio library for interacting with substrate. Mostly API-compatible with py-substrate-interface
This project provides an asynchronous interface for interacting with Substrate-based blockchains. It is based on the py-substrate-interface project.
Additionally, this project uses bt-decode instead of py-scale-codec for faster SCALE decoding.
To install the package, use the following command:
pip install async-substrate-interface
Here are examples of how to use the sync and async inferfaces:
from async_substrate_interface import SubstrateInterface
def main():
substrate = SubstrateInterface(
url="wss://rpc.polkadot.io"
)
with substrate:
result = substrate.query(
module='System',
storage_function='Account',
params=['5CZs3T15Ky4jch1sUpSFwkUbYEnsCfe1WCY51fH3SPV6NFnf']
)
print(result)
main()
import asyncio
from async_substrate_interface import AsyncSubstrateInterface
async def main():
substrate = AsyncSubstrateInterface(
url="wss://rpc.polkadot.io"
)
async with substrate:
result = await substrate.query(
module='System',
storage_function='Account',
params=['5CZs3T15Ky4jch1sUpSFwkUbYEnsCfe1WCY51fH3SPV6NFnf']
)
print(result)
asyncio.run(main())
Contributions are welcome! Please open an issue or submit a pull request to the staging
branch.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or inquiries, please join the Bittensor Development Discord server: Church of Rao.
FAQs
Asyncio library for interacting with substrate. Mostly API-compatible with py-substrate-interface
We found that async-substrate-interface demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.