Documentation ¶
Index ¶
Constants ¶
View Source
const ( SigntureFlagEd25519 = 0x0 SigntureFlagSecp256k1 = 0x1 AddressLength = 64 DerivationPathEd25519 = `m/44'/784'/0'/0'/0'` DerivationPathSecp256k1 = `m/54'/784'/0'/0/0` )
View Source
const (
FirstHardenedIndex = uint32(0x80000000)
)
Variables ¶
View Source
var ( ErrInvalidPath = errors.New("invalid derivation path") ErrNoPublicDerivation = errors.New("no public derivation for ed25519") )
Functions ¶
This section is empty.
Types ¶
type Key ¶
func DeriveForPath ¶
DeriveForPath derives key for a path in BIP-44 format and a seed. Ed25119 derivation operated on hardened keys only.
func NewMasterKey ¶
NewMasterKey generates a new master key from seed.
type SignedMessageSerializedSig ¶ added in v1.0.6
type Signer ¶
type Signer struct { PriKey ed25519.PrivateKey PubKey ed25519.PublicKey Address string }
func NewSignertWithMnemonic ¶
func (*Signer) SignMessage ¶ added in v1.0.6
func (s *Signer) SignMessage(data string, scope constant.IntentScope) (*SignedMessageSerializedSig, error)
func (*Signer) SignPersonalMessage ¶ added in v1.0.6
func (s *Signer) SignPersonalMessage(message string) (*SignedMessageSerializedSig, error)
func (*Signer) SignTransaction ¶ added in v1.0.6
func (s *Signer) SignTransaction(b64TxBytes string) (*models.SignedTransactionSerializedSig, error)
Click to show internal directories.
Click to hide internal directories.