Documentation ¶
Index ¶
- type KeyManager
- func (km KeyManager) AESDecrypt(cipherText aes.CipherText) (aes.PlainText, error)
- func (km KeyManager) AESEncrypt(plainText aes.PlainText) (aes.CipherText, error)
- func (km KeyManager) ChatIdKeyPair() (x3dh.KeyPair, error)
- func (km KeyManager) EthereumSign(data [32]byte) ([]byte, error)
- func (km KeyManager) Export(pw, pwConfirm string) (Store, error)
- func (km KeyManager) GetEthereumAddress() (string, error)
- func (km KeyManager) GetEthereumPrivateKey() (string, error)
- func (km KeyManager) GetEthereumPublicKey() (string, error)
- func (km KeyManager) GetMnemonic() mnemonic.Mnemonic
- func (km KeyManager) IdentityPrivateKey() (string, error)
- func (km KeyManager) IdentityPublicKey() (string, error)
- func (km KeyManager) IdentitySign(data []byte) ([]byte, error)
- func (km KeyManager) MeshPrivateKey() (lp2pCrypto.PrivKey, error)
- func (km KeyManager) SignEthTx(signer types.Signer, addresses common.Address, tx *types.Transaction) (*types.Transaction, error)
- func (km KeyManager) WasMigrated() bool
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyManager ¶
func CreateFromKeyStore ¶
func CreateFromKeyStore(ks ks.Store) *KeyManager
Create new key manager from key store
func OpenWithMnemonic ¶
func OpenWithMnemonic(encryptedAccount Store, mnemonic string) (*KeyManager, error)
Open account with mnemonic. This should only be used as a backup
func OpenWithPassword ¶
func OpenWithPassword(store Store, pw string) (*KeyManager, error)
Open encrypted keystore with password
func (KeyManager) AESDecrypt ¶
func (km KeyManager) AESDecrypt(cipherText aes.CipherText) (aes.PlainText, error)
decrypt a value with AES
func (KeyManager) AESEncrypt ¶
func (km KeyManager) AESEncrypt(plainText aes.PlainText) (aes.CipherText, error)
encrypt a value with aes
func (KeyManager) ChatIdKeyPair ¶
func (km KeyManager) ChatIdKeyPair() (x3dh.KeyPair, error)
func (KeyManager) EthereumSign ¶
func (km KeyManager) EthereumSign(data [32]byte) ([]byte, error)
Sign data with ethereum private key
func (KeyManager) Export ¶
func (km KeyManager) Export(pw, pwConfirm string) (Store, error)
Export the account
func (KeyManager) GetEthereumAddress ¶
func (km KeyManager) GetEthereumAddress() (string, error)
Get ethereum address
func (KeyManager) GetEthereumPrivateKey ¶
func (km KeyManager) GetEthereumPrivateKey() (string, error)
Get ethereum private key
func (KeyManager) GetEthereumPublicKey ¶
func (km KeyManager) GetEthereumPublicKey() (string, error)
func (KeyManager) GetMnemonic ¶
func (km KeyManager) GetMnemonic() mnemonic.Mnemonic
func (KeyManager) IdentityPrivateKey ¶
func (km KeyManager) IdentityPrivateKey() (string, error)
func (KeyManager) IdentityPublicKey ¶
func (km KeyManager) IdentityPublicKey() (string, error)
func (KeyManager) IdentitySign ¶
func (km KeyManager) IdentitySign(data []byte) ([]byte, error)
Sign data with identity key
func (KeyManager) MeshPrivateKey ¶
func (km KeyManager) MeshPrivateKey() (lp2pCrypto.PrivKey, error)
Get the Mesh network private key (which is the identity ed25519 private key)
func (KeyManager) SignEthTx ¶
func (km KeyManager) SignEthTx(signer types.Signer, addresses common.Address, tx *types.Transaction) (*types.Transaction, error)
func (KeyManager) WasMigrated ¶
func (km KeyManager) WasMigrated() bool
Did the keystore change (happen after migration)
type Store ¶
type Store struct { // the password is encrypted with the mnemonic Password scrypt.CipherText `json:"password"` EncryptedKeyStore scrypt.CipherText `json:"encrypted_key_store"` Version uint8 `json:"version"` }
func UnmarshalStore ¶
Click to show internal directories.
Click to hide internal directories.