stablezact-pay 0.71.1 → 0.71.2
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 +4 -4
- package/dist/{index-DZ1tW9EV.js → chunk-BjUnLLDi.js} +13 -11
- package/dist/{QRCodePayment-Dn8w0HYK.js → chunk-C00JHSOq.js} +2 -2
- package/dist/{appKitSolana-CnieXptB.js → chunk-CQbKSORl.js} +2 -2
- package/dist/{polygon-CXeLMH4y.js → chunk-CXeLMH4y.js} +1 -1
- package/dist/{CoinleyPayment-f7TzoM2M.js → chunk-DjhqsutD.js} +6 -6
- package/dist/{appKitEVM-CuM22PMj.js → chunk-av_vmYQK.js} +2 -2
- package/dist/{index-BRf1B18E.js → chunk-t17zG_Yg.js} +49 -65
- package/dist/index.esm.js +14 -10
- package/dist/index.umd.js +10 -10
- package/dist/{coinley-vanilla.min.js → stablezact-vanilla.min.js} +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# stablezact-pay
|
|
2
2
|
|
|
3
|
-
React and vanilla JavaScript SDK for
|
|
3
|
+
React and vanilla JavaScript SDK for Stablezact checkout.
|
|
4
4
|
|
|
5
5
|
## React / Vite Install
|
|
6
6
|
|
|
7
7
|
Use the package ESM entry for React apps:
|
|
8
8
|
|
|
9
9
|
```jsx
|
|
10
|
-
import {
|
|
11
|
-
import '
|
|
10
|
+
import { StablezactPayment } from 'stablezact-pay';
|
|
11
|
+
import 'stablezact-pay/dist/style.css';
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
The React checkout is lazy-loaded from the root entry, so Vite apps do not pull
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as Buffer$1 } from "./
|
|
1
|
+
import { B as Buffer$1 } from "./chunk-t17zG_Yg.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
|
-
import { C as CoinleyPayment } from "./
|
|
4
|
+
import { C as CoinleyPayment } from "./chunk-DjhqsutD.js";
|
|
5
5
|
const global = globalThis || void 0 || self;
|
|
6
6
|
(function initBufferPolyfill() {
|
|
7
7
|
const BufferClass = Buffer$1;
|
|
@@ -18,7 +18,7 @@ const global = globalThis || void 0 || self;
|
|
|
18
18
|
self.Buffer = BufferClass;
|
|
19
19
|
}
|
|
20
20
|
})();
|
|
21
|
-
class
|
|
21
|
+
class StablezactVanilla {
|
|
22
22
|
/**
|
|
23
23
|
* Initialize Coinley payment SDK
|
|
24
24
|
* @param {Object} config - SDK configuration
|
|
@@ -31,13 +31,13 @@ class CoinleyVanilla {
|
|
|
31
31
|
*/
|
|
32
32
|
constructor(config = {}) {
|
|
33
33
|
if (!config.publicKey && !config.apiKey) {
|
|
34
|
-
throw new Error("
|
|
34
|
+
throw new Error("StablezactVanilla: publicKey or apiKey is required");
|
|
35
35
|
}
|
|
36
36
|
if (!config.publicKey && !config.apiSecret) {
|
|
37
|
-
throw new Error("
|
|
37
|
+
throw new Error("StablezactVanilla: apiSecret is required when using apiKey");
|
|
38
38
|
}
|
|
39
39
|
if (!config.apiUrl) {
|
|
40
|
-
throw new Error("
|
|
40
|
+
throw new Error("StablezactVanilla: apiUrl is required");
|
|
41
41
|
}
|
|
42
42
|
this.config = {
|
|
43
43
|
publicKey: config.publicKey || null,
|
|
@@ -265,7 +265,8 @@ class CoinleyVanilla {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
if (typeof window !== "undefined") {
|
|
268
|
-
window.
|
|
268
|
+
window.StablezactVanilla = StablezactVanilla;
|
|
269
|
+
window.CoinleyVanilla = StablezactVanilla;
|
|
269
270
|
if (document.readyState === "loading") {
|
|
270
271
|
document.addEventListener("DOMContentLoaded", autoInitialize);
|
|
271
272
|
} else {
|
|
@@ -273,7 +274,7 @@ if (typeof window !== "undefined") {
|
|
|
273
274
|
}
|
|
274
275
|
}
|
|
275
276
|
function autoInitialize() {
|
|
276
|
-
const scripts = document.querySelectorAll('script[src*="coinley-vanilla"]');
|
|
277
|
+
const scripts = document.querySelectorAll('script[src*="stablezact-vanilla"], script[src*="coinley-vanilla"]');
|
|
277
278
|
scripts.forEach((script) => {
|
|
278
279
|
const publicKey = script.getAttribute("data-public-key");
|
|
279
280
|
const apiKey = script.getAttribute("data-api-key");
|
|
@@ -283,7 +284,7 @@ function autoInitialize() {
|
|
|
283
284
|
const debug = script.hasAttribute("data-debug");
|
|
284
285
|
if ((publicKey || apiKey && apiSecret) && apiUrl) {
|
|
285
286
|
try {
|
|
286
|
-
window.
|
|
287
|
+
window.stablezact = new StablezactVanilla({
|
|
287
288
|
publicKey,
|
|
288
289
|
apiKey,
|
|
289
290
|
apiSecret,
|
|
@@ -291,12 +292,13 @@ function autoInitialize() {
|
|
|
291
292
|
theme,
|
|
292
293
|
debug
|
|
293
294
|
});
|
|
295
|
+
window.coinley = window.stablezact;
|
|
294
296
|
} catch (error) {
|
|
295
297
|
}
|
|
296
298
|
}
|
|
297
299
|
});
|
|
298
300
|
}
|
|
299
301
|
export {
|
|
300
|
-
|
|
302
|
+
StablezactVanilla as default
|
|
301
303
|
};
|
|
302
|
-
//# sourceMappingURL=
|
|
304
|
+
//# sourceMappingURL=chunk-BjUnLLDi.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useRef, useEffect } from "react";
|
|
3
3
|
import QRCode from "qrcode";
|
|
4
4
|
import { createPublicClient, http, formatUnits, getContract } from "viem";
|
|
5
|
-
import { a as avalanche, o as optimism, b as arbitrum, p as polygon, c as bsc, m as mainnet } from "./
|
|
5
|
+
import { a as avalanche, o as optimism, b as arbitrum, p as polygon, c as bsc, m as mainnet } from "./chunk-CXeLMH4y.js";
|
|
6
6
|
const NETWORK_CHAINS = {
|
|
7
7
|
ethereum: mainnet,
|
|
8
8
|
bsc,
|
|
@@ -857,4 +857,4 @@ const QRCodePayment = ({
|
|
|
857
857
|
export {
|
|
858
858
|
QRCodePayment as default
|
|
859
859
|
};
|
|
860
|
-
//# sourceMappingURL=
|
|
860
|
+
//# sourceMappingURL=chunk-C00JHSOq.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./
|
|
1
|
+
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./chunk-DjhqsutD.js";
|
|
2
2
|
const logo = "https://coinley.io/logo.png";
|
|
3
3
|
let appKitInstance = null;
|
|
4
4
|
let isInitializing = false;
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
openAppKitModalSolana,
|
|
307
307
|
resetAppKitInstanceSolana
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=
|
|
309
|
+
//# sourceMappingURL=chunk-CQbKSORl.js.map
|
|
@@ -6,11 +6,11 @@ import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
|
6
6
|
import ReactDOM, { createPortal } from "react-dom";
|
|
7
7
|
import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
|
|
8
8
|
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
9
|
-
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./
|
|
9
|
+
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./chunk-t17zG_Yg.js";
|
|
10
10
|
import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
|
|
11
11
|
import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
|
|
12
12
|
import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
|
|
13
|
-
import { d as defineFormatter, e as bytesToHex, n as numberToHex, f as maxUint16, h as hexToBytes, t as toHex, g as defineTransactionReceipt, i as hexToBigInt, j as hexToNumber$1, k as formatLog, l as defineTransaction, q as defineBlock, r as formatUnits, s as etherUnits, B as BaseError, I as InvalidChainIdError, u as isAddress, v as InvalidAddressError, w as serializeTransaction$2, x as concatHex, y as toRlp, z as toBytes, A as sha256, C as pad, D as defineChain, E as chainConfig$3, F as trim, G as formatTransaction, H as serializeTransaction$3, J as serializeAccessList, K as toYParitySignatureArray, L as FeeCapTooHighError, T as TipAboveFeeCapError, M as maxUint256, N as contracts, O as prettyPrint, P as formatGwei, Q as ExecutionRevertedError, R as FeeCapTooLowError, S as NonceTooHighError, U as NonceTooLowError, V as NonceMaxValueError, W as InsufficientFundsError, X as IntrinsicGasTooHighError, Y as IntrinsicGasTooLowError, Z as TransactionTypeNotSupportedError, _ as UnknownNodeError, $ as Hash, a0 as ahash, a1 as toBytes$1, a2 as clean, a3 as aexists, a4 as abytes, m as mainnet, o as optimism, c as bsc, p as polygon, b as arbitrum, a as avalanche, a5 as bytesToHex$1, a6 as hexToBytes$1, a7 as isBytes, a8 as concatBytes, a9 as anumber, aa as randomBytes, ab as sha512, ac as sha256$1, ad as sha256$2, ae as keccak_256 } from "./
|
|
13
|
+
import { d as defineFormatter, e as bytesToHex, n as numberToHex, f as maxUint16, h as hexToBytes, t as toHex, g as defineTransactionReceipt, i as hexToBigInt, j as hexToNumber$1, k as formatLog, l as defineTransaction, q as defineBlock, r as formatUnits, s as etherUnits, B as BaseError, I as InvalidChainIdError, u as isAddress, v as InvalidAddressError, w as serializeTransaction$2, x as concatHex, y as toRlp, z as toBytes, A as sha256, C as pad, D as defineChain, E as chainConfig$3, F as trim, G as formatTransaction, H as serializeTransaction$3, J as serializeAccessList, K as toYParitySignatureArray, L as FeeCapTooHighError, T as TipAboveFeeCapError, M as maxUint256, N as contracts, O as prettyPrint, P as formatGwei, Q as ExecutionRevertedError, R as FeeCapTooLowError, S as NonceTooHighError, U as NonceTooLowError, V as NonceMaxValueError, W as InsufficientFundsError, X as IntrinsicGasTooHighError, Y as IntrinsicGasTooLowError, Z as TransactionTypeNotSupportedError, _ as UnknownNodeError, $ as Hash, a0 as ahash, a1 as toBytes$1, a2 as clean, a3 as aexists, a4 as abytes, m as mainnet, o as optimism, c as bsc, p as polygon, b as arbitrum, a as avalanche, a5 as bytesToHex$1, a6 as hexToBytes$1, a7 as isBytes, a8 as concatBytes, a9 as anumber, aa as randomBytes, ab as sha512, ac as sha256$1, ad as sha256$2, ae as keccak_256 } from "./chunk-CXeLMH4y.js";
|
|
14
14
|
import { useAppKitAccount } from "@reown/appkit/react";
|
|
15
15
|
import QRCode from "qrcode";
|
|
16
16
|
const rpcTransactionType = {
|
|
@@ -23643,7 +23643,7 @@ const WalletSelector = ({
|
|
|
23643
23643
|
try {
|
|
23644
23644
|
setAppKitError(null);
|
|
23645
23645
|
setWalletConnectAddress(solanaAccountState.address);
|
|
23646
|
-
const { createWalletConnectAdapter } = await import("./
|
|
23646
|
+
const { createWalletConnectAdapter } = await import("./chunk-CQbKSORl.js");
|
|
23647
23647
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
23648
23648
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
23649
23649
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -23748,7 +23748,7 @@ const WalletSelector = ({
|
|
|
23748
23748
|
setAppKitLoading(true);
|
|
23749
23749
|
setAppKitError(null);
|
|
23750
23750
|
try {
|
|
23751
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./
|
|
23751
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./chunk-av_vmYQK.js");
|
|
23752
23752
|
await initializeAppKitEVM(wagmiConfig);
|
|
23753
23753
|
await openAppKitModal();
|
|
23754
23754
|
} catch (error) {
|
|
@@ -23768,7 +23768,7 @@ const WalletSelector = ({
|
|
|
23768
23768
|
setAppKitError(null);
|
|
23769
23769
|
try {
|
|
23770
23770
|
console.log("📦 Loading AppKit Solana module...");
|
|
23771
|
-
const { initializeAppKitSolana } = await import("./
|
|
23771
|
+
const { initializeAppKitSolana } = await import("./chunk-CQbKSORl.js");
|
|
23772
23772
|
console.log("✅ Module loaded, initializing...");
|
|
23773
23773
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
23774
23774
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -31147,4 +31147,4 @@ export {
|
|
|
31147
31147
|
chainTransports as c,
|
|
31148
31148
|
isFeatureEnabled as i
|
|
31149
31149
|
};
|
|
31150
|
-
//# sourceMappingURL=
|
|
31150
|
+
//# sourceMappingURL=chunk-DjhqsutD.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./
|
|
1
|
+
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./chunk-DjhqsutD.js";
|
|
2
2
|
const logo = "https://coinley.io/logo.png";
|
|
3
3
|
let appKitInstance = null;
|
|
4
4
|
let isInitializing = false;
|
|
@@ -135,4 +135,4 @@ export {
|
|
|
135
135
|
openAppKitModal,
|
|
136
136
|
resetAppKitInstance
|
|
137
137
|
};
|
|
138
|
-
//# sourceMappingURL=
|
|
138
|
+
//# sourceMappingURL=chunk-av_vmYQK.js.map
|
|
@@ -1806,7 +1806,7 @@ const dist = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
1806
1806
|
resolveObjectURL,
|
|
1807
1807
|
transcode
|
|
1808
1808
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1809
|
-
const LazyCoinleyPayment = React.lazy(() => import("./
|
|
1809
|
+
const LazyCoinleyPayment = React.lazy(() => import("./chunk-DjhqsutD.js").then((n2) => n2.a));
|
|
1810
1810
|
const CoinleyPayment = (props) => /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoinleyPayment, { ...props }) });
|
|
1811
1811
|
const CoinleyContext = createContext(null);
|
|
1812
1812
|
const CoinleyProvider = ({
|
|
@@ -2228,9 +2228,9 @@ class PaymentAPI {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
const LazyQRCodePayment = React.lazy(() => import("./
|
|
2231
|
+
const LazyQRCodePayment = React.lazy(() => import("./chunk-C00JHSOq.js"));
|
|
2232
2232
|
const QRCodePayment = (props) => /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyQRCodePayment, { ...props }) });
|
|
2233
|
-
class
|
|
2233
|
+
class LazyStablezactVanilla {
|
|
2234
2234
|
constructor(config = {}) {
|
|
2235
2235
|
this.config = config;
|
|
2236
2236
|
this.instance = null;
|
|
@@ -2241,9 +2241,9 @@ class LazyCoinleyVanilla {
|
|
|
2241
2241
|
return this.instance;
|
|
2242
2242
|
}
|
|
2243
2243
|
if (!this.loading) {
|
|
2244
|
-
this.loading = import("./
|
|
2245
|
-
const
|
|
2246
|
-
this.instance = new
|
|
2244
|
+
this.loading = import("./chunk-BjUnLLDi.js").then((module) => {
|
|
2245
|
+
const StablezactVanilla = module.default || module.StablezactVanilla || module.CoinleyVanilla;
|
|
2246
|
+
this.instance = new StablezactVanilla(this.config);
|
|
2247
2247
|
return this.instance;
|
|
2248
2248
|
});
|
|
2249
2249
|
}
|
|
@@ -23960,10 +23960,11 @@ if (typeof window !== "undefined") {
|
|
|
23960
23960
|
if (typeof globalThis !== "undefined") {
|
|
23961
23961
|
globalThis.Buffer = Buffer$1;
|
|
23962
23962
|
}
|
|
23963
|
-
const
|
|
23964
|
-
const
|
|
23963
|
+
const SimpleStablezactProvider = ({ children, ...props }) => children;
|
|
23964
|
+
const SimpleCoinleyProvider = SimpleStablezactProvider;
|
|
23965
|
+
const VERSION = "0.71.2";
|
|
23965
23966
|
if (typeof console !== "undefined") {
|
|
23966
|
-
console.log(`[
|
|
23967
|
+
console.log(`[stablezact-pay] build version ${VERSION}`);
|
|
23967
23968
|
}
|
|
23968
23969
|
const utils = {
|
|
23969
23970
|
formatAmount: (amount, decimals = 2) => amount.toFixed(decimals),
|
|
@@ -23996,13 +23997,19 @@ const utils = {
|
|
|
23996
23997
|
}
|
|
23997
23998
|
}
|
|
23998
23999
|
};
|
|
23999
|
-
class
|
|
24000
|
+
class StablezactError extends Error {
|
|
24000
24001
|
constructor(message, code2) {
|
|
24001
24002
|
super(message);
|
|
24002
|
-
this.name = "
|
|
24003
|
+
this.name = "StablezactError";
|
|
24003
24004
|
this.code = code2;
|
|
24004
24005
|
}
|
|
24005
24006
|
}
|
|
24007
|
+
class CoinleyError extends StablezactError {
|
|
24008
|
+
constructor(message, code2) {
|
|
24009
|
+
super(message, code2);
|
|
24010
|
+
this.name = "CoinleyError";
|
|
24011
|
+
}
|
|
24012
|
+
}
|
|
24006
24013
|
const DEFAULT_CONFIG = {
|
|
24007
24014
|
theme: "light",
|
|
24008
24015
|
debug: false,
|
|
@@ -24012,62 +24019,37 @@ const DEFAULT_CONFIG = {
|
|
|
24012
24019
|
const USAGE_EXAMPLES = {
|
|
24013
24020
|
// React usage with new publicKey (recommended)
|
|
24014
24021
|
react: `
|
|
24015
|
-
import {
|
|
24022
|
+
import { StablezactPayment, PaymentAPI } from 'stablezact-pay';
|
|
24023
|
+
import 'stablezact-pay/dist/style.css';
|
|
24016
24024
|
|
|
24017
|
-
|
|
24018
|
-
<CoinleyProvider
|
|
24025
|
+
<StablezactPayment
|
|
24019
24026
|
publicKey="pk_your-public-key"
|
|
24020
|
-
apiUrl="https://
|
|
24021
|
-
|
|
24022
|
-
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
console.log('Currency:', currency); // e.g., 'USDT', 'USDC'
|
|
24031
|
-
console.log('Full Details:', paymentDetails);
|
|
24032
|
-
}}
|
|
24033
|
-
onError={(error) => console.error('Error:', error)}
|
|
24034
|
-
onClose={() => console.log('Closed')}
|
|
24035
|
-
/>
|
|
24036
|
-
</CoinleyProvider>
|
|
24037
|
-
|
|
24038
|
-
// Legacy way (still supported) - using apiKey + apiSecret
|
|
24039
|
-
<CoinleyProvider
|
|
24040
|
-
apiKey="your-api-key"
|
|
24041
|
-
apiSecret="your-api-secret"
|
|
24042
|
-
apiUrl="https://api.coinley.io"
|
|
24043
|
-
>
|
|
24044
|
-
...
|
|
24045
|
-
</CoinleyProvider>
|
|
24027
|
+
apiUrl="https://hub.stablezact.com"
|
|
24028
|
+
config={{
|
|
24029
|
+
amount: 100,
|
|
24030
|
+
customerEmail: "customer@example.com",
|
|
24031
|
+
merchantName: "Your Store"
|
|
24032
|
+
}}
|
|
24033
|
+
onSuccess={({ paymentId, transactionHash }) => console.log(paymentId, transactionHash)}
|
|
24034
|
+
onError={(error) => console.error(error)}
|
|
24035
|
+
onClose={() => console.log('Closed')}
|
|
24036
|
+
/>
|
|
24046
24037
|
`,
|
|
24047
24038
|
// Vanilla JavaScript usage
|
|
24048
24039
|
vanilla: `
|
|
24049
24040
|
<!-- Include via CDN -->
|
|
24050
|
-
<script src="https://unpkg.com/
|
|
24051
|
-
<link rel="stylesheet" href="https://unpkg.com/
|
|
24041
|
+
<script src="https://unpkg.com/stablezact-pay@latest/dist/stablezact-vanilla.min.js"><\/script>
|
|
24042
|
+
<link rel="stylesheet" href="https://unpkg.com/stablezact-pay@latest/dist/style.css">
|
|
24052
24043
|
|
|
24053
24044
|
<script>
|
|
24054
|
-
|
|
24055
|
-
const coinley = new CoinleyVanilla({
|
|
24045
|
+
const stablezact = new StablezactVanilla({
|
|
24056
24046
|
publicKey: "pk_your-public-key",
|
|
24057
|
-
apiUrl: "https://
|
|
24058
|
-
theme: "light"
|
|
24059
|
-
});
|
|
24060
|
-
|
|
24061
|
-
// Legacy way (still supported)
|
|
24062
|
-
const coinleyLegacy = new CoinleyVanilla({
|
|
24063
|
-
apiKey: "your-api-key",
|
|
24064
|
-
apiSecret: "your-api-secret",
|
|
24065
|
-
apiUrl: "https://api.coinley.io",
|
|
24047
|
+
apiUrl: "https://hub.stablezact.com",
|
|
24066
24048
|
theme: "light"
|
|
24067
24049
|
});
|
|
24068
24050
|
|
|
24069
24051
|
// Use in checkout
|
|
24070
|
-
|
|
24052
|
+
stablezact.open({
|
|
24071
24053
|
amount: 100,
|
|
24072
24054
|
currency: "USD", // Supported: USD, EUR, NGN, GHS, ZAR
|
|
24073
24055
|
customerEmail: "customer@example.com",
|
|
@@ -24093,7 +24075,7 @@ export {
|
|
|
24093
24075
|
Buffer$1 as B,
|
|
24094
24076
|
CoinleyCheckout as C,
|
|
24095
24077
|
DEFAULT_CONFIG as D,
|
|
24096
|
-
|
|
24078
|
+
LazyStablezactVanilla as L,
|
|
24097
24079
|
PaymentAPI as P,
|
|
24098
24080
|
QRCodePayment as Q,
|
|
24099
24081
|
SimpleCoinleyProvider as S,
|
|
@@ -24111,16 +24093,18 @@ export {
|
|
|
24111
24093
|
isSupportedCurrency as i,
|
|
24112
24094
|
CoinleyProvider as j,
|
|
24113
24095
|
PaymentQRGenerator as k,
|
|
24114
|
-
|
|
24115
|
-
|
|
24116
|
-
|
|
24117
|
-
|
|
24096
|
+
SimpleStablezactProvider as l,
|
|
24097
|
+
StablezactError as m,
|
|
24098
|
+
coinleyWebhookMiddleware as n,
|
|
24099
|
+
convertFromUSD as o,
|
|
24118
24100
|
prefetchRates as p,
|
|
24119
|
-
|
|
24120
|
-
|
|
24101
|
+
generatePaymentQR as q,
|
|
24102
|
+
generatePaymentURL as r,
|
|
24121
24103
|
sdkAnalytics as s,
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24104
|
+
getSupportedCurrencies as t,
|
|
24105
|
+
paymentQR as u,
|
|
24106
|
+
useCoinley as v,
|
|
24107
|
+
utils as w,
|
|
24108
|
+
verifyWebhookSignature as x
|
|
24125
24109
|
};
|
|
24126
|
-
//# sourceMappingURL=
|
|
24110
|
+
//# sourceMappingURL=chunk-t17zG_Yg.js.map
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C, e, h, j, L, D, P, k, Q, S, T, U, V, c,
|
|
1
|
+
import { C, e, h, j, L, D, P, k, Q, S, l, m, h as h2, L as L2, T, U, V, c, n, o, b, f, q, r, g, t, i, u, p, s, v, w, x } from "./chunk-t17zG_Yg.js";
|
|
2
2
|
export {
|
|
3
3
|
C as CoinleyCheckout,
|
|
4
4
|
e as CoinleyError,
|
|
@@ -10,24 +10,28 @@ export {
|
|
|
10
10
|
k as PaymentQRGenerator,
|
|
11
11
|
Q as QRCodePayment,
|
|
12
12
|
S as SimpleCoinleyProvider,
|
|
13
|
+
l as SimpleStablezactProvider,
|
|
14
|
+
m as StablezactError,
|
|
15
|
+
h2 as StablezactPayment,
|
|
16
|
+
L2 as StablezactVanilla,
|
|
13
17
|
T as ThemeProvider,
|
|
14
18
|
U as USAGE_EXAMPLES,
|
|
15
19
|
V as VERSION,
|
|
16
20
|
c as clarityAnalytics,
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
n as coinleyWebhookMiddleware,
|
|
22
|
+
o as convertFromUSD,
|
|
19
23
|
b as convertToUSD,
|
|
20
24
|
f as formatCurrency,
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
q as generatePaymentQR,
|
|
26
|
+
r as generatePaymentURL,
|
|
23
27
|
g as getCurrencyInfo,
|
|
24
|
-
|
|
28
|
+
t as getSupportedCurrencies,
|
|
25
29
|
i as isSupportedCurrency,
|
|
26
|
-
|
|
30
|
+
u as paymentQR,
|
|
27
31
|
p as prefetchRates,
|
|
28
32
|
s as sdkAnalytics,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
v as useCoinley,
|
|
34
|
+
w as utils,
|
|
35
|
+
x as verifyWebhookSignature
|
|
32
36
|
};
|
|
33
37
|
//# sourceMappingURL=index.esm.js.map
|