Skip to main content

SDK API

Three packages, one session. ESM only.

@zunialab/sdk-web​

Export
createZuniaSession()Session that picks a transport.
connectWithZunia(options)Create, connect, return the session.
restoreSession(options)Create and restore, or null.
createExtensionSession / createZuniaWsSession / createWalletConnectSessionForce one transport.
getZunia / getZuniaSync / isZuniaInstalled / enableZuniaProvider helpers.
renderQrSvg / qrMatrixLocal QR rendering.
createConnectWithZuniaButtonDOM button. CSS at @zunialab/sdk-web/connect-button.css.

ConnectOptions: chains, metadata, prefer (auto | extension | native-ws | walletconnect), apiBase, wsBase, walletConnectProjectId, timeoutMs, requestTimeoutMs, storage (null disables persistence), openInstallIfMissing.

A session exposes connect, restore, disconnect, signIn, signAmino, signDirect, signArbitrary, getOfflineSigner, getOfflineSignerOnlyAmino, accounts, chains, status, on / off, subscribe, getSnapshot.

@zunialab/sdk-react​

Export
useZuniaSession(options?)Hook. { restore, session }.
useZunia()Detect window.zunia.
ConnectWithZuniaButtonOfficial button.
ConnectPairingModalQR, then 6-digit code.
ZuniaQrCode / ZuniaMarkPresentational.
Re-exportscreateZuniaSession, ZuniaConnectError, createNonce, …

@zunialab/sdk-core​

Export
verifySignIn / createNonce / buildSignInMessage / parseSignInMessage / checkSignInBindingSign-in.
ZuniaConnectError / ZuniaSignInErrorErrors.
ConnectCipher / deriveConnectKeys / verificationCodeFrom / parsePairingUri / buildPairingUrizunia.connect.v2 crypto and URIs.
normalizeAminoResponse / normalizeDirectResponse / normalizeStdSignatureWire to CosmJS shapes.
TypesZuniaProvider, ZuniaSession, ZuniaAccountInfo, …
ConstantsZUNIA_CONNECT_PROTOCOL, ZUNIA_CONNECT_PATHS, ZUNIA_WALLETCONNECT, deep links.

Test vectors: test-vectors/sign-in-vectors.json and test-vectors/connect-v2-vectors.json inside the package.

@zunialab/interchain​

IBC channel discovery, denom unwinding, packet-forward / ibc-hooks memos, cross-chain swaps and NFTs. Used by the wallet. A dApp can use it without talking to Zunia.