Documentation
¶
Overview ¶
THORChain uses same CLA (0x55) as Cosmos app, so okay to use cosmos/ledger-go for transport
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 LedgerTHORChain
- func (ledger *LedgerTHORChain) CheckVersion(ver VersionInfo) error
- func (ledger *LedgerTHORChain) Close() error
- func (ledger *LedgerTHORChain) GetAddressPubKeySECP256K1(bip32Path []uint32, hrp string) (pubkey []byte, addr string, err error)
- func (ledger *LedgerTHORChain) GetBip32bytes(bip32Path []uint32, hardenCount int) ([]byte, error)
- func (ledger *LedgerTHORChain) GetPublicKeySECP256K1(bip32Path []uint32) ([]byte, error)
- func (ledger *LedgerTHORChain) GetVersion() (*VersionInfo, error)
- func (ledger *LedgerTHORChain) SignSECP256K1(bip32Path []uint32, transaction []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.12.0
func GetBip32bytesv2 ¶ added in v0.12.0
func NewVersionRequiredError ¶ added in v0.12.0
func NewVersionRequiredError(req VersionInfo, ver VersionInfo) error
Types ¶
type LedgerTHORChain ¶ added in v0.12.0
type LedgerTHORChain struct {
// contains filtered or unexported fields
}
LedgerTHORChain represents a connection to the THORChain app in a Ledger Nano S/X device
func FindLedgerCosmosUserApp ¶ added in v0.9.3
func FindLedgerCosmosUserApp() (*LedgerTHORChain, error)
Compatibility with Cosmos apps calling convention
func FindLedgerTHORChainUserApp ¶ added in v0.12.0
func FindLedgerTHORChainUserApp() (*LedgerTHORChain, error)
FindLedgerTHORChainUserApp finds a THORChain user app running in a ledger device
func (*LedgerTHORChain) CheckVersion ¶ added in v0.12.0
func (ledger *LedgerTHORChain) CheckVersion(ver VersionInfo) error
VersionIsSupported returns true if the App version is supported by this library
func (*LedgerTHORChain) Close ¶ added in v0.12.0
func (ledger *LedgerTHORChain) Close() error
Close closes a connection with the THORChain user app
func (*LedgerTHORChain) GetAddressPubKeySECP256K1 ¶ added in v0.12.0
func (ledger *LedgerTHORChain) 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 (*LedgerTHORChain) GetBip32bytes ¶ added in v0.12.0
func (ledger *LedgerTHORChain) GetBip32bytes(bip32Path []uint32, hardenCount int) ([]byte, error)
func (*LedgerTHORChain) GetPublicKeySECP256K1 ¶ added in v0.12.0
func (ledger *LedgerTHORChain) 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 (*LedgerTHORChain) GetVersion ¶ added in v0.12.0
func (ledger *LedgerTHORChain) GetVersion() (*VersionInfo, error)
GetVersion returns the current version of the THORChain user app
func (*LedgerTHORChain) SignSECP256K1 ¶ added in v0.12.0
func (ledger *LedgerTHORChain) SignSECP256K1(bip32Path []uint32, transaction []byte) ([]byte, error)
SignSECP256K1 signs a transaction using THORChain user app this command requires user confirmation in the device
type VersionInfo ¶
VersionInfo contains app version information
func (VersionInfo) String ¶ added in v0.9.8
func (c VersionInfo) String() string
type VersionRequiredError ¶ added in v0.12.0
type VersionRequiredError struct {
Found VersionInfo
Required VersionInfo
}
VersionRequiredError the command is not supported by this app
func (VersionRequiredError) Error ¶ added in v0.12.0
func (e VersionRequiredError) Error() string