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

@0xsequence/utils

Package Overview
Dependencies
Maintainers
4
Versions
496
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/utils - npm Package Compare versions

Comparing version 0.16.0 to 0.18.0

6

CHANGELOG.md
# @0xsequence/utils
## 0.18.0
### Minor Changes
- relayer improvements and pending transaction handling
## 0.16.0

@@ -4,0 +10,0 @@

@@ -14,3 +14,10 @@ 'use strict';

}
}; // packMessageData encodes the specified data ready for the Sequence Wallet contracts.
const packMessageData = (walletAddress, chainId, digest) => {
return ethers.ethers.utils.solidityPack(['string', 'uint256', 'address', 'bytes32'], ['\x19\x01', chainId, walletAddress, digest]);
};
const subDigestOf = (address, chainId, digest) => {
return ethers.ethers.utils.keccak256(packMessageData(address, chainId, digest));
};

@@ -229,5 +236,7 @@ const isNode = () => {

exports.logger = logger;
exports.packMessageData = packMessageData;
exports.promisify = promisify;
exports.sanitizeNumberString = sanitizeNumberString;
exports.sleep = sleep;
exports.subDigestOf = subDigestOf;
exports.urlClean = urlClean;

@@ -14,3 +14,10 @@ 'use strict';

}
}; // packMessageData encodes the specified data ready for the Sequence Wallet contracts.
const packMessageData = (walletAddress, chainId, digest) => {
return ethers.ethers.utils.solidityPack(['string', 'uint256', 'address', 'bytes32'], ['\x19\x01', chainId, walletAddress, digest]);
};
const subDigestOf = (address, chainId, digest) => {
return ethers.ethers.utils.keccak256(packMessageData(address, chainId, digest));
};

@@ -229,5 +236,7 @@ const isNode = () => {

exports.logger = logger;
exports.packMessageData = packMessageData;
exports.promisify = promisify;
exports.sanitizeNumberString = sanitizeNumberString;
exports.sleep = sleep;
exports.subDigestOf = subDigestOf;
exports.urlClean = urlClean;

9

dist/0xsequence-utils.esm.js

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

}
}; // packMessageData encodes the specified data ready for the Sequence Wallet contracts.
const packMessageData = (walletAddress, chainId, digest) => {
return ethers.utils.solidityPack(['string', 'uint256', 'address', 'bytes32'], ['\x19\x01', chainId, walletAddress, digest]);
};
const subDigestOf = (address, chainId, digest) => {
return ethers.utils.keccak256(packMessageData(address, chainId, digest));
};

@@ -180,2 +187,2 @@ const isNode = () => {

export { Logger, configureLogger, encodeMessageDigest, encodeTypedDataDigest, encodeTypedDataHash, getRandomInt, isBrowser, isNode, logger, promisify, sanitizeNumberString, sleep, urlClean };
export { Logger, configureLogger, encodeMessageDigest, encodeTypedDataDigest, encodeTypedDataHash, getRandomInt, isBrowser, isNode, logger, packMessageData, promisify, sanitizeNumberString, sleep, subDigestOf, urlClean };

@@ -0,1 +1,4 @@

import { ethers } from 'ethers';
export declare const encodeMessageDigest: (message: string | Uint8Array) => Uint8Array;
export declare const packMessageData: (walletAddress: string, chainId: ethers.BigNumberish, digest: ethers.BytesLike) => string;
export declare const subDigestOf: (address: string, chainId: ethers.BigNumberish, digest: ethers.BytesLike) => string;

2

package.json
{
"name": "@0xsequence/utils",
"version": "0.16.0",
"version": "0.18.0",
"description": "utils sub-package for Sequence",

@@ -5,0 +5,0 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/utils",

@@ -1,2 +0,2 @@

import { ethers} from 'ethers'
import { ethers } from 'ethers'

@@ -10,1 +10,15 @@ export const encodeMessageDigest = (message: string | Uint8Array) => {

}
// packMessageData encodes the specified data ready for the Sequence Wallet contracts.
export const packMessageData = (walletAddress: string, chainId: ethers.BigNumberish, digest: ethers.BytesLike): string => {
return ethers.utils.solidityPack(
['string', 'uint256', 'address', 'bytes32'],
['\x19\x01', chainId, walletAddress, digest]
)
}
export const subDigestOf = (address: string, chainId: ethers.BigNumberish, digest: ethers.BytesLike): string => {
return ethers.utils.keccak256(
packMessageData(address, chainId, digest)
)
}
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