# Fiat Deposit & Verification

The ToroForge SDK allows registered projects to receive **fiat currency deposits** into user wallets on the **Toronet blockchain**, including **NGN**, **USD**, **EUR**, **KSH**, and more.

This process mimics traditional banking UX, but settles the value directly on-chain.

***

### 🧭 How It Works

1. **User initiates a deposit** with an amount and currency.
2. SDK returns **bank account details** for transfer or payment link.
3. User completes the payment (via card, bank, or wire).
4. Admin calls **verify deposit** using the returned transaction ID.
5. The wallet is funded automatically on Toronet.

***

### ⚙️ Requirements

Before you can use these features:

* You must register your project on [https://payments.connectw.com](https://payments.connectw.com/).
* You will receive:
  * **Admin Wallet Address**
  * **Admin Wallet Password**
* These credentials are passed into the SDK methods.

***

### 🔁 Initialize a Deposit

```ts
import { depositFunds, Currency } from 'torosdk';

const depositInfo = await depositFunds({
  userAddress: '0xWalletAddress',
  username: 'torousername',
  amount: '1000',
  currency: Currency.Naira,
  admin: 'adminWalletAddress',
  adminpwd: 'adminPassword',
});
```

#### 🔄 Supported Currencies (`Currency` Enum)

```ts
enum Currency {
  Naira = "NGN",
  Dollar = "USD",
  Euro = "EUR",
  Pound = "GBP",
  Kenyan_Shilling = "KSH",
  South_African_Rand = "ZAR",
}
```

#### 📦 Response Example

```json
{
  "paymentlink": "https://connectw.com/pay/...",
  "accountnumber": "2039932299",
  "bankname": "ExampleBank",
  "amount": "1000",
  "txid": "TX10294-TORO"
}
```

Use either the `paymentlink` or show the account number and bank name to the user.

***

### 📥 Verify Deposit

Once the user completes payment, you can finalize it:

```ts
import { verifyDeposit } from 'torosdk';

const success = await verifyDeposit({
  currency: 'NGN',
  txid: 'TX10294-TORO',
});
```

If the verification is successful, the Toronet wallet is funded immediately.

***

### 🧩 Use Cases

* Add fiat onboarding to Web3 apps
* Enable wallet top-ups in localized currency (NGN, KSH, etc.)
* Integrate verified deposit flows into financial platforms or fintech apps

***

### ⚠️ Notes & Best Practices

* Always validate that a `txid` is returned before verifying.
* Store returned `txid` and map to your internal transaction logs.
* For higher amounts, KYC verification may be required (see [KYC & Identity](https://chatgpt.com/c/kyc.md)).

***

### 🔗 Related Docs

* [Get Wallet Balances](https://chatgpt.com/c/balances.md)
* [KYC Verification](https://chatgpt.com/c/kyc.md)
* [Transfers](https://chatgpt.com/c/transfers.md)

***
