Connect an app
How any app finds Kannuki's extension, connects, signs in with both keys, pays, asks for QoreChain transactions (send, swap, stake, contract calls) and calls contracts from ordinary EVM code.
With the extension installed, an app can use Kannuki the way apps use any wallet: find it, connect, ask it to sign. The person answers each request in the extension's own window, which names the site. Try every call on the live example.
- 1Your device
The app asks
Through window.kannuki, or the Ethereum provider Kannuki announces.
- 2Your device
The extension checks
It knows which site is asking from Chrome, not from the page.
- 3Your device
You decide
Its own window shows the site and exactly what is asked. Closing it declines.
- 4QoreChain
QoreChain
Every transaction is signed with both keys and checked like any other.

Three ways in
| Your app already speaks | Use | What you get |
|---|---|---|
| Nothing yet | window.kannuki.request({ method, params }) | Everything on this page |
QoreChain's own wallet (signAndBroadcast) | window.kannuki.native | enable, getKey and signAndBroadcast with the same request shape; the result has txHash and code |
| Ethereum wallets (viem, wagmi, ethers) | The EIP-1193 provider, found through EIP-6963 | Connect, switch network, sign in, send contract calls |
Find it
// The way any EVM app fills its wallet list (EIP-6963). Kannuki announces itself as rdns "xyz.kannuki".
window.addEventListener('eip6963:announceProvider', (e) => {
if (e.detail.info.rdns === 'xyz.kannuki') provider = e.detail.provider
})
window.dispatchEvent(new Event('eip6963:requestProvider'))
// Or directly. It can appear a moment after the page starts:
const kannuki = window.kannuki // { isKannuki: true, version: '2', request(), native, ethereum }
window.addEventListener('kannuki#initialized', () => { /* it is there now */ })Kannuki never takes over window.ethereum, so it doesn't fight other wallets for it.
Requests
| Method | Asks the person? | Returns |
|---|---|---|
kannuki_connect | Yes, once per site | { name, qor1, evm, pqcPublicKey, network } |
kannuki_accounts | No | The same object if this site is connected, otherwise null |
kannuki_signMessage { message } | Yes, every time | { signed, signature, pqcSignature, publicKey, pqcPublicKey } |
kannuki_send { to, amount, memo? } | Yes, every time | { status: 'included' | 'unknown', hash } or { status: 'refused', reason } |
kannuki_signAndBroadcast { messages, memo?, gasLimit? } | Yes, every time | { status: 'included', hash, height, gasUsed }, { status: 'unknown', hash }, { status: 'failed', hash, reason } or { status: 'refused', reason } |
kannuki_switchNetwork { network } | Yes, unless already there | { network: 'testnet' | 'mainnet' } |
kannuki_disconnect | No | true |
A declined request rejects with { code: 4001 }; a request from a site that isn't connected with { code: 4100 }; an
unsupported method with { code: 4200 }; a chain that isn't QoreChain with { code: 4902 }; no wallet yet with
{ code: 4900 }.

Sign in with both keys
kannuki_signMessage signs this exact text, returned as signed:
Kannuki signed message
Site: https://example.org
Sign in to example.orgThe heading and the site's own address are part of what's signed, so a signature made for one site fails on another, and it can never be a transaction. Two signatures come back over the same bytes:
signature: key one, secp256k1 oversha256(signed), compact hex.pqcSignature: key two, ML-DSA-87 oversigned, hex.
Check both, then check that pqcPublicKey is the key QoreChain has registered for the account
(GET /qorechain/pqc/v1/account/{qor1}). A phished seed phrase can produce the first signature, never the second.
import { secp256k1 } from '@noble/curves/secp256k1'
import { sha256 } from '@noble/hashes/sha2'
import { hexToBytes, utf8ToBytes } from '@noble/hashes/utils'
import { pqcVerify } from '@qorechain/sdk'
const bytes = utf8ToBytes(signed.signed)
const one = secp256k1.verify(hexToBytes(signed.signature), sha256(bytes), hexToBytes(signed.publicKey.slice(2)))
const two = pqcVerify(hexToBytes(signed.pqcPublicKey), bytes, hexToBytes(signed.pqcSignature))Kannuki's own check is sign.ts.
QoreChain transactions
kannuki_signAndBroadcast takes a list of messages, each protobuf-encoded by whatever you already use
(@qorechain/sdk, cosmjs, your own encoder). value may be a Uint8Array, an array of numbers, base64 or 0x-hex.
import { msg, qorechainRegistry } from '@qorechain/sdk'
const stake = msg.staking.delegate({ delegatorAddress, validatorAddress, amount: { denom: 'uqor', amount: '1000000' } })
const any = qorechainRegistry().encodeAsAny(stake)
const result = await window.kannuki.request({
method: 'kannuki_signAndBroadcast',
params: { messages: [{ typeUrl: any.typeUrl, value: any.value }], memo: 'Staked from example.org' },
})

