Skip to main content

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.

http://localhost:5100/wallet
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.

PortDescription
5100Backend API endpoints
5101DevTools
5102Explorer
5103LinkMint

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.

Publish command with local devnet
cweb-tool publish .cweb-config/dapp-ecosystem.yaml .cweb-config/mnemonic.txt DEVNET_L1A $API_ENDPOINT_DEVNET