Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keystore ¶
type Keystore struct { Keys map[string]*ecdsa.PrivateKey core.UnimplementedKeystore }
Keystore is a simple in-memory key store that holds private keys for signing. The `Keys` map holds:
- key (string): the string representation of a Tron address
- value (*ecdsa.PrivateKey): the private key associated with that address
func NewKeystore ¶
func NewKeystore(privateKey *ecdsa.PrivateKey) (*Keystore, address.Address)
NewKeystore initializes a new Keystore with a single ECDSA private key. The key is stored using the derived Tron address as the map key.
func (*Keystore) Accounts ¶
Accounts returns a list of all address strings currently stored in the Keystore.
func (*Keystore) ImportECDSA ¶
func (ks *Keystore) ImportECDSA(privateKey *ecdsa.PrivateKey) address.Address
ImportECDSA adds a new private key to the Keystore, deriving its Tron address and storing it using that address as the map key.
Click to show internal directories.
Click to hide internal directories.