GetPublicKey()

Get the public key from a private key

Method signature

func GetPublicKey(privateKey string) string

Parameters

NameTypeDescription

privateKey

String

The Private Key from where to derive the Public Key

Example

package main

import (
	"fmt"
	
	"github.com/circular-protocol/circular-go/utils"
)

func main() {
	var private_key = "0x40942ed2f05daf2a1b0a36453e5164755dd9ac4c79636f1a243eb21a16e0e4df"

	result := utils.GetPublicKey(private_key)
	fmt.Println(result)

}

Result

The result will be an object of type String:

04b92abae6932e0faa578231fe4f6d83237acccb09f5343a5455abfaf8e2091a989e64dae6e4ebb9f6a1be5bd48d0bab6dbc99641514f19ee43052ab27178fd9ce

Last updated