How to Use the Devnet Container
Generally when the container was started successfully, the localhost machine can
access the endpoints or services of the devnet container according to the bound
ports. For example http://localhost:5100/wallet
is the GraphQL endpoint of the
wallet connections, often referred to as the API_ENDPOINT_DEVNET
. In the
browser it will open the GraphQL playground for the wallet service.
query {
shardsState(networks: [DEVNET_L1A]) {
shard
live
ready
}
}
Endpoints and Services
After starting the container the following endpoints and services become available on your localhost machine.
Backend API endpoints
All backend API endpoints are meant to be accessible via
http://localhost:5100
.
/explorer
/writer
/wallet
/brdcst-wallet
Ports and Services
Further services can be accessed via localhost at the following ports.
Port | Description |
---|---|
5100 | Backend API endpoints |
5101 | DevTools |
5102 | Explorer |
5103 | LinkMint |
Use with @coinweb/cweb-tool
The @coinweb/cweb-tool
is the main tooling SDK for deploying and calling smart
contracts in Coinweb. With the Devnet Container this can be done locally. Inside
your repository you should have a script which for example invokes the publish
command. In this command a wallet service api endpoint must be provided. This
endpoint can become your local devnet container url
https://localhost:5100/wallet
, further referred to as the global variable
$API_ENDPOINT_DEVNET
.
cweb-tool publish .cweb-config/dapp-ecosystem.yaml .cweb-config/mnemonic.txt DEVNET_L1A $API_ENDPOINT_DEVNET