Documentation ¶
Index ¶
- Constants
- func AddrToPub(a *common.Address) (*bls.PublicKey, error)
- func BalanceEth(balance float64) *big.Int
- func BalanceHuman(balance *big.Int) float64
- func GeneratePriKey() *bls.SecretKey
- func InitConfig(c *Config)
- func PubKeyToAddr(p *bls.PublicKey) (addr common.Address, err error)
- func VerifyByte(sig *bls.Sign, pub *bls.PublicKey, msg []byte) bool
- type Config
- type Key
- func (k *Key) Addr() string
- func (k *Key) CastEd25519Key() (crypto.PrivKey, error)
- func (k *Key) CastEthKey() (*ecdsa.PrivateKey, error)
- func (k *Key) Encrypt(auth string) ([]byte, error)
- func (k *Key) GetPrivate() []byte
- func (k *Key) IDStr() string
- func (k *Key) IsOpen() bool
- func (k *Key) PriLen() int
- func (k *Key) SharedKey(to string) ([]byte, error)
- func (k *Key) SignData(msg []byte) []byte
- func (k *Key) StoreString(auth string) string
- type KeyStore
- func (ks KeyStore) GetKey(addr common.Address, filename, auth string) (*Key, error)
- func (ks KeyStore) GetRawKey(filename, auth string) (*Key, error)
- func (ks KeyStore) IsKeyFile(filename string) (string, bool)
- func (ks KeyStore) StoreKey(key *Key, auth string) error
- func (ks KeyStore) ValidKeyFiles() (map[string]string, error)
- type NinjaWallet
- type Wallet
Constants ¶
View Source
const KeyStoreScheme = "keystore"
View Source
const (
PriKeyLen = 32
)
View Source
const TestKeyStoreScheme = "test_keystore"
Variables ¶
This section is empty.
Functions ¶
func BalanceEth ¶
func BalanceHuman ¶
func GeneratePriKey ¶
func InitConfig ¶
func InitConfig(c *Config)
func PubKeyToAddr ¶ added in v1.2.2
Types ¶
type Key ¶
type Key struct { ID uuid.UUID Light bool Address common.Address // contains filtered or unexported fields }
func LoadKeyFromJsonStr ¶
func NewLightKey ¶
func (*Key) CastEthKey ¶ added in v1.2.2
func (k *Key) CastEthKey() (*ecdsa.PrivateKey, error)
func (*Key) GetPrivate ¶ added in v1.2.2
func (*Key) StoreString ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
func NewKeyStore ¶
func NewLightKeyStore ¶
type NinjaWallet ¶
func (*NinjaWallet) Active ¶
func (c *NinjaWallet) Active(password, addr string) error
func (*NinjaWallet) AllAddrSaved ¶ added in v1.2.2
func (c *NinjaWallet) AllAddrSaved() []string
func (*NinjaWallet) CreateNewKey ¶
func (c *NinjaWallet) CreateNewKey(auth string) error
func (*NinjaWallet) KeyInUsed ¶
func (c *NinjaWallet) KeyInUsed() *Key
Click to show internal directories.
Click to hide internal directories.