Skip to content

Commit

Permalink
Improve offchain attestation verification
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Nov 13, 2023
1 parent b60c18f commit b4e18d7
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 107 deletions.
7 changes: 4 additions & 3 deletions dist/offchain/offchain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { Signer } from 'ethers';
import { EAS } from '../eas';
import { DomainTypedData, EIP712MessageTypes, EIP712Params, EIP712Response, EIP712Types, PartialTypedDataConfig, TypedDataHandler } from './typed-data-handler';
export { EIP712Request, PartialTypedDataConfig, EIP712MessageTypes } from './typed-data-handler';
interface OffchainAttestationType extends EIP712Types<EIP712MessageTypes> {
export interface OffchainAttestationType extends EIP712Types<EIP712MessageTypes> {
domain: string;
}
export declare enum OffChainAttestationVersion {
Legacy = 0,
Version1 = 1
}
export declare const OFFCHAIN_ATTESTATION_TYPES: Record<OffChainAttestationVersion, OffchainAttestationType>;
export declare const OFFCHAIN_ATTESTATION_TYPES: Record<OffChainAttestationVersion, OffchainAttestationType[]>;
export type OffchainAttestationParams = {
version: number;
schema: string;
Expand All @@ -28,7 +28,8 @@ export interface SignedOffchainAttestation extends EIP712Response<EIP712MessageT
}
export declare class Offchain extends TypedDataHandler {
readonly version: OffChainAttestationVersion;
private readonly type;
protected signingType: OffchainAttestationType;
protected readonly verificationTypes: OffchainAttestationType[];
private readonly eas;
constructor(config: PartialTypedDataConfig, version: number, eas: EAS);
getDomainSeparator(): string;
Expand Down
108 changes: 68 additions & 40 deletions dist/offchain/offchain.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/offchain/offchain.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b4e18d7

Please sign in to comment.