balances

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: 7 Imported by: 0

Documentation

Overview

Package balances 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 AggregatedBalancesAndAllowancesResponse

type AggregatedBalancesAndAllowancesResponse = []struct {
	// Address Token contract address
	Address *string `json:"address,omitempty"`

	// Decimals Number of decimal places for the token
	Decimals *int `json:"decimals,omitempty"`

	// IsCustom Indicates if the token is custom or not
	IsCustom *bool `json:"isCustom,omitempty"`

	// LogoURI URL to the token logo image
	LogoURI *string `json:"logoURI,omitempty"`

	// Name Name of the token
	Name *string `json:"name,omitempty"`

	// Symbol Symbol of the token
	Symbol *string `json:"symbol,omitempty"`

	// Tags Additional tags for the token
	Tags *[]string `json:"tags,omitempty"`

	// Tracked Indicates if the token is tracked or not
	Tracked *bool `json:"tracked,omitempty"`

	// Type Type of token (e.g., 'ethereum', 'token')
	Type *string `json:"type,omitempty"`

	// Wallets Token balances and allowances for specific wallets
	Wallets *map[string]struct {
		// Allowance Allowance of the token for the wallet
		Allowance *string `json:"allowance,omitempty"`

		// Balance Balance of the token for the wallet
		Balance *string `json:"balance,omitempty"`
	} `json:"wallets,omitempty"`
}

AggregatedBalancesAndAllowancesResponse defines model for AggregatedBalancesAndAllowancesResponse.

type AllowancesByWalletAddressParams

type AllowancesByWalletAddressParams struct {
	Wallet  string `json:"-"`
	Spender string `json:"-"`
}

AllowancesByWalletAddressParams is used instead of codegen struct to right now as params for API handle

func (*AllowancesByWalletAddressParams) Validate

func (params *AllowancesByWalletAddressParams) Validate() error

type AllowancesByWalletAddressResponse

type AllowancesByWalletAddressResponse map[string]string

AllowancesByWalletAddressResponse is used instead of codegen struct to right now as params for API handle

type AllowancesOfCustomTokensByWalletAddressParams

type AllowancesOfCustomTokensByWalletAddressParams struct {
	Wallet  string   `json:"-"`
	Spender string   `json:"-"`
	Tokens  []string `url:"tokens" json:"tokens"`
}

AllowancesOfCustomTokensByWalletAddressParams is used instead of codegen struct to right now as params for API handle

func (*AllowancesOfCustomTokensByWalletAddressParams) Validate

type AllowancesOfCustomTokensByWalletAddressResponse

type AllowancesOfCustomTokensByWalletAddressResponse map[string]string

AllowancesOfCustomTokensByWalletAddressResponse is used instead of codegen struct to right now as params for API handle

type BalancesAndAllowancesByWalletAddressListParams

type BalancesAndAllowancesByWalletAddressListParams struct {
	Wallet  string `json:"-"`
	Spender string `json:"-"`
}

BalancesAndAllowancesByWalletAddressListParams is used instead of codegen struct to right now as params for API handle

func (*BalancesAndAllowancesByWalletAddressListParams) Validate

type BalancesAndAllowancesByWalletAddressListResponse

type BalancesAndAllowancesByWalletAddressListResponse map[string]TokenDetails

BalancesAndAllowancesByWalletAddressListResponse is used instead of codegen struct to right now as params for API handle

type BalancesAndAllowancesOfCustomTokensByWalletAddressParams

type BalancesAndAllowancesOfCustomTokensByWalletAddressParams struct {
	Wallet  string   `json:"-"`
	Spender string   `json:"-"`
	Tokens  []string `json:"tokens"`
}

BalancesAndAllowancesOfCustomTokensByWalletAddressParams is used instead of codegen struct to right now as params for API handle

func (*BalancesAndAllowancesOfCustomTokensByWalletAddressParams) Validate

type BalancesAndAllowancesOfCustomTokensByWalletAddressResponse

type BalancesAndAllowancesOfCustomTokensByWalletAddressResponse map[string]TokenDetails

BalancesAndAllowancesOfCustomTokensByWalletAddressResponse is used instead of codegen struct to right now as params for API handle

