{"id":13769978,"url":"https://github.com/blockfrost/blockfrost-go","last_synced_at":"2025-10-31T16:30:43.030Z","repository":{"id":37001041,"uuid":"405904907","full_name":"blockfrost/blockfrost-go","owner":"blockfrost","description":"Golang SDK for Blockfrost.io","archived":false,"fork":false,"pushed_at":"2025-01-07T14:19:06.000Z","size":302,"stargazers_count":24,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T22:35:50.718Z","etag":null,"topics":["blockfrost","cardano","golang","ipfs"],"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/blockfrost.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":"2021-09-13T09:09:45.000Z","updated_at":"2025-01-28T21:55:06.000Z","dependencies_parsed_at":"2024-02-25T11:45:54.685Z","dependency_job_id":null,"html_url":"https://github.com/blockfrost/blockfrost-go","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfrost%2Fblockfrost-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockfrost","download_url":"https://codeload.github.com/blockfrost/blockfrost-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238829563,"owners_count":19537717,"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":["blockfrost","cardano","golang","ipfs"],"created_at":"2024-08-03T17:00:33.208Z","updated_at":"2025-10-31T16:30:42.866Z","avatar_url":"https://github.com/blockfrost.png","language":"Go","funding_links":[],"categories":["Modules"],"sub_categories":["Off-chain data sources SDKs"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://blockfrost.io\" target=\"_blank\" align=\"center\"\u003e\n    \u003cimg src=\"https://blockfrost.io/images/logo.svg\" width=\"280\"\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n\u003c/p\u003e\n\n# Official Blockfrost SDK Client\n\n[![Build status](https://github.com/blockfrost/blockfrost-go/actions/workflows/test.yml/badge.svg?branch=staging)](https://github.com/blockfrost/blockfrost-go/actions/workflows/test.yml)\n[![Go report card](https://goreportcard.com/badge/github.com/blockfrost/blockfrost-go)](https://goreportcard.com/report/github.com/blockfrost/blockfrost-go)\n[![GoDoc](https://godoc.org/github.com/blockfrost/blockfrost-go?status.svg)](https://godoc.org/github.com/blockfrost/blockfrost-go)\n\n## Getting started\n\nTo use this SDK, you first need to log in to [blockfrost.io](https://blockfrost.io), create your project and retrieve the API token.\n\n\u003cimg src=\"https://i.imgur.com/smY12ro.png\"\u003e\n\n\u003cbr/\u003e\n\n## Installation\n\n`blockfrost-go` can be installed through go get\n\n```console\n$ go get https://github.com/blockfrost/blockfrost-go\n```\n\n## Usage\n\n### Cardano API\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/blockfrost/blockfrost-go\"\n)\n\nfunc main() {\n\tapi, err := blockfrost.NewAPIClient(\n\t\tblockfrost.APIClientOptions{\n            ProjectID: \"YOUR_PROJECT_ID_HERE\", // Exclude to load from env:BLOCKFROST_PROJECT_ID\n        },\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tinfo, err := api.Info(context.TODO())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"API Info:\\n\\tUrl: %s\\n\\tVersion: %s\", info.Url, info.Version)\n}\n```\n\n### IPFS\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/blockfrost/blockfrost-go\"\n)\n\nvar (\n\tfp = flag.String(\"file\", \"\", \"Path to file\")\n)\n\nfunc main() {\n\tflag.Parse()\n\t// Load project_id from env:BLOCKFROST_IPFS_PROJECT_ID\n\tipfs := blockfrost.NewIPFSClient(blockfrost.IPFSClientOptions{})\n\n\tipo, err := ipfs.Add(context.TODO(), *fp)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"IPFS Object: %+v\\n\", ipo)\n\n\t// Pin item to avoid being garbage collected.\n\tpin, err := ipfs.Pin(context.TODO(), ipo.IPFSHash)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"Pin: %+v\", pin)\n}\n```\n\nMore examples of usage can be found in [`example`](https://github.com/blockfrost/blockfrost-go/tree/master/example) folder.\n\n## Developing\n\nSet `BLOCKFROST_PROJECT_ID` env variable:\n\n```\nexport BLOCKFROST_PROJECT_ID=\u003cMAINNET_TOKEN\u003e\n```\n\nTo run specific test:\n\n```\ngo test -run \u003cname\u003e\n```\n\nTo run all tests:\n\n```\nmake test\n```\n\nTo generate missing .golden file\n\n```\ngo test -gen\n```\n\n## License\n\nLicensed under the [Apache License 2.0](https://opensource.org/licenses/Apache-2.0), see [`LICENSE`](https://github.com/blockfrost/blockfrost-go/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockfrost%2Fblockfrost-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockfrost%2Fblockfrost-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockfrost%2Fblockfrost-go/lists"}