The repository for Ambrosus Node.
The best way to learn Ambrosus is to:
- First go to General introduction
- Follow up with tutorial.
- Detailed RESTful API documentation is available at ambrosus.docs.apiary.io.
Scroll to the bottom to get instructions on how to use postman collection for the API.
Read below to learn about ambrosus node development.
Start the MongoDB and Parity containers
yarn dev:docker
Install the dependencies
yarn install
Run the tests
yarn test
To run linter:
yarn dev:lint
Building consists of compiling the Smart Contracts and transpiling the source code. It is performed by running:
yarn build
If for some reason you want to perform a clean-up:
yarn dev:clean
To run node on production use:
yarn start
Build the whole suit:
yarn build
Generate a private key for the node:
yarn ops:generate_private_key
Note: you can also place a previously generated one into the config/nodePrivateKey.json
file
Place the contract deployment address into config/registryContractAddress.json
. You should have received this value from the Ambrosus development team.
Configure the mongoDB access data inside of config/production.js
Finally, start the server:
yarn start
Additionally we provide the postman collection to make it easier to test REST queries. To use them you need to run the server, create the admin account and:
- Import the environment from
postman/AMB-template.postman_environment.json
, rename it if you want, and select it. - If needed, change
url
variable (by default url=localhost:9876) to your gateway instance - In the environment set
adminSecret
andadminAddress
variables with a existing admins private and public keys respectively. If you don't have access to an admin account, but rather a normal user account, you can set theuserSecret
anduserAddress
. Note: functionality will be limited. - Import collection from
Ambrosus.postman_collection.json
- [admin only] Add or modify accounts with the
Add account
andModify account
requests - Create tokens by calling the
Generate Token
request
We will accept contributions of good code that we can use from anyone.
Please see CONTRIBUTION.md
Before you issue pull request:
- Make sure all tests pass.
- Make sure you have test coverage for any new features.