astra-modal-test 1.0.10 → 1.0.12
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/README.md +206 -134
- package/dist/{SwapController-DyormRqe.js → SwapController-mYFErPzx.js} +1 -1
- package/dist/{add-C1zIRxeS.js → add-CXtFvysR.js} +1 -1
- package/dist/{all-wallets-5a2U9fLw.js → all-wallets-B9fFXw5x.js} +1 -1
- package/dist/{app-store-2IKrZeLe.js → app-store-BXf1yvR8.js} +1 -1
- package/dist/{apple-DH9ESSKX.js → apple-DtcOcX1n.js} +1 -1
- package/dist/{arrow-bottom-BxAPS43J.js → arrow-bottom-BXeLKqSV.js} +1 -1
- package/dist/{arrow-bottom-circle-Cy5Gjca4.js → arrow-bottom-circle-BVUU200N.js} +1 -1
- package/dist/{arrow-left-CBX7JaHB.js → arrow-left-LguJPyNR.js} +1 -1
- package/dist/{arrow-right-G72bt1-M.js → arrow-right-D9kKZzGG.js} +1 -1
- package/dist/{arrow-top-DCkQG0Dq.js → arrow-top-C5JcaCqz.js} +1 -1
- package/dist/{bank-FNxAUs8r.js → bank-DgbCzr0A.js} +1 -1
- package/dist/{bin-B-c2CIPW.js → bin-ykHym2bC.js} +1 -1
- package/dist/{bitcoin-jk4NLDu1.js → bitcoin-B8jzy_uV.js} +1 -1
- package/dist/{browser-D6w0J78l.js → browser-Bk8u8PAA.js} +1 -1
- package/dist/{card-BLWRKU-r.js → card-DcwQMUca.js} +1 -1
- package/dist/ccip-CwJvuExU.js +239 -0
- package/dist/{checkmark-C1pTfaGr.js → checkmark-D3aEYZ8B.js} +1 -1
- package/dist/{checkmark-bold-UzogCu8g.js → checkmark-bold-5H7N-CDG.js} +1 -1
- package/dist/{chevron-bottom-w_rMAO7x.js → chevron-bottom-BA3C4MR1.js} +1 -1
- package/dist/{chevron-left-DGNJGxiP.js → chevron-left-BX18UWKM.js} +1 -1
- package/dist/{chevron-right-VFQCvCyG.js → chevron-right-DG7ovxTe.js} +1 -1
- package/dist/{chevron-top-DVhFmsKp.js → chevron-top-DHfev7lV.js} +1 -1
- package/dist/{chrome-store-BkYX3All.js → chrome-store-BSVzpGdu.js} +1 -1
- package/dist/{circle-B1A3j4eP.js → circle-SYFB9f2-.js} +1 -1
- package/dist/{clock-BKr-VHDU.js → clock-Cygqlf1g.js} +1 -1
- package/dist/{close-BEacRQ8Q.js → close-B43cuuko.js} +1 -1
- package/dist/{coinPlaceholder-0ZwtMAHl.js → coinPlaceholder-BHdR6bKb.js} +1 -1
- package/dist/{compass-pulK-BFi.js → compass-7S6b6wyA.js} +1 -1
- package/dist/{copy-MWCQE0T4.js → copy-CT53bEwd.js} +1 -1
- package/dist/{cursor-transparent-Co_5p0du.js → cursor-transparent-LmjzjsFm.js} +1 -1
- package/dist/{cursor-C2GVfUuM.js → cursor-vtqRnrF7.js} +1 -1
- package/dist/{desktop-C91EoSqM.js → desktop-Doa7TQsq.js} +1 -1
- package/dist/{disconnect-BWg1-rml.js → disconnect-C5G6Ncu_.js} +1 -1
- package/dist/{discord-Bi0Bfa_e.js → discord-DX7Cl3Ko.js} +1 -1
- package/dist/{email-U2WCRPFh.js → email-CyHWh9wL.js} +1 -1
- package/dist/{embedded-wallet-B6P0kU9A.js → embedded-wallet-BZQImi7s.js} +8 -8
- package/dist/{ethereum-BeZyayQW.js → ethereum-Bwvtk5-_.js} +1 -1
- package/dist/{etherscan-BQTsufjv.js → etherscan-CyVRICvw.js} +1 -1
- package/dist/{exclamation-triangle-JT-YKNXX.js → exclamation-triangle-BDbPL3nL.js} +1 -1
- package/dist/{extension-TnYLHoFA.js → extension-Cx3t2k-R.js} +1 -1
- package/dist/{external-link-Dhgai9sc.js → external-link-DZCYpOZI.js} +1 -1
- package/dist/{facebook-C6XFGRDw.js → facebook-BEnPrhG3.js} +1 -1
- package/dist/{farcaster-CvYbxZQq.js → farcaster-DyBPLb_k.js} +1 -1
- package/dist/{filters-DwVRjAav.js → filters-CTwxivn_.js} +1 -1
- package/dist/{github-BVZSx-z9.js → github-kzQb61pT.js} +1 -1
- package/dist/{google-NbJiQLc5.js → google-DSC-rYNu.js} +1 -1
- package/dist/{help-circle-Cum2UOMJ.js → help-circle-C5XfimVx.js} +1 -1
- package/dist/{id-kRR6YgVc.js → id-B9fQOT4E.js} +1 -1
- package/dist/{image-BWUCRAmp.js → image-1CCj36XM.js} +1 -1
- package/dist/{index-RFYbqmu0.js → index-Bjik7E9u.js} +1 -1
- package/dist/{index-DQ5AZLMt.js → index-C1fgrzi0.js} +16 -16
- package/dist/{index-BZZHE-1t.js → index-CyeGBcX0.js} +1 -1
- package/dist/{index-Dq0LIBEh.js → index-DKEMW9N8.js} +25 -25
- package/dist/{index-2vYoun4O.js → index-LucuShOc.js} +45292 -56275
- package/dist/{info-Br-SBtj3.js → info-Begf9tO0.js} +1 -1
- package/dist/{info-circle-Ew4RoR_Q.js → info-circle-Bo1H2OXh.js} +1 -1
- package/dist/{lightbulb-BRBVOE_b.js → lightbulb-C-SU_z2I.js} +1 -1
- package/dist/{mail-Dzi4AncY.js → mail-CXsYiNAT.js} +1 -1
- package/dist/{mobile-BGGxQ5be.js → mobile-C7bUjgog.js} +1 -1
- package/dist/{more-BmNaKbYJ.js → more-29BC-wmy.js} +1 -1
- package/dist/{network-placeholder-EMiMf4q1.js → network-placeholder-B-x3-6jN.js} +1 -1
- package/dist/{nftPlaceholder-CvSqy3Sd.js → nftPlaceholder-pM-Hmswq.js} +1 -1
- package/dist/nodeflow-sdk.es.js +15 -0
- package/dist/{off-DF9uz0Nc.js → off-DEa_uc7_.js} +1 -1
- package/dist/{onramp-cKzTmKku.js → onramp-ZXqyloYt.js} +10 -10
- package/dist/{play-store-CGxW4MgL.js → play-store-WgSEpEI1.js} +1 -1
- package/dist/{plus-CQ6wWkN0.js → plus-u4UZhYAg.js} +1 -1
- package/dist/{qr-code-VBqx9nAF.js → qr-code-DxZGxoPE.js} +1 -1
- package/dist/{receive-CVzkHmKR.js → receive-Ct_mQWzk.js} +1 -1
- package/dist/{recycle-horizontal-Oq1YtvUx.js → recycle-horizontal-BWVpmHJc.js} +1 -1
- package/dist/{refresh-BDlGAzmY.js → refresh-gi4TfgEU.js} +1 -1
- package/dist/{reown-logo-BlIpXIlG.js → reown-logo-Bg731n4w.js} +1 -1
- package/dist/{search-DfmCmp0m.js → search-BQv7DVJG.js} +1 -1
- package/dist/{send-BXudz514.js → send-BzmnFT2p.js} +1 -1
- package/dist/{send-Cz0L5LmE.js → send-CyxKtrQ9.js} +17 -17
- package/dist/{socials-CDOh8MRf.js → socials-vziOn4zi.js} +5 -5
- package/dist/{solana-CbiyOE-8.js → solana-Dz48awbr.js} +1 -1
- package/dist/{swapHorizontal-DyU1TH_e.js → swapHorizontal-Cwe1PoMp.js} +1 -1
- package/dist/{swapHorizontalBold-CGXW7Ocj.js → swapHorizontalBold-Dxu58sRG.js} +1 -1
- package/dist/{swapHorizontalMedium-2KTcj67d.js → swapHorizontalMedium-DOZZthlB.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-TxFtmmda.js → swapHorizontalRoundedBold-BkIZQXnD.js} +1 -1
- package/dist/{swapVertical-BKD6lxM3.js → swapVertical-LSq66ctC.js} +1 -1
- package/dist/{swaps-BuGsEQaI.js → swaps-C2EO6dQA.js} +9 -9
- package/dist/{telegram-CAsl9DeG.js → telegram-ITq9s69Y.js} +1 -1
- package/dist/{three-dots-BoE2aHZi.js → three-dots-JH3A1TFR.js} +1 -1
- package/dist/{transactions-C1NtsnD6.js → transactions-DpMVZVap.js} +1 -1
- package/dist/{twitch-CvkZZxgT.js → twitch-BKs5FlDf.js} +1 -1
- package/dist/{twitterIcon-CrhnOl_O.js → twitterIcon-CCXEj_Nv.js} +1 -1
- package/dist/{ui-BJcuThPA.js → ui-D5ULRvGt.js} +6 -6
- package/dist/{user-BZRWUXG7.js → user-CBgAUjZv.js} +1 -1
- package/dist/{verify-y9F4DcJ4.js → verify-BPlPPkhG.js} +1 -1
- package/dist/{verify-filled-X_8-BhMk.js → verify-filled-qTRg0OWM.js} +1 -1
- package/dist/{w3m-modal-BX--v1Nc.js → w3m-modal-DSdDfy32.js} +27 -27
- package/dist/{wallet-CIaVVkjQ.js → wallet-BuDEi_8z.js} +1 -1
- package/dist/{wallet-placeholder-Cq1ofde1.js → wallet-placeholder-D4DKTuB_.js} +1 -1
- package/dist/{walletconnect-CINzSCJ3.js → walletconnect-Dt3q5XFc.js} +1 -1
- package/dist/{warning-circle-BvBNhMKH.js → warning-circle-B8Fkc0_4.js} +1 -1
- package/dist/{x-xHY7JehW.js → x-Cm_V3zUI.js} +1 -1
- package/dist/{x-mark-DEmnBt6u.js → x-mark-BVvwdxda.js} +1 -1
- package/package.json +11 -10
- package/.github/workflows/code-quality.yml +0 -43
- package/.github/workflows/publish.yml +0 -64
- package/dist/astra-sdk.es.js +0 -9
- package/dist/ccip-DkYvh7hg.js +0 -149
- package/dist/clsx.m-DCYaa4RU.js +0 -20
- package/dist/index-BDE-2VTp.js +0 -315
- package/dist/index-BjLIiJQa.js +0 -21034
- package/dist/index-CIr4zlVp.js +0 -386
- package/dist/index-ChxXyuZj.js +0 -572
- package/dist/index-D-T7kk3G.js +0 -15911
- package/dist/index-DSX3HrTS.js +0 -10785
- package/dist/secp256k1-CsKSDHNi.js +0 -1257
- package/eslint.config.mjs +0 -41
- package/index.html +0 -13
- package/public/font/ClashDisplay-Variable.ttf +0 -0
- package/public/font/ClashDisplay-Variable.woff +0 -0
- package/public/font/ClashDisplay-Variable.woff2 +0 -0
- package/public/vite.svg +0 -1
- package/src/App.css +0 -170
- package/src/apis/lspApi.js +0 -82
- package/src/apis/request.js +0 -59
- package/src/assets/arrow-right.svg +0 -3
- package/src/assets/astr.svg +0 -13
- package/src/assets/bridge-loading.png +0 -0
- package/src/assets/ln.png +0 -0
- package/src/assets/network/Arbitrum.png +0 -0
- package/src/assets/network/Polygon.png +0 -0
- package/src/assets/network/Solana.png +0 -0
- package/src/assets/network/base.png +0 -0
- package/src/assets/network/botanix.png +0 -0
- package/src/assets/network/bsc.svg +0 -13
- package/src/assets/network/eth.png +0 -0
- package/src/assets/network/lighting.png +0 -0
- package/src/assets/network/ligtning.svg +0 -22
- package/src/assets/network/solona.png +0 -0
- package/src/assets/pay.png +0 -0
- package/src/assets/powerby.svg +0 -14
- package/src/assets/react.svg +0 -1
- package/src/assets/success.svg +0 -3
- package/src/assets/tip.svg +0 -5
- package/src/assets/tokens/sol.png +0 -0
- package/src/assets/tokens/usdc.png +0 -0
- package/src/assets/tokens/usdt.png +0 -0
- package/src/comps/AstraImage.jsx +0 -37
- package/src/comps/AstraModal.jsx +0 -202
- package/src/comps/AstraModalLogo.jsx +0 -29
- package/src/comps/AstraNetwork.jsx +0 -261
- package/src/comps/CheckErc20Button.jsx +0 -28
- package/src/comps/CommonStyle.jsx +0 -4
- package/src/comps/ConnectButton.jsx +0 -19
- package/src/comps/EllipsisMiddle.jsx +0 -42
- package/src/comps/ResultModal.jsx +0 -312
- package/src/comps/ToLightning.jsx +0 -653
- package/src/comps/ToToken.jsx +0 -550
- package/src/constants/index.js +0 -21
- package/src/font/ClashDisplay-Variable.ttf +0 -0
- package/src/font/ClashDisplay-Variable.woff +0 -0
- package/src/font/ClashDisplay-Variable.woff2 +0 -0
- package/src/hooks/useContract.js +0 -179
- package/src/hooks/useGetMinAndMax.js +0 -48
- package/src/hooks/useLspApi.js +0 -70
- package/src/hooks/useParseInvoice.js +0 -95
- package/src/index.css +0 -69
- package/src/index.jsx +0 -161
- package/src/lib/bolt11.min.js +0 -1
- package/src/main.jsx +0 -75
- package/src/store/index.js +0 -25
- package/src/theme.js +0 -108
- package/src/utils/index.js +0 -267
- package/vite.config.js +0 -50
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as be } from "./SwapController-
|
|
1
|
+
import { aH as p, a_ as R, R as l, O as re, E as y, F as L, I as b, J as C, K as c, H as u, $ as _, aa as d, G as le, a$ as ce, V as h, a6 as U, aY as de, aE as H, Q as q, aA as T, a9 as z, a3 as M, _ as F, S as A, aM as P, a8 as ue, a7 as pe, b0 as he, aT as we, Y as me, P as fe } from "./index-LucuShOc.js";
|
|
2
|
+
import { S as be } from "./SwapController-mYFErPzx.js";
|
|
3
3
|
const ee = {
|
|
4
4
|
isUnsupportedChainView() {
|
|
5
5
|
return l.state.view === "UnsupportedChain" || l.state.view === "SwitchNetwork" && l.state.history.includes("UnsupportedChain");
|
|
@@ -41,7 +41,7 @@ let V = class extends C {
|
|
|
41
41
|
return c`<slot></slot>`;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
V.styles = [
|
|
44
|
+
V.styles = [L, ge];
|
|
45
45
|
V = ve([
|
|
46
46
|
b("wui-card")
|
|
47
47
|
], V);
|
|
@@ -117,10 +117,10 @@ let S = class extends C {
|
|
|
117
117
|
`;
|
|
118
118
|
}
|
|
119
119
|
onClose() {
|
|
120
|
-
|
|
120
|
+
_.close();
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
S.styles = [
|
|
123
|
+
S.styles = [L, ye];
|
|
124
124
|
I([
|
|
125
125
|
u()
|
|
126
126
|
], S.prototype, "message", void 0);
|
|
@@ -175,9 +175,9 @@ const xe = {
|
|
|
175
175
|
icon: "exclamationTriangle"
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
|
-
let
|
|
178
|
+
let B = class extends C {
|
|
179
179
|
constructor() {
|
|
180
|
-
super(), this.unsubscribe = [], this.open =
|
|
180
|
+
super(), this.unsubscribe = [], this.open = _.state.open, this.onOpen(!0), this.unsubscribe.push(_.subscribeKey("open", (e) => {
|
|
181
181
|
this.open = e, this.onOpen(!1);
|
|
182
182
|
}));
|
|
183
183
|
}
|
|
@@ -185,7 +185,7 @@ let _ = class extends C {
|
|
|
185
185
|
this.unsubscribe.forEach((e) => e());
|
|
186
186
|
}
|
|
187
187
|
render() {
|
|
188
|
-
const { message: e, variant: t } =
|
|
188
|
+
const { message: e, variant: t } = _.state, i = xe[t];
|
|
189
189
|
return c`
|
|
190
190
|
<wui-alertbar
|
|
191
191
|
message=${e}
|
|
@@ -213,13 +213,13 @@ let _ = class extends C {
|
|
|
213
213
|
}), this.style.cssText = "pointer-events: none");
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
|
-
|
|
216
|
+
B.styles = Ce;
|
|
217
217
|
te([
|
|
218
218
|
d()
|
|
219
|
-
],
|
|
220
|
-
|
|
219
|
+
], B.prototype, "open", void 0);
|
|
220
|
+
B = te([
|
|
221
221
|
b("w3m-alertbar")
|
|
222
|
-
],
|
|
222
|
+
], B);
|
|
223
223
|
const ke = y`
|
|
224
224
|
button {
|
|
225
225
|
display: block;
|
|
@@ -276,7 +276,7 @@ let D = class extends C {
|
|
|
276
276
|
></wui-icon-box>`;
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
D.styles = [
|
|
279
|
+
D.styles = [L, le, ce, ke];
|
|
280
280
|
oe([
|
|
281
281
|
u()
|
|
282
282
|
], D.prototype, "imageSrc", void 0);
|
|
@@ -367,7 +367,7 @@ var g = function(n, e, t, i) {
|
|
|
367
367
|
return a > 3 && o && Object.defineProperty(e, t, o), o;
|
|
368
368
|
};
|
|
369
369
|
const We = ["SmartSessionList"];
|
|
370
|
-
function
|
|
370
|
+
function K() {
|
|
371
371
|
var s, r, k, m, $, E, O;
|
|
372
372
|
const n = (r = (s = l.state.data) == null ? void 0 : s.connector) == null ? void 0 : r.name, e = (m = (k = l.state.data) == null ? void 0 : k.wallet) == null ? void 0 : m.name, t = (E = ($ = l.state.data) == null ? void 0 : $.network) == null ? void 0 : E.name, i = e ?? n, a = M.getConnectors();
|
|
373
373
|
return {
|
|
@@ -434,14 +434,14 @@ function H() {
|
|
|
434
434
|
}
|
|
435
435
|
let w = class extends C {
|
|
436
436
|
constructor() {
|
|
437
|
-
super(), this.unsubscribe = [], this.heading =
|
|
438
|
-
this.networkImage =
|
|
437
|
+
super(), this.unsubscribe = [], this.heading = K()[l.state.view], this.network = h.state.activeCaipNetwork, this.networkImage = U.getNetworkImage(this.network), this.showBack = !1, this.prevHistoryLength = 1, this.view = l.state.view, this.viewDirection = "", this.headerText = K()[l.state.view], this.unsubscribe.push(de.subscribeNetworkImages(() => {
|
|
438
|
+
this.networkImage = U.getNetworkImage(this.network);
|
|
439
439
|
}), l.subscribeKey("view", (e) => {
|
|
440
440
|
setTimeout(() => {
|
|
441
|
-
this.view = e, this.headerText =
|
|
442
|
-
},
|
|
441
|
+
this.view = e, this.headerText = K()[e];
|
|
442
|
+
}, H.ANIMATION_DURATIONS.HeaderText), this.onViewChange(), this.onHistoryChange();
|
|
443
443
|
}), h.subscribeKey("activeCaipNetwork", (e) => {
|
|
444
|
-
this.network = e, this.networkImage =
|
|
444
|
+
this.network = e, this.networkImage = U.getNetworkImage(this.network);
|
|
445
445
|
}));
|
|
446
446
|
}
|
|
447
447
|
disconnectCallback() {
|
|
@@ -533,8 +533,8 @@ let w = class extends C {
|
|
|
533
533
|
}
|
|
534
534
|
onViewChange() {
|
|
535
535
|
const { history: e } = l.state;
|
|
536
|
-
let t =
|
|
537
|
-
e.length < this.prevHistoryLength && (t =
|
|
536
|
+
let t = H.VIEW_DIRECTION.Next;
|
|
537
|
+
e.length < this.prevHistoryLength && (t = H.VIEW_DIRECTION.Prev), this.prevHistoryLength = e.length, this.viewDirection = t;
|
|
538
538
|
}
|
|
539
539
|
async onHistoryChange() {
|
|
540
540
|
var i;
|
|
@@ -639,7 +639,7 @@ let f = class extends C {
|
|
|
639
639
|
></wui-icon-box>`;
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
|
-
f.styles = [
|
|
642
|
+
f.styles = [L, $e];
|
|
643
643
|
W([
|
|
644
644
|
u()
|
|
645
645
|
], f.prototype, "backgroundColor", void 0);
|
|
@@ -691,7 +691,7 @@ const Ae = {
|
|
|
691
691
|
icon: "close"
|
|
692
692
|
}
|
|
693
693
|
};
|
|
694
|
-
let
|
|
694
|
+
let j = class extends C {
|
|
695
695
|
constructor() {
|
|
696
696
|
super(), this.unsubscribe = [], this.timeout = void 0, this.open = A.state.open, this.unsubscribe.push(A.subscribeKey("open", (e) => {
|
|
697
697
|
this.open = e, this.onOpen();
|
|
@@ -730,13 +730,13 @@ let U = class extends C {
|
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
|
-
|
|
733
|
+
j.styles = Ee;
|
|
734
734
|
ie([
|
|
735
735
|
d()
|
|
736
|
-
],
|
|
737
|
-
|
|
736
|
+
], j.prototype, "open", void 0);
|
|
737
|
+
j = ie([
|
|
738
738
|
b("w3m-snackbar")
|
|
739
|
-
],
|
|
739
|
+
], j);
|
|
740
740
|
const Ne = y`
|
|
741
741
|
:host {
|
|
742
742
|
z-index: var(--w3m-z-index);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as l } from "./index-
|
|
1
|
+
import { D as l } from "./index-LucuShOc.js";
|
|
2
2
|
const e = l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" fill="none">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.9659 1.96541C2.30063 1.63067 2.84334 1.63067 3.17808 1.96541L6.00056 4.78789L8.82304 1.96541C9.15777 1.63067 9.70049 1.63067 10.0352 1.96541C10.37 2.30014 10.37 2.84285 10.0352 3.17759L7.21274 6.00007L10.0352 8.82255C10.37 9.15729 10.37 9.7 10.0352 10.0347C9.70049 10.3695 9.15777 10.3695 8.82304 10.0347L6.00056 7.21225L3.17808 10.0347C2.84334 10.3695 2.30063 10.3695 1.9659 10.0347C1.63116 9.7 1.63116 9.15729 1.9659 8.82255L4.78837 6.00007L1.9659 3.17759C1.63116 2.84285 1.63116 2.30014 1.9659 1.96541Z" fill="currentColor"/>
|
|
4
4
|
</svg>`;
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astra-modal-test",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/nodeflow-sdk.es.js",
|
|
6
|
+
"module": "dist/nodeflow-sdk.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
6
8
|
"type": "module",
|
|
7
9
|
"scripts": {
|
|
8
10
|
"dev": "vite",
|
|
@@ -10,8 +12,14 @@
|
|
|
10
12
|
"lint": "eslint .",
|
|
11
13
|
"preview": "vite preview"
|
|
12
14
|
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
13
20
|
"dependencies": {
|
|
14
21
|
"@ant-design/icons": "^5.5.2",
|
|
22
|
+
"@lnfi-network/nodeflow-api": "^1.0.0-alpha.0",
|
|
15
23
|
"@reown/appkit": "^1.6.4",
|
|
16
24
|
"@reown/appkit-adapter-wagmi": "^1.6.4",
|
|
17
25
|
"@tanstack/react-query": "^5.64.1",
|
|
@@ -28,13 +36,6 @@
|
|
|
28
36
|
"wagmi": "^2.14.8",
|
|
29
37
|
"zustand": "^5.0.2"
|
|
30
38
|
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"@reown/appkit": "^1.6.4",
|
|
33
|
-
"@reown/appkit-adapter-wagmi": "^1.6.4",
|
|
34
|
-
"@tanstack/react-query": "^5.64.1",
|
|
35
|
-
"viem": "^2.22.9",
|
|
36
|
-
"wagmi": "^2.14.8"
|
|
37
|
-
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@eslint/js": "^9.15.0",
|
|
40
41
|
"@types/react": "^18.3.12",
|
|
@@ -49,4 +50,4 @@
|
|
|
49
50
|
"vite-plugin-node-polyfills": "^0.24.0",
|
|
50
51
|
"vite-plugin-style-import": "^2.0.0"
|
|
51
52
|
}
|
|
52
|
-
}
|
|
53
|
+
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
name: Code Quality Check
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
- develop
|
|
8
|
-
pull_request:
|
|
9
|
-
branches:
|
|
10
|
-
- main
|
|
11
|
-
- develop
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
security:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
security-events: write
|
|
19
|
-
actions: read
|
|
20
|
-
checks: write
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v4
|
|
23
|
-
with:
|
|
24
|
-
fetch-depth: 0
|
|
25
|
-
|
|
26
|
-
- uses: github/codeql-action/init@v3
|
|
27
|
-
with:
|
|
28
|
-
languages: javascript
|
|
29
|
-
|
|
30
|
-
- uses: github/codeql-action/analyze@v3
|
|
31
|
-
|
|
32
|
-
eslint:
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
permissions:
|
|
35
|
-
contents: read
|
|
36
|
-
steps:
|
|
37
|
-
- uses: actions/checkout@v4
|
|
38
|
-
- uses: actions/setup-node@v4
|
|
39
|
-
with:
|
|
40
|
-
node-version: 22
|
|
41
|
-
cache: "npm"
|
|
42
|
-
- run: yarn install
|
|
43
|
-
- run: yarn lint
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
name: Build and Publish to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
build-and-publish:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
environment: prod-deploy
|
|
10
|
-
steps:
|
|
11
|
-
- name: Checkout
|
|
12
|
-
uses: actions/checkout@v4
|
|
13
|
-
|
|
14
|
-
- name: Setup Node.js
|
|
15
|
-
uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 22
|
|
18
|
-
registry-url: https://registry.npmjs.org
|
|
19
|
-
cache: "yarn"
|
|
20
|
-
|
|
21
|
-
- name: Install dependencies
|
|
22
|
-
run: yarn install
|
|
23
|
-
|
|
24
|
-
- name: Build
|
|
25
|
-
run: npm run build
|
|
26
|
-
|
|
27
|
-
- name: Generate build hash
|
|
28
|
-
id: build-hash
|
|
29
|
-
run: |
|
|
30
|
-
BUILD_HASH=$(find dist -type f -exec sha256sum {} \; | sha256sum | cut -d' ' -f1)
|
|
31
|
-
echo "build_hash=$BUILD_HASH" >> $GITHUB_OUTPUT
|
|
32
|
-
echo "Build hash: $BUILD_HASH"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
36
|
-
BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
37
|
-
echo "{\"version\":\"$PACKAGE_VERSION\",\"buildHash\":\"$BUILD_HASH\",\"buildTime\":\"$BUILD_TIME\"}" > dist/build-info.json
|
|
38
|
-
|
|
39
|
-
- name: Check if package should be published
|
|
40
|
-
id: check-publish
|
|
41
|
-
run: |
|
|
42
|
-
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
43
|
-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
44
|
-
if npm view $PACKAGE_NAME@$PACKAGE_VERSION version > /dev/null 2>&1; then
|
|
45
|
-
echo "Version $PACKAGE_VERSION of $PACKAGE_NAME is already published on NPM. Skipping publish."
|
|
46
|
-
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
47
|
-
else
|
|
48
|
-
echo "Version $PACKAGE_VERSION of $PACKAGE_NAME is new. Proceeding to publish."
|
|
49
|
-
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
- name: Upload build artifacts
|
|
53
|
-
uses: actions/upload-artifact@v4
|
|
54
|
-
with:
|
|
55
|
-
name: build-artifacts-${{ steps.build-hash.outputs.build_hash }}
|
|
56
|
-
path: |
|
|
57
|
-
dist/
|
|
58
|
-
!dist/**/*.map
|
|
59
|
-
|
|
60
|
-
- name: Publish new version
|
|
61
|
-
if: steps.check-publish.outputs.should_publish == 'true'
|
|
62
|
-
run: npm publish --access public
|
|
63
|
-
env:
|
|
64
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/dist/astra-sdk.es.js
DELETED
package/dist/ccip-DkYvh7hg.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { af as p, ag as y, ah as w, ai as k, aj as b, ak as L, al as O, am as E, an as x, ao as R, ap as m, aq as M } from "./index-2vYoun4O.js";
|
|
2
|
-
class q extends p {
|
|
3
|
-
constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
|
|
4
|
-
var o;
|
|
5
|
-
super(a.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
6
|
-
cause: a,
|
|
7
|
-
metaMessages: [
|
|
8
|
-
...a.metaMessages || [],
|
|
9
|
-
(o = a.metaMessages) != null && o.length ? "" : [],
|
|
10
|
-
"Offchain Gateway Call:",
|
|
11
|
-
t && [
|
|
12
|
-
" Gateway URL(s):",
|
|
13
|
-
...t.map((d) => ` ${y(d)}`)
|
|
14
|
-
],
|
|
15
|
-
` Sender: ${f}`,
|
|
16
|
-
` Data: ${n}`,
|
|
17
|
-
` Callback selector: ${r}`,
|
|
18
|
-
` Extra data: ${i}`
|
|
19
|
-
].flat(),
|
|
20
|
-
name: "OffchainLookupError"
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
class S extends p {
|
|
25
|
-
constructor({ result: r, url: a }) {
|
|
26
|
-
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
27
|
-
metaMessages: [
|
|
28
|
-
`Gateway URL: ${y(a)}`,
|
|
29
|
-
`Response: ${w(r)}`
|
|
30
|
-
],
|
|
31
|
-
name: "OffchainLookupResponseMalformedError"
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
class $ extends p {
|
|
36
|
-
constructor({ sender: r, to: a }) {
|
|
37
|
-
super("Reverted sender address does not match target contract address (`to`).", {
|
|
38
|
-
metaMessages: [
|
|
39
|
-
`Contract address: ${a}`,
|
|
40
|
-
`OffchainLookup sender address: ${r}`
|
|
41
|
-
],
|
|
42
|
-
name: "OffchainLookupSenderMismatchError"
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const A = "0x556f1830", T = {
|
|
47
|
-
name: "OffchainLookup",
|
|
48
|
-
type: "error",
|
|
49
|
-
inputs: [
|
|
50
|
-
{
|
|
51
|
-
name: "sender",
|
|
52
|
-
type: "address"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: "urls",
|
|
56
|
-
type: "string[]"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: "callData",
|
|
60
|
-
type: "bytes"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: "callbackFunction",
|
|
64
|
-
type: "bytes4"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "extraData",
|
|
68
|
-
type: "bytes"
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
};
|
|
72
|
-
async function D(c, { blockNumber: r, blockTag: a, data: n, to: i }) {
|
|
73
|
-
const { args: f } = k({
|
|
74
|
-
data: n,
|
|
75
|
-
abi: [T]
|
|
76
|
-
}), [t, o, d, l, s] = f, { ccipRead: e } = c, h = e && typeof (e == null ? void 0 : e.request) == "function" ? e.request : C;
|
|
77
|
-
try {
|
|
78
|
-
if (!b(i, t))
|
|
79
|
-
throw new $({ sender: t, to: i });
|
|
80
|
-
const u = o.includes(L) ? await O({
|
|
81
|
-
data: d,
|
|
82
|
-
ccipRequest: h
|
|
83
|
-
}) : await h({ data: d, sender: t, urls: o }), { data: g } = await E(c, {
|
|
84
|
-
blockNumber: r,
|
|
85
|
-
blockTag: a,
|
|
86
|
-
data: x([
|
|
87
|
-
l,
|
|
88
|
-
R([{ type: "bytes" }, { type: "bytes" }], [u, s])
|
|
89
|
-
]),
|
|
90
|
-
to: i
|
|
91
|
-
});
|
|
92
|
-
return g;
|
|
93
|
-
} catch (u) {
|
|
94
|
-
throw new q({
|
|
95
|
-
callbackSelector: l,
|
|
96
|
-
cause: u,
|
|
97
|
-
data: n,
|
|
98
|
-
extraData: s,
|
|
99
|
-
sender: t,
|
|
100
|
-
urls: o
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
async function C({ data: c, sender: r, urls: a }) {
|
|
105
|
-
var i;
|
|
106
|
-
let n = new Error("An unknown error occurred.");
|
|
107
|
-
for (let f = 0; f < a.length; f++) {
|
|
108
|
-
const t = a[f], o = t.includes("{data}") ? "GET" : "POST", d = o === "POST" ? { data: c, sender: r } : void 0, l = o === "POST" ? { "Content-Type": "application/json" } : {};
|
|
109
|
-
try {
|
|
110
|
-
const s = await fetch(t.replace("{sender}", r.toLowerCase()).replace("{data}", c), {
|
|
111
|
-
body: JSON.stringify(d),
|
|
112
|
-
headers: l,
|
|
113
|
-
method: o
|
|
114
|
-
});
|
|
115
|
-
let e;
|
|
116
|
-
if ((i = s.headers.get("Content-Type")) != null && i.startsWith("application/json") ? e = (await s.json()).data : e = await s.text(), !s.ok) {
|
|
117
|
-
n = new m({
|
|
118
|
-
body: d,
|
|
119
|
-
details: e != null && e.error ? w(e.error) : s.statusText,
|
|
120
|
-
headers: s.headers,
|
|
121
|
-
status: s.status,
|
|
122
|
-
url: t
|
|
123
|
-
});
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
if (!M(e)) {
|
|
127
|
-
n = new S({
|
|
128
|
-
result: e,
|
|
129
|
-
url: t
|
|
130
|
-
});
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
return e;
|
|
134
|
-
} catch (s) {
|
|
135
|
-
n = new m({
|
|
136
|
-
body: d,
|
|
137
|
-
details: s.message,
|
|
138
|
-
url: t
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
throw n;
|
|
143
|
-
}
|
|
144
|
-
export {
|
|
145
|
-
C as ccipRequest,
|
|
146
|
-
D as offchainLookup,
|
|
147
|
-
T as offchainLookupAbiItem,
|
|
148
|
-
A as offchainLookupSignature
|
|
149
|
-
};
|
package/dist/clsx.m-DCYaa4RU.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
function f(r) {
|
|
2
|
-
var e, o, t = "";
|
|
3
|
-
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
-
else if (typeof r == "object") if (Array.isArray(r)) for (e = 0; e < r.length; e++) r[e] && (o = f(r[e])) && (t && (t += " "), t += o);
|
|
5
|
-
else for (e in r) r[e] && (t && (t += " "), t += e);
|
|
6
|
-
return t;
|
|
7
|
-
}
|
|
8
|
-
function n() {
|
|
9
|
-
for (var r, e, o = 0, t = ""; o < arguments.length; ) (r = arguments[o++]) && (e = f(r)) && (t && (t += " "), t += e);
|
|
10
|
-
return t;
|
|
11
|
-
}
|
|
12
|
-
const a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13
|
-
__proto__: null,
|
|
14
|
-
clsx: n,
|
|
15
|
-
default: n
|
|
16
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
export {
|
|
18
|
-
a,
|
|
19
|
-
n as c
|
|
20
|
-
};
|