Verifiable off-chain computation with hardware-grade security for NEAR smart contracts and HTTPS applications
Ship verifiable apps without building cryptographic infrastructure
Every execution produces a hardware-signed attestation report. Cryptographic proof that your code ran with your inputs — inside CPU-encrypted memory that even the server operator can't access.
Derive encryption keys via NEAR MPC Network — 27 validators, threshold BLS12-381. No single node ever sees the full secret. The same infrastructure securing NEAR Intents and billions in cross-chain assets.
Store API keys, private keys, and sensitive data inside hardware-encrypted TEE memory. Access control via NEAR balance, NFT ownership, or whitelist. Secrets persist across code upgrades — plaintext never leaves the enclave.
Call from NEAR smart contracts via yield/resume or from any app via HTTPS API. Same security, same attestation. No wallet popups required for web apps.
OutLayer payment keys let you charge microtransactions per call — agents pay, do the work, get change back. Sell subscriptions or per-use access. No Stripe, no payment processor.
Vibe-code blockchain apps with AI. Your copilot generates business logic in plain Rust — OutLayer abstracts TEE attestation, MPC cryptography, and key management automatically.
To compromise OutLayer, an attacker must break both
Hardware-enforced Trusted Execution Environment. Code runs inside CPU-encrypted memory. The server operator, the OS, and even physical access cannot extract secrets or tamper with execution.
27 independent validators running threshold BLS cryptography (20-of-27). Key derivation is distributed — no single node ever sees the complete secret. The same network securing NEAR Intents and billions in cross-chain transactions.
The result: to steal a user's secret, an attacker must simultaneously break Intel TDX hardware isolation and compromise 20+ independent MPC validator nodes operated by competing organizations. This is the same security model protecting billions in assets through NEAR Intents today.
From request to verifiable result in seconds
Your smart contract or HTTPS app calls OutLayer with a GitHub repo + commit hash or an immutable WASM binary. Attach payment in stablecoins.
The TEE Keystore validates access conditions, then derives decryption keys via CKD (NEAR MPC Network). User secrets are decrypted and injected as env vars — plaintext never leaves the enclave.
Workers compile your Rust code to WASM, then execute it inside Intel TDX hardware. Process fully isolated — no filesystem, no network access, instruction-metered.
Results return to your contract (or HTTPS response) with a hardware attestation report. Anyone can cryptographically verify the exact code that produced the output.
NEAR smart contracts can call OutLayer via the native yield/resume mechanism. Your contract pauses, heavy computation runs off-chain in TEE, and results return directly to L1 — no bridge, no L2, no separate consensus.
Break free from gas limits. Run ML models, fetch external APIs, generate ZK proofs, or process megabytes of data — all with cryptographic proof that the result is correct.
// Call OutLayer from NEAR contract
#[near_bindgen]
impl Contract {
pub fn run_offchain(&mut self) {
outlayer::request_execution(
"github.com/you/app",
"abc123",
json!({ "action": "analyze" }),
"on_result",
);
}
// TEE-attested result arrives here
pub fn on_result(
&mut self,
result: ExecutionResult
) { /* ... */ }
}
Users attach stablecoins to every call — on-chain or via HTTPS payment keys. Your code receives the deposit, does the work, and refunds the change automatically.
Easy version management and secret rotation. Update code via git push, rotate API keys in the TEE keystore — no redeployment, no downtime.
fn main() {
// Stablecoin deposit attached by caller
let deposit: u128 = env::var("ATTACHED_USD")
.unwrap().parse().unwrap();
// API key from TEE-encrypted secrets
let api_key = env::var("OPENAI_API_KEY")
.unwrap();
// Call the AI model
let prompt = env::var("USER_PROMPT").unwrap();
let (result, cost) = call_openai(&api_key, &prompt);
// Refund unused deposit via SDK
near::payment::api::refund_usd(
(deposit - cost) as u64
);
print!("{}", json!({ "result": result }));
}
A fundamentally different approach to off-chain computation
OutLayer is open source, live on mainnet, and ready for your next project.