A site can ask for the messages whose whole effect the window can say in plain words, by exact type:
| What | Message |
|---|---|
| Send QOR or a token | /cosmos.bank.v1beta1.MsgSend |
| Send to another chain | /ibc.applications.transfer.v1.MsgTransfer (with an empty IBC memo) |
| Swap | /qorechain.amm.v1.MsgSwapExactIn, MsgSwapExactOut |
| Stake, unstake, move, claim | /cosmos.staking.v1beta1.MsgDelegate, MsgUndelegate, MsgBeginRedelegate, /cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward |
| Lock a stake, claim its bonus | /qorechain.stakingtier.v1.MsgLockDelegation, MsgClaimBonus |
| Move a token to the main side | /cosmos.evm.erc20.v1.MsgConvertERC20 (to the account itself) |
| Call an EVM contract | /qorechain.crossvm.v1.MsgCrossVMCall (EVM target, nothing attached, not queued) |
What the extension does with them:
- Decodes every message itself with QoreChain's registry and shows each step in plain words with its full addresses, and QoreChain's own read-back of the same bytes under Details.
- Sets the fee from Kannuki's fixed table, with the EVM's own estimate for contract calls (the whole gas limit is
charged on QoreChain);
gasLimitcan raise it, never lower it. A contract call that would fail isn't sent. - Signs with both keys and broadcasts. Several messages go in one transaction: all of them land or none does.
- Refuses everything else before the person is asked. That covers anything about who controls the account:
registering, rotating or migrating keys, EVM delegation, opening or closing an EVM window, the daily-allowance keys,
permission for someone else to act (authz, fee grants), where staking rewards go; and anything that wraps other
messages (proposals,
MsgExec). It also refuses a message written for another account, a contract call with money attached, an IBC transfer carrying forwarding instructions, and a token conversion to someone else. The rules are inrequests.ts.
Code written for QoreChain's own wallet can pass Kannuki instead:
await window.kannuki.native.enable('qorechain-diana')
const { bech32Address } = await window.kannuki.native.getKey('qorechain-diana')
const { txHash, code } = await window.kannuki.native.signAndBroadcast({ chainId: 'qorechain-diana', messages })For EVM apps
Kannuki is an Ethereum provider for QoreChain (testnet 0x2648, mainnet 0x2649). An app built with viem, wagmi or
ethers lists it as an installed wallet, connects, and sends contract calls with the code it already has.
import { createPublicClient, createWalletClient, custom, erc20Abi } from 'viem'
const wallet = createWalletClient({ chain: qoreTestnet, transport: custom(provider) })
const reader = createPublicClient({ chain: qoreTestnet, transport: custom(provider) })
const [address] = await wallet.requestAddresses()
const hash = await wallet.writeContract({
account: address, address: fUSD, abi: erc20Abi, functionName: 'approve', args: [spender, 1_000000n],
})
await reader.waitForTransactionReceipt({ hash })| Method | What Kannuki does |
|---|---|
eth_requestAccounts, eth_accounts | Connect (asks once), then the account's 0x address |
eth_chainId, net_version | The network the wallet is on |
wallet_switchEthereumChain, wallet_addEthereumChain | Switches between QoreChain's two networks (asks); any other chain gets 4902 |
personal_sign | Signs with key one, as EVM apps expect. The window says it is one key. It can't move anything on QoreChain's native side; a contract that accepts a key-one signature on its own is outside what the second key protects (what it doesn't cover). A sign-in message written for another site is refused |
eth_sendTransaction with data, no value | A contract call (see below) |
eth_sendTransaction with value, no data | A QOR payment to that address, signed with both keys. Refused when the address is a contract (its code would never run), and when the request names another network or account |
eth_call, eth_getBalance, eth_getLogs, eth_estimateGas, … | Passed to QoreChain's public EVM endpoint |
eth_getTransactionReceipt, eth_getTransactionByHash | Answered by Kannuki for the calls it sent |
Events: accountsChanged, chainChanged, connect.
How a contract call is sent
On QoreChain an EVM transaction is signed by key one alone, and an account with a registered second key can only send one while its EVM window is open. An open window is exactly what someone holding the 12 words could use, so Kannuki never opens one for an app.
Instead it sends the same call on QoreChain's native lane (MsgCrossVMCall): a native transaction, signed by both
keys, that calls the contract as the account's own 0x address. The contract sees the same msg.sender; the chain
checks both signatures; no window exists at any point.
What follows from that:
- The hash an app gets back is
0x+ the native transaction's hash. QoreChain's EVM endpoint has no receipt under it, so Kannuki answerseth_getTransactionReceiptitself (status, block, gas;logsis empty). Use a client whose transport is the provider, as above, and waiting for the receipt works. - A call that carries QOR (
valueanddatatogether) and publishing a contract both need a window, so Kannuki refuses them with4200and says why. - An approval is answered only to the page load that asked: if the tab has moved on, the answer is dropped.
- Before asking the person, Kannuki runs the EVM's own gas estimate. If the call would fail it says so and won't send it, because the fee would be charged anyway.
- Contract calls are on testnet. QoreChain has
MsgCrossVMCallswitched off on mainnet today.
Payments
kannuki_send asks for a QOR transfer on the network the wallet is on. The extension shows the amount, the recipient,
the fee and the network, and signs it with both keys like any other Kannuki transaction. An account whose second key
isn't registered yet can't be asked to pay: the window says so.
Connected sites
A site stays connected until it calls kannuki_disconnect or the person removes it in the extension under
Connected sites. Either way the site's open pages get accountsChanged with an empty list.
A site is connected to one account: the one that was open when the person pressed Connect. If they open another
account in the wallet, the site gets accountsChanged with an empty list, eth_accounts and kannuki_accounts
answer as if nobody is connected, and signing requests are refused with 4100. Ask to connect again and the
approval window offers the account that is open now; going back to the first account brings it back on its own. A
site never learns of an account the person didn't show it, and the address it shows is always the one that signs.
The approval window checks this again at the moment of signing, against what is stored then: a window left open
while the site is disconnected, or connected to another account, turns into "This site isn't connected" and answers
4100. Removing the wallet from the browser removes every connection with it.
Where the code is
| Piece | File |
|---|---|
What the page gets (window.kannuki, the provider, the EIP-6963 announcement) | provider.content.ts |
| Routing: who is asking, what needs approval, read calls, receipts | background.ts |
| The approval window | approve.tsx |
| Reading a request: decoding, the never-list, fees, contract calls | requests.ts |
| Shapes and error codes | protocol.ts |
| The live example | connect-demo.tsx |



