2019-12-19 18:27:27 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/ecdsa"
|
|
|
|
|
2021-06-30 11:40:54 +00:00
|
|
|
"github.com/google/uuid"
|
2020-01-02 09:10:19 +00:00
|
|
|
|
2019-12-19 18:27:27 +00:00
|
|
|
"github.com/status-im/status-go/extkeys"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Key struct {
|
2020-02-10 11:22:37 +00:00
|
|
|
ID uuid.UUID // Version 4 "random" for unique id not derived from key data
|
2019-12-19 18:27:27 +00:00
|
|
|
// to simplify lookups we also store the address
|
|
|
|
Address Address
|
|
|
|
// we only store privkey as pubkey/address can be derived from it
|
|
|
|
// privkey in this struct is always in plaintext
|
|
|
|
PrivateKey *ecdsa.PrivateKey
|
|
|
|
// ExtendedKey is the extended key of the PrivateKey itself, and it's used
|
|
|
|
// to derive child keys.
|
|
|
|
ExtendedKey *extkeys.ExtendedKey
|
2024-06-26 11:14:27 +00:00
|
|
|
// Deprecated: SubAccountIndex
|
2019-12-19 18:27:27 +00:00
|
|
|
// It was use in Status to keep track of the number of sub-account created
|
|
|
|
// before having multi-account support.
|
|
|
|
SubAccountIndex uint32
|
|
|
|
}
|