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

@0xsequence/guard

Package Overview
Dependencies
Maintainers
6
Versions
492
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/guard - npm Package Compare versions

Comparing version 0.0.0-20241216114019 to 0.0.0-20241218203257

23

dist/0xsequence-guard.cjs.dev.js

@@ -11,14 +11,9 @@ 'use strict';

function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return target;
};
return _extends.apply(this, arguments);
return n;
}, _extends.apply(null, arguments);
}

@@ -480,2 +475,3 @@

async sign(message, metadata) {
var _metadata$parts;
if (!core.commons.isWalletSignRequestMetadata(metadata)) {

@@ -489,8 +485,5 @@ throw new Error('expected sequence signature request metadata');

const coder = core.universal.genericCoderFor(metadata.config.version);
const validationsParts = new Map(Array.from(metadata.parts || []).map(([signer, part]) => [signer, part.validationSignature ? _extends({}, part, {
signature: part.validationSignature
}) : part]));
const {
encoded
} = coder.signature.encodeSigners(metadata.config, validationsParts, [], metadata.chainId);
} = coder.signature.encodeSigners(metadata.config, (_metadata$parts = metadata.parts) != null ? _metadata$parts : new Map(), [], metadata.chainId);
return (await this.guard.signWith({

@@ -497,0 +490,0 @@ signer: this.address,

@@ -11,14 +11,9 @@ 'use strict';

function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return target;
};
return _extends.apply(this, arguments);
return n;
}, _extends.apply(null, arguments);
}

@@ -480,2 +475,3 @@

async sign(message, metadata) {
var _metadata$parts;
if (!core.commons.isWalletSignRequestMetadata(metadata)) {

@@ -489,8 +485,5 @@ throw new Error('expected sequence signature request metadata');

const coder = core.universal.genericCoderFor(metadata.config.version);
const validationsParts = new Map(Array.from(metadata.parts || []).map(([signer, part]) => [signer, part.validationSignature ? _extends({}, part, {
signature: part.validationSignature
}) : part]));
const {
encoded
} = coder.signature.encodeSigners(metadata.config, validationsParts, [], metadata.chainId);
} = coder.signature.encodeSigners(metadata.config, (_metadata$parts = metadata.parts) != null ? _metadata$parts : new Map(), [], metadata.chainId);
return (await this.guard.signWith({

@@ -497,0 +490,0 @@ signer: this.address,

@@ -7,14 +7,9 @@ import { commons, universal } from '@0xsequence/core';

function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
return _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return target;
};
return _extends.apply(this, arguments);
return n;
}, _extends.apply(null, arguments);
}

@@ -476,2 +471,3 @@

async sign(message, metadata) {
var _metadata$parts;
if (!commons.isWalletSignRequestMetadata(metadata)) {

@@ -485,8 +481,5 @@ throw new Error('expected sequence signature request metadata');

const coder = universal.genericCoderFor(metadata.config.version);
const validationsParts = new Map(Array.from(metadata.parts || []).map(([signer, part]) => [signer, part.validationSignature ? _extends({}, part, {
signature: part.validationSignature
}) : part]));
const {
encoded
} = coder.signature.encodeSigners(metadata.config, validationsParts, [], metadata.chainId);
} = coder.signature.encodeSigners(metadata.config, (_metadata$parts = metadata.parts) != null ? _metadata$parts : new Map(), [], metadata.chainId);
return (await this.guard.signWith({

@@ -493,0 +486,0 @@ signer: this.address,

{
"name": "@0xsequence/guard",
"version": "0.0.0-20241216114019",
"version": "0.0.0-20241218203257",
"description": "guard sub-package for Sequence",

@@ -15,6 +15,6 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/guard",

"dependencies": {
"@0xsequence/account": "0.0.0-20241216114019",
"@0xsequence/core": "0.0.0-20241216114019",
"@0xsequence/signhub": "0.0.0-20241216114019",
"@0xsequence/utils": "0.0.0-20241216114019"
"@0xsequence/core": "0.0.0-20241218203257",
"@0xsequence/account": "0.0.0-20241218203257",
"@0xsequence/signhub": "0.0.0-20241218203257",
"@0xsequence/utils": "0.0.0-20241218203257"
},

@@ -21,0 +21,0 @@ "devDependencies": {

@@ -64,9 +64,3 @@ import { Account } from '@0xsequence/account'

const coder = universal.genericCoderFor(metadata.config.version)
const validationsParts = new Map(
Array.from(metadata.parts || []).map(([signer, part]) => [
signer,
part.validationSignature ? { ...part, signature: part.validationSignature } : part
])
)
const { encoded } = coder.signature.encodeSigners(metadata.config, validationsParts, [], metadata.chainId)
const { encoded } = coder.signature.encodeSigners(metadata.config, metadata.parts ?? new Map(), [], metadata.chainId)

@@ -73,0 +67,0 @@ return (

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