cosmos-sdk/crypto/keyring/keyring_other.go
Alessio Treglia c0eced8d7e
feat(crypto/keyring): add Linux's keyctl support (#21653)
Signed-off-by: Alessio Treglia <al@essio.dev>
Co-authored-by: Alessio Treglia <alessio@jur.io>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marko@baricevic.me>
2024-09-16 08:35:11 +00:00

36 lines
1.0 KiB
Go

//go:build !linux
// +build !linux
package keyring
import (
"io"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/ledger"
"github.com/cosmos/cosmos-sdk/crypto/types"
)
// Options define the options of the Keyring.
type Options struct {
// supported signing algorithms for keyring
SupportedAlgos SigningAlgoList
// supported signing algorithms for Ledger
SupportedAlgosLedger SigningAlgoList
// define Ledger Derivation function
LedgerDerivation func() (ledger.SECP256K1, error)
// define Ledger key generation function
LedgerCreateKey func([]byte) types.PubKey
// define Ledger app name
LedgerAppName string
// indicate whether Ledger should skip DER Conversion on signature,
// depending on which format (DER or BER) the Ledger app returns signatures
LedgerSigSkipDERConv bool
}
func New(
appName, backend, rootDir string, userInput io.Reader, cdc codec.Codec, opts ...Option,
) (Keyring, error) {
return newKeyringGeneric(appName, backend, rootDir, userInput, cdc, opts...)
}