Losing our seed phrases or losing accounts sucks, but what if I told you that you can now plan your legacy on-chain?
Welcome to ChainZap – a decentralized, trustless solution for planning your digital legacy on the Aptos blockchain.
Let me ask you a question:
What happens to your digital assets if something unexpected happens to you?
In the world of crypto, losing access to your wallet often means your assets are lost forever. There's no customer support, no recovery, and no way for your loved ones to inherit what you've built. That's a problem – and it's one we're here to solve.
Because your digital assets matter. You've worked hard to accumulate them, and you deserve the peace of mind that comes from knowing your legacy is protected. ChainZap lets you:
- Securely deposit APT tokens into a smart contract "will"
- Designate a recipient who can claim your assets if you become inactive
- Stay in control: only you can update your will or change the recipient
- Prove your activity by periodically "pinging" the contract
- If you don't ping within your chosen timeout, your recipient can claim the assets
- All actions are transparent, automated, and require no third party
- Set Up & Fund Your Will: Specify a recipient and amount. Funds are locked in the contract, secured by Aptos.
- Stay Active with Pings: Regularly ping the contract to show you're still around. If you don't, your will becomes claimable.
- Claim by Recipient: If the timeout passes, your recipient can claim the assets, all on-chain, with full auditability.
Aptos is one of the fastest, most secure, and most scalable blockchains available today. Its Move smart contract language is designed for safety and flexibility, making it the perfect foundation for a solution that demands trustlessness and reliability. With low fees, high throughput, and a vibrant ecosystem, Aptos ensures that your legacy is protected not just today, but for years to come.
- No lawyers, no paperwork, no centralized risks
- Your legacy, your rules, enforced by code
- Modern UI, wallet integration, and real-time updates
Don't let your digital assets be lost forever. Plan, protect, and pass on your legacy – seamlessly, on Aptos. With ChainZap, your future is in your hands, and your legacy is on-chain.
- ChainZap: Plan Your Legacy On-Chain
- Why do you need ChainZap?
- How does it work?
- Why did we build ChainZap on Aptos?
- Why ChainZap?
- Table of Contents
- Current Architecture & Features
- User Flows
- Smart Contract API Reference
- Environment Variables
- Setup & Deployment
- Usage
- Troubleshooting & FAQ
- Contributing
- Credits & Acknowledgments
- License
- Future Protocol: TLD (Trustless Legacy Distribution)
- Frontend: Next.js/React app with wallet integration
- Smart Contract: Move contract on Aptos
- Key Flows: Will creation, ping, claim
- Create a digital will and lock APT tokens
- Designate a recipient
- Ping to prove activity
- Recipient can claim if owner is inactive
- All actions are on-chain, transparent, and automated
- Connect wallet
- Enter recipient and amount
- Confirm and sign transaction
- Funds are locked in the contract
- Visit dashboard and click "Ping"
- Updates last activity timestamp
- Recipient connects wallet
- If timeout passed, can claim assets
-
initialize_global_registry(account: &signer)
- Initializes the global registry. Should be called once by deployer.
- Errors: Already exists.
-
initialize(account: &signer)
- Initializes will state for the user.
- Errors: Already exists.
-
create_will(account: &signer, recipient: address, amount: u64, registry_addr: address)
- Creates a new will, locks funds, and registers recipient.
- Errors: Already exists, registry not initialized.
-
ping(account: &signer)
- Updates last activity timestamp for the will.
- Errors: Will not found.
-
claim(account: &signer, registry_addr: address, owner_index: u64)
- Recipient claims will from a specific owner (by index).
- Errors: Not found, not recipient, too soon, registry not initialized.
-
claim_single(account: &signer, registry_addr: address)
- Recipient claims the first (and only) will for their address.
-
get_will(addr: address): Option
- Returns the will for a given address.
-
get_wills_for_recipient(recipient: address, registry_addr: address): vector
- Returns all wills for a recipient.
-
get_claimable_wills_for_recipient(recipient: address, registry_addr: address): vector
- Returns all claimable wills (timeout passed) for a recipient.
-
get_will_count_for_recipient(recipient: address, registry_addr: address): u64
- Returns the number of wills for a recipient.
| Variable | Required | Description | Example Value |
|---|---|---|---|
| NEXT_MODULE_PUBLISHER_ACCOUNT_ADDRESS | Yes | Aptos address to publish contract | 0xabc123... |
| NEXT_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY | Yes | Private key for contract publisher | 0xabcdef... |
| NEXT_PUBLIC_APP_NETWORK | Yes | Aptos network (testnet, mainnet, devnet) | testnet |
| NEXT_PUBLIC_MODULE_ADDRESS | Auto | Published contract address (set by publish script) | 0xabc123... |
| NEXT_PUBLIC_APTOS_API_KEY | Optional | API key for Aptos node (if required) | your-api-key |
.env Example:
NEXT_MODULE_PUBLISHER_ACCOUNT_ADDRESS=0xabc123...
NEXT_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY=0xabcdef...
NEXT_PUBLIC_APP_NETWORK=testnet
- Node.js (v18+ recommended)
- npm or yarn
- Aptos CLI (for contract deployment)
- Aptos wallet (e.g., Petra, Martian)
git clone https://github.com/yourusername/chainZap.git
cd chainZap
npm install
# or
yarn installnpm run dev
# or
yarn devApp runs at http://localhost:3000.
- Compile:
npm run move:compile
- Publish:
- Set your Aptos account address and private key in
.env. - Run:
npm run move:publish
- Set your Aptos account address and private key in
- Upgrade:
npm run move:upgrade
- Test:
npm run move:test
- Connect your Aptos wallet using the wallet selector.
- Create a will:
- Enter recipient address and amount.
- Confirm and sign the transaction.
- Ping your will:
- Keep your will active by pinging within the timeout period.
- Claim a will:
- If you're a recipient and the owner is inactive, claim the assets directly from the dashboard.
- View claimable wills:
- See all wills you can claim from the dashboard.
This is our vision for the next generation of ChainZap.
- Validator voting for death claims
- Challenge periods for disputes
- Fallback mechanisms (super validator)
- Customizable validator sets and thresholds
- On-chain dispute resolution
- More robust, decentralized, and trustless inheritance
How will TLD improve ChainZap?
- Removes single points of failure
- Adds community/validator-based checks
- Enables more complex inheritance logic
- Increases security and fairness for all users
For questions, support, or contributions, contact:
- Debanjan Mondal — [email protected] — GitHub
- Kaushik Samadder — [email protected] — GitHub
Ready to plan your legacy? Try ChainZap today, and stay tuned for the next evolution of trustless digital inheritance!
Wallet not connecting?
- Ensure you have an Aptos-compatible wallet installed (e.g., Petra, Martian).
- Refresh the page and reconnect.
Contract errors (e.g., registry not initialized)?
- Make sure to initialize the contract and global registry before creating wills.
Claim fails with 'too soon'?
- The owner must be inactive (not pinged) for the full timeout period before a claim is allowed.
How do I update my will?
- You can create a new will to overwrite the previous one.
Where are my assets stored?
- Assets are locked in the Move contract on Aptos until claimed.