Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bergusman authored Aug 17, 2021
1 parent 171b0db commit 7fb3275
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
log.Fatal(err)
}

fmt.Println(str) // Output: 539
fmt.Println(str) // Output: 539

out, err = radix.Convert([]int{1, 3, 3, 7}, 10, 5)
if err != nil {
Expand All @@ -43,16 +43,36 @@ func main() {
log.Fatal(err)
}

fmt.Println(str) // Output: πŸŒ—πŸŒ‘πŸŒ–πŸŒ—πŸŒ—
fmt.Println(str) // Output: πŸŒ—πŸŒ‘πŸŒ–πŸŒ—πŸŒ—
}
```

#### Base58

```Go
```
package main

import (
"encoding/hex"
"fmt"
"log"

Output:
"github.com/bergusman/radix-go"
)

func main() {
addr, err := hex.DecodeString("8aee40b8e87eb05bc3b9ff902349bb2dd19a5e90")
if err != nil {
log.Fatal(err)
}

str, err := radix.Base58Encode(addr, radix.AlphabetBitcoin)
if err != nil {
log.Fatal(err)
}

fmt.Println(str) // Output: 2wG9ewuHafzR4yG2hYu8U3YmpZxb
}
```
```

Can check here: http://lenschulwitz.com/base58

0 comments on commit 7fb3275

Please sign in to comment.