Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeMastersFromSeed(seed []byte) (secret [32]byte, chainCode [32]byte)
- func DerivePrivateKeyForPath(privKeyBytes [32]byte, chainCode [32]byte, path string) ([32]byte, error)
- type BIP44Params
- type DeriveFn
- type GenerateFn
- type PubKeyType
- type SignatureAlgo
- type WalletGenerator
Constants ¶
View Source
const ( // Secp256k1Type uses the Bitcoin secp256k1 ECDSA parameters. Secp256k1Type = PubKeyType("secp256k1") // Ed25519Type represents the Ed25519Type signature system. // It is currently not supported for end-user keys (wallets/ledgers). Ed25519Type = PubKeyType("ed25519") // Sr25519Type represents the Sr25519Type signature system. Sr25519Type = PubKeyType("sr25519") // Sm2Type represents the Sm2Type signature system. Sm2Type = PubKeyType("sm2") )
View Source
const ( BIP44Prefix = "44'/118'/" PartialPath = "0'/0/0" FullPath = BIP44Prefix + PartialPath )
Variables ¶
View Source
var ( // Secp256k1 uses the Bitcoin secp256k1 ECDSA parameters. Secp256k1 = secp256k1Algo{} Sm2 = sm2Algo{} )
Functions ¶
func ComputeMastersFromSeed ¶
ComputeMastersFromSeed returns the master public key, master secret, and chain code in hex.
Types ¶
type BIP44Params ¶
type GenerateFn ¶
type PubKeyType ¶
type PubKeyType string
PubKeyType defines an algorithm to derive key-pairs which can be used for cryptographic signing.
type SignatureAlgo ¶
type SignatureAlgo interface { Name() PubKeyType Derive() DeriveFn Generate() GenerateFn }
func NewSigningAlgoFromString ¶
func NewSigningAlgoFromString(str string) (SignatureAlgo, error)
Click to show internal directories.
Click to hide internal directories.