Documentation ¶
Overview ¶
Package client provides a client for the screener-api.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSignature ¶ added in v0.4.0
GenerateSignature generates a signature for the request.
Types ¶
type BlackListBody ¶ added in v0.4.0
type BlackListBody struct { Type string `json:"type"` ID string `json:"id"` Data Data `json:"data"` }
BlackListBody is the json payload that represents a blacklisted address.
type Data ¶ added in v0.8.1
type Data struct { Address string `json:"address"` Network string `json:"network"` Tag string `json:"tag"` Remark string `json:"remark"` }
Data is the data field in the BlackListBody.
type ScreenerClient ¶
type ScreenerClient interface { ScreenAddress(ctx context.Context, address string) (blocked bool, err error) BlacklistAddress(ctx context.Context, appsecret string, appid string, body BlackListBody) (string, error) }
ScreenerClient is an interface for the Screener API.
func NewClient ¶
func NewClient(metricHandler metrics.Handler, screenerURL string) (ScreenerClient, error)
NewClient creates a new client for the Screener API.
func NewNoOpClient ¶ added in v0.0.13
func NewNoOpClient() (ScreenerClient, error)
NewNoOpClient creates a new no-op client for the Screener API. it returns false for every address.
Click to show internal directories.
Click to hide internal directories.