{"id":50492521,"url":"https://github.com/strahe/synapse-go","last_synced_at":"2026-06-02T04:02:07.624Z","repository":{"id":354975791,"uuid":"1215001878","full_name":"strahe/synapse-go","owner":"strahe","description":"Go SDK for Filecoin Onchain Cloud (FOC), ported from the @filoz/synapse-sdk.","archived":false,"fork":false,"pushed_at":"2026-05-12T11:55:54.000Z","size":1347,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T13:36:06.076Z","etag":null,"topics":["curio","filecoin","foc","lotus","pdp","synapse"],"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/strahe.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-19T10:50:49.000Z","updated_at":"2026-05-12T11:56:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/strahe/synapse-go","commit_stats":null,"previous_names":["strahe/synapse-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/strahe/synapse-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strahe%2Fsynapse-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strahe%2Fsynapse-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strahe%2Fsynapse-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strahe%2Fsynapse-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strahe","download_url":"https://codeload.github.com/strahe/synapse-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strahe%2Fsynapse-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33805341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"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":["curio","filecoin","foc","lotus","pdp","synapse"],"created_at":"2026-06-02T04:02:06.838Z","updated_at":"2026-06-02T04:02:07.616Z","avatar_url":"https://github.com/strahe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# synapse-go\n\n[![CI](https://github.com/strahe/synapse-go/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/strahe/synapse-go/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/strahe/synapse-go)](https://github.com/strahe/synapse-go/releases)\n[![Go Reference](https://pkg.go.dev/badge/github.com/strahe/synapse-go.svg)](https://pkg.go.dev/github.com/strahe/synapse-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/strahe/synapse-go)](https://goreportcard.com/report/github.com/strahe/synapse-go)\n[![License](https://img.shields.io/github/license/strahe/synapse-go)](LICENSE)\n[![Go Version](https://img.shields.io/badge/go-1.26.3%2B-00ADD8)](go.mod)\n\nGo SDK for Filecoin Onchain Cloud (FOC), ported from the\n[@filoz/synapse-sdk](https://github.com/FilOzone/synapse-sdk).\n\n\u003e **Status:** Beta - API may change.\n\n**Docs:** [getting started](docs/GETTING_STARTED.md) |\n[API reference](https://pkg.go.dev/github.com/strahe/synapse-go) |\n[examples](examples/)\n\n## Install\n\n```bash\ngo get github.com/strahe/synapse-go\n```\n\nRequires Go 1.26.3+.\n\n## Quick Start\n\n```go\nclient, err := synapse.New(ctx,\n    synapse.WithPrivateKeyHex(\"0x...\"),\n    synapse.WithRPCURL(\"https://api.calibration.node.glif.io/rpc/v1\"),\n    synapse.WithSource(\"my-app\"),\n)\nif err != nil { return err }\ndefer client.Close()\n\n// file is an io.Reader over the payload to upload.\nupload, err := client.Storage().Upload(ctx, file, \u0026storage.UploadOptions{Copies: 2})\nif err != nil { return err }\n\nfmt.Println(\"piece:\", upload.PieceCID)\nfmt.Printf(\"copies: %d/%d\\n\", upload.SuccessCount(), upload.RequestedCopies)\nfmt.Println(\"retrieve:\", upload.Copies[0].RetrievalURL)\n```\n\nUse real values from your config or secret manager. Mainnet and Calibration\nare detected from the RPC chain ID.\n\nSingle uploads must be at least 127 bytes and fit the PDP cap, about 1 GiB.\n\n## Package Map\n\n| Package | Purpose |\n|---------|---------|\n| `synapse` | Root client that initializes chain config, contract addresses, and services |\n| `storage` | Multi-provider upload/download orchestration, dataset discovery, and prepare flows |\n| `payments` | USDFC balances, deposits, withdrawals, approvals, and Filecoin Pay rails |\n| `costs` | Storage pricing, lockup, runway, and funding cost calculations |\n| `warmstorage` | FWSS datasets, pricing, approved-provider discovery, and termination |\n| `spregistry` | Storage provider registry discovery and provider/product management |\n| `sessionkey` | Delegated session key authorization for FWSS EIP-712 operations |\n| `chain` | Filecoin chain IDs, contract addresses, epochs, and token units |\n| `signer` | Secp256k1 and BLS signing abstractions |\n| `piece` | PieceCID v1/v2 calculation, parsing, and validation |\n| `filbeam` | FilBeam egress quota, usage stats, and CDN retrieval for FWSS datasets |\n| `pdp` | Low-level Curio-compatible PDP provider HTTP client |\n\n## Testing\n\nCI covers build, vet, lint, tests, and govulncheck.\n\nIntegration tests require `INTEGRATION_PRIVATE_KEY` in `.env` (needs **tFIL** for gas + **5 USDFC**).\n\n`INTEGRATION_RPC_URL` is optional.\n\nApproximate local runtimes on Calibration:\n\n```bash\nmake test                      # seconds; normal development loop\nmake test-integration-readonly # 30-60s; read-only Calibration checks\nmake test-integration-fast     # 5-10m; upload/download smoke with cleanup\nmake test-integration-cross    # 15-20m; full cross-package flow\nmake test-integration          # ~30m; final validation before merge\n```\n\n## Development\n\n```bash\nmake check   # build + vet + lint + test\n```\n\n## License\n\n[Apache-2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrahe%2Fsynapse-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrahe%2Fsynapse-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrahe%2Fsynapse-go/lists"}