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

@near-js/providers

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@near-js/providers - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

29

lib/fetch_json.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -19,3 +42,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

const exponential_backoff_1 = require("./exponential-backoff");
const fetch_1 = __importDefault(require("./fetch"));
const START_WAIT_TIME_MS = 1000;

@@ -36,3 +58,6 @@ const BACKOFF_MULTIPLIER = 1.5;

try {
const response = yield (global.fetch || fetch_1.default)(connectionInfo.url, {
if (!global.fetch) {
global.fetch = (yield Promise.resolve().then(() => __importStar(require('./fetch')))).default;
}
const response = yield global.fetch(connectionInfo.url, {
method: json ? 'POST' : 'GET',

@@ -39,0 +64,0 @@ body: json ? json : undefined,

2

package.json
{
"name": "@near-js/providers",
"version": "0.0.3",
"version": "0.0.4",
"description": "Library of implementations for interfacing with the NEAR blockchain",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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