The Astral Network is an abstract, general-purpose peer-to-peer network layer that runs on top of multiple transports. astrald is a daemon that provides easy access to the network via local interface. It provides connectivity, identity, authentication, encryption and a set of core protocols apps and agents can use to easily interact over the network. The full documentation is here.
All actors (nodes, apps, users and agents) on the network have a self-assigned identity based on a ECDSA key on the secp256k1 curve, the same as the Lightning Network or Bitcoin. Nodes form the core infrastructure of the network by establish encrypted and authenticated links with each other, exchanging certificates, gossip data and organizing complex p2p processes. Apps, agents and users access the network via the API exposed by the daemon via varoius transports - astral apphost protocol, HTTP, WSS, etc.
Actors send each other queries (similar to HTTP query path) over the network that can be rejected or accepted to establish a connection. The connection is then used to exchange data in form of Objects (or just a raw bytestream).
Install the daemon and the tooling:
go install \
github.com/cryptopunkscc/astrald/cmd/astrald@latest \
github.com/cryptopunkscc/astrald/cmd/astral-query@latestRun the daemon:
$ astraldThe node will start and generate a new identity and an alias for itself. Once the node has started verify it is accepting local API calls:
$ astral-query localnode:.specTODO
TODO
To create a new astral identity along with an access token for it, send a apphost.register query to the local node. It will send back a single apphost.access_token object:
$ astral-query apphost.register -out json | jq
{
"Type": "apphost.access_token",
"Object": {
"Identity": "026923d06a51098170093fe989d30a432283f56d89d307176fd6f947c3a9d285ff",
"Token": "Kaz3No8nYVTufIBZ6ViQsypc93SiYWJf",
"ExpiresAt": "2036-05-17T17:41:49.042372148Z"
}
}Then use the token via env:
$ ASTRALD_APPHOST_TOKEN=Kaz3No8nYVTufIBZ6ViQsypc93SiYWJf astral-query apphost.whoami -out json
{"Type":"identity","Object":"026923d06a51098170093fe989d30a432283f56d89d307176fd6f947c3a9d285ff"}Or over any of the supported transports (native or HTTP).
Astral can use BIP-0137-compatible hardware wallets as the source for user identities. See the coldcard module.