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

@0xsequence/core

Package Overview
Dependencies
Maintainers
5
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/core - npm Package Compare versions

Comparing version 0.0.0-20230704142612 to 0.0.0-20230706234338

dist/declarations/src/commons/validateEIP6492.d.ts

1

dist/declarations/src/commons/index.d.ts

@@ -8,2 +8,3 @@ export * as config from './config';

export * as reader from './reader';
export * as EIP6492 from './validateEIP6492';
export * from './orchestrator';

4

package.json
{
"name": "@0xsequence/core",
"version": "0.0.0-20230704142612",
"version": "0.0.0-20230706234338",
"description": "core primitives for interacting with the sequence wallet contracts",

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

"dependencies": {
"@0xsequence/abi": "0.0.0-20230704142612"
"@0xsequence/abi": "0.0.0-20230706234338"
},

@@ -26,0 +26,0 @@ "scripts": {

@@ -9,3 +9,4 @@

export * as reader from './reader'
export * as EIP6492 from './validateEIP6492'
export * from './orchestrator'
import { walletContracts } from "@0xsequence/abi"
import { ethers } from "ethers"
import { commons } from ".."
import { isValidCounterfactual } from "./context"
import { validateEIP6492Offchain } from "./validateEIP6492"

@@ -98,2 +98,5 @@ /**

// We use the EIP-6492 validator contract to check the signature
// this means that if the wallet is not deployed, then the signature
// must be prefixed with a transaction that deploys the wallet
async isValidSignature(

@@ -104,24 +107,4 @@ wallet: string,

): Promise<boolean> {
const isDeployed = await this.isDeployed(wallet)
if (isDeployed) {
const isValid = await this.module(wallet).isValidSignature(digest, signature)
return isValid === '0x1626ba7e' // as defined in ERC1271
}
// We can try to recover the counterfactual address
// and check if it matches the wallet address
if (this.contexts) {
return isValidCounterfactual(
wallet,
digest,
signature,
await this.provider.getNetwork().then((n) => n.chainId),
this.provider,
this.contexts
)
} else {
throw new Error('Wallet must be deployed to validate signature, or context info must be provided')
}
return validateEIP6492Offchain(this.provider, wallet, digest, signature)
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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