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

@0xsequence/signhub

Package Overview
Dependencies
Maintainers
6
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/signhub - npm Package Compare versions

Comparing version 0.0.0-20241114193556 to 0.0.0-20241216114019

36

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

@@ -44,2 +44,17 @@ '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 target;
};
return _extends.apply(this, arguments);
}
let SignerState = /*#__PURE__*/function (SignerState) {

@@ -175,9 +190,20 @@ SignerState[SignerState["INITIAL"] = 0] = "INITIAL";

state: SignerState.SIGNING,
request: s.sign(message, metadata != null ? metadata : {}).then(signature => {
request: s.sign(message, metadata != null ? metadata : {}).then(async function (signature) {
const suffix = s.suffix();
status.signers[saddr] = {
let validationSignature;
if (s.buildEIP6492Signature) {
try {
validationSignature = await s.buildEIP6492Signature(signature);
} catch (e) {
// Log and ignore
console.warn(`signer ${saddr} failed to build validation signature: ${e}`);
}
}
status.signers[saddr] = _extends({
state: SignerState.SIGNED,
signature,
suffix
};
suffix,
signature
}, validationSignature && {
validationSignature
});
onStatusUpdate();

@@ -184,0 +210,0 @@ return signature;

@@ -44,2 +44,17 @@ '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 target;
};
return _extends.apply(this, arguments);
}
let SignerState = /*#__PURE__*/function (SignerState) {

@@ -175,9 +190,20 @@ SignerState[SignerState["INITIAL"] = 0] = "INITIAL";

state: SignerState.SIGNING,
request: s.sign(message, metadata != null ? metadata : {}).then(signature => {
request: s.sign(message, metadata != null ? metadata : {}).then(async function (signature) {
const suffix = s.suffix();
status.signers[saddr] = {
let validationSignature;
if (s.buildEIP6492Signature) {
try {
validationSignature = await s.buildEIP6492Signature(signature);
} catch (e) {
// Log and ignore
console.warn(`signer ${saddr} failed to build validation signature: ${e}`);
}
}
status.signers[saddr] = _extends({
state: SignerState.SIGNED,
signature,
suffix
};
suffix,
signature
}, validationSignature && {
validationSignature
});
onStatusUpdate();

@@ -184,0 +210,0 @@ return signature;

@@ -40,2 +40,17 @@ import { ethers } from 'ethers';

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 target;
};
return _extends.apply(this, arguments);
}
let SignerState = /*#__PURE__*/function (SignerState) {

@@ -171,9 +186,20 @@ SignerState[SignerState["INITIAL"] = 0] = "INITIAL";

state: SignerState.SIGNING,
request: s.sign(message, metadata != null ? metadata : {}).then(signature => {
request: s.sign(message, metadata != null ? metadata : {}).then(async function (signature) {
const suffix = s.suffix();
status.signers[saddr] = {
let validationSignature;
if (s.buildEIP6492Signature) {
try {
validationSignature = await s.buildEIP6492Signature(signature);
} catch (e) {
// Log and ignore
console.warn(`signer ${saddr} failed to build validation signature: ${e}`);
}
}
status.signers[saddr] = _extends({
state: SignerState.SIGNED,
signature,
suffix
};
suffix,
signature
}, validationSignature && {
validationSignature
});
onStatusUpdate();

@@ -180,0 +206,0 @@ return signature;

@@ -26,2 +26,3 @@ import { ethers } from 'ethers';

suffix: ethers.BytesLike;
validationSignature?: ethers.BytesLike;
} | {

@@ -28,0 +29,0 @@ state: SignerState.ERROR;

@@ -20,2 +20,6 @@ import { ethers } from 'ethers';

/**
* Build a validation signature for an undeployed contract signer.
*/
buildEIP6492Signature?(signature: ethers.BytesLike): Promise<ethers.BytesLike | undefined>;
/**
* Notify the signer of a status change.

@@ -22,0 +26,0 @@ */

4

package.json
{
"name": "@0xsequence/signhub",
"version": "0.0.0-20241114193556",
"version": "0.0.0-20241216114019",
"description": "orchestrates a series of signers, provides visibility into the signing process, and to the signers themselves",

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

"dependencies": {
"@0xsequence/core": "0.0.0-20241114193556"
"@0xsequence/core": "0.0.0-20241216114019"
},

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

@@ -22,3 +22,3 @@ import { ethers } from 'ethers'

| { state: SignerState.SIGNING; request: Promise<ethers.BytesLike> }
| { state: SignerState.SIGNED; signature: ethers.BytesLike; suffix: ethers.BytesLike }
| { state: SignerState.SIGNED; signature: ethers.BytesLike; suffix: ethers.BytesLike; validationSignature?: ethers.BytesLike }
| { state: SignerState.ERROR; error: any }

@@ -187,5 +187,19 @@

.sign(message, metadata ?? {})
.then(signature => {
.then(async signature => {
const suffix = s.suffix()
status.signers[saddr] = { state: SignerState.SIGNED, signature, suffix }
let validationSignature
if (s.buildEIP6492Signature) {
try {
validationSignature = await s.buildEIP6492Signature(signature)
} catch (e) {
// Log and ignore
console.warn(`signer ${saddr} failed to build validation signature: ${e}`)
}
}
status.signers[saddr] = {
state: SignerState.SIGNED,
suffix,
signature,
...(validationSignature && { validationSignature })
}
onStatusUpdate()

@@ -192,0 +206,0 @@ return signature

@@ -29,2 +29,7 @@ import { ethers } from 'ethers'

/**
* Build a validation signature for an undeployed contract signer.
*/
buildEIP6492Signature?(signature: ethers.BytesLike): Promise<ethers.BytesLike | undefined>;
/**
* Notify the signer of a status change.

@@ -31,0 +36,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