history

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package history provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *Configuration) (*Client, error)

func (*Client) GetHistoryEventsByAddress

func (api *Client) GetHistoryEventsByAddress(ctx context.Context, params EventsByAddressParams) (*EventsByAddressResponse, error)

GetHistoryEventsByAddress Returns history events for address

type Configuration

type Configuration struct {
	ApiKey string
	ApiURL string
	API    api
}

func NewConfiguration

func NewConfiguration(params ConfigurationParams) (*Configuration, error)

type ConfigurationParams

type ConfigurationParams struct {
	ApiUrl string
	ApiKey string
}

type Details

type Details struct {
	TxHash       string        `json:"txHash"`
	ChainID      int           `json:"chainId"`
	BlockNumber  int           `json:"blockNumber"`
	BlockTimeSec int64         `json:"blockTimeSec"`
	Status       string        `json:"status"`
	Type         string        `json:"type"`
	TokenActions []TokenAction `json:"tokenActions"`
	FromAddress  string        `json:"fromAddress"`
	ToAddress    string        `json:"toAddress"`
	OrderInBlock int           `json:"orderInBlock"`
	Nonce        int           `json:"nonce"`
	FeeInWei     string        `json:"feeInWei"`
}

type EventsByAddressParams

type EventsByAddressParams struct {
	Address string `url:"address"  json:"-"`

	Limit int `url:"limit,omitempty" json:"limit,omitempty"`

	TokenAddress string `url:"tokenAddress,omitempty" json:"tokenAddress,omitempty"`

	ChainId int `url:"chainId,omitempty" json:"chainId,omitempty"`

	ToTimestampMs int `url:"toTimestampMs,omitempty" json:"toTimestampMs,omitempty"`

	FromTimestampMs int `url:"fromTimestampMs,omitempty" json:"fromTimestampMs,omitempty"`
}

func (*EventsByAddressParams) Validate

func (params *EventsByAddressParams) Validate() error

type EventsByAddressResponse

type EventsByAddressResponse struct {
	Items        []Item `json:"items"`
	CacheCounter int    `json:"cache_counter"`
}

type HistoryEventDto

type HistoryEventDto struct {
	Address string                `json:"address"`
	Details TransactionDetailsDto `json:"details"`
	Id      string                `json:"id"`
	Rating  HistoryEventDtoRating `json:"rating"`
	TimeMs  float32               `json:"timeMs"`
	Type    HistoryEventDtoType   `json:"type"`
}

HistoryEventDto defines model for HistoryEventDto.

type HistoryEventDtoRating

type HistoryEventDtoRating string

HistoryEventDtoRating defines model for HistoryEventDto.Rating.

const (
	Reliable HistoryEventDtoRating = "Reliable"
	Scam     HistoryEventDtoRating = "Scam"
)

Defines values for HistoryEventDtoRating.

type HistoryEventDtoType

type HistoryEventDtoType string

HistoryEventDtoType defines model for HistoryEventDto.Type.

const (
	FusionSwap  HistoryEventDtoType = "FusionSwap"
	LimitOrder  HistoryEventDtoType = "LimitOrder"
	Transaction HistoryEventDtoType = "Transaction"
)

Defines values for HistoryEventDtoType.

type HistoryResponseDto

type HistoryResponseDto struct {
	CacheCounter float32           `json:"cache_counter"`
	Items        []HistoryEventDto `json:"items"`
}

HistoryResponseDto defines model for HistoryResponseDto.

type Item

type Item struct {
	TimeMs                  int64   `json:"timeMs"`
	Address                 string  `json:"address"`
	Type                    int     `json:"type"`
	Rating                  string  `json:"rating"`
	Details                 Details `json:"details"`
	ID                      string  `json:"id"`
	EventOrderInTransaction int     `json:"eventOrderInTransaction"`
}

type TokenAction

type TokenAction struct {
	Address     string `json:"address"`
	Standard    string `json:"standard"`
	FromAddress string `json:"fromAddress"`
	ToAddress   string `json:"toAddress"`
	Amount      string `json:"amount"`
	Direction   string `json:"direction"`
}

type TokenActionDto

type TokenActionDto struct {
	Address     string                  `json:"address"`
	Amount      map[string]interface{}  `json:"amount,omitempty"`
	Direction   TokenActionDtoDirection `json:"direction"`
	FromAddress string                  `json:"fromAddress"`
	Standard    string                  `json:"standard"`
	ToAddress   string                  `json:"toAddress"`
	TokenId     map[string]interface{}  `json:"tokenId,omitempty"`
}

TokenActionDto defines model for TokenActionDto.

type TokenActionDtoDirection

type TokenActionDtoDirection string

TokenActionDtoDirection defines model for TokenActionDto.Direction.

Defines values for TokenActionDtoDirection.

type TransactionDetailsDto

