12. Demo of SDK Calling

  1. 1.
    sdk.connectZecreyWallet: access to user account information via in-browser wallet extension
  1. 2.
    sdk.getAccountByAccountName: find user accounts by username and get information such as user avatars.
  2. 3.
    sdk.getAccountNFTs: find NFTs by user accounts.
  3. 4.
    client.mintNft: create NFTs for users.
  4. 5.
    display NFT in the marketplace

Game demo demonstrating NFT minting:

  • Unconnected status
  • Click "Connect Wallet" and select a wallet extension to connect.
  • Legend is an L2 built on BNB Chain. Switch to Binance test network to proceed.
  • Sign the request to connect to the wallet address.
  • 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".
  • Confirm the registration to create a Legend account.
  • After connecting to a Legend account, the status of the user's NFT assets will be retrieved and updated automatically.
  • 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.
  • An NFT is successfully created and added to the user's assets. The user can check it in the Zecrey NFT marketplace.
  • View the NFT in Zecrey web app marketplace.
  • View the NFT in Zecrey mobile marketplace.