Skip to content

Roselinedan1/meta-verify

Repository files navigation

Meta Verify

A cutting-edge decentralized verification platform that leverages blockchain technology to establish trust, provenance, and ownership for digital and physical assets. Meta Verify creates an immutable, transparent record of asset lifecycle, enabling secure and verifiable asset management across various domains.

Overview

Asset Tracking Vault enables users to:

  • Register assets with detailed metadata
  • Transfer ownership securely
  • Track complete asset provenance
  • Add third-party attestations
  • Manage asset status (active/inactive)
  • View complete ownership history

The system is particularly valuable for:

  • Insurance claims processing
  • Proof of ownership verification
  • Asset management
  • Fraud prevention
  • Supply chain tracking

Architecture

The system is built around a central asset vault contract that manages all asset-related operations and maintains several interconnected data structures.

graph TD
    A[Asset Registration] --> B[Asset Vault Contract]
    B --> C[Asset Data Structure]
    B --> D[History Tracking]
    B --> E[Attestations]
    B --> F[Owner Registry]
    
    C --> G[Metadata]
    C --> H[Ownership]
    C --> I[Status]
    
    D --> J[Transfer History]
    D --> K[Status Changes]
    
    E --> L[Third-party Verification]
    E --> M[Supporting Documents]
    
    F --> N[Owner Assets]
    F --> O[Access Control]
Loading

Contract Documentation

Meta Verify Vault Contract

The core contract (meta-verify-vault.clar) manages comprehensive asset verification and tracking operations.

Key Data Structures

  • assets: Stores core asset information
  • asset-history: Tracks ownership transfers
  • asset-attestations: Stores third-party verifications
  • principal-assets: Maps owners to their assets

Access Control

  • Asset modifications restricted to current owner
  • Attestations can be added by any principal
  • Transfers require current owner authorization

Getting Started

Prerequisites

  • Clarinet
  • Stacks wallet for deployment

Installation

  1. Clone the repository
  2. Install dependencies with Clarinet
  3. Deploy contract to desired network

Basic Usage

;; Register a new asset
(contract-call? .asset-vault register-asset 
    "Vintage Watch" 
    u5000 
    u1234567 
    "Excellent" 
    (some "ipfs://Qm...</"))

;; Transfer asset ownership
(contract-call? .asset-vault transfer-asset 
    u1 
    'SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7 
    (some "Sale completed"))

Function Reference

Public Functions

register-asset

(define-public (register-asset 
    (description (string-ascii 256))
    (value uint)
    (date-acquired uint)
    (condition (string-ascii 64))
    (metadata-uri (optional (string-utf8 256))))

transfer-asset

(define-public (transfer-asset
    (asset-id uint)
    (new-owner principal)
    (notes (optional (string-ascii 256))))

add-attestation

(define-public (add-attestation
    (asset-id uint)
    (attestation-type (string-ascii 64))
    (details (string-utf8 256))
    (uri (optional (string-utf8 256))))

Read-Only Functions

get-asset

(define-read-only (get-asset (asset-id uint)))

get-assets-by-owner

(define-read-only (get-assets-by-owner (owner principal)))

Development

Testing

Run the test suite using Clarinet:

clarinet test

Local Development

  1. Start Clarinet console:
clarinet console
  1. Deploy contract:
(contract-call? .asset-vault ...)

Security Considerations

Limitations

  • Asset metadata size limited to 256 characters
  • Maximum 100 assets per principal
  • No built-in encryption for sensitive metadata

Best Practices

  • Always verify asset ownership before transfers
  • Use secure URIs for sensitive metadata storage
  • Keep detailed transfer notes for audit purposes
  • Regularly monitor asset status and attestations
  • Validate all inputs before registration

Error Handling

The contract includes comprehensive error codes:

  • ERR-NOT-AUTHORIZED (u100)
  • ERR-ASSET-NOT-FOUND (u101)
  • ERR-INVALID-DETAILS (u102)
  • ERR-ALREADY-EXISTS (u103)
  • ERR-UNAUTHORIZED-TRANSFER (u104)
  • ERR-INVALID-RECEIVER (u105)
  • ERR-UNAUTHORIZED-ATTESTATION (u106)

About

no description

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors