@provablehq/veil-core
The base of the SDK: a viem-shaped client library for Aleo. Every other
@provablehq/veil-* package builds on the clients, transports, and action
types this package defines. It reads chain state and writes transactions
through public, wallet, and test clients and their standalone actions, and it
ships agent- and MCP-facing bindings that expose those same actions to LLMs.
Installation
npm install @provablehq/veil-core
Key exports
- Clients —
createPublicClient,createWalletClient,createTestClient,createClient. - Transports —
http,custom,fallback,createTransport. - Contracts —
getContract,readContract,writeContract,simulateContract,executeContract,deployContract,parseProgram. - Actions —
getBlockNumber,getBlock,getTransaction,getBalance,transfer,requestRecords,readMapping,waitForConfirmation, and the rest of the public/wallet/test surface. - Accounts / types —
rpcAccount,toAccount;PublicClient,WalletClient,Account,Transport,ABI,ProvingConfig.
Example
import { createPublicClient, http } from '@provablehq/veil-core'
const client = createPublicClient({
transport: http('https://edge.provable.com/api/v2', { network: 'mainnet' }),
})
const balance = await client.getBalance({
address: 'aleo1q6qstg8q8shwqf5m6q5fcenuwsdqsvp4hhsgfnx5chzjm3secyzqt9mxm8',
})
See the Clients pages for the full action surface, Guides for common flows, and API for the type and transport reference.
Record management
Wallet clients include inventory reads, joins/splits, planning, and reconciliation.
Set recordManagement: { enabled: true, store, chainId } when constructing the
client to reserve inputs during writes. .extend(recordActions()) only adds
methods; it does not enable coordination.
Participating clients share one store and chain identity. The default store is
in memory; use a durable RecordInventoryStore for restart recovery. Core keeps
storage and signing behind interfaces and imports no database or Node runtime.
See record management for configuration defaults,
client examples, private fees, and recovery, or
concurrent swaps for trading setup.
Subpaths
@provablehq/veil-core/agent— framework-agnostic LLM tool bindings:createAgentTools,aleoAgentTools,aleoAgentToolSchemas, and theAgentTool/AgentToolSchematypes.@provablehq/veil-core/mcp— adapts agent tools into an MCP server:toMcpServer(tools)(package-agnostic) andcreateMcpServer(config)for the base Aleo tools.
import { createMcpServer } from '@provablehq/veil-core/mcp'
const server = createMcpServer({ client, walletClient })
const tools = server.tools
const result = await server.handleToolCall('aleo_get_block_number', {})
See Agents for how the agent and MCP surfaces compose across packages.