ledger_cosmos_go

package module
v0.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 5

README

ledger-cosmos-go

CircleCI Build status

This project is work in progress. Some aspects are subject to change.

Get source

Apart from cloning, be sure you install dep dependency management tool https://github.com/golang/dep

Documentation

Index

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

func GetBip32bytes added in v0.9.8

func GetBip32bytes(bip32Path []uint32, hardenCount int) ([]byte, error)

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

type VersionInfo struct {
	AppMode uint8
	Major   uint8
	Minor   uint8
	Patch   uint8
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL