@cordystackx/cordy_minikit 1.5.34 → 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.map +1 -1
- package/dist/components/Connect_wallet_bt.js +62 -11
- 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 +6 -2
- 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 +193 -44
- 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 +16 -4
- 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 +16 -4
- 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,8 +3,9 @@ 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 [isConnecting, setIsConnecting] = React.useState(false);
|
|
@@ -23,6 +24,9 @@ export default function WalletButton({ onStatusChange }) {
|
|
|
23
24
|
setPendingConnector(connector);
|
|
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");
|
|
@@ -53,7 +57,7 @@ function WalletOption({ connector, onClick, isPending }) {
|
|
|
53
57
|
}
|
|
54
58
|
})();
|
|
55
59
|
}, [connector]);
|
|
56
|
-
return (_jsxs("button", { disabled: !installed, 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
|
|
57
61
|
? "Connecting..."
|
|
58
62
|
: isTrustWallet
|
|
59
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,30 +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
|
-
min-height:
|
|
45
|
-
padding:
|
|
46
|
-
background
|
|
53
|
+
min-height: 420px;
|
|
54
|
+
padding: 1.25rem;
|
|
55
|
+
background: var(--foreground_wagmi_11111);
|
|
47
56
|
position: fixed;
|
|
48
|
-
box-shadow: 0 0
|
|
57
|
+
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
|
|
49
58
|
flex-flow: column;
|
|
50
59
|
overflow: hidden;
|
|
51
60
|
animation: fadeIn 300ms ease forwards;
|
|
52
|
-
border-radius:
|
|
61
|
+
border-radius: 24px;
|
|
53
62
|
display: flex;
|
|
54
63
|
justify-content: center;
|
|
55
64
|
align-items: center;
|
|
56
65
|
flex-flow: column;
|
|
66
|
+
border: 1px solid var(--panel-border_wagmi_34535);
|
|
67
|
+
position: relative;
|
|
57
68
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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;
|
|
62
127
|
}
|
|
63
128
|
|
|
64
129
|
.connector div p {
|
|
65
|
-
color: #
|
|
130
|
+
color: #d8cfb5;
|
|
66
131
|
text-align: center;
|
|
67
132
|
}
|
|
68
133
|
|
|
@@ -80,18 +145,24 @@
|
|
|
80
145
|
margin: 0 0.3rem;
|
|
81
146
|
}
|
|
82
147
|
.connector button {
|
|
83
|
-
width: 300px;
|
|
84
|
-
padding:
|
|
85
|
-
background
|
|
86
|
-
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;
|
|
87
152
|
font-weight: bold;
|
|
88
153
|
cursor: pointer;
|
|
89
|
-
border:
|
|
154
|
+
border: 0;
|
|
155
|
+
border-radius: 12px;
|
|
90
156
|
transition: all 300ms ease;
|
|
91
|
-
margin:
|
|
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;
|
|
92
162
|
}
|
|
93
163
|
.connector button:hover {
|
|
94
|
-
|
|
164
|
+
transform: translateY(-1px);
|
|
165
|
+
filter: brightness(1.03);
|
|
95
166
|
}
|
|
96
167
|
.connector button:active {
|
|
97
168
|
transform: scale(0.97);
|
|
@@ -101,33 +172,98 @@
|
|
|
101
172
|
flex-flow: column;
|
|
102
173
|
}
|
|
103
174
|
.info div p {
|
|
104
|
-
width:
|
|
175
|
+
width: 100%;
|
|
105
176
|
overflow: hidden;
|
|
106
177
|
white-space: nowrap;
|
|
107
178
|
text-overflow: ellipsis;
|
|
108
|
-
margin:
|
|
179
|
+
margin: 0.25rem 0;
|
|
109
180
|
font-weight: bolder;
|
|
110
181
|
}
|
|
182
|
+
|
|
183
|
+
.address {
|
|
184
|
+
max-width: 100%;
|
|
185
|
+
}
|
|
111
186
|
.closed {
|
|
112
|
-
|
|
187
|
+
width: 2rem;
|
|
188
|
+
height: 2rem;
|
|
189
|
+
display: grid;
|
|
190
|
+
place-items: center;
|
|
191
|
+
padding: 0;
|
|
113
192
|
position: absolute;
|
|
114
|
-
top:
|
|
115
|
-
right:
|
|
193
|
+
top: 1rem;
|
|
194
|
+
right: 1rem;
|
|
116
195
|
font-weight: bolder;
|
|
117
196
|
border-radius: 50%;
|
|
118
|
-
|
|
197
|
+
color: var(--foreground_wagmi_34535);
|
|
198
|
+
background-color: rgba(255, 255, 255, 0.04);
|
|
119
199
|
cursor: pointer;
|
|
120
200
|
transition: all 0.5s ease;
|
|
201
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
121
202
|
}
|
|
122
203
|
.closed:hover {
|
|
123
|
-
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);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.connector h3 {
|
|
215
|
+
margin: 0;
|
|
216
|
+
color: var(--accent_wagmi_34535);
|
|
217
|
+
font-size: 1rem;
|
|
218
|
+
letter-spacing: 0.02em;
|
|
124
219
|
}
|
|
125
220
|
|
|
126
221
|
@media (max-width: 800px) {
|
|
127
222
|
.connector {
|
|
223
|
+
width: min(100dvw, 100%);
|
|
224
|
+
min-height: calc(100dvh - 1rem);
|
|
225
|
+
padding: 1rem;
|
|
128
226
|
bottom: 0;
|
|
129
227
|
border-bottom-right-radius: 0;
|
|
130
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;
|
|
131
267
|
}
|
|
132
268
|
}
|
|
133
269
|
|
|
@@ -136,17 +272,31 @@
|
|
|
136
272
|
align-items: center;
|
|
137
273
|
justify-content: center;
|
|
138
274
|
gap: 14px;
|
|
139
|
-
width:
|
|
140
|
-
height:
|
|
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);
|
|
141
291
|
}
|
|
142
292
|
|
|
143
293
|
/* NODES (blocks) */
|
|
144
294
|
.node {
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
147
|
-
border-radius:
|
|
148
|
-
background: #
|
|
149
|
-
box-shadow: 0 0 10px
|
|
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);
|
|
150
300
|
animation: pulse 1.2s infinite ease-in-out;
|
|
151
301
|
}
|
|
152
302
|
|
|
@@ -158,13 +308,12 @@
|
|
|
158
308
|
@keyframes pulse {
|
|
159
309
|
0%, 100% {
|
|
160
310
|
transform: scale(1);
|
|
161
|
-
opacity: 0.
|
|
162
|
-
box-shadow: 0 0 10px
|
|
311
|
+
opacity: 0.7;
|
|
312
|
+
box-shadow: 0 0 10px rgba(51, 217, 211, 0.45);
|
|
163
313
|
}
|
|
164
314
|
50% {
|
|
165
315
|
transform: scale(1.4);
|
|
166
316
|
opacity: 1;
|
|
167
|
-
box-shadow: 0 0
|
|
317
|
+
box-shadow: 0 0 18px rgba(51, 217, 211, 0.95), 0 0 36px rgba(51, 217, 211, 0.25);
|
|
168
318
|
}
|
|
169
319
|
}
|
|
170
|
-
|
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",
|
|
@@ -46,5 +53,10 @@
|
|
|
46
53
|
"@types/node": "^25.9.4",
|
|
47
54
|
"@types/react": "^19.2.17",
|
|
48
55
|
"@types/react-dom": "^19.2.3"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"next": ">=13",
|
|
59
|
+
"react": ">=18",
|
|
60
|
+
"react-dom": ">=18"
|
|
49
61
|
}
|
|
50
62
|
}
|