⏩Nostr Assets Commands

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

As an illustration, in the Nostr Assets Protocol, 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 Nostr Assets ecosystem.

About Chat-To-Trade

Chat-to-Trade Commands

Users may send commands through any Nostr Client (e.g. Damus) to Nostr Asset Daemon(NAD)'s nostr address. Commands are written in small caps.

Users can input the following basic commands:

1. Retrieve the Token List

Query the list of supported tokens.

token list

2. Check The Account Balance

balance

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

balance for (token)

balance for sats

Check the account balance for a specific account address.

balance of (npub address)

balance of npub00000

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

balance of (npub address) for (token)

balance of npub00000 for sats

3. Transfer Tokens to a Specified Account Address

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

transfer 100 sats to npub00000

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)

approve 1000 sats to npub00000

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

approve 1000 sats to npub000000; approve 100 eth to npub000000

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 1000 sats from npub00000 to npub11111

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)

transfer 1000 sats from npub00000 to npub11111; transfer 100 eth from npub00000 to npub11111

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)

allowance to npub00000 by npub11111 for sats

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

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

allowance to npub00000 for sats

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

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

allowance by npub00000 for sats

7. Retrieve Nonce

Check nonce of the last executed order.

nonce

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

nonce of (npub address)

nonce of npub00011

8. Check Deposits

Get deposit info.

deposit

9. Withdraw Token

Withdrawal of tokens from Nostr Assets Protocol to a designated wallet would cost network fees

Withdraw token to a specific account address.

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

withdraw 1000 sats to 0x01....8047

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)

withdraw 1000 sats to 0x01....8047; withdraw 1000 usdt to 0xD7....9812; withdraw 100 sats to to 0xD7....9812

10. Address Book

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

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)

add address npub000000 name bob

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

transfer 1000 sats to bob
approve 1000 sats to bob

Delete name from address book.

delete (name) from address book

delete bob from address book

11. Help

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

help

12. Pro Mode

Tell users what is the current mode they are using

query mode

Change to Pro mode

open pro mode

Change to Normal mode

close pro mode

Last updated