tai_core/lib.rs
1//! # tai-core
2//!
3//! Core library for [Tai](https://github.com/TaiStream/Tai-Launchpad) — the
4//! tokenized agentic infrastructure layer on Sui.
5//!
6//! `tai-core` is the single source of truth that both the `tai-cli` binary
7//! and the WASM-backed `@tai/sdk` wrap. It exposes:
8//!
9//! - **PTB builders** for every entry function in the on-chain `tai` Move package.
10//! - **A `Signer` abstraction** with pluggable backends: local Ed25519 file,
11//! Sui keystore inheritance, Turnkey MPC, and TEE-attested signing
12//! (Phala Cloud + Mysten Nautilus).
13//! - **An indexer client** that subscribes to launchpad events.
14//! - **A one-time-witness coin module templater** so an agent can publish
15//! its own creator coin at launch time.
16//!
17//! See [`TaiClient`](crate::client::TaiClient) for the high-level facade.
18
19#![deny(unsafe_code)]
20#![warn(missing_docs)]
21
22pub mod client;
23pub mod config;
24pub mod error;
25pub mod ids;
26pub mod reads;
27pub mod rpc;
28pub mod signer;
29pub mod work_order;
30
31pub use client::{
32 select_coin, ExecutionResult, MoveCall, RequestType, TaiClient, SUI_CLOCK_OBJECT_ID,
33};
34pub use config::{Network, TaiConfig};
35pub use error::TaiError;
36pub use ids::{ObjectId, SuiAddress};
37pub use reads::{
38 hire_quote, AgentTreasuryView, HireQuote, LaunchpadAccountView, LaunchpadConfigView,
39};
40pub use rpc::RpcClient;
41pub use signer::{save_seed_to_file, Ed25519FileSigner, Signer};
42pub use work_order::{WorkOrderStatus, WorkOrderView};
43
44/// Crate-wide [`Result`] alias.
45pub type Result<T> = std::result::Result<T, TaiError>;