Documentation
¶
Overview ¶
Package local is the in-memory secp256k1 TransactionSigner (adapter kind "unsafe-local"). Test and vector use only: construction requires an explicit UnsafeTestOnly opt-in and always refuses when the network type is mainnet.
Index ¶
- type Options
- type Signer
- func (s *Signer) GenerateKey(keyRef string) ([]byte, error)
- func (s *Signer) GetPublicKey(ctx context.Context, req signer.PublicKeyRequest) (signer.PublicKeyResponse, error)
- func (s *Signer) ImportKey(keyRef string, secret []byte) error
- func (s *Signer) Sign(ctx context.Context, req signer.SigningRequest) (signer.SigningResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
func (*Signer) GenerateKey ¶
GenerateKey creates a fresh random key under keyRef and returns its compressed public key.
func (*Signer) GetPublicKey ¶
func (s *Signer) GetPublicKey(ctx context.Context, req signer.PublicKeyRequest) (signer.PublicKeyResponse, error)
func (*Signer) ImportKey ¶
ImportKey registers a 32-byte secp256k1 secret under keyRef, replacing any existing key.
func (*Signer) Sign ¶
func (s *Signer) Sign(ctx context.Context, req signer.SigningRequest) (signer.SigningResponse, error)
Click to show internal directories.
Click to hide internal directories.