Documentation ¶
Index ¶
- Variables
- func WriteKeystoreToFile(store *Keystore, filename string, perm os.FileMode) error
- type KeyID
- type Keystore
- func (store *Keystore) FromStorage(storage *KeystoreStorage) error
- func (store *Keystore) GetAllMinerKeys() []*MinerKey
- func (store *Keystore) GetFarmerPrivateKey(pub *chiapos.G1Element) (*chiapos.PrivateKey, error)
- func (store *Keystore) GetMinerKey(id KeyID) (*MinerKey, error)
- func (store *Keystore) GetMinerKeyByPoolPublicKey(pub *chiapos.G1Element) (*MinerKey, error)
- func (store *Keystore) GetPoolPrivateKey(pub *chiapos.G1Element) (*chiapos.PrivateKey, error)
- func (store *Keystore) SetMinerKey(farmerPriv, poolPriv *chiapos.PrivateKey) (KeyID, error)
- func (store *Keystore) ToStorage() *KeystoreStorage
- type KeystoreStorage
- type MinerKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMinerKeyNotExists = errors.New("miner key not exists")
Functions ¶
Types ¶
type KeyID ¶
type KeyID [2 * chiapos.PublicKeyBytes]byte
var EmptyKeyID KeyID
func (KeyID) FarmerPublicKeyBytes ¶
func (KeyID) PoolPublicKeyBytes ¶
type Keystore ¶
type Keystore struct {
// contains filtered or unexported fields
}
func NewEmptyKeystore ¶
func NewEmptyKeystore() *Keystore
func NewKeystoreFromFile ¶
func (*Keystore) FromStorage ¶
func (store *Keystore) FromStorage(storage *KeystoreStorage) error
func (*Keystore) GetAllMinerKeys ¶
func (*Keystore) GetFarmerPrivateKey ¶
func (*Keystore) GetMinerKeyByPoolPublicKey ¶
func (*Keystore) GetPoolPrivateKey ¶
func (*Keystore) SetMinerKey ¶
func (store *Keystore) SetMinerKey(farmerPriv, poolPriv *chiapos.PrivateKey) (KeyID, error)
func (*Keystore) ToStorage ¶
func (store *Keystore) ToStorage() *KeystoreStorage
type KeystoreStorage ¶
func (*KeystoreStorage) Bytes ¶
func (store *KeystoreStorage) Bytes() ([]byte, error)
func (*KeystoreStorage) FromBytes ¶
func (store *KeystoreStorage) FromBytes(data []byte) error
type MinerKey ¶
type MinerKey struct { FarmerPrivateKey *chiapos.PrivateKey PoolPrivateKey *chiapos.PrivateKey FarmerPublicKey *chiapos.G1Element PoolPublicKey *chiapos.G1Element // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.