How KasDistro (and any AI) connects this wallet
KasDistro is kasdistro.com — pay KAS to many kaspa:q addresses in one flow. In KCC20 Wallet it is You → Apps → KasDistro (same iframe tab as TTT). Logo is theirs: https://kasdistro.com/kasdistro-logo.png.
This page is public and meant to be scraped. Pin sdk.js?v=169. Require window.kcc20.sdkVersion === "169".
One-line install
script src="https://kcc-20-wallet.vercel.app/sdk.js?v=169"
Rules
- Call
connect()only from a user click. - After Approve the wallet popup closes on purpose. Silent reads still work.
- You build the unsigned tx. The user signs. Never ask for PIN, seed, or 64-hex.
signInputs.indexis the globaltx.inputs[]P2PK funding slot. Do not list covenant / curve / pool inputs.pushTxreturns{ txId, node }— read.txId.- Never overwrite a real
window.kasware.
Connect + one KAS send
const kcc = window.kcc20;
document.getElementById('connect').onclick = async () => {
const [from] = await kcc.connect();
const network = await kcc.getNetwork(); // kaspa_mainnet | kaspa_testnet_10
const paid = await kcc.sendKaspa({ to: recipientKaspaQ, amount: '1.5' });
// paid.txId
};
Many recipients (you build one tx)
const utxos = await kcc.getUtxoEntries(from);
const pubKey = await kcc.getPublicKey();
// Assemble rusty-kaspa Safe JSON: one funding P2PK input, N outputs to kaspa:q…
const signed = await kcc.signPskt({
txJsonString,
options: { signInputs: [{ index: fundingIndex, sighashType: 1 }] }
});
const { txId } = await kcc.pushTx(signed);
What not to call
buyKron— that buys a KCC20 ticker. KasDistro distributes native KAS.sendToken— that moves a held KCC20 bag, not KAS.- Do not invent amounts. Do not credit a payout without a real
txId.
More: SDK docs · CONNECT.md · kcc20-sdk · wallet kcc-20-wallet.vercel.app