Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deps #19

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A verification happens on a wrapped document, and it consists of answering to so

A wrapped document (shown below) created using [Open Attestation](https://www.openattestation.com/docs/developer-section/libraries/remote-files/open-attestation) would be required.

> **NOTE:** The document shown below is valid and has been issued on the sepolia network
> **NOTE:** The document shown below is valid and has been issued on the goerli network

```json
{
Expand Down Expand Up @@ -107,10 +107,10 @@ You can build your own verify method or your own verifiers:
// creating your own verify using default exported verifiers
import { verificationBuilder, openAttestationVerifiers } from "@tradetrust-tt/tt-verify";

const verify1 = verificationBuilder(openAttestationVerifiers, { network: "sepolia" }); // this verify is equivalent to the one exported by the library
const verify1 = verificationBuilder(openAttestationVerifiers, { network: "goerli" }); // this verify is equivalent to the one exported by the library
// this verify is equivalent to the one exported by the library
const verify2 = verificationBuilder([openAttestationVerifiers[0], openAttestationVerifiers[1]], {
network: "sepolia",
network: "goerli",
}); // this verify only run 2 verifiers
```

Expand All @@ -130,7 +130,7 @@ const customVerifier: Verifier<any> = {
};

// create your own verify function with all verifiers and your custom one
const verify = verificationBuilder([...openAttestationVerifiers, customVerifier], { network: "sepolia" });
const verify = verificationBuilder([...openAttestationVerifiers, customVerifier], { network: "goerli" });
```

Refer to [Extending Custom Verification](#extending-custom-verification) to find out more on how to create your own custom verifier.
Expand Down Expand Up @@ -180,7 +180,7 @@ import { isValid, openAttestationVerifiers, verificationBuilder } from "@tradetr
import * as document from "./document.json";

const verify = verificationBuilder(openAttestationVerifiers, {
network: "sepolia",
network: "goerli",
});

const promisesCallback = (verificationMethods: any) => {
Expand Down Expand Up @@ -334,7 +334,7 @@ const customVerifier: Verifier<any> = {
};

// create your own verify function with all verifiers and your custom one
const verify = verificationBuilder([...openAttestationVerifiers, customVerifier], { network: "sepolia" });
const verify = verificationBuilder([...openAttestationVerifiers, customVerifier], { network: "goerli" });

const fragments = await verify(document);

Expand Down Expand Up @@ -374,7 +374,7 @@ The document that we [created](#verifying-a-document) is not valid against our o

- `PROVIDER_API_KEY`: let you provide your own PROVIDER API key.
- `PROVIDER_ENDPOINT_URL`: let you provide your preferred JSON-RPC HTTP API URL.
- `PROVIDER_NETWORK`: let you specify the network to use, i.e. "homestead", "mainnet", "sepolia".
- `PROVIDER_NETWORK`: let you specify the network to use, i.e. "homestead", "mainnet", "goerli".
- `PROVIDER_ENDPOINT_TYPE`: let you specify the provider to use, i.e. "infura", "alchemy", "jsonrpc".

_Provider that is supported: Infura, EtherScan, Alchemy, JSON-RPC_
Expand All @@ -395,7 +395,7 @@ const verify = verificationBuilder(openAttestationVerifiers, { provider: customP
To specify network:

```ts
const verify = verificationBuilder(openAttestationVerifiers, { network: "sepolia" });
const verify = verificationBuilder(openAttestationVerifiers, { network: "goerli" });
```

### Specify resolver
Expand Down Expand Up @@ -425,7 +425,7 @@ You may generate a provider using the provider generator, it supports `INFURA`,

It requires a set of options:

- `network`: The _network_ may be specified as a **string** for a common network name, i.e. "homestead", "mainnet", "sepolia".
- `network`: The _network_ may be specified as a **string** for a common network name, i.e. "homestead", "mainnet", "goerli".
- `provider`: The _provider_ may be specified as a **string**, i.e. "infura", "alchemy" or "jsonrpc".
- `url`: The _url_ may be specified as a **string** in which is being used to connect to a JSON-RPC HTTP API
- `apiKey`: The _apiKey_ may be specified as a **string** for use together with the provider. If no apiKey is provided, a default shared API key will be used, which may result in reduced performance and throttled requests.
Expand All @@ -444,7 +444,7 @@ Alternate way 1 (with environment variables):

```ts
// environment file
PROVIDER_NETWORK = "sepolia";
PROVIDER_NETWORK = "goerli";
PROVIDER_ENDPOINT_TYPE = "infura";
PROVIDER_ENDPOINT_URL = "http://jsonrpc.com";
PROVIDER_API_KEY = "ajdh1j23";
Expand All @@ -460,7 +460,7 @@ Alternate way 2 (passing values in as parameters):
```ts
import { utils } from "@tradetrust-tt/tt-verify";
const providerOptions = {
network: "sepolia",
network: "goerli",
providerType: "infura",
apiKey: "abdfddsfe23232",
};
Expand Down Expand Up @@ -492,7 +492,7 @@ Let's see how to use it

```ts
import { utils } from "@tradetrust-tt/tt-verify";
const fragments = verify(documentValidWithCertificateStore, { network: "sepolia" });
const fragments = verify(documentValidWithCertificateStore, { network: "goerli" });
// return the correct fragment, correctly typed
const fragment = utils.getOpenAttestationEthereumTokenRegistryStatusFragment(fragments);

Expand Down Expand Up @@ -561,4 +561,4 @@ npm run generate:v3
## Additional information

- For Verification SDK implementation follow our [Verifier ADR](https://github.com/Open-Attestation/adr/blob/master/verifier.md).
- Found a bug ? Having a question ? Want to share an idea ? Reach us out on the [Github repository](https://github.com/Open-Attestation/oa-verify).`
- Found a bug ? Having a question ? Want to share an idea ? Reach us out on the [Github repository](https://github.com/Open-Attestation/oa-verify).`
Loading
Loading