Socket
Socket
Sign inDemoInstall

@dfinity/agent

Package Overview
Dependencies
Maintainers
12
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/agent - npm Package Compare versions

Comparing version 0.19.0 to 0.19.1

11

lib/cjs/agent/http/index.js

@@ -157,3 +157,12 @@ "use strict";

}
this._host = new URL(location + '');
// Mainnet and local will have the api route available
const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
if (location && knownHosts.includes(location.hostname)) {
// If the user is on a boundary-node provided host, we can use the same host for the agent
this._host = new URL(location + '');
}
else {
this._host = new URL('https://icp-api.io');
console.warn('Could not infer host from window.location, defaulting to mainnet gateway of https://icp-api.io. Please provide a host to the HttpAgent constructor to avoid this warning.');
}
}

@@ -160,0 +169,0 @@ // Default is 3, only set from option if greater or equal to 0

@@ -126,3 +126,12 @@ import { Principal } from '@dfinity/principal';

}
this._host = new URL(location + '');
// Mainnet and local will have the api route available
const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
if (location && knownHosts.includes(location.hostname)) {
// If the user is on a boundary-node provided host, we can use the same host for the agent
this._host = new URL(location + '');
}
else {
this._host = new URL('https://icp-api.io');
console.warn('Could not infer host from window.location, defaulting to mainnet gateway of https://icp-api.io. Please provide a host to the HttpAgent constructor to avoid this warning.');
}
}

@@ -129,0 +138,0 @@ // Default is 3, only set from option if greater or equal to 0

6

package.json
{
"name": "@dfinity/agent",
"version": "0.19.0",
"version": "0.19.1",
"author": "DFINITY Stiftung <sdk@dfinity.org>",

@@ -53,4 +53,4 @@ "license": "Apache-2.0",

"peerDependencies": {
"@dfinity/candid": "^0.19.0",
"@dfinity/principal": "^0.19.0"
"@dfinity/candid": "^0.19.1",
"@dfinity/principal": "^0.19.1"
},

@@ -57,0 +57,0 @@ "dependencies": {

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