Documentation ¶
Index ¶
- func CheckVersion(ver VersionInfo, req VersionInfo) bool
- func GetBip32bytes(bip32Path []uint32, hardenCount int) ([]byte, error)
- type LedgerCosmos
- func (ledger *LedgerCosmos) Close() error
- func (ledger *LedgerCosmos) GetPublicKeySECP256K1(bip32Path []uint32) ([]byte, error)
- func (ledger *LedgerCosmos) GetVersion() (*VersionInfo, error)
- func (ledger *LedgerCosmos) Hash(transaction []byte) ([]byte, error)
- func (ledger *LedgerCosmos) ShowAddressSECP256K1(bip32Path []uint32, hrp string) error
- func (ledger *LedgerCosmos) SignSECP256K1(bip32Path []uint32, transaction []byte) ([]byte, error)
- func (ledger *LedgerCosmos) TestGetPublicKeySECP256K1() ([]byte, error)
- func (ledger *LedgerCosmos) TestSignSECP256K1(transaction []byte) ([]byte, error)
- type LedgerTendermintValidator
- func (ledger *LedgerTendermintValidator) Close() error
- func (ledger *LedgerTendermintValidator) GetPublicKeyED25519(bip32Path []uint32) ([]byte, error)
- func (ledger *LedgerTendermintValidator) GetVersion() (*VersionInfo, error)
- func (ledger *LedgerTendermintValidator) SignED25519(bip32Path []uint32, message []byte) ([]byte, error)
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckVersion ¶ added in v0.9.8
func CheckVersion(ver VersionInfo, req VersionInfo) bool
CheckVersion compares the current version with the required version
Types ¶
type LedgerCosmos ¶ added in v0.9.2
type LedgerCosmos struct {
// contains filtered or unexported fields
}
LedgerCosmos represents a connection to the Cosmos app in a Ledger Nano S device
func FindLedgerCosmosUserApp ¶ added in v0.9.2
func FindLedgerCosmosUserApp() (*LedgerCosmos, error)
FindLedgerCosmosUserApp finds a Cosmos user app running in a ledger device
func (*LedgerCosmos) Close ¶ added in v0.9.7
func (ledger *LedgerCosmos) Close() error
Close closes a connection with the Cosmos user app
func (*LedgerCosmos) GetPublicKeySECP256K1 ¶ added in v0.9.2
func (ledger *LedgerCosmos) GetPublicKeySECP256K1(bip32Path []uint32) ([]byte, error)
GetPublicKeySECP256K1 retrieves the public key for the corresponding bip32 derivation path
func (*LedgerCosmos) GetVersion ¶ added in v0.9.2
func (ledger *LedgerCosmos) GetVersion() (*VersionInfo, error)
GetVersion returns the current version of the Cosmos user app
func (*LedgerCosmos) Hash ¶ added in v0.9.2
func (ledger *LedgerCosmos) Hash(transaction []byte) ([]byte, error)
Hash returns the hash for the transaction (only enabled in test mode apps)
func (*LedgerCosmos) ShowAddressSECP256K1 ¶ added in v0.9.8
func (ledger *LedgerCosmos) ShowAddressSECP256K1(bip32Path []uint32, hrp string) error
ShowAddressSECP256K1 shows the address for the corresponding bip32 derivation path
func (*LedgerCosmos) SignSECP256K1 ¶ added in v0.9.2
func (ledger *LedgerCosmos) SignSECP256K1(bip32Path []uint32, transaction []byte) ([]byte, error)
SignSECP256K1 signs a transaction using Cosmos user app
func (*LedgerCosmos) TestGetPublicKeySECP256K1 ¶ added in v0.9.2
func (ledger *LedgerCosmos) TestGetPublicKeySECP256K1() ([]byte, error)
TestGetPublicKeySECP256K1 (only enabled in test mode apps)
func (*LedgerCosmos) TestSignSECP256K1 ¶ added in v0.9.2
func (ledger *LedgerCosmos) TestSignSECP256K1(transaction []byte) ([]byte, error)
TestSignSECP256K1 (only enabled in test mode apps)
type LedgerTendermintValidator ¶ added in v0.9.8
type LedgerTendermintValidator struct {
// contains filtered or unexported fields
}
Validator app
func FindLedgerTendermintValidatorApp ¶ added in v0.9.8
func FindLedgerTendermintValidatorApp() (*LedgerTendermintValidator, error)
FindLedgerCosmosValidatorApp finds a Cosmos validator app running in a ledger device
func (*LedgerTendermintValidator) Close ¶ added in v0.9.8
func (ledger *LedgerTendermintValidator) Close() error
Close closes a connection with the Cosmos user app
func (*LedgerTendermintValidator) GetPublicKeyED25519 ¶ added in v0.9.8
func (ledger *LedgerTendermintValidator) GetPublicKeyED25519(bip32Path []uint32) ([]byte, error)
GetPublicKeyED25519 retrieves the public key for the corresponding bip32 derivation path
func (*LedgerTendermintValidator) GetVersion ¶ added in v0.9.8
func (ledger *LedgerTendermintValidator) GetVersion() (*VersionInfo, error)
GetVersion returns the current version of the Cosmos user app
func (*LedgerTendermintValidator) SignED25519 ¶ added in v0.9.8
func (ledger *LedgerTendermintValidator) SignED25519(bip32Path []uint32, message []byte) ([]byte, error)
SignSECP256K1 signs a message/vote using the Tendermint validator app
type VersionInfo ¶
VersionInfo contains app version information
func RequiredCosmosUserAppVersion ¶ added in v0.9.8
func RequiredCosmosUserAppVersion() VersionInfo
RequiredCosmosUserAppVersion indicates the minimum required version of the Cosmos app
func RequiredTendermintValidatorAppVersion ¶ added in v0.9.8
func RequiredTendermintValidatorAppVersion() VersionInfo
RequiredCosmosUserAppVersion indicates the minimum required version of the Tendermint app
func (VersionInfo) String ¶ added in v0.9.8
func (c VersionInfo) String() string