On-Chain Primitives
IntegraExistence, IntegraRecord, and the six resolver interfaces that compose the on-chain legal layer.
The on-chain layer provides tamper-evident agreement records and composable resolver services. These primitives are deployed on EVM-compatible chains and fronted by the ALC API for agent access. The names IntegraExistence, IntegraRecord, and IntegraLens are the Integra reference implementation names for these on-chain primitives; the spec defines their interfaces generically.
IntegraExistence
An on-chain proof that a document with a specific content hash existed at or before a specific block timestamp.
| Property | Type | Description |
|---|---|---|
contentHash | bytes32 | SHA-256 hash of the document |
timestamp | uint256 | Block timestamp when the existence was recorded |
creator | address | Address that created the existence record |
Guarantee: Once an IntegraExistence record is created, the contentHash and timestamp are immutable. They cannot be modified or deleted.
IntegraRecord
An on-chain record wrapping an contentHash with operational metadata and resolver references. The fundamental unit of legal truth in the protocol.
| Property | Type | Description |
|---|---|---|
contentHash | bytes32 | SHA-256 hash of the terms document |
state | uint8 | Current state (active, superseded, disputed, resolved) |
creator | address | Address that created the record |
timestamp | uint256 | Block timestamp of creation |
resolvers | address[] | Array of resolver contract addresses attached to this record |
Resolvers
Resolver contracts are attached to IntegraRecords and provide specific services. Each resolver implements a defined interface. The resolver pattern is composable -- a single agreement might have a document location resolver, a contact resolver, a dispute resolver, and an escrow resolver all attached simultaneously.
Document Location Resolver
Returns the URI(s) where the terms document can be retrieved.
interface IDocumentLocationResolver {
function getDocumentUri(bytes32 contentHash)
external view returns (string memory uri);
function getDocumentUris(bytes32 contentHash)
external view returns (string[] memory uris);
}Contact Information Resolver
Returns structured contact information for the entity that created the record.
interface IContactResolver {
function getContact(
bytes32 contentHash,
string calldata contactType
) external view returns (string memory contact);
}Dispute Resolution Resolver
Provides dispute resolution services for agreements under the record's terms.
interface IDisputeResolver {
function fileDispute(
bytes32 contentHash,
address claimant,
address respondent,
bytes32[] calldata evidenceHashes
) external returns (bytes32 disputeId);
function getDisputeStatus(bytes32 disputeId)
external view returns (uint8 status);
function submitEvidence(
bytes32 disputeId,
bytes32 evidenceHash
) external;
}Terms Validation Resolver
Validates whether proposed terms fall within an agent's authorization scope.
interface ITermsValidationResolver {
function validateTerms(
bytes32 contentHash,
address agent,
bytes32 termsPolicyHash
) external view returns (bool valid, string memory reason);
}Escrow Condition Resolver
Evaluates whether escrow release conditions have been met.
interface IEscrowConditionResolver {
function evaluateCondition(
bytes32 contentHash,
bytes32 conditionId
) external view returns (bool met);
function releaseEscrow(bytes32 contentHash) external;
}State Transition Resolver
Governs the lifecycle of an agreement.
interface IStateTransitionResolver {
function getState(bytes32 contentHash)
external view returns (uint8 state);
function transition(bytes32 contentHash, uint8 newState)
external;
function validTransitions(uint8 currentState)
external pure returns (uint8[] memory nextStates);
}Chain Support
IntegraRecords MAY be deployed on any EVM-compatible chain. When referencing an IntegraRecord, implementations MUST specify the chain:
{
"chain": "tempo",
"chainId": 42431,
"address": "0x1234...5678",
"recordId": "0xabcdef..."
}The protocol does not mandate a specific chain. The API abstracts chain access -- agents interact via HTTP and never need to know which chain hosts the record.