Documentation ¶
Index ¶
- func GenerateKeystore(privKeyBytes, passwd []byte) ([]byte, error)
- func GeneratePrivateKey() ([]byte, error)
- func InspectKeystore(keyjson, passwd []byte) ([]byte, error)
- type Address
- type DID
- func (d *DID) GetAddress() Address
- func (d *DID) GetKey() *keystore.Key
- func (d *DID) Inspect(showPrivate bool) (addr string, pubKey string, privKey string, err error)
- func (d *DID) LoadECDSA(privateKeyHex string) error
- func (d *DID) Sign(b []byte) ([]byte, error)
- func (d *DID) UnlockWallet(keyFilePath, password string) error
- type EncryptedKeyJSONV3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeystore ¶
GenerateKeystore generate keystore file by json
func GeneratePrivateKey ¶
GeneratePrivateKey generate random private key
func InspectKeystore ¶
Types ¶
type DID ¶
type DID struct {
// contains filtered or unexported fields
}
func CreateKeystoreArrayAndSaveLocal ¶
CreateKeystoreArrayAndSaveLocal used to generate some keystore and save to local path for start up test
func UnlockKeystoreArray ¶
func (*DID) GetAddress ¶
func (*DID) UnlockWallet ¶
UnlockWallet used to unlock wallet
type EncryptedKeyJSONV3 ¶
type EncryptedKeyJSONV3 struct { Address string `json:"address"` Crypto keystore.CryptoJSON `json:"crypto"` ID string `json:"id"` Version int `json:"version"` }
EncryptedKeyJSONV3 is from geth
Click to show internal directories.
Click to hide internal directories.