-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add deep linking capability to handle payment URIs and direct links for seamless transaction initiation.
What is Deep Linking?
Allows opening the wallet directly to specific functionality (like send screen) with pre-filled data via custom URIs.
Current State
- No deep linking support
- Cannot handle
peercoin:URIs from external sources - No integration with web/mobile payment flows
Benefits
- One-click payments from emails/websites/forms
- Support for standard crypto URI schemes (
peercoin:address?amount=X) - Better integration
Implementation
Platform Setup
Android (AndroidManifest.xml):
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="peercoin" />
</intent-filter>iOS (Info.plist):
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array><string>peercoin</string></array>
</dict>
</array>Flutter Code
Main Entry (main.dart):
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initial URI handling
final initialUri = await getInitialUri();
if (initialUri != null) handleDeepLink(initialUri);
// Runtime URI handling
uriLinkStream.listen((uri) => uri != null ? handleDeepLink(uri) : null);
runApp(MyApp());
}
void handleDeepLink(Uri uri) {
if (uri.scheme == 'peercoin') {
// Extract address, amount, label from URI
// Navigate to send screen with pre-filled data
}
}Supported URI Formats
- Custom Scheme:
peercoin://pay?address=...&amount=X&label=Y - Standard BIP-21:
peercoin:address?amount=X&label=Y
Parameters
address(required): Recipient addressamount(optional): Payment amountlabel(optional): Descriptionmessage(optional): Additional info
Testing
- Test URI handling from emails, browsers, other apps
- Validate error handling for invalid inputs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request