Documentation
¶
Index ¶
- func CheckVersion(ver VersionInfo, req VersionInfo) error
- func GetBip32bytesv1(bip32Path []uint32, hardenCount int) ([]byte, error)
- func GetBip32bytesv2(bip44Path []uint32, hardenCount int) ([]byte, error)
- func NewVersionRequiredError(req VersionInfo, ver VersionInfo) error
- type LedgerCosmos
- func (ledger *LedgerCosmos) CheckVersion(ver VersionInfo) error
- func (ledger *LedgerCosmos) Close() error
- func (ledger *LedgerCosmos) GetAddressPubKeySECP256K1(bip32Path []uint32, hrp string) (pubkey []byte, addr string, err error)
- func (ledger *LedgerCosmos) GetBip32bytes(bip32Path []uint32, hardenCount int) ([]byte, error)
- func (ledger *LedgerCosmos) GetPublicKeySECP256K1(bip32Path []uint32) ([]byte, error)
- func (ledger *LedgerCosmos) GetVersion() (*VersionInfo, error)
- func (ledger *LedgerCosmos) SignSECP256K1(bip32Path []uint32, transaction []byte, p2 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
- type VersionRequiredError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckVersion ¶ added in v0.9.8
func CheckVersion(ver VersionInfo, req VersionInfo) error
CheckVersion compares the current version with the required version
func GetBip32bytesv1 ¶ added in v0.11.1
func GetBip32bytesv2 ¶ added in v0.11.1
func NewVersionRequiredError ¶ added in v0.10.1
func NewVersionRequiredError(req VersionInfo, ver VersionInfo) error
Types ¶
type LedgerCosmos ¶ added in v0.9.3
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.3
func FindLedgerCosmosUserApp() (_ *LedgerCosmos, rerr error)
FindLedgerCosmosUserApp finds a Cosmos user app running in a ledger device
func (*LedgerCosmos) CheckVersion ¶ added in v0.11.1
func (ledger *LedgerCosmos) CheckVersion(ver VersionInfo) error
VersionIsSupported returns true if the App version is supported by this library
func (*LedgerCosmos) Close ¶ added in v0.9.8
func (ledger *LedgerCosmos) Close() error
Close closes a connection with the Cosmos user app
func (*LedgerCosmos) GetAddressPubKeySECP256K1 ¶ added in v0.10.0
func (ledger *LedgerCosmos) GetAddressPubKeySECP256K1(bip32Path []uint32, hrp string) (pubkey []byte, addr string, err error)
GetAddressPubKeySECP256K1 returns the pubkey (compressed) and address (bech( this command requires user confirmation in the device
func (*LedgerCosmos) GetBip32bytes ¶ added in v0.11.1
func (ledger *LedgerCosmos) GetBip32bytes(bip32Path []uint32, hardenCount int) ([]byte, error)
func (*LedgerCosmos) GetPublicKeySECP256K1 ¶ added in v0.9.3
func (ledger *LedgerCosmos) GetPublicKeySECP256K1(bip32Path []uint32) ([]byte, error)
GetPublicKeySECP256K1 retrieves the public key for the corresponding bip32 derivation path (compressed) this command DOES NOT require user confirmation in the device
func (*LedgerCosmos) GetVersion ¶ added in v0.9.3
func (ledger *LedgerCosmos) GetVersion() (*VersionInfo, error)
GetVersion returns the current version of the Cosmos user app
func (*LedgerCosmos) SignSECP256K1 ¶ added in v0.9.3
func (ledger *LedgerCosmos) SignSECP256K1(bip32Path []uint32, transaction []byte, p2 byte) ([]byte, error)
SignSECP256K1 signs a transaction using Cosmos user app. It can either use SIGN_MODE_LEGACY_AMINO_JSON (P2=0) or SIGN_MODE_TEXTUAL (P2=1). this command requires user confirmation in the device
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, rerr 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 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
type VersionRequiredError ¶ added in v0.10.1
type VersionRequiredError struct { Found VersionInfo Required VersionInfo }
VersionRequiredError the command is not supported by this app
func (VersionRequiredError) Error ¶ added in v0.10.1
func (e VersionRequiredError) Error() string