Documentation ¶
Overview ¶
Copyright 2019 ChainSafe Systems (ON) Corp. This file is part of gossamer.
The gossamer library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The gossamer library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the gossamer library. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUint64 ¶ added in v0.3.0
func AppendUint64(t *merlin.Transcript, label []byte, n uint64)
AppendUint64 appends a uint64 to the given transcript using the given label
func NewBIP39Mnemonic ¶ added in v0.3.1
NewBIP39Mnemonic returns a new BIP39-compatible mnemonic
func PublicAddressToByteArray ¶ added in v0.2.0
PublicAddressToByteArray returns []byte address for given PublicKey Address
func PublicKeyToAddress ¶
PublicKeyToAddress returns an ss58 address given a PublicKey see: https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58) also see: https://github.com/paritytech/substrate/blob/master/primitives/core/src/crypto.rs#L275
Types ¶
type KeyType ¶
type KeyType = string
KeyType str
const Ed25519Type KeyType = "ed25519"
Ed25519Type ed25519
const Secp256k1Type KeyType = "secp256k1"
Secp256k1Type secp256k1
const Sr25519Type KeyType = "sr25519"
Sr25519Type sr25519
const UnknownType KeyType = "unknown"
UnknownType is used by the GenericKeystore
type Keypair ¶
type Keypair interface { Type() KeyType Sign(msg []byte) ([]byte, error) Public() PublicKey Private() PrivateKey }
Keypair interface