Documentation
¶
Index ¶
- type EncryptedEthKeyExport
- type Key
- type KeyV2
- func (key KeyV2) Cmp(key2 KeyV2) int
- func (key KeyV2) GoString() string
- func (key KeyV2) ID() string
- func (key KeyV2) Raw() Raw
- func (key KeyV2) String() string
- func (key KeyV2) ToEcdsaPrivKey() *ecdsa.PrivateKey
- func (key KeyV2) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error)
- type Raw
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptedEthKeyExport ¶
type EncryptedEthKeyExport struct {
KeyType string `json:"keyType"`
Address types.EIP55Address `json:"address"`
Crypto keystore.CryptoJSON `json:"crypto"`
}
type Key ¶
type Key struct {
ID int32
Address types.EIP55Address
JSON sqlutil.JSON `json:"-"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
// IsFunding marks the address as being used for rescuing the node and the pending transactions
// Only one key can be IsFunding=true at a time.
IsFunding bool
}
NOTE: This model refers to the OLD key and is only used for migrations
Key holds the private key metadata for a given address that is used to unlock said key when given a password.
By default, a key is assumed to represent an ethereum account.
type KeyV2 ¶
type KeyV2 struct {
Address common.Address
EIP55Address types.EIP55Address
// contains filtered or unexported fields
}
func FromPrivateKey ¶
func FromPrivateKey(privKey *ecdsa.PrivateKey) (key KeyV2)
func (KeyV2) Cmp ¶
Cmp uses byte-order address comparison to give a stable comparison between two keys
func (KeyV2) ToEcdsaPrivKey ¶
func (key KeyV2) ToEcdsaPrivKey() *ecdsa.PrivateKey
func (KeyV2) ToEncryptedJSON ¶
type State ¶
type State struct {
ID int32
Address types.EIP55Address
EVMChainID big.Big
Disabled bool
CreatedAt time.Time
UpdatedAt time.Time
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.