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.4.0-beta.1 to 2.4.0

2

lib/fastify.js

@@ -129,3 +129,3 @@ "use strict";

// error.name is always "FastifyError", use error.code to provide more info to a client (eg. FST_ERR_CTP_INVALID_MEDIA_TYPE)
error: error.name,
error: error.name === 'FastifyError' ? 'error' : error.name,
message: error.message,

@@ -132,0 +132,0 @@ status_code: error.statusCode,

declare type BlockfrostNetwork = 'mainnet' | 'testnet' | 'preview' | 'preprod';
declare type SUPPORTED_PAYMENT_CRED_PREFIX = 'addr_vkh' | 'addr_vk' | 'script';
declare type PaymentCredPrefix = 'addr_vkh' | 'addr_vk' | 'script';
export declare const validateHex: (input: string) => boolean;

@@ -9,5 +9,5 @@ export declare const validateStakeAddress: (input: string, network: BlockfrostNetwork) => boolean;

paymentCred: string;
prefix: SUPPORTED_PAYMENT_CRED_PREFIX;
prefix: PaymentCredPrefix;
} | undefined;
export declare const paymentCredToBech32Address: (input: string, prefix: SUPPORTED_PAYMENT_CRED_PREFIX) => string | undefined;
export declare const paymentCredToBech32Address: (input: string, prefix: PaymentCredPrefix) => string | undefined;
export declare const detectAndValidateAddressType: (input: string, network: BlockfrostNetwork) => 'byron' | 'shelley' | undefined;

@@ -17,3 +17,3 @@ export declare const getAddressTypeAndPaymentCred: (address: string, network: BlockfrostNetwork) => {

paymentCred: string;
paymentCredPrefix: SUPPORTED_PAYMENT_CRED_PREFIX;
paymentCredPrefix: PaymentCredPrefix;
} | {

@@ -20,0 +20,0 @@ addressType: "byron" | "shelley" | undefined;

@@ -126,7 +126,2 @@ "use strict";

return bech32_1.bech32.encode(prefix, words);
case Prefixes.PAYMENT_KEY:
// Payment key was already converted to key hash, so we cannot restore the original key.
// We could supply orig via a parameter and then compare its hash to the input, but that's too much trouble.
// Due to the above return payment key hash (input) with addr_vkh prefix instead of the original addr_vk
return bech32_1.bech32.encode(Prefixes.PAYMENT_KEY_HASH, words);
default:

@@ -133,0 +128,0 @@ throw Error(`Prefix ${prefix} is not supported by paymentCredToBech32Address`);

{
"name": "@blockfrost/blockfrost-utils",
"version": "2.4.0-beta.1",
"version": "2.4.0",
"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