Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akachain/hstx-go-sdk
https://github.com/akachain/hstx-go-sdk
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/akachain/hstx-go-sdk
- Owner: Akachain
- License: gpl-3.0
- Created: 2020-02-13T13:43:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-14T03:52:23.000Z (over 4 years ago)
- Last Synced: 2024-06-21T06:07:44.197Z (7 months ago)
- Language: Go
- Size: 112 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Akachain - High Secure Transaction Samples ⌁ hstx-chaincode
[![Go Report Card](https://goreportcard.com/badge/github.com/Akachain/hstx-go-sdk)](https://goreportcard.com/report/github.com/Akachain/hstx-go-sdk)
Chaincode (Smart Contract)
## Prerequisites
- OS: Ubuntu 18.04, Mac OS 10.13.6
- Language: Go 1.13+
- IDE: Visual Studio Code + Go plugin / IntelliJ GoLand
- Unit test tool: built-in testing command (go test)## Require
To create SuperAdmin and Approval, the invoking identity must include attribute "hstx.role=SuperAdmin" in it's certificate.
Example create certificate with role SuperAdmin
```
curl --location --request POST 'http://admin-service-address/registerUser' \
--header 'Content-Type: application/json' \
--data-raw '{
"orgname": "operator",
"username": "SuperAdmin",
"maxEnrollments": 1,
"attrs": [{ "name": "hstx.role", "value": "SuperAdmin", "ecert": true }]
}'
```