<<<<<<< HEAD
MyLockChain.io V2 is a decentralized document registration platform built for lawyers, notaries, and professionals who require tamper-evident, long-term proof of document existence. By integrating IPFS for decentralized storage and ERC-4337 account abstraction on Arbitrum via Pimlico, MyLockChain enables gasless registration without requiring users to understand blockchain or use a wallet.
- Frontend: HTML, JavaScript, PayPal SDK, Netlify
- Backend: Node.js (Heroku), Express, viem, permissionless.js
- Blockchain: Arbitrum One, LightAccount v2, EntryPoint v0.7, Pimlico Bundler + Paymaster
- Email: Nodemailer via Gmail SMTP
- Storage: IPFS via Pinata
-
User uploads a file
- File is hashed with Keccak256
- Pinned to IPFS (via Pinata) and returns a CID
- CID is hashed again to generate
documentHash
-
User pays via PayPal
- Amount depends on file size
- No crypto wallet needed
-
Frontend calls
/pimlicoSmartAccountClient- Sends
documentHashto backend
- Sends
-
Backend flow:
- Encodes call to
LockChainRegistry.register(documentHash) - Wraps in LightAccount v2
execute(to, value, data) - Constructs factory + factoryData for the Smart Wallet
- Calls
pm_getPaymasterStubDatato get estimated gas usage - Boosts
callGasLimit,verificationGasLimit, and adds defaultpreVerificationGas - Calls
pm_getPaymasterDatawith sponsorship policy to getpaymasterAndData - Constructs full ERC-4337 UserOperation (with proper gas + sponsorship)
- Signs the
userOpHashwith server-side wallet (via viem) - Sends the operation via
eth_sendUserOperationto Pimlico bundler - Polls
/user-operations/:hashfor real on-chaintransactionHash - Returns the transaction hash to frontend
- Encodes call to
-
Frontend polls contract
- Verifies
isRegistered(documentHash) - Retrieves registrant + timestamp from
getDetails - Sends receipt email with file, CID, tx link, and blockchain proof
- Verifies
- Registry Address:
process.env.REGISTRY_ADDRESS - ABI Functions:
isRegistered(bytes32 documentHash) → boolgetDetails(bytes32 documentHash) → (address registrant, uint256 timestamp)register(bytes32 documentHash)(called by LightAccount)
await client.request({
method: 'pm_getPaymasterStubData',
params: [
{ factory, factoryData, callData, ... }, // normalized UserOp fields
entryPoint, // string
chainIdHex // string, e.g. '0xa4b1'
]
})await client.request({
method: 'pm_getPaymasterData',
params: [
{ factory, factoryData, callData, ..., gas fields },
entryPoint,
chainId,
{ sponsorshipPolicyId }
]
})- LightAccount index is randomized per session to avoid Pimlico quota blocks
- Gas fields are converted with
numberToHex(BigInt(...)) paymasterAndDatais split intopaymasterandpaymasterData- Email receipt includes:
- File name
- IPFS CID + URL
- Keccak256 hash
- On-chain timestamp + registrant
- Arbiscan transaction link
- Frontend:
https://mylockchaintwoclick.netlify.appandhttps://mylockchain.io - Backend:
https://mylockchain-backend.herokuapp.com
- Curl examples available for both
prepareUserOpandsubmitSignedUserOp - Pimlico API Logs viewable via https://dashboard.pimlico.io
For dev or legal partnership inquiries, contact: luke@mylockchain.io
Frontend → IPFS → Backend → Pimlico Paymaster → EntryPoint → Registry Contract
↓ ↑
Email via Gmail Bundler Submission
See included Mermaid.js sequence diagram in the repo or documentation.
MyLockChain V2 delivers frictionless blockchain notarization for real-world users. Through ERC-4337 abstraction, IPFS permanence, and PayPal UX, it makes decentralized trust easy, affordable, and scalable.