{"id":46611378,"url":"https://github.com/kajlabs/lithic","last_synced_at":"2026-03-09T20:01:20.611Z","repository":{"id":342059376,"uuid":"1171307958","full_name":"KaJLabs/Lithic","owner":"KaJLabs","description":"Lithic minimizes risk with typed AI services, cost caps, per-user budgets, and cryptographic provenance on-chain.","archived":false,"fork":false,"pushed_at":"2026-03-04T14:49:56.000Z","size":2140,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-03-04T21:48:58.864Z","etag":null,"topics":["ai","blockchain","language","litho","web3","web4"],"latest_commit_sha":null,"homepage":"https://lithic.at","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KaJLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-03T04:49:35.000Z","updated_at":"2026-03-04T20:39:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/KaJLabs/Lithic","commit_stats":null,"previous_names":["kajlabs/lithic"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/KaJLabs/Lithic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaJLabs%2FLithic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaJLabs%2FLithic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaJLabs%2FLithic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaJLabs%2FLithic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaJLabs","download_url":"https://codeload.github.com/KaJLabs/Lithic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaJLabs%2FLithic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30309998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T17:35:44.120Z","status":"ssl_error","status_checked_at":"2026-03-09T17:35:43.707Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","blockchain","language","litho","web3","web4"],"created_at":"2026-03-07T18:16:43.560Z","updated_at":"2026-03-09T20:01:20.599Z","avatar_url":"https://github.com/KaJLabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lithic — AI-Native Smart Contract Language for Lithosphere\n\n[![Status](https://img.shields.io/badge/status-final-blue.svg)](#)\n[![Language](https://img.shields.io/badge/language-Lithic%20(.lithic)-111827.svg)](#)\n[![Target](https://img.shields.io/badge/target-LithoVM-0ea5e9.svg)](#)\n[![Standards](https://img.shields.io/badge/standards-LEP100%20(1%E2%80%9314)-7b2cff.svg)](#lep100-standards)\n[![Security](https://img.shields.io/badge/security-capability--based-22c55e.svg)](#security-model)\n[![AI](https://img.shields.io/badge/ai-typed%20services%20%2B%20async-f97316.svg)](#ai-native-primitives)\n[![License](https://img.shields.io/badge/license-Apache--2.0-black.svg)](#license)\n\n**Website:** `lithic.at` • `lithiclang.ai`  \n**Docs:** `docs.lithic.at`  \n**Created by:** J. King Kasr  \n**Maintained by:** KaJ Labs  \n**Network:** Lithosphere  \n**VM Target:** LithoVM  \n\n---\n\n## What is Lithic?\n\n**Lithic** is Lithosphere’s native smart-contract programming language for deploying **AI-native** applications onchain.\n\nIt is designed for:\n\n- Typed AI services and async request/fulfill workflows  \n- Deterministic, consensus-safe execution targeting LithoVM  \n- Cost caps, per-user budgets, and programmable spend governance  \n- Capability-based permissions for safe system programming  \n- Cryptographic provenance receipts and audit-ready trace records  \n- Optional zk-verifiable AI execution for high-assurance workflows  \n- Secure, audited reference modules via LSCL (Lithosphere Secure Contracts Library)\n\n---\n\n## Key Features\n\n### AI-native primitives\n\n- `ai.service` declarations with typed configuration  \n- `ai.request` / `ai.fulfill` lifecycle  \n- Async callbacks + `.timeout()` handling  \n- Receipt binding (model/input/output hashes) for verification  \n\n### Built-in economic safety\n\n- Per-call max cost ceilings  \n- Per-user budgets and deterministic epochs  \n- Escrow locking + settlement patterns  \n\n### Capability-based security\n\n- Explicit permissions for sensitive ops (AI calls, transfers, syscalls, zk verification)  \n- Principle-of-least-privilege by construction  \n\n### Production-grade tooling\n\n- `lithc` compiler (.lithic → LithoVM bytecode)  \n- `lithfmt` formatter + `lithlint` security lints  \n- LSP support (editor integrations)  \n- Deterministic devnet + fuzz harnesses + conformance tests  \n\n### LSCL secure modules\n\nOpenZeppelin-like primitives for AI and assets:\n\n- AgentWallet  \n- ToolRouter  \n- PolicyGuard  \n- BudgetGuard  \n- TraceRecorder  \n- NFT / Multi-token / Royalties / Metadata / Bridge interfaces  \n\n---\n\n## Quick Example (AI + Async + Timeout)\n\n    requires AI_CALL\n\n    contract RiskAnalyzer {\n      state { last_report: string }\n\n      ai.service GPT4 {\n        endpoint: \"agii://provider42/gpt4\"\n        max_cost: 10 LITHO\n        // zk_required: true  // optional (LEP100-5)\n      }\n\n      public fn analyze(text: string) {\n        let req = ai.request GPT4 {\n          prompt: text,\n          temperature: 0.1,\n          max_tokens: 400\n        }\n\n        ai.fulfill(req) |response| {\n          self.last_report = response.text\n        }\n        .timeout(20 blocks)\n        .on_timeout { revert(\"AI timeout\") }\n      }\n    }\n\n---\n\n## LEP100 Standards\n\nLithic is the reference language target for the LEP100 modular protocol stack:\n\n- LEP100-1 — Lithic Core Specification  \n- LEP100-2..5 — AI providers, budgets, receipts, zk execution  \n- LEP100-6..13 — NFTs, composability, shared ownership, multi-token, royalties, metadata, marketplace hooks, bridge mint/burn  \n- LEP100-14 — Privacy-Preserving Account Linking (PPAL)\n\n---\n\n## Toolchain\n\n### Compiler\n\n- lithc — compile, test, deploy  \n\n### Developer Experience\n\n- lithfmt — canonical formatting  \n- lithlint — security checks (missing caps, unsafe async, budget misconfig)  \n- lithic-lsp — language server for IDEs  \n\n### Testing \u0026 Security\n\n- Deterministic devnet runner  \n- AI mock provider + receipt verifier  \n- Fuzz testing harnesses  \n- LEP100 conformance test suite (1–14)\n\n---\n\n## Security Model\n\nLithic enforces capability-based permissions.\n\n### Required capabilities\n\n    requires AI_CALL\n    requires TOKEN_TRANSFER\n    requires ZK_VERIFY\n    requires BRIDGE_MINT\n    requires PPAL_CONSUME\n\nContracts MUST explicitly declare sensitive privileges, enabling:\n\n- safer audits  \n- safer deployment policies  \n- reduced accidental attack surface  \n\n---\n\n## Repository Layout (recommended)\n\n    lithic/\n    ├─ compiler/            # lithc (frontend + IR + codegen)\n    ├─ stdlib/              # standard library modules\n    ├─ lscl/                # secure reference modules (optional subtree/submodule)\n    ├─ specs/               # LEP100-1 (and related) language specs\n    ├─ examples/            # sample contracts (AI, NFTs, bridges)\n    ├─ tests/               # compiler + runtime tests\n    └─ docs/                # documentation site content\n\n---\n\n## Getting Started\n\n    # clone repo\n    git clone https://github.com/KaJLabs/lithosphere.git\n    cd lithosphere/lithic\n\n    # build compiler\n    make build\n\n    # compile contract\n    lithc compile examples/risk_analyzer.lithic\n\n    # run tests\n    make test\n\n---\n\n## Roadmap\n\n- [x] Core language specification  \n- [x] AI async execution model  \n- [x] Capability security model  \n- [ ] Full zk-verifiable pipeline  \n- [ ] Formal verification toolkit  \n- [ ] Production IDE extensions  \n\n---\n\n## Contributing\n\nContributions are welcome from the community.\n\n1. Fork the repository  \n2. Create a feature branch  \n3. Submit a pull request  \n\nPlease follow coding standards and include tests where applicable.\n\n---\n\n## Credits\n\nLithic is created by **J. King Kasr** and maintained by **KaJ Labs** for the Lithosphere ecosystem.\n\n---\n\n## License\n\nApache-2.0 (recommended)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkajlabs%2Flithic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkajlabs%2Flithic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkajlabs%2Flithic/lists"}