Official XION JavaScript SDK monorepo.
| 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.
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/*).
npm i @burnt-labs/abstraxion-reactimport {
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>
);
}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-webviewnpm i @burnt-labs/abstraxion-jsimport { 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/react— Vite + React (replaces the previousapps/demo-appNext.js demo)demos/react-native— Expo + React Native; redirect and embedded modesdemos/svelte— Vite + Svelte wired directly againstabstraxion-jsdemos/node— Node.js placeholder
pnpm dev # Start all packages in dev mode
pnpm build # Build all packages
pnpm lint # Lint code
pnpm format # Format code
pnpm test # Run testspnpm changeset # Create a changeset
pnpm version:packages # Version packages
pnpm publish:packages # Publish to npmBuilt with Turborepo, TypeScript, and Tailwind CSS.