Module kimap

Source
Expand description

Interact with kimap, the onchain namespace

Modules§

contract
Sol structures for Kimap requests

Structs§

Fact
A fact log from the kimap, converted to a ‘resolved’ format using namespace data saved in the kns-indexer
Kimap
Helper struct for reading from the kimap.
Mint
A mint log from the kimap, converted to a ‘resolved’ format using namespace data saved in the kns-indexer.
Note
A note log from the kimap, converted to a ‘resolved’ format using namespace data saved in the kns-indexer

Enums§

DecodeLogError
Errors that can occur when decoding a log from the kimap using decode_mint_log() or decode_note_log().

Constants§

KIMAP_ADDRESS
kimap deployment address on base
KIMAP_CHAIN_ID
base chain id
KIMAP_FIRST_BLOCK
first block (minus one) of kimap deployment on base
KIMAP_ROOT_HASH
the root hash of kimap, empty bytes32

Functions§

decode_fact_log
decode_mint_log
Decode a mint log from the kimap into a ‘resolved’ format.
decode_note_log
Decode a note log from the kimap into a ‘resolved’ format.
namehash
Produce a namehash from a kimap name.
resolve_full_name
Given a crate::eth::Log (which must be a log from kimap), resolve the full name of the new entry or note.
resolve_parent
Given a crate::eth::Log (which must be a log from kimap), resolve the parent name of the new entry or note.
valid_entry
Canonical function to determine if a kimap entry is valid. This should be used whenever reading a new kimap entry from a mints query, because while most frontends will enforce these rules, it is possible to post invalid names to the kimap contract.
valid_fact
valid_name
valid_note