- Create and submit transactions and queries to a consensus node
- Interact with the mirror node via REST APIs
- Run integration tests in CI against a network you control
1. Start a local network
Install Solo and deploy a single-node network:2. Configure your client
Point your client at the local consensus node and mirror node instead of a public network by building the network map explicitly. On Solo 0.63 and later, a single-node deployment exposes the consensus node at127.0.0.1:35211 with node account ID 0.0.3, and the mirror node at 127.0.0.1:38081. Store these in an environment or config file rather than hard-coding them; they are inlined below only for readability.
These ports are Solo’s defaults, not guarantees. Solo forwards to the next free port if one is taken, and the values changed in 0.63. Confirm what your deployment exposes with
solo deployment config ports --deployment <deployment-name>, and see Using Solo with Hiero SDKs for the full per-SDK walkthrough.3. Set your transaction fee paying account
You need an account ID and key to pay the fees for each transaction and query submitted to your local network. Solo provisions a bootstrap operator account,0.0.2, at genesis and writes it to systemAccounts[0] in ~/.solo/one-shot-<deployment-name>/accounts.json. Its key is Ed25519 in DER format. Read the privateKey value, the longer string beginning with 302e, not publicKey.
Note: It is not good practice to post your private keys in any public place. These keys are provided only for development and testing purposes only. They do not exist on any production networks.
4. Submit your transaction
Submit a transaction that will create a new account in your local network. The console should print out the new account ID. In this example, we are using the same key as the transaction fee paying account as the key for the new account. You can also create a new key if you wish.5. View your transaction
You can view the executed transaction by querying your local mirror node. The local mirror node REST endpoint ishttp://localhost:38081/.
You can view the transactions that were submitted to your local network by submitting this request:
http://localhost:38080/localnet/dashboard. You have now set up your local environment. Check out the following links for more examples.