Skip to content

Packages

Terminal window
npm install @libid/contracts viem

These docs describe version 0.17.0, which matches libID-contracts v0.17.0. The package works with viem. It has:

  • ABIs: identityRegistryAbi, handleEscrowAbi, and the other contracts.
  • Reading helpers: resolveHandle, resolveId, resolveHandleAndId, publishedHandleOf, identityCount, identitiesOf, rulesOf.
  • Keys: platformId, handleHash, handleNode.
  • Handle rules: normalize, RULES_GITHUB, RULES_X, RULES_GOOGLE.

The reading helpers take a reader, { client, address }, where client is a viem public client and address is IdentityRegistry. They return null where the contract returns a zero address or an empty string.

Source and README: ts/packages/contracts.

Terminal window
cargo add libid-contracts

Bindings for the contracts, built on alloy. See docs.rs/libid-contracts.