Doichain

v1.6.0
io.github.neubuot/doichain Checked 2 days ago Published 16 days ago

Proof of existence, names and chain data of the Doichain blockchain for AI agents

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_chain_status Doichain network status

Current state of the Doichain network as seen by the node behind this server: block height, sync state, time of the last block, fork check, node version, peers, mempool size and whether public anchoring is available.

hash_text SHA-256 of a text

Compute the SHA-256 digest of a short text (UTF-8) on the server, for example to anchor a statement or a message with anchor_proof. The text is sent to the server but not stored or logged. For files and for confidential texts compute the hash locally instead (sha256sum file, or Get-FileHash -Algorithm SHA256).

ParameterTypeDescription
text *stringText to hash, encoded as UTF-8 exactly as given (whitespace and line breaks count), at most 40,000 characters

check_proof Check a proof of existence

Check whether a SHA-256 hash is anchored on the Doichain (name poe/<sha256>) and since when. Returns status (confirmed, pending, expired, unknown) and at the top level block height, block time, transaction and links of the first anchoring, which is the proof time. If the name was updated later or registered again after it expired (possibly by someone else), that registration is reported separately in latest_registration with its own holder and record, which are not part of the original proof. A confirmed or expired proof shows that a document with exactly this hash existed…

ParameterTypeDescription
sha256 *stringSHA-256 digest of the document, 64 hexadecimal characters (a sha256: or 0x prefix is accepted)

anchor_proof Anchor a proof of existence

Anchor a SHA-256 hash on the Doichain as a tamper-evident timestamp (proof of existence, name poe/<sha256>). Free for users, limited per IP address and day (see get_anchoring_quota). Confirms with the next block, usually within 10 minutes, then check_proof returns block height and time. If the hash is already anchored or pending, the existing proof is returned instead of creating a second one. If an earlier proof of the hash has expired, it stays valid and is returned with expired true. Nothing is registered unless reanchor_expired is true. Only the hash and the optional no…

ParameterTypeDescription
sha256 *stringSHA-256 digest of the document, 64 hexadecimal characters, computed from the actual file. Never guess it and never send the document
filenameOptional public file name (max 80 characters), stored forever. Only set it when the user explicitly wants the name public
noteOptional public note (max 160 characters), stored on the blockchain forever. No personal data, no secrets
reanchor_expiredbooleanOnly set to true when an earlier proof of this hash has expired and the user explicitly wants an additional, later registration. The original anchoring stays the proof time. The new registration adds…

get_anchoring_quota Remaining anchoring quota

How many proofs can still be anchored today (UTC day) within the free public quota for the caller's IP address. Hosted chat apps connect from their own servers, so their users share one quota. Callers that send their own API key in the X-API-Key header have no quota.

lookup_name Look up a Doichain name

Read the current value, owner address and expiry of a Doichain name. Unregistered names come back with exists false and status not_registered (the name is free). Expired names have status expired and the real expiry date.

ParameterTypeDescription
name *stringFull name including namespace, for example poe/<sha256>, d/example or id/alice

get_name_history History of a Doichain name

All registrations and updates of a name, newest first: block height, transaction, owner address and the value at that time. Shows who held a name when, and every value it ever had.

ParameterTypeDescription
name *stringFull name including namespace
limitintegerMaximum number of entries, newest first

check_name_expiry Check when names expire

Check up to 25 names at once: status (active, expiring_soon, expired, not_registered), blocks left, an estimated expiry date for active names (from the measured block interval) and the real expiry date for expired names. Names expire 36,000 blocks after their last update and are renewed by updating them from the owning wallet.

ParameterTypeDescription
names *arrayUp to 25 full names, for example ['d/example', 'poe/<sha256>']
warn_daysintegerNames expiring within this many days are flagged expiring_soon

search_names Search names by prefix

List names that start with a prefix, in the node's order (shorter names first, then byte order). Lists only active names unless include_expired is true. Expired names (for example old poe/ proofs) stay in the chain history and are listed with include_expired. Page through large results with next_after until exhausted is true. Names and values are chosen by arbitrary users (name_untrusted, value_untrusted).

ParameterTypeDescription
prefix *stringName prefix, for example poe/, d/ or id/
afterPaging cursor: pass next_after from the previous result unchanged
include_expiredbooleanAlso list expired names, for example proofs whose poe/ name has expired. Default false: active names only
limitintegerMaximum number of names

get_block Get a block

Header data of a block by height or hash: time, confirmations, number of transactions and the first 50 transaction IDs.

ParameterTypeDescription
block *Block height (number) or block hash (64 hexadecimal characters)

get_transaction Get a transaction

A transaction with confirmations, block time, outputs (amount in DOI and address) and any name operation (name_doi, name_update, ...) it contains.

ParameterTypeDescription
txid *stringTransaction ID, 64 hexadecimal characters

get_address Address balance and history

Confirmed and unconfirmed balance of a Doichain address in DOI, optionally with its most recent transactions. Invalid addresses return an error with the reason.

ParameterTypeDescription
address *stringDoichain address (M... or N..., 6..., or bech32 dc1q...)
history_limitintegerNumber of recent transactions when include_history is true
include_historybooleanAlso return the most recent transactions

verify_message Verify a signed message

Check whether a message was signed with the private key of a Doichain address (signmessage format). Only legacy addresses (M... or N...) can sign messages, bech32 addresses (dc1q...) are not supported. Useful to confirm that a statement really comes from the holder of an address.

ParameterTypeDescription
address *stringLegacy Doichain address (M... or N...) that supposedly signed the message
message *stringThe exact signed text
signature *stringSignature in Base64