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

@canvas-js/client

Package Overview
Dependencies
Maintainers
0
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvas-js/client - npm Package Compare versions

Comparing version 0.10.10 to 0.11.0

33

lib/index.js

@@ -6,5 +6,20 @@ import * as json from "@ipld/dag-json";

constructor(signer, host, topic) {
this.signer = signer;
this.host = host;
this.topic = topic;
Object.defineProperty(this, "signer", {
enumerable: true,
configurable: true,
writable: true,
value: signer
});
Object.defineProperty(this, "host", {
enumerable: true,
configurable: true,
writable: true,
value: host
});
Object.defineProperty(this, "topic", {
enumerable: true,
configurable: true,
writable: true,
value: topic
});
}

@@ -18,3 +33,3 @@ async sendAction(name, args) {

const query = Object.entries({
address: session.payload.did,
did: session.payload.did,
publicKey: session.signer.publicKey,

@@ -25,10 +40,10 @@ minExpiration: timestamp,

.join("&");
const res = await fetch(`${this.host}/sessions?${query}`);
const res = await fetch(`${this.host}/api/sessions/count?${query}`);
assert(res.status === StatusCodes.OK);
const sessions = await res.json();
if (sessions.length === 0) {
const result = await res.json();
if (result.count === 0) {
session = null;
}
}
const head = await fetch(`${this.host}/clock`).then((res) => res.json());
const head = await fetch(`${this.host}/api/clock`).then((res) => res.json());
if (session === null) {

@@ -60,3 +75,3 @@ session = await this.signer.newSession(this.topic);

const signature = await delegateSigner.sign(message);
const res = await fetch(`${this.host}/messages`, {
const res = await fetch(`${this.host}/api/messages`, {
method: "POST",

@@ -63,0 +78,0 @@ headers: { "content-type": "application/json" },

{
"name": "@canvas-js/client",
"version": "0.10.10",
"version": "0.11.0",
"author": "Canvas Technologies, Inc. (https://canvas.xyz)",

@@ -22,8 +22,8 @@ "type": "module",

"dependencies": {
"@canvas-js/interfaces": "0.10.10",
"@canvas-js/utils": "0.10.10",
"@canvas-js/interfaces": "0.11.0",
"@canvas-js/utils": "0.11.0",
"@ipld/dag-json": "^10.2.2",
"@noble/hashes": "^1.4.0",
"@noble/hashes": "^1.5.0",
"http-status-codes": "^2.3.0"
}
}
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