DNA Collection Kit URL Creation and Activation Process
Overview
This document describes the complete flow for DNA collection kit URL generation, user activation, and BioNFT™ creation in the GenoBank.io platform.
1. DNA Kit URL Creation Process
1.1 Laboratory Prerequisites
- Laboratory must be registered and authenticated with a Web3 wallet
- Laboratory wallet address must be validated in the GenoBank system
- Laboratory accesses the Lab Dashboard at:
https://genobank.io/consent/lab_biofile/
1.2 Biosample Consent Link Generator
Interface Location
- Tab: “Biosample Consent Link Generator” in Lab Dashboard
- URL:
https://genobank.io/consent/lab_biofile/
→ Navigate to “Biosample Consent Link Generator” tab
Required Fields
- Prefix (Dropdown)
- Range: 100-600
- Purpose: Identifies the biosample manufacturer
- Example: “100” for standard GenoBank kits
- Biosample ID (Number Input)
- Range: 0 to 281,474,976,710,655 (2^48-1)
- Purpose: Unique identifier for each DNA collection kit
- Example: “12345”
- Purchase Hash Code (Text Input)
- Purpose: Security code associated with the kit package
- Example: “abc123def456”
API Call for Link Creation
POST /create_magic_link
{
"prefix": "100",
"biosampleId": "12345",
"physicalId": "10012345", // Concatenation of prefix + biosampleId
"packageHashCode": "abc123def456",
"domain": "https://genobank.io"
}
Generated URL Structure
https://genobank.io/activate/?biosampleId=12345&laboratoryId=2&secret=67d6516e1229eee318e5032776377b639f1c2ee2fe93531164bf5706d56fdcf1#1940837240937409237
URL Components:
biosampleId
: The unique kit identifier
laboratoryId
: The permittee/laboratory ID (auto-populated from authenticated lab)
secret
: Backend-generated security hash
#biosampleSecret
: Hash fragment containing additional security data
1.3 QR Code Generation
- The generated URL is converted to a QR code
- QR codes are printed on DNA collection kit packaging
- Users scan the QR code to begin activation
2. DNA Kit Activation Flow
2.1 Initial Landing Page
URL: User scans QR code or visits the activation URL
First Screen: Welcome page with:
- GenoBank.io logo
- Video explainer (Vimeo)
- “Activate Biosample” button
- Laboratory name and logo (dynamically loaded based on
laboratoryId
)
2.2 Terms & Conditions Consent
Required User Information:
- Full Name
- Sex (Female/Male dropdown)
- Digital Signature (drawn on canvas)
- Date of Birth
- Sample Collection Date (auto-populated with current date)
- Consent Checkbox for GDPR compliance
Consent Text Includes:
- Explanation of DNA and genetic testing
- Biosample processing permissions
- Data storage until BioNFT™ revocation
- Potential risks acknowledgment
- GDPR compliance statement
2.3 Wallet Selection Options
Three Authentication Methods:
Option 1: Login with Existing Wallet
- MetaMask: Direct Web3 provider connection
- BioWallet: Custom GenoBank wallet (if detected)
- Google OAuth: Via Magic SDK for non-crypto users
Option 2: Create New Passphrase
- Preparation Screen: Warning to find ID card and not screenshot
- 12-Word Mnemonic Display:
- Random BIP39 mnemonic generation
- Strong warning against screenshots
- User must write down words
- Passphrase Verification:
- Words shown scrambled
- User must drag words to correct order
- Validates understanding and backup
Option 3: Import Existing Wallet
- 12 input fields for mnemonic phrase
- Validates BIP39 compliance
- Derives wallet from seed phrase
2.4 Blockchain Transaction
Token ID Construction:
const biosampleIdHex = ethers.utils.hexZeroPad(ethers.utils.hexlify(biosampleId), 4).substr(2);
const permitteeIdHex = ethers.utils.hexZeroPad(ethers.utils.hexlify(permiteeId), 4).substr(2);
const tokenID = `0x${biosampleIdHex}${permitteeIdHex}${account.substr(2)}`;
Claim API Call:
POST /claim/{tokenID}
{
"biosampleSecret": "1940837240937409237", // From URL hash
"signature": "0x...", // Wallet signature of "I want to proceed"
"seed": "0x...", // Wallet seed/address
"signatureKind": "metamask", // or "magic" for Google OAuth
"sex": "Female" // From consent form
}
2.5 Transaction Finalization
- Loading animation while blockchain transaction processes
- Success message with transaction details
- Redirect to user dashboard or close button
3. BioNFT™ Creation Process
3.1 BioNFT™ Structure
Token ID Components:
- Biosample ID (4 bytes): Unique kit identifier
- Permittee ID (4 bytes): Laboratory identifier
- User Address (20 bytes): Wallet address of kit activator
Example Token ID:
0x0000303900000002742d35cc6634c0532925a3b844bc9e7595f7f2e1
└─────┘└─────┘└──────────────────────────────────┘
| | |
Biosample Lab ID User Address
12345 2
3.2 Smart Contract Interaction
Networks Supported:
- Avalanche C-Chain (Primary)
- Story Protocol (Alternative)
- Ethereum (Legacy support)
BioNFT™ Properties:
- Ownership: User’s wallet address
- Permittee: Laboratory with access rights
- Metadata:
- Biosample physical ID
- Activation timestamp
- Consent hash
- Gender/sex information
- Revocability: User can revoke via BioWallet
3.3 Post-Activation State
For Users:
- BioNFT™ appears in wallet
- Access to biosample dashboard at
https://genobank.io/consent/biofile/
- Can manage permissions and view lab results
- Can share data with additional laboratories
For Laboratories:
- Biosample appears in “My Active Kits” tab
- Can upload analysis results
- Can request additional permissions
- Tracked in laboratory dashboard
3.4 Data Flow After Activation
User Activates Kit → BioNFT™ Minted → User Dashboard Access
↓
Laboratory Dashboard
↓
Sample Processing
↓
Results Upload
↓
User Notification
4. Security Considerations
4.1 URL Security
- One-time activation (prevents reuse)
- Secret hash validation
- Laboratory authentication required for creation
- Time-limited validity (optional)
4.2 Wallet Security
- BIP39 standard for mnemonic phrases
- No plaintext storage of private keys
- Signature verification for all actions
- Support for hardware wallets via MetaMask
4.3 Consent Management
- Immutable blockchain record
- GDPR-compliant data handling
- User-controlled revocation
- Audit trail for all actions
5. Error Handling
5.1 Common Errors
- Already Activated: Kit has been previously claimed
- Invalid Secret: URL tampering or expired link
- Laboratory Not Found: Invalid laboratory ID
- Network Issues: Blockchain connectivity problems
5.2 User Support
- Email: [email protected]
- In-app error messages with clear actions
- QR code re-scan capability
- Manual activation option for support team
6. Technical Implementation Details
6.1 Frontend Technologies
- HTML5/CSS3/JavaScript
- jQuery for DOM manipulation
- Web3.js and Ethers.js for blockchain
- Bootstrap 4 for UI
- Magic SDK for OAuth integration
6.2 Backend Endpoints
/create_magic_link
: Generate activation URLs
/claim/{tokenID}
: Process kit activation
/magic_links
: List generated links
/delete_magic_link
: Remove unused links
/get_laboratory
: Fetch lab details
6.3 Blockchain Contracts
- BioNFT™ smart contract on Avalanche
- ERC-721 compatible token standard
- Custom extensions for biosample metadata
- Permittee management functions
Conclusion
The DNA kit activation process seamlessly bridges physical sample collection with blockchain-based consent management, ensuring user sovereignty over genomic data while enabling laboratories to process samples with verified, GDPR-compliant consent. The resulting BioNFT™ serves as an immutable record of consent and ownership, facilitating secure data sharing in the genomic ecosystem.