{"id":26248507,"url":"https://github.com/janniks/stacks-go","last_synced_at":"2025-03-13T14:19:17.606Z","repository":{"id":280408562,"uuid":"941891937","full_name":"janniks/stacks-go","owner":"janniks","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-03T09:19:15.000Z","size":1848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T09:28:53.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janniks.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":"2025-03-03T08:23:06.000Z","updated_at":"2025-03-03T09:19:18.000Z","dependencies_parsed_at":"2025-03-03T09:39:37.472Z","dependency_job_id":null,"html_url":"https://github.com/janniks/stacks-go","commit_stats":null,"previous_names":["janniks/stacks-go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janniks%2Fstacks-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janniks%2Fstacks-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janniks%2Fstacks-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janniks%2Fstacks-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janniks","download_url":"https://codeload.github.com/janniks/stacks-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419067,"owners_count":20287807,"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":[],"created_at":"2025-03-13T14:19:17.039Z","updated_at":"2025-03-13T14:19:17.600Z","avatar_url":"https://github.com/janniks.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `stacks-go`\n\nA Go library for the Stacks blockchain.\n\n## Overview\n\nThis library aims to provide a pure Go implementation for interacting with the Stacks blockchain ecosystem.\n\n## Installation\n\n```bash\ngo get github.com/janniks/stacks-go\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"encoding/hex\"\n\t\"github.com/janniks/stacks-go/address\"\n)\n\nfunc main() {\n\t// Encode byte data to base58\n\tencoded := address.EncodeBase58([]byte{0, 0, 42})\n\tfmt.Println(\"Base58 encoded:\", encoded) // \"112f\"\n\n\t// Decode from base58\n\tdecoded, err := address.DecodeBase58(\"112f\")\n\tif err != nil {\n\t\tfmt.Println(\"Error:\", err)\n\t}\n\tfmt.Printf(\"Decoded bytes: %v\\n\", decoded) // [0 0 42]\n\n\t// Base58Check encode (with checksum)\n\taddr, _ := hex.DecodeString(\"00f8917303bfa8ef24f292e8fa1419b20460ba064d\")\n\tcheckEncoded := address.EncodeBase58Check(addr)\n\tfmt.Println(\"Address:\", checkEncoded) // \"1PfJpZsjreyVrqeoAfabrRwwjQyoSQMmHH\"\n}\n```\n\n## Packages\n\n### Address Package\n\nThe `address` package provides utilities for working with Stacks addresses and related encodings.\n\n- `base58.go`: Implementation of Base58 and Base58Check encoding/decoding\n  - `EncodeBase58`: Encodes bytes to Base58 string\n  - `DecodeBase58`: Decodes Base58 string to bytes\n  - `EncodeBase58Check`: Encodes bytes with a checksum (Base58Check)\n  - `DecodeBase58Check`: Decodes Base58Check string and verifies checksum\n\n## Project Structure\n\nThe project follows a clean structure:\n\n```\nstacks-go/\n├── *.go           # Core library code\n├── address/       # Address-related functionality\n│   └── base58.go  # Base58 encoding/decoding implementation\n├── tests/         # Test files\n│   └── *_test.go  # Tests for the library\n└── examples/      # Example applications\n    ├── basic/     # Basic usage example\n    └── hello/     # Hello world example\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.19 or higher\n\n### Building\n\n```bash\ngo build ./...\n```\n\n### Testing\n\n```bash\ngo test ./...\n```\n\n## Examples\n\nCheck out the examples directory for more usage examples.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanniks%2Fstacks-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanniks%2Fstacks-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanniks%2Fstacks-go/lists"}