VEYRA — DApps request. Wallets authorize. Users decide. Kaspa settles. Spec: VEYRA.md · veyra.html. Fork the open wallet: FORK.md · KCC20-wallet.
Plug-and-play dApp connect for KCC20 Wallet. Same job as KasWare’s window.kasware — no Chrome extension.
| Script | https://kcc-20-wallet.vercel.app/sdk.js?v=179 |
| This repo | client sdk.js + docs + Tokens + AI sources (not the wallet app) |
| Wallet app | kcc-20-wallet.vercel.app · KCC20-wallet |
| Docs frontend | Import this repo on Vercel → kcc20-sdk.vercel.app (static root, no build) |
| Tokens | tokens.html · tokens.json — every KCC20 on kron.technology |
| For AIs | llms.txt · AGENTS.md · ai.json |
| Live demo | examples/dapp-demo.html |
| sdkVersion | 179 · Dot.K · Connect dApp · Forge · veyra |
| Argent | argent.html · ARGENT.md · argent.js — LLM directs, wallet compiles vaults |
Keys never leave the wallet origin. Your app builds the unsigned PSKT. The user Approves in the KCC20 window.
<script src="https://kcc-20-wallet.vercel.app/sdk.js?v=179"></script>Or from this repo / jsDelivr (still opens the live PWA):
<script src="https://cdn.jsdelivr.net/gh/mrzeku2000XTTT/kcc20-sdk@main/sdk.js"></script>Confirm:
window.kcc20.sdkVersion === '179'
window.kcc20.veyra.principle
window.kcc20.origin === 'https://kcc-20-wallet.vercel.app'Connect a vibe-coded Dot.K PWA (popup is their origin):
await kcc.connect({ identity: 'alice.k' });
// origin from official records.url, then a row in dotk-wallets.json
await kcc.verifyDotk({ identity: 'alice.k' }); // verified when deed, HOST, and account agreeOnly call Connect from a user click. Never on page load.
const kcc = window.kcc20;
// POPUP — user Approves, then the window CLOSES. That is required.
const accounts = await kcc.connect();
const address = accounts[0]; // kaspa:q…
// SILENT — do not connect() again
const network = await kcc.getNetwork(); // kaspa_mainnet | kaspa_testnet_10
const pubKey = await kcc.getPublicKey();
const utxos = await kcc.getUtxoEntries(address);
// YOU build unsigned rusty-kaspa Safe JSON from pubKey + utxos + your route.
// POPUP — user Signs
const signed = await kcc.signPskt({
txJsonString: unsignedSafeJson,
options: { signInputs: userP2pkIndexes.map(i => ({ index: i, sighashType: 1 })) }
});
const { txId } = await kcc.pushTx(signed); // optionalIf getPublicKey / getUtxoEntries throw Connect KCC20 Wallet first after a successful Connect, you are on a stale SDK. Load sdk.js?v=168 and hard-reload.
await kcc.buyKron({ tick: 'KKDAG', amount: '10' }); // amount = KAS to spendLive ticks: tokens.html · tokens.json · KRON tokenlist. sendToken is a bag transfer, not a buy.
| Opens the PWA | Silent (no window) |
|---|---|
connect / requestAccounts |
getAccounts |
signPskt / signPsbt |
getNetwork |
pushTx |
getPublicKey |
sendToken / payKcc20 |
getUtxoEntries |
buyKron / sellKron / tradeKron |
getBalance / getHoldings / getTokenBalance |
compileVault / sendKas |
quoteKron (best-effort) |
switchNetwork |
| Method | Returns |
|---|---|
connect() / requestAccounts() |
string[] of kaspa:q… |
getAccounts() |
same, no extra prompt |
getNetwork() |
kaspa_mainnet | kaspa_testnet_10 |
getPublicKey() |
hex |
getUtxoEntries(address?) |
UTXOs (REST + KasWare-flat fields) |
getBalance(address?) |
{ confirmed, unconfirmed, address } sompi |
signPskt({ txJsonString, options }) |
signed Safe JSON string |
pushTx(signedJson) |
{ txId, node } |
buyKron({ tick, amount }) |
Buy KCC20. amount = KAS. Wallet builds TRADE |
sendToken({ tick, amount, dest }) |
Send a held bag (not a buy) |
compileVault({ type, params }) |
Argent compiles a P2SH vault (kaspa:p). User funds. |
sendKas({ dest, amount }) |
Plain KAS transfer. “Send to grandson” is this unless they want a dead-man. |
disconnect() |
forget this origin |
Events: kcc.on('accountsChanged'|'networkChanged'|'disconnect', fn)
signInputs: only the connected address’s P2PK indexes, sighashType: 1. Never list covenant / KRON curve / pool / token-cell inputs.
| KasWare | KCC20 (SCORPION) | |
|---|---|---|
| How it appears | extension injects window.kasware |
you load sdk.js → window.kcc20 |
| Connect | requestAccounts() |
connect() / requestAccounts() |
| Sign | signPskt |
same |
| Keys | extension | hosted PWA + PIN |
If a real KasWare extension exists, do not overwrite window.kasware. Offer both. SCORPION uses window.kcc20 only.
KIP-12: listen for kaspa:provider (rdns: app.kcc20.wallet) before dispatching kaspa:requestProvider.
sdk.js — the client (opens the live PWA)
index.html — Scorpion landing
tokens.html — live KRON KCC20 list for vibe coders
llms.txt — what AIs should read first
docs.html — API
CONNECT.md — markdown API
examples/dapp-demo.html
package.json — @kcc20/sdk
The wallet UI, keys, and signing engine live in KCC20-wallet. This repo is only what a dApp needs to copy-paste.
This repo is a static site. In Vercel: Add New → Project → import mrzeku2000XTTT/kcc20-sdk. Framework preset: Other. Root: . Output: leave empty. You get https://kcc20-sdk.vercel.app.
Live: GitHub main @ 80de2ae (Scorpion landing). If Vercel still shows the old docs homepage, open the kcc20-sdk project → Deployments → latest main → Promote to Production.
Routes: / Scorpion landing (Connect) · /tokens live KRON list · /prompt Launch SDK · /docs API · /taptotip · /demo Try it · /llms.txt for agents.
MIT
0 comments
log in to comment.