FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
XMTP decentralize chatting
How-ToWeb Development

XMTP decentralize chatting

via Dev.to JavaScriptSwatantra goswami1mo ago

import { Client , PublicIdentity , ReplyCodec , ConsentRecord , } from ' @xmtp/react-native-sdk ' ; import { IS_SANDBOX } from ' dok-wallet-blockchain-networks/config/config ' ; import { ContentTypeCustomReplyCodec } from ' ./xmtpContentReplyType ' ; import crypto from ' react-native-quick-crypto ' ; import SensitiveInfo from ' react-native-sensitive-info ' ; import { Buffer } from ' buffer ' ; import RNFS from ' react-native-fs ' ; const XMTP_DB_KEY_STORAGE = ' xmtp_db_encryption_key ' ; const KEYCHAIN_SERVICE = ' com.dokwallet.xmtp ' ; const XMTP_ENV = IS_SANDBOX ? ' dev ' : ' production ' ; const getOrCreateDbEncryptionKey = async () => { try { const stored = await SensitiveInfo . getItem ( XMTP_DB_KEY_STORAGE , { keychainService : KEYCHAIN_SERVICE , }); if ( stored ) { return Buffer . from ( stored , ' hex ' ); } } catch ( e ) { console . warn ( ' XMTP: failed to read encryption key from storage ' , e ); } const key = crypto . randomBytes ( 32 ); try { await SensitiveInfo . setItem

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
20 views

Related Articles

The Biggest Lie in Bug Bounty Tutorials
How-To

The Biggest Lie in Bug Bounty Tutorials

Medium Programming • 2d ago

DAY 8: The System Was Never Meant to Pay You
How-To

DAY 8: The System Was Never Meant to Pay You

Medium Programming • 2d ago

How-To

MakerCode v2.0 Release

Medium Programming • 2d ago

Introduction to the PineTime Pro
How-To

Introduction to the PineTime Pro

Lobsters • 2d ago

How to Turn MiroFish Into a Production Grade Polymarket Research Engine
How-To

How to Turn MiroFish Into a Production Grade Polymarket Research Engine

Medium Programming • 2d ago

Discover More Articles