{"id":20170671,"url":"https://github.com/bitcoinschema/gobitcoinsv","last_synced_at":"2025-04-10T02:27:34.749Z","repository":{"id":39879237,"uuid":"290533076","full_name":"BitcoinSchema/gobitcoinsv","owner":"BitcoinSchema","description":"A collection of go projects for building on Bitcoin SV","archived":false,"fork":false,"pushed_at":"2025-03-31T19:50:09.000Z","size":490,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T20:35:52.110Z","etag":null,"topics":["bitcoin","bitcoinsv","bsv","go","golang"],"latest_commit_sha":null,"homepage":"https://gobitcoinsv.com","language":"HTML","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/BitcoinSchema.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"BitcoinSchema","custom":"https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=gobitcoinsv\u0026utm_term=gobitcoinsv\u0026utm_content=gobitcoinsv"}},"created_at":"2020-08-26T15:22:55.000Z","updated_at":"2025-03-31T19:50:06.000Z","dependencies_parsed_at":"2024-01-22T12:23:33.819Z","dependency_job_id":"b0fc4cce-1847-4fe5-bf43-7cce03a05c87","html_url":"https://github.com/BitcoinSchema/gobitcoinsv","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/BitcoinSchema%2Fgobitcoinsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgobitcoinsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgobitcoinsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgobitcoinsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BitcoinSchema","download_url":"https://codeload.github.com/BitcoinSchema/gobitcoinsv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143862,"owners_count":21054838,"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":["bitcoin","bitcoinsv","bsv","go","golang"],"created_at":"2024-11-14T01:20:14.335Z","updated_at":"2025-04-10T02:27:34.726Z","avatar_url":"https://github.com/BitcoinSchema.png","language":"HTML","funding_links":["https://github.com/sponsors/BitcoinSchema","https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=gobitcoinsv\u0026utm_term=gobitcoinsv\u0026utm_content=gobitcoinsv"],"categories":[],"sub_categories":[],"readme":"# [GoBitcoinSV](https://gobitcoinsv.com)\n\u003e A collection of Go projects for building on BitcoinSV\n\n[![last commit](https://img.shields.io/github/last-commit/BitcoinSchema/gobitcoinsv.svg?style=flat\u0026v=1)](https://github.com/BitcoinSchema/gobitcoinsv/commits/master)\n[![Release](https://img.shields.io/github/release-pre/BitcoinSchema/gobitcoinsv.svg?style=flat\u0026v=1)](https://github.com/BitcoinSchema/gobitcoinsv/releases)\n[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/BitcoinSchema/gobitcoinsv\u0026style=flat\u0026v=1)](https://mergify.io)\n[![app health](https://img.shields.io/website-up-down-green-red/https/gobitcoinsv.com.svg?label=status\u0026v=1)](https://gobitcoinsv.com)\n\u003cbr\u003e\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat\u0026v=1)](https://github.com/RichardLitt/standard-readme)\n[![Sponsor](https://img.shields.io/badge/sponsor-BitcoinSchema-181717.svg?logo=github\u0026style=flat\u0026v=1)](https://github.com/sponsors/BitcoinSchema)\n[![Donate](https://img.shields.io/badge/donate-bitcoin-ff9900.svg?logo=bitcoin\u0026style=flat\u0026v=1)](https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=gobitcoinsv\u0026utm_term=gobitcoinsv\u0026utm_content=gobitcoinsv)\n\n\u003cbr/\u003e\n\n\u003cimg src=\".github/IMAGES/website-cover.png?raw=true\u0026v=1\" alt=\"GoBitcoinSV\"\u003e\n\n\u003cbr/\u003e\n\n## Table of Contents\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [Examples](#examples)\n- [Code Standards](#code-standards)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n- [License](#license)\n\n\u003cbr/\u003e\n\n## Installation\nInstall the web application\n```shell script\nmake install\n```\n\nView the site:\n`open /public/index.html in a web browser`\n\n\u003cbr/\u003e\n\n### Deployment \u0026 Hosting\nThis repository has CI integration using [AWS CodePipeline](https://aws.amazon.com/codepipeline/).\n\nThe build in AWS will deploy to [firebase](https://firebase.google.com).\n\nThe actual build process can be found in the [buildspec.yml](buildspec.yml) file.\n\nThe application relies on [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/)\nand [AWS SSM](https://aws.amazon.com/systems-manager/features/) to store environment variables.\nSensitive environment variables are encrypted using [AWS KMS](https://aws.amazon.com/kms/) and then decrypted at runtime.\n\nDeploy different environments by changing the `\u003cstage\u003e` to `production` or `development` as example.\nThe default stage is `production` if it's not specified.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eFirebase Hosting Setup\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n1) Start a new project and assign a CNAME\n2) Make sure the region is us-central\n3) Generate a CI `firebase_token` using the command: `firebase login:ci`\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eCreate Environment Encryption Key(s) (AWS)\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nCreate a `KMS Key` per `\u003cstage\u003e` for your application(s) to encrypt environment variables\n```shell script\nmake create-env-key stage=\"\u003cstage\u003e\"\n```\n\nThis will also store the `kms_key_id` in  [SSM](https://aws.amazon.com/systems-manager/features/) located at: `/\u003capplication\u003e/\u003cstage\u003e/kms_key_id`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eManage Environment Variables (AWS)\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n- `app_id` is the Firebase application id for the [project](https://firebase.google.com/docs/projects/learn-more)\n- `project` is the [Firebase project_id](https://firebase.google.com/docs/projects/learn-more)\n- `sender_id` is the Firebase sender_id for the [project](https://firebase.google.com/docs/projects/learn-more)\n\nAdd or update your project information _(all parameters are required)_\n```shell script\nmake firebase-save-project \\\n      app_id=\"YOUR_APP_ID\" \\\n      project=\"YOUR_PROJECT_ID\" \\\n      sender_id=\"YOUR_SENDER_ID\" \\\n      stage=\"\u003cstage\u003e\"\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eManage Environment Secrets (AWS)\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n- `firebase_api_key` is found in the Firebase console for that specific project\n- `firebase_token` is the `ci:login` token that is generated from `firebase login:ci`\n- `github_token` is a personal token with access to make a webhook\n- `kms_key_id` is from the previous step (Create Environment Encryption Keys)\n\nAdd or update your secrets _(all parameters are required)_\n```shell script\nmake save-secrets \\\n      firebase_api_key=\"YOUR_FIREBASE_API_KEY\" \\\n      firebase_token=\"YOUR_FIREBASE_CI_TOKEN\" \\\n      github_token=\"YOUR_GITHUB_TOKEN\" \\\n      kms_key_id=\"YOUR_KMS_KEY_ID\" \\\n      stage=\"\u003cstage\u003e\"\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eCreate CI Environment (AWS)\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n\u003cimg src=\".github/IMAGES/infrastructure-diagram.png\" alt=\"infrastructure diagram\" height=\"450\" /\u003e\n\n**Prerequisites**\n- [An AWS account](https://aws.amazon.com/)\n    - _Deploying_ requires permission to: [KMS](https://aws.amazon.com/kms/), [SSM](https://aws.amazon.com/systems-manager/features/), [Secrets Manager](https://aws.amazon.com/secrets-manager/) and [Cloud Formation](https://aws.amazon.com/cloudformation/)\n- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)  _(`brew install awscli`)_\n- [SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-mac.html) _(`brew tap aws/tap \u0026\u0026 brew install aws-sam-cli`)_\n\nThis will create a new [AWS CloudFormation](https://aws.amazon.com/cloudformation/) stack with:\n- (1) [CodePipeline](https://aws.amazon.com/codepipeline/) with multiple stages to deploy the application from Github\n- (1) [CodePipeline Webhook](https://aws.amazon.com/codepipeline/) to receive Github notifications from a specific `branch:name`\n- (1) [CodeBuild Project](https://docs.aws.amazon.com/codebuild/latest/userguide/create-project.html) to build and deploy the app\n- (2) [Service Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) for working with CodeBuild and CodePipeline\n\n**NOTE:** Requires an existing S3 bucket for artifacts and sam-cli deployments (located in the [Makefile](Makefile))\n\nOne command will build, test, package and deploy the application to AWS.\nAfter initial deployment, updating is as simple as committing to Github.\n```shell script\nmake deploy\n``` \n\n_(Example)_ Customized deployment for another stage\n```shell script\nmake deploy stage=\"development\" branch=\"development\"\n``` \n\n_(Example)_ Customized deployment for a feature branch\n```shell script\nmake deploy stage=\"development\" branch=\"some-feature\" feature=\"some-feature\"\n```\n\n_(Example)_ Customized S3 bucket location\n```shell script\nmake deploy bucket=\"some-S3-bucket-location\"\n```\n\n_(Example)_ Customized tags for the deployment\n```shell script\nmake deploy tags=\"MyTag=some-value AnotherTag=some-value\"\n```  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eTear Down CI Environment (AWS)\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nRemove the stack (using default stage: `staging`)\n```shell script\nmake teardown\n```   \n\n_(Example)_ Teardown another stack via stage\n```shell script\nmake teardown stage=\"development\"\n``` \n\n_(Example)_ Teardown a feature/branch stack\n```shell script\nmake teardown stage=\"development\" feature=\"some-feature\"\n```   \n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n## Documentation\nNo documentation at this time. View the [source code](public) of the website.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eRelease Deployment\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n[goreleaser](https://github.com/goreleaser/goreleaser) for easy binary or library deployment to Github and can be installed via: `brew install goreleaser`.\n\nThe [.goreleaser.yml](.goreleaser.yml) file is used to configure [goreleaser](https://github.com/goreleaser/goreleaser).\n\nUse `make release-snap` to create a snapshot version of the release, and finally `make release` to ship to production.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eMakefile Commands\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nView all `makefile` commands\n```shell script\nmake help\n```\n\nList of all current commands:\n```text\naudit                         Checks for any packages that are vulnerable\naws-param-certificate         Returns the ssm location for the domain ssl certificate id\naws-param-zone                Returns the ssm location for the host zone id\nclean                         Remove previous builds, cache or install modules\ncreate-env-key                Creates a new key in KMS for a new stage\ncreate-secret                 Creates an secret into AWS SecretsManager\ndecrypt                       Decrypts data using a KMY Key ID (awscli v2)\ndecrypt-deprecated            Decrypts data using a KMY Key ID (awscli v1)\ndeploy                        Build, prepare and deploy\nencrypt                       Encrypts data using a KMY Key ID (awscli v2)\nenv-key-location              Returns the environment encryption key location\nfirebase-deploy-simple        Deploys to firebase with limited flags\nfirebase-get-env              Gets the current environment variables in the associated project\nfirebase-param-app-id         Returns the location of the app_id parameter in SSM\nfirebase-param-location       Creates a parameter location (for Firebase details in SSM)\nfirebase-param-project        Returns the location of the project-id parameter in SSM\nfirebase-param-sender-id      Returns the location of the sender_id parameter in SSM\nfirebase-save-project         Saves the firebase project information for use by CloudFormation\nfirebase-set-env              Set an environment variable in a firebase project\nfirebase-update               Update the firebase tools\nhelp                          Show this help message\ninstall                       Install the application\ninvalidate-cache              Invalidates a cloudfront cache based on path\nlint                          Run the JS linter\noutdated                      Checks for any outdated packages\npackage                       Process the CF template and prepare for deployment\nreinstall                     Removes all files and re-installs from scratch\nrelease                       Full production release (creates release in Github)\nrelease-snap                  Test the full release (build binaries)\nrelease-test                  Full production test release (everything except deploy)\nreplace-version               Replaces the version in HTML/JS (pre-deploy)\nsave-domain-info              Saves the zone id and the ssl id for use by CloudFormation\nsave-param                    Saves a plain-text string parameter in SSM\nsave-param-encrypted          Saves an encrypted string value as a parameter in SSM\nsave-secrets                  Helper for saving sensitive credentials to Secrets Manager\ntag                           Generate a new tag and push (tag version=0.0.0)\ntag-remove                    Remove a tag if found (tag-remove version=0.0.0)\ntag-update                    Update an existing tag to current commit (tag-update version=0.0.0)\nteardown                      Deletes the entire stack\nupdate-secret                 Updates an existing secret in AWS SecretsManager\nupload-files                  Upload/puts files into S3 bucket\n```\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n## Examples\nView the live [website](https://gobitcoinsv.com)\n\n\u003cbr/\u003e\n\n## Code Standards\nAlways use the language's best practices!\n\n\u003cbr/\u003e\n\n## Usage\nWe're using it! Visit the [GoBitcoinSV](https://gobitcoinsv.com) website.\n\n\u003cbr/\u003e\n\n## Maintainers\n| [\u003cimg src=\"https://github.com/rohenaz.png\" height=\"50\" alt=\"Satchmo\" /\u003e](https://github.com/rohenaz) | [\u003cimg src=\"https://github.com/mrz1836.png\" height=\"50\" alt=\"MrZ\" /\u003e](https://github.com/mrz1836) |\n|:----------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------:|\n|                                [Satchmo](https://github.com/rohenaz)                                 |                                [MrZ](https://github.com/mrz1836)                                 |\n\n\u003cbr/\u003e\n\n## Contributing\n\nView the [contributing guidelines](.github/CONTRIBUTING.md) and follow the [code of conduct](.github/CODE_OF_CONDUCT.md).\n\n### How can I help?\nAll kinds of contributions are welcome :raised_hands:!\nThe most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:.\nYou can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/BitcoinSchema) :clap:\nor by making a [**bitcoin donation**](https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=gobitcoinsv\u0026utm_term=gobitcoinsv\u0026utm_content=gobitcoinsv) to ensure this journey continues indefinitely! :rocket:\n\n[![Stars](https://img.shields.io/github/stars/BitcoinSchema/gobitcoinsv?label=Please%20like%20us\u0026style=social)](https://github.com/BitcoinSchema/gobitcoinsv/stargazers)\n\n\u003cbr/\u003e\n\n## License\n[![License](https://img.shields.io/github/license/BitcoinSchema/gobitcoinsv.svg?style=flat\u0026v=1)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinschema%2Fgobitcoinsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoinschema%2Fgobitcoinsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinschema%2Fgobitcoinsv/lists"}