Skip to main content

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():    
    nonce = get_next_nonce(
        "ETH_RPC_URL",
        "ADDRESS",
        "NETWORK.NAME"
    )
    print(nonce)

Release files for aligned-py 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aligned-py 0.1.2
File Size Uploaded
aligned_py-0.1.2.tar.gz 105.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aligned-py 0.1.2
File Interpreter ABI Platform
aligned_py-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 214.6 kB

Release files / aligned_py-0.1.2.tar.gz

Download URL aligned_py-0.1.2.tar.gz
Size 105.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1847dec3c9919cfea2f0936afa69728142aa745f31ef26aa3fa58615647a5df3
BLAKE2b-256 checksum
How to use checksums
45f90634e8e0d3dc0ef56c37e5d57269969a28f8c23a6b1ca7d4e53ccd765049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Darwin/24.1.0

Release files / aligned_py-0.1.2-py3-none-any.whl

Download URL aligned_py-0.1.2-py3-none-any.whl
Size 109.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c5d3cb619c23fba8407810b3699571dbd8f8a0808fd5de9114b3bd46474d9a2
BLAKE2b-256 checksum
How to use checksums
e2ef7263fc9dbd79124b58d1d5a277576ca1ab6a49031aebf844832caa8a5729
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Darwin/24.1.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page