Numbers Protocol
  • 📓Introduction
    • Numbers Protocol
      • Defining Web3 Assets
        • Assetization Process
        • Numbers ID (Nid)
        • Non-Fungible Tokens
        • Commit
        • AssetTree
          • integrityCid
          • digitalSourceType
          • miningPreference
          • nftRecord
        • Commit and AssetTree example
      • Glossary
      • Solution Stack
      • Use Cases
      • Roadmap & Milestones
      • Principles & Standards
    • Whitepaper
    • NUM Token
      • Get NUM
      • Bridge to Multiple Chains
      • Stake NUM
      • Liquidity Providers
      • NUM Utility
      • Token Allocation
      • Deflationary Token Economy
      • Audit Report
      • Distribution and Other Activities
      • Manage your NUM in Cold Wallet
      • 🛠️Developer Tools
    • NumbersDAO
      • Roles & Responsibilities
      • Become A DAO Member
      • Governance & Voting Rules - v2.0
      • [Deprecated] Governance Rules v1.0
    • Weekly Summary
      • 2023
        • 13 Jan 2023
        • 20 Jan 2023
        • 27 Jan 2023
        • 3 Feb 2023
        • 10 Feb 2023
        • 17 Feb 2023
        • 24 Feb 2023
        • 3 Mar 2023
        • 10 March 2023
        • 17 Mar 2023
        • 24 Mar 2023
        • 31 Mar 2023
        • 7 Apr 2023
        • 14 Apr 2023
        • 21 Apr 2023
        • 28 Apr 2023
        • 5 May 2023
        • 12 May 2023
        • 19 May 2023
        • 26 May 2023
        • 2 June 2023
        • 9 June 2023
        • 16 June 2023
        • 23 June 2023
        • 30 June 2023
        • 7 July 2023
        • 14 July 2023
        • 21 July 2023
        • 28 July 2023
        • 4 Aug 2023
        • 11 Aug 2023
        • 18 Aug 2023
        • 25 Aug 2023
        • 01 Sep 2023
        • 08 Sep 2023
        • 15 Sep 2023
        • 22 Sep 2023
        • 29 Sep 2023
        • 6 Oct 2023
        • 13 Oct 2023
        • 20 Oct 2023
        • 27 Oct 2023
        • 3 Nov 2023
        • 10 Nov 2023
        • 17 Nov 2023
        • 24 Nov 2023
        • 1 Dec 2023
        • 8 Dec 2023
        • 15 Dec 2023
        • 22 Dec 2023
        • 29 Dec 2023
      • 2024
        • 5 Jan 2024
        • 12 Jan 2024
        • 19 Jan 2024
        • 26 Jan 2024
        • 2 Feb 2024
        • 9 Feb 2024
        • 16 Feb 2024
        • 23 Feb 2024
        • 1 Mar 2024
        • 8 Mar 2024
        • 15 Mar 2024
        • 22 Mar 2024
        • 29 Mar 2024
        • 5 Apr 2024
        • 12 Apr 2024
        • 19 Apr 2024
        • 26 Apr 2024
        • 3 May 2024
        • 10 May 2024
        • 17 May 2024
        • 24 May 2024
        • 31 May 2024
        • 7 June 2024
        • 14 June 2024
        • 21 June 2024
        • 28 June 2024
        • 5 July 2024
        • 12 July 2024
        • 19 July 2024
        • 26 July 2024
        • 2 Aug 2024
        • 9 Aug 2024
        • 16 Aug 2024
        • 23 Aug 2024
        • 30 Aug 2024
        • 6 Sep 2024
        • 13 Sep 2024
        • 20 Sep 2024
        • 27 Sep 2024
        • 4 Oct 2024
        • 11 Oct 2024
        • 18 Oct 2024
        • 25 Oct 2024
        • 1 Nov 2024
        • 8 Nov 2024
        • 15 Nov 2024
        • 22 Nov 2024
        • 29 Nov 2024
        • 6 Dec 2024
        • 13 Dec 2024
        • 20 Dec 2024
        • 27 Dec 2024
      • 2025
        • 3 Jan 2025
        • 10 Jan 2025
        • 17 Jan 2025
        • 24 Jan 2025
        • 31 Jan 2025
        • 7 Feb 2025
        • 14 Feb 2025
        • 21 Feb 2025
        • 28 Feb 2025
        • 7 Mar 2025
        • 14 Mar 2025
        • 21 Mar 2025
        • 28 Mar 2025
        • 4 Apr 2025
        • 11 Apr 2025
    • Community Wiki
    • FAQ
      • What is provenance and how does it work?
      • What is C2PA and why do we need it?
      • What's the role of Numbers in AI?
      • What's the difference between Numbers and NFT
      • What's the difference between Numbers and C2PA
      • How can Numbers assist songwriters and artists?
      • Why Numbers needs its own blockchain?
      • Why Numbers Mainnet is permissioned?
      • Does Numbers support other blockchain?
      • How is the Nid generated?
      • Should I mint NFT or commit with "license-to" action?
      • Environmental impact of Numbers Mainnet
      • How do I get or bridge Mainnet/BEP-20/ERC-20 NUM?
      • What is Numbers Protocol's role in the AI space?
    • Partnership Programs
      • Creative Origins
      • Creative Innovators
      • Provenance Pioneers
  • 🌐Applications
    • User Tutorials
    • Verify Engine
      • Support Status
      • Search UI Interface
      • Asset Profile
      • Advanced Search & URL Parameters
    • Capture
  • 🛠️Developers
    • Numbers Blockchain
      • Testnet (Snow)
        • Testnet Launch PR
      • Mainnet (Jade)
      • Contract Overview
      • Commit Contract
        • How Commit Contract Works
        • assetTree File
        • On-chain Commit Logs
        • When Should You Use Commit Contract?
      • NFT Contract
    • Initial Asset Registration
    • Verify Engine API
      • Asset Search
      • NFT Search
      • Theft Detection
      • Support Status
    • Nit - Git for Media Files
      • Getting Started
      • Nit Bubble Plugin
    • Read Asset History
      • Read commits with Asset Profile
        • Embed social media into asset profile
      • Read commits via API
      • Read commits via nit module
      • Read commits via Bubble plugin
      • Get the merged AssetTree
    • Commit Asset History
      • Support Status
      • Commit via API
      • Commit via Nit module
      • Commit via Bubble plugin
    • More Tools
      • [NUM] Fetch NUM balance
      • [NUM] Transfer NUM from Custodial Wallet
      • [NUM] Check Staked Amount
      • [IPFS] Cat metadata from Nid/Cid
      • [IPFS] Create Metadata on IPFS
      • [IPFS] Check Nid/Cid on IPFS
      • [IPFS] Unpin Nid/Cid from IPFS
      • XMP parser
    • Working With Us
      • Job Opportunity
      • Reporting Security Vulnerability
