GetKeysFromString()
Get private key, public key and wallet address form a seed phrase written on a single Map object
Method signature
func GetKeysFromString(seedPhrase string) (map[string]string, error)
Parameters
Name
Type
Description
seedPhrase
String
The seedphrase that you want to use for generating the keys
Example
package main
import (
"fmt"
"github.com/circular-protocol/circular-go/utils"
)
func main() {
seed := "circular protocol hello world test"
res, _ := utils.GetKeysFromString(seed)
fmt.Println(res)
}
Result
The result will be of type Map
, but for easier readability, here is the equivalent in JSON.
{
"privateKey" : String,
"publicKey" : String,
"address" : String,
"seedPhrase" : String,
}
Last updated