@0xsequence/replacer 1.5.0 → 1.6.0
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();
|
|
21
20
|
this.provider = provider;
|
|
22
21
|
this.solver = solver;
|
|
23
22
|
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,6 +103,7 @@ 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;
|
|
106
107
|
this.uri = uri => {
|
|
107
108
|
if (isIPFS(uri)) return useGateway(uri, this.gateway);
|
|
108
109
|
return uri;
|
|
@@ -113,7 +114,6 @@ class URISolverIPFS {
|
|
|
113
114
|
if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`);
|
|
114
115
|
return await res.text();
|
|
115
116
|
};
|
|
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();
|
|
21
20
|
this.provider = provider;
|
|
22
21
|
this.solver = solver;
|
|
23
22
|
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,6 +103,7 @@ 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;
|
|
106
107
|
this.uri = uri => {
|
|
107
108
|
if (isIPFS(uri)) return useGateway(uri, this.gateway);
|
|
108
109
|
return uri;
|
|
@@ -113,7 +114,6 @@ class URISolverIPFS {
|
|
|
113
114
|
if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`);
|
|
114
115
|
return await res.text();
|
|
115
116
|
};
|
|
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();
|
|
17
16
|
this.provider = provider;
|
|
18
17
|
this.solver = solver;
|
|
19
18
|
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,6 +99,7 @@ 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;
|
|
102
103
|
this.uri = uri => {
|
|
103
104
|
if (isIPFS(uri)) return useGateway(uri, this.gateway);
|
|
104
105
|
return uri;
|
|
@@ -109,7 +110,6 @@ class URISolverIPFS {
|
|
|
109
110
|
if (!res.ok) throw new Error(`URISolverIPFS - Failed to fetch ${url}`);
|
|
110
111
|
return await res.text();
|
|
111
112
|
};
|
|
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": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
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": "1.
|
|
13
|
-
"@0xsequence/core": "1.
|
|
12
|
+
"@0xsequence/abi": "1.6.0",
|
|
13
|
+
"@0xsequence/core": "1.6.0"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"ethers": ">=5.5"
|