@unirep/contracts
Version:
Client library for contracts related functions which are used in UniRep protocol.
20 lines (19 loc) • 1.02 kB
TypeScript
import { Unirep, Unirep__factory as UnirepFactory } from '../typechain';
import { ethers } from 'ethers';
/**
* Get Unirep smart contract from a given address
* @param address The address if the Unirep contract
* @param signerOrProvider The signer or provider that will connect to the Unirep smart contract
* @returns The Unirep smart contract
*/
export declare const getUnirepContract: (address: string, signerOrProvider: ethers.Signer | ethers.providers.Provider) => Unirep;
export { Unirep, UnirepFactory };
/**
* Generate attester sign up signature
* @param unirepAddress The address of UniRep smart contract
* @param attester The address of the attester
* @param epochLength Epoch length specified by the attester
* @param chainId The current chain id of the UniRep smart contract
* @returns An sign up signature for the attester
*/
export declare const genSignature: (unirepAddress: string, attester: ethers.Signer | ethers.Wallet, epochLength: number, chainId: bigint | number) => Promise<string>;