npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@idoa/actionforge-validator

v0.1.1

Published

Strict validators and lints for Solana Actions/Blinks payloads

Downloads

196

Readme

@idoa/actionforge-validator

Strict schema validation and lint helpers for Solana Actions/Blinks payloads.

Deterministically validates request and response objects against the Solana Actions spec and reports structured issues with error codes, field paths, and severity levels. Works as a library or a CLI tool.

This package does not modify any Solana protocol or spec. It is a read-only conformance checker.


Installation

npm install @idoa/actionforge-validator

Requires Node.js >= 18.


Programmatic API

import {
  validateActionResponse,
  validateActionRequest,
  lintActionResponse,
} from '@idoa/actionforge-validator';

validateActionResponse(payload): ValidationResult

Strictly validates a Solana Actions response payload against the spec schema. Any unrecognized fields or type mismatches will produce errors.

const result = validateActionResponse({
  title: 'Stake SOL',
  description: 'Stake your SOL with one click.',
  icon: 'https://example.com/icon.png',
  links: {
    actions: [{ label: 'Stake', href: 'https://example.com/api/stake' }],
  },
});

if (!result.ok) {
  console.error(result.issues);
  // [{ code: 'AFV1003', level: 'error', path: 'title', message: '...' }]
}

validateActionRequest(payload): ValidationResult

Strictly validates a Solana Actions request payload (e.g. a POST body with account).

const result = validateActionRequest({ account: 'AxjDsasdXyz...' });

if (result.ok) {
  console.log('Request is valid');
}

lintActionResponse(payload): LintResult

Non-strict analysis of an action response. Accepts valid payloads but surfaces warnings for common issues like non-HTTPS URLs, unexpected extra fields, or empty action lists.

const lint = lintActionResponse({
  title: 'My Action',
  description: 'Does something',
  icon: 'http://example.com/icon.png', // <- non-HTTPS, will warn
  links: { actions: [] },              // <- empty actions, will warn
});

console.log(lint.warnings);
// [
//   { code: 'AFV2002', level: 'warning', path: 'icon', message: 'Icon URL should use HTTPS.' },
//   { code: 'AFV2003', level: 'warning', path: 'links.actions', message: 'No action links were provided.' },
// ]

Type Reference

ValidationResult

interface ValidationResult {
  ok: boolean;
  issues: ValidationIssue[];
}

LintResult

interface LintResult {
  ok: boolean;
  errors: ValidationIssue[];
  warnings: ValidationIssue[];
  issues: ValidationIssue[]; // errors + warnings combined
}

ValidationIssue

interface ValidationIssue {
  code: ValidatorErrorCode; // e.g. 'AFV1003'
  level: 'error' | 'warning';
  path: string;             // dot-notation field path, e.g. 'links.actions.0.href'
  message: string;
}

Error Codes

| Code | Severity | Description | |------|----------|-------------| | AFV1000 | error | Invalid JSON | | AFV1001 | error | Invalid request schema | | AFV1002 | error | Invalid response schema | | AFV1003 | error | Missing required field | | AFV1004 | error | Wrong field type | | AFV2001 | warning | Unexpected extra field | | AFV2002 | warning | Non-HTTPS URL detected | | AFV2003 | warning | No action links provided |


CLI

Install globally or use via npx:

# Validate a local JSON file
actionforge-validator validate ./my-action-response.json

# Validate a live endpoint
actionforge-validator validate https://example.com/api/action

# Lint a local JSON file (warnings + errors)
actionforge-validator lint ./my-action-response.json

# Lint a live endpoint
actionforge-validator lint https://example.com/api/action

Exit codes: 0 = pass, 1 = validation errors found.


Related Packages


License

MIT (c) Milan Matejic