Full lesson
datasov
🏆 3rd Place, Superteam Japan Cypherpunk Hackathon (NTT DOCOMO R&D Side Track). Hybrid digital identity (Corda DID) and data ownership trading (Solana).
What it does
From the project README:
DataSov combines Corda for privacy-preserving Digital Identity (DID) and Solana for high-throughput data ownership trading. This repo contains a minimal end-to-end demo environment and component implementations.
- Original
- psyto/datasov
- SuperStack fork
- Blockchains/datasov @
4d18cc5 - Stars
- 0
- Last push (original)
- 2026-10-05
- Languages
- TypeScript, HTML, Kotlin, JavaScript, Rust, Makefile
- Detected stack
- Anchorweb3.js
- Categories
- DeFiWallets & Identity
- Licence
- Apache-2.0
- Homepage
- https://youtu.be/daNJ4ogURf0
Architecture
58 source files. By extension: .tsx Ă—28, .ts Ă—24, .js Ă—5, .rs Ă—1.
| Top-level directory | Source files |
|---|---|
frontend | 37 |
integration-layer | 13 |
solana-component | 5 |
DataSovMobile | 2 |
(root) | 1 |
On-chain programs: solana-component/programs/datasov-solana
Dapp: devnet deploy pending
⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/datasov/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
solana-component/programs/datasov-solana/src/lib.rs L157–179 @ 4d18cc5 · Apache-2.0 · original let signer = &[&seeds[..]]; let cpi_ctx = CpiContext::new_with_signer(cpi_program, cpi_accounts, signer); token::transfer(cpi_ctx, amount)?; msg!("Fees withdrawn: {} lamports", amount); Ok(()) }} #[derive(Accounts)]#[instruction(marketplace_fee_basis_points: u16)]pub struct InitializeMarketplace<'info> { #[account( init, payer = authority, space = Marketplace::LEN, seeds = [b"marketplace"], bump )] pub marketplace: Account<'info, Marketplace>, #[account(mut)] pub authority: Signer<'info>,- Line 158
let cpi_ctx = CpiContext::new_with_signer(cpi_program, cpi_accounts, signer);: Makes a CPI signed by a PDA. The signer seeds prove the program controls that address. - Line 159
token::transfer(cpi_ctx, amount)?;: An SPL token transfer through the Token Program. - Line 161
msg!("Fees withdrawn: {} lamports", amount);: Logs to the program log, which is visible in explorers and the test output. - Line 170
init,: Creates and pays for a new account. Space and payer must be specified. - Line 173
seeds = [b"marketplace"],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match. - Line 174
bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve. - Line 179
pub authority: Signer<'info>,: Requires this account to have signed the transaction.
solana-component/src/index.ts L97–120 @ 4d18cc5 · Apache-2.0 · original const signature = await this.connection.sendTransaction(tx, [ authority, ]); await this.connection.confirmTransaction(signature); return signature; } /** * Create a new data listing */ async createDataListing( owner: Keypair, listingId: number, price: number, dataType: DataType, description: string ): Promise<string> { const [listingPDA] = PublicKey.findProgramAddressSync( [ Buffer.from("listing"), new BN(listingId).toArrayLike(Buffer, "le", 8), ],- Line 98
const signature = await this.connection.sendTransaction(tx, [: Submits the signed transaction to the cluster. - Line 116
const [listingPDA] = PublicKey.findProgramAddressSync(: Derives a PDA from seeds and the program ID and returns the address with its canonical bump.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
solana-component | npm run dev | anchor build && anchor deploy --provider.cluster devnet |
solana-component | npm run build | tsc |
solana-component | npm run test | anchor test |
solana-component | npm run deploy | anchor deploy |
DataSovMobile | npm run start | expo start |
frontend | npm run start | react-scripts start |
frontend | npm run build | react-scripts build |
frontend | npm run test | react-scripts test |
frontend | npm run lint | eslint src --ext .ts,.tsx |
integration-layer | npm run dev | ts-node src/index.ts |
integration-layer | npm run start | node dist/index.js |
integration-layer | npm run build | tsc |
integration-layer | npm run test | jest |
integration-layer | npm run lint | eslint src/**/*.ts |
solana-component | anchor build | compile programs and generate IDLs |
solana-component | anchor test | local validator + test suite |
What you could build from it
- Fork the SuperStack copy and extend it within the DeFi gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)
- Learn the pattern first: SPL Tokens: mints, accounts and transfers