type BalancesAndAllowancesParams

type BalancesAndAllowancesParams struct {
	Wallets []string `url:"wallets" json:"wallets"`

	// Will filter tokens with 0 balances from response
	FilterEmpty bool `url:"filterEmpty" json:"filterEmpty"`

	Spender string
}

BalancesAndAllowancesParams is used instead of codegen struct to right now as params for API handle

func (*BalancesAndAllowancesParams) Validate

func (params *BalancesAndAllowancesParams) Validate() error

type BalancesByWalletAddressParams

type BalancesByWalletAddressParams struct {
	Wallet string `url:"wallets" json:"walletAddress"`
}

BalancesByWalletAddressParams is used instead of codegen struct to right now as params for API handle

func (*BalancesByWalletAddressParams) Validate

func (params *BalancesByWalletAddressParams) Validate() error

type BalancesByWalletAddressResponse

type BalancesByWalletAddressResponse map[string]string

BalancesByWalletAddressResponse is used instead of codegen struct to right now as params for API handle

type BalancesOfCustomTokensByWalletAddressParams

type BalancesOfCustomTokensByWalletAddressParams struct {
	Wallet string   `url:"wallets" json:"-"`
	Tokens []string `url:"tokens" json:"tokens"`
}

BalancesOfCustomTokensByWalletAddressParams is used instead of codegen struct to right now as params for API handle

func (*BalancesOfCustomTokensByWalletAddressParams) Validate

type BalancesOfCustomTokensByWalletAddressResponse

type BalancesOfCustomTokensByWalletAddressResponse map[string]string

BalancesOfCustomTokensByWalletAddressResponse is used instead of codegen struct to right now as params for API handle

type BalancesOfCustomTokensByWalletAddressesListParams

type BalancesOfCustomTokensByWalletAddressesListParams struct {
	Wallets []string `url:"wallets" json:"wallets"`
	Tokens  []string `url:"tokens" json:"tokens"`
}

BalancesOfCustomTokensByWalletAddressesListParams is used instead of codegen struct to right now as params for API handle

func (*BalancesOfCustomTokensByWalletAddressesListParams) Validate

type BalancesOfCustomTokensByWalletAddressesListResponse

type BalancesOfCustomTokensByWalletAddressesListResponse map[string]map[string]string

BalancesOfCustomTokensByWalletAddressesListResponse is used instead of codegen struct to right now as params for API handle

type ChainV12ControllerGetBalancesByMultipleWalletsJSONRequestBody

type ChainV12ControllerGetBalancesByMultipleWalletsJSONRequestBody = CustomTokensAndWalletsRequest

ChainV12ControllerGetBalancesByMultipleWalletsJSONRequestBody defines body for ChainV12ControllerGetBalancesByMultipleWallets for application/json ContentType.

type ChainV12ControllerGetCustomAllowancesAndBalancesJSONRequestBody

type ChainV12ControllerGetCustomAllowancesAndBalancesJSONRequestBody = CustomTokensRequest

ChainV12ControllerGetCustomAllowancesAndBalancesJSONRequestBody defines body for ChainV12ControllerGetCustomAllowancesAndBalances for application/json ContentType.

type ChainV12ControllerGetCustomAllowancesJSONRequestBody

type ChainV12ControllerGetCustomAllowancesJSONRequestBody = CustomTokensRequest

ChainV12ControllerGetCustomAllowancesJSONRequestBody defines body for ChainV12ControllerGetCustomAllowances for application/json ContentType.

type ChainV12ControllerGetCustomBalancesJSONRequestBody

type ChainV12ControllerGetCustomBalancesJSONRequestBody = CustomTokensRequest

ChainV12ControllerGetCustomBalancesJSONRequestBody defines body for ChainV12ControllerGetCustomBalances for application/json ContentType.

type Client

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

func NewClient

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

func (*Client) GetAllowancesByWalletAddress

func (api *Client) GetAllowancesByWalletAddress(ctx context.Context, params AllowancesByWalletAddressParams) (*AllowancesByWalletAddressResponse, error)

GetBalancesByWalletAddress Get allowances of tokens by spender for walletAddress

func (*Client) GetAllowancesOfCustomTokensByWalletAddress

