> Nilla fork: SDK nilla-180.1 (upstream 180 compatible), provider nilla-wallet, RDNS app.nilla.wallet. Relative wallet/SDK links below resolve on this Nilla-controlled origin. Cross-origin apps must substitute a verified NILLA_ORIGIN; no published hostname is configured. Upstream repositories are attribution, not wallet-origin fallbacks. See IDENTITY-PHASE2.md and THIRD_PARTY_NOTICES.md. # Fork Nilla Wallet — build your own Veyra wallet This PWA is the open reference wallet for **VEYRA**: dApps request, the wallet authorizes, the user decides, Kaspa settles. You do not start from a blank HTML file. You copy this repo, keep the signing boundary, and change what makes the wallet yours. | Repo | What it is | |---|---| | [KCC20-wallet](https://github.com/mrzeku2000XTTT/KCC20-wallet) | Original upstream static PWA; attribution only. Fork this Nilla workspace to preserve its hardening. | | [kaspa-xmss-covenants](https://github.com/mrzeku2000XTTT/kaspa-xmss-covenants) | Full tree; wallet lives in `/wallet`. | | [kcc20-sdk](https://github.com/mrzeku2000XTTT/kcc20-sdk) | Client `sdk.js` + docs. dApps pin the **hosted** script. | License: MIT (see `LICENSE` in kcc20-sdk; copy it into your fork). --- ## Keep (the Veyra boundary) - Keys stay on the wallet origin. Never send seed / PIN / hex to a dApp. - dApp **builds** the unsigned PSKT. Wallet **signs** listed P2PK funding indexes only. - Connect, Sign, Send, Broadcast each need a user click and an Approve sheet. - After Connect the popup **closes**. Silent reads must work. - `pushTx` returns `{ txId, node }`. - `buyKron` is wallet-built. `sendToken` is a bag send (KCC20 cell or Kasplex KRC-20, whichever this wallet holds). - Do not overwrite a real `window.kasware`. - Pin `sdk.js?v=nilla-180.1` and fail closed if `sdkVersion` mismatches. - `buyKron` / `sendToken` / `sendKas` take `expectedPayer` = `getState().payer` (the Connect account). Read [VEYRA.md](./VEYRA.md) before you rename anything. --- ## Change (make it yours) 1. Fork **KCC20-wallet**. 2. Point Vercel at the fork. Custom domain optional. 3. Replace branding: `index.html` title, `assets/icon.png`, `manifest.json` name, `about.html`. 4. In `index.html` **before** any other script set `window.NILLA_WALLET_ORIGIN`, `window.NILLA_DOTK` (e.g. `alice.k`), a unique provider ID, RDNS and UUID in the fork source. Nilla uses `nilla-wallet` / `app.nilla.wallet`; RDNS is not inherited from legacy globals. 5. Bump `SDK_VERSION` and add a `releases.json` entry the same day. 6. Change KCC-12 `rdns` from `app.nilla.wallet` to your reverse-DNS so pickers can list **both** wallets. 7. Trusted iframe origins (TTT, KasDistro) live in `dappConnect.js` — add yours; do not silently allow every site. 8. Keep `web+kcc20:` or add your own protocol handler in `manifest.json`. 9. Ship `sdk.js` from **your** origin. Tell integrators to pin `https://YOURHOST/sdk.js?v=nilla-180.1`. 10. dApps open you with `connect({ identity: 'alice.k' })`. Official `records.url` must be HOST (`saveRecords` via `@dotk/sdk-tx`). Add a row to [dotk-wallets.json](https://kcc20-sdk.vercel.app/dotk-wallets.json). Verified only when deed owner, records.url, and the connected account agree. Step 12: [dotk.html#step-verified](https://kcc20-sdk.vercel.app/dotk.html#step-verified). 11. Replace Scorpion Home chrome (Wallet 1, TRADE KCC20, Compound, A-Trade) unless that is your look. Step-by-step: [dotk.html](https://kcc20-sdk.vercel.app/dotk.html#guide). Local serve: static files only. WASM `Content-Type` is `application/wasm` (`vercel.json`). `file://` will not load Kaspa WASM. --- ## Implement the same dApp surface If you write a different wallet (extension, desktop, another PWA), dApps still work if you expose: ``` connect / requestAccounts getAccounts, getNetwork, getPublicKey, getUtxoEntries, getBalance signPskt({ txJsonString, options: { signInputs } }) pushTx → { txId, node } ``` Optional: `buyKron`, `sendToken`, `sendKaspa`, `getActivityLog`, `kaspa:announceProvider`. Live pin: **SDK 180** · **BUILD 291** · fork [KCC20-wallet](https://github.com/mrzeku2000XTTT/KCC20-wallet) `main`. KRC-20 (Kasplex inscription) and KCC20 (KRON covenant cell) are different machines. Home Send and `sendToken` move the bag the wallet actually holds. Vault → Bridge is KCC20→KAS→KCC20 on KRON. There is no L1 wrap that mints a KCC20 cell because someone sent NACHO. To buy a KRON tick, the user spends **KAS** via `buyKron`. Announce with a **unique** `rdns`. Load your script before the dApp dispatches `kaspa:requestProvider`. --- ## Come back here - Protocol: [VEYRA.md](./VEYRA.md) · [veyra.html](./veyra.html) - Integrators: [docs.html](./docs.html) · [CONNECT.md](./CONNECT.md) - Releases: [releases.json](./releases.json) · [whats-new.html](./whats-new.html) - `window.kcc20.veyra` on SDK 174+