aml

package
v0.9.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPrepareRequest = errors.New("invalid reuq")

Functions

This section is empty.

Types

type AuthKeyType

type AuthKeyType string

AuthKeyType defines credential types

const (
	KeyAccessKeyID AuthKeyType = "access_key_id"
	KeyAccessID    AuthKeyType = "access_id"
	KeyAccessKey   AuthKeyType = "access_key"
	KeySecret      AuthKeyType = "secret"
)

type CheckResponse

type CheckResponse struct {
	ExternalID string          `json:"external_id"`
	Score      decimal.Decimal `json:"score"`
	Status     CheckStatus     `json:"status"`
	RiskLevel  *CheckRiskLevel `json:"risk_level"`
	HTTPStatus int             `json:"http_status"`
	Request    json.RawMessage `json:"request"`
	Response   json.RawMessage `json:"response"`
}

type CheckRiskLevel

type CheckRiskLevel string
const (
	CheckRiskLevelLow       CheckRiskLevel = "low"
	CheckRiskLevelMedium    CheckRiskLevel = "medium"
	CheckRiskLevelHigh      CheckRiskLevel = "high"
	CheckRiskLevelSevere    CheckRiskLevel = "severe"
	CheckRiskLevelNone      CheckRiskLevel = "none"
	CheckRiskLevelUndefined CheckRiskLevel = "undefined"
)

type CheckStatus

type CheckStatus string
const (
	CheckStatusNew     CheckStatus = "new"
	CheckStatusSuccess CheckStatus = "success"
	CheckStatusFailure CheckStatus = "failure"
)

type Client

type Client interface {
	InitCheckTransaction(ctx context.Context, dto InitCheckDTO, auth RequestAuthorizer) (*CheckResponse, error)
	FetchCheckStatus(ctx context.Context, checkID string, auth RequestAuthorizer) (*CheckResponse, error)
	TestRequestWithAuth(ctx context.Context, auth RequestAuthorizer) error
}

type Direction

type Direction string
const (
	DirectionIn  Direction = "in"
	DirectionOut Direction = "ount"
)

type InitCheckDTO

type InitCheckDTO struct {
	TokenData           TokenData
	Direction           Direction
	TxID, OutputAddress string
}

type ProviderSlug

type ProviderSlug string

ProviderSlug defines AML provider identity

const (
	ProviderSlugAMLBot ProviderSlug = "aml_bot"
	ProviderSlugBitOK  ProviderSlug = "bitok"
)

type RequestAuthorizer

type RequestAuthorizer interface {
	Authorize(ctx context.Context, req *http.Request) error
}

type RequestFailedError

type RequestFailedError struct {
	StatusCode int
	Body       []byte
	RequestURL string
}

func (*RequestFailedError) Error

func (re *RequestFailedError) Error() string

type TokenData

type TokenData struct {
	Blockchain      string `json:"blockchain"`
	ContractAddress string `json:"contract_address"`
}

func (TokenData) IsNative

func (td TokenData) IsNative() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL