-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.ts
62 lines (57 loc) · 2.66 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { verificationBuilder } from "./verifiers/verificationBuilder";
import { Verifier } from "./types/core";
import { openAttestationHash } from "./verifiers/documentIntegrity/hash/openAttestationHash";
import { isValid } from "./validator";
import { openAttestationEthereumTokenRegistryStatus } from "./verifiers/documentStatus/tokenRegistry";
import { openAttestationEthereumDocumentStoreStatus } from "./verifiers/documentStatus/documentStore";
import { openAttestationDidSignedDocumentStatus } from "./verifiers/documentStatus/didSigned";
import { openAttestationDnsTxtIdentityProof } from "./verifiers/issuerIdentity/dnsTxt";
import { openAttestationDidIdentityProof } from "./verifiers/issuerIdentity/did";
import { openAttestationDnsDidIdentityProof } from "./verifiers/issuerIdentity/dnsDid";
import { createResolver } from "./did/resolver";
import { verifySignature } from "./did/verifier";
import { getIdentifier } from "./getIdentifier";
import * as utils from "./common/utils";
import util from "util";
// eslint-disable-next-line @typescript-eslint/no-empty-function
util.deprecate(function infuraApiKey() {}, "'INFURA_API_KEY' has been deprecated, please use 'PROVIDER_API_KEY'.");
const openAttestationVerifiers = [
openAttestationHash,
openAttestationEthereumTokenRegistryStatus,
openAttestationEthereumDocumentStoreStatus,
openAttestationDidSignedDocumentStatus,
openAttestationDnsTxtIdentityProof,
openAttestationDnsDidIdentityProof,
];
const defaultBuilderOption = {
network: process.env.PROVIDER_NETWORK || "homestead",
};
const verify = verificationBuilder(openAttestationVerifiers, defaultBuilderOption);
export * from "./types/core";
export * from "./verifiers/documentIntegrity/hash/openAttestationHash.type";
export * from "./verifiers/documentStatus/didSigned/didSignedDocumentStatus.type";
export * from "./verifiers/documentStatus/documentStore/ethereumDocumentStoreStatus.type";
export * from "./verifiers/documentStatus/tokenRegistry/ethereumTokenRegistryStatus.type";
export * from "./verifiers/issuerIdentity/did/didIdentityProof.type";
export * from "./verifiers/issuerIdentity/dnsDid/dnsDidProof.type";
export * from "./verifiers/issuerIdentity/dnsTxt/openAttestationDnsTxt.type";
export * from "./types/error";
export * from "./common/error";
export {
verificationBuilder,
openAttestationVerifiers,
isValid,
verify,
Verifier,
openAttestationHash,
openAttestationEthereumDocumentStoreStatus,
openAttestationEthereumTokenRegistryStatus,
openAttestationDidSignedDocumentStatus,
openAttestationDnsTxtIdentityProof,
openAttestationDnsDidIdentityProof,
openAttestationDidIdentityProof,
createResolver,
getIdentifier,
utils,
verifySignature,
};