0xtrails 0.1.12 → 0.1.13
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-Cfv7uEgy.js → ccip-D3gTQONK.js} +12 -12
- package/dist/chains.d.ts +0 -1
- package/dist/chains.d.ts.map +1 -1
- package/dist/{index-Dx-aFA8r.js → index-CnUM7lKf.js} +19882 -19704
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +138 -130
- package/dist/widget/components/AccountActionsDropdown.d.ts.map +1 -1
- package/dist/widget/components/ChainFilterDropdown.d.ts.map +1 -1
- package/dist/widget/components/ChainImage.d.ts.map +1 -1
- package/dist/widget/components/ChainList.d.ts.map +1 -1
- package/dist/widget/components/ConfigDisplay.d.ts.map +1 -1
- package/dist/widget/components/ConnectWallet.d.ts.map +1 -1
- package/dist/widget/components/DebugMenu.d.ts +7 -0
- package/dist/widget/components/DebugMenu.d.ts.map +1 -0
- package/dist/widget/components/DebugScreensList.d.ts +7 -0
- package/dist/widget/components/DebugScreensList.d.ts.map +1 -0
- package/dist/widget/components/Earn.d.ts.map +1 -1
- package/dist/widget/components/EarnPools.d.ts.map +1 -1
- package/dist/widget/components/Footer.d.ts.map +1 -1
- package/dist/widget/components/FundMethods.d.ts.map +1 -1
- package/dist/widget/components/FundSendForm.d.ts.map +1 -1
- package/dist/widget/components/PaySendForm.d.ts.map +1 -1
- package/dist/widget/components/ScreenHeader.d.ts +1 -0
- package/dist/widget/components/ScreenHeader.d.ts.map +1 -1
- package/dist/widget/components/SearchInputField.d.ts +12 -0
- package/dist/widget/components/SearchInputField.d.ts.map +1 -0
- package/dist/widget/components/SimpleSwap.d.ts.map +1 -1
- package/dist/widget/components/Swap.d.ts.map +1 -1
- package/dist/widget/components/TokenList.d.ts.map +1 -1
- package/dist/widget/components/TokenSelector.d.ts.map +1 -1
- package/dist/widget/components/WalletList.d.ts.map +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts.map +1 -1
- package/dist/widget/index.js +1 -1
- package/dist/widget/widget.d.ts +1 -0
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/chains.ts +21 -17
- package/src/index.ts +8 -0
- package/src/widget/compiled.css +1 -1
- package/src/widget/components/AccountActionsDropdown.tsx +29 -7
- package/src/widget/components/ChainFilterDropdown.tsx +1 -0
- package/src/widget/components/ChainImage.tsx +7 -3
- package/src/widget/components/ChainList.tsx +11 -27
- package/src/widget/components/ConfigDisplay.tsx +43 -7
- package/src/widget/components/ConnectWallet.tsx +119 -89
- package/src/widget/components/DebugMenu.tsx +47 -0
- package/src/widget/components/DebugScreensList.tsx +67 -0
- package/src/widget/components/Earn.tsx +282 -224
- package/src/widget/components/EarnPools.tsx +23 -38
- package/src/widget/components/EarnPoolsFilters.tsx +7 -7
- package/src/widget/components/Footer.tsx +3 -2
- package/src/widget/components/FundMethods.tsx +1 -0
- package/src/widget/components/FundSendForm.tsx +1 -0
- package/src/widget/components/PaySendForm.tsx +1 -0
- package/src/widget/components/ScreenHeader.tsx +6 -4
- package/src/widget/components/SearchInputField.tsx +53 -0
- package/src/widget/components/SimpleSwap.tsx +109 -57
- package/src/widget/components/Swap.tsx +19 -3
- package/src/widget/components/TokenImage.tsx +1 -1
- package/src/widget/components/TokenList.tsx +1 -0
- package/src/widget/components/TokenSelector.tsx +13 -28
- package/src/widget/components/WalletList.tsx +1 -0
- package/src/widget/hooks/useDebugScreens.ts +5 -0
- package/src/widget/widget.tsx +8 -2
- package/dist/widget/components/DebugScreensDropdown.d.ts +0 -7
- package/dist/widget/components/DebugScreensDropdown.d.ts.map +0 -1
- package/src/widget/components/DebugScreensDropdown.tsx +0 -95
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ac as b, ad as x, ae as O, af as S, ag as $, ah as F, ai as E, aj as D, ak as w, al as G, am as R, an as I, ao as T, ap as y, aq as L, ar as M, as as m, at as C, au as v, av as H, aw as j, ax as U, ay as k, az as B } from "./index-CnUM7lKf.js";
|
|
2
2
|
function _(a) {
|
|
3
|
-
const { abi: r, data: e } = a, s = b(e, 0, 4), t = r.find((n) => n.type === "function" && s === O(
|
|
3
|
+
const { abi: r, data: e } = a, s = b(e, 0, 4), t = r.find((n) => n.type === "function" && s === x(O(n)));
|
|
4
4
|
if (!t)
|
|
5
5
|
throw new S(s, {
|
|
6
6
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -22,7 +22,7 @@ function A(a) {
|
|
|
22
22
|
}
|
|
23
23
|
if (t.type !== "error")
|
|
24
24
|
throw new E(void 0, { docsPath: p });
|
|
25
|
-
const n =
|
|
25
|
+
const n = O(t), o = x(n);
|
|
26
26
|
let c = "0x";
|
|
27
27
|
if (s && s.length > 0) {
|
|
28
28
|
if (!t.inputs)
|
|
@@ -32,7 +32,7 @@ function A(a) {
|
|
|
32
32
|
return G([o, c]);
|
|
33
33
|
}
|
|
34
34
|
const h = "/docs/contract/encodeFunctionResult";
|
|
35
|
-
function
|
|
35
|
+
function z(a) {
|
|
36
36
|
const { abi: r, functionName: e, result: s } = a;
|
|
37
37
|
let t = r[0];
|
|
38
38
|
if (e) {
|
|
@@ -56,7 +56,7 @@ function J(a) {
|
|
|
56
56
|
})();
|
|
57
57
|
return w(t.outputs, n);
|
|
58
58
|
}
|
|
59
|
-
class
|
|
59
|
+
class J extends y {
|
|
60
60
|
constructor({ callbackSelector: r, cause: e, data: s, extraData: t, sender: n, urls: o }) {
|
|
61
61
|
super(e.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
62
62
|
cause: e,
|
|
@@ -77,7 +77,7 @@ class W extends y {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
class
|
|
80
|
+
class W extends y {
|
|
81
81
|
constructor({ result: r, url: e }) {
|
|
82
82
|
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
83
83
|
metaMessages: [
|
|
@@ -108,7 +108,7 @@ async function P(a) {
|
|
|
108
108
|
} catch (d) {
|
|
109
109
|
t[c] = !0, n[c] = Q(d);
|
|
110
110
|
}
|
|
111
|
-
})),
|
|
111
|
+
})), z({
|
|
112
112
|
abi: m,
|
|
113
113
|
functionName: "query",
|
|
114
114
|
result: [t, n]
|
|
@@ -152,17 +152,17 @@ const Z = "0x556f1830", V = {
|
|
|
152
152
|
]
|
|
153
153
|
};
|
|
154
154
|
async function tt(a, { blockNumber: r, blockTag: e, data: s, to: t }) {
|
|
155
|
-
const { args: n } =
|
|
155
|
+
const { args: n } = v({
|
|
156
156
|
data: s,
|
|
157
157
|
abi: [V]
|
|
158
158
|
}), [o, c, d, i, u] = n, { ccipRead: f } = a, g = f && typeof f?.request == "function" ? f.request : X;
|
|
159
159
|
try {
|
|
160
|
-
if (!
|
|
160
|
+
if (!H(t, o))
|
|
161
161
|
throw new K({ sender: o, to: t });
|
|
162
162
|
const l = c.includes(N) ? await P({
|
|
163
163
|
data: d,
|
|
164
164
|
ccipRequest: g
|
|
165
|
-
}) : await g({ data: d, sender: o, urls: c }), { data: q } = await
|
|
165
|
+
}) : await g({ data: d, sender: o, urls: c }), { data: q } = await j(a, {
|
|
166
166
|
blockNumber: r,
|
|
167
167
|
blockTag: e,
|
|
168
168
|
data: U([
|
|
@@ -173,7 +173,7 @@ async function tt(a, { blockNumber: r, blockTag: e, data: s, to: t }) {
|
|
|
173
173
|
});
|
|
174
174
|
return q;
|
|
175
175
|
} catch (l) {
|
|
176
|
-
throw new
|
|
176
|
+
throw new J({
|
|
177
177
|
callbackSelector: i,
|
|
178
178
|
cause: l,
|
|
179
179
|
data: s,
|
|
@@ -205,7 +205,7 @@ async function X({ data: a, sender: r, urls: e }) {
|
|
|
205
205
|
continue;
|
|
206
206
|
}
|
|
207
207
|
if (!B(u)) {
|
|
208
|
-
s = new
|
|
208
|
+
s = new W({
|
|
209
209
|
result: u,
|
|
210
210
|
url: n
|
|
211
211
|
});
|
package/dist/chains.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Chain } from 'viem';
|
|
2
2
|
import { QuoteProvider } from './intents.js';
|
|
3
3
|
export declare function getAllChains(): Chain[];
|
|
4
|
-
export declare const sequenceRpcUrls: Record<number, string>;
|
|
5
4
|
export declare const getRpcUrl: (chainId: number, sequenceProjectAccessKey?: string) => string | null;
|
|
6
5
|
export declare const supportedSequenceChains: Record<number, Chain>;
|
|
7
6
|
export declare const supportedSequenceTestnetChains: Record<number, Chain>;
|
package/dist/chains.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../src/chains.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAsCjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,wBAAgB,YAAY,IAAI,KAAK,EAAE,CAgCtC;
|
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../src/chains.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAsCjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,wBAAgB,YAAY,IAAI,KAAK,EAAE,CAgCtC;AA4BD,eAAO,MAAM,SAAS,GACpB,SAAS,MAAM,EACf,2BAA0B,MAAsC,KAC/D,MAAM,GAAG,IAMX,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAiBzD,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAchE,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAgB9D,CAAA;AAGD,wBAAgB,YAAY,CAC1B,OAAO,CAAC,EAAE,MAAM,EAChB,OA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