
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@cord-sdk/api-types
Advanced tools
TypeScript type definitions and JSON schema objects for the data types used by the Cord REST API
This package contains TypeScript type definitions and JSON schema objects for the data types used by the Cord REST API.
npm install @cord-sdk/api-types
To use proper type definitions for the data structures send to and received from the Cord REST API, import them from this package, e.g.:
import { PlatformUserVariables } from '@cord-sdk/api-types';
You can use the JSON schema shipped in this package to validate data structures send to or received from the Cord REST API at run-time.
For example, to do run-time validation using the AJV package in TypeScript:
import Ajv from "ajv";
import { schema } from '@cord-sdk/api-types';
import type { PlatformUserVariables } from '@cord-sdk/api-types';
const ajv = new Ajv();
const validatePlatformUserVariables = ajv.compile<PlatformUserVariables>(schema['PlatformUserVariables']);
The validatePlatformUserVariables
function takes data as an argument and returns a boolean indicating whether the given data conforms to the schema for PlatformUserVariables
. The function is declared as a type guard, so if you use it as the conditional in an if statement, TypeScript understands that within the true-branch, the data is of type PlatformUserVariables
.
FAQs
TypeScript type definitions and JSON schema objects for the data types used by the Cord REST API
We found that @cord-sdk/api-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.