New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@filecoin-shipyard/lotus-client-provider-browser

Package Overview
Dependencies
Maintainers
8
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@filecoin-shipyard/lotus-client-provider-browser - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

9

index.js
class BrowserProvider {
constructor (url, options = {}) {
this.url = url
this.wsUrl =
options.wsUrl || url.replace(/^https:/, 'wss:').replace(/^http:/, 'ws:')
this.httpUrl =

@@ -8,3 +10,3 @@ options.httpUrl || url.replace(/^wss:/, 'https:').replace(/^ws:/, 'http:')

options.importUrl || this.httpUrl.replace(/\/rpc\//, '/rest/') + '/import'
this.transport = options.transport || 'ws'
this.transport = options.transport || (url.match(/^http/) ? 'http' : 'ws')
this.id = 0

@@ -239,5 +241,6 @@ this.inflight = new Map()

async destroy () {
async destroy (code = 1000) {
// List of codes: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes
if (this.ws) {
this.ws.close()
this.ws.close(code)
this.destroyed = true

@@ -244,0 +247,0 @@ }

{
"name": "@filecoin-shipyard/lotus-client-provider-browser",
"version": "0.0.6",
"version": "0.0.7",
"type": "module",

@@ -5,0 +5,0 @@ "module": "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