Sol.College

Structure lesson (licence does not allow quoting code)

AfterKey

AfterKey is a non-custodial dead-man's switch on Solana — your assets pass to the people you chose, without anyone ever touching your keys.

Original
techbone/AfterKey
SuperStack fork
Blockchains/AfterKey @ a90c5ec
Stars
0
Last push (original)
2026-10-13
Languages
TypeScript, Rust, PLpgSQL, CSS, Swift, Dockerfile
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://after-key-web.vercel.app

Architecture

81 source files. By extension: .ts ×46, .rs ×23, .tsx ×12.

Top-level directorySource files
apps39
programs23
tests11
scripts5
packages3

On-chain programs: programs/proof-of-life

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
initialize_configInitializeConfigprograms/proof-of-life/src/lib.rs:24
check_inOwnerVaultprograms/proof-of-life/src/lib.rs:44
deposit_solDepositSolprograms/proof-of-life/src/lib.rs:62
withdraw_solWithdrawSolprograms/proof-of-life/src/lib.rs:66
deposit_tokenDepositTokenprograms/proof-of-life/src/lib.rs:70
withdraw_tokenWithdrawTokenprograms/proof-of-life/src/lib.rs:74
initiate_claimInitiateClaimprograms/proof-of-life/src/lib.rs:78
veto_claimOwnerVaultprograms/proof-of-life/src/lib.rs:82
finalize_claimFinalizeClaimprograms/proof-of-life/src/lib.rs:86
close_vaultCloseVaultprograms/proof-of-life/src/lib.rs:102
close_released_vaultCloseReleasedVaultprograms/proof-of-life/src/lib.rs:106
finalize_claim_handlerFinalizeClaimprograms/proof-of-life/src/instructions/finalize_claim.rs:16
withdraw_sol_handlerWithdrawSolprograms/proof-of-life/src/instructions/withdraw_sol.rs:26
deposit_token_handlerDepositTokenprograms/proof-of-life/src/instructions/deposit_token.rs:35
deposit_sol_handlerDepositSolprograms/proof-of-life/src/instructions/deposit_sol.rs:26
close_vault_handlerCloseVaultprograms/proof-of-life/src/instructions/close_vault.rs:21
check_in_handlerOwnerVaultprograms/proof-of-life/src/instructions/check_in.rs:10
initialize_config_handlerInitializeConfigprograms/proof-of-life/src/instructions/initialize_config.rs:24
distribute_sol_handlerDistributeSolprograms/proof-of-life/src/instructions/distribute_sol.rs:26
close_released_vault_handlerCloseReleasedVaultprograms/proof-of-life/src/instructions/close_released_vault.rs:25
veto_claim_handlerOwnerVaultprograms/proof-of-life/src/instructions/veto_claim.rs:7
withdraw_token_handlerWithdrawTokenprograms/proof-of-life/src/instructions/withdraw_token.rs:38
initiate_claim_handlerInitiateClaimprograms/proof-of-life/src/instructions/initiate_claim.rs:14

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
scripts/deploy-devnet.tsPublicKey, getBalance, getAccountInfo, Keypair, AnchorProvider, Program
apps/web/src/hooks/useVault.tsPublicKey, useConnection, getBalance, Transaction
programs/proof-of-life/src/events.rsPubkey
apps/web/src/lib/vault-transactions.tsPublicKey, SystemProgram, Transaction, findProgramAddressSync, Program
tests/closed-vault-recovery.test.tsgetBalance, SystemProgram, Transaction, transfer, PublicKey
tests/tokens.test.tsPublicKey, createMint, Transaction, getAssociatedTokenAddressSync, Keypair, SystemProgram
tests/helpers.tsPublicKey, Keypair, Program, findProgramAddressSync
scripts/lib/program-upload.tsPublicKey, Keypair, Transaction, sendAndConfirmTransaction, getAccountInfo, Connection
tests/atomic-transactions.test.tsgetBalance, SystemProgram, Transaction, Keypair, PublicKey, transfer
apps/api/src/solana.tsProgram, Connection, PublicKey, Transaction, VersionedTransaction, AnchorProvider
tests/lifecycle.test.tsgetBalance, PublicKey, Keypair, Program, findProgramAddressSync
apps/web/src/lib/useProgram.tsProgram, Transaction, VersionedTransaction, AnchorProvider, useConnection, Keypair

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/afterkey/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

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
.npm run test
apps/webnpm run dev
apps/webnpm run start
apps/webnpm run build
apps/apinpm run start
apps/apinpm run test
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it