This challenge involves developing a certification system using Soulbound Tokens (SBTs) on the Kalp blockchain. You will:
- Create a smart contract in Go that manages non-transferable certificates as Soulbound Tokens
- Issue unique certifications that cannot be transferred between addresses
- Query and verify certificates directly on the blockchain
This simulates real-world scenarios where organizations need to issue verifiable credentials that should remain permanently associated with the recipient, such as academic degrees, professional certifications, or achievement badges.
By participating in this challenge, you will:
- Understand the implementation of Soulbound Tokens (Non-transferable NFTs)
- Learn how to develop and deploy smart contracts on the Kalp blockchain
- Gain hands-on experience with the Go programming language
- Master state management in blockchain applications
- Learn about composite keys and efficient data storage patterns
- Understand authorization and access control in smart contracts
- Enhance your skills in blockchain development and decentralized applications (dApps)
- Issue non-transferable Soulbound Tokens (SBTs)
- View certification status and details
- Modern, responsive UI built with Next.js and Tailwind CSS
- Secure authentication using API keys
- Real-time blockchain interaction
- Smart Contract: Go + Kalp SDK
- Frontend: Next.js, TypeScript, Tailwind CSS
- Blockchain: Kalp Network
- API: RESTful endpoints via Kalp Studio
- Go (>=1.19, <1.20)
- Node.js (>=14.x)
- npm (>=6.x)
- Clone the repository:
git clone https://github.com/thekalpstudio/Build_Hackathon.git
cd Build_Hackathon- Navigate to smart contract directory:
cd sbtkalp- Install dependencies:
go mod tidy- Navigate to frontend directory:
cd..
cd certification- Install dependencies:
npm install- Create
.env.localfile:
cp .env.example .env.local- Update environment variables:
NEXT_PUBLIC_API_KEY=your-kalp-api-key- Log in to Kalp Studio
- Navigate to "Deploy Contract"
- Upload the smart contract
- Save the generated contract ID and API endpoints
- Build the application:
npm run build- Start the production server:
npm run devUpdate the following in your frontend:
- Contract ID:
vHYQcRijQGB3UpVhqc3UeBM2D3ztjPuS1732534432325 - API Key: Your generated API key
- Default wallet:
ded665bca7d412891f44a571d908b66184b0ee10
Initialize(sdk kalpsdk.TransactionContextInterface, metadata string) errorInitializes the SBT contract with metadata.
MintSBT(sdk kalpsdk.TransactionContextInterface, address string) errorIssues a new SBT to the specified address.
QuerySBT(sdk kalpsdk.TransactionContextInterface, owner string, tokenID string) (*SoulboundToken, error)Retrieves SBT details by owner and token ID.
GetSBTByOwner(sdk kalpsdk.TransactionContextInterface, owner string) (*SoulboundToken, error)Retrieves SBT details by owner address.
GetAllTokenIDs(sdk kalpsdk.TransactionContextInterface) ([]string, error)Returns all issued token IDs.
const mintSBT = async (recipientAddress: string) => {
try {
await fetch('https://gateway-api.kalp.studio/v1/contract/kalp/invoke/vHYQcRijQGB3UpVhqc3UeBM2D3ztjPuS1732534432325/MintSBT', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.NEXT_PUBLIC_API_KEY!,
},
body: JSON.stringify({
network: "TESTNET",
blockchain: "KALP",
walletAddress: "ded665bca7d412891f44a571d908b66184b0ee10",
args: {
address: recipientAddress
}
})
});
} catch (error) {
console.error('Error minting SBT:', error);
}
};const querySBT = async (owner: string, tokenId: string) => {
// Implementation similar to mint with different endpoint
};- Implement a certificate verification section that allows users to:
- Query SBT by owner address and token ID using
QuerySBTendpoint - Display certificate details in a visually appealing format
- Show validation status and metadata
- Query SBT by owner address and token ID using
POST https://gateway-api.kalp.studio/v1/contract/kalp/query/{contractId}/QuerySBT
{
"network": "TESTNET",
"blockchain": "KALP",
"walletAddress": "ded665bca7d412891f44a571d908b66184b0ee10",
"args": {
"owner": "string",
"tokenID": "string"
}
}- Create an interface to check certificate ownership that:
- Retrieves SBT details by owner address using
GetSBTByOwnerendpoint - Shows certificate status and details
- Provides easy verification for institutions
- Retrieves SBT details by owner address using
POST https://gateway-api.kalp.studio/v1/contract/kalp/query/{contractId}/GetSBTByOwner
{
"network": "TESTNET",
"blockchain": "KALP",
"walletAddress": "ded665bca7d412891f44a571d908b66184b0ee10",
"args": {
"owner": "string"
}
}- Implement transfer attempt handling that:
- Shows proper error messages when transfer is attempted using
TransferSBTendpoint - Explains the soulbound nature of the certificates
- Provides educational information about SBTs
- Shows proper error messages when transfer is attempted using
POST https://gateway-api.kalp.studio/v1/contract/kalp/query/{contractId}/TransferSBT
{
"network": "TESTNET",
"blockchain": "KALP",
"walletAddress": "ded665bca7d412891f44a571d908b66184b0ee10",
"args": {
"from": "string",
"to": "string",
"tokenID": "string"
}
}- Dashboard Layout
- Clean, modern interface with clear navigation
- Responsive design for all screen sizes
- Loading states and error handling
- Toast notifications for actions
- API Integration
// Example API hook structure const useSBTApi = () => { const querySBT = async (owner: string, tokenId: string) => { // Implementation }; const getSBTByOwner = async (owner: string) => { // Implementation }; const getAllTokenIDs = async () => { // Implementation }; const attemptTransfer = async (from: string, to: string, tokenId: string) => { // Implementation }; return { querySBT, getSBTByOwner, getAllTokenIDs, attemptTransfer }; };
- API keys are stored securely in environment variables
- Non-transferable tokens ensure certificate authenticity
- Smart contract includes authorization checks
This project is licensed under the MIT License - see the LICENSE file for details.