Documentation Index
Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Usestarkzap-native when integrating StarkZap in React Native/Expo apps.
It re-exports the SDK API and adds a Metro helper (starkzap-native/metro) for runtime polyfills and resolver compatibility.
1) Install Packages
Install the React Native package and required runtime peers:2) Configure Metro
Set up Metro once and wrap your config withwithStarkzap:
withStarkzap injects required polyfills and resolver handling for StarkZap dependencies.3) Initialize the SDK
Import fromstarkzap-native and use the same onboarding APIs as web:
4) Cartridge (native session)
When yourstarkzap-native version supports it, you can onboard with Cartridge using an in-app browser / deep-link session flow (not the web @cartridge/controller popup).
- Register the native Cartridge adapter once at app startup, before
connectCartridge()oronboard({ strategy: OnboardStrategy.Cartridge }). Exact export names depend on your SDK version (for exampleregisterCartridgeTsAdapter/registerCartridgeNativeAdapter). - Pass policies and/or a Cartridge preset that resolves policies for your chain (same concepts as Cartridge Controller).
- Align
rpcUrl/chainId(ornetwork) onnew StarkZap({ ... })with the session and paymaster you target. - Deploy: native Cartridge flows often default to
deploy: "never"or recommend it when deployment semantics differ from the browser Controller. Passdeploy: "if_needed"explicitly if you need core-style deployment checks. - Fees: sponsored execution on native is tied to the session wallet (commonly
feeMode: "sponsored"only for matching policy paths).
examples/tic-tac-toe app in the Starkzap repository when available for a full Expo reference.