npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

asset-registar

v1.0.2

Published

Atomic Assets need to be registered to be capable of being traded on the Permaweb. You can upload your assets using services like `ardrive-cli` and give the asset the proper data tags, then use this cli to register the asset.

Downloads

6

Readme

Register Atomic Assets from Arweave

Atomic Assets need to be registered to be capable of being traded on the Permaweb. You can upload your assets using services like ardrive-cli and give the asset the proper data tags, then use this cli to register the asset.

Guide to publish an atomic asset using ArDrive-cli and asset-registar cli.

Setup

Requires NodeJS - https://nodejs.org and jq - https://jqlang.github.io/jq/download/

npm i -g ardrive-cli
npm i -g asset-registar

Create Atomic Assets Tags

Using a text editor, we want to create a new file called data.json and in this new file add the following:

{
  "dataGqlTags": {
    "Type": "ASSET_TYPE_HERE",
    "Title": "TITLE_HERE",
    "Description": "DESCRIPTION_HERE",
    "License": "yRj4a5KMctX_uOmKWCFJIjmY8DeJcusVk6-HzLiM_t8",
    "App-Name": "SmartWeaveContract",
    "App-Version": "0.3.0",
    "Contract-Src": "Of9pi--Gj7hCTawhgxOwbuWnFI1h24TTgO5pw8ENJNQ",
    "Indexed-By": "ucm",
    "Init-State": "{ \"ticker\": \"ATOMIC\", \"name\": \"ASSET_NAME_HERE\", \"balances\": { \"YOUR_WALLET_ADDRESS\": UNITS_HERE }, \"claimable\": [] }"
  }
}

Now that you have your tags initialized you need to take every uppercase word and replace it with the values that are unique to your asset.

ASSET_TYPE_HERE:

This should be a one word description of your asset, "image", "audio", "video". etc.

TITLE_HERE:

A title that describes your asset, it should not be longer than 150 characters.

DESCRIPTION_HERE:

A description that you want to show up in search results or list results for your asset.

ASSET_NAME_HERE:

The name of your asset, in one word or connected with dashes ex. "AA-ALIEN-WITH-BEER".

YOUR_WALLET_ADDRESS:

The wallet address you want to give ownership too.

UNITS_HERE:

The number of fractional units you want to provide for this asset, if there can only be one owner then the replace with 1, if you want 100 owners replace with 100.

save the file as data.json

Copy the asset you want to publish to this directory.


Uploading with new arweave wallet.

Using ardrive-cli we are going to create a wallet and a drive and a folder.

export SEED=$(ardrive generate-seedphrase)
# generate wallet
ardrive generate-wallet -s ${SEED} > wallet.json
# create drive and folder
export FOLDER=$(ardrive create-drive -w ./wallet.json -n "My Atomic Assets"  --turbo |  jq -r '.created[] | select(.type == "folder").entityId')
# upload atomic asset
export ASSET=$(ardrive upload-file -w ./wallet.json -F ${FOLDER} --metadata-file ./data.json -l ASSET_FILE_HERE --turbo | jq -r '.created[] | select(.type == "file").dataTxId')

NOTE: if your file is larger than 500k, you will need to add credits to your ardrive wallet, you can do this by going to https://ardrive.io and logging in with your wallet file.

Register asset

Once the asset is uploaded with the Atomic Asset Tags, now all you have to do is call asset-register <assetId>

asset-registar ${ASSET}

CONGRATS!

You should be able to find your asset on ar://bazar by typing in the contractId in the search bar.