Versions in this module Expand all Collapse all v0 v0.0.11 Oct 27, 2022 Changes in this version + const AES128KeySize + const EncryptSaltSize + const HKDFInfo + const HKDFKeySize + func DecryptEvmKeyStore(ksData, pw []byte) (*ecdsa.PrivateKey, error) + func DecryptICONKeyStore(ksData *KeyStoreData, pw []byte) (*crypto.PrivateKey, error) + func DecryptNearKeyStore(ksData, pw []byte) (*ed25519.PrivateKey, error) + func EncryptKeyAsKeyStore(s *crypto.PrivateKey, pw []byte) ([]byte, error) + func GetSecret(secretName string, region string) (string, error) + func KeyStoreFromWallet(w interface{}, pw []byte) ([]byte, error) + func New() *softwareWallet + func NewIcxWalletFromPrivateKey(sk *crypto.PrivateKey) (*softwareWallet, error) + func ReadAddressFromKeyStore(data []byte) (*common.Address, error) + func SHA3SumKeccak256(data ...[]byte) []byte + type AES128CTRParams struct + IV common.RawHexBytes + type CryptoData struct + Cipher string + CipherParams json.RawMessage + CipherText common.RawHexBytes + KDF string + KDFParams json.RawMessage + MAC common.RawHexBytes + type Encrypted struct + CipherText []byte + Param []byte + func NewEncrypted(w Wallet, pubKey, b []byte) (*Encrypted, error) + func (e *Encrypted) Aes128CTRStream(w Wallet) (cipher.Stream, error) + func (e *Encrypted) Decrypt(w Wallet) ([]byte, error) + func (e *Encrypted) Encrypt(w Wallet, b []byte) error + type EvmWallet struct + Pkey *ecdsa.PublicKey + Skey *ecdsa.PrivateKey + func NewEvmWalletFromPrivateKey(sk *ecdsa.PrivateKey) (*EvmWallet, error) + func (w *EvmWallet) Address() string + func (w *EvmWallet) ECDH(pubKey []byte) ([]byte, error) + func (w *EvmWallet) PublicKey() []byte + func (w *EvmWallet) Sign(data []byte) ([]byte, error) + type KeyStoreData struct + Address common.Address + CoinType string + Crypto CryptoData + ID string + Version int + func NewKeyStoreData(data []byte) (*KeyStoreData, error) + type NearWallet struct + Pkey *ed25519.PublicKey + Skey *ed25519.PrivateKey + func NewNearwalletFromPrivateKey(sk *ed25519.PrivateKey) (*NearWallet, error) + func (w *NearWallet) Address() string + func (w *NearWallet) ECDH(pubkey []byte) ([]byte, error) + func (w *NearWallet) PublicKey() []byte + func (w *NearWallet) Sign(data []byte) ([]byte, error) + type ScryptParams struct + DKLen int + N int + P int + R int + Salt common.RawHexBytes + func (p *ScryptParams) Init() error + func (p *ScryptParams) Key(pw []byte) ([]byte, error) + type Wallet interface + Address func() string + ECDH func(pubKey []byte) ([]byte, error) + PublicKey func() []byte + Sign func(data []byte) ([]byte, error) + func DecryptKeyStore(data, pw []byte) (Wallet, error) v0.0.10 Sep 26, 2022 v0.0.9-rc.3 Aug 27, 2022 v0.0.9-rc.2 Aug 16, 2022 v0.0.9-rc.1 Aug 5, 2022 v0.0.8 Aug 2, 2022