{"id":42148649,"url":"https://github.com/meshplus/gosdk","last_synced_at":"2026-01-26T18:09:08.903Z","repository":{"id":38114900,"uuid":"327203250","full_name":"meshplus/gosdk","owner":"meshplus","description":"go sdk for hyperchain","archived":false,"fork":false,"pushed_at":"2023-05-24T03:03:10.000Z","size":593,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T04:30:00.003Z","etag":null,"topics":["blockchain","hyperchain","sdk-go"],"latest_commit_sha":null,"homepage":"https://github.com/meshplus/gosdk/wiki/Gosdk-%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meshplus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2021-01-06T04:52:15.000Z","updated_at":"2023-12-11T02:23:01.000Z","dependencies_parsed_at":"2024-06-21T02:13:11.110Z","dependency_job_id":"73609db0-49d1-4e6a-a8d5-c815baeded4d","html_url":"https://github.com/meshplus/gosdk","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/meshplus/gosdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshplus%2Fgosdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshplus%2Fgosdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshplus%2Fgosdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshplus%2Fgosdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meshplus","download_url":"https://codeload.github.com/meshplus/gosdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshplus%2Fgosdk/sbom","scorecard":{"id":637230,"data":{"date":"2025-08-11","repo":{"name":"github.com/meshplus/gosdk","commit":"ecff073520667ce602a567f05c5e8dfc697b649f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":0,"reason":"binaries present in source code","details":["Warn: binary detected: conf/contract/contract01/cn/hyperchain/jcee/contract/examples/sb/src/SimulateBank.class:1","Warn: binary detected: hvm/test-jar/hvm-bench-test-1.0-SNAPSHOT-student.jar:1","Warn: binary detected: hvm/test-jar/hvm-bench-test-2.0-SNAPSHOT-student.jar:1","Warn: binary detected: hvm/test-jar/hypermap-1.0-hypermap.jar:1","Warn: binary detected: hvmtestfile/directInvoke/directInvokeTest-1.0.jar:1","Warn: binary detected: hvmtestfile/fibonacci/fibonacci-1.0-fibonacci.jar:1","Warn: binary detected: hvmtestfile/hvm-first-1.0.jar:1","Warn: binary detected: hvmtestfile/hvm-first.jar:1","Warn: binary detected: hvmtestfile/hvmDemo-1.0.jar:1","Warn: binary detected: hvmtestfile/methodInvoke/share-1.0.jar:1","Warn: binary detected: hvmtestfile/methodInvoke/share-2.0.jar:1","Warn: binary detected: rpc/fvm_test/wasm/SetHash-gc.wasm:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/meshplus/gosdk/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/meshplus/gosdk/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/meshplus/gosdk/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/meshplus/gosdk/ci.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3605 / GHSA-7vpp-9cxj-q8gv","Warn: Project is vulnerable to: GO-2024-2698 / GHSA-rhh4-rh7c-7r5v","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T09:33:49.634Z","repository_id":38114900,"created_at":"2025-08-21T09:33:49.634Z","updated_at":"2025-08-21T09:33:49.634Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28784093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["blockchain","hyperchain","sdk-go"],"created_at":"2026-01-26T18:09:04.021Z","updated_at":"2026-01-26T18:09:08.895Z","avatar_url":"https://github.com/meshplus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GO-SDK\n\nThis is gosdk for [Hyperchain](http://www.hyperchain.cn).\n\nTo get more information you can view [docs](https://github.com/meshplus/gosdk/wiki/Gosdk-%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3), use gosdk to start a enjoyable journey.\n\n## Get started\n\n### Contract Deploy \u0026 Invoke\n\nBefore invoke Contract, you should deploy contract at first step\n\n#### 1. New RPC Client\n\nRPC is a client that can provide HTTP requests, which is convenient for users to send transactions to the hyperchain\n\nRPC needs to provide configuration file path for initialization\n\n```go\nrpc := NewRPCWithPath(\"../conf\")\n```\n\n#### 2. Generate Account\n\nCreate GM type account, you can create other eg.. ECDSA or ED25519 account\n\n```go\nguomiKey, _ := gm.GenerateSM2Key()\npubKey := \u0026account.SM2Key{SM2PrivateKey: guomiKey}\nnewAddress := pubKey.GetAddress()\n```\n\n#### 3. New Contract Deploy Transaction\n\nDeclare the bin and ABI of the contract, and create the contract deploy transaction\n\n```go\n// contract ABI declare\nabiContract := \"\"\n// contract BIN declare\nbinContract := ``\n// contract \npubKey, _ := guomiKey.Public().(*gm.SM2PublicKey).Bytes()\nh, _ := hash.NewHasher(hash.KECCAK_256).Hash(pubKey)\nnewAddress := h[12:]\n\ntransaction := NewTransaction(common.BytesToAddress(newAddress).Hex()).Deploy(binContract).DeployArgs(abiContract)\n//sign with the private key of the account created before\ntransaction.Sign(guomiKey)\n```\n\n#### 4. Send Contract Deploy Transaction\n\nUse rpc client send contract deploy transaction and get contract address from txReceipt\n\n```go\ntxReceipt, err := rpc.DeployContract(transaction)\nif err != nil {\n\tfmt.Println(err)\n}\n//Assignment contract address\ncontractAddress := txReceipt.ContractAddress\n```\n\n#### 5. New Contract Invoke Transaction\n\nPackage and compress the contract method and parameters to create the contract call transaction\n\n```go\n//decode string contractABI to ABI struct\nABI, serr := abi.JSON(contractABI)\nif err != nil {\n    t.Error(serr)\n    return\n}\n// pack contract invoke function and params\npacked, serr := ABI.Pack(\"add\", uint32(1), uint32(2))\nif serr != nil {\n    t.Error(serr)\n    return\n}\ntransaction := NewTransaction(common.BytesToAddress(newAddress).Hex()).Invoke(contractAddress, packed)\n//sign with the private key of the account created before  \ntransaction.Sign(privateKey)\n```\n\n#### 6. Send Contract Invoke Transaction\n\nUse rpc client send contract invoke transaction and get contract invoke receipt\n\n```go\nreceipt, err := rpc.InvokeContract(transaction)\nif err != nil {\n\tfmt.println(err)\n}\n```\n\n#### 7. Decode Invoke Result\n\nDecode  receipt to specific result type.\n\n```go\nvar result uint32\nif err := ABI.UnpackResult(v, method, ret); err != nil {\n\tfmt.println(err)\n}\nresult = v\nfmt.Println(result)\n```\n\n## Issue\n\nIf you have any suggestions or idea, please submit issue in this project!\n\n## Doc\nIf you want to know more about GO-SDK, you can read manual at [here](https://github.com/meshplus/gosdk/wiki/Gosdk-%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3).\n\n## Contribute\n\nWelcome to contribute code\n\nIf the code you submit contains test files, and the test function has an RPC request,\nplease start the test function with TestRPC_, The CI server will skip these tests.\nYou need to start the flato node locally for testing.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshplus%2Fgosdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeshplus%2Fgosdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshplus%2Fgosdk/lists"}