Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TestKeyringPairAlice = KeyringPair{ URI: "//Alice", PublicKey: []byte{0xd4, 0x35, 0x93, 0xc7, 0x15, 0xfd, 0xd3, 0x1c, 0x61, 0x14, 0x1a, 0xbd, 0x4, 0xa9, 0x9f, 0xd6, 0x82, 0x2c, 0x85, 0x58, 0x85, 0x4c, 0xcd, 0xe3, 0x9a, 0x56, 0x84, 0xe7, 0xa5, 0x6d, 0xa2, 0x7d}, Address: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", }
Functions ¶
Types ¶
type KeyringPair ¶
type KeyringPair struct { // URI is the derivation path for the private key in subkey URI string // Address is an SS58 address Address string // PublicKey PublicKey []byte }
func KeyringPairFromSecret ¶
func KeyringPairFromSecret(seedOrPhrase string) (KeyringPair, error)
func LoadKeyringPairFromEnv ¶
func LoadKeyringPairFromEnv() (kp KeyringPair, ok bool)
LoadKeyringPairFromEnv looks up whether the env variable TEST_PRIV_KEY is set and is not empty and tries to use its content as a private phrase, seed or URI to derive a key ring pair. Panics if the private phrase, seed or URI is not valid or the keyring pair cannot be derived
Click to show internal directories.
Click to hide internal directories.