 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const (
	// CodecVersion is the current default codec version
	CodecVersion = 0
)
    Variables ¶
      View Source
      
  var ( Codec codec.Manager LegacyCodec codec.Manager )
Codecs do serialization and deserialization
Functions ¶
func GetKeychain ¶
Keychain returns a new keychain from the [user]. If [addresses] is non-empty it fetches only the keys in addresses. If a key is missing, it will be ignored. If [addresses] is empty, then it will create a keychain using every address in the provided [user].
Types ¶
type User ¶
type User interface {
	io.Closer
	// Get the addresses controlled by this user
	GetAddresses() ([]ids.ShortID, error)
	// PutKeys persists [privKeys]
	PutKeys(privKeys ...*crypto.PrivateKeySECP256K1R) error
	// GetKey returns the private key that controls the given address
	GetKey(address ids.ShortID) (*crypto.PrivateKeySECP256K1R, error)
}
    func NewUserFromDB ¶
NewUserFromDB tracks a keystore user from a database
func NewUserFromKeystore ¶
func NewUserFromKeystore(ks keystore.BlockchainKeystore, username, password string) (User, error)
NewUserFromKeystore tracks a keystore user from the provided keystore
 Click to show internal directories. 
   Click to hide internal directories.