Quick Start
Get started with BlockFact in 5 minutes
1. Install the SDK
npm install @blockfact/react-native-facti-pro blockfact-core mopro-ffinpx @blockfact/setupThis installs the SDK, native processing modules, and downloads the MobileCLIP embedding model. All processing happens on-device — images never leave the phone. See Native Module Setup for platform-specific details.
2. Wrap Your App
import { BlockFactProvider } from '@blockfact/react-native-facti-pro';
function App() {
return (
<BlockFactProvider apiBase="https://api.blockfact.io">
<YourApp />
</BlockFactProvider>
);
}3. Create a Wallet
import { useBlockFact } from '@blockfact/react-native-facti-pro';
function WalletScreen() {
const { wallet, createWallet, hasWallet } = useBlockFact();
if (!hasWallet) {
return <Button title="Create Wallet" onPress={createWallet} />;
}
return <Text>Wallet: {wallet.address}</Text>;
}4. Register Content
import { useBlockFact } from '@blockfact/react-native-facti-pro';
function CameraScreen() {
const { registerContent } = useBlockFact();
const handleCapture = async (photo) => {
const { jobId, factiLocalPath } = await registerContent({
filePath: photo.uri,
filename: photo.fileName || 'photo.jpg', // from camera response
mime: photo.type || 'image/jpeg', // defaults to image/jpeg
latitude: location.latitude,
longitude: location.longitude,
});
console.log('Queued:', jobId);
console.log('.facti file:', factiLocalPath);
// Job processes in background, survives offline
// .facti built on-device — image never leaves the phone
};
}✅ That's it!
Your content is now registered on the blockchain with a .facti file built on-device. Images never leave the phone — only a few KB of metadata are sent to the backend. Optionally pin to IPFS with uploadToIPFS(factiLocalPath).