Century Metadata is a project to provide storage for small amounts of auxiliary data. As an example, this is useful for Bitcoin wallets, which can be restored from 12 seed words, but cannot know about more complex funds without additional data. On restore, your wallet would attempt to fetch this data from centurymetadata.org or a mirror.
We are currently in alpha, seeking feedback.
The file format is designed to be self-explanatory and use standard, long-lived primitives as much as possible. Every file contains a preamble, followed by 8192 bytes. The preamble describes the data format which follows:
centurymetadata v0\0SIG|WRITER|READER|GEN|AES SIG: BIP-340 SHA256(TAG|TAG|WRITER|READER|GEN|AES) WRITER, READER: secp256k1 x-only keys TAG: SHA256("centurymetadata") AESKEY: SHA256(0x02 | Diffie-Hellman of WRITER,READER) AES: CTR mode (starting 0, nonce 0) using AESKEY of DATA DATA: gzip([TITLE\0CONTENTS\0]+), padded with 0 bytes to 8056\0
The data itself is a series of NUL-separated title, contents pairs. Obviously this cannot be validated on the production server, but the test server (which only allows known keys) will check the file is compliant.
The BIP 32 path recommended for centurymetadata is
/0' as the writer key,
/1' as the reader key. Of course, others can also send data
to your reader key, but you know that the record from your own writer
key can be trusted.
The types of records accepted are as follows:
bitcoin psbt, Body: base64-encoded PSBT
bitcoin transactionBody: hex-encoded transaction
bitcoin miniscriptBody: miniscript string
The test API endpoint can be found at testapi.centurymetadata.org.
Content-Type: application/x-centurymetadatashould contain a valid centurymetadata file.
This queries the bundles of entries which can be retrieved: we only allow retreival of entire bundles. Bundles are ordered by increasing READER, then WRITER values.
Returns a JSON object with member
bundles containing an
array of objects. Each object contains
Content-Type: application/x-centurymetadata, consisting of multiple back-to-back century metadata files.
There is an experimental Python package to encode and decode centurymetadata files in the GitHub repository