Skip to main content

Blockchain components for the LlamaAI Ecosystem (verification, contracts, provenance).

Project description

llama-blockchain

PyPI version License Python Version CI Status

Llama Blockchain (llama-blockchain) is a comprehensive toolkit for interacting with blockchain technologies within the LlamaSearch AI ecosystem. It offers modules for managing various blockchain elements like smart contracts, DAOs, NFTs, tokens, cryptographic keys, transaction verification, zero-knowledge proofs, and data provenance.

Key Features

  • Smart Contract Interaction: Tools for validating and potentially interacting with smart contracts (contract_validator.py).
  • DAO Management: Components for managing Decentralized Autonomous Organizations (dao-manager.py).
  • NFT Management: Functionality for handling Non-Fungible Tokens (nft_manager.py).
  • Token Management: Tools for managing fungible tokens (token-manager.py).
  • Key Management: Secure handling of cryptographic keys (key-manager.py).
  • Blockchain Verification: Utilities for verifying blockchain data or transactions (blockchain-verifier.py).
  • Provenance Tracking: Tools to track data origin and history on the blockchain (provenance-tracker.py).
  • Zero-Knowledge Proofs: Includes components related to ZK proofs (zk_prover.py).
  • Transaction Utilities: Helper functions for blockchain transactions (transaction_utils.py).
  • Configurable: Settings and configuration management (config.py, settings.py).
  • Core Orchestration: A central module (core.py) likely integrates these components.

Installation

pip install llama-blockchain
# Or install directly from GitHub for the latest version:
# pip install git+https://github.com/llamasearchai/llama-blockchain.git

Usage

(Usage examples for interacting with contracts, managing tokens/NFTs, verifying data, etc., will be added here.)

# Placeholder for Python client usage
# from llama_blockchain import BlockchainClient, ContractConfig

# config = ContractConfig.load("config.yaml")
# client = BlockchainClient(config)

# # Example: Validate a contract
# is_valid = client.validate_contract(address="0x...")
# print(f"Contract valid: {is_valid}")

# # Example: Get token balance
# balance = client.get_token_balance(token_address="0x...", user_address="0x...")
# print(f"Token balance: {balance}")

# # Example: Track provenance
# provenance_id = client.track_data(data="some important data")
# print(f"Provenance ID: {provenance_id}")

Architecture Overview

graph TD
    A[User / Application] --> B{Core Orchestrator (core.py)};

    subgraph Managers
        C[DAO Manager] -- Interacts --> B;
        D[NFT Manager] -- Interacts --> B;
        E[Token Manager] -- Interacts --> B;
        F[Key Manager] -- Interacts --> B;
        R[Ranking Manager] -- Interacts --> B;
    end

    subgraph Validation & Proofs
        G[Contract Validator] -- Interacts --> B;
        H[Blockchain Verifier] -- Interacts --> B;
        I[ZK Prover] -- Interacts --> B;
    end

    subgraph Tracking & Utilities
        J[Provenance Tracker] -- Interacts --> B;
        K[Transaction Utils] -- Used by --> B;
        L[Exceptions] -- Used by --> B;
    end

    M[Configuration (config.py, settings.py)] -- Configures --> B;
    M -- Configures --> C;
    M -- Configures --> D;
    M -- Configures --> E;
    M -- Configures --> F;
    M -- Configures --> G;
    M -- Configures --> H;
    M -- Configures --> I;
    M -- Configures --> J;

    B --> N((Blockchain Network / Nodes));

    style B fill:#f9f,stroke:#333,stroke-width:2px
    style N fill:#ccf,stroke:#333,stroke-width:1px
  1. Core Orchestrator: The central point (core.py) managing interactions with various blockchain components.
  2. Managers: Dedicated modules handle specific areas like DAOs, NFTs, Tokens, Keys, and Ranking.
  3. Validation/Proofs: Components for contract validation, general blockchain verification, and ZK proofs.
  4. Tracking/Utilities: Tools for data provenance and transaction helpers.
  5. Configuration: Settings control the behavior of the toolkit.
  6. Network Interaction: The core module communicates with the underlying blockchain network.

Configuration

(Details on configuring blockchain node connections, contract addresses, gas settings, key storage, etc., will be added here.)

Development

Setup

# Clone the repository
git clone https://github.com/llamasearchai/llama-blockchain.git
cd llama-blockchain

# Install in editable mode with development dependencies
pip install -e ".[dev]"

Testing

pytest tests/

Contributing

Contributions are welcome! Please refer to CONTRIBUTING.md and submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

llama_blockchain-0.1.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_blockchain-0.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file llama_blockchain-0.1.0.tar.gz.

File metadata

  • Download URL: llama_blockchain-0.1.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for llama_blockchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4318c5666d89e6d29a6c021c5e2610d2723ee9d88000971a6c8e139df780b3a4
MD5 8c3737b2a551f3f65a74ca86938ec111
BLAKE2b-256 02577b2ef1be13acea96a2303f0cc6ac0dd969b63cf934504f639da49b871abd

See more details on using hashes here.

File details

Details for the file llama_blockchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_blockchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 546191c210cc0bbb9f3c54a4790e1d76e9b33ee07bc4bbc78f91e30176351e08
MD5 70a49b2da39462ba1b245696333278fc
BLAKE2b-256 74410edbc6fefa9a5ebd6e5e2afe332650596193dbfb27be67656a18d567ea25

See more details on using hashes here.

Supported by

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