@ututrust/web-components 2.2.22-alpha.7 → 2.2.22-alpha.8
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.
- package/dist/index.cjs +1189 -1
- package/dist/index.js +79555 -8
- package/dist/manifest.json +0 -23
- package/package.json +30 -9
- package/dist/ccip-8362f12e.js +0 -153
- package/dist/ccip-df5cf9c8.cjs +0 -1
- package/dist/index-4c433761.cjs +0 -1178
- package/dist/index-7f442143.js +0 -81804
package/dist/manifest.json
CHANGED
|
@@ -1,29 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_index-4c433761.cjs": {
|
|
3
|
-
"dynamicImports": [
|
|
4
|
-
"node_modules/viem/_esm/utils/ccip.js"
|
|
5
|
-
],
|
|
6
|
-
"file": "index-4c433761.cjs"
|
|
7
|
-
},
|
|
8
|
-
"_index-7f442143.js": {
|
|
9
|
-
"dynamicImports": [
|
|
10
|
-
"node_modules/viem/_esm/utils/ccip.js"
|
|
11
|
-
],
|
|
12
|
-
"file": "index-7f442143.js"
|
|
13
|
-
},
|
|
14
|
-
"node_modules/viem/_esm/utils/ccip.js": {
|
|
15
|
-
"file": "ccip-df5cf9c8.cjs",
|
|
16
|
-
"imports": [
|
|
17
|
-
"_index-4c433761.cjs"
|
|
18
|
-
],
|
|
19
|
-
"isDynamicEntry": true,
|
|
20
|
-
"src": "node_modules/viem/_esm/utils/ccip.js"
|
|
21
|
-
},
|
|
22
2
|
"src/index.ts": {
|
|
23
3
|
"file": "index.cjs",
|
|
24
|
-
"imports": [
|
|
25
|
-
"_index-4c433761.cjs"
|
|
26
|
-
],
|
|
27
4
|
"isEntry": true,
|
|
28
5
|
"src": "src/index.ts"
|
|
29
6
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ututrust/web-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.22-alpha.
|
|
4
|
+
"version": "2.2.22-alpha.8",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@burner-wallet/burner-connect-provider": "^0.1.1",
|
|
27
27
|
"@preact/preset-vite": "^2.8.2",
|
|
28
|
-
"@
|
|
29
|
-
"@unlock-protocol/contracts": "^0.0.
|
|
30
|
-
"@unlock-protocol/networks": "^0.0.
|
|
31
|
-
"@unlock-protocol/paywall": "^0.8
|
|
28
|
+
"@rollup/plugin-terser": "^0.4.0",
|
|
29
|
+
"@unlock-protocol/contracts": "^0.0.22",
|
|
30
|
+
"@unlock-protocol/networks": "^0.0.20",
|
|
31
|
+
"@unlock-protocol/paywall": "^0.6.8",
|
|
32
32
|
"axios": "^1.3.4",
|
|
33
33
|
"browserify-zlib": "^0.2.0",
|
|
34
34
|
"core-js": "^3.8.3",
|
|
35
35
|
"enzyme": "^3.11.0",
|
|
36
36
|
"enzyme-adapter-preact-pure": "^4.1.0",
|
|
37
|
-
"ethers": "^
|
|
37
|
+
"ethers": "^5.7.0",
|
|
38
38
|
"events": "^3.3.0",
|
|
39
39
|
"gulp-postcss": "^9.0.0",
|
|
40
40
|
"json-server": "^0.17.2",
|
|
@@ -54,14 +54,27 @@
|
|
|
54
54
|
"tus-js-client": "^2.3.0",
|
|
55
55
|
"tus-node-server": "^0.9.0",
|
|
56
56
|
"util": "^0.12.5",
|
|
57
|
-
"viem": "^2.23.10",
|
|
58
57
|
"vite": "^4.3.2",
|
|
59
58
|
"vite-plugin-dts": "^3.8.1",
|
|
60
59
|
"vite-plugin-node-polyfills": "^0.21.0",
|
|
61
|
-
"wagmi": "^
|
|
60
|
+
"wagmi": "^0.12.0",
|
|
62
61
|
"web3modal": "^1.4.0"
|
|
63
62
|
},
|
|
64
63
|
"devDependencies": {
|
|
64
|
+
"@babel/core": "^7.12.10",
|
|
65
|
+
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
66
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
|
67
|
+
"@babel/preset-env": "^7.12.11",
|
|
68
|
+
"@babel/preset-react": "^7.12.10",
|
|
69
|
+
"@babel/preset-typescript": "^7.12.7",
|
|
70
|
+
"@rollup/plugin-alias": "^4.0.3",
|
|
71
|
+
"@rollup/plugin-babel": "^6.0.3",
|
|
72
|
+
"@rollup/plugin-commonjs": "^24.0.1",
|
|
73
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
74
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
75
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
76
|
+
"@rollup/plugin-strip": "^3.0.2",
|
|
77
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
65
78
|
"@types/enzyme": "^3.10.8",
|
|
66
79
|
"@types/jest": "^26.0.20",
|
|
67
80
|
"@types/preact-custom-element": "^4.0.0",
|
|
@@ -71,6 +84,7 @@
|
|
|
71
84
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
|
72
85
|
"@typescript-eslint/parser": "^5.54.0",
|
|
73
86
|
"autoprefixer": "^10.4.13",
|
|
87
|
+
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
|
|
74
88
|
"browser-sync": "^2.26.14",
|
|
75
89
|
"buffer": "^6.0.3",
|
|
76
90
|
"del": "^6.0.0",
|
|
@@ -83,12 +97,19 @@
|
|
|
83
97
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
84
98
|
"eslint-plugin-react": "^7.22.0",
|
|
85
99
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
100
|
+
"gulp": "^4.0.2",
|
|
101
|
+
"gulp-terser": "^2.0.1",
|
|
86
102
|
"jest": "^29.4.3",
|
|
87
103
|
"postcss": "^8.3.5",
|
|
88
104
|
"prettier": "^2.2.1",
|
|
89
105
|
"process": "^0.11.10",
|
|
106
|
+
"rollup": "^3.18.0",
|
|
107
|
+
"rollup-plugin-filesize": "^9.1.0",
|
|
108
|
+
"rollup-plugin-postcss": "^4.0.0",
|
|
109
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
110
|
+
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
90
111
|
"tslib": "^2.6.2",
|
|
91
|
-
"typescript": "^
|
|
112
|
+
"typescript": "^4.7.2"
|
|
92
113
|
},
|
|
93
114
|
"proxy": "http://localhost:2080",
|
|
94
115
|
"browserslist": "> 0.25%, not dead"
|
package/dist/ccip-8362f12e.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { i as h, I as m, B as p, g as w, s as g, d as E, c as O, a as b, e as x, H as y, b as M } from "./index-7f442143.js";
|
|
2
|
-
function R(r, a) {
|
|
3
|
-
if (!h(r, { strict: !1 }))
|
|
4
|
-
throw new m({ address: r });
|
|
5
|
-
if (!h(a, { strict: !1 }))
|
|
6
|
-
throw new m({ address: a });
|
|
7
|
-
return r.toLowerCase() === a.toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
class S extends p {
|
|
10
|
-
constructor({ callbackSelector: a, cause: t, data: n, extraData: i, sender: d, urls: s }) {
|
|
11
|
-
var c;
|
|
12
|
-
super(t.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
13
|
-
cause: t,
|
|
14
|
-
metaMessages: [
|
|
15
|
-
...t.metaMessages || [],
|
|
16
|
-
(c = t.metaMessages) != null && c.length ? "" : [],
|
|
17
|
-
"Offchain Gateway Call:",
|
|
18
|
-
s && [
|
|
19
|
-
" Gateway URL(s):",
|
|
20
|
-
...s.map((f) => ` ${w(f)}`)
|
|
21
|
-
],
|
|
22
|
-
` Sender: ${d}`,
|
|
23
|
-
` Data: ${n}`,
|
|
24
|
-
` Callback selector: ${a}`,
|
|
25
|
-
` Extra data: ${i}`
|
|
26
|
-
].flat(),
|
|
27
|
-
name: "OffchainLookupError"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
class $ extends p {
|
|
32
|
-
constructor({ result: a, url: t }) {
|
|
33
|
-
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
34
|
-
metaMessages: [
|
|
35
|
-
`Gateway URL: ${w(t)}`,
|
|
36
|
-
`Response: ${g(a)}`
|
|
37
|
-
],
|
|
38
|
-
name: "OffchainLookupResponseMalformedError"
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
class A extends p {
|
|
43
|
-
constructor({ sender: a, to: t }) {
|
|
44
|
-
super("Reverted sender address does not match target contract address (`to`).", {
|
|
45
|
-
metaMessages: [
|
|
46
|
-
`Contract address: ${t}`,
|
|
47
|
-
`OffchainLookup sender address: ${a}`
|
|
48
|
-
],
|
|
49
|
-
name: "OffchainLookupSenderMismatchError"
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const D = "0x556f1830", C = {
|
|
54
|
-
name: "OffchainLookup",
|
|
55
|
-
type: "error",
|
|
56
|
-
inputs: [
|
|
57
|
-
{
|
|
58
|
-
name: "sender",
|
|
59
|
-
type: "address"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: "urls",
|
|
63
|
-
type: "string[]"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "callData",
|
|
67
|
-
type: "bytes"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: "callbackFunction",
|
|
71
|
-
type: "bytes4"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: "extraData",
|
|
75
|
-
type: "bytes"
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
};
|
|
79
|
-
async function G(r, { blockNumber: a, blockTag: t, data: n, to: i }) {
|
|
80
|
-
const { args: d } = E({
|
|
81
|
-
data: n,
|
|
82
|
-
abi: [C]
|
|
83
|
-
}), [s, c, f, u, o] = d, { ccipRead: e } = r, k = e && typeof (e == null ? void 0 : e.request) == "function" ? e.request : T;
|
|
84
|
-
try {
|
|
85
|
-
if (!R(i, s))
|
|
86
|
-
throw new A({ sender: s, to: i });
|
|
87
|
-
const l = await k({ data: f, sender: s, urls: c }), { data: L } = await O(r, {
|
|
88
|
-
blockNumber: a,
|
|
89
|
-
blockTag: t,
|
|
90
|
-
data: b([
|
|
91
|
-
u,
|
|
92
|
-
x([{ type: "bytes" }, { type: "bytes" }], [l, o])
|
|
93
|
-
]),
|
|
94
|
-
to: i
|
|
95
|
-
});
|
|
96
|
-
return L;
|
|
97
|
-
} catch (l) {
|
|
98
|
-
throw new S({
|
|
99
|
-
callbackSelector: u,
|
|
100
|
-
cause: l,
|
|
101
|
-
data: n,
|
|
102
|
-
extraData: o,
|
|
103
|
-
sender: s,
|
|
104
|
-
urls: c
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
async function T({ data: r, sender: a, urls: t }) {
|
|
109
|
-
var i;
|
|
110
|
-
let n = new Error("An unknown error occurred.");
|
|
111
|
-
for (let d = 0; d < t.length; d++) {
|
|
112
|
-
const s = t[d], c = s.includes("{data}") ? "GET" : "POST", f = c === "POST" ? { data: r, sender: a } : void 0, u = c === "POST" ? { "Content-Type": "application/json" } : {};
|
|
113
|
-
try {
|
|
114
|
-
const o = await fetch(s.replace("{sender}", a).replace("{data}", r), {
|
|
115
|
-
body: JSON.stringify(f),
|
|
116
|
-
headers: u,
|
|
117
|
-
method: c
|
|
118
|
-
});
|
|
119
|
-
let e;
|
|
120
|
-
if ((i = o.headers.get("Content-Type")) != null && i.startsWith("application/json") ? e = (await o.json()).data : e = await o.text(), !o.ok) {
|
|
121
|
-
n = new y({
|
|
122
|
-
body: f,
|
|
123
|
-
details: e != null && e.error ? g(e.error) : o.statusText,
|
|
124
|
-
headers: o.headers,
|
|
125
|
-
status: o.status,
|
|
126
|
-
url: s
|
|
127
|
-
});
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
if (!M(e)) {
|
|
131
|
-
n = new $({
|
|
132
|
-
result: e,
|
|
133
|
-
url: s
|
|
134
|
-
});
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
return e;
|
|
138
|
-
} catch (o) {
|
|
139
|
-
n = new y({
|
|
140
|
-
body: f,
|
|
141
|
-
details: o.message,
|
|
142
|
-
url: s
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
throw n;
|
|
147
|
-
}
|
|
148
|
-
export {
|
|
149
|
-
T as ccipRequest,
|
|
150
|
-
G as offchainLookup,
|
|
151
|
-
C as offchainLookupAbiItem,
|
|
152
|
-
D as offchainLookupSignature
|
|
153
|
-
};
|
package/dist/ccip-df5cf9c8.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-4c433761.cjs");function g(o,r){if(!e.isAddress(o,{strict:!1}))throw new e.InvalidAddressError({address:o});if(!e.isAddress(r,{strict:!1}))throw new e.InvalidAddressError({address:r});return o.toLowerCase()===r.toLowerCase()}class k extends e.BaseError{constructor({callbackSelector:r,cause:a,data:c,extraData:d,sender:f,urls:s}){var i;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(i=a.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(u=>` ${e.getUrl(u)}`)],` Sender: ${f}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${d}`].flat(),name:"OffchainLookupError"})}}class E extends e.BaseError{constructor({result:r,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(a)}`,`Response: ${e.stringify(r)}`],name:"OffchainLookupResponseMalformedError"})}}class L extends e.BaseError{constructor({sender:r,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const b="0x556f1830",h={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function O(o,{blockNumber:r,blockTag:a,data:c,to:d}){const{args:f}=e.decodeErrorResult({data:c,abi:[h]}),[s,i,u,l,n]=f,{ccipRead:t}=o,m=t&&typeof(t==null?void 0:t.request)=="function"?t.request:y;try{if(!g(d,s))throw new L({sender:s,to:d});const p=await m({data:u,sender:s,urls:i}),{data:w}=await e.call(o,{blockNumber:r,blockTag:a,data:e.concat([l,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,n])]),to:d});return w}catch(p){throw new k({callbackSelector:l,cause:p,data:c,extraData:n,sender:s,urls:i})}}async function y({data:o,sender:r,urls:a}){var d;let c=new Error("An unknown error occurred.");for(let f=0;f<a.length;f++){const s=a[f],i=s.includes("{data}")?"GET":"POST",u=i==="POST"?{data:o,sender:r}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const n=await fetch(s.replace("{sender}",r).replace("{data}",o),{body:JSON.stringify(u),headers:l,method:i});let t;if((d=n.headers.get("Content-Type"))!=null&&d.startsWith("application/json")?t=(await n.json()).data:t=await n.text(),!n.ok){c=new e.HttpRequestError({body:u,details:t!=null&&t.error?e.stringify(t.error):n.statusText,headers:n.headers,status:n.status,url:s});continue}if(!e.isHex(t)){c=new E({result:t,url:s});continue}return t}catch(n){c=new e.HttpRequestError({body:u,details:n.message,url:s})}}throw c}exports.ccipRequest=y;exports.offchainLookup=O;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=b;
|