Documentation
¶
Overview ¶
Package siwetest signs Sign-In with Ethereum messages with a fixed key, for tests and examples that need a real wallet signature without a wallet.
It produces exactly what a wallet's personal_sign produces (EIP-191, 65 bytes r || s || v with v = 27 or 28), so a signature it makes is checked by the plugin's real verifier, not a stub. Never use it with a key that holds anything: the keys here are public test keys.
Index ¶
Constants ¶
const HardhatKey0 = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
HardhatKey0 is the first account of Hardhat's and Anvil's default test mnemonic, whose address every Ethereum developer recognizes: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266. Public; it guards nothing.
const SecondKey = "59c6995e998f97a5a0044966f0d6f9cb2b6b8a15b1a9a2e3b7dc4cd2b1e5d0c6"
SecondKey is an arbitrary second test key, address 0x22181e4B9Bb252e079fC81DEB438E49d571F9faf, for a test that needs a second wallet. Public; it guards nothing.
Variables ¶
var ErrKeyInvalid = errors.New("siwetest: a key is 32 bytes of hex")
ErrKeyInvalid is NewKey's error for text that is not a 32-byte hex key.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key is one test wallet.