account

package
v0.0.0-...-22cd51a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountKey

type AccountKey struct {
	Path        string
	Depth       uint8
	IsPrivate   bool
	Fingerprint uint32
	Pair        *KeyPair
}

type AccountMnemonic

type AccountMnemonic struct {
	BitSize        int
	Seed           []byte
	Phrase, Locale string
}

type AccountNew

type AccountNew struct {
	Address  *address.Address
	Mnemonic *AccountMnemonic
	Key      *AccountKey
}

func New

func New(bitSize int, childKeyPath string) (*AccountNew, error)

Creates a new account based on the specified bit size for entropy. For generating 12 words, the bit size must be 128, and for 24 words, it must be 256. Optionally, a custom child derivation path can be provided. For the default path (m/44'/195'/0'/0/0), leave it empty.

type KeyPair

type KeyPair struct {
	PublicKey, PrivateKey []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL