trmlabs

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package trmlabs contains the implementation of the TRM Labs API client. this implementation is incomplete, but it is a good starting point.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressRiskIndicator

type AddressRiskIndicator struct {
	Category                    string `json:"category"`
	CategoryID                  string `json:"categoryId"`
	CategoryRiskScoreLevel      int    `json:"categoryRiskScoreLevel"`
	CategoryRiskScoreLevelLabel string `json:"categoryRiskScoreLevelLabel"`
	IncomingVolumeUsd           string `json:"incomingVolumeUsd"`
	OutgoingVolumeUsd           string `json:"outgoingVolumeUsd"`
	RiskType                    string `json:"riskType"`
	TotalVolumeUsd              string `json:"totalVolumeUsd"`
}

AddressRiskIndicator is a risk indicator for an address.

type Client

type Client interface {
	ScreenAddress(ctx context.Context, address string) ([]ScreenResponse, error)
}

Client is the interface for the TRM Labs API client.

func NewClient

func NewClient(apiKey, url string) (Client, error)

NewClient creates a new TRM Labs API client.

type ScreenResponse

type ScreenResponse struct {
	AccountExternalID        string                 `json:"accountExternalId"`
	Address                  string                 `json:"address"`
	AddressIncomingVolumeUsd string                 `json:"addressIncomingVolumeUsd"`
	AddressOutgoingVolumeUsd string                 `json:"addressOutgoingVolumeUsd"`
	AddressRiskIndicators    []AddressRiskIndicator `json:"addressRiskIndicators"`
	AddressSubmitted         string                 `json:"addressSubmitted"`
	AddressTotalVolumeUsd    string                 `json:"addressTotalVolumeUsd"`
	Chain                    string                 `json:"chain"`
	Entities                 []interface{}          `json:"entities"`
	ExternalID               string                 `json:"externalId"`
	TrmAppURL                string                 `json:"trmAppUrl"`
}

ScreenResponse is the response from the screening endpoint.

Jump to

Keyboard shortcuts

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