{"id":25284341,"url":"https://github.com/elastos/elastos.smartweb.service","last_synced_at":"2025-04-06T14:36:01.809Z","repository":{"id":96721214,"uuid":"303588625","full_name":"elastos/Elastos.Smartweb.Service","owner":"elastos","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-03T23:35:46.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-02-12T20:39:06.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elastos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-13T04:33:41.000Z","updated_at":"2020-11-03T23:35:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"6cd5df9c-45e8-4996-a0c5-9fe74d997ad9","html_url":"https://github.com/elastos/Elastos.Smartweb.Service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastos%2FElastos.Smartweb.Service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastos%2FElastos.Smartweb.Service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastos%2FElastos.Smartweb.Service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastos%2FElastos.Smartweb.Service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elastos","download_url":"https://codeload.github.com/elastos/Elastos.Smartweb.Service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247496653,"owners_count":20948269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-12T20:38:09.629Z","updated_at":"2025-04-06T14:36:01.804Z","avatar_url":"https://github.com/elastos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Pre-requisites\n- Install Docker Engine\n    - [Install Docker Engine for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n    - [Install Docker Engine for Mac](https://docs.docker.com/docker-for-mac/install/)\n    - [Install Docker Engine for Windows](https://docs.docker.com/docker-for-windows/install/)\n    - For other platforms, check out [https://docs.docker.com/install/](https://docs.docker.com/install/)\n- Golang v1.15 or higher\n- Download the latest release specific to your platform from [https://github.com/cyber-republic/develap/releases](https://github.com/cyber-republic/develap/releases)\n\n## URLs\n- Status endpoints\n``` \nhttp://localhost:5000/status/nodes\nhttp://localhost:5000/status/nodes/running\nhttp://localhost:5000/status/nodes/stopped\n```\n- Node endpoints: \n```\nhttp://localhost:5000/node/mainnet/mainchain\nhttp://localhost:5000/node/testnet/mainchain\nhttp://localhost:5000/node/mainnet/did\nhttp://localhost:5000/node/testnet/did\nhttp://localhost:5000/node/mainnet/eth\nhttp://localhost:5000/node/testnet/eth\n```\n\n## How to run different nodes\n- Run a testnet environment with mainchain, did and eth nodes\n    `./sws node run -e testnet -t mainchain,did,eth`\n- Run a testnet environment with mainchain node\n    `./sws node run -e testnet -t mainchain`\n- Run a mainnet environment with did node\n    `./sws node run -e mainnet -t did`\n- Kill eth node on mainnet environment\n    `./sws node kill -e mainnet -t eth`\n- Kill all the nodes on testnet environment\n    `./sws node kill -e testnet`\n- Show all the nodes currently running in mainnet environment\n    `./sws node list -e mainnet`\n\n## How to aggregate all the running nodes into one unified URL\n``` \n./sws serve\n```\n\n## Verify\nIf you run the did node for testnet, you can do the following to check whether it's working:\n```\n# Mainchain API\ncurl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{\"method\":\"getcurrentheight\"}' localhost:5000/testnet/mainchain\n# DID Sidechain API\ncurl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{\"method\":\"getcurrentheight\"}' localhost:5000/testnet/did\n# ETH Sidechain API\ncurl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' localhost:5000/testnet/eth\n```\n\n## How to build the binary yourself\n- `make` to build it for your local environment\n- `make build-all` to build for 3 platforms: linux, darwin and windows\n\n## Tools\n- [build_dockerimages.sh](./tools/build_dockerimages.sh): This shell script automatically builds all the binaries for main chain, all the sidechains, services, etc and then packages them to be run inside docker images and if the flags \"-p\" and \"-l\" are set to \"yes\", the built docker images are automatically pushed to [Cyber Republic Docker Hub](https://cloud.docker.com/u/cyberrepublic/repository/list). Note that you need permission to push to the CR dockerhub but you can still build the images locally if you so choose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastos%2Felastos.smartweb.service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felastos%2Felastos.smartweb.service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastos%2Felastos.smartweb.service/lists"}