@cordystackx/cordy_minikit 1.5.27 → 2.0.0
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 +439 -59
- package/dist/components/Connect_wallet_bt.d.ts +1 -1
- package/dist/components/Connect_wallet_bt.d.ts.map +1 -1
- package/dist/components/Connect_wallet_bt.js +63 -3
- package/dist/components/UI_Comp.d.ts.map +1 -1
- package/dist/components/UI_Comp.js +79 -17
- package/dist/config/Image.json +4 -3
- package/dist/controllers/DisConnect.d.ts +6 -0
- package/dist/controllers/DisConnect.d.ts.map +1 -0
- package/dist/controllers/DisConnect.js +56 -0
- package/dist/controllers/Get_Account_Info.d.ts +26 -0
- package/dist/controllers/Get_Account_Info.d.ts.map +1 -0
- package/dist/controllers/Get_Account_Info.js +158 -0
- package/dist/controllers/Get_Balance.d.ts.map +1 -1
- package/dist/controllers/Get_Balance.js +16 -3
- package/dist/controllers/StellarButton.d.ts +10 -0
- package/dist/controllers/StellarButton.d.ts.map +1 -0
- package/dist/controllers/StellarButton.js +43 -0
- package/dist/controllers/Transactions.d.ts +6 -0
- package/dist/controllers/Transactions.d.ts.map +1 -1
- package/dist/controllers/Transactions.js +87 -2
- package/dist/controllers/WagmiButton.d.ts.map +1 -1
- package/dist/controllers/WagmiButton.js +15 -8
- package/dist/controllers/index.d.ts +6 -1
- package/dist/controllers/index.d.ts.map +1 -1
- package/dist/controllers/index.js +6 -1
- package/dist/controllers/loadStellarBalance.d.ts +7 -0
- package/dist/controllers/loadStellarBalance.d.ts.map +1 -0
- package/dist/controllers/loadStellarBalance.js +23 -0
- package/dist/css/UI_Comp/styles.module.css +228 -36
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/package.json +18 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/wagmi__providers.d.ts +12 -1
- package/dist/wagmi__providers.d.ts.map +1 -1
- package/dist/wagmi__providers.js +52 -3
- package/package.json +18 -5
- package/dist/controllers/Get_Sessions.d.ts +0 -2
- package/dist/controllers/Get_Sessions.d.ts.map +0 -1
- package/dist/controllers/Get_Sessions.js +0 -2
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ethers, parseUnits } from 'ethers';
|
|
3
|
+
import { Horizon, Asset, BASE_FEE, Memo, Networks, Operation, TransactionBuilder } from "@stellar/stellar-sdk";
|
|
4
|
+
import { getNetworkDetails, requestAccess, signTransaction as freighterSignTransaction } from "@stellar/freighter-api";
|
|
3
5
|
import tokenAbi from '../config/ERC20_ABI.json';
|
|
4
6
|
const tokenAddress = process.env.NEXT_PUBLIC_TOKENADDRESS || "";
|
|
7
|
+
const rpcEndpoint = process.env.NEXT_PUBLIC_RPC_ENDPOINT || "";
|
|
8
|
+
const stellarRpc = process.env.NEXT_PUBLIC_STELLAR_HORIZON || "https://horizon-testnet.stellar.org";
|
|
9
|
+
const stellarNetwork = process.env.NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE || Networks.TESTNET;
|
|
5
10
|
export default async function CordyStackTrans(address, cost) {
|
|
6
11
|
if (!address) {
|
|
7
12
|
console.error("Address Not Found");
|
|
@@ -15,6 +20,14 @@ export default async function CordyStackTrans(address, cost) {
|
|
|
15
20
|
}
|
|
16
21
|
const provider = new ethers.BrowserProvider(ethereum);
|
|
17
22
|
const signer = await provider.getSigner();
|
|
23
|
+
if (!tokenAddress) {
|
|
24
|
+
console.error("NEXT_PUBLIC_TOKENADDRESS is not configured");
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if (!rpcEndpoint) {
|
|
28
|
+
console.error("NEXT_PUBLIC_RPC_ENDPOINT is not configured");
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
18
31
|
const tokenContract = new ethers.Contract(tokenAddress, tokenAbi, signer);
|
|
19
32
|
const decimals = 18;
|
|
20
33
|
const amount = parseUnits(String(cost), decimals);
|
|
@@ -25,8 +38,9 @@ export default async function CordyStackTrans(address, cost) {
|
|
|
25
38
|
}
|
|
26
39
|
const tx = await tokenContract.transfer(address, amount);
|
|
27
40
|
const receipt = await tx.wait();
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
const txHash = receipt?.hash || tx.hash;
|
|
42
|
+
if (receipt?.status === 1 || txHash) {
|
|
43
|
+
console.log("Transaction Complete TX hash", txHash || receipt);
|
|
30
44
|
return true;
|
|
31
45
|
}
|
|
32
46
|
else {
|
|
@@ -40,3 +54,74 @@ export default async function CordyStackTrans(address, cost) {
|
|
|
40
54
|
}
|
|
41
55
|
}
|
|
42
56
|
;
|
|
57
|
+
export async function CordyStackTransStellar(address, cost, options = {}) {
|
|
58
|
+
if (!address) {
|
|
59
|
+
console.error("Address Not Found");
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
if (!Number.isFinite(cost) || cost <= 0) {
|
|
63
|
+
console.error("Stellar amount must be greater than 0");
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (typeof window === "undefined") {
|
|
67
|
+
console.error("Stellar transactions require a browser wallet");
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const access = await requestAccess();
|
|
72
|
+
const sourceAddress = options.source || access.address;
|
|
73
|
+
if (!sourceAddress) {
|
|
74
|
+
console.error("Stellar source address not found");
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
const networkDetails = await getNetworkDetails();
|
|
78
|
+
const networkPassphrase = networkDetails.networkPassphrase || stellarNetwork;
|
|
79
|
+
if (!networkPassphrase) {
|
|
80
|
+
console.error("Stellar network passphrase not found");
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (networkDetails.networkPassphrase && networkDetails.networkPassphrase !== stellarNetwork) {
|
|
84
|
+
console.error("Stellar network mismatch. Expected", stellarNetwork, "got", networkDetails.networkPassphrase);
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
const server = new Horizon.Server(stellarRpc);
|
|
88
|
+
const sourceAccount = await server.loadAccount(sourceAddress);
|
|
89
|
+
const asset = Asset.native();
|
|
90
|
+
const payment = Operation.payment({
|
|
91
|
+
destination: address,
|
|
92
|
+
asset,
|
|
93
|
+
amount: cost.toFixed(7),
|
|
94
|
+
});
|
|
95
|
+
const builder = new TransactionBuilder(sourceAccount, {
|
|
96
|
+
fee: BASE_FEE,
|
|
97
|
+
networkPassphrase,
|
|
98
|
+
})
|
|
99
|
+
.addOperation(payment)
|
|
100
|
+
.setTimeout(180);
|
|
101
|
+
const memoText = options.memo?.trim();
|
|
102
|
+
if (memoText) {
|
|
103
|
+
builder.addMemo(Memo.text(memoText.slice(0, 28)));
|
|
104
|
+
}
|
|
105
|
+
const unsignedTx = builder.build();
|
|
106
|
+
const { signedTxXdr, error } = await freighterSignTransaction(unsignedTx.toXDR(), {
|
|
107
|
+
networkPassphrase,
|
|
108
|
+
address: sourceAddress,
|
|
109
|
+
});
|
|
110
|
+
if (error || !signedTxXdr) {
|
|
111
|
+
console.error("Stellar signing failed", error);
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
const signedTx = TransactionBuilder.fromXDR(signedTxXdr, networkPassphrase);
|
|
115
|
+
const receipt = await server.submitTransaction(signedTx);
|
|
116
|
+
if (receipt?.successful && receipt?.hash) {
|
|
117
|
+
console.log("Stellar transaction complete TX hash", receipt.hash);
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
console.log("Stellar transaction failed", receipt);
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
console.error(err);
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WagmiButton.d.ts","sourceRoot":"","sources":["../../controllers/WagmiButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WagmiButton.d.ts","sourceRoot":"","sources":["../../controllers/WagmiButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,cAAc,EACf,EAAE;IACD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAC1E,qBA+CA"}
|
|
@@ -3,34 +3,41 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import React, { useEffect } from "react";
|
|
4
4
|
import { useConnect } from "wagmi";
|
|
5
5
|
import Images from "../config/Image.json";
|
|
6
|
+
const ACTIVE_WALLET_SESSION_KEY = "cordy_minikit_active_wallet_session";
|
|
6
7
|
export default function WalletButton({ onStatusChange }) {
|
|
7
|
-
const { connectors, connectAsync
|
|
8
|
+
const { connectors, connectAsync } = useConnect();
|
|
8
9
|
const [pendingConnector, setPendingConnector] = React.useState(null);
|
|
9
10
|
const [errorMsg, setErrorMsg] = React.useState(undefined);
|
|
10
|
-
|
|
11
|
-
const isPending = status === "pending";
|
|
11
|
+
const [isConnecting, setIsConnecting] = React.useState(false);
|
|
12
12
|
// Notify parent whenever status changes
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
if (onStatusChange) {
|
|
15
15
|
onStatusChange({
|
|
16
|
-
isPending,
|
|
16
|
+
isPending: isConnecting,
|
|
17
17
|
error: errorMsg,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
}, [
|
|
20
|
+
}, [isConnecting, errorMsg, onStatusChange]);
|
|
21
21
|
return (_jsx(_Fragment, { children: connectors.map((connector) => (_jsx(WalletOption, { connector: connector, onClick: async () => {
|
|
22
|
+
setIsConnecting(true);
|
|
23
|
+
setErrorMsg(undefined);
|
|
22
24
|
setPendingConnector(connector);
|
|
23
|
-
setErrorMsg(undefined); // reset old errors
|
|
24
25
|
try {
|
|
25
26
|
await connectAsync({ connector });
|
|
27
|
+
if (typeof window !== "undefined") {
|
|
28
|
+
window.localStorage.setItem(ACTIVE_WALLET_SESSION_KEY, "evm");
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
catch (err) {
|
|
28
32
|
setErrorMsg(err?.message || "Connection failed");
|
|
33
|
+
setIsConnecting(false);
|
|
34
|
+
setPendingConnector(null);
|
|
29
35
|
}
|
|
30
36
|
finally {
|
|
37
|
+
setIsConnecting(false);
|
|
31
38
|
setPendingConnector(null);
|
|
32
39
|
}
|
|
33
|
-
}, isPending: pendingConnector?.uid === connector.uid &&
|
|
40
|
+
}, isPending: pendingConnector?.uid === connector.uid && isConnecting }, connector.uid))) }));
|
|
34
41
|
}
|
|
35
42
|
function WalletOption({ connector, onClick, isPending }) {
|
|
36
43
|
const [installed, setInstalled] = React.useState(true);
|
|
@@ -50,7 +57,7 @@ function WalletOption({ connector, onClick, isPending }) {
|
|
|
50
57
|
}
|
|
51
58
|
})();
|
|
52
59
|
}, [connector]);
|
|
53
|
-
return (_jsxs("button", { onClick: onClick, children: [_jsx("img", { src: Images[connector.name] ||
|
|
60
|
+
return (_jsxs("button", { disabled: !installed, onClick: onClick, children: [_jsx("img", { src: Images[connector.name] || "", alt: connector.name, title: connector.name, width: 23, height: 18 }), isPending
|
|
54
61
|
? "Connecting..."
|
|
55
62
|
: isTrustWallet
|
|
56
63
|
? "Trust Wallet"
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export { default as WalletButton } from "./WagmiButton";
|
|
2
2
|
export { default as CordyStackTrans } from "./Transactions";
|
|
3
|
+
export { CordyStackTransStellar } from "./Transactions";
|
|
3
4
|
export { default as getTokenBalance } from "./Get_Balance";
|
|
4
5
|
export { default as AirDropFuacet } from "./AirDrop_Faucet";
|
|
5
|
-
export { default as
|
|
6
|
+
export { default as Get_Account_Info } from "./Get_Account_Info";
|
|
7
|
+
export { default as StellarWalletButton } from "./StellarButton";
|
|
8
|
+
export { default as loadStellarBalance } from "./loadStellarBalance";
|
|
9
|
+
export { default as useDisconnectWallets } from "./DisConnect";
|
|
10
|
+
export { default as useWalletStatus } from "./Get_Account_Info";
|
|
6
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../controllers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../controllers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export { default as WalletButton } from "./WagmiButton";
|
|
2
2
|
export { default as CordyStackTrans } from "./Transactions";
|
|
3
|
+
export { CordyStackTransStellar } from "./Transactions";
|
|
3
4
|
export { default as getTokenBalance } from "./Get_Balance";
|
|
4
5
|
export { default as AirDropFuacet } from "./AirDrop_Faucet";
|
|
5
|
-
export { default as
|
|
6
|
+
export { default as Get_Account_Info } from "./Get_Account_Info";
|
|
7
|
+
export { default as StellarWalletButton } from "./StellarButton";
|
|
8
|
+
export { default as loadStellarBalance } from "./loadStellarBalance";
|
|
9
|
+
export { default as useDisconnectWallets } from "./DisConnect";
|
|
10
|
+
export { default as useWalletStatus } from "./Get_Account_Info";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadStellarBalance.d.ts","sourceRoot":"","sources":["../../controllers/loadStellarBalance.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAA8B,kBAAkB,CAC9C,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC,CA8B/B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Horizon, Networks } from "@stellar/stellar-sdk";
|
|
2
|
+
import { getNetworkDetails } from "@stellar/freighter-api";
|
|
3
|
+
const STELLAR_HORIZON = process.env.NEXT_PUBLIC_STELLAR_HORIZON || "https://horizon-testnet.stellar.org";
|
|
4
|
+
const STELLAR_NETWORK_PASSPHRASE = process.env.NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE || Networks.TESTNET;
|
|
5
|
+
export default async function loadStellarBalance(accountId) {
|
|
6
|
+
const networkDetails = await getNetworkDetails();
|
|
7
|
+
const freighterPassphrase = networkDetails.networkPassphrase;
|
|
8
|
+
console.log("Freighter network details:", networkDetails);
|
|
9
|
+
console.log("Freighter passphrase:", freighterPassphrase);
|
|
10
|
+
console.log("App passphrase:", STELLAR_NETWORK_PASSPHRASE);
|
|
11
|
+
if (freighterPassphrase &&
|
|
12
|
+
freighterPassphrase !== STELLAR_NETWORK_PASSPHRASE) {
|
|
13
|
+
throw new Error(`Freighter network mismatch. Freighter: ${freighterPassphrase}, App: ${STELLAR_NETWORK_PASSPHRASE}`);
|
|
14
|
+
}
|
|
15
|
+
const server = new Horizon.Server(STELLAR_HORIZON);
|
|
16
|
+
const account = await server.loadAccount(accountId);
|
|
17
|
+
const native = account.balances.find((item) => item.asset_type === "native");
|
|
18
|
+
return {
|
|
19
|
+
address: accountId,
|
|
20
|
+
network: networkDetails.network || "TESTNET",
|
|
21
|
+
balance: native?.balance ?? "0",
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--foreground_wagmi_34535: #171717;
|
|
3
|
+
--foreground_wagmi_11111: linear-gradient(180deg, rgba(23, 23, 23, 0.98), rgba(18, 18, 18, 0.96));
|
|
3
4
|
--meduim_dark_wagmi_34535: #818181;
|
|
4
|
-
--background_wagmi_34535: #
|
|
5
|
+
--background_wagmi_34535: #f3efe4;
|
|
6
|
+
--panel_wagmi_34535: rgba(255, 255, 255, 0.04);
|
|
7
|
+
--panel-border_wagmi_34535: rgba(255, 255, 255, 0.08);
|
|
8
|
+
--accent_wagmi_34535: #33d9d3;
|
|
5
9
|
--invert-cordy-image_34535: invert(1);
|
|
6
10
|
--invert-cordy-image_1_34535: invert(0);
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
@media (prefers-color-scheme: dark) {
|
|
10
14
|
:root {
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
15
|
+
--foreground_wagmi_11111: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.96));
|
|
16
|
+
--foreground_wagmi_34535: #e9e1cc;
|
|
17
|
+
--meduim_dark_wagmi_34535: #363636;
|
|
18
|
+
--background_wagmi_34535: #111111;
|
|
19
|
+
--panel_wagmi_34535: rgba(255, 255, 255, 0.03);
|
|
20
|
+
--panel-border_wagmi_34535: rgba(51, 217, 211, 0.12);
|
|
21
|
+
--accent_wagmi_34535: #33d9d3;
|
|
14
22
|
--invert-cordy-image_34535: invert(0);
|
|
15
23
|
--invert-cordy-image_1_34535: invert(1);
|
|
16
24
|
}
|
|
@@ -18,10 +26,8 @@
|
|
|
18
26
|
|
|
19
27
|
.container,
|
|
20
28
|
.connector,
|
|
21
|
-
.connector div,
|
|
22
29
|
.info,
|
|
23
|
-
.info span
|
|
24
|
-
.connector button {
|
|
30
|
+
.info span {
|
|
25
31
|
display: flex;
|
|
26
32
|
justify-content: center;
|
|
27
33
|
align-items: center;
|
|
@@ -30,7 +36,10 @@
|
|
|
30
36
|
.container {
|
|
31
37
|
width: 100dvw;
|
|
32
38
|
height: 100dvh;
|
|
33
|
-
backdrop-filter: blur(
|
|
39
|
+
backdrop-filter: blur(18px);
|
|
40
|
+
background:
|
|
41
|
+
radial-gradient(circle at top, rgba(51, 217, 211, 0.08), transparent 28%),
|
|
42
|
+
rgba(0, 0, 0, 0.5);
|
|
34
43
|
z-index: 999;
|
|
35
44
|
position: fixed;
|
|
36
45
|
top: 50%;
|
|
@@ -39,25 +48,86 @@
|
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
.connector {
|
|
42
|
-
width: min(
|
|
51
|
+
width: min(760px, calc(100dvw - 1.5rem));
|
|
43
52
|
height: auto;
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
min-height: 420px;
|
|
54
|
+
padding: 1.25rem;
|
|
55
|
+
background: var(--foreground_wagmi_11111);
|
|
46
56
|
position: fixed;
|
|
47
|
-
box-shadow: 0 0
|
|
57
|
+
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
|
|
48
58
|
flex-flow: column;
|
|
49
59
|
overflow: hidden;
|
|
50
60
|
animation: fadeIn 300ms ease forwards;
|
|
51
|
-
border-radius:
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
border-radius: 24px;
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
54
65
|
flex-flow: column;
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
border: 1px solid var(--panel-border_wagmi_34535);
|
|
67
|
+
position: relative;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.connector::before {
|
|
71
|
+
content: "";
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset: 0;
|
|
74
|
+
border-radius: inherit;
|
|
75
|
+
background:
|
|
76
|
+
linear-gradient(135deg, rgba(51, 217, 211, 0.08), transparent 35%),
|
|
77
|
+
radial-gradient(circle at 85% 0%, rgba(51, 217, 211, 0.08), transparent 20%);
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.connector > * {
|
|
82
|
+
position: relative;
|
|
83
|
+
z-index: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.split_layout {
|
|
87
|
+
display: flex;
|
|
88
|
+
width: 100%;
|
|
89
|
+
gap: 1.25rem;
|
|
90
|
+
align-items: stretch;
|
|
91
|
+
margin: 0.75rem 0 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.left_column,
|
|
95
|
+
.right_column {
|
|
96
|
+
flex: 1;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
justify-content: flex-start;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: 0.9rem;
|
|
102
|
+
border-radius: 20px;
|
|
103
|
+
padding: 1.35rem 1.15rem;
|
|
104
|
+
background: var(--panel_wagmi_34535);
|
|
105
|
+
border: 1px solid var(--panel-border_wagmi_34535);
|
|
106
|
+
min-width: 0;
|
|
107
|
+
min-height: 260px;
|
|
108
|
+
margin: 1rem 0;
|
|
109
|
+
text-align: center;
|
|
110
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.icon_wrap {
|
|
114
|
+
width: 100%;
|
|
115
|
+
min-height: 120px;
|
|
116
|
+
display: grid;
|
|
117
|
+
place-items: center;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.status_stack {
|
|
121
|
+
width: 100%;
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: 0.2rem;
|
|
126
|
+
text-align: center;
|
|
57
127
|
}
|
|
58
128
|
|
|
59
129
|
.connector div p {
|
|
60
|
-
color: #
|
|
130
|
+
color: #d8cfb5;
|
|
61
131
|
text-align: center;
|
|
62
132
|
}
|
|
63
133
|
|
|
@@ -75,53 +145,175 @@
|
|
|
75
145
|
margin: 0 0.3rem;
|
|
76
146
|
}
|
|
77
147
|
.connector button {
|
|
78
|
-
width: 300px;
|
|
79
|
-
padding:
|
|
80
|
-
background
|
|
81
|
-
color:
|
|
148
|
+
width: min(100%, 300px);
|
|
149
|
+
padding: 0.8rem 0 0.8rem 5rem;
|
|
150
|
+
background: linear-gradient(180deg, var(--accent_wagmi_34535), #1fa9a4);
|
|
151
|
+
color: #1a1609;
|
|
82
152
|
font-weight: bold;
|
|
83
153
|
cursor: pointer;
|
|
84
|
-
border:
|
|
85
|
-
|
|
86
|
-
|
|
154
|
+
border: 0;
|
|
155
|
+
border-radius: 12px;
|
|
156
|
+
transition: all 300ms ease;
|
|
157
|
+
margin: 0.5rem 0 0;
|
|
158
|
+
box-shadow: 0 12px 28px rgba(51, 217, 211, 0.18);
|
|
159
|
+
display: flex;
|
|
160
|
+
justify-content: left;
|
|
161
|
+
align-items: center;
|
|
87
162
|
}
|
|
88
163
|
.connector button:hover {
|
|
89
|
-
|
|
164
|
+
transform: translateY(-1px);
|
|
165
|
+
filter: brightness(1.03);
|
|
90
166
|
}
|
|
91
167
|
.connector button:active {
|
|
92
|
-
transform: scale(0.
|
|
168
|
+
transform: scale(0.97);
|
|
93
169
|
}
|
|
94
170
|
|
|
95
|
-
.info
|
|
171
|
+
.info div {
|
|
96
172
|
flex-flow: column;
|
|
97
173
|
}
|
|
98
|
-
.info
|
|
99
|
-
width:
|
|
174
|
+
.info div p {
|
|
175
|
+
width: 100%;
|
|
100
176
|
overflow: hidden;
|
|
101
177
|
white-space: nowrap;
|
|
102
178
|
text-overflow: ellipsis;
|
|
103
|
-
margin:
|
|
179
|
+
margin: 0.25rem 0;
|
|
104
180
|
font-weight: bolder;
|
|
105
181
|
}
|
|
182
|
+
|
|
183
|
+
.address {
|
|
184
|
+
max-width: 100%;
|
|
185
|
+
}
|
|
106
186
|
.closed {
|
|
107
|
-
|
|
187
|
+
width: 2rem;
|
|
188
|
+
height: 2rem;
|
|
189
|
+
display: grid;
|
|
190
|
+
place-items: center;
|
|
191
|
+
padding: 0;
|
|
108
192
|
position: absolute;
|
|
109
|
-
top:
|
|
110
|
-
right:
|
|
193
|
+
top: 1rem;
|
|
194
|
+
right: 1rem;
|
|
111
195
|
font-weight: bolder;
|
|
112
196
|
border-radius: 50%;
|
|
113
|
-
|
|
197
|
+
color: var(--foreground_wagmi_34535);
|
|
198
|
+
background-color: rgba(255, 255, 255, 0.04);
|
|
114
199
|
cursor: pointer;
|
|
115
200
|
transition: all 0.5s ease;
|
|
201
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
116
202
|
}
|
|
117
203
|
.closed:hover {
|
|
118
|
-
background-color:
|
|
204
|
+
background-color: rgba(51, 217, 211, 0.14);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.connector h2 {
|
|
208
|
+
margin: 0.25rem 0 0;
|
|
209
|
+
font-size: clamp(1.15rem, 2vw, 1.55rem);
|
|
210
|
+
letter-spacing: -0.02em;
|
|
211
|
+
color: var(--foreground_wagmi_34535);
|
|
119
212
|
}
|
|
213
|
+
|
|
214
|
+
.connector h3 {
|
|
215
|
+
margin: 0;
|
|
216
|
+
color: var(--accent_wagmi_34535);
|
|
217
|
+
font-size: 1rem;
|
|
218
|
+
letter-spacing: 0.02em;
|
|
219
|
+
}
|
|
220
|
+
|
|
120
221
|
@media (max-width: 800px) {
|
|
121
222
|
.connector {
|
|
223
|
+
width: min(100dvw, 100%);
|
|
224
|
+
min-height: calc(100dvh - 1rem);
|
|
225
|
+
padding: 1rem;
|
|
122
226
|
bottom: 0;
|
|
123
227
|
border-bottom-right-radius: 0;
|
|
124
228
|
border-bottom-left-radius: 0;
|
|
229
|
+
border-top-left-radius: 20px;
|
|
230
|
+
border-top-right-radius: 20px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.split_layout {
|
|
234
|
+
flex-direction: column;
|
|
235
|
+
gap: 0.9rem;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.right_column {
|
|
239
|
+
min-height: 100px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.left_column,
|
|
243
|
+
.right_column {
|
|
244
|
+
padding: 1rem;
|
|
245
|
+
border-radius: 16px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.icon_wrap {
|
|
249
|
+
min-height: 92px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.connector button {
|
|
253
|
+
padding: 0.85rem 0.95rem;
|
|
254
|
+
width: min(100%, 280px);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.info div p {
|
|
258
|
+
white-space: normal;
|
|
259
|
+
word-break: break-word;
|
|
260
|
+
overflow-wrap: anywhere;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.connector a {
|
|
264
|
+
font-size: 0.9rem;
|
|
265
|
+
text-align: center;
|
|
266
|
+
line-height: 1.4;
|
|
125
267
|
}
|
|
126
268
|
}
|
|
127
269
|
|
|
270
|
+
.blockchain_loader {
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
justify-content: center;
|
|
274
|
+
gap: 14px;
|
|
275
|
+
width: auto;
|
|
276
|
+
min-height: 0;
|
|
277
|
+
border-radius: 18px;
|
|
278
|
+
background:
|
|
279
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
|
|
280
|
+
rgba(255, 255, 255, 0.02);
|
|
281
|
+
border: 1px solid var(--panel-border_wagmi_34535);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.connector > .blockchain_loader {
|
|
285
|
+
position: absolute;
|
|
286
|
+
top: 1rem;
|
|
287
|
+
right: 4rem;
|
|
288
|
+
z-index: 2;
|
|
289
|
+
padding: 0.8rem 1rem;
|
|
290
|
+
backdrop-filter: blur(8px);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* NODES (blocks) */
|
|
294
|
+
.node {
|
|
295
|
+
width: 16px;
|
|
296
|
+
height: 16px;
|
|
297
|
+
border-radius: 999px;
|
|
298
|
+
background: linear-gradient(135deg, var(--accent_wagmi_34535), #1fa9a4);
|
|
299
|
+
box-shadow: 0 0 10px rgba(51, 217, 211, 0.7), 0 0 20px rgba(51, 217, 211, 0.2);
|
|
300
|
+
animation: pulse 1.2s infinite ease-in-out;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.node:nth-child(1) { animation-delay: 0s; }
|
|
304
|
+
.node:nth-child(2) { animation-delay: 0.2s; }
|
|
305
|
+
.node:nth-child(3) { animation-delay: 0.4s; }
|
|
306
|
+
|
|
307
|
+
/* NODE PULSE */
|
|
308
|
+
@keyframes pulse {
|
|
309
|
+
0%, 100% {
|
|
310
|
+
transform: scale(1);
|
|
311
|
+
opacity: 0.7;
|
|
312
|
+
box-shadow: 0 0 10px rgba(51, 217, 211, 0.45);
|
|
313
|
+
}
|
|
314
|
+
50% {
|
|
315
|
+
transform: scale(1.4);
|
|
316
|
+
opacity: 1;
|
|
317
|
+
box-shadow: 0 0 18px rgba(51, 217, 211, 0.95), 0 0 36px rgba(51, 217, 211, 0.25);
|
|
318
|
+
}
|
|
319
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as ProvidersClientWrapper } from "./client__provider";
|
|
2
2
|
export { default as getConfig } from "./config/walletConfig";
|
|
3
3
|
export { useWalletModal } from "./wagmi__providers";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export { ConnectWalletBT } from "./components";
|
|
5
|
+
export { CordyStackTrans, CordyStackTransStellar, useWalletStatus, useDisconnectWallets, WalletButton, StellarWalletButton } from "./controllers";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACpB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,6 @@ export { default as getConfig } from "./config/walletConfig";
|
|
|
5
5
|
// Hooks
|
|
6
6
|
export { useWalletModal } from "./wagmi__providers";
|
|
7
7
|
//Components
|
|
8
|
-
export
|
|
8
|
+
export { ConnectWalletBT } from "./components";
|
|
9
9
|
//Controllers
|
|
10
|
-
export
|
|
10
|
+
export { CordyStackTrans, CordyStackTransStellar, useWalletStatus, useDisconnectWallets, WalletButton, StellarWalletButton } from "./controllers";
|
package/dist/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cordystackx/cordy_minikit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"description": "Cordy Minikit - Open Source Web3 Dev Toolkit
|
|
7
|
+
"description": "Cordy Minikit - Open Source Web3 Dev Toolkit for both EVM and Non-EVM Wallets",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
@@ -26,12 +26,19 @@
|
|
|
26
26
|
"blockchain",
|
|
27
27
|
"wallet-connect",
|
|
28
28
|
"npm-package",
|
|
29
|
-
"cordy-minikit"
|
|
29
|
+
"cordy-minikit",
|
|
30
|
+
"EVM Wallets",
|
|
31
|
+
"Non-EVM Wallets",
|
|
32
|
+
"Stellar",
|
|
33
|
+
"Coinbased"
|
|
30
34
|
],
|
|
31
|
-
"author": "Marc Giestin Louis Cordova",
|
|
35
|
+
"author": "Marc Giestin Louis Cordova a.k.a. (CordyStackX)",
|
|
32
36
|
"license": "MIT",
|
|
33
37
|
"dependencies": {
|
|
34
38
|
"@coinbase/wallet-sdk": "4.3.7",
|
|
39
|
+
"@metamask/connect-evm": "^2.1.0",
|
|
40
|
+
"@stellar/freighter-api": "^6.0.1",
|
|
41
|
+
"@stellar/stellar-sdk": "^16.0.1",
|
|
35
42
|
"@tanstack/react-query": "^5.101.0",
|
|
36
43
|
"@walletconnect/ethereum-provider": "^2.23.9",
|
|
37
44
|
"ethers": "^6.17.0",
|
|
@@ -39,11 +46,17 @@
|
|
|
39
46
|
"react": "^19.2.7",
|
|
40
47
|
"react-dom": "^19.2.7",
|
|
41
48
|
"react-icons": "^5.6.0",
|
|
49
|
+
"viem": "^2.53.1",
|
|
42
50
|
"wagmi": "^3.6.17"
|
|
43
51
|
},
|
|
44
52
|
"devDependencies": {
|
|
45
|
-
"@types/node": "^25.9.
|
|
53
|
+
"@types/node": "^25.9.4",
|
|
46
54
|
"@types/react": "^19.2.17",
|
|
47
55
|
"@types/react-dom": "^19.2.3"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"next": ">=13",
|
|
59
|
+
"react": ">=18",
|
|
60
|
+
"react-dom": ">=18"
|
|
48
61
|
}
|
|
49
62
|
}
|