Skip to content

permaweb/permaweb-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@permaweb/operator

A small CLI for HyperBEAM bundler operators. It keeps your node's operator wallet funded with AR so the node can post bundles to Arweave L1.

Install

npm i -g @permaweb/operator
# or run without installing:
npx @permaweb/operator <command> [flags]

Requires Node.js >= 18.

Commands

topup-ar — fund the node with AR

A bundler signs and posts its bundles to Arweave L1 with its own wallet, so that wallet must hold AR. This checks the node's balance and, when it's below the threshold, sends exactly the shortfall from your treasury so the balance lands back at the threshold.

permaweb-operator topup-ar --bundler http://localhost:8734 --treasury /path/to/treasury.json
Flag Env var Default Description
--bundler, -b PERMAWEB_OPERATOR_BUNDLER http://localhost:8734 Node base URL
--treasury, -t PERMAWEB_OPERATOR_TREASURY (required) Wallet JWK that funds the top-up
--threshold-ar PERMAWEB_OPERATOR_AR_THRESHOLD 1 Target AR balance; when the node dips below this it's topped up exactly back to it
--gateway PERMAWEB_OPERATOR_GATEWAY https://arweave.net Arweave gateway
--dry-run false Print the plan without sending

It resolves the node's operator address from <bundler>/~meta@1.0/info/address, so you only pass the URL.

Environment variables

Every flag can be set with the env var shown in the tables above (CLI flag → env var → default). This makes the tool easy to run from cron, CI, or a systemd timer without long argument lists, e.g.:

export PERMAWEB_OPERATOR_BUNDLER=http://localhost:8734
export PERMAWEB_OPERATOR_TREASURY=/etc/permaweb/treasury.json
permaweb-operator topup-ar

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors