# Aligned-PY
Aligned-PY is a Python library for interacting with the Aligned layer.
## SDK API Reference
### submit
Submits a proof to the batcher to be verified and returns an aligned verification data struct.
```py
from aligned_py.sdk import submit, Network
async def main():
result = await submit(
"BATCHER_URL",
"NETWORK.NAME",
"VerificationData",
"MAX_FEE",
"WALLET_ACCOUNT",
"NONCE"
)
print(result)
```
### submit_multiple
Submits multiple proofs to the batcher to be verified and returns an aligned verification data array.
```py
from aligned_py.sdk import submit_multiple, Network
async def main():
result = await submit_multiple(
"BATCHER_URL",
"NETWORK.NAME",
"List[VerificationData]",
"MAX_FEE",
"WALLET_ACCOUNT",
"NONCE"
)
print(result)
```
### submit_and_wait_verification
Submits a proof to the batcher to be verified, waits for the verification on ethereum and returns an aligned verification data struct.
```py
from aligned_py.sdk import submit_and_wait_verification, Network
async def main():
result = await submit_multiple(
"BATCHER_URL",
"ETH_RPC_URL",
"NETWORK.NAME",
"VerificationData",
"MAX_FEE",
"WALLET_ACCOUNT",
"NONCE"
)
print(result)
```
### is_proof_verified
Checks if the proof has been verified with Aligned and is included in the batch on-chain.
```py
from aligned_py.sdk import is_proof_verified, Network
def main():
verified = is_proof_verified(
"AlignedVerificationData",
"NETWORK.NAME",
"ETH_RPC_URL"
)
print(verified)
```
### get_next_nonce
Returns the nonce to use for a given address.
```py
from aligned_py.sdk import get_next_nonce, Network
def main():
nonce = get_next_nonce(
"ETH_RPC_URL",
"ADDRESS",
"NETWORK.NAME"
)
print(nonce)
```
### get_balance_in_aligned
Queries a User's balance that was deposited in Aligned
```py
from aligned_py.sdk import get_next_nonce, Network
def main():
nonce = get_next_nonce(
"ETH_RPC_URL",
"ADDRESS",
"NETWORK.NAME"
)
print(nonce)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/broly-labs/aligned-py",
"name": "aligned-py",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "aligned, network, python, library",
"author": "Broly Labs",
"author_email": "khairallah@web3arabs.com",
"download_url": "https://files.pythonhosted.org/packages/45/f9/0634e8e0d3dc0ef56c37e5d57269969a28f8c23a6b1ca7d4e53ccd765049/aligned_py-0.1.2.tar.gz",
"platform": null,
"description": "# Aligned-PY\n\nAligned-PY is a Python library for interacting with the Aligned layer.\n\n## SDK API Reference\n\n### submit\n\nSubmits a proof to the batcher to be verified and returns an aligned verification data struct.\n\n```py\nfrom aligned_py.sdk import submit, Network\n\nasync def main():\n result = await submit(\n \"BATCHER_URL\",\n \"NETWORK.NAME\",\n \"VerificationData\",\n \"MAX_FEE\",\n \"WALLET_ACCOUNT\",\n \"NONCE\"\n )\n print(result)\n```\n\n### submit_multiple\n\nSubmits multiple proofs to the batcher to be verified and returns an aligned verification data array.\n\n```py\nfrom aligned_py.sdk import submit_multiple, Network\n\nasync def main():\n result = await submit_multiple(\n \"BATCHER_URL\",\n \"NETWORK.NAME\",\n \"List[VerificationData]\",\n \"MAX_FEE\",\n \"WALLET_ACCOUNT\",\n \"NONCE\"\n )\n print(result)\n```\n\n### submit_and_wait_verification\n\nSubmits a proof to the batcher to be verified, waits for the verification on ethereum and returns an aligned verification data struct.\n\n```py\nfrom aligned_py.sdk import submit_and_wait_verification, Network\n \nasync def main():\n result = await submit_multiple(\n \"BATCHER_URL\",\n \"ETH_RPC_URL\",\n \"NETWORK.NAME\",\n \"VerificationData\",\n \"MAX_FEE\",\n \"WALLET_ACCOUNT\",\n \"NONCE\"\n )\n print(result)\n```\n\n### is_proof_verified\n\nChecks if the proof has been verified with Aligned and is included in the batch on-chain.\n\n```py\nfrom aligned_py.sdk import is_proof_verified, Network\n\ndef main(): \n verified = is_proof_verified(\n \"AlignedVerificationData\",\n \"NETWORK.NAME\",\n \"ETH_RPC_URL\"\n )\n print(verified)\n```\n\n### get_next_nonce\n\nReturns the nonce to use for a given address.\n\n```py\nfrom aligned_py.sdk import get_next_nonce, Network\n\ndef main(): \n nonce = get_next_nonce(\n \"ETH_RPC_URL\",\n \"ADDRESS\",\n \"NETWORK.NAME\"\n )\n print(nonce)\n```\n\n### get_balance_in_aligned\n\nQueries a User's balance that was deposited in Aligned\n\n```py\nfrom aligned_py.sdk import get_next_nonce, Network\n\ndef main(): \n nonce = get_next_nonce(\n \"ETH_RPC_URL\",\n \"ADDRESS\",\n \"NETWORK.NAME\"\n )\n print(nonce)\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Aligned-PY is a Python library for interacting with the Aligned layer.",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://docs.alignedlayer.com/",
"Homepage": "https://github.com/broly-labs/aligned-py",
"Repository": "https://github.com/broly-labs/aligned-py"
},
"split_keywords": [
"aligned",
" network",
" python",
" library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2ef7263fc9dbd79124b58d1d5a277576ca1ab6a49031aebf844832caa8a5729",
"md5": "e6356abfd3a7b26ad3e0c904d473b403",
"sha256": "6c5d3cb619c23fba8407810b3699571dbd8f8a0808fd5de9114b3bd46474d9a2"
},
"downloads": -1,
"filename": "aligned_py-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e6356abfd3a7b26ad3e0c904d473b403",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 109149,
"upload_time": "2024-11-05T23:51:25",
"upload_time_iso_8601": "2024-11-05T23:51:25.508320Z",
"url": "https://files.pythonhosted.org/packages/e2/ef/7263fc9dbd79124b58d1d5a277576ca1ab6a49031aebf844832caa8a5729/aligned_py-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "45f90634e8e0d3dc0ef56c37e5d57269969a28f8c23a6b1ca7d4e53ccd765049",
"md5": "175897996e4fa245e24106e90849d97d",
"sha256": "1847dec3c9919cfea2f0936afa69728142aa745f31ef26aa3fa58615647a5df3"
},
"downloads": -1,
"filename": "aligned_py-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "175897996e4fa245e24106e90849d97d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 105403,
"upload_time": "2024-11-05T23:51:27",
"upload_time_iso_8601": "2024-11-05T23:51:27.369812Z",
"url": "https://files.pythonhosted.org/packages/45/f9/0634e8e0d3dc0ef56c37e5d57269969a28f8c23a6b1ca7d4e53ccd765049/aligned_py-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-05 23:51:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "broly-labs",
"github_project": "aligned-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "aligned-py"
}