Skip to content

Commit

Permalink
Rename module cosmos/btcutil
Browse files Browse the repository at this point in the history
  • Loading branch information
conr2d committed Sep 23, 2021
1 parent 43b172e commit 32fa4f6
Show file tree
Hide file tree
Showing 47 changed files with 87 additions and 105 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
btcutil
=======

[![Build Status](https://github.com/btcsuite/btcutil/workflows/Build%20and%20Test/badge.svg)](https://github.com/btcsuite/btcutil/actions)
[![Build Status](https://github.com/cosmos/btcutil/workflows/Build%20and%20Test/badge.svg)](https://github.com/cosmos/btcutil/actions)
[![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/btcsuite/btcutil)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/cosmos/btcutil)

Package btcutil provides bitcoin-specific convenience functions and types.
A comprehensive suite of tests is provided to ensure proper functionality. See
Expand All @@ -20,7 +20,7 @@ provided.
## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcutil
$ go get -u github.com/cosmos/btcutil
```

## GPG Verification Key
Expand Down
4 changes: 2 additions & 2 deletions address.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcutil/base58"
"github.com/btcsuite/btcutil/bech32"
"github.com/cosmos/btcutil/base58"
"github.com/cosmos/btcutil/bech32"
"golang.org/x/crypto/ripemd160"
)

Expand Down
2 changes: 1 addition & 1 deletion address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
"golang.org/x/crypto/ripemd160"
)

Expand Down
2 changes: 1 addition & 1 deletion amount.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func round(f float64) Amount {
// NewAmount is for specifically for converting BTC to Satoshi.
// For creating a new Amount with an int64 value which denotes a quantity of Satoshi,
// do a simple type conversion from type int64 to Amount.
// See GoDoc for example: http://godoc.org/github.com/btcsuite/btcutil#example-Amount
// See GoDoc for example: http://godoc.org/github.com/cosmos/btcutil#example-Amount
func NewAmount(f float64) (Amount, error) {
// The amount is only considered invalid if it cannot be represented
// as an integer type. This may happen if f is NaN or +-Infinity.
Expand Down
2 changes: 1 addition & 1 deletion amount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"math"
"testing"

. "github.com/btcsuite/btcutil"
. "github.com/cosmos/btcutil"
)

func TestAmountCreation(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion appdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"unicode"

"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
)

// TestAppDataDir tests the API for AppDataDir to ensure it gives expected
Expand Down
14 changes: 7 additions & 7 deletions base58/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
base58
==========

[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil)
[![Build Status](http://img.shields.io/travis/cosmos/btcutil.svg)](https://travis-ci.org/cosmos/btcutil)
[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/base58)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/cosmos/btcutil/base58)

Package base58 provides an API for encoding and decoding to and from the
modified base58 encoding. It also provides an API to do Base58Check encoding,
Expand All @@ -14,18 +14,18 @@ A comprehensive suite of tests is provided to ensure proper functionality.
## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcutil/base58
$ go get -u github.com/cosmos/btcutil/base58
```

## Examples

* [Decode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-Decode)
* [Decode Example](http://godoc.org/github.com/cosmos/btcutil/base58#example-Decode)
Demonstrates how to decode modified base58 encoded data.
* [Encode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-Encode)
* [Encode Example](http://godoc.org/github.com/cosmos/btcutil/base58#example-Encode)
Demonstrates how to encode data using the modified base58 encoding scheme.
* [CheckDecode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-CheckDecode)
* [CheckDecode Example](http://godoc.org/github.com/cosmos/btcutil/base58#example-CheckDecode)
Demonstrates how to decode Base58Check encoded data.
* [CheckEncode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-CheckEncode)
* [CheckEncode Example](http://godoc.org/github.com/cosmos/btcutil/base58#example-CheckEncode)
Demonstrates how to encode data using the Base58Check encoding scheme.

## License
Expand Down
2 changes: 1 addition & 1 deletion base58/base58_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"encoding/hex"
"testing"

"github.com/btcsuite/btcutil/base58"
"github.com/cosmos/btcutil/base58"
)

var stringTests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion base58/base58bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"bytes"
"testing"

"github.com/btcsuite/btcutil/base58"
"github.com/cosmos/btcutil/base58"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion base58/base58check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package base58_test
import (
"testing"

"github.com/btcsuite/btcutil/base58"
"github.com/cosmos/btcutil/base58"
)

var checkEncodingStringTests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion base58/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package base58_test
import (
"fmt"

"github.com/btcsuite/btcutil/base58"
"github.com/cosmos/btcutil/base58"
)

// This example demonstrates how to decode modified base58 encoded data.
Expand Down
10 changes: 5 additions & 5 deletions bech32/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bech32
==========

[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil)
[![Build Status](http://img.shields.io/travis/cosmos/btcutil.svg)](https://travis-ci.org/cosmos/btcutil)
[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](https://godoc.org/github.com/btcsuite/btcutil/bech32?status.png)](http://godoc.org/github.com/btcsuite/btcutil/bech32)
[![GoDoc](https://godoc.org/github.com/cosmos/btcutil/bech32?status.png)](http://godoc.org/github.com/cosmos/btcutil/bech32)

Package bech32 provides a Go implementation of the bech32 format specified in
[BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki).
Expand All @@ -13,14 +13,14 @@ Test vectors from BIP 173 are added to ensure compatibility with the BIP.
## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcutil/bech32
$ go get -u github.com/cosmos/btcutil/bech32
```

## Examples

* [Bech32 decode Example](http://godoc.org/github.com/btcsuite/btcutil/bech32#example-Bech32Decode)
* [Bech32 decode Example](http://godoc.org/github.com/cosmos/btcutil/bech32#example-Bech32Decode)
Demonstrates how to decode a bech32 encoded string.
* [Bech32 encode Example](http://godoc.org/github.com/btcsuite/btcutil/bech32#example-BechEncode)
* [Bech32 encode Example](http://godoc.org/github.com/cosmos/btcutil/bech32#example-BechEncode)
Demonstrates how to encode data into a bech32 string.

## License
Expand Down
2 changes: 1 addition & 1 deletion bech32/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"encoding/hex"
"fmt"

"github.com/btcsuite/btcutil/bech32"
"github.com/cosmos/btcutil/bech32"
)

// This example demonstrates how to decode a bech32 encoded string.
Expand Down
2 changes: 1 addition & 1 deletion block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
"github.com/davecgh/go-spew/spew"
)

Expand Down
8 changes: 4 additions & 4 deletions bloom/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bloom
=====

[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil)
[![Build Status](http://img.shields.io/travis/cosmos/btcutil.svg)](https://travis-ci.org/cosmos/btcutil)
[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/bloom)
[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/cosmos/btcutil/bloom)

Package bloom provides an API for dealing with bitcoin-specific bloom filters.

Expand All @@ -15,12 +15,12 @@ report.
## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcutil/bloom
$ go get -u github.com/cosmos/btcutil/bloom
```

## Examples

* [NewFilter Example](http://godoc.org/github.com/btcsuite/btcutil/bloom#example-NewFilter)
* [NewFilter Example](http://godoc.org/github.com/cosmos/btcutil/bloom#example-NewFilter)
Demonstrates how to create a new bloom filter, add a transaction hash to it,
and check if the filter matches the transaction.

Expand Down
2 changes: 1 addition & 1 deletion bloom/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil/bloom"
"github.com/cosmos/btcutil/bloom"
)

// This example demonstrates how to create a new bloom filter, add a transaction
Expand Down
2 changes: 1 addition & 1 deletion bloom/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
)

// ln2Squared is simply the square of the natural log of 2.
Expand Down
4 changes: 2 additions & 2 deletions bloom/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/bloom"
"github.com/cosmos/btcutil"
"github.com/cosmos/btcutil/bloom"
)

// TestFilterLarge ensures a maximum sized filter can be created.
Expand Down
2 changes: 1 addition & 1 deletion bloom/merkleblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
)

// merkleBlock is used to house intermediate information needed to generate a
Expand Down
4 changes: 2 additions & 2 deletions bloom/merkleblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/bloom"
"github.com/cosmos/btcutil"
"github.com/cosmos/btcutil/bloom"
)

func TestMerkleBlock3(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion bloom/murmurhash3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package bloom_test
import (
"testing"

"github.com/btcsuite/btcutil/bloom"
"github.com/cosmos/btcutil/bloom"
)

// TestMurmurHash3 ensure the MurmurHash3 function produces the correct hash
Expand Down
2 changes: 1 addition & 1 deletion certgen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
//"github.com/davecgh/go-spew/spew"
)

Expand Down
6 changes: 3 additions & 3 deletions coinset/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
coinset
=======

[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil)
[![Build Status](http://img.shields.io/travis/cosmos/btcutil.svg)](https://travis-ci.org/cosmos/btcutil)
[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/coinset)
[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/cosmos/btcutil/coinset)

Package coinset provides bitcoin-specific convenience functions for selecting
from and managing sets of unspent transaction outpoints (UTXOs).
Expand All @@ -16,7 +16,7 @@ report.
## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcutil/coinset
$ go get -u github.com/cosmos/btcutil/coinset
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion coinset/coins.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
)

// Coin represents a spendable transaction outpoint
Expand Down
4 changes: 2 additions & 2 deletions coinset/coins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/coinset"
"github.com/cosmos/btcutil"
"github.com/cosmos/btcutil/coinset"
)

type TestCoin struct {
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math"

"github.com/btcsuite/btcutil"
"github.com/cosmos/btcutil"
)

func ExampleAmount() {
Expand Down
10 changes: 5 additions & 5 deletions gcs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
gcs
==========

[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)]
(https://travis-ci.org/btcsuite/btcutil) [![ISC License]
[![Build Status](http://img.shields.io/travis/cosmos/btcutil.svg)]
(https://travis-ci.org/cosmos/btcutil) [![ISC License]
(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![GoDoc](https://godoc.org/github.com/btcsuite/btcutil/gcs?status.png)]
(http://godoc.org/github.com/btcsuite/btcutil/gcs)
[![GoDoc](https://godoc.org/github.com/cosmos/btcutil/gcs?status.png)]
(http://godoc.org/github.com/cosmos/btcutil/gcs)

Package gcs provides an API for building and using a Golomb-coded set filter
similar to that described [here](http://giovanni.bajo.it/post/47119962313/golomb-coded-sets-smaller-than-bloom-filters).
Expand All @@ -15,7 +15,7 @@ A comprehensive suite of tests is provided to ensure proper functionality.
## Installation and Updating

```bash
$ go get -u github.com/btcsuite/btcutil/gcs
$ go get -u github.com/cosmos/btcutil/gcs
```

## License
Expand Down
2 changes: 1 addition & 1 deletion gcs/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil/gcs"
"github.com/cosmos/btcutil/gcs"
)

const (
Expand Down
6 changes: 4 additions & 2 deletions gcs/builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
// XXX: btcd depends on (btcsuite/btcutil) types directly. See line 88.
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/gcs"
"github.com/btcsuite/btcutil/gcs/builder"
"github.com/cosmos/btcutil/gcs"
"github.com/cosmos/btcutil/gcs/builder"
)

var (
Expand Down Expand Up @@ -84,6 +85,7 @@ func TestUseBlockHash(t *testing.T) {
if err != nil {
t.Fatalf("Address decode failed: %s", err.Error())
}
// XXX: txscript.PayToAddrScript evaluates (btcsuite/btcutil) type, or throws.
addrBytes, err := txscript.PayToAddrScript(addr)
if err != nil {
t.Fatalf("Address script build failed: %s", err.Error())
Expand Down
2 changes: 1 addition & 1 deletion gcs/gcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"math/rand"
"testing"

"github.com/btcsuite/btcutil/gcs"
"github.com/cosmos/btcutil/gcs"
)

var (
Expand Down
Loading

0 comments on commit 32fa4f6

Please sign in to comment.