Powered by GitBook
On this page
  • Plugin Config
  • getCommitsFromCid
  • getBlocks
  • getCommits
  • getAssetTree
  • commit
  • ipfsCat
  1. Developers
  2. Nit - Git for Media Files

Nit Bubble Plugin

PreviousGetting StartedNextRead Asset History

Last updated 1 year ago

Plugin Config

Before using the plugin, please fill the following three on the plugin config page.

  • network: jade

  • nitconfig: Please replace the placeholder for private-key with your own wallet's private key and add the provided config to the Bubble plugin. It is important to note that Infura configuration is only necessary if you plan to commit data. Read-only functions, such as getCommitsFromCid, do not require Infura keys.

{
    "defaultNetwork": "jade",
    "provider": "bafkreigrt5tepycewppysdwcjccdkdvvc2ztelqv64idgautq52g3vfh4i",
    "infura": {
        "projectId": YOUR_INFURA_PROJECT_ID,
        "projectSecret": YOUR_INFURA_PROJECT_SECRET
    },
    "network": {
        "jade": {
          "url": "https://mainnetrpc.num.network",
         "chainId": 10507,
         "accounts": [
           YOUR_PRIVATE_KEY
          ],
          "contract": "0x7EC2F14ABE8b0Ea2F657bBb62b6fEfDe161c9001",
          "explorerBaseUrl": "https://mainnet.num.network/tx"
        },
        "snow": {
          "url": "https://testnetrpc.num.network",
          "chainId": 10508,
          "accounts": [
            YOUR_PRIVATE_KEY
          ],
          "contract": "0x02eFA51b583d03342687b585417e5A62cd8273a4",
          "explorerBaseUrl": "https://testnet.num.network/tx"
        },
    }
}

