Comments (7)
Something like this should work:
const explorerAPI = {
serviceName: 'etherscan',
key: '[your-key]',
keyPropertyName: 'apikey'
};
from cert-verifier-js.
here is my code (nestjs):
import { Injectable } from '@nestjs/common';
// import { Certificate } from '@blockcerts/cert-verifier-js';
const {
Certificate,
} = require('@blockcerts/cert-verifier-js/dist/verifier-node.js');
@Injectable()
export class CertVerifierService {
async verifyBlockerCertCertificate(certificateDefinition: string) {
const certificate = new Certificate(certificateDefinition);
await certificate.init();
return certificate.verify();
}
}
from cert-verifier-js.
Did you fix the issue?
from cert-verifier-js.
@lemoustachiste
There were no issues. I confirmed that the error was caused by me using the wrong badge, so I closed the issue.
from cert-verifier-js.
Good to know
I have noticed before the transaction not found
error and I think this might be due to Blockcypher being 404, I haven't had time to investigate much and since other explorers yield the result it's not a high priority.
As to overwrite default explorerAPIs, it's been a while, but I think there is an object merge so you need to provide the serviceName
similar to the default explorer you are overwriting. From there I think it's possible to provide your own parsingFunction
, or other parts of the object.
More info:
https://github.com/blockchain-certificates/explorer-lookup/blob/master/tests/explorers/explorer.test.ts#L65
https://github.com/blockchain-certificates/explorer-lookup/blob/master/src/explorers/index.ts#L33
from cert-verifier-js.
@lemoustachiste
Thank you for your response.
As you say, 404 response from Blockcypher was treated as a success because we got the correct response from Etherscan.
Although the question below is not appropriate for this issue,
Nevertheless, I was wondering if you could provide an additional answer for the explorer.
I want to apply just an my API key to the Etherscan API.
(I don't need my own parsing function, I want to use the existing parsingFunction
of etherscan).
But it seems that defining a parsingFunction
isn't optional.
Is there a good way to do this?
from cert-verifier-js.
@lemoustachiste Thank you for your reply!
from cert-verifier-js.
Related Issues (20)
- Build tests for v3 certs do not work
- The address used to issue this Blockcerts does not belong to the claimed issuer HOT 22
- Node build is broken
- Update deps base58-universal / transmute/did-core
- The "postinstall" script fails on Windows system HOT 4
- cache-control is not allowed by Access-Control-Allow-Headers in preflight response HOT 1
- hostOrText.readFile is not a function while npm run build HOT 2
- Computed hash does not match remote hash HOT 8
- Does the cert-verifier-js support the DID without publicKeyJWK?
- Failed JSON-LD normalization HOT 8
- ERROR XMLHttpRequest HOT 1
- Add the ability to specify custom chain HOT 3
- keyPropertyName/key pair is not appended to the URL querystring on verify again HOT 1
- BTC testnet validations fail due to out-of-date URL HOT 2
- Feature: Allow to pass assertionId as query parameter to the revocationList request
- Migrate JSONLD dep to v5
- Extract checkForUnmappedFields logic and apply it all versions
- Cert Verifier with external explorer APIs - Issue HOT 5
- create test scaffholding for quick browser and node build check
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cert-verifier-js.