generated from mrz1836/go-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from BuxOrg/fix/not-working-example-in-docume…
…ntation fix(BUX-191): example in documentation is not working
- Loading branch information
Showing
2 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package xpriv_test | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/BuxOrg/go-buxclient/xpriv" | ||
) | ||
|
||
func ExampleGenerate() { | ||
keys, _ := xpriv.Generate() | ||
|
||
fmt.Println("xpriv:", keys.XPriv()) | ||
fmt.Println("xpub:", keys.XPub().String()) | ||
} | ||
|
||
func ExampleFromMnemonic() { | ||
keys, _ := xpriv.FromMnemonic("absorb corn ostrich order sing boost just harvest enable make detail future desert bus adult") | ||
|
||
fmt.Println("mnemonic:", keys.Mnemonic()) | ||
fmt.Println("xpriv:", keys.XPriv()) | ||
fmt.Println("xpub:", keys.XPub().String()) | ||
|
||
// Output: | ||
// mnemonic: absorb corn ostrich order sing boost just harvest enable make detail future desert bus adult | ||
// xpriv: xprv9s21ZrQH143K3Lh4wdicqvYNMcdh49rMLqDvQoyys8L6f5tfE2WkQN7ZVE2awBrfVWNSJ8pPd4QLLr94Nur85Dvj8kD8RoZghBuNTpvL8si | ||
// xpub: xpub661MyMwAqRbcFpmY3fFdD4V6ueUBTcaCi49XDCPbRTs5XtDomZpzxAS3LUb2hMfUVphDsSPxfjietmsBRFkLDY9Xa3P4jbgNDMnDK3UqJe2 | ||
} |
This file was deleted.
Oops, something went wrong.