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

@blockfrost/blockfrost-js

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockfrost/blockfrost-js - npm Package Compare versions

Comparing version 5.5.0-beta.0 to 6.0.0-beta.0

lib/types/webhook.d.ts

2

lib/BlockFrostAPI.js

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

else {
throw Error('Invalid network option. Valid options: mainnet, testnet, preview, preprod, sanchonet.');
throw Error('Invalid network option. Valid options: mainnet, testnet, preview, preprod.');
}

@@ -156,0 +156,0 @@ }

@@ -5,3 +5,2 @@ export declare const API_URLS: {

preprod: string;
sanchonet: string;
ipfs: string;

@@ -8,0 +7,0 @@ };

@@ -8,3 +8,2 @@ "use strict";

preprod: 'https://cardano-preprod.blockfrost.io/api',
sanchonet: 'https://cardano-sanchonet.blockfrost.io/api',
ipfs: 'https://ipfs.blockfrost.io/api',

@@ -11,0 +10,0 @@ };

@@ -6,4 +6,5 @@ import { Schemas } from './types/open-api';

import { BlockfrostClientError, BlockfrostServerError, SignatureVerificationError } from './utils/errors';
import { WebhookEvent, WebhookEventBlock, WebhookEventDelegation, WebhookEventEpoch, WebhookEventTransaction } from './types/webhook';
type Responses = Schemas;
export { BlockFrostAPI, BlockFrostIPFS, BlockfrostClientError, BlockfrostServerError, SignatureVerificationError, parseAsset, getFingerprint, deriveAddress, verifyWebhookSignature, };
export type { Responses };
export type { Responses, WebhookEvent, WebhookEventBlock, WebhookEventTransaction, WebhookEventEpoch, WebhookEventDelegation, };

@@ -23,3 +23,3 @@ import { CacheError, CancelError, TimeoutError, RequestError, ReadError, ParseError, UploadError, HTTPError, MaxRedirectsError, UnsupportedProtocolError, RequiredRetryOptions } from 'got';

export type Options = (OptionCombination1 | OptionCombination2) & AdditionalOptions;
export type CardanoNetwork = 'mainnet' | 'preview' | 'preprod' | 'sanchonet';
export type CardanoNetwork = 'mainnet' | 'preview' | 'preprod';
export type BlockfrostNetwork = CardanoNetwork | 'ipfs';

@@ -26,0 +26,0 @@ export interface ValidatedOptions {

import { ParseAssetResult } from '../types/utils';
import { WebhookEvent } from '../types/webhook';
/**

@@ -90,2 +91,2 @@ * Derives an address with derivation path `m/1852'/1815'/account'/role/addressIndex`

* */
export declare const verifyWebhookSignature: (webhookPayload: unknown, signatureHeader: string | string[], secret: string, timestampToleranceSeconds?: number) => boolean;
export declare const verifyWebhookSignature: (webhookPayload: unknown, signatureHeader: string | string[], secret: string, timestampToleranceSeconds?: number) => WebhookEvent;

@@ -189,2 +189,3 @@ "use strict";

}
// Stringified webhook payload
const decodedWebhookPayload = Buffer.isBuffer(webhookPayload)

@@ -254,5 +255,6 @@ ? webhookPayload.toString('utf8')

// Successfully validate the signature only if it is within timestamp_tolerance_seconds tolerance
return true;
const webhookEvent = JSON.parse(decodedWebhookPayload);
return webhookEvent;
}
};
exports.verifyWebhookSignature = verifyWebhookSignature;

@@ -82,5 +82,2 @@ "use strict";

}
else if (projectId.startsWith('sanchonet')) {
return 'sanchonet';
}
else if (projectId.startsWith('ipfs')) {

@@ -87,0 +84,0 @@ return 'ipfs';

{
"name": "@blockfrost/blockfrost-js",
"version": "5.5.0-beta.0",
"version": "6.0.0-beta.0",
"description": "A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API",

@@ -5,0 +5,0 @@ "keywords": [

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