{"id":13523550,"url":"https://github.com/aviate-labs/agent-go","last_synced_at":"2025-10-12T08:42:49.317Z","repository":{"id":57596363,"uuid":"375372066","full_name":"aviate-labs/agent-go","owner":"aviate-labs","description":"Golang Agent for the Internet Computer","archived":false,"fork":false,"pushed_at":"2025-09-16T13:37:08.000Z","size":767,"stargazers_count":55,"open_issues_count":2,"forks_count":15,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T15:44:38.603Z","etag":null,"topics":["agent","blockchain","dfinity","golang","icp","internet-computer"],"latest_commit_sha":null,"homepage":"","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/aviate-labs.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,"zenodo":null}},"created_at":"2021-06-09T13:50:41.000Z","updated_at":"2025-09-16T13:35:15.000Z","dependencies_parsed_at":"2023-01-22T02:00:12.865Z","dependency_job_id":"140f1034-42eb-40ac-8873-bbf5d7a00f12","html_url":"https://github.com/aviate-labs/agent-go","commit_stats":{"total_commits":145,"total_committers":3,"mean_commits":"48.333333333333336","dds":0.03448275862068961,"last_synced_commit":"f42fbb09211c6b5a6c9eee0ed8672d18826a122f"},"previous_names":["allusion-be/agent-go"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/aviate-labs/agent-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviate-labs%2Fagent-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviate-labs%2Fagent-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviate-labs%2Fagent-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviate-labs%2Fagent-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aviate-labs","download_url":"https://codeload.github.com/aviate-labs/agent-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviate-labs%2Fagent-go/sbom","scorecard":{"id":218097,"data":{"date":"2025-08-11","repo":{"name":"github.com/aviate-labs/agent-go","commit":"74cb051e564ab7bf24586bc3c51eb76d43fd1024"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"Code-Review","score":0,"reason":"Found 1/24 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/format-check.yml:1","Warn: no topLevel permission defined: .github/workflows/test-ledger.yml:1","Warn: no topLevel permission defined: .github/workflows/test-registry.yml:1","Warn: no topLevel permission defined: .github/workflows/test.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":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/format-check.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/format-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/format-check.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/format-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-ledger.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/test-ledger.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-ledger.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/test-ledger.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-registry.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/test-registry.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-registry.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/test-registry.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:6: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/aviate-labs/agent-go/test.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/format-check.yml:20","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   1 out of   1 goCommand 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/aviate-labs/.github/SECURITY.md:1","Info: Found linked content: github.com/aviate-labs/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/aviate-labs/.github/SECURITY.md:1","Info: Found text in security policy: github.com/aviate-labs/.github/SECURITY.md:1"],"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 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"}}]},"last_synced_at":"2025-08-17T02:00:14.283Z","repository_id":57596363,"created_at":"2025-08-17T02:00:14.283Z","updated_at":"2025-08-17T02:00:14.283Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010789,"owners_count":26084807,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["agent","blockchain","dfinity","golang","icp","internet-computer"],"created_at":"2024-08-01T06:01:01.183Z","updated_at":"2025-10-12T08:42:49.302Z","avatar_url":"https://github.com/aviate-labs.png","language":"Go","funding_links":[],"categories":["Client Libraries (Agents)","CDK\u0026Agent"],"sub_categories":["Go"],"readme":"# Go Agent for the Internet Computer\n\n[![Go Version](https://img.shields.io/github/go-mod/go-version/aviate-labs/agent-go.svg)](https://github.com/aviate-labs/agent-go)\n[![GoDoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/aviate-labs/agent-go)\n\n```shell\ngo get github.com/aviate-labs/agent-go\n```\n\n## Getting Started\n\nThe agent is a library that allows you to talk to the Internet Computer.\n\n```go\npackage main\n\nimport (\n\t\"github.com/aviate-labs/agent-go\"\n\t\"log\"\n)\n\ntype (\n\tAccount struct {\n\t\tAccount string `ic:\"account\"`\n\t}\n\n\tBalance struct {\n\t\tE8S uint64 `ic:\"e8s\"`\n\t}\n)\n\nfunc main() {\n\ta, _ := agent.New(agent.DefaultConfig)\n\n\tvar balance Balance\n\tif err := a.Query(\n\t\tprincipal.MustDecode(\"ryjl3-tyaaa-aaaaa-aaaba-cai\"), \"account_balance_dfx\",\n\t\t[]any{Account{\"9523dc824aa062dcd9c91b98f4594ff9c6af661ac96747daef2090b7fe87037d\"}},\n\t\t[]any{\u0026balance},\n\t); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t_ = balance // Balance{E8S: 0}\n}\n\n```\n\n### Using an Identity\n\nSupported identities are `Ed25519` and `Secp256k1`. By default, the agent uses the anonymous identity.\n\n```go\nid, _ := identity.NewEd25519Identity(publicKey, privateKey)\nconfig := agent.Config{\n    Identity: id,\n}\n```\n\n### Using the Local Replica\n\nIf you are running a local replica, you can use the `FetchRootKey` option to fetch the root key from the replica.\n\n```go\nu, _ := url.Parse(\"http://localhost:8000\")\nconfig := agent.Config{\n    ClientConfig: \u0026agent.ClientConfig{Host: u},\n    FetchRootKey: true,\n    DisableSignedQueryVerification: true,\n}\n```\n\n## Packages\n\nYou can find the documentation for each package in the links below. Examples can be found throughout the documentation.\n\n| Package Name      | Links                                                                                                                                                                                                   | Description                                                                     |\n| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |\n| `agent`           | [![README](https://img.shields.io/badge/-README-green)](https://github.com/aviate-labs/agent-go) [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/agent-go)   | A library to talk directly to the Replica.                                      |\n| `candid`          | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/agent-go/candid)                                                                                             | A Candid library for Golang.                                                    |\n| `certification`   | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/agent-go/certificate)                                                                                        | A Certification library for Golang.                                             |\n| `gen`             | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/agent-go/gen)                                                                                                | A library to generate Golang clients.                                           |\n| `identity`        | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/agent-go/identity)                                                                                           | A library that creates/manages identities.                                      |\n| `principal`       | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/agent-go/principal)                                                                                          | Generic Identifiers for the Internet Computer                                   |\n| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |\n| `ic-go`           | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/ic-go)                                                                                                       | Multiple auto-generated sub-modules to talk to the Internet Computer services   |\n| `pocketic-go`     | [![DOC](https://img.shields.io/badge/-DOC-blue)](https://pkg.go.dev/github.com/aviate-labs/pocketic-go)                                                                                                 | A client library to talk to the PocketIC Server.                                |\n\nMore dependencies in the [go.mod](./go.mod) file.\n\n## CLI\n\n```shell\ngo install github.com/aviate-labs/agent-go/cmd/goic@latest\n```\n\nRead more [here](cmd/goic/README.md)\n\n## Testing\n\nThis repository contains two types of tests: standard Go tests and [PocketIC](https://github.com/dfinity/pocketic)\n-dependent tests. The test suite runs a local PocketIC server using the installed pocket-ic-server to execute some\nend-to-end (e2e) tests. If pocket-ic-server is not installed, those specific tests will be skipped.\n\n```shell\ngo test -v ./...\n```\n\n## Reference Implementations\n\n- [Rust Agent](https://github.com/dfinity/agent-rs/)\n- [JavaScript Agent](https://github.com/dfinity/agent-js/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviate-labs%2Fagent-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faviate-labs%2Fagent-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviate-labs%2Fagent-go/lists"}