Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/covenant-gov/pacto-app/llms.txt

Use this file to discover all available pages before exploring further.

This page is the canonical vocabulary used across Pacto’s source code, documentation, and the AI agent system. Terms are ordered from identity outward — starting with the cryptographic primitives that everything else is built on, moving through the messaging layer, then governance and finance, and finally the architectural conventions that appear throughout the codebase. When a term appears in source or docs without explanation, this is the reference to consult.
For how these concepts connect in running code, see Architecture Overview, Direct Messages, and Wallet Overview.

Identity

Nostr public key. The user’s human-readable identifier and the root of trust.
Nostr secret key. Stored encrypted; never exposed to the frontend or network.
The same mnemonic seed that derives the Nostr keypair and the embedded EVM wallet. See docs/wallet/HD_DERIVATION_V1.md.
A phrase-derived EVM account whose purpose is squad. Used for treasury, governance, and roster-bound actions.
A phrase-derived or imported EVM account whose purpose is advanced. Restricted to the Settings → Advanced contract-call panel.

Messaging

Direct message. End-to-end encrypted NIP-17/NIP-59 Gift Wrap (kind 1059) addressed to a peer’s npub.
The inner, decrypted Nostr event after a Gift Wrap is opened. Kinds include 14 (text), 15 (file), 7 (reaction), 30078 (typing), and structured application rumors.
Messaging Layer Security. The open protocol used for private group messaging; implemented via the mdk engine.
A private community hub — a group of people sharing MLS channels and optionally a treasury. Stable id = announcements MLS group id.
An inter-organizational hub — a “Squad of Squads” — for cross-group coordination.
Partner coordination link between two anchor squads. Uses the same announcements-group-id rule as squads. See docs/communities/DESIGN.md.
A chat stream inside a Squad or Network. Each channel is backed by an MLS group id.
The first channel of every squad/network. Its MLS group id is the parent’s stable identifier.
Public discovery feed for squads and time-bounded broadcasts; top-level navigation.
NIP-59 outer envelope (kind 1059). Hides sender, recipient, and metadata from relays.
MLS group invitation payload delivered inside a Gift Wrap.
MLS-encrypted group traffic on the wire; h tag = wire group id.

Governance and Finance

Upstream governance contract library for modular voting and decision rules. See docs/wallet/PACTO_GOV.md.
Upstream factory for deploying squad infrastructure (treasury, governance, hats). See docs/wallet/PACTO_SQUAD_SPONSOR.md.
On-chain artifacts deployed for a squad: Safe treasury, governance module, and Hats tree. Persisted in SQLite (squad_infra).
Gnosis Safe multi-signature contract used as the squad treasury.
On-chain role management. Hats define roles that can be granted, revoked, and checked by contracts.
A pacto-gov governance action (spend, role change, etc.) voted on by squad members.
The in-thread wallet UI for sending tokens, requesting payments, and announcing transactions.

Architecture

Desktop app framework: Svelte frontend in a webview, Rust backend.
Frontend → backend typed RPC via tauri-apps/api/core.
Backend → frontend event pushed through AppHandle::emit.
Two databases per npub: vector.db (app data) and vector-mls.db (engine state).
Frontend viem read-only chain access: balances, contract observation, receipt polling.
WalletBar and governance writes are signed and broadcast from the Rust backend using Alloy.
Repo posture: no public alpha shipped yet; prefer breaking, minimal paths over compatibility shims.

Build docs developers (and LLMs) love