@0xsequence/replacer 0.0.0-20230417133433 → 0.0.0-20230505164841

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,10 +17,10 @@ function isIPFS(uri) {
17
17
 
18
18
  class CachedEIP5719 {
19
19
  constructor(provider, solver, window = 1000) {
20
+ this.pending = new Map();
20
21
  this.provider = provider;
21
22
  this.solver = solver;
22
23
  this.window = window;
23
- this.pending = new Map();
24
24
  }
25
25
  async runByEIP5719(address, digest, signature) {
26
26
  const key = `${address}-${digest}-${signature}`;
@@ -103,7 +103,6 @@ async function runByEIP5719(address, provider, digest, signature, solver, tries
103
103
  class URISolverIPFS {
104
104
  constructor(gateway = 'https://cloudflare-ipfs.com/ipfs/') {
105
105
  var _this = this;
106
- this.gateway = gateway;
107
106
  this.uri = uri => {
108
107
  if (isIPFS(uri)) return useGateway(uri, this.gateway);
109
108
  return uri;
@@ -114,6 +113,7 @@ class URISolverIPFS {
114
113
  if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`);
115
114
  return await res.text();
116
115
  };
116
+ this.gateway = gateway;
117
117
  }
118
118
  }
119
119
 
@@ -17,10 +17,10 @@ function isIPFS(uri) {
17
17
 
18
18
  class CachedEIP5719 {
19
19
  constructor(provider, solver, window = 1000) {
20
+ this.pending = new Map();
20
21
  this.provider = provider;
21
22
  this.solver = solver;
22
23
  this.window = window;
23
- this.pending = new Map();
24
24
  }
25
25
  async runByEIP5719(address, digest, signature) {
26
26
  const key = `${address}-${digest}-${signature}`;
@@ -103,7 +103,6 @@ async function runByEIP5719(address, provider, digest, signature, solver, tries
103
103
  class URISolverIPFS {
104
104
  constructor(gateway = 'https://cloudflare-ipfs.com/ipfs/') {
105
105
  var _this = this;
106
- this.gateway = gateway;
107
106
  this.uri = uri => {
108
107
  if (isIPFS(uri)) return useGateway(uri, this.gateway);
109
108
  return uri;
@@ -114,6 +113,7 @@ class URISolverIPFS {
114
113
  if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`);
115
114
  return await res.text();
116
115
  };
116
+ this.gateway = gateway;
117
117
  }
118
118
  }
119
119
 
@@ -13,10 +13,10 @@ function isIPFS(uri) {
13
13
 
14
14
  class CachedEIP5719 {
15
15
  constructor(provider, solver, window = 1000) {
16
+ this.pending = new Map();
16
17
  this.provider = provider;
17
18
  this.solver = solver;
18
19
  this.window = window;
19
- this.pending = new Map();
20
20
  }
21
21
  async runByEIP5719(address, digest, signature) {
22
22
  const key = `${address}-${digest}-${signature}`;
@@ -99,7 +99,6 @@ async function runByEIP5719(address, provider, digest, signature, solver, tries
99
99
  class URISolverIPFS {
100
100
  constructor(gateway = 'https://cloudflare-ipfs.com/ipfs/') {
101
101
  var _this = this;
102
- this.gateway = gateway;
103
102
  this.uri = uri => {
104
103
  if (isIPFS(uri)) return useGateway(uri, this.gateway);
105
104
  return uri;
@@ -110,6 +109,7 @@ class URISolverIPFS {
110
109
  if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`);
111
110
  return await res.text();
112
111
  };
112
+ this.gateway = gateway;
113
113
  }
114
114
  }
115
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/replacer",
3
- "version": "0.0.0-20230417133433",
3
+ "version": "0.0.0-20230505164841",
4
4
  "description": "EIP-5719 client implementation",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/replacer",
6
6
  "source": "src/index.ts",
@@ -9,8 +9,8 @@
9
9
  "author": "Horizon Blockchain Games",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@0xsequence/abi": "0.0.0-20230417133433",
13
- "@0xsequence/core": "0.0.0-20230417133433"
12
+ "@0xsequence/core": "0.0.0-20230505164841",
13
+ "@0xsequence/abi": "0.0.0-20230505164841"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "ethers": ">=5.5"