/** * Newton Identity Module * * - `registerIdentityData` — store identity data reference on-chain with gateway co-signature * - `identityDomainHash` — compute keccak256 domain identifier * - `linkIdentity*` / `unlinkIdentity*` — direct contract calls to IdentityRegistry */ import type { LinkIdentityAsSignerAndUserParams, LinkIdentityAsSignerParams, LinkIdentityAsUserParams, LinkIdentityParams, RegisterIdentityDataParams, UnlinkIdentityAsSignerParams, UnlinkIdentityAsUserParams } from '../../types/identity'; import { type Hex, type WalletClient } from 'viem'; /** * Compute the bytes32 identity domain hash from a human-readable domain name. * * Matches the Rust convention: `keccak256(toBytes("kyc"))` producing a bytes32 hash. */ export declare function identityDomainHash(domainName: string): Hex; /** * Register an identity data reference on-chain. * * The identity owner (msg.sender) calls this after uploading encrypted data * to the gateway via `newt_uploadIdentityEncrypted`. The gateway returns a * `data_ref_id`, `gateway_signature`, and `deadline` which are passed here. * * The contract verifies the gateway signature against `REGISTER_IDENTITY_TYPEHASH` * and checks that the signer is a registered task generator. */ export declare function registerIdentityData(walletClient: WalletClient, params: RegisterIdentityDataParams): Promise; /** * Link identity data when the caller is both identity owner and client user. * msg.sender must have submitted identity data for the given domains. */ export declare function linkIdentityAsSignerAndUser(walletClient: WalletClient, params: LinkIdentityAsSignerAndUserParams): Promise; /** * Link identity data as the identity owner (signer). * Requires a counterparty signature from the client user. */ export declare function linkIdentityAsSigner(walletClient: WalletClient, params: LinkIdentityAsSignerParams): Promise; /** * Link identity data as the client user. * Requires a counterparty signature from the identity owner. */ export declare function linkIdentityAsUser(walletClient: WalletClient, params: LinkIdentityAsUserParams): Promise; /** * Link identity data as a 3rd party with signatures from both identity owner and client user. */ export declare function linkIdentity(walletClient: WalletClient, params: LinkIdentityParams): Promise; /** * Unlink identity data as the identity owner (signer). * Only the identity owner who created the link can call this. */ export declare function unlinkIdentityAsSigner(walletClient: WalletClient, params: UnlinkIdentityAsSignerParams): Promise; /** * Unlink identity data as the client user. * Allows users to revoke links to their own account. */ export declare function unlinkIdentityAsUser(walletClient: WalletClient, params: UnlinkIdentityAsUserParams): Promise;