IAttestationRegistry
Interface for the AttestationRegistry diamond contract
Functions
registerSchema
function registerSchema(
string calldata name,
bytes32 easUID,
bool revocable,
uint64 expirationPeriod,
bool isTimeSeries,
string[] calldata fieldNames,
string[] calldata fieldTypes
) external;
deregisterSchema
function deregisterSchema(bytes32 easUID) external;
reactivateSchema
function reactivateSchema(bytes32 easUID) external;
setAttestationPaymentAmount
function setAttestationPaymentAmount(bytes32 easUID, uint256 amount) external;
requestAttestation
function requestAttestation(bytes32 easUID) external payable returns (bool);
attestationPaymentAmounts
function attestationPaymentAmounts(bytes32 easUID) external view returns (uint256);
createAttestation
function createAttestation(
bytes32 easUID,
address subject,
bytes calldata data,
uint64 expirationOverride,
address attestor,
uint64 deadline,
bytes calldata signature
) external payable returns (bytes32);
updateAttestation
function updateAttestation(
bytes32 easUID,
address subject,
bytes calldata data,
uint64 expirationOverride,
address attestor,
uint64 deadline,
bytes calldata signature
) external payable returns (bytes32);
revokeAttestation
function revokeAttestation(bytes32 easUID, address subject, address attestor, uint64 deadline, bytes calldata signature)
external;
attestByDelegation
function attestByDelegation(DelegatedProxyAttestationRequest calldata delegatedRequest)
external
payable
returns (bytes32);
revokeByDelegation
function revokeByDelegation(DelegatedProxyRevocationRequest calldata delegatedRequest) external payable;
setProxyMode
function setProxyMode(bool enabled) external;
isProxyModeEnabled
function isProxyModeEnabled() external view returns (bool);
getWebAuthnProxy
function getWebAuthnProxy() external view returns (address);
verifySignature
function verifySignature(bytes32 hash, bytes memory signature, address expectedSigner) external view returns (bool);
verifyWebAuthnSignature
function verifyWebAuthnSignature(bytes32 hash, bytes memory signature, address expectedSigner)
external
view
returns (bool);
getAttestation
function getAttestation(bytes32 easUID, address subject) external view returns (Attestation memory);
getAttestationAtIndex
function getAttestationAtIndex(bytes32 easUID, address subject, uint256 index)
external
view
returns (Attestation memory);
getAttestationHistory
function getAttestationHistory(bytes32 easUID, address subject)
external
view
returns (bytes32[] memory uids, uint256[] memory timestamps, bool[] memory activeFlags);
getAttestationByName
function getAttestationByName(string calldata schemaName, address subject) external view returns (Attestation memory);
getDecodedAttestation
function getDecodedAttestation(bytes32 easUID, address subject) external view returns (bytes[] memory values);
getDecodedAttestationAtIndex
function getDecodedAttestationAtIndex(bytes32 easUID, address subject, uint256 index)
external
view
returns (bytes[] memory values);
getAttestationHistoryCount
function getAttestationHistoryCount(bytes32 easUID, address subject) external view returns (uint256);
getLatestAttestationIndex
function getLatestAttestationIndex(bytes32 easUID, address subject) external view returns (uint256);
attestationRecords
function attestationRecords(address subject, bytes32 easUID) external view returns (bytes32);
attestationAttester
function attestationAttester(bytes32 attestationUID) external view returns (address);
validAttestors
function validAttestors(address entity, address attestor) external view returns (bool);
escrowPayments
function escrowPayments(address subject, bytes32 easUID) external view returns (uint256);
nonces
function nonces(address addr) external view returns (uint256);
authorizedDelegators
function authorizedDelegators(address delegator) external view returns (bool);
eas
function eas() external view returns (IEAS);
setValidAttestor
function setValidAttestor(address attestor, bool isValid) external;
isAttestationValid
function isAttestationValid(address subject, bytes32 easUID, address entity) external view returns (bool);
isAttestationValidByName
function isAttestationValidByName(address subject, string calldata schemaName, address entity)
external
view
returns (bool);
initialize
function initialize(address easAddress, address schemaRegistryAddress) external;
setEAS
function setEAS(address easAddress) external;
setSchemaRegistry
function setSchemaRegistry(address schemaRegistryAddress) external;
withdrawAttestationPayment
function withdrawAttestationPayment(address subject, bytes32 easUID) external;
emergencyWithdraw
function emergencyWithdraw(address payable recipient) external;
schemaRegistry
function schemaRegistry() external view returns (ISchemaRegistry);
getBalance
function getBalance() external view returns (uint256);
batchAuthorizeDelegators
function batchAuthorizeDelegators(address[] calldata delegators, bool[] calldata authorized) external;
batchSetValidAttestors
function batchSetValidAttestors(address[] calldata attestors, bool[] calldata validStatus) external;
updateWebAuthnProxy
function updateWebAuthnProxy(address newProxyAddress) external;
pauseSchema
function pauseSchema(bytes32 easUID, bool paused) external;
authorizeDelegator
function authorizeDelegator(address delegator) external;
deauthorizeDelegator
function deauthorizeDelegator(address delegator) external;
isAuthorizedDelegator
function isAuthorizedDelegator(address delegator) external view returns (bool);
isAttestorTrustedByEntity
function isAttestorTrustedByEntity(address entity, address attestor) external view returns (bool);
isGloballyAuthorizedAttestor
function isGloballyAuthorizedAttestor(address attestor) external view returns (bool);
schemaNameToUID
function schemaNameToUID(string calldata name) external view returns (bytes32);
schemas
function schemas(bytes32 easUID) external view returns (Schema memory);
decodeSignatureWrapper
function decodeSignatureWrapper(bytes calldata signature)
external
pure
returns (uint8 sigType, bytes memory signatureData, bytes memory ownerData);
decodeWebAuthnAuth
function decodeWebAuthnAuth(bytes memory data) external pure returns (bytes memory);
Events
SchemaRegistered
event SchemaRegistered(bytes32 indexed easUID, string name, bool isTimeSeries);
SchemaUpdated
event SchemaUpdated(bytes32 indexed easUID, string name, bool active);
AttestationCreated
event AttestationCreated(
address indexed subject, bytes32 indexed easUID, bytes32 indexed attestationUID, uint256 timestamp
);
AttestationRevoked
event AttestationRevoked(address indexed subject, bytes32 indexed easUID, bytes32 indexed attestationUID);
AttestationUpdated
event AttestationUpdated(address indexed subject, bytes32 indexed easUID, bytes32 oldUID, bytes32 newUID);
ValidAttestorSet
event ValidAttestorSet(address indexed entity, address indexed attestor, bool isValid);
EASUpdated
event EASUpdated(address indexed oldEAS, address indexed newEAS);
AttestationPaymentReceived
event AttestationPaymentReceived(address indexed subject, bytes32 indexed easUID, uint256 amount);
AttestationPaymentAmountSet
event AttestationPaymentAmountSet(bytes32 indexed easUID, uint256 amount);
AttestationRegistryDeployed
event AttestationRegistryDeployed(
address indexed registryAddress, address admin, address easAddress, address schemaRegistryAddress
);
DelegatedAttestationCreated
event DelegatedAttestationCreated(
address indexed subject, bytes32 indexed easUID, bytes32 indexed attestationUID, address attestor, uint256 timestamp
);
DelegatorAuthorized
event DelegatorAuthorized(address indexed delegator);
DelegatorDeauthorized
event DelegatorDeauthorized(address indexed delegator);
ProxyModeToggled
event ProxyModeToggled(bool enabled);
Structs
Schema
struct Schema {
string name;
bool revocable;
uint64 expirationPeriod;
bool active;
bool isTimeSeries;
string[] fieldNames;
string[] fieldTypes;
}
AttestationRecord
struct AttestationRecord {
bytes32 uid;
uint256 timestamp;
bool active;
}
Last updated
Was this helpful?