Packages
TypeScript: @libid/contracts
Section titled “TypeScript: @libid/contracts”npm install @libid/contracts viemUse 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.
Rust: libid-contracts
Section titled “Rust: libid-contracts”cargo add libid-contractsBindings for the contracts, built on alloy. See docs.rs/libid-contracts.