MCPcopy Index your code
hub / github.com/burnt-labs/xion.js

github.com/burnt-labs/xion.js @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,220 symbols 3,219 edges 351 files 247 documented · 20% updated 17d ago@burnt-labs/abstraxion-react-native@1.0.0-alpha.21 · 2026-06-11★ 521 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

xion.js

Official XION JavaScript SDK monorepo.

Packages

Package What it is
@burnt-labs/abstraxion-js Framework-agnostic runtime: controllers, strategies, createAbstraxionRuntime. Use directly from Svelte/Vue/JS.
@burnt-labs/abstraxion-react React wrapper — provider, hooks, <AbstraxionEmbed>. Built on abstraxion-js.
@burnt-labs/abstraxion-react-native React Native wrapper — same hook surface, with RN strategies and in-app <WebView> embed.
@burnt-labs/abstraxion-core Connector layer (Cosmos / Ethereum / external signers) and the SDK ↔ Dashboard iframe message protocol.
@burnt-labs/account-management Orchestrator: session restoration, account discovery/creation, grant state.
@burnt-labs/signers CosmJS-based signers and cryptographic utilities for Abstraxion accounts.
@burnt-labs/constants Shared chain IDs, RPC URLs, dashboard URLs, denoms.

See ARCHITECTURE.md for how the layers fit together.

Removed in v1

These packages have been removed from the active workspace and will not be published in the v1 line:

  • @burnt-labs/abstraxion — renamed to @burnt-labs/abstraxion-react. Same React wrapper; npm name only. See the package's README for the migration note.
  • @burnt-labs/ui — deprecated. The legacy <Abstraxion> modal it powered is superseded by <AbstraxionEmbed> in @burnt-labs/abstraxion-react. Last published version is @burnt-labs/ui@1.0.0-alpha.26.
  • @burnt-labs/tailwind-config, @burnt-labs/tsconfig, @burnt-labs/eslint-config-custom — workspace ergonomics only, never load-bearing for external consumers. Consumers that extended these should switch to standard configs (e.g. @vercel/style-guide, @tsconfig/*).

Quick start

React (web)

npm i @burnt-labs/abstraxion-react
import {
  AbstraxionProvider,
  AbstraxionEmbed,
  useAbstraxionAccount,
} from "@burnt-labs/abstraxion-react";

const config = {
  chainId: "xion-testnet-2",
  treasury: "xion1...",
  authentication: { type: "auto" }, // popup on desktop, redirect on mobile
};

export default function App() {
  return (
    <AbstraxionProvider config={config}>
      <AbstraxionEmbed />
      <Account />
    </AbstraxionProvider>
  );
}

React Native (Expo)

npm i @burnt-labs/abstraxion-react-native \
      @react-native-async-storage/async-storage \
      expo-web-browser expo-linking
# embedded mode only:
npm i react-native-webview

Other framework (Svelte / Vue / vanilla JS)

npm i @burnt-labs/abstraxion-js
import { createAbstraxionRuntime } from "@burnt-labs/abstraxion-js";

const runtime = createAbstraxionRuntime(config);
runtime.subscribe((state) => {
  /* mirror state into your framework's reactivity primitive */
});
await runtime.login();

See demos/svelte/ for a worked example.

Demos

  • demos/react — Vite + React (replaces the previous apps/demo-app Next.js demo)
  • demos/react-native — Expo + React Native; redirect and embedded modes
  • demos/svelte — Vite + Svelte wired directly against abstraxion-js
  • demos/node — Node.js placeholder

Development

pnpm dev      # Start all packages in dev mode
pnpm build    # Build all packages
pnpm lint     # Lint code
pnpm format   # Format code
pnpm test     # Run tests

Publishing

pnpm changeset          # Create a changeset
pnpm version:packages   # Version packages
pnpm publish:packages   # Publish to npm

Built with Turborepo, TypeScript, and Tailwind CSS.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 455
Method 401
Interface 216
Class 138
Enum 10

Languages

TypeScript100%

Modules by API surface

packages/abstraxion-js/src/controllers/IframeController.ts37 symbols
packages/abstraxion-js/tests/integration/helpers.ts34 symbols
packages/test-utils/src/mocks/strategies.ts29 symbols
packages/abstraxion-js/src/controllers/RedirectController.ts28 symbols
packages/abstraxion-core/src/SignArbSecp256k1HdWallet.ts27 symbols
packages/abstraxion-core/src/AbstraxionAuth.ts27 symbols
packages/abstraxion-react-native/src/strategies/RNWebViewIframeTransport.ts25 symbols
packages/abstraxion-core/src/types/iframe.ts23 symbols
packages/abstraxion-js/src/__tests__/runtime.test.ts20 symbols
packages/abstraxion-js/src/controllers/PopupController.ts18 symbols
packages/abstraxion-core/src/utils/grant/errors.ts18 symbols
packages/abstraxion-core/src/utils/cache/CacheManager.ts17 symbols

For agents

$ claude mcp add xion.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page