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.
Files changed (69) hide show
  1. package/dist/{ccip-Cfv7uEgy.js → ccip-D3gTQONK.js} +12 -12
  2. package/dist/chains.d.ts +0 -1
  3. package/dist/chains.d.ts.map +1 -1
  4. package/dist/{index-Dx-aFA8r.js → index-CnUM7lKf.js} +19882 -19704
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +138 -130
  8. package/dist/widget/components/AccountActionsDropdown.d.ts.map +1 -1
  9. package/dist/widget/components/ChainFilterDropdown.d.ts.map +1 -1
  10. package/dist/widget/components/ChainImage.d.ts.map +1 -1
  11. package/dist/widget/components/ChainList.d.ts.map +1 -1
  12. package/dist/widget/components/ConfigDisplay.d.ts.map +1 -1
  13. package/dist/widget/components/ConnectWallet.d.ts.map +1 -1
  14. package/dist/widget/components/DebugMenu.d.ts +7 -0
  15. package/dist/widget/components/DebugMenu.d.ts.map +1 -0
  16. package/dist/widget/components/DebugScreensList.d.ts +7 -0
  17. package/dist/widget/components/DebugScreensList.d.ts.map +1 -0
  18. package/dist/widget/components/Earn.d.ts.map +1 -1
  19. package/dist/widget/components/EarnPools.d.ts.map +1 -1
  20. package/dist/widget/components/Footer.d.ts.map +1 -1
  21. package/dist/widget/components/FundMethods.d.ts.map +1 -1
  22. package/dist/widget/components/FundSendForm.d.ts.map +1 -1
  23. package/dist/widget/components/PaySendForm.d.ts.map +1 -1
  24. package/dist/widget/components/ScreenHeader.d.ts +1 -0
  25. package/dist/widget/components/ScreenHeader.d.ts.map +1 -1
  26. package/dist/widget/components/SearchInputField.d.ts +12 -0
  27. package/dist/widget/components/SearchInputField.d.ts.map +1 -0
  28. package/dist/widget/components/SimpleSwap.d.ts.map +1 -1
  29. package/dist/widget/components/Swap.d.ts.map +1 -1
  30. package/dist/widget/components/TokenList.d.ts.map +1 -1
  31. package/dist/widget/components/TokenSelector.d.ts.map +1 -1
  32. package/dist/widget/components/WalletList.d.ts.map +1 -1
  33. package/dist/widget/hooks/useDebugScreens.d.ts +1 -1
  34. package/dist/widget/hooks/useDebugScreens.d.ts.map +1 -1
  35. package/dist/widget/index.js +1 -1
  36. package/dist/widget/widget.d.ts +1 -0
  37. package/dist/widget/widget.d.ts.map +1 -1
  38. package/package.json +1 -1
  39. package/src/chains.ts +21 -17
  40. package/src/index.ts +8 -0
  41. package/src/widget/compiled.css +1 -1
  42. package/src/widget/components/AccountActionsDropdown.tsx +29 -7
  43. package/src/widget/components/ChainFilterDropdown.tsx +1 -0
  44. package/src/widget/components/ChainImage.tsx +7 -3
  45. package/src/widget/components/ChainList.tsx +11 -27
  46. package/src/widget/components/ConfigDisplay.tsx +43 -7
  47. package/src/widget/components/ConnectWallet.tsx +119 -89
  48. package/src/widget/components/DebugMenu.tsx +47 -0
  49. package/src/widget/components/DebugScreensList.tsx +67 -0
  50. package/src/widget/components/Earn.tsx +282 -224
  51. package/src/widget/components/EarnPools.tsx +23 -38
  52. package/src/widget/components/EarnPoolsFilters.tsx +7 -7
  53. package/src/widget/components/Footer.tsx +3 -2
  54. package/src/widget/components/FundMethods.tsx +1 -0
  55. package/src/widget/components/FundSendForm.tsx +1 -0
  56. package/src/widget/components/PaySendForm.tsx +1 -0
  57. package/src/widget/components/ScreenHeader.tsx +6 -4
  58. package/src/widget/components/SearchInputField.tsx +53 -0
  59. package/src/widget/components/SimpleSwap.tsx +109 -57
  60. package/src/widget/components/Swap.tsx +19 -3
  61. package/src/widget/components/TokenImage.tsx +1 -1
  62. package/src/widget/components/TokenList.tsx +1 -0
  63. package/src/widget/components/TokenSelector.tsx +13 -28
  64. package/src/widget/components/WalletList.tsx +1 -0
  65. package/src/widget/hooks/useDebugScreens.ts +5 -0
  66. package/src/widget/widget.tsx +8 -2
  67. package/dist/widget/components/DebugScreensDropdown.d.ts +0 -7
  68. package/dist/widget/components/DebugScreensDropdown.d.ts.map +0 -1
  69. package/src/widget/components/DebugScreensDropdown.tsx +0 -95
@@ -1,6 +1,6 @@
1
- import { a4 as b, a5 as O, a6 as x, a7 as S, a8 as $, a9 as F, aa as E, ab as D, ac as w, ad as G, ae as R, af as I, ag as T, ah as y, ai as L, aj as M, ak as m, al as C, am as H, an as j, ao as v, ap as U, aq as k, ar as B } from "./index-Dx-aFA8r.js";
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(x(n)));
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 = x(t), o = O(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 J(a) {
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 W extends y {
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 z extends y {
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
- })), J({
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 } = H({
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 (!j(t, o))
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 v(a, {
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 W({
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 z({
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>;
@@ -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;AAMD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAiBlD,CAAA;AAED,eAAO,MAAM,SAAS,GACpB,SAAS,MAAM,EACf,2BAA0B,MAAsC,KAC/D,MAAM,GAAG,IAKX,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,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,KAAK,GAAG,IAAI,CAuBd;AAGD,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,KAAK,GAAG,MAAM,GAC3B,KAAK,GAAG,IAAI,CAQd;AAED,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAEnE;AAED,wBAAsB,iCAAiC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAE1E;AA0BD,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAOlE;AAED,wBAAsB,kBAAkB,CAAC,EACvC,aAAa,GACd,GAAE;IACD,aAAa,CAAC,EAAE,aAAa,GAA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