Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blockfrost/blockfrost-utils

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockfrost/blockfrost-utils - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0-beta.1

9

lib/fastify.d.ts

@@ -18,6 +18,15 @@ /// <reference types="node" />

export declare const handleInvalidAddress: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidAddressFromTo: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidAsset: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidBlockHash: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidBlockNumber: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidEpoch: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidLabel: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidPolicy: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidPool: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidSlot: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidStakeAddress: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidXpub: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidXpubIndex: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export declare const handleInvalidXpubRole: (reply: FastifyReply) => FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
export {};

38

lib/fastify.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleInvalidStakeAddress = exports.handleInvalidPool = exports.handleInvalidPolicy = exports.handleInvalidAsset = exports.handleInvalidAddress = exports.handleFastifyError = exports.handle500 = exports.handle415 = exports.handle404 = exports.handle403Custom = exports.handle403 = exports.handle402 = exports.handle400Custom = exports.handle400 = exports.errorHandler = exports.notFoundHandler = void 0;
exports.handleInvalidXpubRole = exports.handleInvalidXpubIndex = exports.handleInvalidXpub = exports.handleInvalidStakeAddress = exports.handleInvalidSlot = exports.handleInvalidPool = exports.handleInvalidPolicy = exports.handleInvalidLabel = exports.handleInvalidEpoch = exports.handleInvalidBlockNumber = exports.handleInvalidBlockHash = exports.handleInvalidAsset = exports.handleInvalidAddressFromTo = exports.handleInvalidAddress = exports.handleFastifyError = exports.handle500 = exports.handle415 = exports.handle404 = exports.handle403Custom = exports.handle403 = exports.handle402 = exports.handle400Custom = exports.handle400 = exports.errorHandler = exports.notFoundHandler = void 0;
const notFoundHandler = (_request, reply) => {

@@ -139,2 +139,6 @@ return reply

exports.handleInvalidAddress = handleInvalidAddress;
const handleInvalidAddressFromTo = (reply) => {
return (0, exports.handle400Custom)(reply, 'Invalid (malformed or out of range) from/to parameter(s).');
};
exports.handleInvalidAddressFromTo = handleInvalidAddressFromTo;
const handleInvalidAsset = (reply) => {

@@ -144,2 +148,18 @@ return (0, exports.handle400Custom)(reply, 'Invalid or malformed asset format.');

exports.handleInvalidAsset = handleInvalidAsset;
const handleInvalidBlockHash = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing or malformed block hash.');
};
exports.handleInvalidBlockHash = handleInvalidBlockHash;
const handleInvalidBlockNumber = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing, out of range or malformed block number.');
};
exports.handleInvalidBlockNumber = handleInvalidBlockNumber;
const handleInvalidEpoch = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing, out of range or malformed epoch_number.');
};
exports.handleInvalidEpoch = handleInvalidEpoch;
const handleInvalidLabel = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing, out of range or malformed label.');
};
exports.handleInvalidLabel = handleInvalidLabel;
const handleInvalidPolicy = (reply) => {

@@ -153,2 +173,6 @@ return (0, exports.handle400Custom)(reply, 'Invalid or malformed policy format.');

exports.handleInvalidPool = handleInvalidPool;
const handleInvalidSlot = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing, out of range or malformed slot_number.');
};
exports.handleInvalidSlot = handleInvalidSlot;
const handleInvalidStakeAddress = (reply) => {

@@ -158,1 +182,13 @@ return (0, exports.handle400Custom)(reply, 'Invalid or malformed stake address format.');

exports.handleInvalidStakeAddress = handleInvalidStakeAddress;
const handleInvalidXpub = (reply) => {
return (0, exports.handle400Custom)(reply, 'Invalid or malformed xpub format. Has to be hex of length 128.');
};
exports.handleInvalidXpub = handleInvalidXpub;
const handleInvalidXpubIndex = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing, out of range or malformed index.');
};
exports.handleInvalidXpubIndex = handleInvalidXpubIndex;
const handleInvalidXpubRole = (reply) => {
return (0, exports.handle400Custom)(reply, 'Missing, out of range or malformed role.');
};
exports.handleInvalidXpubRole = handleInvalidXpubRole;

2

package.json
{
"name": "@blockfrost/blockfrost-utils",
"version": "2.1.0",
"version": "2.2.0-beta.1",
"repository": "git@github.com:blockfrost/blockfrost-utils.git",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc