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

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.2.0a0.tar.gz (106.0 kB view details)

Uploaded Source

Built Distribution

aligned_py-0.2.0a0-py3-none-any.whl (109.9 kB view details)

Uploaded Python 3

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

Hashes for aligned_py-0.2.0a0.tar.gz
Algorithm Hash digest
SHA256 461dcb1809d688bb68e3d5f3f9c8cc9a32a6d63765801ed263572d3d3ad4e263
MD5 4a57f0f7fe5535f6b1f311d6497a6443
BLAKE2b-256 0101d48e7d968ee9ddbfb27a5b9b999d63c772f97bdcf2e4c3bb45d3a8390fe8

See more details on using hashes here.

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

Hashes for aligned_py-0.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 2166316edc987d7aa76f01d5f90ebf07806606e95462d0c556a93bdb3c94aec2
MD5 ffd3f74f78ba7800f3f1ddc6f90d36b1
BLAKE2b-256 843bccfb64e9efa9a8aa6f4d6afa8d1e7f6ee352fd27b8b0e81b4069324e17aa

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