Sol.College

Full lesson

DAL

What it does

From the project README:

[](https://github.com/Dikossia/DAL/actions/workflows/ci.yml) [](LICENSE) [](https://solana.com) [](https://colosseum.org)
Original
Dikossia/DAL
SuperStack fork
Blockchains/DAL @ e9a6e4e
Stars
0
Last push (original)
2026-10-09
Languages
HTML, JavaScript, TypeScript, Python
Detected stack
not detected
Categories
Other
Licence
MIT
Homepage
https://dal-kappa.vercel.app

Architecture

68 source files. By extension: .ts ×52, .js ×15, .py ×1.

Top-level directorySource files
server41
web16
(root)9
demo2

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

Dikossia/DAL · server/src/chain/tx.ts L37–60 @ e9a6e4e · MIT · original
    const kp = all.get(pk);    if (!kp) throw new Error(`Missing signer ${pk}`);    return sign(message, kp.seed);  });  return { wire: concat(shortvec(sigs.length), ...sigs, message), signature: b58encode(sigs[0]), message };} /** A transaction where some signatures are left empty (to be added by a wallet such as Phantom). */export function buildPartiallySignedTx(feePayer: Keypair, instructions: Instruction[], recentBlockhash: string, others: Keypair[] = []) {  const { message, signers } = compileMessage(feePayer.publicKey, instructions, recentBlockhash);  const all = new Map([feePayer, ...others].map(k => [k.publicKey, k]));  const sigs = signers.map(pk => { const kp = all.get(pk); return kp ? sign(message, kp.seed) : new Uint8Array(64); });  return { wire: concat(shortvec(sigs.length), ...sigs, message), message, signers };} /** Program-derived address (same algorithm as PublicKey.findProgramAddressSync). */export function findProgramAddress(seeds: Uint8Array[], programId: string): string {  for (let bump = 255; bump >= 0; bump--) {    const h = createHash('sha256');    for (const s of seeds) h.update(s);    h.update(Uint8Array.of(bump)); h.update(b58decode(programId)); h.update(utf8('ProgramDerivedAddress'));    const out = new Uint8Array(h.digest());    if (!isOnCurve(out)) return b58encode(out);  }
  1. Line 52 /** Program-derived address (same algorithm as PublicKey.findProgramAddressSync). */: Derives a PDA from seeds and the program ID and returns the address with its canonical bump.
  2. Line 54 for (let bump = 255; bump >= 0; bump--) {: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
Dikossia/DAL · server/src/chain/programs.ts L25–48 @ e9a6e4e · MIT · original
 export const associatedTokenAddress = (owner: string, mint: string) =>  findProgramAddress([b58decode(owner), b58decode(PROGRAMS.token), b58decode(mint)], PROGRAMS.ata); /** Creates the owner's token account for the mint if it does not exist yet (payer covers the deposit). */export function createAtaIdempotentIx(payer: string, owner: string, mint: string): Instruction {  return {    programId: PROGRAMS.ata,    keys: [      { pubkey: payer, isSigner: true, isWritable: true },      { pubkey: associatedTokenAddress(owner, mint), isSigner: false, isWritable: true },      { pubkey: owner, isSigner: false, isWritable: false },      { pubkey: mint, isSigner: false, isWritable: false },      { pubkey: PROGRAMS.system, isSigner: false, isWritable: false },      { pubkey: PROGRAMS.token, isSigner: false, isWritable: false }    ],    data: u8(1)  };} /** SPL Token TransferChecked between the owners' associated token accounts. */export function transferCheckedIx(owner: string, toOwner: string, mint: string, amount: bigint | number, decimals: number): Instruction {  return {    programId: PROGRAMS.token,
  1. Line 27 findProgramAddress([b58decode(owner), b58decode(PROGRAMS.token), b58decode(mint)], PROGRAM: Derives a PDA from seeds and the program ID and returns the address with its canonical bump.
  2. Line 45 /** SPL Token TransferChecked between the owners' associated token accounts. */: A checked token transfer, which also verifies the mint and decimals.

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
servernpm run devnode --disable-warning=ExperimentalWarning --watch-path=src bin/dal.mjs start
servernpm run startnode --disable-warning=ExperimentalWarning bin/dal.mjs start
servernpm run testnode --disable-warning=ExperimentalWarning --test --test-concurrency=1 tests/*.test.ts

What you could build from it