Socket
Socket
Sign inDemoInstall

@solana/rpc-transport-http

Package Overview
Dependencies
Maintainers
15
Versions
790
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/rpc-transport-http - npm Package Compare versions

Comparing version 2.0.0-experimental.080a7d1 to 2.0.0-experimental.0af01ac

25

dist/index.browser.js

@@ -0,1 +1,3 @@

import { SolanaError, SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN } from '@solana/errors';
// ../build-scripts/env-shim.ts

@@ -6,17 +8,2 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();

var e = globalThis.fetch;
// src/http-transport-errors.ts
var SolanaHttpError = class extends Error {
statusCode;
constructor(details) {
super(`HTTP error (${details.statusCode}): ${details.message}`);
Error.captureStackTrace(this, this.constructor);
this.statusCode = details.statusCode;
}
get name() {
return "SolanaHttpError";
}
};
// src/http-transport-headers.ts
var DISALLOWED_HEADERS = {

@@ -58,5 +45,5 @@ accept: true,

if (badHeaders.length > 0) {
throw new Error(
`${badHeaders.length > 1 ? "These headers are" : "This header is"} forbidden: \`${badHeaders.join("`, `")}\`. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.`
);
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN, {
headers: badHeaders
});
}

@@ -113,3 +100,3 @@ }

if (!response.ok) {
throw new SolanaHttpError({
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, {
message: response.statusText,

@@ -116,0 +103,0 @@ statusCode: response.status

@@ -0,1 +1,3 @@

import { SolanaError, SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN } from '@solana/errors';
// ../build-scripts/env-shim.ts

@@ -6,17 +8,2 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();

var e = globalThis.fetch;
// src/http-transport-errors.ts
var SolanaHttpError = class extends Error {
statusCode;
constructor(details) {
super(`HTTP error (${details.statusCode}): ${details.message}`);
Error.captureStackTrace(this, this.constructor);
this.statusCode = details.statusCode;
}
get name() {
return "SolanaHttpError";
}
};
// src/http-transport-headers.ts
var DISALLOWED_HEADERS = {

@@ -58,5 +45,5 @@ accept: true,

if (badHeaders.length > 0) {
throw new Error(
`${badHeaders.length > 1 ? "These headers are" : "This header is"} forbidden: \`${badHeaders.join("`, `")}\`. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.`
);
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN, {
headers: badHeaders
});
}

@@ -113,3 +100,3 @@ }

if (!response.ok) {
throw new SolanaHttpError({
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, {
message: response.statusText,

@@ -116,0 +103,0 @@ statusCode: response.status

@@ -0,1 +1,2 @@

import { SolanaError, SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN } from '@solana/errors';
import { fetch } from 'undici';

@@ -5,17 +6,2 @@

var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();
// src/http-transport-errors.ts
var SolanaHttpError = class extends Error {
statusCode;
constructor(details) {
super(`HTTP error (${details.statusCode}): ${details.message}`);
Error.captureStackTrace(this, this.constructor);
this.statusCode = details.statusCode;
}
get name() {
return "SolanaHttpError";
}
};
// src/http-transport-headers.ts
var DISALLOWED_HEADERS = {

@@ -57,5 +43,5 @@ accept: true,

if (badHeaders.length > 0) {
throw new Error(
`${badHeaders.length > 1 ? "These headers are" : "This header is"} forbidden: \`${badHeaders.join("`, `")}\`. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.`
);
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HEADER_FORBIDDEN, {
headers: badHeaders
});
}

@@ -105,3 +91,3 @@ }

if (!response.ok) {
throw new SolanaHttpError({
throw new SolanaError(SOLANA_ERROR__RPC_TRANSPORT_HTTP_ERROR, {
message: response.statusText,

@@ -108,0 +94,0 @@ statusCode: response.status

{
"name": "@solana/rpc-transport-http",
"version": "2.0.0-experimental.080a7d1",
"version": "2.0.0-experimental.0af01ac",
"description": "An RPC transport that uses HTTP requests",

@@ -50,3 +50,4 @@ "exports": {

"undici": "^6.6.2",
"@solana/rpc-spec": "2.0.0-experimental.080a7d1"
"@solana/errors": "2.0.0-experimental.0af01ac",
"@solana/rpc-spec": "2.0.0-experimental.0af01ac"
},

@@ -53,0 +54,0 @@ "bundlewatch": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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