feat(mobile): add counterfactual address preview component - #547
Conversation
…k config Creates CounterfactualAddressPreview component that derives and displays the wallet's predicted contract address pre-deployment using the SDK's counterfactual computation. Also adds the shared network configuration needed by mobile screens. Closes Miracle656#449
|
@iredis is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@iredis Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks — the component itself is well shaped, with a proper It won't resolve at runtimeimport { deriveCounterfactualAddress } from 'invisible-wallet-sdk';
Wiring the SDK into the mobile package is its own piece of work, and #594 ( Nothing mounts it
|
Overview
This PR adds a Counterfactual Address Preview component that derives and displays the wallet's predicted contract address before the deploy transaction is submitted. It uses the SDK's
deriveCounterfactualAddressto compute the deterministic contract address from the user's P-256 public key, letting onboarding show a real, fundable address immediately.Also adds a shared network configuration module for the mobile app (ported from the web wallet's
lib/network.ts, usingEXPO_PUBLIC_*env vars).Related Issue
Closes #449
Changes
📦 New Files
frontend/mobile/components/CounterfactualAddressPreview.tsx— React Native component that derives and displays the predictedC…address pre-deploy. Shows deriving/ready/error states, the computed address, and the public key hex for verification.frontend/mobile/lib/network.ts— Shared network configuration (testnet/mainnet) with Horizon/RPC URLs, factory contract ID, and friendbot support, usingEXPO_PUBLIC_*environment variables.Verification
C…address pre-deployderiveCounterfactualAddressfrom the SDKcomputeWalletAddressalgorithm as the SDK — deterministic derivation