getCommitsFromCid

The Bubble nit plugin is a powerful tool for no-code/low-code developers looking to easily commit data to the Numbers blockchain. This plugin offers two methods for accessing commit logs:

  1. Using the getCommitsFromCid function, developers can retrieve all commits for a specific asset by providing the asset's CID as input. This method is convenient as it returns all commits at once, allowing for easy parsing and manipulation of the data.

  2. Alternatively, developers can use the getBlocks function to retrieve the blocks of a specific asset and then use the getCommit function to retrieve the commits within each block. While this method may be more efficient for assets with a large number of commits (over 20), it does require additional steps and manipulation of the data.

It is important to note that when working with a large number of commits, using the getCommitsFromCid function may result in slow response times and potential timeouts. In such cases, getBlocks and getCommit method may be more suitable.

Description:
The getCommitsFromCid function is a powerful feature that allows users to retrieve detailed information about the commits related to a specific asset. The function takes an assetCid as input and returns a list of commits that have been made to that asset. 

Function: 
getCommitsFromCid(assetCid)

Input:
assetCid (text): The Nid of the asset for which to retrieve commit information.

Output:
authors (list of text): A list of the addresses of the user who create the commit.
timestamps (list of number): A list of the timestamps of when the commit was made.
commits (list of text): A list of the full commit messages.
transactions (list of text): A list of the transaction that was used to make the commit.
assetTreeCids (list of text): A list of the assetTree Nids found in the commit.

getBlocks

The getBlocks function allows users to acquire blocks of the commits. This function takes an assetCid as input, and returns a list of all the blocks that contain commits related to that specific asset. This function should always be run before using getCommits function.

getCommits

The getCommits function allows users to retrieve commits from the Numbers blockchain. This function is particularly useful for tracking the history of changes made to a specific asset, such as a digital document, image, or video. The getCommits function takes a block number as input, and returns the specific commit that was made within that block. This information includes details such as the authors of the commit, the timestamp of the commit, and the commit message.

getAssetTree

Function: 
getAssetTree(assetTreeCid)

Input:
assetTreeCid (text): The Cid/Nid of the AssetTree.

Output:
assetCid: (string) The Nid of the asset file
assetCreator: (string) Name of the asser creator
encodingFormat: (string) The asset's type expressed using a MIME format
assetTimestampCreated: (string) Creation time of the asset file
assetSha256: (string) SHA-256 hash of the asset file
abstract: (string) A summary or abstract of the asset
headline: (string, optional) Headline or the title of the content file
creatorWallet: (string) Wallet address of the asset creator
licenseName: (string) License of the asset file
licenseDocument: (string) URL of the license file
usedBy: (string) URL of the website that uses the asset
nftRecord: (string) IPFS Cid where you can find all the NFT records. jav
custom: (string) Stringified JSON object containing custom metadata

commit

The commit function is a core feature of the nit plugin, allowing users to commit logs for digital media files to the Numbers blockchain.

ipfsCat

The ipfsCat function is a util tool that allows you to retrieve metadata associated with a given IPFS Content Identifier (Cid) from the Numbers IPFS gateway. The function takes a single input, the Cid, which should be passed as a string. The function will return the metadata as a string, which can be parsed as JSON or other formats as desired.

Description:
ipfsCat helps you cat metadata with IPFS Nid/Cid from Numbers IPFS gateway

Function: 
ipfsCat(cid)

Input:
cid (text): The IPFS Cid of the metadata for which to retrieve

Output:
data (string): The data fetched from the IPFS Nid/Cid

contractAbiUrl :

The getAssetTree function accept the of your and return the parsed results retrieved from IPFS.

🛠️
https://dd7tel2830j4w.cloudfront.net/f1647618631535x514063401428340740/IntegrityRegister.json
Cid/Nid
AssetTree