Skip to content
Development
Skill

/inco

Build confidential dApps on Solana using Inco Lightning encryption — encrypted balances, private transfers, and attested decryption

From plugin
skills
13048 skills

Claude Code

$ npx -y skills add sendaifun/skills --skill inco --agent claude-code

SKILL.md

inco.SKILL.md
name: inco-svm
description: Build confidential dApps on Solana using Inco Lightning encryption — encrypted balances, private transfers, and attested decryption

Inco SVM — Confidential Computing on Solana

Inco Lightning is a confidentiality layer for Solana that enables developers to build applications where sensitive data remains encrypted even during computation. It uses Trusted Execution Environments (TEEs) to deliver verifiable confidential compute — no new chain, no new wallet required.

> **Note:** Inco SVM is currently in **beta** on Solana devnet. Features are subject to change.

Overview

  • **Encrypted Types** — `Euint128` and `Ebool` handles representing encrypted values stored off-chain
  • **Homomorphic Operations** — Arithmetic, comparison, bitwise, and control flow on encrypted data via CPI
  • **Access Control** — Allowance PDA system for granting per-handle decryption permissions
  • **Attested Decryption** — Ed25519 signature-verified decryption through TEE covalidators
  • **Confidential SPL Token** — Privacy-preserving token standard with encrypted balances and transfers
  • **Client SDK** — `@inco/solana-sdk` for encryption, decryption, and utility helpers

Architecture

Client                    Solana Program              Inco Covalidator (TEE)
  │                            │                              │
  ├─ encryptValue() ──────────►│                              │
  │                            ├─ CPI: new_euint128 ─────────►│
  │                            │◄─── handle (u128) ──────────┤
  │                            ├─ CPI: e_add / e_sub / ... ──►│
  │                            │◄─── result handle ──────────┤
  │                            ├─ CPI: allow() ──────────────►│
  │                            │                              │
  ├─ decrypt([handle]) ───────────────────────────────────────►│
  │◄─── plaintext + Ed25519 attestation ──────────────────────┤

**Inco Lightning Program ID:** `5sjEbPiqgZrYwR31ahR6Uk9wf5awoX61YGg7jExQSwaj`

Quick Start

Installation

**Rust Crate (on-chain):**

Add to your `Cargo.toml`:

[dependencies]
inco-lightning = { version = "0.1", features = ["cpi"] }

Add to `Anchor.toml`:

[programs.devnet]
inco_lightning = "5sjEbPiqgZrYwR31ahR6Uk9wf5awoX61YGg7jExQSwaj"

**JavaScript SDK (client-side):**

npm install @inco/solana-sdk

Basic Program Setup

use anchor_lang::prelude::*;
use inco_lightning::cpi::accounts::Operation;
use inco_lightning::cpi::{e_add, e_sub, e_ge, e_select, new_euint128, as_euint128};
use inco_lightning::types::{Euint128, Ebool};
use inco_lightning::ID as INCO_LIGHTNING_ID;

declare_id!("YOUR_PROGRAM_ID");

#[program]
pub mod my_confidential_program {
    use super::*;

    pub fn deposit(ctx: Context<Deposit>, ciphertext: Vec<u8>) -> Result<()> {
        let cpi_ctx = CpiContext::new(
            ctx.accounts.inco_lightning_program.to_account_info(),
            Operation {
                signer: ctx.accounts.authority.to_account_info(),
            },
        );

        // Create encrypted handle from client ciphertext
        let amount: Euint128 = new_euint128(cpi_ctx.clone(), ciphertext, 0)?;

        // Add to existing balance
        let new_balance = e_add(cpi_ctx, ctx.accounts.vault.balance, amount, 0)?;
        ctx.accounts.vault.balance = new_balance;

        Ok(())
    }
}

#[derive(Accounts)]
pub struct Deposit<'info> {
    #[account(mut)]
    pub authority: Signer<'info>,
    #[account(mut)]
    pub vault: Account<'info, Vault>,
    /// CHECK: Inco Lightning program
    #[account(address = INCO_LIGHTNING_ID)]
    pub inco_lightning_program: AccountInfo<'info>,
}

