Skip to content

Packages

Terminal window
npm install @libid/contracts viem

Use version 0.14.0 or later. The package works with viem. It has:

  • ABIs: identityNamesAbi, handleEscrowAbi, and the other contracts.
  • Reading helpers: resolveHandle, resolveId, resolvePair, primaryName, reverseOf, accountCount, accountsOf, rulesOnChain.
  • 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 IdentityNames. 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.