account

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBalanceRequest

type AccountBalanceRequest struct {
	ChainShortName  string   `json:"chainShortName"`
	ExplorerName    string   `json:"explorerName"`
	Account         []string `json:"account"`
	Symbol          []string `json:"symbol"`
	ContractAddress []string `json:"contractAddress"`
	ProtocolType    []string `json:"protocolType"` // 20代币:token_20; 721代币:token_721; 1155代币:token_1155;
	Page            []string `json:"page"`
	Limit           []string `json:"limit"`
}

type AccountBalanceResponse

type AccountBalanceResponse struct {
	Account         string         `json:"account"`
	Balance         *common.BigInt `json:"balance"`
	BalanceStr      string         `json:"balanceStr"`
	Symbol          string         `json:"symbol"`
	ContractAddress string         `json:"contractAddress"`
	TokenId         string         `json:"token_id"`
}

type AccountTxRequest

type AccountTxRequest struct {
	chain.PageRequest
	ExplorerName   string `json:"explorerName"`
	ChainShortName string `json:"chainShortName"`
	// normal internal token
	Action ActionType     `json:"action"`
	Sort   chain.SortType `url:"sort"`

	Address          string `json:"address"`
	StartBlockHeight uint64 `json:"startBlockHeight"`
	EndBlockHeight   uint64 `json:"endBlockHeight"`
	IsFromOrTo       string `json:"isFromOrTo"`
	// token_20 token_721 token_1155
	ProtocolType         ProtocolType `json:"protocolType"`
	TokenContractAddress string       `json:"tokenContractAddress"`
}

func (*AccountTxRequest) ToQueryUrl

func (req *AccountTxRequest) ToQueryUrl() string

type AccountTxResponse

type AccountTxResponse struct {
	TxId             string `json:"txId"`
	BlockHash        string `json:"blockHash"`
	Height           string `json:"height"`
	TransactionTime  string `json:"transactionTime"`
	TransactionIndex string `json:"transactionIndex"`
	From             string `json:"from"`
	To               string `json:"to"`
	Nonce            string `json:"nonce"`

	Amount string `json:"amount"`
	Symbol string `json:"symbol"`

	Operation       string `json:"operation"`
	GasPrice        string `json:"gasPrice"`
	GasLimit        string `json:"gasLimit"`
	GasUsed         string `json:"gasUsed"`
	TxFee           string `json:"txFee"`
	State           string `json:"state"`
	TransactionType string `json:"transactionType"`
	Confirmations   string `json:"confirmations"`
	IsError         string `json:"isError"`
	TraceId         string `json:"traceId"`

	Input                string `json:"input"`
	MethodId             string `json:"methodId"`
	FunctionName         string `json:"functionName"`
	TokenContractAddress string `json:"tokenContractAddress"`

	IsFromContract bool `json:"isFromContract"`
	IsToContract   bool `json:"isToContract"`

	TokenId      string `json:"tokenId"`
	TokenName    string `json:"tokenName"`
	TokenSymbol  string `json:"tokenSymbol"`
	TokenDecimal string `json:"tokenDecimal"`
	TokenValue   string `json:"tokenValue"`
}

type AccountUtxoRequest

type AccountUtxoRequest struct {
	ExplorerName   string `json:"explorerName"`
	ChainShortName string `json:"chainShortName"`
	Address        string `json:"address"`
	Page           string `json:"page"`
	Limit          string `json:"limit"`
}

type AccountUtxoResponse

type AccountUtxoResponse struct {
	TxId          string `json:"txid"`
	Height        string `json:"height"`
	BlockTime     string `json:"blockTime"`
	Address       string `json:"address"`
	UnspentAmount string `json:"unspentAmount"`
	Index         string `json:"index"`
}

type ActionType

type ActionType string
const (
	OkLinkActionNormal   ActionType = "normal"
	OkLinkActionInternal ActionType = "internal"
	OkLinkActionToken    ActionType = "token"
	OkLinkActionUtxo     ActionType = "utxo"

	EtherscanActionTxList         ActionType = "txlist"
	EtherscanActionTxListInternal ActionType = "txlistinternal"
	EtherscanActionTokenTx        ActionType = "tokentx"
	EtherscanActionTokenNftTx     ActionType = "tokennfttx"
	EtherscanActionToken1155Tx    ActionType = "token1155tx"

	SolScanActionSol ActionType = "sol"
	SolScanActionSpl ActionType = "spl"
)

type IsFromToType

type IsFromToType string
const (
	From IsFromToType = "from"
	To   IsFromToType = "to"
)

type PageRequest

type PageRequest struct {
	Page  uint64 `json:"page"`
	Limit uint64 `json:"limit"`
}

type ProtocolType

type ProtocolType string
const (
	ProtocolTypeToken20   ProtocolType = "token_20"
	ProtocolTypeToken721  ProtocolType = "token_721"
	ProtocolTypeToken1155 ProtocolType = "token_1155"
)

type TransactionResponse

type TransactionResponse[T any] struct {
	chain.PageResponse
	TransactionList []T `json:"transactionList"`
}

Jump to

Keyboard shortcuts

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