Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@cryptoscamdb/api
Advanced tools
A Javascript wrapper for the CryptoScamDB API for Node.js and browser applications.
npm i -P @cryptoscamdb/api
MemoryCacheProvider
, in-memory caching) - Set the cache providerAll methods return a promise.
You can use the CacheProvider
interface to implement your own caching method (e.g. filesystem or Redis).
interface CacheProvider {
get<T = any>(key: string): Promise<T | undefined>;
getTimestamp(key: string): Promise<number>;
set<T = any>(key: string, result: T): Promise<boolean>;
has(key: string): Promise<boolean>;
remove(key: string): Promise<boolean>;
}
See cache.ts
for an example (in-memory) implementation.
import CryptoScamDBAPI from '@cryptoscamdb/api';
const options = {
cache: {
enable: true
}
};
const api = new CryptoScamDBAPI(options);
// Equal to https://cryptoscamdb.org/api/check/example.com
api.check('example.com')
.then(result => {
// Do something with the result
console.log(result.entries);
})
// Handle error
.catch(console.error);
// API is available as `window.csdbapi`
const api = new window.csdbapi();
// Equal to https://cryptoscamdb.org/api/check/example.com
api.check('example.com')
.then(result => {
// Do something with the result
console.log(result.entries);
})
// Handle error
.catch(console.error);
FAQs
A Javascript wrapper for the CryptoScamDB API
We found that @cryptoscamdb/api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.