https://github.com/arrjunpradeep/safecryptowallet
NFT Marketplace + Wallet
https://github.com/arrjunpradeep/safecryptowallet
bep20 binance javascript mongodb nft nft-marketplace redis-server solidity wallet
Last synced: about 2 months ago
JSON representation
NFT Marketplace + Wallet
- Host: GitHub
- URL: https://github.com/arrjunpradeep/safecryptowallet
- Owner: ArrjunPradeep
- Created: 2021-07-16T07:04:54.000Z (almost 4 years ago)
- Default Branch: wallet_nft
- Last Pushed: 2021-12-09T06:08:17.000Z (over 3 years ago)
- Last Synced: 2025-03-26T10:21:16.211Z (2 months ago)
- Topics: bep20, binance, javascript, mongodb, nft, nft-marketplace, redis-server, solidity, wallet
- Language: JavaScript
- Homepage:
- Size: 2.5 MB
- Stars: 2
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binance Crypto Wallet + NFT
## Setting Up :
**Step 1:** Download the repository using the command:
```
git clone -b wallet_nft "https://github.com/Arjun-Pradeep/safeCryptoWallet.git"
```**Step 2:** Change the current working directory to "safeCryptoWallet" :
```
cd safeCryptoWallet
```**Step 3:** Install the dependecies :
```
npm i --save
```**Step 4:** Load environment variables from **.env** file
```
MNEMONIC=""
PASSPHRASE=""
API_KEY=""
PROVIDER=""
WEBSOCKET_URL=""
PRIVATE_KEY=""
BNB_API_KEY=""
MARKETPLACE_ADDRESS=""
NFT_ADDRESS=""
```**Step 5:** Install redis :
```
sudo apt-get install redis```
**Step 6:** Install pm2 [daemon process manager] :
```
npm install pm2@latest -g
```**Step 7:** Compile the smart contracts :
```
npx hardhat compile
```**Step 8:** Run redis service [/home Folder] :
```
pm2 start redis-server
```**Step 9:** Setup a database in server [MongoDB]:
###### Create a file - database.js [HOME directory] :
```
conn = new Mongo();dbName = "wallets";
db = conn.getDB(dbName);
db.createUser(
{
user: "cryptoInsider",
pwd: "VB email : String-> password : String
```
***Login to the wallet account of the user [ /wallet/login ] [ POST ]:***

```
Body Parameters :-> email : String
-> password : String
```
***Retrieve account details of a user [ /wallet/user ] [ GET ] [ JWT AUTH ]:***

```
Query Parameters :-> email : String
```
***Retrieve transaction history w.r.t user [ /wallet/transactionHistory ] [ GET ] JWT AUTH ]:***

```
Query Parameters :-> email : String
```
***Validate the transaction [ /wallet/validateTransaction ] [ POST ] [ JWT AUTH ]:***

```
Body Parameters :-> email : String
-> crypto : String // 'BNB' or 'BOBE'
-> receiver : String
-> amount : String```
***Crypto transaction [ /wallet/send ] [ POST ] [ JWT AUTH ]:***

```
Body Parameters :-> email : String
-> crypto : String // 'BNB' or 'BOBE'
-> receiver : String
-> amount : String
```## ***NFT :***
***Upload the image file [ /nft/uploadFile ] [ POST ]:***

```
Body Parameters [Form-data] :-> file : Image File
-> name : String
-> description : String
```***Create a new NFT [ /nft/createToken ] [ POST ] [ JWT AUTH ]:***

```
Body Parameters :-> email : String
-> uri : String
-> name : String
-> description : String
-> image : String
```***Create a new market item [ /nft/createItem ] [ POST ] [ JWT AUTH ]:***

```
Body Parameters :-> email : String
-> uri : String
-> name : String
-> description : String
-> image : String
```***Create a market sale [ /nft/marketSale ] [ POST ] [ JWT AUTH ]:***

```
Body Parameters :-> email : String
-> tokenId : String
-> auctionPrice : String
```***Fetch all the tokens created by the user [ /nft/fetchTokens ] [ GET ] [ JWT AUTH ]:***

```
Query Parameters :-> email : String
```***Fetch all the listed market items [ /nft/marketItems ] [ GET ] [ JWT AUTH ]:***

```
Query Parameters :-> email : String
```***Fetch all the owned market items by the user [ /nft/ownedItems ] [ GET ] [ JWT AUTH ]:***

```
Query Parameters :-> email : String
```***Fetch all the created market items [SOLD & NOT SOLD] by the user [ /nft/createdItems ] [ GET ] [ JWT AUTH ]:***

```
Query Parameters :-> email : String
```***Fetch the metadata [ /nft/metaData ] [ GET ]:***

```
Query Parameters :-> url : String
```## ***Swagger Documentation :***
```
http://localhost:3000/api-docs/
```