func (api *Client) GetAllowancesOfCustomTokensByWalletAddress(ctx context.Context, params AllowancesOfCustomTokensByWalletAddressParams) (*AllowancesOfCustomTokensByWalletAddressResponse, error)

GetAllowancesOfCustomTokensByWalletAddress Get allowances of custom tokens by spender for walletAddress

func (*Client) GetBalancesAndAllowances

func (api *Client) GetBalancesAndAllowances(ctx context.Context, params BalancesAndAllowancesParams) (*AggregatedBalancesAndAllowancesResponse, error)

GetBalancesAndAllowances Get balances and allowances by spender for list of EVM addresses

func (*Client) GetBalancesAndAllowancesByWalletAddressList

func (api *Client) GetBalancesAndAllowancesByWalletAddressList(ctx context.Context, params BalancesAndAllowancesByWalletAddressListParams) (*BalancesAndAllowancesByWalletAddressListResponse, error)

GetBalancesAndAllowancesByWalletAddressList Get balances and allowances of tokens by spender for walletAddress

func (*Client) GetBalancesAndAllowancesOfCustomTokensByWalletAddressList

func (api *Client) GetBalancesAndAllowancesOfCustomTokensByWalletAddressList(ctx context.Context, params BalancesAndAllowancesOfCustomTokensByWalletAddressParams) (*BalancesAndAllowancesOfCustomTokensByWalletAddressResponse, error)

GetBalancesAndAllowancesOfCustomTokensByWalletAddressList Get balances and allowances of custom tokens by spender for walletAddress

func (*Client) GetBalancesByWalletAddress

func (api *Client) GetBalancesByWalletAddress(ctx context.Context, params BalancesByWalletAddressParams) (*BalancesByWalletAddressResponse, error)

GetBalancesByWalletAddress Get balances of tokens for walletAddress for examples token list (1inch tokens list)

func (*Client) GetBalancesOfCustomTokensByWalletAddress

func (api *Client) GetBalancesOfCustomTokensByWalletAddress(ctx context.Context, params BalancesOfCustomTokensByWalletAddressParams) (*BalancesOfCustomTokensByWalletAddressResponse, error)

GetBalancesOfCustomTokensByWalletAddress Get balances of custom tokens for walletAddress Takes wallet address and provided tokens and provides balances of each token

func (*Client) GetBalancesOfCustomTokensByWalletAddressesList

func (api *Client) GetBalancesOfCustomTokensByWalletAddressesList(ctx context.Context, params BalancesOfCustomTokensByWalletAddressesListParams) (*BalancesOfCustomTokensByWalletAddressesListResponse, error)

GetBalancesOfCustomTokensByWalletAddress Get balances of custom tokens for list of wallets addresses

type Configuration

type Configuration struct {
	ApiKey string
	ApiURL string
	API    api
}

func NewConfiguration

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

type ConfigurationParams

type ConfigurationParams struct {
	ChainId uint64
	ApiUrl  string
	ApiKey  string
}

type CustomTokensAndWalletsRequest

type CustomTokensAndWalletsRequest struct {
	// Tokens List of custom tokens
	Tokens []string `json:"tokens"`

	// Wallets List of wallets
	Wallets []string `json:"wallets"`
}

CustomTokensAndWalletsRequest defines model for CustomTokensAndWalletsRequest.

type CustomTokensRequest

type CustomTokensRequest struct {
	// Tokens List of custom tokens
	Tokens []string `json:"tokens"`
}

CustomTokensRequest defines model for CustomTokensRequest.

type GetAggregatedBalancesAndAllowancesParams

type GetAggregatedBalancesAndAllowancesParams struct {
	Wallets     []string `url:"wallets" json:"wallets"`
	FilterEmpty bool     `url:"filterEmpty" json:"filterEmpty"`
}

GetAggregatedBalancesAndAllowancesParams defines parameters for GetAggregatedBalancesAndAllowances.

type TokenDetails

type TokenDetails struct {
	Balance   string `json:"balance"`
	Allowance string `json:"allowance"`
}

TokenDetails holds balances and allowance for an Ethereum address (token)

Jump to

Keyboard shortcuts

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