ISP

Version 1.0.0-beta18

Events

SchemaRegistered

event SchemaRegistered(uint64 schemaId)

AttestationMade

event AttestationMade(uint64 attestationId, string indexingKey)

AttestationRevoked

event AttestationRevoked(uint64 attestationId, string reason)

OffchainAttestationMade

event OffchainAttestationMade(string attestationId)

OffchainAttestationRevoked

event OffchainAttestationRevoked(string attestationId, string reason)

Errors

SchemaNonexistent

error SchemaNonexistent(uint64 nonexistentSchemaId)

0x38f8c6c4

SchemaWrongRegistrant

error SchemaWrongRegistrant(address expected, address actual)

0x71984561

AttestationIrrevocable

error AttestationIrrevocable(uint64 schemaId, uint64 offendingAttestationId)

0x8ac42f49

AttestationNonexistent

error AttestationNonexistent(uint64 nonexistentAttestationId)

0x54681a13

AttestationInvalidDuration

error AttestationInvalidDuration(uint64 offendingAttestationId, uint64 maxDuration, uint64 inputDuration)

0xa65e02ed

AttestationAlreadyRevoked

error AttestationAlreadyRevoked(uint64 offendingAttestationId)

0xd8c3da86

AttestationWrongAttester

error AttestationWrongAttester(address expected, address actual)

0xa9ad2007

OffchainAttestationExists

error OffchainAttestationExists(string existingOffchainAttestationId)

0xc83e3cdf

OffchainAttestationNonexistent

error OffchainAttestationNonexistent(string nonexistentOffchainAttestationId)

0xa006519a

OffchainAttestationAlreadyRevoked

error OffchainAttestationAlreadyRevoked(string offendingOffchainAttestationId)

0xa0671d20

InvalidDelegateSignature

error InvalidDelegateSignature()

0xfdf4e6f9

LegacySPRequired

error LegacySPRequired(address legacySP)

0x5c34b9cc

Functions

register

function register(struct Schema schema, bytes delegateSignature) external returns (uint64 schemaId)

Registers a Schema.

Emits SchemaRegistered.

Parameters

NameTypeDescription

schema

struct Schema

See Schema.

delegateSignature

bytes

Return Values

NameTypeDescription

schemaId

uint64

The assigned ID of the registered schema.

attest

function attest(struct Attestation attestation, string indexingKey, bytes delegateSignature, bytes extraData) external returns (uint64 attestationId)

Makes an attestation.

Emits AttestationMade.

Parameters

NameTypeDescription

attestation

struct Attestation

See Attestation.

indexingKey

string

Used by the frontend to aid indexing.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated attestation. Use "" or 0x otherwise.

extraData

bytes

This is forwarded to the resolver directly.

Return Values

NameTypeDescription

attestationId

uint64

The assigned ID of the attestation.

attest

function attest(struct Attestation attestation, uint256 resolverFeesETH, string indexingKey, bytes delegateSignature, bytes extraData) external payable returns (uint64 attestationId)

Makes an attestation where the schema hook expects ETH payment.

Emits AttestationMade.

Parameters

NameTypeDescription

attestation

struct Attestation

See Attestation.

resolverFeesETH

uint256

Amount of funds to send to the hook.

indexingKey

string

Used by the frontend to aid indexing.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated attestation. Use "" or 0x otherwise.

extraData

bytes

This is forwarded to the resolver directly.

Return Values

NameTypeDescription

attestationId

uint64

The assigned ID of the attestation.

attest

function attest(struct Attestation attestation, contract IERC20 resolverFeesERC20Token, uint256 resolverFeesERC20Amount, string indexingKey, bytes delegateSignature, bytes extraData) external returns (uint64 attestationId)

Makes an attestation where the schema hook expects ERC20 payment.

Emits AttestationMade.

Parameters

NameTypeDescription

attestation

struct Attestation

See Attestation.

resolverFeesERC20Token

contract IERC20

ERC20 token address used for payment.

resolverFeesERC20Amount

uint256

Amount of funds to send to the hook.

indexingKey

string

Used by the frontend to aid indexing.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated attestation. Use "" or 0x otherwise.

extraData

bytes

This is forwarded to the resolver directly.

Return Values

NameTypeDescription

attestationId

uint64

The assigned ID of the attestation.

attestOffchain

function attestOffchain(string offchainAttestationId, address delegateAttester, bytes delegateSignature) external

Timestamps an off-chain data ID.

Emits OffchainAttestationMade.

Parameters

NameTypeDescription

offchainAttestationId

string

The off-chain data ID.

delegateAttester

address

An optional delegated attester that authorized the caller to attest on their behalf if this is a delegated attestation. Use address(0) otherwise.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated attestation. Use "" or 0x otherwise. Use "" or 0x otherwise.

revoke

function revoke(uint64 attestationId, string reason, bytes delegateSignature, bytes extraData) external

Revokes an existing revocable attestation.

Emits AttestationRevoked. Must be called by the attester.

Parameters

NameTypeDescription

attestationId

uint64

An existing attestation ID.

reason

string

The revocation reason. This is only emitted as an event to save gas.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated revocation.

extraData

bytes

This is forwarded to the resolver directly.

revoke

function revoke(uint64 attestationId, string reason, uint256 resolverFeesETH, bytes delegateSignature, bytes extraData) external payable

Revokes an existing revocable attestation where the schema hook expects ERC20 payment.

Emits AttestationRevoked. Must be called by the attester.

Parameters

NameTypeDescription

attestationId

uint64

