Sol.College

Full lesson

SolanaGhostMesh

What it does

From the project README:

GhostMesh bridges the physical and digital worlds by turning low-power edge devices into verifiable sources of real-world truth.
Original
dmarcr1997/SolanaGhostMesh
SuperStack fork
Blockchains/SolanaGhostMesh @ 704955f
Stars
0
Last push (original)
2025-10-30
Languages
TypeScript, JavaScript, Python, CSS, Rust, HTML
Detected stack
web3.js
Categories
Other
Licence
MIT

Architecture

39 source files. By extension: .ts ×19, .tsx ×9, .js ×6, .py ×3, .rs ×1, .sol ×1.

Top-level directorySource files
pi21
fe17
contract1

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/solanaghostmesh/. 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.

dmarcr1997/SolanaGhostMesh · contract/src/lib.rs L73–96 @ 704955f · MIT · original
    pub timestamp: i64,    pub verified: bool,    #[max_len(10)]    pub whitelist: Vec<Pubkey>,} #[derive(Accounts)]pub struct SubmitAttestation<'info> {    #[account(mut)]    pub payer: Signer<'info>,    #[account(        init_if_needed,        payer = payer,        space = ANCHOR_DISCRIMINATOR_SIZE + DeviceAttestation::INIT_SPACE,        seeds = [b"attestation", payer.key().as_ref()],        bump    )]    pub device_attestation: Account<'info, DeviceAttestation>,    pub system_program: Program<'info, System>,} #[derive(Accounts)]pub struct VerifyDevice<'info> {    #[account(mut)]
  1. Line 82 pub payer: Signer<'info>,: Requires this account to have signed the transaction.
  2. Line 84 init_if_needed,: Creates the account only if it doesn't exist. Watch for re-initialisation bugs.
  3. Line 87 seeds = [b"attestation", payer.key().as_ref()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  4. Line 88 bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.

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.

DirectoryCommandRuns
fe/flock-ipfs-image-meshnpm run devvite
fe/flock-ipfs-image-meshnpm run buildtsc -b && vite build
fe/flock-ipfs-image-meshnpm run linteslint .
pi/uploadernpm run startnode /app/index.mjs
pi/submitternpm run devts-node-esm src/server.ts
pi/submitternpm run startnode dist/server.js
pi/submitternpm run buildtsc

What you could build from it