23 lines
700 B
Go
23 lines
700 B
Go
package enstypes
|
|
|
|
import "crypto/ecdsa"
|
|
|
|
type ENSVerifier interface {
|
|
// CheckBatch verifies that a registered ENS name matches the expected public key
|
|
CheckBatch(ensDetails []ENSDetails, rpcEndpoint, contractAddress string) (map[string]ENSResponse, error)
|
|
}
|
|
|
|
type ENSDetails struct {
|
|
Name string `json:"name"`
|
|
PublicKeyString string `json:"publicKey"`
|
|
}
|
|
|
|
type ENSResponse struct {
|
|
Name string `json:"name"`
|
|
Verified bool `json:"verified"`
|
|
VerifiedAt int64 `json:"verifiedAt"`
|
|
Error error `json:"error"`
|
|
PublicKey *ecdsa.PublicKey `json:"-"`
|
|
PublicKeyString string `json:"publicKey"`
|
|
}
|