Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DevPhrase is default phrase used for dev test accounts
DevPhrase = "bottom drive obey lake curtain smoke basket hold race lonely fit walk"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeHex ¶ added in v1.0.1
DecodeHex decodes the hex string to bytes. `0x` prefix is accepted.
func SS58Decode ¶ added in v1.0.4
SS58Decode decodes an SS58 checksumed value into its data and format.
func SS58Encode ¶ added in v1.0.4
SS58Encode encodes data and format identifier to an SS58 checksumed string.
Types ¶
type DeriveJunction ¶ added in v1.0.1
type PublicKey ¶ added in v1.0.4
type PublicKey interface { Verifier // Public returns the pub key in bytes. Public() []byte // AccountID returns the accountID for this key AccountID() []byte // SS58Address returns the Base58 public key with checksum and network identifier. SS58Address(network uint16) string }
PublicKey can verify and be converted to SS58 addresses
type Scheme ¶
type Scheme interface { fmt.Stringer Generate() (KeyPair, error) FromSeed(seed []byte) (KeyPair, error) FromPhrase(phrase, password string) (KeyPair, error) Derive(pair KeyPair, djs []DeriveJunction) (KeyPair, error) FromPublicKey([]byte) (PublicKey, error) }
Scheme represents a cryptography scheme.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.