Documentation ¶
Index ¶
- Constants
- type Keypair
- func (kp *Keypair) Address() string
- func (kp *Keypair) CommonAddress() common.Address
- func (kp *Keypair) Decode(in []byte) error
- func (kp *Keypair) Encode() []byte
- func (kp *Keypair) GetPublicKey() ecdsa.PublicKey
- func (kp *Keypair) PrivateKey() *ecdsa.PrivateKey
- func (kp *Keypair) PublicKey() string
Constants ¶
View Source
const PrivateKeyLength = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keypair ¶
type Keypair struct {
// contains filtered or unexported fields
}
func GenerateKeypair ¶
func NewKeypair ¶
func NewKeypair(pk ecdsa.PrivateKey) *Keypair
func NewKeypairFromString ¶
NewKeypairFromPrivateKey parses a string for a hex private key. Must be at least PrivateKeyLength long.
func (*Keypair) CommonAddress ¶
CommonAddress returns the Ethereum address in the common.Address Format
func (*Keypair) GetPublicKey ¶
func (*Keypair) PrivateKey ¶
func (kp *Keypair) PrivateKey() *ecdsa.PrivateKey
PrivateKey returns the keypair's private key
Click to show internal directories.
Click to hide internal directories.