An existing attestation ID.

reason

string

The revocation reason. This is only emitted as an event to save gas.

resolverFeesETH

uint256

Amount of funds to send to the hook.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated revocation.

extraData

bytes

This is forwarded to the resolver directly.

revoke

function revoke(uint64 attestationId, string reason, contract IERC20 resolverFeesERC20Token, uint256 resolverFeesERC20Amount, bytes delegateSignature, bytes extraData) external

Revokes an existing revocable attestation where the schema hook expects ERC20 payment.

Emits AttestationRevoked. Must be called by the attester.

Parameters

NameTypeDescription

attestationId

uint64

An existing attestation ID.

reason

string

The revocation reason. This is only emitted as an event to save gas.

resolverFeesERC20Token

contract IERC20

ERC20 token address used for payment.

resolverFeesERC20Amount

uint256

Amount of funds to send to the hook.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated revocation.

extraData

bytes

This is forwarded to the resolver directly.

revokeOffchain

function revokeOffchain(string offchainAttestationId, string reason, bytes delegateSignature) external

Revokes an existing offchain attestation.

Emits OffchainAttestationRevoked. Must be called by the attester.

Parameters

NameTypeDescription

offchainAttestationId

string

An existing attestation ID.

reason

string

The revocation reason. This is only emitted as an event to save gas.

delegateSignature

bytes

An optional ECDSA delegateSignature if this is a delegated revocation.

registerBatch

function registerBatch(struct Schema[] schemas, bytes delegateSignature) external returns (uint64[] schemaIds)

Batch registers a Schema.

attestBatch

function attestBatch(struct Attestation[] attestations, string[] indexingKeys, bytes delegateSignature, bytes extraData) external returns (uint64[] attestationIds)

Batch attests.

attestBatch

function attestBatch(struct Attestation[] attestations, uint256[] resolverFeesETH, string[] indexingKeys, bytes delegateSignature, bytes extraData) external payable returns (uint64[] attestationIds)

Batch attests where the schema hook expects ETH payment.

attestBatch

function attestBatch(struct Attestation[] attestations, contract IERC20[] resolverFeesERC20Tokens, uint256[] resolverFeesERC20Amount, string[] indexingKeys, bytes delegateSignature, bytes extraData) external returns (uint64[] attestationIds)

Batch attests where the schema hook expects ERC20 payment.

attestOffchainBatch

function attestOffchainBatch(string[] offchainAttestationIds, address delegateAttester, bytes delegateSignature) external

Batch timestamps off-chain data IDs.

revokeBatch

function revokeBatch(uint64[] attestationIds, string[] reasons, bytes delegateSignature, bytes extraData) external

Batch revokes revocable on-chain attestations.

revokeBatch

function revokeBatch(uint64[] attestationIds, string[] reasons, uint256[] resolverFeesETH, bytes delegateSignature, bytes extraData) external payable

Batch revokes revocable on-chain attestations where the schema hook expects ETH payment.

revokeBatch

function revokeBatch(uint64[] attestationIds, string[] reasons, contract IERC20[] resolverFeesERC20Tokens, uint256[] resolverFeesERC20Amount, bytes delegateSignature, bytes extraData) external

Batch revokes revocable on-chain attestations where the schema hook expects ERC20 payment.

revokeOffchainBatch

function revokeOffchainBatch(string[] offchainAttestationIds, string[] reasons, bytes delegateSignature) external

Batch revokes off-chain attestations.

getSchema

function getSchema(uint64 schemaId) external view returns (struct Schema)

Returns the specified Schema.

getAttestation

function getAttestation(uint64 attestationId) external view returns (struct Attestation)

Returns the specified Attestation.

getOffchainAttestation

function getOffchainAttestation(string offchainAttestationId) external view returns (struct OffchainAttestation)

Returns the specified OffchainAttestation.

getDelegatedRegisterHash

function getDelegatedRegisterHash(struct Schema schema) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated registration.

getDelegatedRegisterBatchHash

function getDelegatedRegisterBatchHash(struct Schema[] schemas) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated batch registration.

getDelegatedAttestHash

function getDelegatedAttestHash(struct Attestation attestation) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated attestation.

getDelegatedAttestBatchHash

function getDelegatedAttestBatchHash(struct Attestation[] attestations) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated batch attestation.

getDelegatedOffchainAttestHash

function getDelegatedOffchainAttestHash(string offchainAttestationId) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated offchain attestation.

getDelegatedOffchainAttestBatchHash

function getDelegatedOffchainAttestBatchHash(string[] offchainAttestationIds) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated batch offchain attestation.

getDelegatedRevokeHash

function getDelegatedRevokeHash(uint64 attestationId, string reason) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated revocation.

getDelegatedRevokeBatchHash

function getDelegatedRevokeBatchHash(uint64[] attestationIds, string[] reasons) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated batch revocation.

getDelegatedOffchainRevokeHash

function getDelegatedOffchainRevokeHash(string offchainAttestationId, string reason) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated offchain revocation.

getDelegatedOffchainRevokeBatchHash

function getDelegatedOffchainRevokeBatchHash(string[] offchainAttestationIds, string[] reasons) external pure returns (bytes32)

Returns the hash that will be used to authorize a delegated batch offchain revocation.

schemaCounter

function schemaCounter() external view returns (uint64)

Returns the current schema counter. This is incremented for each Schema registered.

attestationCounter

function attestationCounter() external view returns (uint64)

Returns the current on-chain attestation counter. This is incremented for each Attestation made.

Last updated