UNPKG

@graphprotocol/toolshed

Version:

A collection of tools and utilities for the Graph Protocol Typescript components

29 lines 1.45 kB
export declare const EIP712_DISPUTE_MANAGER_DOMAIN_SALT: Uint8Array<ArrayBufferLike>; export declare const EIP712_ATTESTATION_PROOF_TYPEHASH: string; export declare const EIP712_ATTESTATION_PROOF_TYPES: { Receipt: { name: string; type: string; }[]; }; /** * Creates an attestation data for a given request and response CIDs. * @param requestCID The request CID. * @param responseCID The response CID. * @param signerPrivateKey The private key of the signer. * @param subgraphDeploymentId The subgraph deployment ID. * @param disputeManagerAddress The address of the dispute manager contract. * @param chainId The chain ID. * @returns The attestation data. */ export declare function generateAttestationData(requestCID: string, responseCID: string, subgraphDeploymentId: string, signerPrivateKey: string, disputeManagerAddress: string, chainId: number): Promise<string>; /** * Verifies the signer of an attestation data. * @param attestationData The attestation data to verify. * @param expectedSigner The expected signer address. * @param disputeManagerAddress The address of the dispute manager contract. * @param chainId The chain ID. * @returns True if the signer matches the expected signer, false otherwise. */ export declare function verifyAttestationSigner(attestationData: string, expectedSigner: string, disputeManagerAddress: string, chainId: number): boolean; //# sourceMappingURL=attestations.d.ts.map