@volare.finance/utils.js
Version:
The Blockchain Utils
20 lines (19 loc) • 619 B
TypeScript
/**
* @file login.ts
* @author astra <astra@volare.finance>
* @date 2022
*/
import { TypedDataDomain } from '@ethersproject/abstract-signer';
import { Wallet } from 'ethers';
import { EIP712TypedData, Signature } from './eip712';
export interface EIP712LoginData extends EIP712TypedData {
message: {
address: string;
nonce: number;
};
}
export declare function getEIP712LoginData(domain: TypedDataDomain, message: {
address: string;
nonce: number;
}): EIP712LoginData;
export declare function signEIP712LoginData(signer: Wallet, data: EIP712LoginData): Promise<[Signature, string]>;