Skip to main content
Version: next

Module: src

Classes

Interfaces

Functions

genSignature

genSignature(unirepAddress, attester, epochLength, chainId): Promise<string>

Generate attester sign up signature

Parameters

NameTypeDescription
unirepAddressstringThe address of UniRep smart contract
attesterSigner | WalletThe address of the attester
epochLengthnumberEpoch length specified by the attester
chainIdnumber | bigintThe current chain id of the UniRep smart contract

Returns

Promise<string>

An sign up signature for the attester

Defined in

packages/contracts/src/index.ts:26


getUnirepContract

getUnirepContract(address, signerOrProvider): Unirep

Get Unirep smart contract from a given address

Parameters

NameTypeDescription
addressstringThe address if the Unirep contract
signerOrProviderProvider | SignerThe signer or provider that will connect to the Unirep smart contract

Returns

Unirep

The Unirep smart contract

Defined in

packages/contracts/src/index.ts:10