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

@0xsequence/replacer

Package Overview
Dependencies
Maintainers
5
Versions
279
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/replacer - npm Package Compare versions

Comparing version 0.0.0-20230217200148 to 0.0.0-20230301184215

dist/declarations/src/cached.d.ts

23

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

@@ -18,2 +18,24 @@ 'use strict';

class CachedEIP5719 {
constructor(provider, solver, window = 1000) {
this.provider = provider;
this.solver = solver;
this.window = window;
this.pending = new Map();
}
async runByEIP5719(address, digest, signature) {
const key = `${address}-${digest}-${signature}`;
const now = Date.now();
if (this.pending.has(key) && now - this.pending.get(key).timestamp < this.window) {
return this.pending.get(key).promise;
}
const promise = runByEIP5719(address, this.provider, digest, signature, this.solver);
this.pending.set(key, {
timestamp: now,
promise
});
return promise;
}
}
function eip5719Contract(address, provider) {

@@ -99,2 +121,3 @@ // TODO: for some reason walletContracts is not being loaded from local

exports.CachedEIP5719 = CachedEIP5719;
exports.URISolverIPFS = URISolverIPFS;

@@ -101,0 +124,0 @@ exports.eip1271Contract = eip1271Contract;

@@ -18,2 +18,24 @@ 'use strict';

class CachedEIP5719 {
constructor(provider, solver, window = 1000) {
this.provider = provider;
this.solver = solver;
this.window = window;
this.pending = new Map();
}
async runByEIP5719(address, digest, signature) {
const key = `${address}-${digest}-${signature}`;
const now = Date.now();
if (this.pending.has(key) && now - this.pending.get(key).timestamp < this.window) {
return this.pending.get(key).promise;
}
const promise = runByEIP5719(address, this.provider, digest, signature, this.solver);
this.pending.set(key, {
timestamp: now,
promise
});
return promise;
}
}
function eip5719Contract(address, provider) {

@@ -99,2 +121,3 @@ // TODO: for some reason walletContracts is not being loaded from local

exports.CachedEIP5719 = CachedEIP5719;
exports.URISolverIPFS = URISolverIPFS;

@@ -101,0 +124,0 @@ exports.eip1271Contract = eip1271Contract;

24

dist/0xsequence-replacer.esm.js

@@ -14,2 +14,24 @@ import { ethers } from 'ethers';

class CachedEIP5719 {
constructor(provider, solver, window = 1000) {
this.provider = provider;
this.solver = solver;
this.window = window;
this.pending = new Map();
}
async runByEIP5719(address, digest, signature) {
const key = `${address}-${digest}-${signature}`;
const now = Date.now();
if (this.pending.has(key) && now - this.pending.get(key).timestamp < this.window) {
return this.pending.get(key).promise;
}
const promise = runByEIP5719(address, this.provider, digest, signature, this.solver);
this.pending.set(key, {
timestamp: now,
promise
});
return promise;
}
}
function eip5719Contract(address, provider) {

@@ -95,2 +117,2 @@ // TODO: for some reason walletContracts is not being loaded from local

export { URISolverIPFS, eip1271Contract, eip5719Contract, isValidSignature, runByEIP5719 };
export { CachedEIP5719, URISolverIPFS, eip1271Contract, eip5719Contract, isValidSignature, runByEIP5719 };
import { ethers } from "ethers";
export * from "./cached";
export declare function eip5719Contract(address: string, provider: ethers.providers.Provider): ethers.Contract;

@@ -3,0 +4,0 @@ export declare function eip1271Contract(address: string, provider: ethers.providers.Provider): ethers.Contract;

6

package.json
{
"name": "@0xsequence/replacer",
"version": "0.0.0-20230217200148",
"version": "0.0.0-20230301184215",
"description": "EIP-5719 client implementation",

@@ -12,4 +12,4 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/replacer",

"dependencies": {
"@0xsequence/abi": "0.0.0-20230217200148",
"@0xsequence/core": "0.0.0-20230217200148"
"@0xsequence/abi": "0.0.0-20230301184215",
"@0xsequence/core": "0.0.0-20230301184215"
},

@@ -16,0 +16,0 @@ "peerDependencies": {

@@ -7,2 +7,4 @@

export * from "./cached"
export function eip5719Contract(address: string, provider: ethers.providers.Provider): ethers.Contract {

@@ -9,0 +11,0 @@ // TODO: for some reason walletContracts is not being loaded from local

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