Welcome to the RE:DREAMER GitHub Repository! This repository contains the demonstration source code for the WAX proposal #100, focusing on NFT's Redeem Protocol & Standard for vIRL NFT on the WAX blockchain.
This project leverages the following technologies:
- Firebase Functions: For handling backend logic and API responses.
- Firebase Firestore Database: As a NoSQL database solution to store and retrieve data efficiently.
- Firebase Hosting: To host and demonstrate the web interface interacting with our APIs and the WAX blockchain.
We provide four main APIs in this repository:
- Get Nonce: To generate a nonce for cryptographic operations.
- Login: To authenticate users.
- Refresh Access Token: To renew the access token upon expiration.
- Redeem: To redeem NFTs based on specific conditions.
You can explore and test these APIs using our Postman Collection.
You can configure your Firebase project to include campaign information in the Firestore. This allows for the integration of various business models and strategies. Currently, the default configurations include:
collectionNames
: Specifies the Atomic Assets Collection Names required for the redeeming campaign.receiverAccount
: The designated account where Atomic Assets should be transferred for redemption.
This project uses the signatures and serializedTransaction obtained from signing specific transactions to perform corresponding validations.
To set up and run this project, you will need to provide the following environment variables in your .env
file:
WAX_CHAIN_ID
: The Chain ID of the WAX blockchain.WAX_RPC_URL
: The URL of the WAX blockchain RPC endpoint.WAX_AUTH_ACCOUNT
: The WAX account responsible for authentication. It needs to providenonce
as data and the action name should beauth
.WAX_AUTH_ACTION_NAME
: The action name used for authentication.WAX_REDEEM_ACCOUNT
: The WAX account is used for redeeming actions.WAX_REDEEM_ACTION_NAME
: The action name used for redeeming.JWT_ACCESS_KEY
: Key for JWT access token generation.JWT_REFRESH_KEY
: Key for JWT refresh token generation.ACCESS_TOKEN_EXPIRES_IN
: Expiration time for access tokens.DAPPS_REFRESH_TOKEN_EXPIRES_IN
: Expiration time for DApp refresh tokens.ASSETS_API_BASE_URL
: Base URL for the assets API.
Anyone is free to deploy and interact with their own contracts. We also provide a default contract location on both the WAX Mainnet and testnet for immediate use and reference:
- Contract Address:
waxchihkaiyu
- Auth Account:
atomictoolsx
Feel free to deploy your contracts and experiment with the protocol.