Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@elastic.io/maester-client
Advanced tools
The official Elastic.io object-storage client.
Note: All the code snippets written in Typescript
import { ObjectStorageWrapper } from '@elastic.io/maester-client/dist/ObjectStorageWrapper';
const objectStorage = new ObjectStorageWrapper(this);
The method has the following signature:
async createObject(data: object, queryKey?: string, queryValue?: string, ttl?: number)
where
Get objects by query parameter
section). Optional, but if queryKey is specified, queryValue must be specified as well.const obj = await objectStorage.createObject(data, somequeriablefieldKey, somequeriablefieldValue, 60000);
The method has the following signature:
async lookupObjectById(id: string)
where
const obj = await objectStorage.lookupObjectById(id);
As Maester is able to store any data type, the method returns a raw string. You may want to parse JSON or do any other data processing according to object's expected data type:
const parsedObject = JSON.parse(obj);
The following errors can be thrown:
The method has the following signature:
async lookupObjectByQueryParameter(key: string, value: string)
where
If you create an object with a queriable header, internally it looks like this:
x-query-somequeriablefieldKey: somequeriablefieldValue
where 'x-query-' is a default prefix.
Using Maester REST API you can find this object by:
/objects?query[somequeriablefieldkey]=somequeriablefieldValue
Using the library:
const obj = await objectStorage.lookupObjectByQueryParameter('somequeriablefieldKey', 'somequeriablefieldValue');
The method returns a JSON array. It either is empty in case no objects found or contains objects
The method has the following signature:
async updateObject(id: string, data: object)
where
const obj = await objectStorage.updateObject(id, data);
The method has the following signature:
async deleteObjectById(id: string)
where
const obj = await objectStorage.deleteObjectById(id);
3.1.0 (July 1, 2021)
FAQs
The official object-storage client
The npm package @elastic.io/maester-client receives a total of 329 weekly downloads. As such, @elastic.io/maester-client popularity was classified as not popular.
We found that @elastic.io/maester-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.