{"id":36547040,"url":"https://github.com/tempoxyz/tempo-go","last_synced_at":"2026-04-10T17:31:15.401Z","repository":{"id":332030996,"uuid":"1100044445","full_name":"tempoxyz/tempo-go","owner":"tempoxyz","description":"Go SDK for the Tempo blockchain","archived":false,"fork":false,"pushed_at":"2026-01-06T01:28:58.000Z","size":118,"stargazers_count":30,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T13:10:14.696Z","etag":null,"topics":["go","tempo"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/tempoxyz/tempo-go","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/tempoxyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2025-11-19T19:08:58.000Z","updated_at":"2026-01-07T08:34:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tempoxyz/tempo-go","commit_stats":null,"previous_names":["tempoxyz/tempo-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tempoxyz/tempo-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Ftempo-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Ftempo-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Ftempo-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Ftempo-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tempoxyz","download_url":"https://codeload.github.com/tempoxyz/tempo-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tempoxyz%2Ftempo-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":["go","tempo"],"created_at":"2026-01-12T06:06:39.430Z","updated_at":"2026-04-10T17:31:15.387Z","avatar_url":"https://github.com/tempoxyz.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cbr\u003e\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://tempo.xyz\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/tempoxyz/.github/refs/heads/main/assets/combomark-dark.svg\"\u003e\n      \u003cimg alt=\"tempo combomark\" src=\"https://raw.githubusercontent.com/tempoxyz/.github/refs/heads/main/assets/combomark-bright.svg\" width=\"auto\" height=\"120\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n# tempo-go\n\nGo SDK for building applications on [Tempo](https://tempo.xyz)\n\n**Contents**\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Example Usage](#example-usage)\n- [Packages](#packages)\n- [Testing](#testing)\n- [Development Setup](#development-setup)\n\n## Installation\n\n```bash\ngo get github.com/tempoxyz/tempo-go\n```\n\n### Go Version Requirements\n\n| tempo-go version | Go version | Notes |\n|------------------|------------|-------|\n| v0.2.0+          | 1.24+      | Security fix for CVE-2026-22868 |\n| v0.1.0           | 1.21+      | Vulnerable to CVE-2026-22868 (go-ethereum DoS) |\n\nIf you need Go 1.21-1.23 support, pin to v0.1.0:\n```bash\ngo get github.com/tempoxyz/tempo-go@v0.1.0\n```\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"math/big\"\n\n    \"github.com/ethereum/go-ethereum/common\"\n    \"github.com/tempoxyz/tempo-go/pkg/client\"\n    \"github.com/tempoxyz/tempo-go/pkg/signer\"\n    \"github.com/tempoxyz/tempo-go/pkg/transaction\"\n)\n\nfunc main() {\n    // Create RPC client\n    c := client.New(transaction.RpcUrlModerato)\n\n    s, _ := signer.NewSigner(\"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80\")\n\n    recipient := common.HexToAddress(\"0x70997970C51812dc3A010C7d01b50e0d17dc79C8\")\n    amount := new(big.Int).Mul(big.NewInt(10), big.NewInt(1e18)) // 10 AlphaUSD (18 decimals)\n    transferData := buildERC20TransferData(recipient, amount)\n\n    tx := transaction.NewDefault(transaction.ChainIdModerato)\n    tx.MaxFeePerGas = big.NewInt(2000000000)\n    tx.MaxPriorityFeePerGas = big.NewInt(1000000000)\n    tx.Gas = 100000\n    tx.Calls = []transaction.Call{{\n        To:    \u0026transaction.AlphaUSDAddress,\n        Value: big.NewInt(0),\n        Data:  transferData,\n    }}\n\n    transaction.SignTransaction(tx, s)\n\n    serialized, _ := transaction.Serialize(tx, nil)\n    hash, _ := c.SendRawTransaction(context.Background(), serialized)\n    fmt.Printf(\"Transaction hash: %s\\n\", hash)\n}\n\n// buildERC20TransferData creates calldata for ERC20 transfer(address,uint256)\nfunc buildERC20TransferData(to common.Address, amount *big.Int) []byte {\n    // transfer(address,uint256) selector: 0xa9059cbb\n    data := make([]byte, 68)\n    data[0], data[1], data[2], data[3] = 0xa9, 0x05, 0x9c, 0xbb\n    copy(data[16:36], to.Bytes())              // address (32 bytes, left-padded)\n    amount.FillBytes(data[36:68])              // uint256 (32 bytes)\n    return data\n}\n```\n\n## Example Usage\n\n| Use Case            | Example                                                      |\n| ------------------- | ------------------------------------------------------------ |\n| **Basic Transfer**  | [examples/simple-send](examples/simple-send)                 |\n| **Fee Sponsorship** | [examples/feepayer](examples/feepayer)                       |\n| **Batch Calls**     | See [transaction tests](pkg/transaction/transaction_test.go) |\n\n### Basic Transfer\n\n```go\ntx := transaction.NewDefault(transaction.ChainIdMainnet)\ntx.MaxFeePerGas = big.NewInt(2000000000)\ntx.MaxPriorityFeePerGas = big.NewInt(1000000000)\ntx.Gas = 100000\ntx.Calls = []transaction.Call{{\n    To:    \u0026transaction.AlphaUSDAddress,\n    Value: big.NewInt(0),\n    Data:  transferData, // ERC20 transfer calldata\n}}\n\ntransaction.SignTransaction(tx, signer)\n\nserialized, _ := transaction.Serialize(tx, nil)\nclient.SendRawTransaction(context.Background(), serialized)\n```\n\n### Sponsored Transaction\n\n```go\ntx := transaction.NewDefault(transaction.ChainIdMainnet)\ntransaction.SignTransaction(tx, userSigner)\n\ntransaction.AddFeePayerSignature(tx, feePayerSigner)\n\nserialized, _ := transaction.Serialize(tx, nil)\nclient.SendRawTransaction(context.Background(), serialized)\n```\n\n### Batch Multiple Calls\n\n```go\ntx := transaction.NewDefault(transaction.ChainIdMainnet)\ntx.Gas = 150000\ntx.Calls = []transaction.Call{\n    {To: \u0026addr1, Value: big.NewInt(0), Data: transfer1Data},\n    {To: \u0026addr2, Value: big.NewInt(0), Data: transfer2Data},\n    {To: \u0026addr3, Value: big.NewInt(0), Data: contractCallData},\n}\n\ntransaction.SignTransaction(tx, signer)\nserialized, _ := transaction.Serialize(tx, nil)\nclient.SendRawTransaction(context.Background(), serialized)\n```\n\n### Transaction with Validity Window\n\n```go\ntx := transaction.NewDefault(transaction.ChainIdMainnet)\ntx.ValidAfter = uint64(time.Now().Unix())\ntx.ValidBefore = uint64(time.Now().Add(1 * time.Hour).Unix())\n\ntransaction.SignTransaction(tx, signer)\nserialized, _ := transaction.Serialize(tx, nil)\nclient.SendRawTransaction(context.Background(), serialized)\n```\n\n## Packages\n\n| Package       | Description                                        | Documentation                                                            |\n|---------------|----------------------------------------------------|--------------------------------------------------------------------------|\n| `transaction` | TempoTransaction encoding, signing, and validation | [GoDoc](https://pkg.go.dev/github.com/tempoxyz/tempo-go/pkg/transaction) |\n| `client`      | RPC client for interacting with Tempo nodes        | [GoDoc](https://pkg.go.dev/github.com/tempoxyz/tempo-go/pkg/client)      |\n| `signer`      | Key management and signature generation            | [GoDoc](https://pkg.go.dev/github.com/tempoxyz/tempo-go/pkg/signer)      |\n| `keychain`    | Keychain-based transaction signing                 | [GoDoc](https://pkg.go.dev/github.com/tempoxyz/tempo-go/pkg/keychain)    |\n\n## Testing\n\n### Run Unit Tests\n\n```bash\nmake test\n```\n\n### Run Tests with Coverage\n\n```bash\nmake test-coverage\n```\n\n### Run All Checks (format, vet, tests)\n\n```bash\nmake check\n```\n\n### Run Integration Tests\n\n```bash\n# Start local Tempo node\ndocker-compose up -d\n\n# Run integration tests\nmake integration\n\n# Stop node\ndocker-compose down\n```\n\n### External Resources\n\n- [Tempo Documentation](https://docs.tempo.xyz)\n\n### API Reference\n\nView documentation locally:\n\n```bash\nmake docs\n# Opens at http://localhost:6060/pkg/github.com/tempoxyz/tempo-go/\n```\n\nFull API documentation is also available on [pkg.go.dev](https://pkg.go.dev/github.com/tempoxyz/tempo-go).\n\n## Development Setup\n\n### Prerequisites\n\n- Go 1.24 or higher (see [Go Version Requirements](#go-version-requirements))\n- Make\n\n### Building\n\n```bash\ngit clone https://github.com/tempoxyz/tempo-go.git\ncd tempo-go\n\ngo mod download\n\nmake check\n```\n\n### Running Examples\n\n```bash\n# Build all examples\nmake build_examples\n\n# Run the simple-send example\n./bin/simple-send\n\n# Run the fee payer server\n./bin/feepayer\n```\n\n### Code Formatting\n\n```bash\nmake fix\n```\n\n## Contributing\n\nOur contributor guidelines can be found in [`CONTRIBUTING.md`](https://github.com/tempoxyz/tempo?tab=contributing-ov-file).\n\n## Security\n\nSee [`SECURITY.md`](https://github.com/tempoxyz/tempo-go?tab=security-ov-file). Note: Tempo is still undergoing audit and does not have an active bug bounty. Submissions will not be eligible for a bounty until audits have concluded.\n\n## License\n\nLicensed under either of [Apache License](./LICENSE-APACHE), Version\n2.0 or [MIT License](./LICENSE-MIT) at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in these packages by you, as defined in the Apache-2.0 license,\nshall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftempoxyz%2Ftempo-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftempoxyz%2Ftempo-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftempoxyz%2Ftempo-go/lists"}