# 12. Demo of SDK Calling

<figure><img src="/files/EQFnn2SXXcgPeChJfnJs" alt=""><figcaption></figcaption></figure>

1. sdk.connectZecreyWallet: access to user account information via in-browser wallet extension

<figure><img src="/files/uHVYbG76j0JaOLlYI0Zd" alt=""><figcaption></figcaption></figure>

2. sdk.getAccountByAccountName: find user accounts by username and get information such as user avatars.
3. sdk.getAccountNFTs: find NFTs by user accounts.
4. client.mintNft: create NFTs for users.
5. display NFT in the marketplace

### Game demo demonstrating NFT minting:

* Enter the [demo site](https://zecrey-legend-game-demo-95m2.vercel.app/)

<figure><img src="/files/TgIxs3sjMaKFsoZ3q1pV" alt=""><figcaption></figcaption></figure>

* Unconnected status

<figure><img src="/files/DM4VaDwMw3EnBYnJSa4d" alt=""><figcaption></figcaption></figure>

* Click "Connect Wallet" and select a wallet extension to connect.

<figure><img src="/files/Hni8nXlW0Jep0FH4gzWL" alt=""><figcaption></figcaption></figure>

* Legend is an L2 built on BNB Chain. Switch to Binance test network to proceed.

<figure><img src="/files/ZxhuK6cALrXmAXl9YlLx" alt=""><figcaption></figcaption></figure>

* Sign the request to connect to the wallet address.

<figure><img src="/files/6jfh5X1zstmrRNhXATiG" alt=""><figcaption></figcaption></figure>

* First-time users will be required to register a Legend L2 account associated with the L1 address. The Legend account name is in the form of a human-readable short name domain ending with ".zec".

<figure><img src="/files/iHEMva09jVqR7Ohp12oT" alt=""><figcaption></figcaption></figure>

* Confirm the registration to create a Legend account.

<figure><img src="/files/Zb1SPZK6kv0sjfujDO0Y" alt=""><figcaption></figcaption></figure>

* After connecting to a Legend account, the status of the user's NFT assets will be retrieved and updated automatically.

<figure><img src="/files/t429NJ7hWGMSHtcfkBhk" alt=""><figcaption></figcaption></figure>

* In this demo, the user can walk around and open the treasure boxes. Every time a box is opened, an NFT will be minted as an in-game item.

<figure><img src="/files/JtCgD36EyYhZNx2qFHX5" alt=""><figcaption></figcaption></figure>

* An NFT is successfully created and added to the user's assets. The user can check it in the Zecrey NFT marketplace.

<figure><img src="/files/QjqnVfSEbIUJznLJX61H" alt=""><figcaption></figcaption></figure>

* View the NFT in Zecrey web app marketplace.

<figure><img src="/files/BGJUhxUriBAD0pjA5Gyj" alt=""><figcaption></figcaption></figure>

* View the NFT in Zecrey mobile marketplace.

![](/files/UEbSfIRzPAvk7fXOWER1)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zecrey.com/go-and-js-sdk-basic-guides/12.-demo-of-sdk-calling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
