New Primitive

On-chain secrets. Real API calls.

Store credentials on chain in encrypted form. Let your contract trigger Stripe, Resend, OpenAI, Slack — anything with an API. Every fire is publicly auditable. The first blockchain primitive for real-world integration.

The Problem

Every other chain pretends the outside world doesn't exist.

A smart contract that wants to do anything useful needs to call an API. To call an API, you need a credential. Most chains punt: trust an oracle, run an off-chain bot, paste the credential into Vercel and hope nobody asks too many questions. The chain stops being a chain. It becomes a billboard for events that the off-chain part of your system mostly ignores.

Asentum Vault + Workers fixes this. The credential is on chain, encrypted. The authorization rules are smart contract code. The actual call happens in a Worker process that the chain authenticates by its registered public key. Every fire, every recipient, every response hash, all publicly verifiable.

No SDK Required

Or skip the SDK. Create the secret from a UI.

Open the IDE at ide.asentum.com/vault, connect your wallet, hit + NEW SECRET at the top of the Workers pane. Form has four fields: name, plaintext, Worker, authorized contracts. Encryption happens in the browser, the put tx is signed by your extension or Telegram wallet, and you get the sid back as a copy-friendly value plus a drop-in code snippet for your contract.

01

Deploy your contract

Use the IDE Code tab as usual. Grab the deployed address.

02

Switch to Vault tab

Same wallet, same tab. Hit + NEW SECRET, fill the form, sign.

03

Paste sid into source

The success view gives you a constant-style snippet ready to paste, or wire a setter for rotation.

SDK Path

Prefer code? Two snippets and you're live.

CI pipelines, secret rotation scripts, automated provisioning — anywhere a UI would be friction, the SDK does the same job.

Step 01 / Put a secretfrom your dev box
import { VaultClient } from '@asentum/vault-sdk';

const vault = new VaultClient({
  rpc: 'https://testnet.asentum.com',
  vaultAddress: '0x0000000000000000000000000000000000000008',
  registryAddress: '0x0000000000000000000000000000000000000009',
  keypair: myWallet,
});

const { sid } = await vault.put('slack-webhook', {
  plaintext:           process.env.SLACK_WEBHOOK_URL,
  workerId:            'asentum-default',
  authorizedContracts: ['0xMyHRContract'],
});

Hybrid X25519 + ML-KEM-768 + ChaCha20-Poly1305. Plaintext never leaves your machine. Ciphertext stored at a content-addressed sid.

Step 02 / Use the secretinside your contract
// In your contract. Fires once a day from native cron.
function notifyBirthdays() {
  const sid = storage.get('slack-sid');

  for (const employee of getBirthdaysToday()) {
    const jobId = E.deriveJobId(sid, this.address, chain.blockNumber, employee.id);

    E.call(VAULT, 'requestDecryption', [sid, jobId, JSON.stringify({
      url:       'https://hooks.slack.com/services/...',
      method:    'POST',
      secretAs:  { kind: 'body-key', key: 'webhook_token' },
      body:      { text: 'Happy birthday ' + employee.name + '!' },
    })]);
  }
}

Hosted Worker picks up the event, decrypts in memory, hits the API, writes a signed receipt back. Round trip on testnet: about 6 seconds.

01Write

Put a secret with one SDK call.

Client-side hybrid encryption. Plaintext lives only in your terminal. Ciphertext + policy hash committed to chain.

02Authorize

Whitelist contracts that can decrypt.

Vault enforces authorizedContracts on every request. Only your specified addresses can ever ask the Worker to fire.

03Fire

Schedule the call via native cron.

Cron lives on chain. Worker authenticates by registered pubkey. Receipt + response hash written back as a public event.

What You Can Build

The category we just unlocked.

Eight dapp shapes that used to require an off-chain bot + a credentials manager + a cron service. Now they live in a contract.

Recurring billing

Net-30 invoices that auto-send reminders. Subscription contracts that charge customers on the 1st via Stripe. Stripe Billing without paying Stripe's percentage cut.

Audit logs

Every customer-support action, every PHI access, every privileged op recorded to a public chain ledger. HIPAA, SOX, GDPR-friendly proofs that don't depend on trusting the SaaS vendor.

Scheduled notifications

Birthday emails via Resend. Daily revenue digests to Slack. Weekly customer-health scores to Telegram. Cron on chain, credentials on chain, bot runs free.

Loyalty + rewards

Points awarded after every purchase. Birthday rewards auto-sent via WhatsApp + Resend. Customer can't fake activity. Brand can't backdate the ledger.

Verifiable credentials

Universities issue degrees. Employers verify them. Auto-email the recipient on issuance. The institution can't backdate. The recipient can't forge.

Supply chain

Each QR scan triggers a contract call that hits the brand's verification API. Only approved retailer addresses count as legit scans. Anti-counterfeit, audit-friendly, rotateable.

Healthcare events

Every patient record access logs to chain. Workers handle the PHI-bearing calls to the EHR. Regulator-friendly source of truth for who accessed what, when, with what authorization.

Internal ops

Slack bot that posts your team's daily metrics at 9am. PagerDuty escalations from monitoring rules. Recurring CI cleanup. Anywhere you'd use Cloudflare Workers + Vercel Cron today, with provable execution.

Trust Model

What you trust. What you gain.

You trust the Worker operator with reading the plaintext of any secret encrypted to that Worker. That's the same trust you place in Vercel today when you paste a Stripe key into their dashboard. There's no way around it on a transparent chain: if a contract can decrypt a secret autonomously, then whoever runs the decryption process can read it.

What you gain over the Vercel model: WHO can fire the call (authorized contracts), WHEN it can fire (cron on chain), WHAT call gets made (your contract code), THAT it fired (events on chain), WHICH Worker did it (signed tx with registered pubkey), and the POLICY the Worker is operating under (policy hash committed at registration). All enforced by code anyone can read.

And if you want to eliminate the Worker-as-trusted-party concern entirely, run your own. npm install @asentum/workers, five minutes of setup, you own the keys. Future protocol versions add threshold decryption across multiple Workers to retire the single-point-of-trust entirely.

Guide

Developer walkthrough.

Twelve sections covering put, request, fulfill, policies, workerId routing, and self-hosting.

Concept

How the Vault works under the hood.

Hybrid encryption, ciphertext layout, on-chain policy enforcement, Worker registration, and decryption flow.

Reference

@asentum/vault-sdk API.

put(), request(), fulfill(), getJob(), and the WorkerClient daemon class. Browser + Node. On npm.

Testnet Live

Stop pasting keys into dashboards. Build something weird.