libid_contracts/bindings/
identity.rs1#[allow(clippy::too_many_arguments, unused_attributes)]
10mod names_inner {
11 use alloy::sol;
12
13 sol! {
14 #[sol(rpc)]
15 interface IdentityNames {
16 #[derive(Debug, serde::Serialize, serde::Deserialize)]
17 struct Rules {
18 uint16 maxLength;
19 bool stripLeadingAt;
20 bool isEmail;
21 bool allowUnderscore;
22 bool allowHyphen;
23 }
24
25 function initialize(address owner_) external;
26
27 function setPlatform(bytes32 platformId, Rules calldata rules) external;
31
32 function setProofVerifier(address verifier) external;
35 function proofVerifier() external view returns (address);
36
37 function claim(bytes32 platformId, uint16 verifierVersion, bytes calldata payload, bool publishName) external payable;
43 function quoteClaim(bytes32 platformId, uint16 verifierVersion) external view returns (uint256);
44 function digestSpent(bytes32 digest) external view returns (bool);
45 function unpublish(bytes32 platformId) external;
46 function resolveId(bytes32 platformId, string calldata userId) external view returns (address);
47 function resolveHandle(bytes32 platformId, string calldata handle) external view returns (address);
48 function resolvePair(bytes32 platformId, string calldata handle, string calldata userId) external view returns (address);
49 function reverseOf(address wallet, bytes32 platformId) external view returns (string memory);
50 function primaryOf(address wallet, bytes32 platformId) external view returns (string memory);
51
52 event IdentityBound(
58 address indexed owner,
59 bytes32 indexed idNode,
60 bytes32 indexed handleNode,
61 bytes32 platformId,
62 string userId,
63 string handle,
64 uint64 observedAt,
65 bool published,
66 uint16 ceremonyVersion
67 );
68 event HandleRetired(bytes32 indexed platformId, bytes32 indexed handleNode, address indexed owner);
69 event PlatformConfigured(bytes32 indexed platformId);
70 event ProofVerifierConfigured(address verifier);
71 event NameUnpublished(address indexed owner, bytes32 indexed platformId);
72 event CeremonyBound(
76 bytes32 indexed authorizationDigest,
77 address indexed owner,
78 bytes32 indexed platformId,
79 bytes clientIdentifier
80 );
81 }
82 }
83}
84
85pub use names_inner::IdentityNames;