Earlier we learnt about how to install packages, and today we will have a look at how you can publish your own package to APM, which will allow other developers to use your package 🤩
To get started, there are some things it’s better to keep handy:
The lua source code for your package
A readme file for your package
You will also need $NEO tokens in your wallet or process to be able to publish packages on APM
Currently, since APM is in beta, the only way to get $NEO is to reach out to us on our discord with details of what package are you looking to publish and we will send you the required tokens.
We have not yet setup a faucet because we personally interested in learning what the publishers are publishing and support them, instead of blindly distributing tokens :)
When you get the tokens, you might want to check your balance, do so by adding this token to your ArConnect wallet
UdPDhw5S7pByV3pVqwyr1qzJ8mR8ktzi9olgsdsyZz4
Once you do that, NEO should be visible in the Assets list along with the balance
Head over to apm.betteridea.dev and switch to publish tab. Here you can fill in all the details related to the package we will be publishing.
Enter name of your package
Vendor name is optional so leave it blank
Default version is 1.0.0, will be auto filled so can leave this blank too
Enter a short description of what your package does
Paste in your repo url (bonus points if you are using Protocol.Land!)
Here are 2 files that I have prepared, for readme and package source
once I’m done filling in details and uploading the files, I can connect my wallet and hit the publish button. This will burn 10 $NEO tokens and publish the package.
Once the package is published, a new tab will open with the package page :)
Checkout sunglasses
APM.install("sunglasses") -- replace this with your package name
local sunglasses = require("sunglasses")
sunglasses.setup("ankush")
You have successfully published your ao package 🚀
Feel free to join our discord and ask away anything you want to