Common usage patterns and workflows for BlockScore platform.
# Register new account
curl -X POST http://localhost:5000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"SecurePass123!"}'
# Login
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"SecurePass123!"}'# Store your access token
TOKEN="your-access-token-here"
# Calculate credit score
curl -X POST http://localhost:5000/api/credit/calculate-score \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"walletAddress":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"}'curl -X POST http://localhost:5000/api/loans/apply \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"loan_type":"personal",
"requested_amount":10000,
"requested_term_months":36
}'- Navigate to
http://localhost:3000 - Register account or login
- Connect MetaMask wallet
- View credit dashboard
- Apply for loans
- Track application status
// Web3.js example
const Web3 = require("web3");
const web3 = new Web3("http://localhost:8545");
// Load contract
const contractABI = require("./CreditScore.json");
const contract = new web3.eth.Contract(contractABI, contractAddress);
// Add credit record
await contract.methods
.addCreditRecord(userAddress, amount, "loan", scoreImpact)
.send({ from: providerAddress });See API Reference for complete endpoint documentation.