@coldai/clip-wallet-extension-kit
v0.2.0
Published
Build a branded Clip Wallet browser extension with WXT: background, pages, 1Mask wiring and the security floor, configured by clip.config.ts
Readme
@coldai/clip-wallet-extension-kit
The Clip Wallet browser extension as a library, for WXT. A wallet project keeps its identity
(clip.config.ts, icon), wxt.config.ts and one-line entrypoints; the background (vault, approvals, security
checks), the pages, 1Mask for all 26 network families and the build wiring come from here, versioned and signed.
Pre-release: Clip Wallet runs on test networks only and has had no external audit.
Install
npm i @coldai/clip-wallet-extension-kit @coldai/clip-wallet-config wxt @wxt-dev/module-react react react-domExample
// wxt.config.ts
import { defineConfig } from "wxt";
import { defineConfig as defineClipConfig } from "@coldai/clip-wallet-config";
import { clipWallet } from "@coldai/clip-wallet-extension-kit/wxt";
const clipConfig = defineClipConfig({ name: "Acme Wallet", rdns: "com.acme.wallet", networks: ["evm:*", "hedera", "solana"] });
export default defineConfig(clipWallet({ config: clipConfig }));// src/entrypoints/background.ts
import { defineBackground } from "wxt/utils/define-background";
import { startBackground } from "@coldai/clip-wallet-extension-kit/background";
export default defineBackground({ type: { firefox: "module" }, main: () => startBackground() });| Entrypoint | Import |
| --- | --- |
| background | startBackground() from /background |
| content (ISOLATED) | startContentBridge(), CONTENT_MATCHES from /content |
| inpage (MAIN) | installInpage(), CONTENT_MATCHES from /inpage |
| popup, tab | mountWallet("popup" \| "tab") from /pages |
| approval | mountApprovalWindow() from /pages |
| plugin host (offscreen) | startPluginHost() from /plugin-host |
| plugin sandbox | import "@coldai/clip-wallet-extension-kit/plugin-sandbox" |
npx create-clip-wallet my-wallet (or the Scaffold-HBAR template) writes all of this for you.
What clipWallet() does
- Identity. Manifest name, description and
key(a fixed extension id) from clip.config.ts; EIP-6963 / Wallet Standard name, icon and rdns;window.<wallet key>for NEAR, Stellar and Algorand; TON Connect bridge key; Firefox gecko id from the rdns. The icon must ship with the extension. - Build environment.
CLIP_WALLETCONNECT_PROJECT_ID, partner keys (CLIP_0X_API_KEY,CLIP_JUPITER_API_KEY,CLIP_MOONPAY_*,CLIP_BANXA_PARTNER,CLIP_C14_*,CLIP_COINGECKO_DEMO_KEY,CLIP_BLOCKAID_API_KEY) from the environment orCLIP_*lines in.env. Nothing else in.envis read. SODAX swaps between networks (with the disclosed 0.875 % Clip fee to ColdAI LLC) needCLIP_SODAX_SERVER_URLandCLIP_SODAX_FEE_RECEIVERin a mainnet build, and a mainnet build with only one, or with a receiver that isn't reviewed, is refused. - Security floor. The open phishing lists are always on and refreshed daily; there is no option to switch them
off, and
@coldai/clip-wallet-securityrefuses a mainnet config that tries. Blockaid scanning is added only with a key. - Mainnet checklist. A config with mainnet enabled is refused at build time while
mainnetProblems()lists anything or the project'sMAINNET.mdhas an open box. - Fixture mode.
CLIP_MOCKS=1 wxt buildbuilds with mock chains, route and dapps for screenshots and demos.
Peer dependencies: wxt, @wxt-dev/module-react, react, react-dom.
Documentation
Versioning and provenance
Published from ColdAI-org/clip-wallet by CI with npm provenance: every
tarball is signed and traceable to the commit that built it (npm audit signatures checks it). All @coldai/clip-wallet-*
packages share one version; pin it exactly.
Licence
Apache-2.0: see LICENSE and NOTICE. "Clip Wallet" and "1Mask" are ColdAI trademarks (not licensed).
