{"id":16036307,"url":"https://github.com/ebellocchia/go-base58","last_synced_at":"2025-04-10T06:08:18.481Z","repository":{"id":57538284,"uuid":"257982959","full_name":"ebellocchia/go-base58","owner":"ebellocchia","description":"Base58 encoding/deconding implementation (with and without checksum) in Go language","archived":false,"fork":false,"pushed_at":"2021-12-31T21:39:16.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T06:08:09.580Z","etag":null,"topics":["base58","base58check","bitcoin","cryptocurrency","go","go-package","golang","golang-package","ripple"],"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/ebellocchia.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}},"created_at":"2020-04-22T18:13:33.000Z","updated_at":"2022-02-22T14:25:13.000Z","dependencies_parsed_at":"2022-09-07T17:35:26.641Z","dependency_job_id":null,"html_url":"https://github.com/ebellocchia/go-base58","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fgo-base58","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fgo-base58/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fgo-base58/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fgo-base58/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebellocchia","download_url":"https://codeload.github.com/ebellocchia/go-base58/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"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":["base58","base58check","bitcoin","cryptocurrency","go","go-package","golang","golang-package","ripple"],"created_at":"2024-10-08T22:02:40.923Z","updated_at":"2025-04-10T06:08:18.452Z","avatar_url":"https://github.com/ebellocchia.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base58 package\n[![Build Status](https://travis-ci.com/ebellocchia/go-base58.svg?branch=master)](https://travis-ci.com/ebellocchia/go-base58)\n[![codecov](https://codecov.io/gh/ebellocchia/go-base58/branch/master/graph/badge.svg)](https://codecov.io/gh/ebellocchia/go-base58)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/ebellocchia/go-base58/master/LICENSE)\n\n## Introduction\n\nThis simple package implements the Base58 encoding/decoding, with and without checksum.\n\n## Installation\n\nThe package can be installed by simply running:\n\n    go get -u github.com/ebellocchia/go-base58\n\n## Usage\n\nFirst of all, a base58 object shall be created using the *New* function, by specifying the alphabet to be used.\\\nThe possible alphabets are:\n- Bitcoin: *base58.AlphabetBitcoin*\n- Ripple: *base58.AlphabetRipple*\n- Flickr: *base58.AlphabetFlickr*\n\nIf the object is created without using the *New* function, the Bitcoin alphabet will be used by default.\\\nThere are 4 APIs that can be used:\n- *Encode([]byte) string*: encode bytes into string\n- *CheckEncode([]byte) string*: encode bytes into string with checksum\n- *Decode(string) ([]byte, error)*: decode string back into bytes, return error if format is not valid\n- *CheckDecode(string) ([]byte, error)*: decode string with checksum back into bytes, return error if format or checksum is not valid\n\n**Example**\n\n    package main\n\n    import (\n      \"github.com/ebellocchia/go-base58\"\n      \"fmt\"\n      \"encoding/hex\"\n    )\n\n    func main() {\n        // Create base58 object using Bitcoin alphabet\n        base58Btc := base58.New(base58.AlphabetBitcoin)\n\n        // Some bytes to encode\n        data_bytes, _ := hex.DecodeString(\"bf4f89001e670274dd\")\n\n        // Encode\n        // It returns an empty string if the alphabet is not valid\n        enc := base58Btc.Encode(data_bytes)\n        fmt.Printf(\"Encode: %s\\n\", enc)\n        // CheckEncode\n        // It returns an empty string if the alphabet is not valid\n        check_enc := base58Btc.CheckEncode(data_bytes)\n        fmt.Printf(\"Checksum encode: %s\\n\", check_enc)\n\n        // Decode\n        // It returns error if the alphabet or the string format is not valid\n        dec, err := base58Btc.Decode(enc)\n        if err != nil {\n            panic(err)\n        }\n        fmt.Printf(\"Decode: %s\\n\", hex.EncodeToString(dec))\n        // CheckDecode\n        // It returns error if the alphabet, the string format or the checksum is not valid\n        check_dec, err := base58Btc.CheckDecode(check_enc)\n        if err != nil {\n            panic(err)\n        }\n        fmt.Printf(\"Checksum decode: %s\\n\", hex.EncodeToString(check_dec))\n    }\n\n\n## License\n\nThis software is available under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febellocchia%2Fgo-base58","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febellocchia%2Fgo-base58","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febellocchia%2Fgo-base58/lists"}