UNPKG

@graphprotocol/toolshed

Version:

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

40 lines 1.87 kB
import { BytesLike } from 'ethers'; import type { RAV } from './types'; export declare const EIP712_DOMAIN_NAME = "GraphTallyCollector"; export declare const EIP712_DOMAIN_VERSION = "1"; export declare const EIP712_RAV_TYPES: { ReceiptAggregateVoucher: { name: string; type: string; }[]; }; /** * Generates a signed RAV * @param allocationId The allocation ID * @param payer The payer * @param serviceProvider The service provider * @param dataService The data service * @param timestampNs The timestamp in nanoseconds * @param valueAggregate The value aggregate * @param metadata The metadata * @param signerPrivateKey The private key of the signer * @param graphTallyCollectorAddress The address of the Graph Tally Collector contract * @param chainId The chain ID * @returns The encoded signed RAV calldata */ export declare function generateSignedRAV(allocationId: string, payer: string, serviceProvider: string, dataService: string, timestampNs: bigint, valueAggregate: bigint, metadata: BytesLike, signerPrivateKey: string, graphTallyCollectorAddress: string, chainId: number): Promise<{ rav: RAV; signature: string; }>; export declare function recoverRAVSigner(rav: RAV, signature: string, graphTallyCollectorAddress: string, chainId: number): string; /** * Generates a signer proof for authorizing a signer in the Graph Tally Collector * @param graphTallyCollector The Graph Tally Collector contract * @param signer The signer * @param chainId The chain ID * @param proofDeadline The deadline for the proof * @param signerPrivateKey The private key of the signer * @returns The encoded signer proof */ export declare function generateSignerProof(proofDeadline: bigint, payer: string, signerPrivateKey: string, graphTallyCollectorAddress: string, chainId: number): string; //# sourceMappingURL=graph-tally.d.ts.map