v0.18.1 Latest Latest

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 16 Imported by: 1




View Source
const (
	Collapse1m = time.Minute
	Collapse1h = time.Hour
	Collapse1d = 24 * time.Hour
	Collapse1w = 7 * 24 * time.Hour
View Source
const (
	OpTypeBake                 = index.OpTypeBake
	OpTypeEndorsement          = index.OpTypeEndorsement
	OpTypeTransaction          = index.OpTypeTransaction
	OpTypeReveal               = index.OpTypeReveal
	OpTypeDelegation           = index.OpTypeDelegation
	OpTypeOrigination          = index.OpTypeOrigination
	OpTypeNonceRevelation      = index.OpTypeNonceRevelation
	OpTypeActivation           = index.OpTypeActivation
	OpTypeBallot               = index.OpTypeBallot
	OpTypeProposal             = index.OpTypeProposal
	OpTypeDoubleBaking         = index.OpTypeDoubleBaking
	OpTypeDoubleEndorsement    = index.OpTypeDoubleEndorsement
	OpTypeUnfreeze             = index.OpTypeUnfreeze
	OpTypeInvoice              = index.OpTypeInvoice
	OpTypeAirdrop              = index.OpTypeAirdrop
	OpTypeSeedSlash            = index.OpTypeSeedSlash
	OpTypeMigration            = index.OpTypeMigration
	OpTypeSubsidy              = index.OpTypeSubsidy
	OpTypeRegisterConstant     = index.OpTypeRegisterConstant
	OpTypePreendorsement       = index.OpTypePreendorsement
	OpTypeDoublePreendorsement = index.OpTypeDoublePreendorsement
	OpTypeDepositsLimit        = index.OpTypeDepositsLimit
	OpTypeDeposit              = index.OpTypeDeposit
	OpTypeBonus                = index.OpTypeBonus
	OpTypeReward               = index.OpTypeReward
	OpTypeRollupOrigination    = index.OpTypeRollupOrigination
	OpTypeRollupTransaction    = index.OpTypeRollupTransaction
	OpTypeVdfRevelation        = index.OpTypeVdfRevelation
	OpTypeIncreasePaidStorage  = index.OpTypeIncreasePaidStorage
	OpTypeDrainDelegate        = index.OpTypeDrainDelegate
	OpTypeUpdateConsensusKey   = index.OpTypeUpdateConsensusKey
	OpTypeTransferTicket       = index.OpTypeTransferTicket
	OpTypeBatch                = index.OpTypeBatch
	OpTypeInvalid              = index.OpTypeInvalid


View Source
var (
	SdkVersion    = "0.17.1"
	DefaultClient = NewClient("", nil)
View Source
var (
	NewAddress       = tezos.MustParseAddress
	ParseAddress     = tezos.ParseAddress
	NewPoolAddres    = defi.MustParsePoolAddress
	ParsePoolAddress = defi.ParsePoolAddress
	NewToken         = tezos.MustParseToken
	NewQuery         = client.NewQuery
	IsErrApi         = client.IsErrApi
	IsErrHttp        = client.IsErrHttp
	IsErrRateLimited = client.IsErrRateLimited
	ErrorStatus      = client.ErrorStatus

	NoQuery = NewQuery()


This section is empty.


type Address added in v0.17.2

type Address = tezos.Address

type AddressType added in v0.17.2

type AddressType = tezos.AddressType

type Client

type Client struct {
	Account  index.AccountAPI
	Block    index.BlockAPI
	Baker    index.BakerAPI
	Contract index.ContractAPI
	Explorer index.ExplorerAPI
	Metadata index.MetadataAPI
	Op       index.OpAPI
	Stats    index.StatsAPI
	Dex      defi.DexAPI
	Farm     defi.FarmAPI
	Lend     defi.LendingAPI
	Nft      nft.NftAPI
	Token    token.TokenAPI
	Domain   identity.DomainAPI
	Profile  identity.ProfileAPI
	Wallet   wallet.WalletAPI
	Market   market.MarketAPI
	Ipfs     ipfs.IpfsAPI
	// contains filtered or unexported fields

func NewClient

func NewClient(url string, httpClient *http.Client) *Client

func (Client) CacheAdd added in v0.17.2

func (s Client) CacheAdd(key Address, val any)

func (Client) CacheGet added in v0.17.2

func (s Client) CacheGet(key Address) (any, bool)

func (Client) Retries added in v0.15.0

func (s Client) Retries() int

func (Client) RetryDelay added in v0.15.0

func (s Client) RetryDelay() time.Duration

func (*Client) UseScriptCache

func (s *Client) UseScriptCache(cache *lru.TwoQueueCache[Address, any])

func (*Client) WithApiKey added in v0.16.0

func (s *Client) WithApiKey(key string) *Client

func (*Client) WithCacheSize added in v0.15.0

func (s *Client) WithCacheSize(sz int) *Client

func (*Client) WithHeader added in v0.15.0

func (s *Client) WithHeader(key, value string) *Client

func (*Client) WithIpfsUrl added in v0.17.2

func (s *Client) WithIpfsUrl(url string) *Client

func (*Client) WithLogger added in v0.15.0

func (s *Client) WithLogger(log log.Logger) *Client

func (*Client) WithMarketUrl added in v0.15.0

func (s *Client) WithMarketUrl(url string) *Client

func (*Client) WithRetry added in v0.15.0

func (s *Client) WithRetry(num int, delay time.Duration) *Client

func (*Client) WithTLS

func (s *Client) WithTLS(tc *tls.Config) *Client

func (*Client) WithTimeout added in v0.15.0

func (s *Client) WithTimeout(d time.Duration) *Client

func (*Client) WithUserAgent added in v0.15.0

func (s *Client) WithUserAgent(agent string) *Client

type ErrApi added in v0.17.5

type ErrApi = client.ErrApi

type ErrHttp added in v0.17.5

type ErrHttp = client.ErrHttp

type ErrRateLimited

type ErrRateLimited = client.ErrRateLimited

type FillMode

type FillMode = client.FillMode
const (
	FillModeInvalid FillMode = ""
	FillModeNone    FillMode = "none"
	FillModeNull    FillMode = "null"
	FillModeLast    FillMode = "last"
	FillModeLinear  FillMode = "linear"
	FillModeZero    FillMode = "zero"

type FilterMode

type FilterMode = client.FilterMode
const (
	FilterModeEqual    FilterMode = "eq"
	FilterModeNotEqual FilterMode = "ne"
	FilterModeGt       FilterMode = "gt"
	FilterModeGte      FilterMode = "gte"
	FilterModeLt       FilterMode = "lt"
	FilterModeLte      FilterMode = "lte"
	FilterModeIn       FilterMode = "in"
	FilterModeNotIn    FilterMode = "nin"
	FilterModeRange    FilterMode = "rg"
	FilterModeRegexp   FilterMode = "re"

type FormatType

type FormatType = client.FormatType
const (
	FormatJSON FormatType = "json"
	FormatCSV  FormatType = "csv"

type Key added in v0.17.2

type Key = tezos.Key

type OrderType

type OrderType = client.OrderType
const (
	OrderAsc  OrderType = "asc"
	OrderDesc OrderType = "desc"

type PoolAddress added in v0.17.5

type PoolAddress = defi.PoolAddress

type Query added in v0.17.2

type Query = client.Query

func And added in v0.17.2

func And(key string) Query

func Arg added in v0.17.2

func Arg(key string, val ...any) Query

func Asc added in v0.17.2

func Asc() Query

func Desc added in v0.17.2

func Desc() Query

func Equal added in v0.17.2

func Equal(key string, val any) Query

func Filter

func Filter(key string, mode FilterMode, val ...any) Query

func Gt added in v0.17.2

func Gt(key string, val any) Query

func Gte added in v0.17.2

func Gte(key string, val any) Query

func In added in v0.17.2

func In(key string, val ...any) Query

func Lt added in v0.17.2

func Lt(key string, val any) Query

func Lte added in v0.17.2

func Lte(key string, val any) Query

func Not added in v0.17.2

func Not(key string) Query

func NotEqual added in v0.17.2

func NotEqual(key string, val any) Query

func NotIn added in v0.17.2

func NotIn(key string, val ...any) Query

func Range added in v0.17.2

func Range(key string, from, to any) Query

func Regexp added in v0.17.2

func Regexp(key string, re string) Query

func WithCursor added in v0.17.2

func WithCursor(v uint64) Query

func WithFrom added in v0.17.2

func WithFrom(t time.Time) Query

func WithLimit added in v0.17.2

func WithLimit(v uint) Query

func WithMerge added in v0.17.2

func WithMerge() Query

func WithMeta added in v0.17.2

func WithMeta() Query

func WithOffset added in v0.17.2

func WithOffset(v uint) Query

func WithOrder added in v0.17.2

func WithOrder(o OrderType) Query

func WithPrim added in v0.17.2

func WithPrim() Query

func WithRights added in v0.17.2

func WithRights() Query

func WithStorage added in v0.17.2

func WithStorage() Query

func WithTags added in v0.17.2

func WithTags(t ...string) Query

func WithTimeRange added in v0.17.2

func WithTimeRange(from, to time.Time) Query

func WithTo added in v0.17.2

func WithTo(t time.Time) Query

func WithUnpack added in v0.17.2

func WithUnpack() Query

type Token added in v0.15.0

type Token = tezos.Token

type Z added in v0.17.2

type Z = tezos.Z


Path Synopsis

Jump to

Keyboard shortcuts

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