type TransactionDetailsDto struct {
	BlockNumber  float32                      `json:"blockNumber"`
	BlockTimeSec float32                      `json:"blockTimeSec"`
	ChainId      TransactionDetailsDtoChainId `json:"chainId"`
	FeeInWei     string                       `json:"feeInWei"`
	FromAddress  string                       `json:"fromAddress"`
	Meta         *TransactionDetailsMetaDto   `json:"meta,omitempty"`
	Nonce        float32                      `json:"nonce"`
	OrderInBlock float32                      `json:"orderInBlock"`
	Status       string                       `json:"status"`
	ToAddress    string                       `json:"toAddress"`
	TokenActions []TokenActionDto             `json:"tokenActions"`
	TxHash       string                       `json:"txHash"`
	Type         TransactionDetailsDtoType    `json:"type"`
}

TransactionDetailsDto defines model for TransactionDetailsDto.

type TransactionDetailsDtoChainId

type TransactionDetailsDtoChainId int

TransactionDetailsDtoChainId defines model for TransactionDetailsDto.ChainId.

type TransactionDetailsDtoType

type TransactionDetailsDtoType string

TransactionDetailsDtoType defines model for TransactionDetailsDto.Type.

const (
	AbiDecoded          TransactionDetailsDtoType = "AbiDecoded"
	Action              TransactionDetailsDtoType = "Action"
	AddLiquidity        TransactionDetailsDtoType = "AddLiquidity"
	AddOwner            TransactionDetailsDtoType = "AddOwner"
	Approve             TransactionDetailsDtoType = "Approve"
	BidNft              TransactionDetailsDtoType = "BidNft"
	Borrow              TransactionDetailsDtoType = "Borrow"
	Bridge              TransactionDetailsDtoType = "Bridge"
	Burn                TransactionDetailsDtoType = "Burn"
	BuyNft              TransactionDetailsDtoType = "BuyNft"
	Claim               TransactionDetailsDtoType = "Claim"
	CreateSafe          TransactionDetailsDtoType = "CreateSafe"
	DelegateVotePower   TransactionDetailsDtoType = "DelegateVotePower"
	DeployPool          TransactionDetailsDtoType = "DeployPool"
	DiscardVote         TransactionDetailsDtoType = "DiscardVote"
	LimitOrderCancel    TransactionDetailsDtoType = "LimitOrderCancel"
	LimitOrderCancelAll TransactionDetailsDtoType = "LimitOrderCancelAll"
	LimitOrderFill      TransactionDetailsDtoType = "LimitOrderFill"
	Multicall           TransactionDetailsDtoType = "Multicall"
	OfferSellNft        TransactionDetailsDtoType = "OfferSellNft"
	RegisterENSDomain   TransactionDetailsDtoType = "RegisterENSDomain"
	RemoveLiquidity     TransactionDetailsDtoType = "RemoveLiquidity"
	Repay               TransactionDetailsDtoType = "Repay"
	Revoke              TransactionDetailsDtoType = "Revoke"
	Stake               TransactionDetailsDtoType = "Stake"
	SwapExactInput      TransactionDetailsDtoType = "SwapExactInput"
	SwapExactOutput     TransactionDetailsDtoType = "SwapExactOutput"
	TraceDecoded        TransactionDetailsDtoType = "TraceDecoded"
	Transfer            TransactionDetailsDtoType = "Transfer"
	UnDelegateVotePower TransactionDetailsDtoType = "UnDelegateVotePower"
	Unstake             TransactionDetailsDtoType = "Unstake"
	Unwrap              TransactionDetailsDtoType = "Unwrap"
	Vote                TransactionDetailsDtoType = "Vote"
	Wrap                TransactionDetailsDtoType = "Wrap"
	WrappedTx           TransactionDetailsDtoType = "WrappedTx"
)

Defines values for TransactionDetailsDtoType.

type TransactionDetailsMetaDto

type TransactionDetailsMetaDto struct {
	EnsDomainName       map[string]interface{} `json:"ensDomainName,omitempty"`
	FromChainId         map[string]interface{} `json:"fromChainId,omitempty"`
	Is1inchFusionSwap   map[string]interface{} `json:"is1inchFusionSwap,omitempty"`
	OrderFillPercentage map[string]interface{} `json:"orderFillPercentage,omitempty"`
	Protocol            map[string]interface{} `json:"protocol,omitempty"`
	SafeAddress         map[string]interface{} `json:"safeAddress,omitempty"`
	ToChainId           map[string]interface{} `json:"toChainId,omitempty"`
}

TransactionDetailsMetaDto defines model for TransactionDetailsMetaDto.

type V2RestApiControllerGetHistoryEventsByAddressParams

type V2RestApiControllerGetHistoryEventsByAddressParams struct {
	// Limit Amount of events to return, default is 100, max is 10000
	Limit int `url:"limit,omitempty" json:"limit,omitempty"`

	// TokenAddress Token address used at event
	TokenAddress string `url:"tokenAddress,omitempty" json:"tokenAddress,omitempty"`

	// ChainId chainId
	ChainId int `url:"chainId,omitempty" json:"chainId,omitempty"`

	// ToTimestampMs To time at milliseconds
	ToTimestampMs int `url:"toTimestampMs,omitempty" json:"toTimestampMs,omitempty"`

	// FromTimestampMs From time at milliseconds
	FromTimestampMs int `url:"fromTimestampMs,omitempty" json:"fromTimestampMs,omitempty"`
}

V2RestApiControllerGetHistoryEventsByAddressParams defines parameters for V2RestApiControllerGetHistoryEventsByAddress.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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