Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitcoinschema/go-1sat-ord
1Sat ordinals library for Go
https://github.com/bitcoinschema/go-1sat-ord
1sat bitcoin bitcoinsv bsv ordinals
Last synced: 3 months ago
JSON representation
1Sat ordinals library for Go
- Host: GitHub
- URL: https://github.com/bitcoinschema/go-1sat-ord
- Owner: BitcoinSchema
- Created: 2023-03-11T21:21:31.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-19T12:57:09.000Z (about 1 year ago)
- Last Synced: 2024-06-20T13:33:52.650Z (8 months ago)
- Topics: 1sat, bitcoin, bitcoinsv, bsv, ordinals
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-1sat-ord
A package for creating 1sat Ordinals on Bitcoin SV.
### Configuration
Rename `sample.env` to `.env` and set the wif keys.
### Usage
```go
import (
github.com/bitcoinschema/go-1sat-ord
)
// utxos available to use for transaction fee, and source of the 1sat ordinal
var utxos []*bitcoin.Utxo
// inscriptionData used to create an inscription output script
var inscriptionData ordinals.Ordinal
// (optional) opReturn array to be added after inscription
var opReturn bitcoin.OpReturnData
// a private key in wif format for signing the utxos and funding the tx
var purseWif string
// address to return remaining funds after fees and 1sat
var changeAddress string
// destination address - will recieve the 1sat ordinal
var ordinalAddress stringtx, err := ordinals.Inscribe(utxos, inscriptionData, opReturn, purseWif, changeAddress, ordinalAddress, signingAddress, signingKey)
// tx is a *bt.Tx from bsvlib/go-bt
// tx.TxID()```
## More Information
[1Sat Ordinals](https://github.com/bitcoinschema/1sat-ordinals)