sdkVersion 168 · argent.js 1.3.0 · silverscript.js 1.0.0-rc1
Argent vault compiler
Argent is the vault agent inside KCC20 Wallet. It is not a hosted XMSS compiler and it does not hold keys.
| Layer | What it actually does |
|---|---|
| Local parser | wallet/js/intent.js — same rules as argent.js here |
| Optional remote | /kccApi { action:'chat', agent:'argent' } merged into local parse |
| Compiler | buildCovenant in the PWA → kaspa:p P2SH via rusty-kaspa WASM |
| This SDK | Parse + LLM director prompt + compileVault RPC. No keys, no opcodes. |
| Nilla-style LLM | Directs Argent. Does not compile. User PIN-signs. |
send unless they say dead-man / heir.LLM directs Argent. Argent compiles.
User: “I want to send Kaspa to my grandson.”
→ your LLM (or argent.direct locally)
→ ArgentIntent JSON
→ kcc.compileVault({ type, params }) // vaults, kaspa:p
or kcc.sendKas({ dest, amount }) // plain send, kaspa:q
→ PWA Argent compiles / builds
→ user Approves + PIN
→ { address, txId }
Same money model as Nilla Gorilla: you (or Argent) build, they sign. Difference: for vaults you do not assemble the redeem script. Argent does.
Grandson example (fact-checked)
Local parser: send + no kaspa: address → type send, missing amount + destination. It will not invent a dead-man vault.
| They mean | Type | Wallet call |
|---|---|---|
| Pay him now | send | sendKas({ dest, amount }) |
| If I miss check-ins / when I die | sentinel | compileVault — timeout pays beneficiary |
| Lock until a date, then I send | timelock / life | Unlocks to you, then sendKas |
| He claims with a secret | hashlock | receiver = his kaspa:q |
| Post-quantum lock | xmss | Public kit from xmss_keygen.py only |
In-app sentinel is Schnorr + CLTV hops shaped like covenants/sentinel. Full XMSS sentinel is the repo CLI. Do not tell the user a Time Capsule pays the grandchild.
Intent types Argent can compile
send— not a vault. Native KAS tokaspa:q.timelock— Time Capsule. Returns to owner.life— rent / car / save / spend / control. Unlock-anytime = owner envelope.escrow— seller refunds; buyer claims if that chip is in this PWA.multisig— 2-of-2, both keys on this device to Sweep.kcc20lock— freeze a KCC20 bag.sentinel— dead-man. Aliases:deadman,dead man switch,dms.beneficiarygets timeout. Never compiled as Time Capsule.recurring— check-in payspayee.hashlock— secret or refund.xmss— real post-quantum vault from this GitHub repo. Public kit only.
Install
script src="https://kcc-20-wallet.vercel.app/sdk.js?v=168"
script src="https://kcc20-sdk.vercel.app/argent.js"
const argent = window.kcc20Argent;
const directed = argent.direct(userText);
if (!directed.complete) ask(directed.ask);
else {
await kcc.connect(); // click
const r = directed.plan.method === 'sendKas'
? await kcc.sendKas(directed.plan.payload)
: await kcc.compileVault(directed.plan.payload);
}
Parse is local. Compile opens the PWA. Require kcc.sdkVersion >= "168".
compileVault / sendKas
await kcc.compileVault({ type, amount, params, message? }) → { address, txId, type, name }
Always pass a real amount or amountKas (KAS). The wallet will not lock “an amount”. seniorguardian maps to sentinel. Weekly cap: type: 'spendlimit', amount: 50, params: { capKas: 10, period: 'weekly' }.
await kcc.compileVaults({ vaults: [{ type, amount, params }, …] }) → { argent: 2, txId, vaults[] }
Argent 2 — one transaction, many P2SH outputs. Argent 1 (compileVault) stays one-at-a-time. SilverScript v1.0.0 templates attach for spend-limit / N:M; paste a silverc artifact to fund the real bytecode.
Wallet Argent compiles the P2SH, user Approves, PIN funds it. Result address starts with kaspa:p.
await kcc.sendKas({ dest, amount }) → { txId, dest, amountKas }
Plain transfer. dest is a full kaspa:q, not kaspa:p.
Pass message instead of a typed intent and the wallet parser fills the fields (same as the Argent orb). Incomplete intents throw with the same askFor string the orb uses.
Deep-link (no RPC): https://kcc-20-wallet.vercel.app/?tab=vault&argent=lock%2010%20kas%20for%207%20days
Create your own Argent
- Load
argent.js. ReuseparseIntent/direct/askFor. - Optional: sit any LLM in front with
argent.llmDirectorPrompt(). - On a user click, call
compileVaultorsendKas. Do not compile scripts on your server. Do not ask for keys. - XMSS offline:
python3 keygen/xmss_keygen.pythen fund via the PWA orcovenants/xmsslockCLI.
Full notes: ARGENT.md · repo kaspa-xmss-covenants.
Repo map
| Type | PWA function | GitHub |
|---|---|---|
| timelock / life | buildTimelockCovenant | analog of covenants/time_capsule |
| sentinel | buildSentinelChain (Schnorr analog) | shape of covenants/sentinel |
| recurring | buildRecurringChain | x402-kaspa/sentinel-x402 |
| xmss | fund public kit P2SH | covenants/xmsslock + keygen/ |
Node CLI uses @onekeyfe/kaspa-wasm (Node only). Browser uses rusty-kaspa web WASM. Do not mix.
Try parse (local, no keys)
Or in this page’s console: kcc20Argent.direct('I want to send Kaspa to my grandson.')
one-shot · SCORPION · Argent
Prompts
Paste one of these into Replit, Base44, Cursor, Grok, or TTT Builder. The agent one-shots an Argent-ready app. Keys stay in KCC20. Never call .join on llmDirectorPrompt() without promptText() — that is the crash in the screenshot.
const sys = window.kcc20Argent.promptText(window.kcc20Argent.llmDirectorPrompt());Also: kcc20Argent.oneShot('director' | 'scorpion' | 'vibe' | 'silverscript')
1. Argent Director app
Chat UI like the screenshot. Local parse first. Optional LLM. Connect SCORPION. sendKas / compileVault.
Loading…
2. Scorpion agent + KCC20 rules
Powerful agent: buy any KRON tick, lock vaults, send KAS. SCORPION signs. Argent compiles rules.
Loading…
3. Vibe economics (TTT Agent Internet)
LLM directs → Argent compiles rules → Kaspa enforces. App becomes an economic actor.
Loading…
4. LLM system prompt only
Drop this in as system. Already a string. Use promptText() if you load it from argent.js.
Loading…
5. Card → KAS on-ramp (you add POS)
5-minute CoinGecko quote. You charge the card (Stripe / Base44). After paid=true, treasury sendKas or Argent hashlock (5 min, receiver = buyer). We never see the card.
Loading…
6. Base44 — paste this if the agent invents auto-send
Keeps hashlock as pull, seller one-tap Send now, buyer receipt “Awaiting KAS.”
Loading…
7. ChangeNOW — USDC/USDT → KAS (floating)
User sends USDC to ChangeNOW. KAS pays out to their SCORPION kaspa:q. Not a vault. Not a card.
Loading…
8. SilverScript v1-rc1 (official Kaspa compiler)
High-level .sil → silverc JSON → KCC20 funds P2SH. Argent does not compile .sil. Load silverscript.js.
Loading…