@zktx.io/walrus-wallet
v0.4.3
Published
Air-gapped Sui Wallet Standard adapter that registers Walrus Clip and routes connect and sign-and-execute through QR/WebRTC.
Downloads
515
Maintainers
Readme
@zktx.io/walrus-wallet
@zktx.io/walrus-wallet registers Walrus Clip as a Sui Wallet Standard
wallet. It is the dApp-facing package in this repository.
The current package is intentionally small. It supports:
- Wallet Standard discovery/connect/disconnect/events.
- QR/WebRTC air-gapped login.
- QR/WebRTC
sui:signAndExecuteTransaction. - QR/WebRTC
sui:signTransaction. - QR/WebRTC
sui:signPersonalMessage. - Basic read-only
Coin<T>helper queries.
It does not provide local private-key custody, zkLogin proof generation, password modals, or sponsored transaction creation.
This package is still evolving. Treat the 0.4.x line as a breaking
modernization line, not a long-term stable API promise.
Install
npm install @zktx.io/walrus-wallet @zktx.io/walrus-connectPeer dependencies are pinned intentionally:
Basic Usage
import {
WalrusWallet,
WALRUS_WALLET_SUPPORTED_NETWORKS,
createWalrusWalletSuiClient,
} from '@zktx.io/walrus-wallet';
import '@zktx.io/walrus-wallet/index.css';Use the exported network tuple and client factory with your Wallet Standard or
dApp Kit setup. Render WalrusWallet once near your app shell so it can
register the wallet and host the QR route UI.
<WalrusWallet
network="testnet"
iceConfigUrl={import.meta.env.VITE_APP_ICE_CONFIG_URL}
onEvent={({ variant, message }) => {
console.log(variant, message);
}}
>
{children}
</WalrusWallet>iceConfigUrl is optional. When provided, the URL must serve
{url}/ice-conf.json with WebRTC ICE server configuration. Production apps
should operate their own short-lived TURN credential service instead of
depending on the bundled public fallback.
Public Surface
WalrusWalletWALLET_NAMEWALRUS_WALLET_SUPPORTED_NETWORKScreateWalrusWalletSuiClient(network)getWalrusCoinBalancesgetWalrusCoinsformatWalrusCoinAmountWalrusWalletErrorand typed wallet error subclassesWalrusCoinBalance
The wallet advertises only:
standard:connectstandard:disconnectstandard:eventssui:signAndExecuteTransactionsui:signTransactionsui:signPersonalMessage
All three Sui signing methods route through QR/WebRTC. sui:signTransaction
returns signed transaction bytes without submission, while
sui:signAndExecuteTransaction submits and returns the digest/effects outcome.
Boundaries
QR/WebRTC is an internal signing route. dApps should not import route internals or launch QR modals directly. Use Wallet Standard features.
The public Sui client helper returns an SDK 2.x SuiGrpcClient. Coin helpers
also use the same Core/gRPC client shape; fields that only existed in the older
client response shape, such as locked-balance maps, are not fabricated.
Transaction build, execution, finality, and signature verification for the QR
route live behind the internal route owner.
Current Limitations
- No local signing path.
- No zkLogin or OAuth callback flow.
- No sponsored transaction helper.
- No production guarantee for the bundled public ICE/TURN fallback.
- Manual QR smoke testing is still important for release validation because WebRTC behavior depends on browser, network, and relay conditions.
