Nit Bubble Plugin
Plugin Config
Before using the plugin, please fill the following three on the plugin config page.
network
: jadenitconfig
: Please replace the placeholder forprivate-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 asgetCommitsFromCid
, do not require Infura keys.
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:
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.Alternatively, developers can use the
getBlocks
function to retrieve the blocks of a specific asset and then use thegetCommit
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.
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
The getAssetTree
function accept the Cid/Nid of your AssetTree and return the parsed results retrieved from IPFS.
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.
Last updated