Documentation
¶
Index ¶
- type IntegrationKeyring
- func (kr *IntegrationKeyring) AddKey() int
- func (kr *IntegrationKeyring) GetAccAddr(index int) sdktypes.AccAddress
- func (kr *IntegrationKeyring) GetAddr(index int) common.Address
- func (kr *IntegrationKeyring) GetAllAccAddrs() []sdktypes.AccAddress
- func (kr *IntegrationKeyring) GetKey(index int) Key
- func (kr *IntegrationKeyring) GetKeys() []Key
- func (kr *IntegrationKeyring) GetPrivKey(index int) cryptotypes.PrivKey
- func (kr *IntegrationKeyring) Sign(index int, msg []byte) ([]byte, error)
- type Key
- type Keyring
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntegrationKeyring ¶
type IntegrationKeyring struct {
// contains filtered or unexported fields
}
IntegrationKeyring is a keyring designed for integration tests.
func (*IntegrationKeyring) AddKey ¶
func (kr *IntegrationKeyring) AddKey() int
AddKey adds a new account to the keyring. It returns the index for the key.
func (*IntegrationKeyring) GetAccAddr ¶
func (kr *IntegrationKeyring) GetAccAddr(index int) sdktypes.AccAddress
GetAccAddr returns the sdk address of the specified account.
func (*IntegrationKeyring) GetAddr ¶
func (kr *IntegrationKeyring) GetAddr(index int) common.Address
GetAddr returns the address of the specified account.
func (*IntegrationKeyring) GetAllAccAddrs ¶
func (kr *IntegrationKeyring) GetAllAccAddrs() []sdktypes.AccAddress
GetAllAccAddrs returns all the sdk addresses of the accounts in the keyring.
func (*IntegrationKeyring) GetKey ¶
func (kr *IntegrationKeyring) GetKey(index int) Key
GetKey returns the key specified by index.
func (*IntegrationKeyring) GetKeys ¶
func (kr *IntegrationKeyring) GetKeys() []Key
GetKeys returns all keys from the keyring.
func (*IntegrationKeyring) GetPrivKey ¶
func (kr *IntegrationKeyring) GetPrivKey(index int) cryptotypes.PrivKey
GetPrivKey returns the private key of the specified account.
type Key ¶
type Key struct {
Addr common.Address
AccAddr sdktypes.AccAddress
Priv cryptotypes.PrivKey
}
type Keyring ¶
type Keyring interface {
// GetPrivKey returns the private key of the account at the given keyring index.
GetPrivKey(index int) cryptotypes.PrivKey
// GetAddr returns the address of the account at the given keyring index.
GetAddr(index int) common.Address
// GetAccAddr returns the SDK address of the account at the given keyring index.
GetAccAddr(index int) sdktypes.AccAddress
// GetAllAccAddrs returns all the SDK addresses of the accounts in the keyring.
GetAllAccAddrs() []sdktypes.AccAddress
// GetKey returns the key at the given keyring index
GetKey(index int) Key
// GetKeys returns all the keys
GetKeys() []Key
// AddKey adds a new account to the keyring
AddKey() int
// Sign signs message with the specified account.
Sign(index int, msg []byte) ([]byte, error)
}
Click to show internal directories.
Click to hide internal directories.