#[account]
pub struct Vault {
    pub balance: Euint128,
}

Basic Client Usage

import { encryptValue } from "@inco/solana-sdk/encryption";
import { decrypt } from "@inco/solana-sdk/attested-decrypt";

// Encrypt a value before sending to program
const encrypted = await encryptValue(1000n);

await program.methods
  .deposit(Buffer.from(encrypted, "hex"))
  .accounts({ authority: wallet.publicKey, vault: vaultPda, incoLightningProgram: INCO_LIGHTNING_ID })
  .rpc();

// Decrypt a handle (requires wallet signature)
const result = await decrypt([handleString], {
  address: wallet.publicKey,
  signMessage: wallet.signMessage,
});
console.log("Decrypted:", result.plaintexts[0]);

Encrypted Types & Handles

Handles are 128-bit references to encrypted values stored off-chain in the covalidator network.

| Type | Description | Rust Definition | |------|-------------|-----------------| | `Euint128` | Encrypted unsigned 128-bit integer | `pub struct Euint128(pub u128)` | | `Ebool` | Encrypted boolean | `pub struct Ebool(pub u128)` |

Store handles directly in account structs:

#[account]
pub struct ConfidentialAccount {
    pub balance: Euint128,
    pub is_active: Ebool,
}

Input Functions

| Function | Description | |----------|-------------| | `new_euint128(ctx, ciphertext, input_type)` | Create from client-encrypted ciphertext | | `new_ebool(ctx, ciphertext, input_type)` | Create encrypted bool from ciphertext | | `as_euint128(ctx, value)` | Trivial encryption of plaintext u128 (for constants like zero) | | `as_ebool(ctx, value)` | Trivial encryption of plaintext bool |

Operations on Encrypted Data

All operations require a CPI context and return new handles.

let cpi_ctx = CpiContext::new(
    ctx.accounts.inco_lightning_program.to_account_info(),
    Operation { signer: ctx.accounts.authority.to_account_info() },
);
let result = e_add(cpi_ctx, a, b, 0)?;

The last parameter (`scalar_byte`) is `0` for encrypted-encrypted operations, `1` when the left operand is plaintext.

Arithmetic → `Euint128`

`e_add`, `e_sub`, `e_mul`, `e_rem`

Comparison → `Ebool`

`e_ge`, `e_gt`, `e_le`, `e_lt`, `e_eq`

Bitwise → `Euint128`

`e_and`, `e_or`, `e_not`, `e_shl`, `e_shr`

Control Flow (Multiplexer)

// C
Read more
@sendaifun
Ships withskills

AI agent skills for Solana development — DeFi protocols, infrastructure, security, and more.

Stars on GitHub

Momentum

stars in total
130
Star history of sendaifun/skills on GitHub, a chart by star-history.com

Other skills on skills.

arcium

arcium

Build and debug encrypted Solana applications with Arcium — data stays private during computation, no single party sees it. Use…

@sendaifun@sendaifunInstall Skill
birdeye

birdeye

Complete Birdeye API integration for real-time DeFi data across Solana and 15 other chains. Use for token prices, OHLCV charts,…

@sendaifun@sendaifunInstall Skill
carbium

carbium

Build on Solana with Carbium infrastructure — bare-metal RPC, Standard WebSocket pubsub, gRPC Full Block streaming (~22ms), DEX…

@sendaifun@sendaifunInstall Skill
coingecko

coingecko

Complete CoinGecko Solana API integration for token prices, DEX pool data, OHLCV charts, trades, and market analytics. Use for…

@sendaifun@sendaifunInstall Skill
ct-alpha

ct-alpha

Crypto Twitter intelligence and alpha research. Search X/Twitter for real-time crypto narratives, trending tokens, yield…

@sendaifun@sendaifunInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about inco.

Which coding agents can use inco?
inco installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.