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 2.3.2 to 2.3.3-beta.0

lib/stream.d.ts

8

lib/validation.d.ts
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: Extract<PaymentCredPrefix, 'addr_vkh' | 'script'>) => 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.3.2",
"version": "2.3.3-beta.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