@certnode/verify
v1.0.4
Published
Command-line tool to verify CertNode receipts with 3-layer timestamp verification (CertNode, RFC 3161, Bitcoin)
Maintainers
Readme
@certnode/verify
Command-line tool to verify CertNode receipts with 3-layer cryptographic timestamp verification.
Features
- ✅ CertNode Timestamp - HMAC-SHA256, instant verification (<100ms)
- ✅ RFC 3161 Timestamp - Court-admissible Time Stamp Authority proof
- ✅ Bitcoin Anchor - Immutable blockchain proof via OpenTimestamps
- 🎨 Color-coded output - Easy-to-read verification results
- 📊 Multiple output formats - Human-readable or JSON
- ⚡ Fast - Typically completes in <2 seconds
Installation
# Run directly with npx (no installation needed)
npx @certnode/verify receipt_abc123
# Or install globally
npm install -g @certnode/verify
certnode-verify receipt_abc123Usage
Basic Verification
npx @certnode/verify receipt_abc123Output:
✓ Receipt Verification Complete
📄 Receipt Information
ID: receipt_abc123
Type: transaction
Created: 11/10/2025, 12:34:56 PM
🔐 Cryptographic Timestamps
✓ CertNode Timestamp
11/10/2025, 12:34:56 PM
Verified
✓ RFC 3161 Timestamp
11/10/2025, 12:34:58 PM
Verified
✓ Bitcoin Blockchain Anchor
Block 870234 (6 confirmations)
📊 Overall Status
✓ Fully VerifiedJSON Output
npx @certnode/verify receipt_abc123 --jsonOutput:
{
"receipt_id": "receipt_abc123",
"valid": true,
"layers": {
"certnode": {
"present": true,
"valid": true,
"timestamp": "2025-11-10T12:34:56.789Z"
},
"rfc3161": {
"present": true,
"valid": true,
"timestamp": "2025-11-10T12:34:58.123Z"
},
"bitcoin": {
"present": true,
"valid": true,
"status": "confirmed",
"block_height": 870234,
"confirmations": 6
}
},
"summary": {
"total_layers": 3,
"verified_layers": 3,
"status": "fully_verified"
}
}Custom API Endpoint
npx @certnode/verify receipt_abc123 --api-url https://api.certnode.comOptions
| Option | Description | Default |
|--------|-------------|---------|
| --json | Output results as JSON | false |
| --api-url <url> | Custom API endpoint | https://certnode.com |
| --help | Show help message | |
| --version | Show version number | |
Verification Levels
Fully Verified ✅
All three timestamp layers verified successfully:
- CertNode timestamp valid
- RFC 3161 timestamp valid
- Bitcoin anchor confirmed
Partially Verified ⚠️
Core timestamps verified, Bitcoin pending:
- CertNode timestamp valid
- RFC 3161 timestamp valid
- Bitcoin anchor pending confirmation
Basic Verified ℹ️
Only CertNode timestamp verified:
- CertNode timestamp valid
- Other layers pending or not present
Failed ❌
Verification failed:
- Timestamp signatures invalid
- Receipt not found
- Network errors
Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Verification successful |
| 1 | Verification failed |
| 2 | Receipt not found |
| 3 | Network error |
| 4 | Invalid arguments |
Examples
Verify a Receipt
# Basic verification
npx @certnode/verify receipt_abc123
# Get JSON output for scripting
npx @certnode/verify receipt_abc123 --json
# Use in CI/CD pipeline
npx @certnode/verify $RECEIPT_ID --json > verification.jsonBatch Verification
# Verify multiple receipts
for receipt_id in receipt_1 receipt_2 receipt_3; do
npx @certnode/verify $receipt_id --json >> verifications.json
doneIntegration with jq
# Extract only the verification status
npx @certnode/verify receipt_abc123 --json | jq '.summary.status'
# Check if Bitcoin anchor is confirmed
npx @certnode/verify receipt_abc123 --json | jq '.layers.bitcoin.status'
# Get block height
npx @certnode/verify receipt_abc123 --json | jq '.layers.bitcoin.block_height'Programmatic Usage
You can also use the verification library in your Node.js code:
import { verifyReceipt } from '@certnode/verify'
const result = await verifyReceipt('receipt_abc123', {
apiUrl: 'https://certnode.com'
})
console.log(result.valid) // true
console.log(result.summary.status) // 'fully_verified'
console.log(result.layers.bitcoin.block_height) // 870234How It Works
CertNode uses a 3-layer timestamp system for maximum proof strength:
Layer 1: CertNode Timestamp (Instant)
- HMAC-SHA256 signature
- Server signs receipt with secret key
- Verified in <100ms
- Proves receipt existed at specific time
Layer 2: RFC 3161 Timestamp (2-5 seconds)
- Time Stamp Authority (TSA) signature
- Court-admissible legal proof
- Third-party verification
- TSA: freetsa.org
Layer 3: Bitcoin Blockchain (1-2 hours)
- OpenTimestamps proof
- Anchored to Bitcoin block
- Immutable and permanent
- Independently verifiable
Troubleshooting
Receipt Not Found
Error: Receipt not found: receipt_abc123Solution: Verify the receipt ID is correct
Network Error
Error: Network error: ECONNREFUSEDSolution: Check your internet connection or API endpoint
Bitcoin Anchor Pending
⏳ Bitcoin Blockchain Anchor
Pending confirmation...Solution: Bitcoin anchoring takes 1-2 hours. Check back later.
API
The CLI uses the CertNode verification API:
GET https://certnode.com/api/timestamps/verify?receipt_id={id}See full API documentation at: https://docs.certnode.com/api/timestamps
Support
- Documentation: https://docs.certnode.com
- API Reference: https://docs.certnode.com/api
- Issues: https://github.com/srbryant86/certnode/issues
- Email: [email protected]
License
MIT © CertNode
Related
- CertNode Core - Receipt verification platform
- OpenTimestamps - Bitcoin timestamp proof
- RFC 3161 - Time-Stamp Protocol
