Skip to content

kulpreet/txref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Confirmed Transaction Reference Codes

Build Status

Porting Jonas Schnelli's reference C implementation to Go

Usage

import (
    "fmt"
    
	"github.com/kulpreet/txref"
)

/* ENCODE */
var encoded_txref = string
const hrp string = "tx" //mainnet

// now encode for height 100 and pos 100
encoded_txref, err := txref.Encode(hrp, txref.Txref_magic_btc_mainnet, 100, 100, false)
fmt.Printf("Encoded txref is %s\n", encoded_txref)

/* DECODE */
decoded, magic, height, position, err := txref.Decode(encoded_txref)

Install

go get -u github.com/kulpreet/txref

About

Go implementation for TxRef BIP 136

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages