mvpro

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

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
)

Variables

View Source
var (
	SdkVersion    = "0.18.0"
	DefaultClient = NewClient("https://api.mvpro.io", nil)
)
View Source
var (
	NewAddress       = mavryk.MustParseAddress
	ParseAddress     = mavryk.ParseAddress
	NewPoolAddres    = defi.MustParsePoolAddress
	ParsePoolAddress = defi.ParsePoolAddress
	NewToken         = mavryk.MustParseToken
	NewQuery         = client.NewQuery
	IsErrApi         = client.IsErrApi
	IsErrHttp        = client.IsErrHttp
	IsErrRateLimited = client.IsErrRateLimited
	ErrorStatus      = client.ErrorStatus

	NoQuery = NewQuery()
)

Functions

This section is empty.

Types

type Address

type Address = mavryk.Address

type AddressType

type AddressType = mavryk.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

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

func (Client) CacheGet

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

func (Client) Retries

func (s Client) Retries() int

func (Client) RetryDelay

func (s Client) RetryDelay() time.Duration

func (*Client) UseScriptCache

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

func (*Client) WithApiKey

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

func (*Client) WithCacheSize

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

func (*Client) WithHeader

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

func (*Client) WithIpfsUrl

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

func (*Client) WithLogger

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

func (*Client) WithMarketUrl

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

func (*Client) WithRetry

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

func (*Client) WithTLS

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

func (*Client) WithTimeout

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

func (*Client) WithUserAgent

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

type ErrApi

type ErrApi = client.ErrApi

type ErrHttp

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

type Key = mavryk.Key

type OrderType

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

type PoolAddress

type PoolAddress = defi.PoolAddress

type Query

type Query = client.Query

func And

func And(key string) Query

func Arg

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

func Asc

func Asc() Query

func Desc

func Desc() Query

func Equal

func Equal(key string, val any) Query

func Filter

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

func Gt

func Gt(key string, val any) Query

func Gte

func Gte(key string, val any) Query

func In

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

func Lt

func Lt(key string, val any) Query

func Lte

func Lte(key string, val any) Query

func Not

func Not(key string) Query

func NotEqual

func NotEqual(key string, val any) Query

func NotIn

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

func Range

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

func Regexp

func Regexp(key string, re string) Query

func WithCursor

func WithCursor(v uint64) Query

func WithFrom

func WithFrom(t time.Time) Query

func WithLimit

func WithLimit(v uint) Query

func WithMerge

func WithMerge() Query

func WithMeta

func WithMeta() Query

func WithOffset

func WithOffset(v uint) Query

func WithOrder

func WithOrder(o OrderType) Query

func WithPrim

func WithPrim() Query

func WithRights

func WithRights() Query

func WithStorage

func WithStorage() Query

func WithTags

func WithTags(t ...string) Query

func WithTimeRange

func WithTimeRange(from, to time.Time) Query

func WithTo

func WithTo(t time.Time) Query

func WithUnpack

func WithUnpack() Query

type Token

type Token = mavryk.Token

type Z

type Z = mavryk.Z

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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