ethers/lib/utils#_TypedDataEncoder TypeScript Examples
The following examples show how to use
ethers/lib/utils#_TypedDataEncoder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: sign-utils.ts From shoyu with MIT License | 6 votes |
domainSeparator = async (
provider: any,
name: string, // name is deprecated
contractAddress: string
): Promise<string> => {
const domain = await getDomain(provider, contractAddress.toLowerCase(), contractAddress);
return _TypedDataEncoder.hashDomain(domain);
}
Example #2
Source File: domain.ts From hubble-contracts with MIT License | 5 votes |
getDomainSeparator = (domain: HubbleDomain): DomainSeparator => {
return _TypedDataEncoder.hashDomain(domain);
}