Open Internet Service to store transaction history for NFTs/Tokens on the Internet Computer

Overview

CAP - Certified Asset Provenance

Transaction history & asset provenance for NFT’s & Tokens on the Internet Computer

CAP is an open internet service providing transaction history & asset provenance for NFT’s & Tokens on the Internet Computer. It solves the huge IC problem that assets don’t have native transaction history, and does so in a scalable, trustless and seamless way so any NFT/Token can integrate with one line of code.

This repository has the base codebase (in development), for all the canisters involved in the CAP open internet service.

For integrations visit the CAP-SDK repository in the case of Tokens/NFTs wanting to integrate CAP to have a transaction history; and the CAP-js repository for UIs that want to surface transaction history data for users from CAP.

IMPORTANT: CAP is currently in development 🚧 and will release in the first week of November, thus it is not on mainnet or usable yet. You might see our documentation is light on the SDK/Main repo still. We're delayed in this to focus on testing, but will soon update this page with guides & detailed examples for developers.

Canisters in CAP

This repository contains am implementation for the spec described for this OIS, which requires multiple canisters to act with each other, currently there are the following canisters:

  1. Router: The router canister is the central canister for this service, it is the entry point.
  2. Root: The root canister implements the Root Bucket interface of the spec.
  3. Bucket: Implements an archive canister that is generated by the Root Bucket.
