* Initial plan * feat: Implement CLI tool with init, upload, and verify commands Co-authored-by: PatrickFanella <61631520+PatrickFanella@users.noreply.github.com> * fix: Resolve linting issues and add CLI-specific eslint config Co-authored-by: PatrickFanella <61631520+PatrickFanella@users.noreply.github.com> * refactor: Address code review feedback - improve validation, memory efficiency, and type safety Co-authored-by: PatrickFanella <61631520+PatrickFanella@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: PatrickFanella <61631520+PatrickFanella@users.noreply.github.com>
8.4 KiB
Platform Verification Guide
This guide explains how to verify content on different platforms using the Internet-ID verification system.
Supported Platforms
The Internet-ID system supports verification for the following platforms:
- YouTube - Video and channel verification
- TikTok - Video and user profile verification
- Instagram - Posts, reels, and profile verification
- GitHub - Repository, file, and gist verification
- Discord - Server invite and channel verification
- LinkedIn - Profile and post verification
Platform Verification Mechanisms
YouTube
Verification Approach: Video ID or channel verification via URL parsing
URL Formats:
- Standard watch URL:
https://www.youtube.com/watch?v=VIDEO_ID - Short URL:
https://youtu.be/VIDEO_ID - Shorts URL:
https://www.youtube.com/shorts/VIDEO_ID
Usage:
# Bind YouTube video to content
npm run bind:youtube -- <masterFilePath> <youtubeVideoId> <registryAddress>
# Verify YouTube video binding
npm run verify:youtube -- <youtubeUrlOrId> <registryAddress>
Limitations:
- Requires valid YouTube video ID
- Video must be publicly accessible for verification
- Re-encoded versions on YouTube can be bound to original content
TikTok
Verification Approach: Video ID or user profile verification via URL parsing
URL Formats:
- Video with username:
https://www.tiktok.com/@username/video/1234567890 - Video without username:
https://www.tiktok.com/video/1234567890 - Mobile URL:
https://m.tiktok.com/@user/video/9876543210
Extracted ID Format:
@username/video/1234567890orvideo/1234567890
Usage:
# Bind TikTok video to content
npm run bind:tiktok -- <masterFilePath> <tiktokId> <registryAddress>
# Verify TikTok video binding
npm run verify:tiktok -- <tiktokUrlOrId> <registryAddress>
Limitations:
- Requires publicly accessible TikTok content
- Platform ID should include username path when available
- TikTok's content algorithm may show re-encoded versions
Verification Approach: Post shortcode or profile bio verification via URL parsing
URL Formats:
- Post URL:
https://www.instagram.com/p/SHORTCODE/ - Reel URL:
https://www.instagram.com/reel/SHORTCODE/ - Profile URL:
https://www.instagram.com/username/
Extracted ID Format:
p/SHORTCODEfor postsreel/SHORTCODEfor reelsusernamefor profiles
Usage:
# Bind Instagram post to content
npm run bind:instagram -- <masterFilePath> <instagramId> <registryAddress>
# Verify Instagram post binding
npm run verify:instagram -- <instagramUrlOrId> <registryAddress>
Limitations:
- Requires publicly accessible Instagram content
- Private profiles cannot be verified by third parties
- Instagram may compress or modify uploaded content
GitHub
Verification Approach: Repository file or gist verification
URL Formats:
- Repository:
https://github.com/user/repo - File in repo:
https://github.com/user/repo/blob/main/file.txt - Gist:
https://gist.github.com/user/gistid
Extracted ID Format:
user/repofor repositoriesuser/repo/blob/main/file.txtfor filesgist/user/gistidfor gists
Usage:
# Bind GitHub repository to content
npm run bind:github -- <masterFilePath> <githubId> <registryAddress>
# Verify GitHub repository binding
npm run verify:github -- <githubUrlOrId> <registryAddress>
Verification Methods:
- Repository README: Add content hash to README.md
- Gist: Create a gist containing the content hash
- File in repo: Add verification file with content hash
Limitations:
- Repository/gist must be publicly accessible
- Verification requires on-chain binding before creating verification proof
- Private repositories cannot be verified by third parties
Discord
Verification Approach: Server invite or custom status verification
URL Formats:
- Invite URL (discord.gg):
https://discord.gg/INVITE_CODE - Invite URL (discord.com):
https://discord.com/invite/INVITE_CODE - Channel URL:
https://discord.com/channels/SERVER_ID/CHANNEL_ID
Extracted ID Format:
INVITE_CODEfor discord.gg invitesinvite/INVITE_CODEfor discord.com inviteschannels/SERVER_ID/CHANNEL_IDfor channel links
Usage:
# Bind Discord server to content
npm run bind:discord -- <masterFilePath> <discordId> <registryAddress>
# Verify Discord server binding
npm run verify:discord -- <discordUrlOrId> <registryAddress>
Verification Methods:
- Server Description: Add content hash to server description
- Custom Status: Set custom status with content hash
- Channel Topic: Add verification hash to channel topic
Limitations:
- Server must be publicly accessible or user must be a member
- Invite codes may expire
- Verification requires appropriate server permissions
Verification Approach: Profile summary or post verification
URL Formats:
- Profile:
https://www.linkedin.com/in/username/ - Post:
https://www.linkedin.com/posts/activity-ID/ - Company:
https://www.linkedin.com/company/companyname/
Extracted ID Format:
in/usernamefor profilesposts/activity-IDfor postscompany/companynamefor companies
Usage:
# Bind LinkedIn profile to content
npm run bind:linkedin -- <masterFilePath> <linkedinId> <registryAddress>
# Verify LinkedIn profile binding
npm run verify:linkedin -- <linkedinUrlOrId> <registryAddress>
Verification Methods:
- Profile Summary: Add content hash to profile summary
- Post Content: Create a post with the content hash
- Company Description: Add verification to company page
Limitations:
- Profile must be publicly visible
- LinkedIn's privacy settings may restrict visibility
- Posts may have limited lifetime or visibility
General Verification Flow
For all platforms, the verification process follows these steps:
-
Register Content: Register your original content hash on-chain
npm run register -- <filePath> <manifestURI> <registryAddress> -
Bind Platform ID: Bind your platform-specific ID to the content hash
npm run bind:<platform> -- <masterFilePath> <platformId> <registryAddress> -
Verify Binding: Verify the platform binding is correct
npm run verify:<platform> -- <platformUrlOrId> <registryAddress> -
Share Proof: Generate and share the verification proof with others
Web UI Integration
All platforms are integrated into the web UI with:
- Platform selection dropdown in One-shot, Bind forms
- Automatic URL parsing for all supported platforms
- Platform-specific verification badges and links
- QR code generation for sharing verification links
API Integration
The API supports platform verification through:
/api/resolve?platform=<platform>&platformId=<id>- Resolve platform binding/api/public-verify?platform=<platform>&platformId=<id>- Public verification
Best Practices
- Use Descriptive Platform IDs: Include full paths (e.g.,
user/repofor GitHub) - Verify Before Sharing: Always run verification before sharing links
- Keep Records: Save transaction hashes for future reference
- Update Documentation: Document verification locations for your audience
- Test Links: Verify all generated URLs work correctly
Security Considerations
- On-chain Verification: All bindings are immutable once registered on-chain
- Signature Validation: Content hash signatures are cryptographically verified
- Creator Authority: Only content creators can bind platform IDs
- Manifest Integrity: Manifests are validated against on-chain data
Troubleshooting
Common Issues
- Invalid Platform ID: Ensure URL format matches platform requirements
- No Binding Found: Content must be registered before binding platforms
- Signature Mismatch: Manifest must be signed by content creator
- Network Errors: Check RPC URL and network connectivity
Support
For additional help:
- Check the GitHub Issues
- Review test files for examples:
test/verify-*.test.ts - See the main README.md for general setup
Future Enhancements
Planned features for platform verification:
- Automated verification proof generation
- Platform-specific metadata extraction
- Multi-chain support for bindings
- Extended platform support (more social networks, content platforms)