Aligned-PY is a Python library for interacting with the Aligned layer.
Project description
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.
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.
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.
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.
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.
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
from aligned_py.sdk import get_next_nonce, Network
def main():
balance = get_balance_in_aligned(
"ADDRESS",
"ETH_RPC_URL",
"NETWORK.NAME"
)
print(balance)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aligned_py-0.2.0a0.tar.gz
.
File metadata
- Download URL: aligned_py-0.2.0a0.tar.gz
- Upload date:
- Size: 106.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461dcb1809d688bb68e3d5f3f9c8cc9a32a6d63765801ed263572d3d3ad4e263 |
|
MD5 | 4a57f0f7fe5535f6b1f311d6497a6443 |
|
BLAKE2b-256 | 0101d48e7d968ee9ddbfb27a5b9b999d63c772f97bdcf2e4c3bb45d3a8390fe8 |
File details
Details for the file aligned_py-0.2.0a0-py3-none-any.whl
.
File metadata
- Download URL: aligned_py-0.2.0a0-py3-none-any.whl
- Upload date:
- Size: 109.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2166316edc987d7aa76f01d5f90ebf07806606e95462d0c556a93bdb3c94aec2 |
|
MD5 | ffd3f74f78ba7800f3f1ddc6f90d36b1 |
|
BLAKE2b-256 | 843bccfb64e9efa9a8aa6f4d6afa8d1e7f6ee352fd27b8b0e81b4069324e17aa |