@jaw.id/ui 0.4.2 → 0.4.5
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/ccip-BzdqKpq_.js +137 -0
- package/dist/components/ConnectDialog/index.d.ts.map +1 -1
- package/dist/components/Eip712Dialog/index.d.ts.map +1 -1
- package/dist/components/IdentityAvatar.d.ts +10 -0
- package/dist/components/IdentityAvatar.d.ts.map +1 -0
- package/dist/components/PermissionDialog/index.d.ts.map +1 -1
- package/dist/components/SignatureDialog/index.d.ts.map +1 -1
- package/dist/components/SiweDialog/index.d.ts.map +1 -1
- package/dist/components/TransactionDialog/ClearSignedView.d.ts.map +1 -1
- package/dist/components/TransactionDialog/DecodedCalldata.d.ts +2 -1
- package/dist/components/TransactionDialog/DecodedCalldata.d.ts.map +1 -1
- package/dist/components/TransactionDialog/index.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +61838 -61
- package/dist/localBatchGatewayRequest-5ZaE1WvO.js +4438 -0
- package/dist/secp256k1-BG0i42zW.js +2 -0
- package/dist/secp256k1-BJ-4rw4A.js +1187 -0
- package/dist/smartAccount-CPTH7CrY.js +13904 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/reverseResolve.d.ts +13 -0
- package/dist/utils/reverseResolve.d.ts.map +1 -0
- package/dist/utils-so0pTN_S.js +269 -0
- package/package.json +2 -2
- package/dist/ccip-DrLXsCxz.js +0 -147
- package/dist/index-DN4LuV_Z.js +0 -85432
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Ft as e, Qn as t, Ut as n, X as r, Xn as i, dn as a, gn as o, i as s, nn as c, rn as l, t as u } from "./localBatchGatewayRequest-5ZaE1WvO.js";
|
|
2
|
+
//#region ../../node_modules/viem/_esm/errors/ccip.js
|
|
3
|
+
var d = class extends i {
|
|
4
|
+
constructor({ callbackSelector: e, cause: t, data: r, extraData: i, sender: a, urls: o }) {
|
|
5
|
+
super(t.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
6
|
+
cause: t,
|
|
7
|
+
metaMessages: [
|
|
8
|
+
...t.metaMessages || [],
|
|
9
|
+
t.metaMessages?.length ? "" : [],
|
|
10
|
+
"Offchain Gateway Call:",
|
|
11
|
+
o && [" Gateway URL(s):", ...o.map((e) => ` ${n(e)}`)],
|
|
12
|
+
` Sender: ${a}`,
|
|
13
|
+
` Data: ${r}`,
|
|
14
|
+
` Callback selector: ${e}`,
|
|
15
|
+
` Extra data: ${i}`
|
|
16
|
+
].flat(),
|
|
17
|
+
name: "OffchainLookupError"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}, f = class extends i {
|
|
21
|
+
constructor({ result: e, url: t }) {
|
|
22
|
+
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
23
|
+
metaMessages: [`Gateway URL: ${n(t)}`, `Response: ${c(e)}`],
|
|
24
|
+
name: "OffchainLookupResponseMalformedError"
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}, p = class extends i {
|
|
28
|
+
constructor({ sender: e, to: t }) {
|
|
29
|
+
super("Reverted sender address does not match target contract address (`to`).", {
|
|
30
|
+
metaMessages: [`Contract address: ${t}`, `OffchainLookup sender address: ${e}`],
|
|
31
|
+
name: "OffchainLookupSenderMismatchError"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}, m = "0x556f1830", h = {
|
|
35
|
+
name: "OffchainLookup",
|
|
36
|
+
type: "error",
|
|
37
|
+
inputs: [
|
|
38
|
+
{
|
|
39
|
+
name: "sender",
|
|
40
|
+
type: "address"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "urls",
|
|
44
|
+
type: "string[]"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "callData",
|
|
48
|
+
type: "bytes"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "callbackFunction",
|
|
52
|
+
type: "bytes4"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "extraData",
|
|
56
|
+
type: "bytes"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
};
|
|
60
|
+
async function g(e, { blockNumber: t, blockTag: n, data: i, to: c }) {
|
|
61
|
+
let { args: f } = l({
|
|
62
|
+
data: i,
|
|
63
|
+
abi: [h]
|
|
64
|
+
}), [m, g, v, y, b] = f, { ccipRead: x } = e, S = x && typeof x?.request == "function" ? x.request : _;
|
|
65
|
+
try {
|
|
66
|
+
if (!r(c, m)) throw new p({
|
|
67
|
+
sender: m,
|
|
68
|
+
to: c
|
|
69
|
+
});
|
|
70
|
+
let { data: i } = await s(e, {
|
|
71
|
+
blockNumber: t,
|
|
72
|
+
blockTag: n,
|
|
73
|
+
data: o([y, a([{ type: "bytes" }, { type: "bytes" }], [g.includes("x-batch-gateway:true") ? await u({
|
|
74
|
+
data: v,
|
|
75
|
+
ccipRequest: S
|
|
76
|
+
}) : await S({
|
|
77
|
+
data: v,
|
|
78
|
+
sender: m,
|
|
79
|
+
urls: g
|
|
80
|
+
}), b])]),
|
|
81
|
+
to: c
|
|
82
|
+
});
|
|
83
|
+
return i;
|
|
84
|
+
} catch (e) {
|
|
85
|
+
throw new d({
|
|
86
|
+
callbackSelector: y,
|
|
87
|
+
cause: e,
|
|
88
|
+
data: i,
|
|
89
|
+
extraData: b,
|
|
90
|
+
sender: m,
|
|
91
|
+
urls: g
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async function _({ data: n, sender: r, urls: i }) {
|
|
96
|
+
let a = /* @__PURE__ */ Error("An unknown error occurred.");
|
|
97
|
+
for (let o = 0; o < i.length; o++) {
|
|
98
|
+
let s = i[o], l = s.includes("{data}") ? "GET" : "POST", u = l === "POST" ? {
|
|
99
|
+
data: n,
|
|
100
|
+
sender: r
|
|
101
|
+
} : void 0, d = l === "POST" ? { "Content-Type": "application/json" } : {};
|
|
102
|
+
try {
|
|
103
|
+
let i = await fetch(s.replace("{sender}", r.toLowerCase()).replace("{data}", n), {
|
|
104
|
+
body: JSON.stringify(u),
|
|
105
|
+
headers: d,
|
|
106
|
+
method: l
|
|
107
|
+
}), o;
|
|
108
|
+
if (o = i.headers.get("Content-Type")?.startsWith("application/json") ? (await i.json()).data : await i.text(), !i.ok) {
|
|
109
|
+
a = new e({
|
|
110
|
+
body: u,
|
|
111
|
+
details: o?.error ? c(o.error) : i.statusText,
|
|
112
|
+
headers: i.headers,
|
|
113
|
+
status: i.status,
|
|
114
|
+
url: s
|
|
115
|
+
});
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (!t(o)) {
|
|
119
|
+
a = new f({
|
|
120
|
+
result: o,
|
|
121
|
+
url: s
|
|
122
|
+
});
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
return o;
|
|
126
|
+
} catch (t) {
|
|
127
|
+
a = new e({
|
|
128
|
+
body: u,
|
|
129
|
+
details: t.message,
|
|
130
|
+
url: s
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
throw a;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
export { g as offchainLookup, m as offchainLookupSignature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectDialog/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,eAAO,MAAM,aAAa,GAAI,+LAiB3B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConnectDialog/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,eAAO,MAAM,aAAa,GAAI,+LAiB3B,kBAAkB,4CAyNpB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Eip712Dialog/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA0P5C,eAAO,MAAM,YAAY,GAAI,mLAgB1B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Eip712Dialog/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA0P5C,eAAO,MAAM,YAAY,GAAI,mLAgB1B,iBAAiB,4CAuOnB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface IdentityAvatarProps {
|
|
3
|
+
src?: string;
|
|
4
|
+
/** Defaults to the wallet icon; pass `null` to render nothing when there's no avatar. */
|
|
5
|
+
fallback?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** ENS avatar for a resolved identity; falls back to `fallback` when there's no avatar or the image fails to load. */
|
|
8
|
+
export declare const IdentityAvatar: ({ src, fallback }: IdentityAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=IdentityAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityAvatar.d.ts","sourceRoot":"","sources":["../../src/components/IdentityAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAID,sHAAsH;AACtH,eAAO,MAAM,cAAc,GAAI,mBAAqC,mBAAmB,4CAatF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PermissionDialog/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PermissionDialog/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAQhD,eAAO,MAAM,gBAAgB,GAAI,waAmC9B,qBAAqB,4CAmhBvB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SignatureDialog/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,eAAe,GAAI,6KAgB7B,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SignatureDialog/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,eAAe,GAAI,6KAgB7B,oBAAoB,4CA0ItB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SiweDialog/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,UAAU,GAAI,qMAkBxB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SiweDialog/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,UAAU,GAAI,qMAkBxB,eAAe,4CAiLjB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearSignedView.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/ClearSignedView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAc,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ClearSignedView.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/ClearSignedView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAc,MAAM,0BAA0B,CAAC;AAIhF,UAAU,oBAAoB;IAC5B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAqCD,eAAO,MAAM,eAAe,GAAI,qCAAqC,oBAAoB,mDAuFxF,CAAC"}
|
|
@@ -4,8 +4,9 @@ interface DecodedCalldataProps {
|
|
|
4
4
|
chainId: number;
|
|
5
5
|
apiKey?: string;
|
|
6
6
|
resolvedAddresses?: Record<string, string>;
|
|
7
|
+
resolvedAvatars?: Record<string, string>;
|
|
7
8
|
mainnetRpcUrl?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const DecodedCalldata: ({ to, data, chainId, apiKey, resolvedAddresses, mainnetRpcUrl, }: DecodedCalldataProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const DecodedCalldata: ({ to, data, chainId, apiKey, resolvedAddresses, resolvedAvatars, mainnetRpcUrl, }: DecodedCalldataProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=DecodedCalldata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecodedCalldata.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/DecodedCalldata.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DecodedCalldata.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/DecodedCalldata.tsx"],"names":[],"mappings":"AAoBA,UAAU,oBAAoB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,GAAI,mFAQ7B,oBAAoB,4CAqLtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAOjD,eAAO,MAAM,iBAAiB,GAAI,kTAyB/B,sBAAsB,4CAgyBxB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|