Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aligned_py-0.1.2.tar.gz (105.4 kB view details)

Uploaded Source

Built Distribution

aligned_py-0.1.2-py3-none-any.whl (109.1 kB view details)

Uploaded Python 3

File details

Details for the file aligned_py-0.1.2.tar.gz.

File metadata

  • Download URL: aligned_py-0.1.2.tar.gz
  • Upload date:
  • Size: 105.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.1.0

File hashes

Hashes for aligned_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1847dec3c9919cfea2f0936afa69728142aa745f31ef26aa3fa58615647a5df3
MD5 175897996e4fa245e24106e90849d97d
BLAKE2b-256 45f90634e8e0d3dc0ef56c37e5d57269969a28f8c23a6b1ca7d4e53ccd765049

See more details on using hashes here.

File details

Details for the file aligned_py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aligned_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 109.1 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

Hashes for aligned_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6c5d3cb619c23fba8407810b3699571dbd8f8a0808fd5de9114b3bd46474d9a2
MD5 e6356abfd3a7b26ad3e0c904d473b403
BLAKE2b-256 e2ef7263fc9dbd79124b58d1d5a277576ca1ab6a49031aebf844832caa8a5729

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page