Public Functions

Public Functions for Admin Management

grantPermission

Grant access permission for a given amount of time to a specified third-party address for credit metrics belonging to a specific Credora's client entity. If the tokenAddress parameter is provided, the function will charge on the Credora's client wallet for a specific ERC-20 token to grant access to the on-chain data.

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

thirdParty

address

The address of the third-party that will consume the credit metrics

duration

uint128

The granting access time period (in seconds)

tokenAddress [OPTIONAL]

address

The address of the token used to pay for the service

tokenSender [OPTIONAL]

address

The address of the payment sender


revokePermission

Revoke access permission to a specified third-party address for credit metrics belonging to a specific Credora's client entity.

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

thirdParty

address

The address of the third-party that will consume the credit metrics


subscribe

Subscribe a contract to consume data. The consumer contract will need to implement the needed function callbacks of the CredoraFunctions abstract contract in order to receive the data.

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

subscribedContract

address

The contract subscribing to get Credora metrics

duration

uint128

The granting access time period (in seconds)

tokenAddress [OPTIONAL]

address

The address of the token used to pay for the service


unsubscribe

Unsubscribe a contract from data consumption.

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

subscribedContract

address

The contract subscribing to get Credora metrics


setDataWithEAS

Trigger the contract to call the getAttestation function on the EAS smart contract to retrieve an attestation, and then parse the credit metrics contained inside.

ParameterTypeDescription

uid

bytes32

The attestation UID containing the credit metrics


Public Functions for Synchronous Data Retrieval

getScore

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

Return: uint256 - referring to the score metric


getNAV

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

Return: uint256 - referring to the NAV metric


getRAE

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

Return: bytes8 - referring to the RAE metric


getBorrowCapacity

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

Return: uint256 - referring to the Borrow Capacity metric


getImpliedPD

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

Return: uint256 - referring to the Implied PD metric


getImpliedPDTenor

ParameterTypeDescription

entity

bytes32

The name of the entity owning the data

Return: uint256 - referring to the Implied PD Tenor metric

Last updated