CrypticVault is a platform to store your data and give NFT membership-based access to your vault near and dear ones.
- Decentralized Storage on IPFS
- NFT based Access
- Information Inheritance
- Data Encryption on Top of IPFS
-
If something happens to a person or in case of death families are not aware of a) How much crypto person is having and especially how to get access to it b) Millions of dollars worth of insurance are unclaimed because families don't know if there was any medical insurance or life insurance. c) Property will deed etc
-
no central point of failure and censorship resistance. Currently, we store our data on Dropbox, Google Drive, etc but there are chances that someone from the internal team can access our data so we have encrypted data using SHA 256 and the encrypted hash is getting stored on IPFS
-
Persistent storage: Physical copy of data may get lost or damaged due to any reason but data stored on IPFS and Pinned using Filecoin are totally secure and everlasting. Even if the big bang happens on eath, data on the File coin will be accessible from other planets through satellite node which Protocol Labs team is planning :)
1) CrypticVault Contract : https://mumbai.polygonscan.com/address/0xF7CbDe3831E18067794C615CF6a633Ee719F4D14
1) Sign In with Admin and Member: Admin can create token from sign with admin which will be used for membership. and in login with member, member can login with admin address which will check that member have that admin's nft or not.
2) Decentralized Encrypted Storage : In Drive we can store different type of file which will stored encrypted on IPFS.
3) Members: Add Members to give access of your digital vault.
4) Emergency Alert: Set Emergency alert email message to notify the member about access permission.
5) Access Permission: There are three ways to give access permission. 1) Give access right away which will transfer token and send email to the particular member right away 2) Emergency Transfer is set number of days the when transfer should be executed, if admin is not active from defined days. 3) On selected date is token should be transfered on particular date.
6) Encrypted Notes: In notes, added notes will be stored encrypted on IPFS.
7) Encrypted Email: Encrypted email is used to create decentralised communication between two wallet address. And all the mails are encrypted.
https://github.com/mansijoshi17/CrypticVault-live-/blob/master/hardhat.config.js
require("@nomiclabs/hardhat-waffle");
const pk_1 = process.env.REACT_APP_PRIVATE_KEY;
console.log(pk_1);
module.exports = {
solidity: "0.8.4",
networks: {
hardhat: {},
mumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.REACT_APP_ALCHEMY_KEY}`,
accounts: [pk_1]
},
},
};
https://github.com/mansijoshi17/CrypticVault/blob/master/Filecoin.md
function getAccessToken() {
// If you're just testing, you can paste in a token
// and uncomment the following line:
// return 'paste-your-token-here'
// In a real app, it's better to read an access token from an
// environement variable or other configuration that's kept outside of
// your code base. For this to work, you need to set the
// WEB3STORAGE_TOKEN environment variable before you run your code.
return process.env.REACT_APP_WEB3STORAGE_TOKEN;
}
function makeStorageClient() {
return new Web3Storage({ token: getAccessToken() });
}
function makeFileObjects(data, name) {
// You can create File objects from a Blob of binary data
// see: https://developer.mozilla.org/en-US/docs/Web/API/Blob
// Here we're just storing a JSON object, but you can store images,
// audio, or whatever you want!
const obj = data;
const blob = new Blob([JSON.stringify(obj)], { type: "application/json" });
const files = [new File([blob], name)];
return files;
}
async function storeJsonFiles(files) {
const client = makeStorageClient();
const cid = await client.put(files);
console.log(
"stored files with cid:",
`https://${cid}.ipfs.infura-ipfs.io/`
);
return cid;
}
https://github.com/mansijoshi17/CrypticVault/blob/master/src/context/ChatBoxContext.js
import { Client, ContentTypeText } from "@xmtp/xmtp-js";
useEffect(() => {
async function connectWallet() {
setLoading(true);
const web3Modal = new Web3Modal();
const connection = await web3Modal.connect();
const provider = new ethers.providers.Web3Provider(connection);
const signer = provider.getSigner();
const usr = signer.getAddress();
if (usr) {
usr.then((res) => {
setCurrentUser(res);
});
}
setSigner(signer);
const xmtp = await Client.create(signer);
setXmtp(xmtp);
const list = await xmtp.conversations.list();
setUserList(list);
setLoading(false);
}
connectWallet();
}, [isUpdate]);
useEffect(() => {
const getConvo = async () => {
if (!xmtp) {
return;
}
setConversation(await xmtp.conversations.newConversation(peerAddress));
};
getConvo();
}, [xmtp, peerAddress]);
useEffect(() => {
const closeStream = async () => {
if (!stream) return;
await stream.return();
};
closeStream();
}, [peerAddress]);
useEffect(() => {
const getList = async () => {
await xmtp.conversations.newConversation(peerAddress);
const lst = await xmtp.conversations.list();
setUserList(lst);
};
if (xmtp) {
getList();
}
}, [conversation, peerAddress]);
useEffect(() => {
const listMessages = async () => {
if (!conversation) return;
const msgs = await conversation.messages({ pageSize: 100 });
setMessageList(msgs);
};
listMessages();
}, [conversation, loading, updateMessage]);
useEffect(() => {
const streamMessages = async () => {
if (!conversation) return;
const demoStream = await conversation.streamMessages();
setStream(demoStream);
var array = [];
for await (const msg of demoStream) {
array.push(msg);
}
setMessageList(array);
};
streamMessages();
}, [conversation, loading, updateMessage]);
const handleSend = useCallback(
async (message) => {
if (!conversation) return;
setUpdateMessage(true);
await conversation.send(message);
setUpdateMessage(false);
},
[conversation]
);
https://github.com/mansijoshi17/CrypticVault/blob/master/Covalent.md
await axios
.get(
`https://api.covalenthq.com/v1/1/address/accounts[0]/balances_v2/?key=${process.env.REACT_APP_COVELANT_KEY}`
)
.then((res) => setBalance(res.data));