New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 1.0.1 to 1.1.0-beta

2

lib/validation.d.ts

@@ -20,2 +20,4 @@ declare type BlockfrostNetwork = 'mainnet' | 'testnet' | 'preview' | 'preprod';

export declare const isNumber: (value: string | number | undefined) => boolean;
export declare const validatePolicy: (input: string) => boolean;
export declare const validateAsset: (input: string) => boolean;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNumber = exports.validateBlockHash = exports.validateDerivationXpub = exports.validateInRangeUnsignedInt = exports.validatePositiveInRangeSignedBigInt = exports.validatePositiveInRangeSignedInt = exports.scriptHashFromBech32Address = exports.getAddressTypeAndPaymentCred = exports.detectAndValidateAddressType = exports.paymentCredToBech32Address = exports.paymentCredFromBech32Address = exports.validateAndConvertPool = exports.convertStakeAddress = exports.validateStakeAddress = exports.validateHex = void 0;
exports.validateAsset = exports.validatePolicy = exports.isNumber = exports.validateBlockHash = exports.validateDerivationXpub = exports.validateInRangeUnsignedInt = exports.validatePositiveInRangeSignedBigInt = exports.validatePositiveInRangeSignedInt = exports.scriptHashFromBech32Address = exports.getAddressTypeAndPaymentCred = exports.detectAndValidateAddressType = exports.paymentCredToBech32Address = exports.paymentCredFromBech32Address = exports.validateAndConvertPool = exports.convertStakeAddress = exports.validateStakeAddress = exports.validateHex = void 0;
const cardano_serialization_lib_nodejs_1 = require("@emurgo/cardano-serialization-lib-nodejs");

@@ -228,1 +228,12 @@ const bech32_1 = require("bech32");

exports.isNumber = isNumber;
const validatePolicy = (input) => {
// policy is always 56 chars long
return (0, exports.validateHex)(input) && input.length === 56;
};
exports.validatePolicy = validatePolicy;
const validateAsset = (input) => {
// policy is always 56 chars long
// asset name is not mandatory, hence between 0 and 64 chars long (56+64=120)
return (0, exports.validateHex)(input) && input.length >= 56 && input.length <= 120;
};
exports.validateAsset = validateAsset;

2

package.json
{
"name": "@blockfrost/blockfrost-utils",
"version": "1.0.1",
"version": "1.1.0-beta",
"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