> For the complete documentation index, see [llms.txt](https://docs.lnfi.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lnfi.network/user-guides/getting-started/npub-and-wallets/okx-wallet.md).

# OKX Wallet

How to use Lnfi Network with OKX Wallet?

## How to get a Nostr Address with OKX wallet?

1. Create a new wallet,  or "Import and Existing Wallet".

{% hint style="info" %}
When importing a wallet, use either the seed phrase or your Nostr private key. If you use any other private key for the import, the "Nostr" option will not be available.
{% endhint %}

2. Tap on the copy button shown on the screenshot.

<div align="left"><figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FVCrY4zX9x2xNA1vl5RcK%2Fimage.png?alt=media&amp;token=d7e548dc-5caf-4c87-8a47-1fe1ee89c683" alt="" width="305"><figcaption></figcaption></figure></div>

3. Enter "Nostr" into the search bar.&#x20;
4. The text beginning with "npub" is your Nostr address linked to this current OKX account.

<div align="left"><figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FQQUnwuKuyWPT9nI1D3uw%2Fimage.png?alt=media&amp;token=63bb1ff0-e9b8-4c4e-a432-703247810e8b" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Important Note:** If you create another OKX account, you will receive another Nostr Address.&#x20;
{% endhint %}

***

## How to retrieve your Nostr Private Key?

{% hint style="danger" %}
For security reasons, never reveal or give your Nostr Private Key to anyone.&#x20;
{% endhint %}

1. Tap on the 9-dot grid on the top left.

<div align="left"><figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FhBZEjx11xVLseOaOHSmY%2Fimage.png?alt=media&amp;token=277efee2-9aa6-4dc1-b7c4-fa1a87b87697" alt="" width="295"><figcaption></figcaption></figure></div>

2. Tap on \[Backups].

<div align="left"><figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2Fmrg3IfaleEQZkz2FejxP%2Fimage.png?alt=media&amp;token=72fa8858-25fc-4dc7-814a-134953837ec6" alt="" width="298"><figcaption></figcaption></figure></div>

3. Tap on the account from which you want to retrieve your private key.

<div align="left"><figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FMUE8RVIBmAPedQ9uVyc7%2Fimage.png?alt=media&amp;token=9bda27e0-56a5-4c73-90f7-3eacde5da0a8" alt="" width="297"><figcaption></figcaption></figure></div>

4. Tap on \[Private key].

<div align="left"><figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FTCt5hwwlQNx8rac3EJat%2Fimage.png?alt=media&amp;token=2f5ffd78-5589-4f5e-a913-a3d56e614db9" alt="" width="294"><figcaption></figcaption></figure></div>

4. Search for "Nostr" and tap on copy to get the private key

![](https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FddWvSW20qRW1P6aLlTzT%2Fimage.png?alt=media\&token=7c75bd8e-adee-44b1-a910-ee610c858b31)

***

## How to connect to Lnfi?

Tap on \[Connect Nostr] on the top right, then select \[OKX Wallet].

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FjunBFKvsYnpNRhr1UaCF%2Fimage.png?alt=media&amp;token=d194506c-5e90-48a1-9b5c-cc6391f4fba2" alt=""><figcaption></figcaption></figure>

Once connected, you can view your npub address displayed.

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FpipEtFcAsjalG9bLuMZD%2Fimage.png?alt=media&amp;token=f5bd883a-a8ee-492e-b451-90dba2d8b0ed" alt=""><figcaption></figcaption></figure>

***

## How to Deposit to Lnfi from OKX?

{% hint style="info" %}
Depositing assets on Lnfi works slightly differently from other blockchains.&#x20;

Since Lnfi is built on the Lightning Network, a Lightning invoice **must be** generated by the receiver to send Bitcoin, Satoshis, or Taproot Assets from the sender.
{% endhint %}

In this **deposit** scenario, your Nostr address on Lnfi functions as the receiver, while your OKX account serves as the sender.&#x20;

**To complete the deposit, you’ll need to generate a Lightning invoice using your Nostr address on Lnfi and provide it to your OKX account for payment.**

Here’s how to generate a Lightning invoice on Lnfi:

1. Go to Lnfi Asset Dashboard, tap on \[Deposit].

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FFY9p1PAy6kKCOFglC8lG%2Fimage.png?alt=media&amp;token=921fe945-dadb-4e76-b395-4b6148fe4431" alt=""><figcaption></figcaption></figure>

2. Select the \[Receive Token] type and input the \[Amount] to receive, then tap on \[Create Invoice].

{% hint style="info" %}
Currently only SATS is supported. \
\
SATS is the minimum unit of BTC, 100 million SATS=1 BTC. \
It is essentially BTC, not BRC20 SATS.
{% endhint %}

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FU0UoN0QsQzePob2h1gqV%2Fimage.png?alt=media&amp;token=f1c40bc1-eeed-49e2-bf67-f1ddeb36db78" alt=""><figcaption></figcaption></figure>

3. Copy the Invoice ID. (starts with Inbc....)

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FKWiiy9ctgFioTu9k8zLk%2Fimage.png?alt=media&amp;token=af95b866-740b-4ff0-bca1-b4826da30193" alt=""><figcaption></figcaption></figure>

4. Head over to your OKX account. Go to Funding > Withdrawal.\
   Select \[BTC]&#x20;

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2Fa5pFZ6J8ffQ0KA4tRiLO%2Fimage.png?alt=media&amp;token=e3cd6a83-3461-4a62-8b55-6167d9fcadd2" alt=""><figcaption></figcaption></figure>

5. For On-chain withdrawal, select \[Lightning] for Network.

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FCNPLQjE3iCWnGZXpAMh6%2Fimage.png?alt=media&amp;token=b01e834e-c58d-41c6-8bba-97775fee0ab3" alt=""><figcaption></figcaption></figure>

6. Paste the copied Lightning Invoice ID. If you have sufficient amount of the \[Receive Token], you can proceed to complete the deposit by tapping on \[Next].

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FMWoqC0R0pDQP2skm5YIG%2Fimage.png?alt=media&amp;token=3fb72d6a-94bc-425f-b9b5-6ea8ecb0da75" alt=""><figcaption></figcaption></figure>

7. Once completed, the \[Receive Token] will be credited to your Nostr address. The process should be nearly instantaneous, thanks to the Lightning Network's unique capability for fast transactions.

***

## How to Withdraw from Lnfi to OKX?

{% hint style="info" %}
Withdrawing assets from Lnfi works slightly differently compared to other blockchains.&#x20;

Since Lnfi is built on the Lightning Network, the receiver must provide a Lightning invoice to receive Bitcoin, Satoshis, or Taproot Assets from the sender.
{% endhint %}

In this withdrawal scenario, your OKX account functions as the receiver, while your Nostr address on Lnfi serves as the sender. To complete the withdrawal, you’ll need to generate a Lightning invoice from your OKX account and provide it to your Nostr address on Lnfi for payment.

Here’s how to generate a Lightning invoice on OKX:

1. Go to OKX > Funding > Deposit.
2. Select \[BTC] for the deposit, and select \[Lightning] for the network.

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FnnSl4bgngDhjeCvw4QQ0%2Fimage.png?alt=media&amp;token=c5764dea-6905-4145-86d3-6f527dcb6c02" alt=""><figcaption></figcaption></figure>

3. Input the \[Deposit amount] and tap on \[Create Invoice]

{% hint style="info" %}
Currently only Bitcoin is supported. \
\
Note that BTC will be display in SATS on Lnfi.\
SATS is the minimum unit of BTC, 100 million SATS=1 BTC. \
SATS is essentially BTC, not BRC20 SATS.
{% endhint %}

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FT7kgbfxxJvKasPgLk8yH%2Fimage.png?alt=media&amp;token=1bf084c4-9fb2-43fb-9937-24eda799ab45" alt=""><figcaption></figcaption></figure>

4. A Lightning Invoice will be generated. Tap on \[Copy] to copy the Invoice ID.

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FXUNPVuck6WwDIPCawBNj%2Fimage.png?alt=media&amp;token=0c199f7a-2bdc-46a9-823e-ccca6b6fede0" alt=""><figcaption></figcaption></figure>

5. Head over to Lnfi > Assets > select \[Withdraw]

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2F5EDC6SqG2fjj1QvomOa8%2Fimage.png?alt=media&amp;token=1bdbb5fd-71f2-4bcb-8afe-78cbacb152f1" alt=""><figcaption></figcaption></figure>

6. Paste the Invoice ID

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2FOYzKtqgXvqID5rR9fNAN%2Fimage.png?alt=media&amp;token=dc1bce52-325a-49fa-a3b4-64b921febc42" alt=""><figcaption></figcaption></figure>

7. Check the Send Amount. Once confirmed, tap on \[Withdraw]

<figure><img src="https://234049135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtqpzBLUkh19rkHwMxgKf%2Fuploads%2Fk8gDOgHMnj3FTIOP27IC%2Fimage.png?alt=media&amp;token=87d7a5c3-e2eb-482e-8492-b2d9af213971" alt=""><figcaption></figcaption></figure>

8. Once completed, the \[Receive Token] will be credited to your OKX account. The process should be nearly instantaneous, thanks to the Lightning Network's unique capability for fast transactions.
