coinley-pay 0.0.42 → 0.0.44
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID, l as logo } from "./index-
|
|
1
|
+
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID, l as logo } from "./index-BKw-Swie.js";
|
|
2
2
|
let appKitInstance = null;
|
|
3
3
|
let isInitializing = false;
|
|
4
4
|
let initializationPromise = null;
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
initializeAppKitEVM,
|
|
113
113
|
openAppKitModal
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=appKitEVM-
|
|
115
|
+
//# sourceMappingURL=appKitEVM-BzAo5oJE.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FEATURES, l as logo, W as WALLETCONNECT_PROJECT_ID } from "./index-
|
|
1
|
+
import { F as FEATURES, l as logo, W as WALLETCONNECT_PROJECT_ID } from "./index-BKw-Swie.js";
|
|
2
2
|
let appKitInstance = null;
|
|
3
3
|
let isInitializing = false;
|
|
4
4
|
let initializationPromise = null;
|
|
@@ -242,4 +242,4 @@ export {
|
|
|
242
242
|
disconnectWalletConnect,
|
|
243
243
|
initializeAppKitSolana
|
|
244
244
|
};
|
|
245
|
-
//# sourceMappingURL=appKitSolana-
|
|
245
|
+
//# sourceMappingURL=appKitSolana-DdTk286q.js.map
|
|
@@ -44940,7 +44940,7 @@ const WalletSelector = ({
|
|
|
44940
44940
|
try {
|
|
44941
44941
|
setAppKitError(null);
|
|
44942
44942
|
setWalletConnectAddress(solanaAccountState.address);
|
|
44943
|
-
const { createWalletConnectAdapter } = await import("./appKitSolana-
|
|
44943
|
+
const { createWalletConnectAdapter } = await import("./appKitSolana-DdTk286q.js");
|
|
44944
44944
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
44945
44945
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
44946
44946
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -45045,7 +45045,7 @@ const WalletSelector = ({
|
|
|
45045
45045
|
setAppKitLoading(true);
|
|
45046
45046
|
setAppKitError(null);
|
|
45047
45047
|
try {
|
|
45048
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-
|
|
45048
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-BzAo5oJE.js");
|
|
45049
45049
|
await initializeAppKitEVM(wagmiConfig);
|
|
45050
45050
|
await openAppKitModal();
|
|
45051
45051
|
} catch (error) {
|
|
@@ -45065,7 +45065,7 @@ const WalletSelector = ({
|
|
|
45065
45065
|
setAppKitError(null);
|
|
45066
45066
|
try {
|
|
45067
45067
|
console.log("📦 Loading AppKit Solana module...");
|
|
45068
|
-
const { initializeAppKitSolana } = await import("./appKitSolana-
|
|
45068
|
+
const { initializeAppKitSolana } = await import("./appKitSolana-DdTk286q.js");
|
|
45069
45069
|
console.log("✅ Module loaded, initializing...");
|
|
45070
45070
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
45071
45071
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -46933,8 +46933,8 @@ const CoinleyProvider = ({
|
|
|
46933
46933
|
apiUrl,
|
|
46934
46934
|
theme = "light",
|
|
46935
46935
|
debug = false,
|
|
46936
|
-
enableAgentDiscovery =
|
|
46937
|
-
//
|
|
46936
|
+
enableAgentDiscovery = true,
|
|
46937
|
+
// expose publicKey via meta tag for MCP agent discovery
|
|
46938
46938
|
children
|
|
46939
46939
|
}) => {
|
|
46940
46940
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -47547,7 +47547,7 @@ const RedesignedCoinleyPaymentInternal = ({
|
|
|
47547
47547
|
return getSolanaRpcEndpoints();
|
|
47548
47548
|
}, [isSolana, paymentFlow.selectedNetwork, isSolanaDevnet]);
|
|
47549
47549
|
const solanaTransaction = useSolanaTransaction(solanaRpcEndpoints, solanaWallet.connectedWallet);
|
|
47550
|
-
const [activeTab, setActiveTab] = useState(PAYMENT_TABS.
|
|
47550
|
+
const [activeTab, setActiveTab] = useState(PAYMENT_TABS.WALLET);
|
|
47551
47551
|
const [networkSearch, setNetworkSearch] = useState("");
|
|
47552
47552
|
const [showWalletConfirm, setShowWalletConfirm] = useState(false);
|
|
47553
47553
|
const [qrCodeDataUrl, setQrCodeDataUrl] = useState("");
|
|
@@ -49031,11 +49031,11 @@ const RedesignedCoinleyPaymentInternal = ({
|
|
|
49031
49031
|
/* @__PURE__ */ jsxs(
|
|
49032
49032
|
"button",
|
|
49033
49033
|
{
|
|
49034
|
-
onClick: () => handleMobileTabSelect(PAYMENT_TABS.
|
|
49035
|
-
className: `w-full flex items-center gap-4 px-5 py-4 rounded-xl text-left transition-all ${activeTab === PAYMENT_TABS.
|
|
49034
|
+
onClick: () => handleMobileTabSelect(PAYMENT_TABS.WALLET),
|
|
49035
|
+
className: `w-full flex items-center gap-4 px-5 py-4 rounded-xl text-left transition-all ${activeTab === PAYMENT_TABS.WALLET ? "bg-white text-[#7042D2] border-l-4 border-[#7042D2] shadow-sm " : "text-gray-400 hover:bg-gray-50"}`,
|
|
49036
49036
|
children: [
|
|
49037
|
-
/* @__PURE__ */ jsx("svg", { className: "w-6 h-6 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24",
|
|
49038
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "
|
|
49037
|
+
/* @__PURE__ */ jsx("svg", { className: "w-6 h-6 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" }) }),
|
|
49038
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Wallet extension" })
|
|
49039
49039
|
]
|
|
49040
49040
|
}
|
|
49041
49041
|
),
|
|
@@ -49053,11 +49053,11 @@ const RedesignedCoinleyPaymentInternal = ({
|
|
|
49053
49053
|
/* @__PURE__ */ jsxs(
|
|
49054
49054
|
"button",
|
|
49055
49055
|
{
|
|
49056
|
-
onClick: () => handleMobileTabSelect(PAYMENT_TABS.
|
|
49057
|
-
className: `w-full flex items-center gap-4 px-5 py-4 rounded-xl text-left transition-all ${activeTab === PAYMENT_TABS.
|
|
49056
|
+
onClick: () => handleMobileTabSelect(PAYMENT_TABS.TRANSFER),
|
|
49057
|
+
className: `w-full flex items-center gap-4 px-5 py-4 rounded-xl text-left transition-all ${activeTab === PAYMENT_TABS.TRANSFER ? "bg-white text-[#7042D2] border-l-4 border-[#7042D2] shadow-sm" : "text-gray-400 hover:bg-gray-50"}`,
|
|
49058
49058
|
children: [
|
|
49059
|
-
/* @__PURE__ */ jsx("svg", { className: "w-6 h-6 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round",
|
|
49060
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "
|
|
49059
|
+
/* @__PURE__ */ jsx("svg", { className: "w-6 h-6 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" }) }),
|
|
49060
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Transfer to address" })
|
|
49061
49061
|
]
|
|
49062
49062
|
}
|
|
49063
49063
|
)
|
|
@@ -49100,11 +49100,11 @@ const RedesignedCoinleyPaymentInternal = ({
|
|
|
49100
49100
|
/* @__PURE__ */ jsxs(
|
|
49101
49101
|
"button",
|
|
49102
49102
|
{
|
|
49103
|
-
onClick: () => setActiveTab(PAYMENT_TABS.
|
|
49104
|
-
className: `flex items-center gap-3 px-4 py-3 rounded-r-xl text-left transition-all mb-2 ${activeTab === PAYMENT_TABS.
|
|
49103
|
+
onClick: () => setActiveTab(PAYMENT_TABS.WALLET),
|
|
49104
|
+
className: `flex items-center gap-3 px-4 py-3 rounded-r-xl text-left transition-all mb-2 ${activeTab === PAYMENT_TABS.WALLET ? "bg-white text-[#7042D2] border-l-4 border-[#7042D2] shadow-sm" : "text-gray-400 hover:bg-gray-100"}`,
|
|
49105
49105
|
children: [
|
|
49106
|
-
/* @__PURE__ */ jsx("svg", { className: "w-5 h-5
|
|
49107
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: "
|
|
49106
|
+
/* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" }) }),
|
|
49107
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: "Wallet extension" })
|
|
49108
49108
|
]
|
|
49109
49109
|
}
|
|
49110
49110
|
),
|
|
@@ -49122,11 +49122,11 @@ const RedesignedCoinleyPaymentInternal = ({
|
|
|
49122
49122
|
/* @__PURE__ */ jsxs(
|
|
49123
49123
|
"button",
|
|
49124
49124
|
{
|
|
49125
|
-
onClick: () => setActiveTab(PAYMENT_TABS.
|
|
49126
|
-
className: `flex items-center gap-3 px-4 py-3 rounded-xl text-left transition-all ${activeTab === PAYMENT_TABS.
|
|
49125
|
+
onClick: () => setActiveTab(PAYMENT_TABS.TRANSFER),
|
|
49126
|
+
className: `flex items-center gap-3 px-4 py-3 rounded-xl text-left transition-all ${activeTab === PAYMENT_TABS.TRANSFER ? "bg-white text-[#7042D2] border-l-4 border-[#7042D2] shadow-sm" : "text-gray-400 hover:bg-gray-100"}`,
|
|
49127
49127
|
children: [
|
|
49128
|
-
/* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round",
|
|
49129
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: "
|
|
49128
|
+
/* @__PURE__ */ jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" }) }),
|
|
49129
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: "Transfer to address" })
|
|
49130
49130
|
]
|
|
49131
49131
|
}
|
|
49132
49132
|
)
|
|
@@ -49154,6 +49154,24 @@ const RedesignedCoinleyPaymentInternal = ({
|
|
|
49154
49154
|
] });
|
|
49155
49155
|
};
|
|
49156
49156
|
const RedesignedCoinleyPayment = (props) => {
|
|
49157
|
+
const { apiUrl, publicKey: publicKey2, enableAgentDiscovery = true } = props;
|
|
49158
|
+
useEffect(() => {
|
|
49159
|
+
const apiMeta = document.createElement("meta");
|
|
49160
|
+
apiMeta.name = "coinley:api";
|
|
49161
|
+
apiMeta.content = apiUrl || "https://api.coinley.com";
|
|
49162
|
+
document.head.appendChild(apiMeta);
|
|
49163
|
+
let keyMeta;
|
|
49164
|
+
if (enableAgentDiscovery && publicKey2) {
|
|
49165
|
+
keyMeta = document.createElement("meta");
|
|
49166
|
+
keyMeta.name = "coinley:public-key";
|
|
49167
|
+
keyMeta.content = publicKey2;
|
|
49168
|
+
document.head.appendChild(keyMeta);
|
|
49169
|
+
}
|
|
49170
|
+
return () => {
|
|
49171
|
+
apiMeta.remove();
|
|
49172
|
+
if (keyMeta) keyMeta.remove();
|
|
49173
|
+
};
|
|
49174
|
+
}, [apiUrl, publicKey2, enableAgentDiscovery]);
|
|
49157
49175
|
return /* @__PURE__ */ jsx(WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(RedesignedCoinleyPaymentInternal, { ...props }) }) });
|
|
49158
49176
|
};
|
|
49159
49177
|
const NETWORK_CHAINS = {
|
|
@@ -50662,4 +50680,4 @@ export {
|
|
|
50662
50680
|
prefetchRates as t,
|
|
50663
50681
|
utils as u
|
|
50664
50682
|
};
|
|
50665
|
-
//# sourceMappingURL=index-
|
|
50683
|
+
//# sourceMappingURL=index-BKw-Swie.js.map
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b, C, a, e, D, E, P, f, Q, R, S, T, U, V, j, m, k, n, g, h, q, r, o, p, t, s, d, u } from "./index-
|
|
1
|
+
import { b, C, a, e, D, E, P, f, Q, R, S, T, U, V, j, m, k, n, g, h, q, r, o, p, t, s, d, u } from "./index-BKw-Swie.js";
|
|
2
2
|
export {
|
|
3
3
|
b as CoinleyCheckout,
|
|
4
4
|
C as CoinleyError,
|