MultiBit Bitcoin blockchain file
application/octet-stream
Magic Bytes
Offset: 0
53 51 4C 4F 43 4F 4E 56 48 44 00 00 31 2E 30 00
The MultiBit Bitcoin blockchain file is a proprietary data format developed by the MultiBit project for its lightweight cryptocurrency wallet applications. It stores a local copy of the blockchain header chain, enabling the software to perform Simplified Payment Verification and verify transactions without requiring a full network node. Now considered a legacy format following the discontinuation of the MultiBit software, these files contain non-executable data and pose a low security risk to users.
Validation Code
How to validate .spvchain files in Python
Python
def is_spvchain(file_path: str) -> bool:
"""Check if file is a valid SPVCHAIN by magic bytes."""
signature = bytes([0x53, 0x51, 0x4C, 0x4F, 0x43, 0x4F, 0x4E, 0x56, 0x48, 0x44, 0x00, 0x00, 0x31, 0x2E, 0x30, 0x00])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .spvchain files in Node.js
Node.js
function isSPVCHAIN(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x51, 0x4C, 0x4F, 0x43, 0x4F, 0x4E, 0x56, 0x48, 0x44, 0x00, 0x00, 0x31, 0x2E, 0x30, 0x00]);
return buffer.subarray(0, 16).equals(signature);
}
Go
func IsSPVCHAIN(data []byte) bool {
signature := []byte{0x53, 0x51, 0x4C, 0x4F, 0x43, 0x4F, 0x4E, 0x56, 0x48, 0x44, 0x00, 0x00, 0x31, 0x2E, 0x30, 0x00}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
GET
/api/v1/spvchain
curl https://filesignature.org/api/v1/spvchain