@directcryptopay/sdk 0.1.0 → 0.2.1
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 +202 -256
- package/dist/{add-KF4m4jFK.js → add-sji6scSD.js} +1 -1
- package/dist/{all-wallets-D6NAjQgX.js → all-wallets-B4H-890E.js} +1 -1
- package/dist/{app-store-D7TTn-EO.js → app-store-Z433s97G.js} +1 -1
- package/dist/{apple-DjX2E2hE.js → apple-b8Lxj7nb.js} +1 -1
- package/dist/{arrow-bottom-C0YrNJYB.js → arrow-bottom-M9oWWo_9.js} +1 -1
- package/dist/{arrow-bottom-circle-Dlxvx_XG.js → arrow-bottom-circle-N9c4CXY1.js} +1 -1
- package/dist/{arrow-left-x8_-lUyK.js → arrow-left-Dw8AKfwf.js} +1 -1
- package/dist/{arrow-right-BTZybj80.js → arrow-right-DwLQZSC_.js} +1 -1
- package/dist/{arrow-top-LzH7iLCp.js → arrow-top-zhUjkBe1.js} +1 -1
- package/dist/{bank-23jp-IV_.js → bank-CbQdnILK.js} +1 -1
- package/dist/{browser-EjoorDid.js → browser-xAqNwt7z.js} +1 -1
- package/dist/{card-DGgWwtwC.js → card-Dr1QBmWp.js} +1 -1
- package/dist/{ccip-BMANewTU.js → ccip-BIGqktC1.js} +6 -6
- package/dist/{checkmark-B1qcQhBo.js → checkmark-BhT1dTgG.js} +1 -1
- package/dist/{checkmark-bold-Cyc4IEEJ.js → checkmark-bold-CPB29wqQ.js} +1 -1
- package/dist/{chevron-bottom-ClHs08rB.js → chevron-bottom-BhNyx2II.js} +1 -1
- package/dist/{chevron-left-O8h_551_.js → chevron-left-CGuEjQlY.js} +1 -1
- package/dist/{chevron-right-DP3xpyIA.js → chevron-right-CvIRRsqZ.js} +1 -1
- package/dist/{chevron-top-CuwkBUs9.js → chevron-top-RSzCqjBd.js} +1 -1
- package/dist/{chrome-store-zfT_aJ3R.js → chrome-store-Cs8dAgs0.js} +1 -1
- package/dist/{clock-DHZqivIS.js → clock-fhZO5otC.js} +1 -1
- package/dist/{close-Cp9rNAw4.js → close-BPuztrdR.js} +1 -1
- package/dist/{coinPlaceholder-U7-T1KKQ.js → coinPlaceholder-C8X2i7Kh.js} +1 -1
- package/dist/{compass-Ds5-PRSR.js → compass-WMc5huk0.js} +1 -1
- package/dist/{copy-Jg4HdIMf.js → copy-DVAeT17y.js} +1 -1
- package/dist/core/api.d.ts +10 -1
- package/dist/core/wallet.d.ts +23 -2
- package/dist/{cursor-DmMevduB.js → cursor-BJ4YLXfy.js} +1 -1
- package/dist/{cursor-transparent-Dn9-1SV8.js → cursor-transparent-DN2fLQN4.js} +1 -1
- package/dist/dcp-sdk.umd.js +603 -603
- package/dist/dcp.d.ts +11 -1
- package/dist/{desktop-C4udXXlZ.js → desktop-6avxisBw.js} +1 -1
- package/dist/{disconnect-wd1BYLxt.js → disconnect-AReVI8Gk.js} +1 -1
- package/dist/{discord-DthxuCAP.js → discord-CxrI30BZ.js} +1 -1
- package/dist/{email-B3jSnUFE.js → email-B8dIIaay.js} +24 -24
- package/dist/{embedded-wallet-CJHmoBI2.js → embedded-wallet-C_5hF7rM.js} +24 -24
- package/dist/{etherscan-Cjp4xfMW.js → etherscan-BnAy8cIF.js} +1 -1
- package/dist/{exclamation-triangle-CRNR5WOy.js → exclamation-triangle-Bu7nHwx9.js} +1 -1
- package/dist/{extension-Cydk0mZt.js → extension-F0LIhvcf.js} +1 -1
- package/dist/{external-link-CuPTAoq9.js → external-link-CP6phyaM.js} +1 -1
- package/dist/{facebook-CghqXmdf.js → facebook-BtQ-Io2y.js} +1 -1
- package/dist/{farcaster-BREqMX4y.js → farcaster-BmaN1ugd.js} +1 -1
- package/dist/{filters-Dn_Ys7ew.js → filters-DpEwoOmy.js} +1 -1
- package/dist/{github-C-A7JmIY.js → github-q7qO9V-b.js} +1 -1
- package/dist/{google-CCdM_naE.js → google-DH_ZE8bW.js} +1 -1
- package/dist/{hashTypedData-D2Qmzscs.js → hashTypedData-ZH9ZnWu3.js} +6 -6
- package/dist/{help-circle-DIH4vyj3.js → help-circle-BAQVmKas.js} +1 -1
- package/dist/{id-DkJ0gBuy.js → id-Cj68Zwgo.js} +1 -1
- package/dist/{if-defined-BciplFKz.js → if-defined-CNte9B3N.js} +89 -89
- package/dist/{image-qMjyiXM0.js → image-BKJDw6N-.js} +1 -1
- package/dist/{index-BpXOsxzU.js → index-5mp7WkhV.js} +2 -2
- package/dist/{index-CX60z_g2.js → index-7toZMdtG.js} +32 -32
- package/dist/{index-CMPIqsB1.js → index-B1uKzdvN.js} +3 -3
- package/dist/{index-eW8y-mXH.js → index-BHFZVF-b.js} +3 -3
- package/dist/{index-DiHImG4L.js → index-BJ7cbG3N.js} +12400 -11573
- package/dist/{index-CqVegmN4.js → index-BKwa5JSA.js} +10 -10
- package/dist/{index-D-IzHD_8.js → index-BP4B9VUt.js} +2 -2
- package/dist/{index-DmOMXRG1.js → index-BVdzXHpO.js} +11 -11
- package/dist/{index-B2iDt0TJ.js → index-BYND0GJ9.js} +2 -2
- package/dist/{index-lbhz9evJ.js → index-BaJ0zEbh.js} +2 -2
- package/dist/{index-B7K86vWu.js → index-BdSIrl-R.js} +38 -38
- package/dist/{index-C4BX3QW8.js → index-Bh0MPFwP.js} +3 -3
- package/dist/{index-BBkcvSiY.js → index-Bsh7_qTp.js} +53 -53
- package/dist/{index-DoSYqTQg.js → index-BwnXTNNg.js} +3 -3
- package/dist/{index-Ij6XA6_4.js → index-C0kPDbg_.js} +2 -2
- package/dist/{index-fxzIDZsb.js → index-CKikVKe2.js} +2 -2
- package/dist/{index-SzyBYfzA.js → index-CPTcEPbD.js} +1582 -1881
- package/dist/{index-C27dwOyE.js → index-ChVh0Hkp.js} +3 -3
- package/dist/{index-CwB_qRfM.js → index-Cle_NnnS.js} +6 -6
- package/dist/{index-CUdQyyFn.js → index-CmWdvIFT.js} +2 -2
- package/dist/{index-1adX-Fit.js → index-D2AMA8Bu.js} +2 -2
- package/dist/{index-CTYngdl0.js → index-D5r0iSq4.js} +1 -1
- package/dist/index-D6h-qfpt.js +276 -0
- package/dist/{index-CppCc1n8.js → index-DAUM8CO4.js} +2 -2
- package/dist/{index-DtCsAVBg.js → index-DGjZW6uR.js} +2 -2
- package/dist/{index-CxOF7GqE.js → index-DQe94z7X.js} +3 -3
- package/dist/{index-AvC0IGDl.js → index-DTo6w99t.js} +101 -101
- package/dist/{index-B5zkXsLJ.js → index-DYdXjap2.js} +9 -9
- package/dist/{index-BdjxQs66.js → index-DceCxNV5.js} +5 -5
- package/dist/{index-Da8oZh8H.js → index-DobBVPe4.js} +14 -14
- package/dist/{index-DRNiFv9I.js → index-Dy4NyE6l.js} +7 -7
- package/dist/{index-Bijd4_Ns.js → index-Uw9cSw0q.js} +3 -3
- package/dist/{index-DpHXq5_E.js → index-f3LXSfM5.js} +6 -6
- package/dist/{index--3Zp0jAb.js → index-qiuyrukh.js} +2 -2
- package/dist/{index-CuiyMA8F.js → index-zddvaohA.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{info-DMIGgjkL.js → info-RfPsmroW.js} +1 -1
- package/dist/{info-circle-CJuIKZSx.js → info-circle-DFKHB_ZN.js} +1 -1
- package/dist/{lightbulb-qFT6WEWV.js → lightbulb-B-Bykj9X.js} +1 -1
- package/dist/{localBatchGatewayRequest-CsMVMFBc.js → localBatchGatewayRequest-CjGcn5nM.js} +1 -1
- package/dist/{mail-DoYgQvOt.js → mail-mBAgGuw5.js} +1 -1
- package/dist/{mobile-URtsh7o-.js → mobile-Dhh3ndkf.js} +1 -1
- package/dist/{more-DoQd10TF.js → more-D1h7UTvg.js} +1 -1
- package/dist/{network-placeholder-BBA2Ue6C.js → network-placeholder-Dqynvc-t.js} +1 -1
- package/dist/{nftPlaceholder-C9RXWz9k.js → nftPlaceholder-Df7MW4MM.js} +1 -1
- package/dist/{off-YcuDQczT.js → off-BmG3cHTX.js} +1 -1
- package/dist/{onramp-BfqDIx4o.js → onramp-C401Aenb.js} +46 -46
- package/dist/{parseSignature-280HB24T.js → parseSignature-S8VEpRHC.js} +967 -1222
- package/dist/{play-store-sFaloG_r.js → play-store-4q1fzL_P.js} +1 -1
- package/dist/{plus-l0wekSht.js → plus-603Gs3yG.js} +1 -1
- package/dist/{qr-code-CihrUU4G.js → qr-code-Dgwhf6M1.js} +1 -1
- package/dist/{receive-dfY1Cu-g.js → receive-CYXbbEUR.js} +10 -10
- package/dist/{recycle-horizontal-nXu6YaPw.js → recycle-horizontal-Bu8zZ563.js} +1 -1
- package/dist/{ref-huAzXCX0.js → ref-DpmKRWBK.js} +2 -2
- package/dist/{refresh-D2ZbVeNC.js → refresh-BMZFu0mu.js} +1 -1
- package/dist/{reown-logo-BMaTMJmc.js → reown-logo-BXph7ThY.js} +1 -1
- package/dist/{search-YVM9q3J-.js → search-Cm_V42Y_.js} +1 -1
- package/dist/{secp256k1-DPQgTBwQ.js → secp256k1-C0iX1TUr.js} +19 -19
- package/dist/{secp256k1-BrysY3Sv.js → secp256k1-DOQBqE4Z.js} +1 -1
- package/dist/{send-BwQZPKxI.js → send-BSMYxDuP.js} +1 -1
- package/dist/{send-GyetMVu1.js → send-C8EeIzRB.js} +20 -20
- package/dist/{socials-B0W91J9k.js → socials-DQrHQajs.js} +15 -15
- package/dist/{swapHorizontal-Dy_oQEkp.js → swapHorizontal-98rnJewS.js} +1 -1
- package/dist/{swapHorizontalBold-C4JpaMpc.js → swapHorizontalBold-C299FjEt.js} +1 -1
- package/dist/{swapHorizontalMedium-D5NuVZFh.js → swapHorizontalMedium-Cqm6i4WJ.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-Bq4P2MCj.js → swapHorizontalRoundedBold-De7hFfqZ.js} +1 -1
- package/dist/{swapVertical-CVQ8Mg03.js → swapVertical-DSL75l8L.js} +1 -1
- package/dist/{swaps-CA04SSdK.js → swaps-BuTNp65Y.js} +24 -24
- package/dist/{telegram-BP4SgW_L.js → telegram-cJP7hgUb.js} +1 -1
- package/dist/{three-dots-BJYGJ-dQ.js → three-dots-DHnEh28O.js} +1 -1
- package/dist/{transactions-Bq-98Tsg.js → transactions-DujFkB-M.js} +3 -3
- package/dist/{twitch-DTATWo9M.js → twitch-CR2iGcBo.js} +1 -1
- package/dist/{twitterIcon-D5UWPInb.js → twitterIcon-E5TAQjOn.js} +1 -1
- package/dist/types.d.ts +60 -0
- package/dist/ui/Modal.d.ts +3 -3
- package/dist/ui/index.d.ts +2 -2
- package/dist/{verify-Byvj8Wi1.js → verify-DEukUJp0.js} +1 -1
- package/dist/{verify-filled-B40taNm0.js → verify-filled-BXsx1i_p.js} +1 -1
- package/dist/{w3m-modal-HV6SE74G.js → w3m-modal-Bm7BqVng.js} +40 -40
- package/dist/{wallet-Cp-6Kk88.js → wallet-CzyyvdrT.js} +1 -1
- package/dist/{wallet-placeholder-C3juwA9o.js → wallet-placeholder-BrcmyGEe.js} +1 -1
- package/dist/{walletconnect-CRkIiLCx.js → walletconnect-BSYogWiE.js} +1 -1
- package/dist/{warning-circle-DtvCLwG4.js → warning-circle-Cgp2BW3m.js} +1 -1
- package/dist/{x-Cqyx5eCt.js → x-BJinLpTw.js} +1 -1
- package/package.json +1 -1
- package/dist/index-B2-vKLd8.js +0 -276
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as C, r as w, c as V } from "./if-defined-
|
|
3
|
-
import "./index-
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index
|
|
10
|
-
import "./index-
|
|
1
|
+
import { di as Y, dJ as _, d1 as R, cY as h, dd as U, d6 as f, dK as $, cU as W, d8 as A, cZ as I, cX as E, cJ as O, dL as S, cS as P, cV as B, cW as H, cE as M, cF as G, cG as d, c$ as F } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { o as C, r as w, c as V } from "./if-defined-CNte9B3N.js";
|
|
3
|
+
import "./index-Uw9cSw0q.js";
|
|
4
|
+
import "./index-DYdXjap2.js";
|
|
5
|
+
import "./index-D2AMA8Bu.js";
|
|
6
|
+
import "./index-CmWdvIFT.js";
|
|
7
|
+
import "./index-DceCxNV5.js";
|
|
8
|
+
import "./index-BaJ0zEbh.js";
|
|
9
|
+
import "./index-qiuyrukh.js";
|
|
10
|
+
import "./index-DAUM8CO4.js";
|
|
11
11
|
const o = {
|
|
12
12
|
INVALID_PAYMENT_CONFIG: "INVALID_PAYMENT_CONFIG",
|
|
13
13
|
INVALID_RECIPIENT: "INVALID_RECIPIENT",
|
|
@@ -74,7 +74,7 @@ async function q(t) {
|
|
|
74
74
|
async function X(t) {
|
|
75
75
|
return (await k("reown_getExchangeBuyStatus", t)).result;
|
|
76
76
|
}
|
|
77
|
-
const J = ["eip155"],
|
|
77
|
+
const J = ["eip155"], Z = {
|
|
78
78
|
eip155: {
|
|
79
79
|
native: { assetNamespace: "slip44", assetReference: "60" },
|
|
80
80
|
defaultTokenNamespace: "erc20"
|
|
@@ -85,13 +85,13 @@ const J = ["eip155"], Q = {
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
function b(t, e) {
|
|
88
|
-
const { chainNamespace: s, chainId: a } = _.parseCaipNetworkId(t), r =
|
|
88
|
+
const { chainNamespace: s, chainId: a } = _.parseCaipNetworkId(t), r = Z[s];
|
|
89
89
|
if (!r)
|
|
90
90
|
throw new Error(`Unsupported chain namespace for CAIP-19 formatting: ${s}`);
|
|
91
91
|
let i = r.native.assetNamespace, u = r.native.assetReference;
|
|
92
92
|
return e !== "native" && (i = r.defaultTokenNamespace, u = e), `${`${s}:${a}`}/${i}:${u}`;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Q(t) {
|
|
95
95
|
const { chainNamespace: e } = _.parseCaipNetworkId(t);
|
|
96
96
|
return J.includes(e);
|
|
97
97
|
}
|
|
@@ -526,7 +526,7 @@ let m = class extends G {
|
|
|
526
526
|
this.networkName = e.network, this.tokenSymbol = e.metadata.symbol, this.amount = l.state.amount.toString();
|
|
527
527
|
}
|
|
528
528
|
renderPayWithWallet() {
|
|
529
|
-
return
|
|
529
|
+
return Q(this.networkName) ? d`<wui-flex flexDirection="column" gap="s">
|
|
530
530
|
${this.isWalletConnected ? this.renderConnectedView() : this.renderDisconnectedView()}
|
|
531
531
|
</wui-flex>
|
|
532
532
|
<wui-separator text="or"></wui-separator>` : d``;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
1
|
+
import { cM as D, bp as b, aW as I, cN as C, c0 as g, b2 as A, cO as y, cn as N } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { cP as m } from "./index-BJ7cbG3N.js";
|
|
3
|
+
function k(u = {}) {
|
|
4
4
|
let l, d, s, a;
|
|
5
5
|
return D((n) => ({
|
|
6
6
|
id: "baseAccount",
|
|
@@ -69,7 +69,7 @@ function q(u = {}) {
|
|
|
69
69
|
...u.preference,
|
|
70
70
|
options: ((r = u.preference) == null ? void 0 : r.options) ?? "all"
|
|
71
71
|
};
|
|
72
|
-
})(), { createBaseAccountSDK: e } = await import("./index-
|
|
72
|
+
})(), { createBaseAccountSDK: e } = await import("./index-CPTcEPbD.js");
|
|
73
73
|
l = e({
|
|
74
74
|
...u,
|
|
75
75
|
appChainIds: n.chains.map((r) => r.id),
|
|
@@ -173,13 +173,13 @@ function S(u = {}) {
|
|
|
173
173
|
async getProvider() {
|
|
174
174
|
if (typeof window < "u" && (window == null ? void 0 : window.parent) !== window) {
|
|
175
175
|
if (!d) {
|
|
176
|
-
const { default: t } = await import("./index-
|
|
176
|
+
const { default: t } = await import("./index-5mp7WkhV.js"), e = new t(u), i = await N(() => e.safe.getInfo(), {
|
|
177
177
|
timeout: u.unstable_getInfoTimeout ?? 10
|
|
178
178
|
});
|
|
179
179
|
if (!i)
|
|
180
180
|
throw new Error("Could not load Safe information");
|
|
181
181
|
const r = await (async () => {
|
|
182
|
-
const c = await import("./index-
|
|
182
|
+
const c = await import("./index-D5r0iSq4.js").then((p) => p.i);
|
|
183
183
|
return typeof c.SafeAppProvider != "function" && typeof c.default.SafeAppProvider == "function" ? c.default.SafeAppProvider : c.SafeAppProvider;
|
|
184
184
|
})();
|
|
185
185
|
d = new r(i, e);
|
|
@@ -212,7 +212,7 @@ function S(u = {}) {
|
|
|
212
212
|
}));
|
|
213
213
|
}
|
|
214
214
|
export {
|
|
215
|
-
|
|
215
|
+
k as baseAccount,
|
|
216
216
|
m as injected,
|
|
217
217
|
S as safe
|
|
218
218
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as r, c as w } from "./if-defined-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { cE as g, cH as b, cI as p, cF as h, cG as d } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { n as r, c as w } from "./if-defined-CNte9B3N.js";
|
|
3
|
+
import "./index-BaJ0zEbh.js";
|
|
4
4
|
const f = g`
|
|
5
5
|
:host {
|
|
6
6
|
width: var(--local-width);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as f, c as w } from "./if-defined-
|
|
1
|
+
import { cD as t, cE as d, cH as p, cF as n, cG as v } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { n as f, c as w } from "./if-defined-CNte9B3N.js";
|
|
3
3
|
const g = t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
4
|
<rect width="64" height="64" fill="#F7931A"/>
|
|
5
5
|
<g clip-path="url(#clip0_1045_17)">
|
|
@@ -242,7 +242,7 @@ const g = t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="h
|
|
|
242
242
|
clip-rule="evenodd"
|
|
243
243
|
/>
|
|
244
244
|
<rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
|
|
245
|
-
</svg>`,
|
|
245
|
+
</svg>`, F = t`<svg fill="none" viewBox="0 0 60 60">
|
|
246
246
|
<g clip-path="url(#a)">
|
|
247
247
|
<path
|
|
248
248
|
fill="#EB8B47"
|
|
@@ -264,7 +264,7 @@ const g = t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="h
|
|
|
264
264
|
<defs>
|
|
265
265
|
<clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
|
|
266
266
|
</defs>
|
|
267
|
-
</svg> `,
|
|
267
|
+
</svg> `, B = t`<svg width="40" height="42" viewBox="0 0 40 42" fill="none">
|
|
268
268
|
<path opacity="0.7" d="M19.9526 41.9076L7.3877 34.655V26.1226L19.9526 33.3751V41.9076Z" fill="url(#paint0_linear_2113_32117)"/>
|
|
269
269
|
<path opacity="0.7" d="M19.9521 41.9076L32.5171 34.655V26.1226L19.9521 33.3751V41.9076Z" fill="url(#paint1_linear_2113_32117)"/>
|
|
270
270
|
<path opacity="0.7" d="M39.9095 7.34521V21.8562L32.5166 26.1225V11.6114L39.9095 7.34521Z" fill="url(#paint2_linear_2113_32117)"/>
|
|
@@ -563,14 +563,14 @@ const R = {
|
|
|
563
563
|
eth: L,
|
|
564
564
|
layers: V,
|
|
565
565
|
lock: H,
|
|
566
|
-
login:
|
|
566
|
+
login: F,
|
|
567
567
|
network: D,
|
|
568
568
|
nft: m,
|
|
569
569
|
noun: P,
|
|
570
570
|
profile: b,
|
|
571
571
|
system: U,
|
|
572
572
|
coinbase: M,
|
|
573
|
-
meld:
|
|
573
|
+
meld: B,
|
|
574
574
|
onrampCard: S,
|
|
575
575
|
moonpay: _,
|
|
576
576
|
stripe: G,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as g, c as m } from "./if-defined-
|
|
1
|
+
import { cE as p, cH as f, cF as d, cG as c } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { n as g, c as m } from "./if-defined-CNte9B3N.js";
|
|
3
3
|
const x = p`
|
|
4
4
|
:host {
|
|
5
5
|
position: relative;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as g, r as m, c as v } from "./if-defined-
|
|
3
|
-
import { T as l } from "./index-
|
|
1
|
+
import { cE as p, cF as u, cJ as f, cS as b, cG as d } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { n as g, r as m, c as v } from "./if-defined-CNte9B3N.js";
|
|
3
|
+
import { T as l } from "./index-BYND0GJ9.js";
|
|
4
4
|
const R = {
|
|
5
5
|
interpolate(i, e, o) {
|
|
6
6
|
if (i.length !== 2 || e.length !== 2)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { dcp as DCP } from './dcp';
|
|
2
2
|
export type { DCPInitConfig } from './core/config';
|
|
3
|
-
export type { DCPPayOptions, PaymentCallbacks, PaymentStatus } from './types';
|
|
3
|
+
export type { DCPPayOptions, DCPPaymentOptions, PaymentCallbacks, PaymentStatus, IntegrationConfig, } from './types';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cD as C } from "./index-BJ7cbG3N.js";
|
|
2
2
|
const t = C`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
|
|
4
4
|
</svg>`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cD as C } from "./index-BJ7cbG3N.js";
|
|
2
2
|
const e = C`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
|
|
4
4
|
</svg>`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bJ as l, ck as p,
|
|
1
|
+
import { bJ as l, ck as p, d2 as w, R as y, be as A, bl as g, K as b, J as F, bi as E, bD as N, P as h, Q as P, Z as R, d3 as f, d4 as I } from "./index-BJ7cbG3N.js";
|
|
2
2
|
function q(n) {
|
|
3
3
|
const { abi: r, data: a } = n, e = l(a, 0, 4), t = r.find((o) => o.type === "function" && e === p(w(o)));
|
|
4
4
|
if (!t)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as d, c as g, o as h, r as u } from "./if-defined-
|
|
3
|
-
import { D as ie, T as re } from "./index-
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import { O as z } from "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
1
|
+
import { cE as T, cF as w, cG as c, dR as J, dX as l, dh as D, dQ as x, cX as S, di as j, cS as I, cY as O, c_ as Z, d8 as G, d0 as H, cJ as U, d1 as V, db as M, d5 as X, d6 as ee, cZ as L, c$ as te } from "./index-BJ7cbG3N.js";
|
|
2
|
+
import { n as d, c as g, o as h, r as u } from "./if-defined-CNte9B3N.js";
|
|
3
|
+
import { D as ie, T as re } from "./index-Bsh7_qTp.js";
|
|
4
|
+
import "./index-CKikVKe2.js";
|
|
5
|
+
import "./index-CmWdvIFT.js";
|
|
6
|
+
import "./index-BaJ0zEbh.js";
|
|
7
|
+
import "./index-DceCxNV5.js";
|
|
8
|
+
import { O as z } from "./index-Cle_NnnS.js";
|
|
9
|
+
import "./index-f3LXSfM5.js";
|
|
10
|
+
import "./index-BP4B9VUt.js";
|
|
11
|
+
import "./index-Uw9cSw0q.js";
|
|
12
|
+
import "./index-DAUM8CO4.js";
|
|
13
|
+
import "./index-DQe94z7X.js";
|
|
14
14
|
const oe = T`
|
|
15
15
|
:host {
|
|
16
16
|
width: 100%;
|
|
@@ -193,22 +193,22 @@ const se = T`
|
|
|
193
193
|
width: 100%;
|
|
194
194
|
}
|
|
195
195
|
`;
|
|
196
|
-
var
|
|
196
|
+
var B = function(a, e, t, r) {
|
|
197
197
|
var o = arguments.length, i = o < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, t) : r, s;
|
|
198
198
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, r);
|
|
199
199
|
else for (var n = a.length - 1; n >= 0; n--) (s = a[n]) && (i = (o < 3 ? s(i) : o > 3 ? s(e, t, i) : s(e, t)) || i);
|
|
200
200
|
return o > 3 && i && Object.defineProperty(e, t, i), i;
|
|
201
201
|
};
|
|
202
202
|
const ne = 7;
|
|
203
|
-
let
|
|
203
|
+
let P = class extends w {
|
|
204
204
|
constructor() {
|
|
205
|
-
super(), this.unsubscribe = [], this.selectedOnRampProvider = l.state.selectedProvider, this.loading = !1, this.coinbaseTransactions =
|
|
205
|
+
super(), this.unsubscribe = [], this.selectedOnRampProvider = l.state.selectedProvider, this.loading = !1, this.coinbaseTransactions = D.state.coinbaseTransactions, this.tokenImages = x.state.tokenImages, this.unsubscribe.push(l.subscribeKey("selectedProvider", (e) => {
|
|
206
206
|
this.selectedOnRampProvider = e;
|
|
207
207
|
}), x.subscribeKey("tokenImages", (e) => this.tokenImages = e), () => {
|
|
208
208
|
clearTimeout(this.refetchTimeout);
|
|
209
|
-
},
|
|
209
|
+
}, D.subscribe((e) => {
|
|
210
210
|
this.coinbaseTransactions = { ...e.coinbaseTransactions };
|
|
211
|
-
})),
|
|
211
|
+
})), D.clearCursor(), this.fetchTransactions();
|
|
212
212
|
}
|
|
213
213
|
render() {
|
|
214
214
|
return c`
|
|
@@ -271,7 +271,7 @@ let A = class extends w {
|
|
|
271
271
|
throw new Error("No address found");
|
|
272
272
|
if (!t)
|
|
273
273
|
throw new Error("No projectId found");
|
|
274
|
-
this.loading = !0, await
|
|
274
|
+
this.loading = !0, await D.fetchTransactions(e, "coinbase"), this.loading = !1, this.refetchLoadingTransactions();
|
|
275
275
|
}
|
|
276
276
|
refetchLoadingTransactions() {
|
|
277
277
|
var o;
|
|
@@ -282,29 +282,29 @@ let A = class extends w {
|
|
|
282
282
|
}
|
|
283
283
|
this.refetchTimeout = setTimeout(async () => {
|
|
284
284
|
const i = S.state.address;
|
|
285
|
-
await
|
|
285
|
+
await D.fetchTransactions(i, "coinbase"), this.refetchLoadingTransactions();
|
|
286
286
|
}, 3e3);
|
|
287
287
|
}
|
|
288
288
|
templateLoading() {
|
|
289
289
|
return Array(ne).fill(c` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((e) => e);
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
P.styles = se;
|
|
293
|
+
B([
|
|
294
294
|
u()
|
|
295
|
-
],
|
|
296
|
-
|
|
295
|
+
], P.prototype, "selectedOnRampProvider", void 0);
|
|
296
|
+
B([
|
|
297
297
|
u()
|
|
298
|
-
],
|
|
299
|
-
|
|
298
|
+
], P.prototype, "loading", void 0);
|
|
299
|
+
B([
|
|
300
300
|
u()
|
|
301
|
-
],
|
|
302
|
-
|
|
301
|
+
], P.prototype, "coinbaseTransactions", void 0);
|
|
302
|
+
B([
|
|
303
303
|
u()
|
|
304
|
-
],
|
|
305
|
-
|
|
304
|
+
], P.prototype, "tokenImages", void 0);
|
|
305
|
+
P = B([
|
|
306
306
|
g("w3m-onramp-activity-view")
|
|
307
|
-
],
|
|
307
|
+
], P);
|
|
308
308
|
const ae = T`
|
|
309
309
|
:host > wui-grid {
|
|
310
310
|
max-height: 360px;
|
|
@@ -332,7 +332,7 @@ var W = function(a, e, t, r) {
|
|
|
332
332
|
else for (var n = a.length - 1; n >= 0; n--) (s = a[n]) && (i = (o < 3 ? s(i) : o > 3 ? s(e, t, i) : s(e, t)) || i);
|
|
333
333
|
return o > 3 && i && Object.defineProperty(e, t, i), i;
|
|
334
334
|
};
|
|
335
|
-
let
|
|
335
|
+
let A = class extends w {
|
|
336
336
|
constructor() {
|
|
337
337
|
super(), this.unsubscribe = [], this.selectedCurrency = l.state.paymentCurrency, this.currencies = l.state.paymentCurrencies, this.currencyImages = x.state.currencyImages, this.checked = z.state.isLegalCheckboxChecked, this.unsubscribe.push(l.subscribe((e) => {
|
|
338
338
|
this.selectedCurrency = e.paymentCurrency, this.currencies = e.paymentCurrencies;
|
|
@@ -378,22 +378,22 @@ let P = class extends w {
|
|
|
378
378
|
e && (l.setPaymentCurrency(e), I.close());
|
|
379
379
|
}
|
|
380
380
|
};
|
|
381
|
-
|
|
381
|
+
A.styles = ae;
|
|
382
382
|
W([
|
|
383
383
|
u()
|
|
384
|
-
],
|
|
384
|
+
], A.prototype, "selectedCurrency", void 0);
|
|
385
385
|
W([
|
|
386
386
|
u()
|
|
387
|
-
],
|
|
387
|
+
], A.prototype, "currencies", void 0);
|
|
388
388
|
W([
|
|
389
389
|
u()
|
|
390
|
-
],
|
|
390
|
+
], A.prototype, "currencyImages", void 0);
|
|
391
391
|
W([
|
|
392
392
|
u()
|
|
393
|
-
],
|
|
394
|
-
|
|
393
|
+
], A.prototype, "checked", void 0);
|
|
394
|
+
A = W([
|
|
395
395
|
g("w3m-onramp-fiat-select-view")
|
|
396
|
-
],
|
|
396
|
+
], A);
|
|
397
397
|
const ce = T`
|
|
398
398
|
button {
|
|
399
399
|
padding: var(--wui-spacing-s);
|
|
@@ -582,7 +582,7 @@ let Y = class extends w {
|
|
|
582
582
|
properties: {
|
|
583
583
|
isSmartAccount: ((t = S.state.preferredAccountTypes) == null ? void 0 : t[e]) === H.ACCOUNT_TYPES.SMART_ACCOUNT
|
|
584
584
|
}
|
|
585
|
-
}),
|
|
585
|
+
}), U.push("WhatIsABuy");
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
588
|
Y.styles = [le];
|
|
@@ -635,7 +635,7 @@ let K = class extends w {
|
|
|
635
635
|
onClickProvider(e) {
|
|
636
636
|
var r;
|
|
637
637
|
const t = O.state.activeChain;
|
|
638
|
-
l.setSelectedProvider(e),
|
|
638
|
+
l.setSelectedProvider(e), U.push("BuyInProgress"), V.openHref(e.url, "popupWindow", "width=600,height=800,scrollbars=yes"), G.sendEvent({
|
|
639
639
|
type: "track",
|
|
640
640
|
event: "SELECT_BUY_PROVIDER",
|
|
641
641
|
properties: {
|
|
@@ -931,7 +931,7 @@ let m = class extends w {
|
|
|
931
931
|
(await X.fetchTransactions({
|
|
932
932
|
account: e,
|
|
933
933
|
onramp: "coinbase"
|
|
934
|
-
})).data.filter((o) => new Date(o.metadata.minedAt) > new Date(this.startTime) || o.metadata.status === "ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length ? (clearInterval(this.intervalId),
|
|
934
|
+
})).data.filter((o) => new Date(o.metadata.minedAt) > new Date(this.startTime) || o.metadata.status === "ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length ? (clearInterval(this.intervalId), U.replace("OnRampActivity")) : this.startTime && Date.now() - this.startTime >= 18e4 && (clearInterval(this.intervalId), this.error = !0);
|
|
935
935
|
} catch (e) {
|
|
936
936
|
L.showError(e);
|
|
937
937
|
}
|
|
@@ -953,7 +953,7 @@ let m = class extends w {
|
|
|
953
953
|
onCopyUri() {
|
|
954
954
|
var e;
|
|
955
955
|
if (!((e = this.selectedOnRampProvider) != null && e.url)) {
|
|
956
|
-
L.showError("No link found"),
|
|
956
|
+
L.showError("No link found"), U.goBack();
|
|
957
957
|
return;
|
|
958
958
|
}
|
|
959
959
|
try {
|
|
@@ -1022,7 +1022,7 @@ let q = class extends w {
|
|
|
1022
1022
|
using your credit card or bank transfer
|
|
1023
1023
|
</wui-text>
|
|
1024
1024
|
</wui-flex>
|
|
1025
|
-
<wui-button @click=${
|
|
1025
|
+
<wui-button @click=${U.goBack}>
|
|
1026
1026
|
<wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon>
|
|
1027
1027
|
Buy
|
|
1028
1028
|
</wui-button>
|
|
@@ -1270,9 +1270,9 @@ v = $([
|
|
|
1270
1270
|
], v);
|
|
1271
1271
|
export {
|
|
1272
1272
|
m as W3mBuyInProgressView,
|
|
1273
|
-
|
|
1273
|
+
P as W3mOnRampActivityView,
|
|
1274
1274
|
K as W3mOnRampProvidersView,
|
|
1275
|
-
|
|
1275
|
+
A as W3mOnrampFiatSelectView,
|
|
1276
1276
|
_ as W3mOnrampTokensView,
|
|
1277
1277
|
v as W3mOnrampWidget,
|
|
1278
1278
|
q as W3mWhatIsABuyView
|