
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
Define a single source of truth for your API and persistence layer, and use Verdad's extensions to a) call it, b) implement it, and c) deploy it.

Verdad lets you:
Define your backend API in Verdad:
import * as t from 'io-ts'
import { StatusCodes } from "http-status-codes";
import { NumberFromString } from 'io-ts-types';
import { VerdadRESTAPI } from "verdad";
export const musicAPI = VerdadRESTAPI.api({
name: 'my New Music Startup',
servers: {
prod: 'https://api.music.com',
test: 'https://test-api.music.com',
},
builder: (ctx) => ({
playlists: VerdadRESTAPI.resource(ctx, ['users', { parameter: 'userID' }, 'playlists'], {
get: (ctx) => VerdadRESTAPI.method(ctx, {
pathParametersType: t.type({ userID: t.string }),
queryParametersType: t.partial({ pageNumber: NumberFromString }),
headerParametersType: t.type({ 'authorization-token': t.string, }),
requestBodyType: t.null,
successResponse: {
statusCodes: [
StatusCodes.OK as const
],
bodyType: t.array(PlaylistModel)
},
errorResponse: {
statusCodes: [
StatusCodes.UNAUTHORIZED as const,
StatusCodes.BAD_REQUEST as const,
StatusCodes.INTERNAL_SERVER_ERROR as const,
],
bodyType: t.type({ errorDetails: t.string }),
}
}),
post: () => undefined,
delete: () => undefined,
patch: () => undefined,
put: () => undefined,
}),
// albums: ...,
})
})
Use an extension to deploy this API to your infrastructure of choice:
For example, to deploy to AWS Lambda:
VerdadCloudFormation.makeServerlessFunctions() from your serverless.ts file:import type { AWS } from '@serverless/typescript';
import { VerdadCloudFormation } from 'verdad/lib/extensions';
const serverlessConfig: AWS = {
service: 'music-api',
provider: { name: 'aws' },
functions: VerdadCloudFormation.makeServerlessFunctions(musicAPI),
};
module.exports = serverlessConfig;
makeServerlessFunctions() looks for the implementations under src/resources/<path>/<method>. For the users/*/playlists GET method example above, it would look for an implementation in src/resources/users/playlists/get.ts:import * as E from 'fp-ts/Either'
import { implement, LambdaRuntimeError } from 'verdad/lib/extensions';
export const { verdadMain } = implement(
musicAPI.resources.playlists.get,
async (input) => {
const playlists = retrievePlaylists(
input.pathParameters.userID,
input.headerParameters['authorization-token'],
input.queryParameters.pageNumber,
)
return E.right({
statusCode: StatusCodes.OK,
body: {
value: playlists,
type: t.array(PlaylistModel)
}
})
},
(error: LambdaRuntimeError) => {
switch (error.kind) {
case 'invalid_request_schema':
case 'non_json_request_body':
return {
statusCode: StatusCodes.BAD_REQUEST,
body: {
value: { errorDetails: JSON.stringify(error.details) },
type: t.type({ errorDetails: t.string }),
}
}
case 'unexpected_runtime_error':
return {
statusCode: StatusCodes.INTERNAL_SERVER_ERROR,
body: {
value: { errorDetails: 'Details hidden for security' },
type: t.type({ errorDetails: t.string }),
}
}
}
}
)
Use a client extension to call the APIs:
For example, to make calls using Axios:
import { VerdadAxios } from 'verdad/lib/extensions';
async function getPlaylists(userID: string, authToken: string) {
const musicAPIAxios = new VerdadAxios.RESTAPI({
api: musicAPI
})
const playlists = await musicAPIAxios.callMethod(api => api.playlists.get, {
server: 'prod',
pathParameters: { userID },
queryParameters: {},
headerParameters: {
'authorization-token': authToken
},
body: null,
})
if (E.isRight(playlists)) {
displayToUser(playlists.right.successResponse)
} else {
const error = playlists.left
switch (error.label) {
case 'Error response returned':
displayToUser(error.statusCode, error.errorResponse)
break;
case 'Could not decode error response':
case 'Unexpected error status code returned':
case 'Could not decode success response':
case 'Unexpected success status code returned':
displayToUser(error.statusCode, error.response)
break;
case 'No response received':
case 'No status code returned':
case 'Request could not be made':
displayToUser('Check your Internet connection and try again.')
break;
}
}
}
FAQs
Define a single source of truth for your API and persistence layer, and use Verdad's extensions to a) call it, b) implement it, and c) deploy it.
The npm package verdad receives a total of 0 weekly downloads. As such, verdad popularity was classified as not popular.
We found that verdad demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.