πŸ’¬Natural Language Commands

Unlike most protocols, the Lnfi is a natural language protocol where all sub-protocols interact through commands expressed in natural language.

As an illustration, in the Lnfi, the command "balance of npubxxx" allows users to inquire about the balance of a particular address. This command resembles the input format of ERC20's "balanceOf()" function, which is widely used for retrieving token balances.

This unique approach enables a more intuitive and user-friendly interaction experience within the Lnfi ecosystem.

About Chat-To-Trade

Chat-to-Trade Commands

Users may send commands through any Nostr Client (e.g. Damus) to Lnfi's Nostr public addresses. Commands are written in small caps.

Users can input the following basic commands:

1. Retrieve the Token List

Query the list of supported tokens.

2. Check The Account Balance

Check the account balance for a specific token (SATS).

balance for (token)

Check the account balance for a specific Nostr address.

balance of (npub address)

Check the account balance for a specific token in an Nostr address.

balance of (npub address) for (token)

3. Transfer Tokens to a Specified Nostr Address

transfer (quantity) (token) to (npub address)

4. Approve Operator(s) to Control User's Asset(s)

Approves a single token to an operator's account address. The operator will be able to use the approved amount of tokens for transactions on behalf of the asset owner.

approve (quantity) (token) to (npub address)

For approving multiple tokens to an operator's account address.

5. Transfer Token by Operator from Sending Address to Receiving Address

Transfer a single token to a receiving address on behalf of the asset owner.

transfer (quantity) (token) from (sending address) to (receiving address)

Transfer multiple tokens to receiving address on behalf of the asset owner.

transfer (quantity) (token 1) from (sending address) to (receiving address); transfer (quantity) (token 2) from (sending address) to (receiving address)

6. Check the Allowance Approved to the Operator

Check the allowance of a specific token approved to a specific operator by a specific owner.

allowance to (operator's npub address) by (owner's npub address) for (token)

The Asset Owner can check the allowance of a specific token approved for a specific operator.

allowance to (operator's npub address) for (token)

The Approved Operator can check the allowance of a specific token approved by the Asset Owner.

allowance by (owner's npub address) for (token)

7. Retrieve Nonce

Check nonce of the last executed order.

Check nonce of the last executed order by a specific npub address.

nonce of (npub address)

8. Check Deposits

Get deposit info.

9. Withdraw Token

Withdrawal of tokens from Lnfi to a designated wallet would cost network fees

Withdraw token to a specific account address.

withdraw (quantity) (token) to (wallet address)

Withdraw multiple tokens to different account addresses.

withdraw (quantity) (token 1) to (wallet address 1); withdraw (quantity) (token 2) to \ (wallet address 2); withdraw (quantity) (token 1) to (wallet address 2)

10. Address Book

Query the list of names and addresses in the user's address book

Add name and npub address as a key-value pair to address.

add address (npub address) name (name to be shown on address book)

Subsequently, users can execute commands with names in the address instead of using long npub address. example:

Delete name from address book.

delete (name) from address book

11. Help

Query the system for help, which returns a list of available commands

12. Pro Mode

Tell users what is the current mode they are using

Change to Pro mode

Change to Normal mode

Last updated