import 'isomorphic-fetch'; import * as IPv8 from '../types/ipv8'; import { Verification } from '../types/ipv8-connector'; export declare class Ipv8AttestationClient { private baseUrl; /** * Create a new IPv8 Attestation client instance * * @param {string} apiUrl Base url of the Ipv8 rest api including the port */ constructor(apiUrl: string); /** * Get all other visible peers in the network * * @return Array of peer identifiers */ getPeers(): Promise; /** * Get all outstanding requests for attestation */ getOutstanding(): Promise; /** * Find a outstanding attestation request by attribute name. * * If no outstanding verification request are found, the client will retry at a maximum of 5 times. * This allows the connector to handle rapid claim and attest workflows and gives IPv8 the time * to sync a new attestation request across it's peers. * * @param attributeName Attribute name to find a outstanding request for * @returns Outstanding verification request, null of no request could be found */ findOutstanding(attributeName: string): Promise; /** * Get all attested attributes of this peer * * @param {string} mid Base64 encoded peer reference * @return All attributes of the current peer. */ getAttributes(mid?: string): Promise; /** * Ask a peer to verify if a given hash is corresponding to a given value * * @param peer Owner mid of the attribute to verify * @param attributeHash Hash of the attribute to verify * @param attributeValue Value to verify */ verify(peer: string, attributeHash: string, attributeValue: string): Promise; /** * Allow a given peer to verify the content of an attribute * * @param peer Peer that is allowed to verify the attribute value * @param attributeName Attribute to allow verification for */ allowVerify(peer: string, attributeName: string): Promise; /** * Get all outstanding requests for verification */ getOutstandingVerify(): Promise; /** * Get the results of requested verifications */ getVerificationOutput(): Promise; /** * Request another peer to attest an attribute * * @param attributeName Name of the attribute to request attestation for * @param peerToAttest The base64 mid of the peer that will attest the attribute * @param metadata Optional metatadat */ requestAttestation(attributeName: string, peerToAttest: string, metadata?: object): Promise; /** * Attest a attribute with a value * * @param attributeName Attribute to attest * @param attributeValue Value to test the attribute with * @param attributeOwner The base64 mid of the owner of the attribute */ attest(attributeName: string, attributeValue: string, attributeOwner: string): Promise; }