> For the complete documentation index, see [llms.txt](https://docs.zecrey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zecrey.com/go-and-js-sdk-basic-guides/12.-demo-of-sdk-calling.md).

# 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)
