https://github.com/bsv-blockchain/go-script-templates
Extensible Bitcoin script templates for the BSV Golang SDK
https://github.com/bsv-blockchain/go-script-templates
bitcoin bitcoinsv bsv go go-sdk scripts
Last synced: about 2 months ago
JSON representation
Extensible Bitcoin script templates for the BSV Golang SDK
- Host: GitHub
- URL: https://github.com/bsv-blockchain/go-script-templates
- Owner: bsv-blockchain
- License: other
- Created: 2024-07-25T01:39:20.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2026-05-10T20:23:45.000Z (2 months ago)
- Last Synced: 2026-05-10T22:24:05.683Z (2 months ago)
- Topics: bitcoin, bitcoinsv, bsv, go, go-sdk, scripts
- Language: Go
- Homepage:
- Size: 843 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
- Agents: .github/AGENTS.md
Awesome Lists containing this project
README
> 📣 **Notice:** Discussion underway about consolidating this repository into the [go-stack monorepo](https://github.com/bsv-blockchain/go-stack). No archive decision has been made yet — please weigh in at [bsv-blockchain/roadmap discussion #70](https://github.com/bsv-blockchain/roadmap/discussions/70) before any change is made.
# 📜 go-script-templates
**Extensible Bitcoin script templates for the [BSV Golang SDK](https://github.com/bsv-blockchain/go-sdk).**
### Project Navigation
📦 Installation
🧪 Examples & Tests
📚 Documentation
⚡ Benchmarks
🛠️ Code Standards
🤖 AI Usage
🤝 Contributing
👥 Maintainers
⚖️ License
## 📋 Overview
The goal of this repository is to provide a place where developers from around the ecosystem can publish all manner of script templates, without needing to update the core library. We're generally neutral and unbiased about what people contribute, so feel free to contribute and see what people do with your cool idea!
### Available Templates
| Template | Description |
|-------------------------------------|-------------------------------------------------------------|
| [BitCom](template/bitcom) | BitCom protocol utilities (B, MAP, AIP) for structured data |
| [BSocial](template/bsocial) | Social media actions using BitcoinSchema.org standards |
| [BSV20](template/bsv20) | BSV20 token standard implementation |
| [BSV21](template/bsv21) | BSV21 token standard implementation including LTM and POW20 |
| [Cosign](template/cosign) | Co-signing transactions with multiple parties |
| [Inscription](template/inscription) | On-chain NFT-like inscriptions |
| [Lockup](template/lockup) | Time-locked transactions |
| [OrdLock](template/ordlock) | Locking and unlocking functionality for ordinals |
| [OrdP2PKH](template/ordp2pkh) | Ordinal-aware P2PKH transactions |
| [P2PKH](template/p2pkh) | Standard Pay-to-Public-Key-Hash transactions |
| [Shrug](template/shrug) | Experimental template for demo purposes |
Each template folder contains its own README with detailed usage examples.
## 📦 Installation
**go-script-templates** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).
```shell script
go get -u github.com/bsv-blockchain/go-script-templates
```
## 📚 Documentation
Development Build Commands
Get the [MAGE-X](https://github.com/mrz1836/mage-x) build tool for development:
```shell script
go install github.com/mrz1836/mage-x/cmd/magex@latest
```
View all build commands
```bash script
magex help
```
Repository Features
This repository includes 25+ built-in features covering CI/CD, security, code quality, developer experience, and community tooling.
**[View the full Repository Features list →](.github/docs/repository-features.md)**
Library Deployment
This project uses [goreleaser](https://github.com/goreleaser/goreleaser) for streamlined binary and library deployment to GitHub. To get started, install it via:
```bash
brew install goreleaser
```
The release process is defined in the [.goreleaser.yml](.goreleaser.yml) configuration file.
Then create and push a new Git tag using:
```bash
magex version:bump push=true bump=patch branch=master
```
This process ensures consistent, repeatable releases with properly versioned artifacts and citation metadata.
Pre-commit Hooks
Set up the Go-Pre-commit System to run the same formatting, linting, and tests defined in [AGENTS.md](.github/AGENTS.md) before every commit:
```bash
go install github.com/mrz1836/go-pre-commit/cmd/go-pre-commit@latest
go-pre-commit install
```
The system is configured via modular env files in [`.github/env/`](.github/env/README.md) and provides 17x faster execution than traditional Python-based pre-commit hooks. See the [complete documentation](http://github.com/mrz1836/go-pre-commit) for details.
GitHub Workflows
All workflows are driven by modular configuration in [`.github/env/`](.github/env/README.md) — no YAML editing required.
**[View all workflows and the control center →](.github/docs/workflows.md)**
Updating Dependencies
To update all dependencies (Go modules, linters, and related tools), run:
```bash
magex deps:update
```
This command ensures all dependencies are brought up to date in a single step, including Go modules and any tools managed by [MAGE-X](https://github.com/mrz1836/mage-x). It is the recommended way to keep your development environment and CI in sync with the latest versions.
## 🧪 Examples & Tests
All unit tests and examples run via [GitHub Actions](https://github.com/bsv-blockchain/go-script-templates/actions) and use [Go version 1.25.x](https://go.dev/doc/go1.25). View the [configuration file](.github/workflows/fortress.yml).
Run all tests (fast):
```bash script
magex test
```
Run all tests with race detector (slower):
```bash script
magex test:race
```
## ⚡ Benchmarks
Run the Go benchmarks:
```bash script
magex bench
```
## 🛠️ Code Standards
Read more about this Go project's [code standards](.github/CODE_STANDARDS.md).
## 🤖 AI Usage & Assistant Guidelines
Read the [AI Usage & Assistant Guidelines](.github/tech-conventions/ai-compliance.md) for details on how AI is used in this project and how to interact with AI assistants.
## 👥 Maintainers
| [
](https://github.com/icellan) | [
](https://github.com/galt-tr) | [
](https://github.com/mrz1836) |
|:--------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------:|
| [Siggi](https://github.com/icellan) | [Dylan](https://github.com/galt-tr) | [MrZ](https://github.com/mrz1836) |
## 🤝 Contributing
View the [contributing guidelines](.github/CONTRIBUTING.md) and please follow the [code of conduct](.github/CODE_OF_CONDUCT.md).
### How can I help?
All kinds of contributions are welcome :raised_hands:!
The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:.
[](https://github.com/bsv-blockchain/go-script-templates/stargazers)
## 📝 License
[](LICENSE)