Emblem Vault
Search
⌃K

How its done

Emblem Vault Component Interactions

Emblem Vault Services Documentation

The Emblem Vault Services is a decentralized application (dApp) that allows users to create, mint, transfer, claim, and access encrypted data vaults on the blockchain. The service interacts with various components, including the User, Metamask, Serverless functions, DKG, Signer, and smart contracts such as EmblemVault_Contract, Claimed_Contract, VaultHandler_Contract, and Coval_Contract.
This documentation covers the following services:
  1. 1.
    Create
  2. 2.
    Mint
  3. 3.
    Transfer
  4. 4.
    Claim
  5. 5.
    Get Keys

1. Create Service

The Create Service allows users to create a new encrypted data vault on the blockchain.

Components

  • User
  • Metamask
  • Serverless
  • DKG (Distributed key generation service)
  • Signer
  • EmblemVault_Contract
  • Claimed_Contract
  • Database

Interactions

  1. 1.
    Sign Request: The User sends a sign request to Metamask to authenticate their identity.
  2. 2.
    Create Vault Request: The User sends a request to create a new vault to the Serverless functions.
  3. 3.
    ID Minted Before?: The Serverless functions check with the EmblemVault_Contract if the requested vault ID has been minted before.
  4. 4.
    ID Claimed Before?: The Serverless functions check with the Claimed_Contract if the requested vault ID has been claimed before.
  5. 5.
    DKG Signature: The Serverless functions create a signature using the Signer.
  6. 6.
    Get Vault Encryption Key: The Serverless functions request the vault encryption key from DKG.
  7. 7.
    Store Encrypted Vault Data: The Serverless functions store the encrypted vault data in the Database.

2. Mint Service

The Mint Service allows users to mint a new vault on the blockchain.

Components

  • User
  • Metamask
  • Serverless
  • Signer
  • EmblemVault_Contract
  • VaultHandler_Contract
  • Coval_Contract
  • Database

Interactions

  1. 1.
    Sign Request: The User sends a sign request to Metamask to authenticate their identity.
  2. 2.
    Mint Vault Request: The User sends a request to mint a new vault to the Serverless functions.
  3. 3.
    Get Vault Data: The Serverless functions retrieve the vault data from the Database.
  4. 4.
    ID Minted Before?: The Serverless functions check with the EmblemVault_Contract if the requested vault ID has been minted before.
  5. 5.
    ID Claimed Before?: The Serverless functions check with the Coval_Contract if the requested vault ID has been claimed before.
  6. 6.
    Mint Signature: The Serverless functions create a mint signature using the Signer.
  7. 7.
    Deliver Mint Signature: The Serverless functions deliver the mint signature to the User.
  8. 8.
    Approve Vaulting: The User approves the vaulting process with the EmblemVault_Contract.
  9. 9.
    Approve Spending Coval: The User approves the spending of Coval tokens with the Coval_Contract.
  10. 10.
    Mint Vault: The User sends a request to mint the vault using the VaultHandler_Contract, which then executes the buyWithSignature function.

3. Transfer Service

The Transfer Service allows users to transfer ownership of a vault on the blockchain.

Components

  • User
  • Metamask
  • EmblemVault_Contract

Interactions

  1. 1.
    Sign Request: The User sends a sign request to Metamask to authenticate their identity.
  2. 2.
    Transfer Vault: The User sends a request to transfer the vault's ownership using the EmblemVault_Contract, which then executes the safeTransferFrom function

4. Claim Service

The Claim Service allows users to claim a vault on the blockchain.

Components

  • User
  • Metamask
  • EmblemVault_Contract
  • VaultHandler_Contract
  • Claimed_Contract

Interactions

  1. 1.
    Signature Request: The User sends a signature request to Metamask to authenticate their identity.
  2. 2.
    Claim Vault Request: The User sends a request to claim a vault using the VaultHandler_Contract.
  3. 3.
    Mark Claimed: The VaultHandler_Contract marks the vault as claimed in the Claimed_Contract.
  4. 4.
    Burn: The VaultHandler_Contract burns the claimed vault token from the EmblemVault_Contract.

5. Get Keys Service

The Get Keys Service allows users to retrieve the keys to access their claimed vaults.

Components

  • User
  • Metamask
  • Claimed_Contract
  • Database
  • Serverless
  • DKG
  • Signer

Interactions

  1. 1.
    Signature Request: The User sends a signature request to Metamask to authenticate their identity.
  2. 2.
    Get Keys: The User sends a request to retrieve the keys using the Serverless functions.
  3. 3.
    Get Vault Data: The Serverless functions retrieve the vault data from the Database.
  4. 4.
    Claimed and By User from Signature?: The Serverless functions check with the Claimed_Contract if the vault has been claimed by the user corresponding to the provided signature.
  5. 5.
    Get Auth JWT: The Serverless functions create an authentication JWT using the Signer.
  6. 6.
    Give JWT to user: The Serverless functions deliver the JWT to the User.
  7. 7.
    Auth DKG with JWT: The User requests authentication with the JWT using DKG.
  8. 8.
    Get Keys from cluster: The User retrieves the keys to access their claimed vault using the DKG_Cluster.
In summary, the Emblem Vault Services is a decentralized application that enables users to create, mint, transfer, claim, and access encrypted data vaults on the blockchain. It uses a combination of smart contracts, authentication methods, and serverless functions to ensure the security and privacy of the user's data.
​