@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.
@@ -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,4CA6NpB,CAAC;AAEF,cAAc,SAAS,CAAC"}
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,4CA2OnB,CAAC;AAEF,cAAc,SAAS,CAAC"}
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;AAOhD,eAAO,MAAM,gBAAgB,GAAI,waAmC9B,qBAAqB,4CA6gBvB,CAAC;AAEF,cAAc,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,4CA8ItB,CAAC;AAEF,cAAc,SAAS,CAAC"}
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,4CAqLjB,CAAC;AAEF,cAAc,SAAS,CAAC"}
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;AAGhF,UAAU,oBAAoB;IAC5B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA0BD,eAAO,MAAM,eAAe,GAAI,qCAAqC,oBAAoB,mDAmExF,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":"AAQA,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,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,GAAI,kEAO7B,oBAAoB,4CAgLtB,CAAC"}
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;AAMjD,eAAO,MAAM,iBAAiB,GAAI,kTAyB/B,sBAAsB,4CAsyBxB,CAAC;AAEF,cAAc,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"}