Installation
Try it from source
Section titled “Try it from source”The source is on GitHub. Node 22+ and pnpm 10:
git clone https://github.com/ultratestbro/anywalletkit.gitcd anywalletkitpnpm installpnpm buildpnpm --filter ./examples/quickstart testEvery snippet on this site comes from a package in examples/,
and each one runs the same way.
Pick your packages
Section titled “Pick your packages”Every package is on npm under @anywalletkit, published from
CI with provenance (npm audit signatures checks it). npm, pnpm, yarn and npx expo install all work;
the commands on this site use npm.
Every wallet needs core and kit, plus one package per chain family it supports:
npm install @anywalletkit/core @anywalletkit/kit \ @anywalletkit/wallet-evm @anywalletkit/wallet-solana @anywalletkit/wallet-ton \ @anywalletkit/wallet-btc @anywalletkit/wallet-tron @anywalletkit/wallet-nearSwaps, staking and lending are separate packages — add them when you need them (see Packages).
React Native / Expo
Section titled “React Native / Expo”React Native is the primary target: every chain package is tested inside the Hermes VM before a release. Hermes misses a few web APIs the cryptography and network code expect; you install them once, at the app entry, before anything else is imported.
npx expo install react-native-get-random-valuesnpm install @anywalletkit/runtime-hermes buffer fastestsmallesttextencoderdecoder react-native-url-polyfillPut the polyfills in their own file so nothing can be evaluated before them:
// 1. Secure randomness — seed phrases and signatures depend on it. Must be first.import 'react-native-get-random-values'
// 2. A global Buffer (TON and Bitcoin libraries read it).import { Buffer } from 'buffer'globalThis.Buffer ??= Buffer
// 3. Hermes ships TextEncoder but no TextDecoder.import 'fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js'
// 4. React Native's URL has no working searchParams; providers parse endpoints with it.import 'react-native-url-polyfill/auto'
// 5. Everything else the SDK relies on: AbortSignal.timeout / any,// crypto.subtle.digest, structuredClone, the Buffer.subarray fix.// Each piece is installed only when it is missing; it throws if 1–4 are absent.import { installHermesRuntime } from '@anywalletkit/runtime-hermes'installHermesRuntime()import './polyfills'import 'expo-router/entry' // or your AppRegistry.registerComponent(...)Point "main" in package.json at index.js.
TON on Metro
Section titled “TON on Metro”@anywalletkit/wallet-ton depends on @ton/crypto-primitives, whose React Native build requires
expo-crypto and the native react-native-fast-pbkdf2 module. Install expo-crypto
(npx expo install expo-crypto) and resolve the native module to the pure-JS drop-in that
runtime-hermes ships:
const { getDefaultConfig } = require('expo/metro-config')const config = getDefaultConfig(__dirname)const resolveRequest = config.resolver.resolveRequestconfig.resolver.resolveRequest = (context, moduleName, platform) => moduleName === 'react-native-fast-pbkdf2' ? { type: 'sourceFile', filePath: require.resolve('@anywalletkit/runtime-hermes/fast-pbkdf2') } : (resolveRequest ?? context.resolveRequest)(context, moduleName, platform)module.exports = configNode 22 or newer needs no polyfills. Run a patched release: Node 20 no longer gets security fixes, and the October 2026 fixes are in 22.23.4, 24.22.1 and 26.12.1.
npm install @anywalletkit/core @anywalletkit/kit @anywalletkit/wallet-evmAll packages ship ESM and CommonJS builds with TypeScript types.
Build your first multichain wallet in the Quickstart.