Rarepress for Node.js
Rarepress.node is a part of the rarepress stack that lets you mint NFTs from outside of the browser using node.js.
rarepress.js is for running inside a browser, whereas rarepress.node is for running outside of browsers. Here are some differences:
- built-in wallet: Rarepress.node has a wallet built-in.
- multi identity: Rarepress.node lets you mint and trade from as many wallets as you want.
- automatic: Rarepress.node doesn't require manual signature approval so you can automatically mint as many NFTs as you want.
npm install rarepress.node
Try the examples under the demo folder. First clone the repository:
git clone https://github.com/skogard/rarepress.node.git
Install the dependencies:
cd rarepress.node && npm install
And finally run each file in the folder to test. Here's an example:
node demo/tokenize
The only part different from rarepress.js is the initizlization step:
const Rarepress = require('rarepress-node')
const rarepress = new Rarepress()
await rarepress.init({
key: <BIP44 derivation path (optional)>,
host: <Rarepress host URL>
})
key
: (optional) The bip44 derivation path. If unspecified, it will use the default Ethereum key path ofm'/44'/60'/0'/0/0
.host
: The rarepress host URL (see https://docs.rarepress.org/#/?id=init)
Once initialized, the syntax is EXACTLY the same as rarepress.js.
Read the documentation at https://docs.rarepress.org/.
Rarepress uses a programmable wallet called mushie, to manage keys.
To directly interact with the wallet from the command line, install mushie globally.
npm install -g mushie
From this point on, you can run the commands directly:
- Export seed:
mushie export
- Import seed:
mushie import
- Generate random seed:
mushie generate