=== NadiFin Crypto Exchange ===
Contributors: loquisoft
Tags: crypto exchange, crypto, bitcoin, crypto payment, non-custodial
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WordPress site to your NadiFin account to display a full trader dashboard, swap crypto, and track exchanges directly on your website.

== Description ==

NadiFin Crypto Exchange allows traders and developers to integrate their NadiFin **non-custodial** crypto exchange account directly into their WordPress websites. It securely connects to the NadiFin API, ensuring your **API keys are never exposed to the browser**.

[youtube https://youtu.be/Fa5t8XBa5cM]

**Core Features:**

*   **Full Trader Dashboard:** Use `[nadifin_dashboard]` to display a complete tabbed interface with Overview, Swap, Exchanges, Tracker, and Account details.
*   **Standalone Shortcodes:** Use `[nadifin_swap]` or `[nadifin_tracker]` for lightweight, focused integrations.
*   **WP Admin Integration:** View your recent exchange activity directly from the WordPress Admin Dashboard widget.
*   **Secure API Proxy:** API keys are stored securely on the server. All frontend requests are proxied via WordPress AJAX with strict nonce verification.
*   **Strict Standards:** Passes WordPress Plugin Check guidelines (sanitization, escaping, capability checks).

**Why Use NadiFin?**

NadiFin is designed for users who want a simple exchange flow **without maintaining balances on a custodial trading platform**.

*   **Non-Custodial by Design:** NadiFin is built around wallet-to-wallet exchanges. Users provide their own destination wallet and **remain in control of their funds**.
*   **Cross-Asset and Multi-Chain:** Swap between supported cryptocurrencies and networks without manually using multiple trading platforms.
*   **Live Estimates:** View the estimated receive amount before creating an exchange. Estimates update based on market and network conditions.
*   **Exchange Dashboard:** Registered users can view past exchanges, monitor current activity, track statuses, and manage their account from the NadiFin dashboard.
*   **User API Keys:** Users can generate API keys, revoke them, and connect external apps or tools to their NadiFin exchange account.

**Simple, Transparent Fees**

NadiFin charges a **0.5% service fee** per transaction or exchange. Blockchain network costs and liquidity-related costs may also be reflected in the live estimate shown before you create an exchange.

== Privacy, Security & Compliance ==

We take security and privacy seriously. This plugin is built following WordPress core best practices to ensure your site and user data remain safe:

*   **Server-Side API Proxying:** Your NadiFin API Key is stored securely in your WordPress database. It is **never rendered or exposed** in the frontend HTML or JavaScript. All API requests are securely routed from your server to the NadiFin API using WordPress AJAX.
*   **Strict Nonce Verification:** Every AJAX request is validated using WordPress nonces to prevent Cross-Site Request Forgery (CSRF) attacks.
*   **Capability Checks:** Plugin settings and admin dashboard widgets are strictly restricted to users with the `manage_options` capability (Administrators).
*   **Data Sanitization & Escaping:** All data entering the database is sanitized, and all data output to the screen is properly escaped to prevent XSS vulnerabilities.
*   **Non-Custodial Architecture:** Because NadiFin is a non-custodial service, no sensitive financial data or user wallet private keys are ever stored on your WordPress server.

== Getting Started ==

**Step 1: Create a NadiFin Account**
If you haven't already, create an account on NadiFin to get your API credentials.
*   **Create Account or Login:** [https://nadifin.com/login](https://nadifin.com/login)

**Step 2: Install and Configure the Plugin**
1. Upload the `nadifin-crypto-exchange` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **NadiFin Exchange -> Settings** and enter your NadiFin API Key (e.g., `ndf_live_...`).
4. Use the shortcodes `[nadifin_dashboard]`, `[nadifin_swap]`, or `[nadifin_tracker]` on any page.

**Step 3: Explore Helpful Links**
*   **Swap & Send Crypto:** [https://nadifin.com/exchange](https://nadifin.com/exchange)
*   **Analytics Dashboard:** [https://nadifin.com/dashboard](https://nadifin.com/dashboard)
*   **Track Exchange Status:** [https://nadifin.com/tracker](https://nadifin.com/tracker)
*   **API Documentation:** [https://nadifin.com/api-docs](https://nadifin.com/api-docs)
*   **Privacy Policy:** [https://nadifin.com/privacy](https://nadifin.com/privacy)
*   **Terms of Service:** [https://nadifin.com/terms](https://nadifin.com/terms)

== Frequently Asked Questions ==

= What is NadiFin? =
NadiFin is a **non-custodial crypto exchange service** that allows users to swap supported digital assets from one wallet to another using a simple exchange interface.

= Does NadiFin hold my funds? =
**No.** NadiFin does not operate like a custodial trading account. You send the selected crypto to the generated deposit address, and the exchanged crypto is sent directly to the destination wallet you provide.

= What is the NadiFin fee? =
NadiFin charges a **0.5% service fee**. Blockchain network costs and liquidity-related costs may also be reflected in the live estimate shown before you create an exchange.

= Can I track my exchanges? =
**Yes.** Registered users can access the NadiFin dashboard to view exchange history, track statuses, manage API keys, and update account settings.

= Can I use NadiFin through an API? =
**Yes.** Users can generate API keys from their dashboard and connect external applications to their NadiFin account using branded API endpoints.

= Why must I send only the selected asset and network? =
Each exchange is created for a **specific asset and network**. Sending the wrong coin or using the wrong network may result in delayed processing or **permanent loss of funds**.

= Can the estimated amount change? =
**Yes.** For standard-rate exchanges, the final received amount can change slightly due to market movement, liquidity, and network conditions before the transaction is completed.

= Are crypto transactions reversible? =
**No, blockchain transactions are generally irreversible.** Always double-check the asset, network, amount, deposit address, destination wallet, memo, and refund address before sending funds.

== Changelog ==

= 1.0.0 =
* Initial release with full dashboard, swap, and tracker integration.
* Added advanced WordPress AJAX proxy for secure API key handling.
* Integrated WP Admin dashboard widget and admin exchange viewer.