Skip to content

OneKey supports Cardano - #218

Draft
hippocampusSK wants to merge 18 commits into
developfrom
feature/onekey-cardano-support
Draft

hippocampusSK wants to merge 18 commits into
developfrom
feature/onekey-cardano-support

Conversation

@hippocampusSK

@hippocampusSK hippocampusSK commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

OneKey users can connect Cardano and send or swap on it.
Kept separate because signing currently hangs on OneKey's confirmation screen and still needs to be investigated; it builds on the OneKey networks update.

Linear: API-3831

hippocampusSK and others added 17 commits October 28, 2026 17:54
Connect each chain through the provider the OneKey extension injects,
checked against OneKey's own provider and background sources. Bitcoin
moves to the Unisat-style $onekey.btc API and Solana to $onekey.solana:
the previous sats-connect and $onekey.sol paths never matched what the
extension exposes, so both chains failed to connect.

Sui, TRON and Stellar signatures are checked against the requested
transaction before they are returned. NEAR and TON can only sign and
send, so they go through the toolbox's sign-and-send path. The unused
EVM signer is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…nd OneKey

Both wallets talk to the same TON Connect bridge, so the connect, send
and transfer logic moves to one helper. Each wallet passes its own
provider and errors, so OKX keeps its existing error keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…tichain-support

# Conflicts:
#	bun.lock
#	packages/wallet-extensions/package.json
…cels

OneKey queues every pending approval, so requesting all networks at once
kept opening windows after the user cancelled one. Networks are now
requested in order; a cancel stops the loop and keeps the ones already
approved, as OKX does. Other failures skip that network with a warning.

The TON Connect helper keeps the wallet's error code on a rejected
connection, so a manifest error is no longer mistaken for a cancel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
… test

The test left a manifestUrl in the shared config, so the OKX test that
expects no manifest failed whenever it ran afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…d tronWeb

When a site was already connected, tron_requestAccounts answered at once
but the injected tronWeb still had no default address, so TRON reported
a user rejection and stopped the whole connection. The address now comes
from tron_accounts and signing goes through the provider's sign method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
Sui cannot be tested against the OneKey extension yet, so it leaves this
change and returns in a follow-up. The rejection test now uses Stellar
as the chain that must not be requested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
Signing hangs in OneKey's confirmation screen, so Cardano leaves this
change until that is resolved and returns in a follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
Connect Cardano through OneKey's CIP-30 provider, mainnet only. The
wallet's witnesses are added to the requested transaction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…ctions

Cancelling the EVM approval now stops the remaining approval windows:
ethers reports OneKey's rejection as ACTION_REJECTED, which was not
recognised. TRON and TON only count a declined approval as a rejection
and skip the chain on any other failure. The TON Connect helper decides
this itself, so OKX also reports manifest errors as connection failures.

TON moves into the OneKey helpers and EVM chains are matched with
EVMChains instead of a separate list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…out its sign()

OneKey can answer 4000 to tron_requestAccounts right after the user
approves, so the connected account from tron_accounts now decides whether
TRON connected. Signing calls tron_signTransaction directly: OneKey's
injected sign() calls a tronWeb.utils.isString its TronWeb no longer has,
which made every TRON signature fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…requested

OneKey received the same transaction object the check and the result
used, so a provider that rewrote it in place passed the check. It now
gets a copy, and the txID check and the returned transaction come from
the requested one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QKkbKMCDEvXWUuh6hv
…tichain-support

# Conflicts:
#	bun.lock
#	packages/wallet-extensions/package.json
Base automatically changed from feature/onekey-multichain-support to develop November 3, 2026 17:05
Resolves the conflicts left by the squash-merge of the OneKey networks
update and its release: keeps the Cardano connector on top of the
released helpers and drops the already published changeset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7T5QNFUSnoUdjpgbvcx2V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant