Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶ added in v0.0.10
type Generator interface { // Generate gathers entropy and derives pubkey bytes for matching, this returns the 33 byte compressed form for // checking the oddness of the Y coordinate. Generate() (pubBytes B, err E) // Negate flips the public key Y coordinate between odd and even. Negate() // KeyPairBytes returns the raw bytes of the secret and public key, this returns the 32 byte X-only pubkey. KeyPairBytes() (secBytes, cmprPubBytes B) }
Generator is an interface for nost BIP-340 key mining.
type Signer ¶
type Signer interface { // Generate creates a fresh new key pair from system entropy, and ensures it is even (so ECDH works). Generate() (err E) // InitSec initialises the secret (signing) key from the raw bytes, and also // derives the public key because it can. InitSec(sec B) (err E) // InitPub initializes the public (verification) key from raw bytes. InitPub(pub B) (err E) // Sec returns the secret key bytes. Sec() B // Pub returns the public key bytes (x-only schnorr pubkey). Pub() B // ECPub returns the public key bytes (33 byte ecdsa pubkey). The first byte is always 2 due to ECDH and X-only // keys. ECPub() B // Sign creates a signature using the stored secret key. Sign(msg B) (sig B, err E) // Verify checks a message hash and signature match the stored public key. Verify(msg, sig B) (valid bool, err E) // Zero wipes the secret key to prevent memory leaks. Zero() // ECDH returns a shared secret derived using Elliptic Curve Diffie Hellman on the Signer secret and provided // pubkey. ECDH(pub B) (secret B, err E) // Negate flips the the secret key to change between odd and even compressed public key. Negate() }
Directories ¶
Path | Synopsis |
---|---|
Package codec defines interfaces for use with both pointer and reference types that allows proper integration with zero-copy and allocation pools
|
Package codec defines interfaces for use with both pointer and reference types that allows proper integration with zero-copy and allocation pools |
eventstore/badger/keys
Package keys is a composable framework for constructing badger keys from fields of events.
|
Package keys is a composable framework for constructing badger keys from fields of events. |
eventstore/l2
Package l2 is a testing data store that implements a level 2 cache for events with a badger eventstore.
|
Package l2 is a testing data store that implements a level 2 cache for events with a badger eventstore. |
atomic
Package atomic provides simple wrappers around numerics to enforce atomic access.
|
Package atomic provides simple wrappers around numerics to enforce atomic access. |
atomic/internal/gen-atomicint
gen-atomicint generates an atomic wrapper around an integer type.
|
gen-atomicint generates an atomic wrapper around an integer type. |
atomic/internal/gen-atomicwrapper
gen-atomicwrapper generates wrapper types around other atomic types.
|
gen-atomicwrapper generates wrapper types around other atomic types. |
context
Package context is a set of shorter names for the very stuttery context library.
|
Package context is a set of shorter names for the very stuttery context library. |
Click to show internal directories.
Click to hide internal directories.