Comments
  • Fix various clippy lints.

    Fix various clippy lints.

    Fixes various clippy lints throughout the repository.

    My reasoning with making all the members private on events is because there's a configuration of the type which is invalid. Thus, we really shouldn't ever let it be constructed in an invalid state. I don't see a need for the type to not be immutable also, so it should be fine.

    opened by ambeeeeee 5
  • feat: cover compliance

    feat: cover compliance

    Bring build process up to date with cover compliance and 0.9.3

    • move canister types to rust
    • rename (ic-history-* -> cap_*) canisters and packages
    • update wasm import paths
    • remove build.js
    • update CI
    opened by ozwaldorf 1
  • fix: 🐛 support the token contract id as a controller

    fix: 🐛 support the token contract id as a controller

    Why?

    On the integration of the Cap Motoko Library (PR https://github.com/Psychedelic/cap-motoko-library/pull/2), it was noted a few issues which can be verified by the long discussion here (https://discord.com/channels/837010835423494144/887363387909079062/921435040297140275), you might have to scroll up early on the day to find about more.

    While this might not be the appropriate approach, it should expose an issue where the process differs from the Rust library for the same effects on using Cap Service (described at a higher level here https://discord.com/channels/837010835423494144/887363387909079062/921421065849294888):

    Bear in mind, that the process might have changed slightly from the time this was originally written down in the Discord channel:

    Rust
      - Creates router actor
      - declares create_settings paramters
        - sets controller as router id
      - checks if get_token_contract_root_bucket by app id to find root
        - otherwise
          - creates canister with create_settings as arguments and creation cycles
          - the created canister id is used by a router.install_code
      - gets the root id
    
    Motoko
      - creates router actor
      - check if get_token_contract_root_bucket has app id to find root
      - if available, updates main root bucket
        - otherwise
          - creates settings var where controllers is router id
          - add cycles
          - calls ic management create_canister using the settings var for root canister
          - creates router actor, for some reason...
          - calls router install_bucket_code where canister is the created root canister
            - fails at this point here
          - call router get_token_contract_root_bucket
          - gets the root id
    

    How?

    The controller verification in the install code handler, takes into account the canister id of the token contract; Thus, excludes it from the verification and fallback to throwing the exception when there's more then one controller, as originally asserted. If questioned, then you are being advised to read the discussion in the Discord channel (will have to scroll up from the point/url shared above) to see the examples and tracing of the issue - bare in mind that this takes a given amount of personal effort, so its easier to follow what was written and shared, as otherwise will take time to get to that point from memory.

    Notes?

    ⚠️ Important: should be noted that the latest in Cap (https://github.com/Psychedelic/cap) is broken, that is, the Cap Service does not build or deploy locally; while this was not verified against Rust updates, etc, it was noted while working from the branched version we can see here (https://github.com/Psychedelic/cap/tree/fix/cap-motoko-library-integration-amends) branched from ad3272da7 (https://github.com/Psychedelic/cap/tree/ad3272da7b7669671471f288c4b47e7ffe9a20db).

    opened by heldrida 1
  • chore: 🤖 add fleek testnet to dfx.json

    chore: 🤖 add fleek testnet to dfx.json

    Why?

    The dfx.json should have the fleek testnet, as it'll be required for automating deployments e.g. staging https://github.com/Psychedelic/nft-marketplace-fe/pull/71 which depends on this PR

    How?

    • Add feek testnet network to dfx.json
    opened by heldrida 0
  • Implement post_upgrade & add contract_id to root bucket

    Implement post_upgrade & add contract_id to root bucket

    Once we switch to use certified-vars, this custom serialization logic won't be needed anymore, but for now it's okay although I don't really like how it looks atm.

    opened by qti3e 0
  • Add True/False and remove status

    Add True/False and remove status

    This adds the missing support for booleans in the DetailValue and removes the Status, if there is a use case like XTC they can have a failed = True in details

    opened by qti3e 0
  • Minor Clippy Fixes

    Minor Clippy Fixes

    Fixes a some clippy lints, there isn't anything to review really. I just wanted to get @qti3e's approval instead of just committing to main.

    It's going to fail CI because one of the lints is on some code with a TODO annotation.

    opened by ambeeeeee 0
  • contract id

    contract id

    Hi, in this function "async fn deploy_plug_bucket(contract_id: Principal, cycles: u64) {" the input parameter 'contract_id': Is it a canister id or plug address?

    opened by cymqqqq 2
  • Shrink unsafe block

    Shrink unsafe block

    In this function you use the unsafe keyword for almost the entrie function body.

    We need to mark unsafe operations more precisely using unsafe keyword. Keeping unsafe blocks small can bring many benefits. For example, when mistakes happen, we can locate any errors related to memory safety within an unsafe block. This is the balance between Safe and Unsafe Rust. The separation is designed to make using Safe Rust as ergonomic as possible, but requires extra effort and care when writing Unsafe Rust.

    @qti3e Hope this PR can help you. Best regards. References https://doc.rust-lang.org/nomicon/safe-unsafe-meaning.html https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html

    opened by peamaeq 0
  • Implement restrictions on the users flusher

    Implement restrictions on the users flusher

    This PR should be merged after a full round of testing.

    This PR adds enhancements to the cap's root bucket canister, to limit its outgoing requests to cap's router canister in order to increase security. It also lays the foundation for rate limiting root buckets by default. No more work has been done there on that front since it should be its separate PR.

    draft 
    opened by qti3e 0
Owner
Psychedelic
Decentralized product studio focused on building products on the Internet Computer.
Psychedelic
A rust-based command line tool to serve as a gateway for a Internet Computer replica.

icx-proxy A command line tool to serve as a gateway for a Internet Computer replica. Contributing Please follow the guidelines in the CONTRIBUTING.md

DFINITY 25 Sep 6, 2022
A tool to aid in self-hosting. Expose local services on your computer, via a public IPv4 address.

innisfree A tool to aid in self-hosting. Expose local services on your computer, via a public IPv4 address. Why? Most of the data I maintain is local,

Conor Schaefer 7 Mar 19, 2022
Final Project for "Computer Networking Security": A Layer-3 VPN implementation over TLS

Final Project for "Computer Networking Security": A Layer-3 VPN implementation over TLS

Siger Yang 2 Jun 7, 2022
MASQ Network 121 Dec 20, 2022
Simple DHCP client for the Wiznet W5500 internet offload chip.

w5500-dhcp Simple DHCP client for the Wiznet W5500 SPI internet offload chip. Warning Please proceed with caution, and review the code before use in a

Alex 0 Mar 20, 2022
Redis backed session store for async-session using fred.rs.

async-fred-session Redis backed session store for async-session using fred.rs. This work is mostly based on async-redis-session. use async_fred_sessio

void* 4 Feb 28, 2023
ZeroNS: a name service centered around the ZeroTier Central API

ZeroNS: a name service centered around the ZeroTier Central API ZeroNS provides names that are a part of ZeroTier Central's configured networks; once

ZeroTier, Inc. 327 Dec 20, 2022
Modular IPC-based desktop launcher service

Pop Launcher Modular IPC-based desktop launcher service, written in Rust. Desktop launchers may interface with this service via spawning the pop-launc

Pop!_OS 125 Dec 23, 2022
Prometheus instrumentation service for the NGINX RTMP module.

nginx-rtmp-exporter Prometheus instrumentation service for the NGINX RTMP module. Usage nginx-rtmp-exporter [OPTIONS] --scrape-url <SCRAPE_URL> O

kaylen ✨ 2 Jul 3, 2022
Simple CLI to manage your systemd clash.service and config subscriptions on Linux.

clashrup Simple CLI to manage your systemd clash.service and config subscriptions on Linux. Setup, update, apply overrides, and manage via systemctl.

Spencer (Shangbo Wu) 44 Jan 29, 2023
The best open source remote desktop software

The best open-source remote desktop software, written in Rust. Works out of the box, no configuration required. Great alternative to TeamViewer and AnyDesk! You have full control of your data, with no concerns about security. You can use our rendezvous/relay server, set up your own, or write your own rendezvous/relay server.

RustDesk 35.4k Jan 4, 2023
Filen.io is a cloud storage provider with an open-source desktop client.

Library to call Filen.io API from Rust Filen.io is a cloud storage provider with an open-source desktop client. My goal is to write a library which ca

Konstantin Zakharov 5 Nov 15, 2022
SpringQL: Open-source stream processor for IoT devices and in-vehicle computers

What is SpringQL? SpringQL is an open-source stream processor specialized in memory efficiency. It is supposed to run on embedded systems like IoT dev

SpringQL 25 Dec 26, 2022
A open port scanner.

opscan A open port scanner. Install With cargo cargo install --force opscan With docker docker run --rm -it sigoden/opscan opscan.nmap.org Binaries

null 17 Feb 19, 2023
The open source distributed web search engine that searches by meaning.

DawnSearch DawnSearch is an open source distributed web search engine that searches by meaning. It uses semantic search (searching on meaning), using

DawnSearch 4 Aug 8, 2023
Tiny CLI application in rust to scan ports from a given IP and find how many are open. You can also pass the amount of threads for that scan

Port Scanner A simple multi-threaded port scanner written in Rust. Usage Run the port scanner by providing the target IP address and optional flags. $

nicolas lopes 4 Aug 29, 2023
MuonFP is an enterprise ready, TCP passive fingerprinter written in Rust that has no external dependencies such as WireShark or other open source software.

MuonFP is a TCP passive fingerprinter written in Rust that has no external dependencies such as WireShark or other open source software. The program w

Sundruid 8 Sep 22, 2024
Cover is an open internet service for canister code verification on the Internet Computer

Cover Cover (short for Code Verification) is an open internet service that helps verify the code of canisters on the Internet Computer. Visit our webs

Psychedelic 14 Oct 31, 2022
Dank - The Internet Computer Decentralized Bank - A collection of Open Internet Services - Including the Cycles Token (XTC)

Dank - The Internet Computer Decentralized Bank Dank is a collection of Open Internet Services for users and developers on the Internet Computer. In t

Psychedelic 56 Nov 12, 2022
Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer.

JWT Issuer Proof of Concept Overview Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer. It allows the issuance of tw

Dominic Wörner 7 Oct 13, 2022