vektor

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameApSeo1 = shared.RegionNameApSeo1

Equals "ap-seo-1"

View Source
const RegionNameApSin1 = shared.RegionNameApSin1

Equals "ap-sin-1"

View Source
const RegionNameApTyo1 = shared.RegionNameApTyo1

Equals "ap-tyo-1"

View Source
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

Equals "eu-frk-1"

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

Equals "us-chi-1"

View Source
const RegionNameUsSea1 = shared.RegionNameUsSea1

Equals "us-sea-1"

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

Equals "us-sva-1"

View Source
const RegionNameUsSva2 = shared.RegionNameUsSva2

Equals "us-sva-2"

View Source
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

Equals "us-wdc-1"

View Source
const ResourceStatusCreating = shared.ResourceStatusCreating

Equals "creating"

View Source
const ResourceStatusDeleted = shared.ResourceStatusDeleted

Equals "deleted"

View Source
const ResourceStatusDeleting = shared.ResourceStatusDeleting

Equals "deleting"

View Source
const ResourceStatusError = shared.ResourceStatusError

Equals "error"

View Source
const ResourceStatusPending = shared.ResourceStatusPending

Equals "pending"

View Source
const ResourceStatusReady = shared.ResourceStatusReady

Equals "ready"

View Source
const ResourceStatusUpdating = shared.ResourceStatusUpdating

Equals "updating"

Variables

This section is empty.

Functions

This section is empty.

Types

type APY

type APY struct {
	// An arbitrary precision decimal represented as a string
	APY Decimal `json:"apy,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// APY Type
	//
	// Any of "fixed", "variable".
	Type APYType `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		APY         respjson.Field
		Asset       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

APY Data

func (APY) RawJSON

func (r APY) RawJSON() string

Returns the unmodified JSON received from the API

func (*APY) UnmarshalJSON

func (r *APY) UnmarshalJSON(data []byte) error

type APYType

type APYType string

APY Type

const (
	APYTypeFixed    APYType = "fixed"
	APYTypeVariable APYType = "variable"
)

type Account

type Account = string

type AddressEVM

type AddressEVM = string

type Asset

type Asset struct {
	// An asset ID, represented as a TypeID with `asset` prefix
	ID AssetID `json:"id,required"`
	// An EVM address
	Address string `json:"address,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// Asset's decimal places
	Decimals int64 `json:"decimals,required"`
	// Asset's name
	Name string `json:"name,required"`
	// Asset's symbol
	Symbol string `json:"symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Address     respjson.Field
		Blockchain  respjson.Field
		Decimals    respjson.Field
		Name        respjson.Field
		Symbol      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

On-chain asset (aka token)

func (Asset) RawJSON

func (r Asset) RawJSON() string

Returns the unmodified JSON received from the API

func (*Asset) UnmarshalJSON

func (r *Asset) UnmarshalJSON(data []byte) error

type AssetID

type AssetID = string

type AssetIDOrAddressEVMOrAssetSymbol

type AssetIDOrAddressEVMOrAssetSymbol = string

type AssetSymbol

type AssetSymbol = string

type Balance

type Balance struct {
	// An EVM address
	Account AddressEVM `json:"account,required"`
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	AssetID AssetID `json:"asset_id,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	Value Decimal `json:"value,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account          respjson.Field
		Amount           respjson.Field
		AssetID          respjson.Field
		Blockstamp       respjson.Field
		Value            respjson.Field
		QuoteAssetSymbol respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Balance properties

func (Balance) RawJSON

func (r Balance) RawJSON() string

Returns the unmodified JSON received from the API

func (*Balance) UnmarshalJSON

func (r *Balance) UnmarshalJSON(data []byte) error

type BalanceListHistoricalParams

type BalanceListHistoricalParams struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (BalanceListHistoricalParams) MarshalJSON

func (r BalanceListHistoricalParams) MarshalJSON() (data []byte, err error)

func (*BalanceListHistoricalParams) UnmarshalJSON

func (r *BalanceListHistoricalParams) UnmarshalJSON(data []byte) error

type BalanceListHistoricalResponse

type BalanceListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange              `json:"historical,required"`
	Items      []BalanceListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BalanceListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BalanceListHistoricalResponse) UnmarshalJSON

func (r *BalanceListHistoricalResponse) UnmarshalJSON(data []byte) error

type BalanceListHistoricalResponseItem

type BalanceListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// Array of Balance
	Items []Balance `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BalanceListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*BalanceListHistoricalResponseItem) UnmarshalJSON

func (r *BalanceListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type BalanceListParams

type BalanceListParams struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At BalanceListParamsAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

func (BalanceListParams) MarshalJSON

func (r BalanceListParams) MarshalJSON() (data []byte, err error)

func (*BalanceListParams) UnmarshalJSON

func (r *BalanceListParams) UnmarshalJSON(data []byte) error

type BalanceListParamsAtUnion

type BalanceListParamsAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BalanceListParamsAtUnion) MarshalJSON

func (u BalanceListParamsAtUnion) MarshalJSON() ([]byte, error)

func (*BalanceListParamsAtUnion) UnmarshalJSON

func (u *BalanceListParamsAtUnion) UnmarshalJSON(data []byte) error

type BalanceListResponse

type BalanceListResponse struct {
	// Array of Balance
	Items []Balance `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BalanceListResponse) RawJSON

func (r BalanceListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BalanceListResponse) UnmarshalJSON

func (r *BalanceListResponse) UnmarshalJSON(data []byte) error

type BalanceService

type BalanceService struct {
	Options []option.RequestOption
}

BalanceService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBalanceService method instead.

func NewBalanceService

func NewBalanceService(opts ...option.RequestOption) (r BalanceService)

NewBalanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BalanceService) List

List balances for a given set of assets and addresses

func (*BalanceService) ListHistorical

List balances for a given set of assets and addresses

type BlockNumber

type BlockNumber = int64

type Blockchain

type Blockchain struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	ID BlockchainID `json:"id,required"`
	// Data about an EVM blockchain
	ChainData EVMChainData `json:"chain_data,required"`
	// Blockchain ecosystem
	//
	// Any of "evm".
	ChainType ChainType `json:"chain_type,required"`
	// The blockchain's explorer URL
	ExplorerURL string `json:"explorer_url,required"`
	// BlockchainName
	Name BlockchainName `json:"name,required"`
	// Blockchain's network
	Network NetworkName `json:"network,required"`
	// A blockchain symbol
	Symbol BlockchainSymbol `json:"symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ChainData   respjson.Field
		ChainType   respjson.Field
		ExplorerURL respjson.Field
		Name        respjson.Field
		Network     respjson.Field
		Symbol      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Data about a blockchain

func (Blockchain) RawJSON

func (r Blockchain) RawJSON() string

Returns the unmodified JSON received from the API

func (*Blockchain) UnmarshalJSON

func (r *Blockchain) UnmarshalJSON(data []byte) error

type BlockchainID

type BlockchainID = string

type BlockchainIDOrBlockchainSymbol

type BlockchainIDOrBlockchainSymbol = string

type BlockchainName

type BlockchainName = string

type BlockchainSymbol

type BlockchainSymbol = string

type Blockstamp

type Blockstamp struct {
	// A block number
	BlockNumber BlockNumber `json:"block_number,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// ISO8601 Timestamp
	Timestamp Timestamp `json:"timestamp,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BlockNumber respjson.Field
		Blockchain  respjson.Field
		Timestamp   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Information about a specific block number and its timestamp

func (Blockstamp) RawJSON

func (r Blockstamp) RawJSON() string

Returns the unmodified JSON received from the API

func (*Blockstamp) UnmarshalJSON

func (r *Blockstamp) UnmarshalJSON(data []byte) error

type BorrowAccount

type BorrowAccount struct {
	// An EVM address
	Account Account `json:"account,required"`
	// An arbitrary precision decimal represented as a string
	AvailableBorrow Decimal `json:"available_borrow,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	HealthFactor Decimal `json:"health_factor,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	TotalCollateral Decimal `json:"total_collateral,required"`
	// An arbitrary precision decimal represented as a string
	TotalDebt Decimal `json:"total_debt,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account          respjson.Field
		AvailableBorrow  respjson.Field
		Blockstamp       respjson.Field
		HealthFactor     respjson.Field
		QuoteAssetSymbol respjson.Field
		TotalCollateral  respjson.Field
		TotalDebt        respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A borrow account

func (BorrowAccount) RawJSON

func (r BorrowAccount) RawJSON() string

Returns the unmodified JSON received from the API

func (*BorrowAccount) UnmarshalJSON

func (r *BorrowAccount) UnmarshalJSON(data []byte) error

type BorrowAccountListHistoricalParams

type BorrowAccountListHistoricalParams struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (BorrowAccountListHistoricalParams) MarshalJSON

func (r BorrowAccountListHistoricalParams) MarshalJSON() (data []byte, err error)

func (*BorrowAccountListHistoricalParams) UnmarshalJSON

func (r *BorrowAccountListHistoricalParams) UnmarshalJSON(data []byte) error

type BorrowAccountListHistoricalResponse

type BorrowAccountListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange                    `json:"historical,required"`
	Items      []BorrowAccountListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowAccountListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BorrowAccountListHistoricalResponse) UnmarshalJSON

func (r *BorrowAccountListHistoricalResponse) UnmarshalJSON(data []byte) error

type BorrowAccountListHistoricalResponseItem

type BorrowAccountListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of borrow accounts
	Items []BorrowAccount `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowAccountListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*BorrowAccountListHistoricalResponseItem) UnmarshalJSON

func (r *BorrowAccountListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type BorrowAccountListParams

type BorrowAccountListParams struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At BorrowAccountListParamsAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

func (BorrowAccountListParams) MarshalJSON

func (r BorrowAccountListParams) MarshalJSON() (data []byte, err error)

func (*BorrowAccountListParams) UnmarshalJSON

func (r *BorrowAccountListParams) UnmarshalJSON(data []byte) error

type BorrowAccountListParamsAtUnion

type BorrowAccountListParamsAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BorrowAccountListParamsAtUnion) MarshalJSON

func (u BorrowAccountListParamsAtUnion) MarshalJSON() ([]byte, error)

func (*BorrowAccountListParamsAtUnion) UnmarshalJSON

func (u *BorrowAccountListParamsAtUnion) UnmarshalJSON(data []byte) error

type BorrowAccountListResponse

type BorrowAccountListResponse struct {
	// A list of borrow accounts
	Items []BorrowAccount `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowAccountListResponse) RawJSON

func (r BorrowAccountListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BorrowAccountListResponse) UnmarshalJSON

func (r *BorrowAccountListResponse) UnmarshalJSON(data []byte) error

type BorrowAccountService

type BorrowAccountService struct {
	Options []option.RequestOption
}

BorrowAccountService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowAccountService method instead.

func NewBorrowAccountService

func NewBorrowAccountService(opts ...option.RequestOption) (r BorrowAccountService)

NewBorrowAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BorrowAccountService) List

Get account-level borrow info on specified accounts

func (*BorrowAccountService) ListHistorical

Get account-level borrow info on specified accounts

type BorrowBorrowNewParams added in v1.9.0

type BorrowBorrowNewParams struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// contains filtered or unexported fields
}

func (BorrowBorrowNewParams) MarshalJSON added in v1.9.0

func (r BorrowBorrowNewParams) MarshalJSON() (data []byte, err error)

func (*BorrowBorrowNewParams) UnmarshalJSON added in v1.9.0

func (r *BorrowBorrowNewParams) UnmarshalJSON(data []byte) error

type BorrowBorrowService added in v1.9.0

type BorrowBorrowService struct {
	Options []option.RequestOption
}

BorrowBorrowService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowBorrowService method instead.

func NewBorrowBorrowService added in v1.9.0

func NewBorrowBorrowService(opts ...option.RequestOption) (r BorrowBorrowService)

NewBorrowBorrowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BorrowBorrowService) New added in v1.9.0

Borrow an asset

type BorrowMarket

type BorrowMarket struct {
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	ID LendBorrowMarketID `json:"id,required"`
	// APY Data for lend/borrow markets
	APYs LendBorrowAPYs `json:"apys,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	Liquidity Decimal `json:"liquidity,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	TotalDebt Decimal `json:"total_debt,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		APYs             respjson.Field
		Asset            respjson.Field
		Blockstamp       respjson.Field
		Liquidity        respjson.Field
		QuoteAssetSymbol respjson.Field
		TotalDebt        respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A borrow market

func (BorrowMarket) RawJSON

func (r BorrowMarket) RawJSON() string

Returns the unmodified JSON received from the API

func (*BorrowMarket) UnmarshalJSON

func (r *BorrowMarket) UnmarshalJSON(data []byte) error

type BorrowMarketListHistoricalParams

type BorrowMarketListHistoricalParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow markets by venues and assets
	OfHistoricalBorrowMarketsByVenuesAssetsRequest *BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow markets by IDs
	OfHistoricalBorrowMarketsByIDsRequest *BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest `json:",inline"`
	// contains filtered or unexported fields
}

func (BorrowMarketListHistoricalParams) MarshalJSON

func (u BorrowMarketListHistoricalParams) MarshalJSON() ([]byte, error)

func (*BorrowMarketListHistoricalParams) UnmarshalJSON

func (r *BorrowMarketListHistoricalParams) UnmarshalJSON(data []byte) error

type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest

type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow markets by IDs

The properties Blockchain, From, MarketIDs, To are required.

func (BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest) MarshalJSON

func (*BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByIDsRequest) UnmarshalJSON

type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest

type BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow markets by venues and assets

The properties Assets, Blockchain, From, To, Venues are required.

func (BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest) MarshalJSON

func (*BorrowMarketListHistoricalParamsBodyHistoricalBorrowMarketsByVenuesAssetsRequest) UnmarshalJSON

type BorrowMarketListHistoricalResponse

type BorrowMarketListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange                   `json:"historical,required"`
	Items      []BorrowMarketListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowMarketListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BorrowMarketListHistoricalResponse) UnmarshalJSON

func (r *BorrowMarketListHistoricalResponse) UnmarshalJSON(data []byte) error

type BorrowMarketListHistoricalResponseItem

type BorrowMarketListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of borrow markets
	Items []BorrowMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowMarketListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*BorrowMarketListHistoricalResponseItem) UnmarshalJSON

func (r *BorrowMarketListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type BorrowMarketListParams

type BorrowMarketListParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow markets by venues and assets
	OfBorrowMarketsByVenuesAssetsRequestInput *BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow markets by IDs
	OfBorrowMarketsByIDsRequestInput *BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (BorrowMarketListParams) MarshalJSON

func (u BorrowMarketListParams) MarshalJSON() ([]byte, error)

func (*BorrowMarketListParams) UnmarshalJSON

func (r *BorrowMarketListParams) UnmarshalJSON(data []byte) error

type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput

type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow markets by IDs

The properties Blockchain, MarketIDs are required.

func (BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput) MarshalJSON

func (*BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInput) UnmarshalJSON

type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion

type BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion) MarshalJSON

func (*BorrowMarketListParamsBodyBorrowMarketsByIDsRequestInputAtUnion) UnmarshalJSON

type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput

type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow markets by venues and assets

The properties Assets, Blockchain, Venues are required.

func (BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput) MarshalJSON

func (*BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInput) UnmarshalJSON

type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion

type BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion) MarshalJSON

func (*BorrowMarketListParamsBodyBorrowMarketsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON

type BorrowMarketListResponse

type BorrowMarketListResponse struct {
	// A list of borrow markets
	Items []BorrowMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowMarketListResponse) RawJSON

func (r BorrowMarketListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BorrowMarketListResponse) UnmarshalJSON

func (r *BorrowMarketListResponse) UnmarshalJSON(data []byte) error

type BorrowMarketService

type BorrowMarketService struct {
	Options []option.RequestOption
}

BorrowMarketService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowMarketService method instead.

func NewBorrowMarketService

func NewBorrowMarketService(opts ...option.RequestOption) (r BorrowMarketService)

NewBorrowMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BorrowMarketService) List

Get the current market rates for borrowing an asset

func (*BorrowMarketService) ListHistorical

Get the current market rates for borrowing an asset

type BorrowPosition

type BorrowPosition struct {
	// An EVM address
	Account Account `json:"account,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	DebtAmount Decimal `json:"debt_amount,required"`
	// A borrow market
	Market BorrowMarket `json:"market,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account          respjson.Field
		Blockstamp       respjson.Field
		DebtAmount       respjson.Field
		Market           respjson.Field
		QuoteAssetSymbol respjson.Field
		Value            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A borrow position

func (BorrowPosition) RawJSON

func (r BorrowPosition) RawJSON() string

Returns the unmodified JSON received from the API

func (*BorrowPosition) UnmarshalJSON

func (r *BorrowPosition) UnmarshalJSON(data []byte) error

type BorrowPositionListHistoricalParams

type BorrowPositionListHistoricalParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow positions by venues and assets
	OfHistoricalBorrowPositionsByVenuesAssetsRequest *BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow positions by IDs
	OfHistoricalBorrowPositionsByIDsRequest *BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest `json:",inline"`
	// contains filtered or unexported fields
}

func (BorrowPositionListHistoricalParams) MarshalJSON

func (u BorrowPositionListHistoricalParams) MarshalJSON() ([]byte, error)

func (*BorrowPositionListHistoricalParams) UnmarshalJSON

func (r *BorrowPositionListHistoricalParams) UnmarshalJSON(data []byte) error

type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest

type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow positions by IDs

The properties Blockchain, From, MarketIDs, To are required.

func (BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest) MarshalJSON

func (*BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByIDsRequest) UnmarshalJSON

type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest

type BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow positions by venues and assets

The properties Accounts, Assets, Blockchain, From, To, Venues are required.

func (BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest) MarshalJSON

func (*BorrowPositionListHistoricalParamsBodyHistoricalBorrowPositionsByVenuesAssetsRequest) UnmarshalJSON

type BorrowPositionListHistoricalResponse

type BorrowPositionListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange                     `json:"historical,required"`
	Items      []BorrowPositionListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowPositionListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BorrowPositionListHistoricalResponse) UnmarshalJSON

func (r *BorrowPositionListHistoricalResponse) UnmarshalJSON(data []byte) error

type BorrowPositionListHistoricalResponseItem

type BorrowPositionListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of borrow positions
	Items []BorrowPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowPositionListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*BorrowPositionListHistoricalResponseItem) UnmarshalJSON

func (r *BorrowPositionListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type BorrowPositionListParams

type BorrowPositionListParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow positions by venues and assets
	OfBorrowPositionsByVenuesAssetsRequestInput *BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying borrow positions by IDs
	OfBorrowPositionsByIDsRequestInput *BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (BorrowPositionListParams) MarshalJSON

func (u BorrowPositionListParams) MarshalJSON() ([]byte, error)

func (*BorrowPositionListParams) UnmarshalJSON

func (r *BorrowPositionListParams) UnmarshalJSON(data []byte) error

type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput

type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow positions by IDs

The properties Blockchain, MarketIDs are required.

func (BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput) MarshalJSON

func (*BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInput) UnmarshalJSON

type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion

type BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion) MarshalJSON

func (*BorrowPositionListParamsBodyBorrowPositionsByIDsRequestInputAtUnion) UnmarshalJSON

type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput

type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying borrow positions by venues and assets

The properties Accounts, Assets, Blockchain, Venues are required.

func (BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput) MarshalJSON

func (*BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInput) UnmarshalJSON

type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion

type BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion) MarshalJSON

func (*BorrowPositionListParamsBodyBorrowPositionsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON

type BorrowPositionListResponse

type BorrowPositionListResponse struct {
	// A list of borrow positions
	Items []BorrowPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BorrowPositionListResponse) RawJSON

func (r BorrowPositionListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BorrowPositionListResponse) UnmarshalJSON

func (r *BorrowPositionListResponse) UnmarshalJSON(data []byte) error

type BorrowPositionService

type BorrowPositionService struct {
	Options []option.RequestOption
}

BorrowPositionService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowPositionService method instead.

func NewBorrowPositionService

func NewBorrowPositionService(opts ...option.RequestOption) (r BorrowPositionService)

NewBorrowPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BorrowPositionService) List

Get info on borrowed positions

func (*BorrowPositionService) ListHistorical

Get info on borrowed positions

type BorrowRepayNewParams added in v1.10.0

type BorrowRepayNewParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	MarketID LendBorrowMarketID `json:"market_id,required"`
	// An arbitrary precision decimal represented as a string
	Amount param.Opt[string] `json:"amount,omitzero"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset param.Opt[AssetID] `json:"asset,omitzero"`
	// contains filtered or unexported fields
}

func (BorrowRepayNewParams) MarshalJSON added in v1.10.0

func (r BorrowRepayNewParams) MarshalJSON() (data []byte, err error)

func (*BorrowRepayNewParams) UnmarshalJSON added in v1.10.0

func (r *BorrowRepayNewParams) UnmarshalJSON(data []byte) error

type BorrowRepayService added in v1.10.0

type BorrowRepayService struct {
	Options []option.RequestOption
}

BorrowRepayService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowRepayService method instead.

func NewBorrowRepayService added in v1.10.0

func NewBorrowRepayService(opts ...option.RequestOption) (r BorrowRepayService)

NewBorrowRepayService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BorrowRepayService) New added in v1.10.0

Repay to a borrow

type BorrowService

type BorrowService struct {
	Options   []option.RequestOption
	Markets   BorrowMarketService
	Positions BorrowPositionService
	Accounts  BorrowAccountService
	Borrow    BorrowBorrowService
	Repay     BorrowRepayService
}

BorrowService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBorrowService method instead.

func NewBorrowService

func NewBorrowService(opts ...option.RequestOption) (r BorrowService)

NewBorrowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type BridgeQuote

type BridgeQuote struct {
	// Estimated cost of an operation
	FeeEstimate BridgeQuoteFeeEstimate `json:"fee_estimate,required"`
	// An arbitrary precision decimal represented as a string
	ReceiveAmount Decimal `json:"receive_amount,required"`
	// On-chain asset (aka token)
	ReceiveAsset Asset `json:"receive_asset,required"`
	// Estimated time to receive the asset (in seconds)
	ReceiveTimeEst int64 `json:"receive_time_est,required"`
	// The route name
	Route string `json:"route,required"`
	// An arbitrary precision decimal represented as a string
	SendAmount Decimal `json:"send_amount,required"`
	// On-chain asset (aka token)
	SendAsset Asset `json:"send_asset,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FeeEstimate    respjson.Field
		ReceiveAmount  respjson.Field
		ReceiveAsset   respjson.Field
		ReceiveTimeEst respjson.Field
		Route          respjson.Field
		SendAmount     respjson.Field
		SendAsset      respjson.Field
		Venue          respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A bridge quote

func (BridgeQuote) RawJSON

func (r BridgeQuote) RawJSON() string

Returns the unmodified JSON received from the API

func (*BridgeQuote) UnmarshalJSON

func (r *BridgeQuote) UnmarshalJSON(data []byte) error

type BridgeQuoteFeeEstimate

type BridgeQuoteFeeEstimate struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// An arbitrary precision decimal represented as a string
	Cost string `json:"cost,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount           respjson.Field
		Asset            respjson.Field
		Cost             respjson.Field
		QuoteAssetSymbol respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Estimated cost of an operation

func (BridgeQuoteFeeEstimate) RawJSON

func (r BridgeQuoteFeeEstimate) RawJSON() string

Returns the unmodified JSON received from the API

func (*BridgeQuoteFeeEstimate) UnmarshalJSON

func (r *BridgeQuoteFeeEstimate) UnmarshalJSON(data []byte) error

type BridgeQuoteListParams

type BridgeQuoteListParams struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset symbol
	Asset AssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	FromBlockchain BlockchainIDOrBlockchainSymbol `json:"from_blockchain,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	ToBlockchain BlockchainIDOrBlockchainSymbol `json:"to_blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (BridgeQuoteListParams) MarshalJSON

func (r BridgeQuoteListParams) MarshalJSON() (data []byte, err error)

func (*BridgeQuoteListParams) UnmarshalJSON

func (r *BridgeQuoteListParams) UnmarshalJSON(data []byte) error

type BridgeQuoteListResponse

type BridgeQuoteListResponse struct {
	// A list of bridge quotes
	Items []BridgeQuote `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BridgeQuoteListResponse) RawJSON

func (r BridgeQuoteListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BridgeQuoteListResponse) UnmarshalJSON

func (r *BridgeQuoteListResponse) UnmarshalJSON(data []byte) error

type BridgeQuoteService

type BridgeQuoteService struct {
	Options []option.RequestOption
}

BridgeQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeQuoteService method instead.

func NewBridgeQuoteService

func NewBridgeQuoteService(opts ...option.RequestOption) (r BridgeQuoteService)

NewBridgeQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BridgeQuoteService) List

Get quotes for bridging an exact amount of an asset to another blockchain

type BridgeService

type BridgeService struct {
	Options []option.RequestOption
	Quotes  BridgeQuoteService
}

BridgeService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBridgeService method instead.

func NewBridgeService

func NewBridgeService(opts ...option.RequestOption) (r BridgeService)

NewBridgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type BuyBuyNewParams

type BuyBuyNewParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// An arbitrary precision decimal represented as a string
	ReceiveAmount Decimal `json:"receive_amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An arbitrary precision decimal represented as a string
	Slippage param.Opt[string] `json:"slippage,omitzero"`
	// contains filtered or unexported fields
}

func (BuyBuyNewParams) MarshalJSON

func (r BuyBuyNewParams) MarshalJSON() (data []byte, err error)

func (*BuyBuyNewParams) UnmarshalJSON

func (r *BuyBuyNewParams) UnmarshalJSON(data []byte) error

type BuyBuyService

type BuyBuyService struct {
	Options []option.RequestOption
}

BuyBuyService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBuyBuyService method instead.

func NewBuyBuyService

func NewBuyBuyService(opts ...option.RequestOption) (r BuyBuyService)

NewBuyBuyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BuyBuyService) New

func (r *BuyBuyService) New(ctx context.Context, body BuyBuyNewParams, opts ...option.RequestOption) (res *Execution, err error)

Buy an asset with another asset

type BuyQuote

type BuyQuote struct {
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// Estimated cost of an operation
	FeeEstimate BuyQuoteFeeEstimate `json:"fee_estimate,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// Quote info for buy quotes
	QuoteInfo BuyQuoteQuoteInfoUnion `json:"quote_info,required"`
	// An arbitrary precision decimal represented as a string
	QuoteValue string `json:"quote_value,required"`
	// An arbitrary precision decimal represented as a string
	ReceiveAmount Decimal `json:"receive_amount,required"`
	// On-chain asset (aka token)
	ReceiveAsset Asset `json:"receive_asset,required"`
	// An arbitrary precision decimal represented as a string
	SpendAmount Decimal `json:"spend_amount,required"`
	// On-chain asset (aka token)
	SpendAsset Asset `json:"spend_asset,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockchain       respjson.Field
		FeeEstimate      respjson.Field
		QuoteAssetSymbol respjson.Field
		QuoteInfo        respjson.Field
		QuoteValue       respjson.Field
		ReceiveAmount    respjson.Field
		ReceiveAsset     respjson.Field
		SpendAmount      respjson.Field
		SpendAsset       respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A buy quote

func (BuyQuote) RawJSON

func (r BuyQuote) RawJSON() string

Returns the unmodified JSON received from the API

func (*BuyQuote) UnmarshalJSON

func (r *BuyQuote) UnmarshalJSON(data []byte) error

type BuyQuoteFeeEstimate

type BuyQuoteFeeEstimate struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// An arbitrary precision decimal represented as a string
	Cost string `json:"cost,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount           respjson.Field
		Asset            respjson.Field
		Cost             respjson.Field
		QuoteAssetSymbol respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Estimated cost of an operation

func (BuyQuoteFeeEstimate) RawJSON

func (r BuyQuoteFeeEstimate) RawJSON() string

Returns the unmodified JSON received from the API

func (*BuyQuoteFeeEstimate) UnmarshalJSON

func (r *BuyQuoteFeeEstimate) UnmarshalJSON(data []byte) error

type BuyQuoteListParams

type BuyQuoteListParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An arbitrary precision decimal represented as a string
	ReceiveAmount Decimal `json:"receive_amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (BuyQuoteListParams) MarshalJSON

func (r BuyQuoteListParams) MarshalJSON() (data []byte, err error)

func (*BuyQuoteListParams) UnmarshalJSON

func (r *BuyQuoteListParams) UnmarshalJSON(data []byte) error

type BuyQuoteListResponse

type BuyQuoteListResponse struct {
	// A list of buy quotes
	Items []BuyQuote `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BuyQuoteListResponse) RawJSON

func (r BuyQuoteListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BuyQuoteListResponse) UnmarshalJSON

func (r *BuyQuoteListResponse) UnmarshalJSON(data []byte) error

type BuyQuoteQuoteInfoUnion

type BuyQuoteQuoteInfoUnion struct {
	PoolIDs []string `json:"pool_ids"`
	JSON    struct {
		PoolIDs respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

BuyQuoteQuoteInfoUnion contains all possible properties and values from QuoteInfoUniswapV2, QuoteInfoUniswapV3.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2

func (u BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2() (v QuoteInfoUniswapV2)

func (BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3

func (u BuyQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3() (v QuoteInfoUniswapV3)

func (BuyQuoteQuoteInfoUnion) RawJSON

func (u BuyQuoteQuoteInfoUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*BuyQuoteQuoteInfoUnion) UnmarshalJSON

func (r *BuyQuoteQuoteInfoUnion) UnmarshalJSON(data []byte) error

type BuyQuoteService

type BuyQuoteService struct {
	Options []option.RequestOption
}

BuyQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBuyQuoteService method instead.

func NewBuyQuoteService

func NewBuyQuoteService(opts ...option.RequestOption) (r BuyQuoteService)

NewBuyQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BuyQuoteService) List

Get quotes for buying an exact amount of an asset at current market rate

type BuyService

type BuyService struct {
	Options []option.RequestOption
	Quotes  BuyQuoteService
	Buy     BuyBuyService
}

BuyService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBuyService method instead.

func NewBuyService

func NewBuyService(opts ...option.RequestOption) (r BuyService)

NewBuyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type ChainType

type ChainType string

Blockchain ecosystem

const (
	ChainTypeEVM ChainType = "evm"
)

type Decimal

type Decimal = string

type EVMChainData

type EVMChainData struct {
	// Chain ID
	ChainID int64 `json:"chain_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ChainID     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Data about an EVM blockchain

func (EVMChainData) RawJSON

func (r EVMChainData) RawJSON() string

Returns the unmodified JSON received from the API

func (EVMChainData) ToParam

func (r EVMChainData) ToParam() EVMChainDataParam

ToParam converts this EVMChainData to a EVMChainDataParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EVMChainDataParam.Overrides()

func (*EVMChainData) UnmarshalJSON

func (r *EVMChainData) UnmarshalJSON(data []byte) error

type EVMChainDataParam

type EVMChainDataParam struct {
	// Chain ID
	ChainID int64 `json:"chain_id,required"`
	// contains filtered or unexported fields
}

Data about an EVM blockchain

The property ChainID is required.

func (EVMChainDataParam) MarshalJSON

func (r EVMChainDataParam) MarshalJSON() (data []byte, err error)

func (*EVMChainDataParam) UnmarshalJSON

func (r *EVMChainDataParam) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

type ErrorListOutput added in v1.11.0

type ErrorListOutput struct {
	// A list of vektor errors
	Items VektorErrorList `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ErrorListOutput) RawJSON added in v1.11.0

func (r ErrorListOutput) RawJSON() string

Returns the unmodified JSON received from the API

func (*ErrorListOutput) UnmarshalJSON added in v1.11.0

func (r *ErrorListOutput) UnmarshalJSON(data []byte) error

type Execution

type Execution struct {
	// An execution ID, represented as a TypeID with `execution` prefix
	ID ExecutionID `json:"id,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// An execution request
	Request ExecutionRequestUnion `json:"request,required"`
	// An execution step ID, represented as a TypeID with `execution_step` prefix
	RequestActionStepID string `json:"request_action_step_id,required"`
	// The state of an execution
	//
	// Any of "not_started", "started", "success", "aborted", "error".
	State         ExecutionState `json:"state,required"`
	StepActionURL string         `json:"step_action_url,required"`
	// A list of execution steps
	Steps []ExecutionStep `json:"steps,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		Request             respjson.Field
		RequestActionStepID respjson.Field
		State               respjson.Field
		StepActionURL       respjson.Field
		Steps               respjson.Field
		UpdatedAt           respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An execution

func (Execution) RawJSON

func (r Execution) RawJSON() string

Returns the unmodified JSON received from the API

func (*Execution) UnmarshalJSON

func (r *Execution) UnmarshalJSON(data []byte) error

type ExecutionEVMTransactionEIP1559Payload

type ExecutionEVMTransactionEIP1559Payload struct {
	// A hex string starting with 0x
	Data HexString `json:"data,required"`
	// An EVM address
	From AddressEVM `json:"from,required"`
	// A hex string starting with 0x
	GasLimit HexString `json:"gasLimit,required"`
	// A hex string starting with 0x
	MaxFeePerGas HexString `json:"maxFeePerGas,required"`
	// A hex string starting with 0x
	MaxPriorityFeePerGas HexString `json:"maxPriorityFeePerGas,required"`
	// A hex string starting with 0x
	Nonce HexString `json:"nonce,required"`
	// An EVM address
	To AddressEVM `json:"to,required"`
	// A hex string starting with 0x
	Value HexString `json:"value,required"`
	// A hex string starting with 0x
	ChainID HexString `json:"chainId"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data                 respjson.Field
		From                 respjson.Field
		GasLimit             respjson.Field
		MaxFeePerGas         respjson.Field
		MaxPriorityFeePerGas respjson.Field
		Nonce                respjson.Field
		To                   respjson.Field
		Value                respjson.Field
		ChainID              respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The payload of an EIP-1559 transaction

func (ExecutionEVMTransactionEIP1559Payload) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionEVMTransactionEIP1559Payload) UnmarshalJSON

func (r *ExecutionEVMTransactionEIP1559Payload) UnmarshalJSON(data []byte) error

type ExecutionEVMTransactionState

type ExecutionEVMTransactionState string

The state of an EVM transaction

const (
	ExecutionEVMTransactionStateNotStarted        ExecutionEVMTransactionState = "not_started"
	ExecutionEVMTransactionStateSignatureRequired ExecutionEVMTransactionState = "signature_required"
	ExecutionEVMTransactionStateSigned            ExecutionEVMTransactionState = "signed"
	ExecutionEVMTransactionStateBroadcasted       ExecutionEVMTransactionState = "broadcasted"
	ExecutionEVMTransactionStateConfirmed         ExecutionEVMTransactionState = "confirmed"
	ExecutionEVMTransactionStateError             ExecutionEVMTransactionState = "error"
)

type ExecutionError added in v1.12.0

type ExecutionError struct {
	// Error context
	Context ExecutionErrorContext `json:"context,required"`
	// Error message
	Message string `json:"message,required"`
	// Request ID
	RequestID string `json:"request_id,required"`
	// Error resource
	Resource string `json:"resource,required"`
	// ISO8601 Timestamp
	Timestamp Timestamp `json:"timestamp,required"`
	// Error type
	Type string `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Context     respjson.Field
		Message     respjson.Field
		RequestID   respjson.Field
		Resource    respjson.Field
		Timestamp   respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Vektor error

func (ExecutionError) RawJSON added in v1.12.0

func (r ExecutionError) RawJSON() string

Returns the unmodified JSON received from the API

func (*ExecutionError) UnmarshalJSON added in v1.12.0

func (r *ExecutionError) UnmarshalJSON(data []byte) error

type ExecutionErrorContext added in v1.12.0

type ExecutionErrorContext struct {
	// Error parameters
	Parameters map[string]any `json:"parameters,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Parameters  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Error context

func (ExecutionErrorContext) RawJSON added in v1.12.0

func (r ExecutionErrorContext) RawJSON() string

Returns the unmodified JSON received from the API

func (*ExecutionErrorContext) UnmarshalJSON added in v1.12.0

func (r *ExecutionErrorContext) UnmarshalJSON(data []byte) error

type ExecutionID

type ExecutionID = string

type ExecutionRequestBorrowRepayRequestFull added in v1.10.0

type ExecutionRequestBorrowRepayRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount string `json:"amount,required"`
	// On-chain asset (aka token)
	Asset ExecutionRequestBorrowRepayRequestFullAsset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	MarketID LendBorrowMarketID `json:"market_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Asset       respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		MarketID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to repay a borrowed asset

func (ExecutionRequestBorrowRepayRequestFull) RawJSON added in v1.10.0

Returns the unmodified JSON received from the API

func (*ExecutionRequestBorrowRepayRequestFull) UnmarshalJSON added in v1.10.0

func (r *ExecutionRequestBorrowRepayRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestBorrowRepayRequestFullAsset added in v1.10.0

type ExecutionRequestBorrowRepayRequestFullAsset struct {
	// An asset ID, represented as a TypeID with `asset` prefix
	ID AssetID `json:"id,required"`
	// An EVM address
	Address string `json:"address,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// Asset's decimal places
	Decimals int64 `json:"decimals,required"`
	// Asset's name
	Name string `json:"name,required"`
	// Asset's symbol
	Symbol string `json:"symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Address     respjson.Field
		Blockchain  respjson.Field
		Decimals    respjson.Field
		Name        respjson.Field
		Symbol      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

On-chain asset (aka token)

func (ExecutionRequestBorrowRepayRequestFullAsset) RawJSON added in v1.10.0

Returns the unmodified JSON received from the API

func (*ExecutionRequestBorrowRepayRequestFullAsset) UnmarshalJSON added in v1.10.0

func (r *ExecutionRequestBorrowRepayRequestFullAsset) UnmarshalJSON(data []byte) error

type ExecutionRequestBorrowRequestFull added in v1.9.0

type ExecutionRequestBorrowRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A list of venues
	Venues []Venue `json:"venues,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Asset       respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		Venues      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to borrow an asset

func (ExecutionRequestBorrowRequestFull) RawJSON added in v1.9.0

Returns the unmodified JSON received from the API

func (*ExecutionRequestBorrowRequestFull) UnmarshalJSON added in v1.9.0

func (r *ExecutionRequestBorrowRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestBuyRequestFull

type ExecutionRequestBuyRequestFull struct {
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// An arbitrary precision decimal represented as a string
	ReceiveAmount Decimal `json:"receive_amount,required"`
	// On-chain asset (aka token)
	ReceiveAsset Asset `json:"receive_asset,required"`
	// An arbitrary precision decimal represented as a string
	Slippage Decimal `json:"slippage,required"`
	// On-chain asset (aka token)
	SpendAsset Asset `json:"spend_asset,required"`
	// A list of venues
	Venues []Venue `json:"venues,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockchain    respjson.Field
		From          respjson.Field
		ReceiveAmount respjson.Field
		ReceiveAsset  respjson.Field
		Slippage      respjson.Field
		SpendAsset    respjson.Field
		Venues        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to buy an asset

func (ExecutionRequestBuyRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestBuyRequestFull) UnmarshalJSON

func (r *ExecutionRequestBuyRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestLendRequestFull

type ExecutionRequestLendRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A list of venues
	Venues []Venue `json:"venues,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Asset       respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		Venues      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to lend an asset

func (ExecutionRequestLendRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestLendRequestFull) UnmarshalJSON

func (r *ExecutionRequestLendRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestLendSetCollateralRequestFull

type ExecutionRequestLendSetCollateralRequestFull struct {
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	MarketID LendBorrowMarketID `json:"market_id,required"`
	Status   bool               `json:"status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockchain  respjson.Field
		From        respjson.Field
		MarketID    respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to set/unset a position as collateral

func (ExecutionRequestLendSetCollateralRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestLendSetCollateralRequestFull) UnmarshalJSON

func (r *ExecutionRequestLendSetCollateralRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestLendWithdrawRequestFull

type ExecutionRequestLendWithdrawRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount string `json:"amount,required"`
	// On-chain asset (aka token)
	Asset ExecutionRequestLendWithdrawRequestFullAsset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	MarketID LendBorrowMarketID `json:"market_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Asset       respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		MarketID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to withdraw an asset

func (ExecutionRequestLendWithdrawRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestLendWithdrawRequestFull) UnmarshalJSON

func (r *ExecutionRequestLendWithdrawRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestLendWithdrawRequestFullAsset

type ExecutionRequestLendWithdrawRequestFullAsset struct {
	// An asset ID, represented as a TypeID with `asset` prefix
	ID AssetID `json:"id,required"`
	// An EVM address
	Address string `json:"address,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// Asset's decimal places
	Decimals int64 `json:"decimals,required"`
	// Asset's name
	Name string `json:"name,required"`
	// Asset's symbol
	Symbol string `json:"symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Address     respjson.Field
		Blockchain  respjson.Field
		Decimals    respjson.Field
		Name        respjson.Field
		Symbol      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

On-chain asset (aka token)

func (ExecutionRequestLendWithdrawRequestFullAsset) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestLendWithdrawRequestFullAsset) UnmarshalJSON

func (r *ExecutionRequestLendWithdrawRequestFullAsset) UnmarshalJSON(data []byte) error

type ExecutionRequestMoveRequestFull

type ExecutionRequestMoveRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// An EVM address
	To Account `json:"to,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Asset       respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		To          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to move assets from one account to another

func (ExecutionRequestMoveRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestMoveRequestFull) UnmarshalJSON

func (r *ExecutionRequestMoveRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestSellRequestFull

type ExecutionRequestSellRequestFull struct {
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// On-chain asset (aka token)
	ReceiveAsset Asset `json:"receive_asset,required"`
	// An arbitrary precision decimal represented as a string
	Slippage Decimal `json:"slippage,required"`
	// An arbitrary precision decimal represented as a string
	SpendAmount Decimal `json:"spend_amount,required"`
	// On-chain asset (aka token)
	SpendAsset Asset `json:"spend_asset,required"`
	// A list of venues
	Venues []Venue `json:"venues,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockchain   respjson.Field
		From         respjson.Field
		ReceiveAsset respjson.Field
		Slippage     respjson.Field
		SpendAmount  respjson.Field
		SpendAsset   respjson.Field
		Venues       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to sell an asset

func (ExecutionRequestSellRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestSellRequestFull) UnmarshalJSON

func (r *ExecutionRequestSellRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestUnion

type ExecutionRequestUnion struct {
	Amount string `json:"amount"`
	// This field is a union of [Asset], [ExecutionRequestBorrowRepayRequestFullAsset],
	// [ExecutionRequestLendWithdrawRequestFullAsset]
	Asset ExecutionRequestUnionAsset `json:"asset"`
	// This field is from variant [ExecutionRequestBorrowRequestFull].
	Blockchain Blockchain `json:"blockchain"`
	// This field is from variant [ExecutionRequestBorrowRequestFull].
	From   Account `json:"from"`
	Venues []Venue `json:"venues"`
	// This field is from variant [ExecutionRequestBorrowRepayRequestFull].
	MarketID LendBorrowMarketID `json:"market_id"`
	// This field is from variant [ExecutionRequestBuyRequestFull].
	ReceiveAmount Decimal `json:"receive_amount"`
	// This field is from variant [ExecutionRequestBuyRequestFull].
	ReceiveAsset Asset `json:"receive_asset"`
	// This field is from variant [ExecutionRequestBuyRequestFull].
	Slippage Decimal `json:"slippage"`
	// This field is from variant [ExecutionRequestBuyRequestFull].
	SpendAsset Asset `json:"spend_asset"`
	// This field is from variant [ExecutionRequestLendSetCollateralRequestFull].
	Status bool `json:"status"`
	// This field is from variant [ExecutionRequestMoveRequestFull].
	To Account `json:"to"`
	// This field is from variant [ExecutionRequestSellRequestFull].
	SpendAmount Decimal `json:"spend_amount"`
	JSON        struct {
		Amount        respjson.Field
		Asset         respjson.Field
		Blockchain    respjson.Field
		From          respjson.Field
		Venues        respjson.Field
		MarketID      respjson.Field
		ReceiveAmount respjson.Field
		ReceiveAsset  respjson.Field
		Slippage      respjson.Field
		SpendAsset    respjson.Field
		Status        respjson.Field
		To            respjson.Field
		SpendAmount   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionRequestUnion contains all possible properties and values from ExecutionRequestBorrowRequestFull, ExecutionRequestBorrowRepayRequestFull, ExecutionRequestBuyRequestFull, ExecutionRequestLendRequestFull, ExecutionRequestLendSetCollateralRequestFull, ExecutionRequestLendWithdrawRequestFull, ExecutionRequestMoveRequestFull, ExecutionRequestSellRequestFull, ExecutionRequestWrapRequestFull, ExecutionRequestUnwrapRequestFull.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ExecutionRequestUnion) AsBorrowRepayRequestFull added in v1.10.0

func (u ExecutionRequestUnion) AsBorrowRepayRequestFull() (v ExecutionRequestBorrowRepayRequestFull)

func (ExecutionRequestUnion) AsBorrowRequestFull added in v1.9.0

func (u ExecutionRequestUnion) AsBorrowRequestFull() (v ExecutionRequestBorrowRequestFull)

func (ExecutionRequestUnion) AsBuyRequestFull

func (u ExecutionRequestUnion) AsBuyRequestFull() (v ExecutionRequestBuyRequestFull)

func (ExecutionRequestUnion) AsLendRequestFull

func (u ExecutionRequestUnion) AsLendRequestFull() (v ExecutionRequestLendRequestFull)

func (ExecutionRequestUnion) AsLendSetCollateralRequestFull

func (u ExecutionRequestUnion) AsLendSetCollateralRequestFull() (v ExecutionRequestLendSetCollateralRequestFull)

func (ExecutionRequestUnion) AsLendWithdrawRequestFull

func (u ExecutionRequestUnion) AsLendWithdrawRequestFull() (v ExecutionRequestLendWithdrawRequestFull)

func (ExecutionRequestUnion) AsMoveRequestFull

func (u ExecutionRequestUnion) AsMoveRequestFull() (v ExecutionRequestMoveRequestFull)

func (ExecutionRequestUnion) AsSellRequestFull

func (u ExecutionRequestUnion) AsSellRequestFull() (v ExecutionRequestSellRequestFull)

func (ExecutionRequestUnion) AsUnwrapRequestFull

func (u ExecutionRequestUnion) AsUnwrapRequestFull() (v ExecutionRequestUnwrapRequestFull)

func (ExecutionRequestUnion) AsWrapRequestFull

func (u ExecutionRequestUnion) AsWrapRequestFull() (v ExecutionRequestWrapRequestFull)

func (ExecutionRequestUnion) RawJSON

func (u ExecutionRequestUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ExecutionRequestUnion) UnmarshalJSON

func (r *ExecutionRequestUnion) UnmarshalJSON(data []byte) error

type ExecutionRequestUnionAsset

type ExecutionRequestUnionAsset struct {
	// This field is from variant [Asset].
	ID      AssetID `json:"id"`
	Address string  `json:"address"`
	// This field is from variant [Asset].
	Blockchain Blockchain `json:"blockchain"`
	Decimals   int64      `json:"decimals"`
	Name       string     `json:"name"`
	Symbol     string     `json:"symbol"`
	JSON       struct {
		ID         respjson.Field
		Address    respjson.Field
		Blockchain respjson.Field
		Decimals   respjson.Field
		Name       respjson.Field
		Symbol     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionRequestUnionAsset is an implicit subunion of ExecutionRequestUnion. ExecutionRequestUnionAsset provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionRequestUnion.

func (*ExecutionRequestUnionAsset) UnmarshalJSON

func (r *ExecutionRequestUnionAsset) UnmarshalJSON(data []byte) error

type ExecutionRequestUnwrapRequestFull

type ExecutionRequestUnwrapRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to unwrap the wrapped native asset

func (ExecutionRequestUnwrapRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestUnwrapRequestFull) UnmarshalJSON

func (r *ExecutionRequestUnwrapRequestFull) UnmarshalJSON(data []byte) error

type ExecutionRequestWrapRequestFull

type ExecutionRequestWrapRequestFull struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Blockchain  respjson.Field
		From        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request to wrap the native asset

func (ExecutionRequestWrapRequestFull) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionRequestWrapRequestFull) UnmarshalJSON

func (r *ExecutionRequestWrapRequestFull) UnmarshalJSON(data []byte) error

type ExecutionService

type ExecutionService struct {
	Options []option.RequestOption
	Steps   ExecutionStepService
}

ExecutionService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExecutionService method instead.

func NewExecutionService

func NewExecutionService(opts ...option.RequestOption) (r ExecutionService)

NewExecutionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ExecutionService) Get

func (r *ExecutionService) Get(ctx context.Context, executionID string, opts ...option.RequestOption) (res *Execution, err error)

Get an execution

func (*ExecutionService) List

func (r *ExecutionService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Execution, err error)

Get a list of executions

type ExecutionState

type ExecutionState string

The state of an execution

const (
	ExecutionStateNotStarted ExecutionState = "not_started"
	ExecutionStateStarted    ExecutionState = "started"
	ExecutionStateSuccess    ExecutionState = "success"
	ExecutionStateAborted    ExecutionState = "aborted"
	ExecutionStateError      ExecutionState = "error"
)

type ExecutionStep

type ExecutionStep struct {
	// An execution step ID, represented as a TypeID with `execution_step` prefix
	ID ExecutionStepID `json:"id,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// The definition of an execution step
	Definition ExecutionStepDefinitionUnion `json:"definition,required"`
	Index      int64                        `json:"index,required"`
	// The type of an execution step
	//
	// Any of "evm_transaction_approve", "evm_transaction_borrow",
	// "evm_transaction_borrow_repay", "evm_transaction_buy", "evm_transaction_lend",
	// "evm_transaction_lend_set_collateral", "evm_transaction_lend_withdraw",
	// "evm_transaction_move", "evm_transaction_permission", "evm_transaction_wrap",
	// "evm_transaction_unwrap", "evm_transaction_sell".
	Type string `json:"type,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Definition  respjson.Field
		Index       respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An execution step

func (ExecutionStep) RawJSON

func (r ExecutionStep) RawJSON() string

Returns the unmodified JSON received from the API

func (*ExecutionStep) UnmarshalJSON

func (r *ExecutionStep) UnmarshalJSON(data []byte) error

type ExecutionStepDefinitionExecutionEVMTransactionApprove

type ExecutionStepDefinitionExecutionEVMTransactionApprove struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An EVM address
	Spender Account `json:"spender,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// The type of approval
	//
	// Any of "spend_erc20", "borrow_erc20", "spend_erc721", "spend_erc721_collection".
	Type string `json:"type,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		Spender            respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An approval of an asset

func (ExecutionStepDefinitionExecutionEVMTransactionApprove) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionApprove) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionBorrow added in v1.9.0

type ExecutionStepDefinitionExecutionEVMTransactionBorrow struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// A venue symbol
	VenueSymbol VenueSymbol `json:"venue_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		VenueSymbol        respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Borrowing an asset

func (ExecutionStepDefinitionExecutionEVMTransactionBorrow) RawJSON added in v1.9.0

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionBorrow) UnmarshalJSON added in v1.9.0

type ExecutionStepDefinitionExecutionEVMTransactionBorrowRepay added in v1.10.0

type ExecutionStepDefinitionExecutionEVMTransactionBorrowRepay struct {
	// An arbitrary precision decimal represented as a string
	Amount string `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Repaying a borrowed asset

func (ExecutionStepDefinitionExecutionEVMTransactionBorrowRepay) RawJSON added in v1.10.0

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionBorrowRepay) UnmarshalJSON added in v1.10.0

type ExecutionStepDefinitionExecutionEVMTransactionBuy

type ExecutionStepDefinitionExecutionEVMTransactionBuy struct {
	// An EVM address
	ApprovalTarget Account `json:"approval_target,required"`
	BlockNumber    int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// An arbitrary precision decimal represented as a string
	MaxSpendAmount Decimal `json:"max_spend_amount,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// A buy quote
	Quote BuyQuote `json:"quote,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An arbitrary precision decimal represented as a string
	Slippage Decimal `json:"slippage,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalTarget     respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		MaxSpendAmount     respjson.Field
		Payload            respjson.Field
		Quote              respjson.Field
		SignedAt           respjson.Field
		Slippage           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Buying an asset with another asset

func (ExecutionStepDefinitionExecutionEVMTransactionBuy) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionBuy) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionLend

type ExecutionStepDefinitionExecutionEVMTransactionLend struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// A venue symbol
	VenueSymbol VenueSymbol `json:"venue_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		VenueSymbol        respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Lending an asset

func (ExecutionStepDefinitionExecutionEVMTransactionLend) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionLend) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral

type ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral struct {
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State  ExecutionEVMTransactionState `json:"state,required"`
	Status bool                         `json:"status,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		Status             respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Setting/unsetting a position as collateral

func (ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw

type ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw struct {
	// An arbitrary precision decimal represented as a string
	Amount string `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Withdrawing an asset

func (ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionMove

type ExecutionStepDefinitionExecutionEVMTransactionMove struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To Account `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A move of assets from one account to another

func (ExecutionStepDefinitionExecutionEVMTransactionMove) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionMove) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionPermission

type ExecutionStepDefinitionExecutionEVMTransactionPermission struct {
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// An EVM address
	ContractAddress AddressEVM `json:"contract_address,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload    ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	Permission bool                                  `json:"permission,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An EVM address
	Spender Account `json:"spender,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// The type of a permission
	//
	// Any of "compound_v3_comet".
	Type string `json:"type,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		ContractAddress    respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		Permission         respjson.Field
		SignedAt           respjson.Field
		Spender            respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A permission to a contract

func (ExecutionStepDefinitionExecutionEVMTransactionPermission) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionPermission) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionSell

type ExecutionStepDefinitionExecutionEVMTransactionSell struct {
	// An EVM address
	ApprovalTarget Account `json:"approval_target,required"`
	BlockNumber    int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// An arbitrary precision decimal represented as a string
	MinReceiveAmount Decimal `json:"min_receive_amount,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// A sell quote
	Quote SellQuote `json:"quote,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An arbitrary precision decimal represented as a string
	Slippage Decimal `json:"slippage,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalTarget     respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		MinReceiveAmount   respjson.Field
		Payload            respjson.Field
		Quote              respjson.Field
		SignedAt           respjson.Field
		Slippage           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Selling an asset for another asset

func (ExecutionStepDefinitionExecutionEVMTransactionSell) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionSell) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionUnwrap

type ExecutionStepDefinitionExecutionEVMTransactionUnwrap struct {
	// An arbitrary precision decimal represented as a string
	Amount      Decimal `json:"amount,required"`
	BlockNumber int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An unwrap of the wrapped native asset

func (ExecutionStepDefinitionExecutionEVMTransactionUnwrap) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionUnwrap) UnmarshalJSON

type ExecutionStepDefinitionExecutionEVMTransactionWrap

type ExecutionStepDefinitionExecutionEVMTransactionWrap struct {
	// An arbitrary precision decimal represented as a string
	Amount      Decimal `json:"amount,required"`
	BlockNumber int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A wrap of the native asset

func (ExecutionStepDefinitionExecutionEVMTransactionWrap) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionExecutionEVMTransactionWrap) UnmarshalJSON

type ExecutionStepDefinitionUnion

type ExecutionStepDefinitionUnion struct {
	Amount string `json:"amount"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	Asset              Asset  `json:"asset"`
	BlockNumber        int64  `json:"block_number"`
	BroadcastedAt      string `json:"broadcasted_at"`
	ConfirmationTarget int64  `json:"confirmation_target"`
	ConfirmedAt        string `json:"confirmed_at"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	CreatedAt         Timestamp `json:"created_at"`
	Data              string    `json:"data"`
	EffectiveGasPrice string    `json:"effective_gas_price"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	Error     ExecutionError `json:"error"`
	ErroredAt string         `json:"errored_at"`
	GasUsed   string         `json:"gas_used"`
	Hash      string         `json:"hash"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	Payload  ExecutionEVMTransactionEIP1559Payload `json:"payload"`
	SignedAt string                                `json:"signed_at"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	Spender Account `json:"spender"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	State ExecutionEVMTransactionState `json:"state"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	TargetState ExecutionEVMTransactionState `json:"target_state"`
	To          string                       `json:"to"`
	Type        string                       `json:"type"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionApprove].
	UpdatedAt Timestamp `json:"updated_at"`
	Value     string    `json:"value"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionBorrow].
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionBorrow].
	VenueSymbol VenueSymbol `json:"venue_symbol"`
	// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionBuy].
	ApprovalTarget Account `json:"approval_target"`
	// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionBuy].
	MaxSpendAmount Decimal `json:"max_spend_amount"`
	// This field is a union of [BuyQuote], [SellQuote]
	Quote ExecutionStepDefinitionUnionQuote `json:"quote"`
	// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionBuy].
	Slippage Decimal `json:"slippage"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral].
	Status bool `json:"status"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionPermission].
	ContractAddress AddressEVM `json:"contract_address"`
	// This field is from variant
	// [ExecutionStepDefinitionExecutionEVMTransactionPermission].
	Permission bool `json:"permission"`
	// This field is from variant [ExecutionStepDefinitionExecutionEVMTransactionSell].
	MinReceiveAmount Decimal `json:"min_receive_amount"`
	JSON             struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		Spender            respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		LendBorrowMarketID respjson.Field
		VenueSymbol        respjson.Field
		ApprovalTarget     respjson.Field
		MaxSpendAmount     respjson.Field
		Quote              respjson.Field
		Slippage           respjson.Field
		Status             respjson.Field
		ContractAddress    respjson.Field
		Permission         respjson.Field
		MinReceiveAmount   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepDefinitionUnion contains all possible properties and values from ExecutionStepDefinitionExecutionEVMTransactionApprove, ExecutionStepDefinitionExecutionEVMTransactionBorrow, ExecutionStepDefinitionExecutionEVMTransactionBorrowRepay, ExecutionStepDefinitionExecutionEVMTransactionBuy, ExecutionStepDefinitionExecutionEVMTransactionLend, ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral, ExecutionStepDefinitionExecutionEVMTransactionLendWithdraw, ExecutionStepDefinitionExecutionEVMTransactionMove, ExecutionStepDefinitionExecutionEVMTransactionPermission, ExecutionStepDefinitionExecutionEVMTransactionUnwrap, ExecutionStepDefinitionExecutionEVMTransactionWrap, ExecutionStepDefinitionExecutionEVMTransactionSell.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionApprove

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionBorrow added in v1.9.0

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionBorrowRepay added in v1.10.0

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionBuy

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLend

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral

func (u ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral() (v ExecutionStepDefinitionExecutionEVMTransactionLendSetCollateral)

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionLendWithdraw

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionMove

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionPermission

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionSell

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionUnwrap

func (ExecutionStepDefinitionUnion) AsExecutionEVMTransactionWrap

func (ExecutionStepDefinitionUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepDefinitionUnion) UnmarshalJSON

func (r *ExecutionStepDefinitionUnion) UnmarshalJSON(data []byte) error

type ExecutionStepDefinitionUnionQuote

type ExecutionStepDefinitionUnionQuote struct {
	// This field is from variant [BuyQuote].
	Blockchain Blockchain `json:"blockchain"`
	// This field is a union of [BuyQuoteFeeEstimate], [SellQuoteFeeEstimate]
	FeeEstimate      ExecutionStepDefinitionUnionQuoteFeeEstimate `json:"fee_estimate"`
	QuoteAssetSymbol string                                       `json:"quote_asset_symbol"`
	// This field is a union of [BuyQuoteQuoteInfoUnion], [SellQuoteQuoteInfoUnion]
	QuoteInfo  ExecutionStepDefinitionUnionQuoteQuoteInfo `json:"quote_info"`
	QuoteValue string                                     `json:"quote_value"`
	// This field is from variant [BuyQuote].
	ReceiveAmount Decimal `json:"receive_amount"`
	// This field is from variant [BuyQuote].
	ReceiveAsset Asset `json:"receive_asset"`
	// This field is from variant [BuyQuote].
	SpendAmount Decimal `json:"spend_amount"`
	// This field is from variant [BuyQuote].
	SpendAsset Asset `json:"spend_asset"`
	// This field is from variant [BuyQuote].
	Venue Venue `json:"venue"`
	JSON  struct {
		Blockchain       respjson.Field
		FeeEstimate      respjson.Field
		QuoteAssetSymbol respjson.Field
		QuoteInfo        respjson.Field
		QuoteValue       respjson.Field
		ReceiveAmount    respjson.Field
		ReceiveAsset     respjson.Field
		SpendAmount      respjson.Field
		SpendAsset       respjson.Field
		Venue            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepDefinitionUnionQuote is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionQuote provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.

func (*ExecutionStepDefinitionUnionQuote) UnmarshalJSON

func (r *ExecutionStepDefinitionUnionQuote) UnmarshalJSON(data []byte) error

type ExecutionStepDefinitionUnionQuoteFeeEstimate

type ExecutionStepDefinitionUnionQuoteFeeEstimate struct {
	// This field is from variant [BuyQuoteFeeEstimate].
	Amount Decimal `json:"amount"`
	// This field is from variant [BuyQuoteFeeEstimate].
	Asset            Asset  `json:"asset"`
	Cost             string `json:"cost"`
	QuoteAssetSymbol string `json:"quote_asset_symbol"`
	JSON             struct {
		Amount           respjson.Field
		Asset            respjson.Field
		Cost             respjson.Field
		QuoteAssetSymbol respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepDefinitionUnionQuoteFeeEstimate is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionQuoteFeeEstimate provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.

func (*ExecutionStepDefinitionUnionQuoteFeeEstimate) UnmarshalJSON

func (r *ExecutionStepDefinitionUnionQuoteFeeEstimate) UnmarshalJSON(data []byte) error

type ExecutionStepDefinitionUnionQuoteQuoteInfo

type ExecutionStepDefinitionUnionQuoteQuoteInfo struct {
	PoolIDs []string `json:"pool_ids"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	IIndex int64 `json:"i_index"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	JIndex int64 `json:"j_index"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	PoolID string `json:"pool_id"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	SwapType string `json:"swap_type"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	EstimatedGasUsed string `json:"estimated_gas_used"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	Route QuoteInfo0xRoute `json:"route"`
	JSON  struct {
		PoolIDs          respjson.Field
		IIndex           respjson.Field
		JIndex           respjson.Field
		PoolID           respjson.Field
		SwapType         respjson.Field
		EstimatedGasUsed respjson.Field
		Route            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepDefinitionUnionQuoteQuoteInfo is an implicit subunion of ExecutionStepDefinitionUnion. ExecutionStepDefinitionUnionQuoteQuoteInfo provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionStepDefinitionUnion.

func (*ExecutionStepDefinitionUnionQuoteQuoteInfo) UnmarshalJSON

func (r *ExecutionStepDefinitionUnionQuoteQuoteInfo) UnmarshalJSON(data []byte) error

type ExecutionStepGetResponse

type ExecutionStepGetResponse struct {
	// An execution step ID, represented as a TypeID with `execution_step` prefix
	ID ExecutionStepID `json:"id,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// The definition of an execution step
	Definition ExecutionStepGetResponseDefinitionUnion `json:"definition,required"`
	Index      int64                                   `json:"index,required"`
	// The type of an execution step
	//
	// Any of "evm_transaction_approve", "evm_transaction_borrow",
	// "evm_transaction_borrow_repay", "evm_transaction_buy", "evm_transaction_lend",
	// "evm_transaction_lend_set_collateral", "evm_transaction_lend_withdraw",
	// "evm_transaction_move", "evm_transaction_permission", "evm_transaction_wrap",
	// "evm_transaction_unwrap", "evm_transaction_sell".
	Type ExecutionStepGetResponseType `json:"type,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Definition  respjson.Field
		Index       respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An execution step

func (ExecutionStepGetResponse) RawJSON

func (r ExecutionStepGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponse) UnmarshalJSON

func (r *ExecutionStepGetResponse) UnmarshalJSON(data []byte) error

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An EVM address
	Spender Account `json:"spender,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// The type of approval
	//
	// Any of "spend_erc20", "borrow_erc20", "spend_erc721", "spend_erc721_collection".
	Type string `json:"type,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		Spender            respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An approval of an asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow added in v1.9.0

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// A venue symbol
	VenueSymbol VenueSymbol `json:"venue_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		VenueSymbol        respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Borrowing an asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow) RawJSON added in v1.9.0

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow) UnmarshalJSON added in v1.9.0

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrowRepay added in v1.10.0

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrowRepay struct {
	// An arbitrary precision decimal represented as a string
	Amount string `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Repaying a borrowed asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrowRepay) RawJSON added in v1.10.0

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrowRepay) UnmarshalJSON added in v1.10.0

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy struct {
	// An EVM address
	ApprovalTarget Account `json:"approval_target,required"`
	BlockNumber    int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// An arbitrary precision decimal represented as a string
	MaxSpendAmount Decimal `json:"max_spend_amount,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// A buy quote
	Quote BuyQuote `json:"quote,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An arbitrary precision decimal represented as a string
	Slippage Decimal `json:"slippage,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalTarget     respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		MaxSpendAmount     respjson.Field
		Payload            respjson.Field
		Quote              respjson.Field
		SignedAt           respjson.Field
		Slippage           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Buying an asset with another asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// A venue symbol
	VenueSymbol VenueSymbol `json:"venue_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		VenueSymbol        respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Lending an asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral struct {
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State  ExecutionEVMTransactionState `json:"state,required"`
	Status bool                         `json:"status,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		Status             respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Setting/unsetting a position as collateral

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw struct {
	// An arbitrary precision decimal represented as a string
	Amount string `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Withdrawing an asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset       Asset `json:"asset,required"`
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To Account `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A move of assets from one account to another

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission struct {
	BlockNumber int64 `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// An EVM address
	ContractAddress AddressEVM `json:"contract_address,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id,required"`
	// The payload of an EIP-1559 transaction
	Payload    ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	Permission bool                                  `json:"permission,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An EVM address
	Spender Account `json:"spender,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// The type of a permission
	//
	// Any of "compound_v3_comet".
	Type string `json:"type,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		ContractAddress    respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		LendBorrowMarketID respjson.Field
		Payload            respjson.Field
		Permission         respjson.Field
		SignedAt           respjson.Field
		Spender            respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A permission to a contract

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell struct {
	// An EVM address
	ApprovalTarget Account `json:"approval_target,required"`
	BlockNumber    int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// An arbitrary precision decimal represented as a string
	MinReceiveAmount Decimal `json:"min_receive_amount,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// A sell quote
	Quote SellQuote `json:"quote,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// An arbitrary precision decimal represented as a string
	Slippage Decimal `json:"slippage,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalTarget     respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		MinReceiveAmount   respjson.Field
		Payload            respjson.Field
		Quote              respjson.Field
		SignedAt           respjson.Field
		Slippage           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Selling an asset for another asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap struct {
	// An arbitrary precision decimal represented as a string
	Amount      Decimal `json:"amount,required"`
	BlockNumber int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An unwrap of the wrapped native asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap) UnmarshalJSON

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap

type ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap struct {
	// An arbitrary precision decimal represented as a string
	Amount      Decimal `json:"amount,required"`
	BlockNumber int64   `json:"block_number,required"`
	// ISO8601 Timestamp
	BroadcastedAt      string `json:"broadcasted_at,required"`
	ConfirmationTarget int64  `json:"confirmation_target,required"`
	// ISO8601 Timestamp
	ConfirmedAt string `json:"confirmed_at,required"`
	// ISO8601 Timestamp
	CreatedAt Timestamp `json:"created_at,required"`
	// A hex string starting with 0x
	Data string `json:"data,required"`
	// An arbitrary precision decimal represented as a string
	EffectiveGasPrice string `json:"effective_gas_price,required"`
	// Vektor error
	Error ExecutionError `json:"error,required"`
	// ISO8601 Timestamp
	ErroredAt string `json:"errored_at,required"`
	// An arbitrary precision decimal represented as a string
	GasUsed string `json:"gas_used,required"`
	// A transaction hash
	Hash string `json:"hash,required"`
	// The payload of an EIP-1559 transaction
	Payload ExecutionEVMTransactionEIP1559Payload `json:"payload,required"`
	// ISO8601 Timestamp
	SignedAt string `json:"signed_at,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	State ExecutionEVMTransactionState `json:"state,required"`
	// The state of an EVM transaction
	//
	// Any of "not_started", "signature_required", "signed", "broadcasted",
	// "confirmed", "error".
	TargetState ExecutionEVMTransactionState `json:"target_state,required"`
	// An EVM address
	To string `json:"to,required"`
	// ISO8601 Timestamp
	UpdatedAt Timestamp `json:"updated_at,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount             respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A wrap of the native asset

func (ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap) UnmarshalJSON

type ExecutionStepGetResponseDefinitionUnion

type ExecutionStepGetResponseDefinitionUnion struct {
	Amount string `json:"amount"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	Asset              Asset  `json:"asset"`
	BlockNumber        int64  `json:"block_number"`
	BroadcastedAt      string `json:"broadcasted_at"`
	ConfirmationTarget int64  `json:"confirmation_target"`
	ConfirmedAt        string `json:"confirmed_at"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	CreatedAt         Timestamp `json:"created_at"`
	Data              string    `json:"data"`
	EffectiveGasPrice string    `json:"effective_gas_price"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	Error     ExecutionError `json:"error"`
	ErroredAt string         `json:"errored_at"`
	GasUsed   string         `json:"gas_used"`
	Hash      string         `json:"hash"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	Payload  ExecutionEVMTransactionEIP1559Payload `json:"payload"`
	SignedAt string                                `json:"signed_at"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	Spender Account `json:"spender"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	State ExecutionEVMTransactionState `json:"state"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	TargetState ExecutionEVMTransactionState `json:"target_state"`
	To          string                       `json:"to"`
	Type        string                       `json:"type"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove].
	UpdatedAt Timestamp `json:"updated_at"`
	Value     string    `json:"value"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow].
	LendBorrowMarketID LendBorrowMarketID `json:"lend_borrow_market_id"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow].
	VenueSymbol VenueSymbol `json:"venue_symbol"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy].
	ApprovalTarget Account `json:"approval_target"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy].
	MaxSpendAmount Decimal `json:"max_spend_amount"`
	// This field is a union of [BuyQuote], [SellQuote]
	Quote ExecutionStepGetResponseDefinitionUnionQuote `json:"quote"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy].
	Slippage Decimal `json:"slippage"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral].
	Status bool `json:"status"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission].
	ContractAddress AddressEVM `json:"contract_address"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission].
	Permission bool `json:"permission"`
	// This field is from variant
	// [ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell].
	MinReceiveAmount Decimal `json:"min_receive_amount"`
	JSON             struct {
		Amount             respjson.Field
		Asset              respjson.Field
		BlockNumber        respjson.Field
		BroadcastedAt      respjson.Field
		ConfirmationTarget respjson.Field
		ConfirmedAt        respjson.Field
		CreatedAt          respjson.Field
		Data               respjson.Field
		EffectiveGasPrice  respjson.Field
		Error              respjson.Field
		ErroredAt          respjson.Field
		GasUsed            respjson.Field
		Hash               respjson.Field
		Payload            respjson.Field
		SignedAt           respjson.Field
		Spender            respjson.Field
		State              respjson.Field
		TargetState        respjson.Field
		To                 respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Value              respjson.Field
		LendBorrowMarketID respjson.Field
		VenueSymbol        respjson.Field
		ApprovalTarget     respjson.Field
		MaxSpendAmount     respjson.Field
		Quote              respjson.Field
		Slippage           respjson.Field
		Status             respjson.Field
		ContractAddress    respjson.Field
		Permission         respjson.Field
		MinReceiveAmount   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepGetResponseDefinitionUnion contains all possible properties and values from ExecutionStepGetResponseDefinitionExecutionEVMTransactionApprove, ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrow, ExecutionStepGetResponseDefinitionExecutionEVMTransactionBorrowRepay, ExecutionStepGetResponseDefinitionExecutionEVMTransactionBuy, ExecutionStepGetResponseDefinitionExecutionEVMTransactionLend, ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendSetCollateral, ExecutionStepGetResponseDefinitionExecutionEVMTransactionLendWithdraw, ExecutionStepGetResponseDefinitionExecutionEVMTransactionMove, ExecutionStepGetResponseDefinitionExecutionEVMTransactionPermission, ExecutionStepGetResponseDefinitionExecutionEVMTransactionUnwrap, ExecutionStepGetResponseDefinitionExecutionEVMTransactionWrap, ExecutionStepGetResponseDefinitionExecutionEVMTransactionSell.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionApprove

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionBorrow added in v1.9.0

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionBorrowRepay added in v1.10.0

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionBuy

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLend

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendSetCollateral

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionLendWithdraw

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionMove

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionPermission

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionSell

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionUnwrap

func (ExecutionStepGetResponseDefinitionUnion) AsExecutionEVMTransactionWrap

func (ExecutionStepGetResponseDefinitionUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ExecutionStepGetResponseDefinitionUnion) UnmarshalJSON

func (r *ExecutionStepGetResponseDefinitionUnion) UnmarshalJSON(data []byte) error

type ExecutionStepGetResponseDefinitionUnionQuote

type ExecutionStepGetResponseDefinitionUnionQuote struct {
	// This field is from variant [BuyQuote].
	Blockchain Blockchain `json:"blockchain"`
	// This field is a union of [BuyQuoteFeeEstimate], [SellQuoteFeeEstimate]
	FeeEstimate      ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate `json:"fee_estimate"`
	QuoteAssetSymbol string                                                  `json:"quote_asset_symbol"`
	// This field is a union of [BuyQuoteQuoteInfoUnion], [SellQuoteQuoteInfoUnion]
	QuoteInfo  ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo `json:"quote_info"`
	QuoteValue string                                                `json:"quote_value"`
	// This field is from variant [BuyQuote].
	ReceiveAmount Decimal `json:"receive_amount"`
	// This field is from variant [BuyQuote].
	ReceiveAsset Asset `json:"receive_asset"`
	// This field is from variant [BuyQuote].
	SpendAmount Decimal `json:"spend_amount"`
	// This field is from variant [BuyQuote].
	SpendAsset Asset `json:"spend_asset"`
	// This field is from variant [BuyQuote].
	Venue Venue `json:"venue"`
	JSON  struct {
		Blockchain       respjson.Field
		FeeEstimate      respjson.Field
		QuoteAssetSymbol respjson.Field
		QuoteInfo        respjson.Field
		QuoteValue       respjson.Field
		ReceiveAmount    respjson.Field
		ReceiveAsset     respjson.Field
		SpendAmount      respjson.Field
		SpendAsset       respjson.Field
		Venue            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepGetResponseDefinitionUnionQuote is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionQuote provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.

func (*ExecutionStepGetResponseDefinitionUnionQuote) UnmarshalJSON

func (r *ExecutionStepGetResponseDefinitionUnionQuote) UnmarshalJSON(data []byte) error

type ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate

type ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate struct {
	// This field is from variant [BuyQuoteFeeEstimate].
	Amount Decimal `json:"amount"`
	// This field is from variant [BuyQuoteFeeEstimate].
	Asset            Asset  `json:"asset"`
	Cost             string `json:"cost"`
	QuoteAssetSymbol string `json:"quote_asset_symbol"`
	JSON             struct {
		Amount           respjson.Field
		Asset            respjson.Field
		Cost             respjson.Field
		QuoteAssetSymbol respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.

func (*ExecutionStepGetResponseDefinitionUnionQuoteFeeEstimate) UnmarshalJSON

type ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo

type ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo struct {
	PoolIDs []string `json:"pool_ids"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	IIndex int64 `json:"i_index"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	JIndex int64 `json:"j_index"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	PoolID string `json:"pool_id"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	SwapType string `json:"swap_type"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	EstimatedGasUsed string `json:"estimated_gas_used"`
	// This field is from variant [SellQuoteQuoteInfoUnion].
	Route QuoteInfo0xRoute `json:"route"`
	JSON  struct {
		PoolIDs          respjson.Field
		IIndex           respjson.Field
		JIndex           respjson.Field
		PoolID           respjson.Field
		SwapType         respjson.Field
		EstimatedGasUsed respjson.Field
		Route            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo is an implicit subunion of ExecutionStepGetResponseDefinitionUnion. ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ExecutionStepGetResponseDefinitionUnion.

func (*ExecutionStepGetResponseDefinitionUnionQuoteQuoteInfo) UnmarshalJSON

type ExecutionStepGetResponseType

type ExecutionStepGetResponseType string

The type of an execution step

const (
	ExecutionStepGetResponseTypeEVMTransactionApprove           ExecutionStepGetResponseType = "evm_transaction_approve"
	ExecutionStepGetResponseTypeEVMTransactionBorrow            ExecutionStepGetResponseType = "evm_transaction_borrow"
	ExecutionStepGetResponseTypeEVMTransactionBorrowRepay       ExecutionStepGetResponseType = "evm_transaction_borrow_repay"
	ExecutionStepGetResponseTypeEVMTransactionBuy               ExecutionStepGetResponseType = "evm_transaction_buy"
	ExecutionStepGetResponseTypeEVMTransactionLend              ExecutionStepGetResponseType = "evm_transaction_lend"
	ExecutionStepGetResponseTypeEVMTransactionLendSetCollateral ExecutionStepGetResponseType = "evm_transaction_lend_set_collateral"
	ExecutionStepGetResponseTypeEVMTransactionLendWithdraw      ExecutionStepGetResponseType = "evm_transaction_lend_withdraw"
	ExecutionStepGetResponseTypeEVMTransactionMove              ExecutionStepGetResponseType = "evm_transaction_move"
	ExecutionStepGetResponseTypeEVMTransactionPermission        ExecutionStepGetResponseType = "evm_transaction_permission"
	ExecutionStepGetResponseTypeEVMTransactionWrap              ExecutionStepGetResponseType = "evm_transaction_wrap"
	ExecutionStepGetResponseTypeEVMTransactionUnwrap            ExecutionStepGetResponseType = "evm_transaction_unwrap"
	ExecutionStepGetResponseTypeEVMTransactionSell              ExecutionStepGetResponseType = "evm_transaction_sell"
)

type ExecutionStepID

type ExecutionStepID = string

type ExecutionStepService

type ExecutionStepService struct {
	Options []option.RequestOption
}

ExecutionStepService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExecutionStepService method instead.

func NewExecutionStepService

func NewExecutionStepService(opts ...option.RequestOption) (r ExecutionStepService)

NewExecutionStepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ExecutionStepService) Get

func (r *ExecutionStepService) Get(ctx context.Context, executionID string, stepID string, opts ...option.RequestOption) (res *ExecutionStepGetResponse, err error)

Get a step of an execution

func (*ExecutionStepService) Sign

func (r *ExecutionStepService) Sign(ctx context.Context, executionID string, stepID string, body ExecutionStepSignParams, opts ...option.RequestOption) (err error)

Sign an EVM transaction step

type ExecutionStepSignParams

type ExecutionStepSignParams struct {
	// A hex string starting with 0x
	SignedPayload HexString `json:"signed_payload,required"`
	// contains filtered or unexported fields
}

func (ExecutionStepSignParams) MarshalJSON

func (r ExecutionStepSignParams) MarshalJSON() (data []byte, err error)

func (*ExecutionStepSignParams) UnmarshalJSON

func (r *ExecutionStepSignParams) UnmarshalJSON(data []byte) error

type HexString

type HexString = string

type IncentivizeListParams

type IncentivizeListParams struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (IncentivizeListParams) MarshalJSON

func (r IncentivizeListParams) MarshalJSON() (data []byte, err error)

func (*IncentivizeListParams) UnmarshalJSON

func (r *IncentivizeListParams) UnmarshalJSON(data []byte) error

type IncentivizeListResponse

type IncentivizeListResponse struct {
	// A list of lp pool incentive markets
	Items []IncentivizeMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IncentivizeListResponse) RawJSON

func (r IncentivizeListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*IncentivizeListResponse) UnmarshalJSON

func (r *IncentivizeListResponse) UnmarshalJSON(data []byte) error

type IncentivizeMarket

type IncentivizeMarket struct {
	// A list of arbitrary precision decimals
	Amounts []Decimal `json:"amounts,required"`
	// Response for multiple assets
	Assets []Asset `json:"assets,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// ISO8601 Timestamp
	ClosedAt Timestamp `json:"closed_at,required"`
	// A liquidity pool
	Pool LPPool `json:"pool,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// The round number
	Round int64 `json:"round,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amounts          respjson.Field
		Assets           respjson.Field
		Blockstamp       respjson.Field
		ClosedAt         respjson.Field
		Pool             respjson.Field
		QuoteAssetSymbol respjson.Field
		Round            respjson.Field
		Value            respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A lp pool incentive market

func (IncentivizeMarket) RawJSON

func (r IncentivizeMarket) RawJSON() string

Returns the unmodified JSON received from the API

func (*IncentivizeMarket) UnmarshalJSON

func (r *IncentivizeMarket) UnmarshalJSON(data []byte) error

type IncentivizeService

type IncentivizeService struct {
	Options []option.RequestOption
}

IncentivizeService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIncentivizeService method instead.

func NewIncentivizeService

func NewIncentivizeService(opts ...option.RequestOption) (r IncentivizeService)

NewIncentivizeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IncentivizeService) List

List the current incentive markets

type LPDepositQuoteNewParams

type LPDepositQuoteNewParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for simulating a deposit to a liquidity pool, creating a position
	OfLPPoolDepositQuoteRequestInput *LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for simulating a deposit to a liquidity pool, adding to an existing
	// position
	OfLPPositionDepositQuoteRequestInput *LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (LPDepositQuoteNewParams) MarshalJSON

func (u LPDepositQuoteNewParams) MarshalJSON() ([]byte, error)

func (*LPDepositQuoteNewParams) UnmarshalJSON

func (r *LPDepositQuoteNewParams) UnmarshalJSON(data []byte) error

type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput

type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	LPPoolID string `json:"lp_pool_id,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// A Uniswap V3 range. Lower and upper bounds should satisfy 0 <= `lower` <
	// `upper`. The value -1 can be used in `upper` for infinity
	Range LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange `json:"range,omitzero"`
	// contains filtered or unexported fields
}

Parameters for simulating a deposit to a liquidity pool, creating a position

The properties Amount, Asset, Blockchain, LPPoolID are required.

func (LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput) MarshalJSON

func (*LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInput) UnmarshalJSON

type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange

type LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange struct {
	// An arbitrary precision decimal represented as a string
	Lower Decimal `json:"lower,required"`
	// An arbitrary precision decimal represented as a string
	Upper Decimal `json:"upper,required"`
	// contains filtered or unexported fields
}

A Uniswap V3 range. Lower and upper bounds should satisfy 0 <= `lower` < `upper`. The value -1 can be used in `upper` for infinity

The properties Lower, Upper are required.

func (LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange) MarshalJSON

func (*LPDepositQuoteNewParamsBodyLPPoolDepositQuoteRequestInputRange) UnmarshalJSON

type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput

type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput struct {
	// An EVM address
	Account Account `json:"account,required"`
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	LPPoolID string `json:"lp_pool_id,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Uniswap position specifier
	Specifier LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier `json:"specifier,omitzero"`
	// contains filtered or unexported fields
}

Parameters for simulating a deposit to a liquidity pool, adding to an existing position

The properties Account, Amount, Asset, Blockchain, LPPoolID are required.

func (LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput) MarshalJSON

func (*LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInput) UnmarshalJSON

type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier

type LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier struct {
	// A NFT
	PositionNFT NFTParam `json:"position_nft,omitzero,required"`
	// contains filtered or unexported fields
}

Uniswap position specifier

The property PositionNFT is required.

func (LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier) MarshalJSON

func (*LPDepositQuoteNewParamsBodyLPPositionDepositQuoteRequestInputSpecifier) UnmarshalJSON

type LPDepositQuoteNewResponse

type LPDepositQuoteNewResponse struct {
	// An LP quote
	Items LPQuote `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPDepositQuoteNewResponse) RawJSON

func (r LPDepositQuoteNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPDepositQuoteNewResponse) UnmarshalJSON

func (r *LPDepositQuoteNewResponse) UnmarshalJSON(data []byte) error

type LPDepositQuoteService

type LPDepositQuoteService struct {
	Options []option.RequestOption
}

LPDepositQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPDepositQuoteService method instead.

func NewLPDepositQuoteService

func NewLPDepositQuoteService(opts ...option.RequestOption) (r LPDepositQuoteService)

NewLPDepositQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LPDepositQuoteService) New

Simulate depositing liquidity to a specific LP pool, creating a position or adding to an existing one.

type LPPool

type LPPool struct {
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	ID string `json:"id,required"`
	// Response for multiple assets
	Assets []Asset `json:"assets,required"`
	// Pool attributes that are specific to particular venue types
	Attributes LPPoolAttributesUnion `json:"attributes,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An EVM address
	PoolAddress Account `json:"pool_address,required"`
	// An arbitrary precision decimal represented as a string
	PoolFee Decimal `json:"pool_fee,required"`
	// Type of a liquidity pool
	//
	// Any of "pair", "multi", "weighted", "range".
	PoolType LPPoolPoolType `json:"pool_type,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// A list of arbitrary precision decimals
	ReserveAmounts []Decimal `json:"reserve_amounts,required"`
	// A list of arbitrary precision decimals
	ReserveRatios []Decimal `json:"reserve_ratios,required"`
	// An arbitrary precision decimal represented as a string
	TotalLiquidity string `json:"total_liquidity,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		Assets           respjson.Field
		Attributes       respjson.Field
		Blockstamp       respjson.Field
		PoolAddress      respjson.Field
		PoolFee          respjson.Field
		PoolType         respjson.Field
		QuoteAssetSymbol respjson.Field
		ReserveAmounts   respjson.Field
		ReserveRatios    respjson.Field
		TotalLiquidity   respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A liquidity pool

func (LPPool) RawJSON

func (r LPPool) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPool) UnmarshalJSON

func (r *LPPool) UnmarshalJSON(data []byte) error

type LPPoolAttributesUnion

type LPPoolAttributesUnion struct {
	// This field is from variant [LPPoolUniswapV3Attributes].
	Fee string `json:"fee"`
	// This field is from variant [LPPoolSolidlyAttributes].
	Stable bool `json:"stable"`
	JSON   struct {
		Fee    respjson.Field
		Stable respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

LPPoolAttributesUnion contains all possible properties and values from LPPoolUniswapV3Attributes, LPPoolSolidlyAttributes.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (LPPoolAttributesUnion) AsLPPoolSolidlyAttributes

func (u LPPoolAttributesUnion) AsLPPoolSolidlyAttributes() (v LPPoolSolidlyAttributes)

func (LPPoolAttributesUnion) AsLPPoolUniswapV3Attributes

func (u LPPoolAttributesUnion) AsLPPoolUniswapV3Attributes() (v LPPoolUniswapV3Attributes)

func (LPPoolAttributesUnion) RawJSON

func (u LPPoolAttributesUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPoolAttributesUnion) UnmarshalJSON

func (r *LPPoolAttributesUnion) UnmarshalJSON(data []byte) error

type LPPoolListHistoricalParams

type LPPoolListHistoricalParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying LP pools by venues and assets
	OfHistoricalLPPoolsByVenueAssetRequest *LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying LP pools by IDs
	OfHistoricalLPPoolsByIDsRequest *LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest `json:",inline"`
	// contains filtered or unexported fields
}

func (LPPoolListHistoricalParams) MarshalJSON

func (u LPPoolListHistoricalParams) MarshalJSON() ([]byte, error)

func (*LPPoolListHistoricalParams) UnmarshalJSON

func (r *LPPoolListHistoricalParams) UnmarshalJSON(data []byte) error

type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest

type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// A list of LP pool IDs
	LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying LP pools by IDs

The properties Blockchain, From, LPPoolIDs, To are required.

func (LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest) MarshalJSON

func (*LPPoolListHistoricalParamsBodyHistoricalLPPoolsByIDsRequest) UnmarshalJSON

type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest

type LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying LP pools by venues and assets

The properties Assets, Blockchain, From, To, Venues are required.

func (LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest) MarshalJSON

func (*LPPoolListHistoricalParamsBodyHistoricalLPPoolsByVenueAssetRequest) UnmarshalJSON

type LPPoolListHistoricalResponse

type LPPoolListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange             `json:"historical,required"`
	Items      []LPPoolListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPPoolListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*LPPoolListHistoricalResponse) UnmarshalJSON

func (r *LPPoolListHistoricalResponse) UnmarshalJSON(data []byte) error

type LPPoolListHistoricalResponseItem

type LPPoolListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of liquidity pools
	Items []LPPool `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPPoolListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*LPPoolListHistoricalResponseItem) UnmarshalJSON

func (r *LPPoolListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type LPPoolListParams

type LPPoolListParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying LP pools by venues and assets
	OfLPPoolsByVenueAssetRequestInput *LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying LP pools by IDs
	OfLPPoolsByIDsRequestInput *LPPoolListParamsBodyLPPoolsByIDsRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (LPPoolListParams) MarshalJSON

func (u LPPoolListParams) MarshalJSON() ([]byte, error)

func (*LPPoolListParams) UnmarshalJSON

func (r *LPPoolListParams) UnmarshalJSON(data []byte) error

type LPPoolListParamsBodyLPPoolsByIDsRequestInput

type LPPoolListParamsBodyLPPoolsByIDsRequestInput struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of LP pool IDs
	LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying LP pools by IDs

The properties Blockchain, LPPoolIDs are required.

func (LPPoolListParamsBodyLPPoolsByIDsRequestInput) MarshalJSON

func (r LPPoolListParamsBodyLPPoolsByIDsRequestInput) MarshalJSON() (data []byte, err error)

func (*LPPoolListParamsBodyLPPoolsByIDsRequestInput) UnmarshalJSON

func (r *LPPoolListParamsBodyLPPoolsByIDsRequestInput) UnmarshalJSON(data []byte) error

type LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion

type LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion) MarshalJSON

func (*LPPoolListParamsBodyLPPoolsByIDsRequestInputAtUnion) UnmarshalJSON

type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput

type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying LP pools by venues and assets

The properties Assets, Blockchain, Venues are required.

func (LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) MarshalJSON

func (r LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) MarshalJSON() (data []byte, err error)

func (*LPPoolListParamsBodyLPPoolsByVenueAssetRequestInput) UnmarshalJSON

type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion

type LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion) MarshalJSON

func (*LPPoolListParamsBodyLPPoolsByVenueAssetRequestInputAtUnion) UnmarshalJSON

type LPPoolListResponse

type LPPoolListResponse struct {
	// A list of liquidity pools
	Items []LPPool `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPPoolListResponse) RawJSON

func (r LPPoolListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPoolListResponse) UnmarshalJSON

func (r *LPPoolListResponse) UnmarshalJSON(data []byte) error

type LPPoolPoolType

type LPPoolPoolType string

Type of a liquidity pool

const (
	LPPoolPoolTypePair     LPPoolPoolType = "pair"
	LPPoolPoolTypeMulti    LPPoolPoolType = "multi"
	LPPoolPoolTypeWeighted LPPoolPoolType = "weighted"
	LPPoolPoolTypeRange    LPPoolPoolType = "range"
)

type LPPoolService

type LPPoolService struct {
	Options []option.RequestOption
}

LPPoolService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPPoolService method instead.

func NewLPPoolService

func NewLPPoolService(opts ...option.RequestOption) (r LPPoolService)

NewLPPoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LPPoolService) List

Get a list of LP pools

func (*LPPoolService) ListHistorical

Get a list of LP pools

type LPPoolSolidlyAttributes

type LPPoolSolidlyAttributes struct {
	// True if pool is stable, false if volatile
	Stable bool `json:"stable,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Stable      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attributes for Solidly venue type pools

func (LPPoolSolidlyAttributes) RawJSON

func (r LPPoolSolidlyAttributes) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPoolSolidlyAttributes) UnmarshalJSON

func (r *LPPoolSolidlyAttributes) UnmarshalJSON(data []byte) error

type LPPoolUniswapV3Attributes

type LPPoolUniswapV3Attributes struct {
	// Pool fee
	Fee string `json:"fee,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Fee         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attributes for Uniswap V3 venue type pools

func (LPPoolUniswapV3Attributes) RawJSON

func (r LPPoolUniswapV3Attributes) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPoolUniswapV3Attributes) UnmarshalJSON

func (r *LPPoolUniswapV3Attributes) UnmarshalJSON(data []byte) error

type LPPosition

type LPPosition struct {
	// An EVM address
	Account Account `json:"account,required"`
	// A list of arbitrary precision decimals
	Amounts []Decimal `json:"amounts,required"`
	// Attributes for Uniswap V3 venue type positions
	Attributes LPPositionAttributes `json:"attributes,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	LPAmount Decimal `json:"lp_amount,required"`
	// An LP asset, either an Asset or a NFT
	LPAsset LPPositionLPAssetUnion `json:"lp_asset,required"`
	// An arbitrary precision decimal represented as a string
	Ownership string `json:"ownership,required"`
	// A liquidity pool
	Pool LPPool `json:"pool,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account          respjson.Field
		Amounts          respjson.Field
		Attributes       respjson.Field
		Blockstamp       respjson.Field
		LPAmount         respjson.Field
		LPAsset          respjson.Field
		Ownership        respjson.Field
		Pool             respjson.Field
		QuoteAssetSymbol respjson.Field
		Value            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A position in a liquidity pool

func (LPPosition) RawJSON

func (r LPPosition) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPosition) UnmarshalJSON

func (r *LPPosition) UnmarshalJSON(data []byte) error

type LPPositionAttributes

type LPPositionAttributes struct {
	// Whether the position is in range
	InRange bool `json:"in_range,required"`
	// An arbitrary precision decimal represented as a string
	Lower Decimal `json:"lower,required"`
	// An arbitrary precision decimal represented as a string
	Price Decimal `json:"price,required"`
	// Lower tick
	TickLower int64 `json:"tick_lower,required"`
	// Upper tick
	TickUpper int64 `json:"tick_upper,required"`
	// An arbitrary precision decimal represented as a string
	Upper Decimal `json:"upper,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InRange     respjson.Field
		Lower       respjson.Field
		Price       respjson.Field
		TickLower   respjson.Field
		TickUpper   respjson.Field
		Upper       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attributes for Uniswap V3 venue type positions

func (LPPositionAttributes) RawJSON

func (r LPPositionAttributes) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPositionAttributes) UnmarshalJSON

func (r *LPPositionAttributes) UnmarshalJSON(data []byte) error

type LPPositionLPAssetUnion

type LPPositionLPAssetUnion struct {
	// This field is a union of [AssetID], [int64]
	ID LPPositionLPAssetUnionID `json:"id"`
	// This field is from variant [Asset].
	Address string `json:"address"`
	// This field is from variant [Asset].
	Blockchain Blockchain `json:"blockchain"`
	// This field is from variant [Asset].
	Decimals int64 `json:"decimals"`
	// This field is from variant [Asset].
	Name string `json:"name"`
	// This field is from variant [Asset].
	Symbol string `json:"symbol"`
	// This field is from variant [NFT].
	Collection NFTCollection `json:"collection"`
	JSON       struct {
		ID         respjson.Field
		Address    respjson.Field
		Blockchain respjson.Field
		Decimals   respjson.Field
		Name       respjson.Field
		Symbol     respjson.Field
		Collection respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

LPPositionLPAssetUnion contains all possible properties and values from Asset, NFT.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (LPPositionLPAssetUnion) AsAsset

func (u LPPositionLPAssetUnion) AsAsset() (v Asset)

func (LPPositionLPAssetUnion) AsNFT

func (u LPPositionLPAssetUnion) AsNFT() (v NFT)

func (LPPositionLPAssetUnion) RawJSON

func (u LPPositionLPAssetUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPositionLPAssetUnion) UnmarshalJSON

func (r *LPPositionLPAssetUnion) UnmarshalJSON(data []byte) error

type LPPositionLPAssetUnionID

type LPPositionLPAssetUnionID struct {
	// This field will be present if the value is a [AssetID] instead of an object.
	OfString AssetID `json:",inline"`
	// This field will be present if the value is a [int64] instead of an object.
	OfInt int64 `json:",inline"`
	JSON  struct {
		OfString respjson.Field
		OfInt    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

LPPositionLPAssetUnionID is an implicit subunion of LPPositionLPAssetUnion. LPPositionLPAssetUnionID provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the LPPositionLPAssetUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]

func (*LPPositionLPAssetUnionID) UnmarshalJSON

func (r *LPPositionLPAssetUnionID) UnmarshalJSON(data []byte) error

type LPPositionListHistoricalParams

type LPPositionListHistoricalParams struct {

	// This field is a request body variant, only one variant field can be set. A
	// request to query positions by blockchain, venues and assets
	OfHistoricalLPPositionsByVenueAssetRequest *LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest `json:",inline"`
	// This field is a request body variant, only one variant field can be set. A
	// request to query positions by pool ids
	OfHistoricalLPPositionsByPoolIDsRequest *LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest `json:",inline"`
	// contains filtered or unexported fields
}

func (LPPositionListHistoricalParams) MarshalJSON

func (u LPPositionListHistoricalParams) MarshalJSON() ([]byte, error)

func (*LPPositionListHistoricalParams) UnmarshalJSON

func (r *LPPositionListHistoricalParams) UnmarshalJSON(data []byte) error

type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest

type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// A list of LP pool IDs
	LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Whether to exclude empty positions
	ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
	// contains filtered or unexported fields
}

A request to query positions by pool ids

The properties Accounts, Blockchain, From, LPPoolIDs, To are required.

func (LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest) MarshalJSON

func (*LPPositionListHistoricalParamsBodyHistoricalLPPositionsByPoolIDsRequest) UnmarshalJSON

type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest

type LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Whether to exclude empty positions
	ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
	// contains filtered or unexported fields
}

A request to query positions by blockchain, venues and assets

The properties Accounts, Assets, Blockchain, From, To, Venues are required.

func (LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest) MarshalJSON

func (*LPPositionListHistoricalParamsBodyHistoricalLPPositionsByVenueAssetRequest) UnmarshalJSON

type LPPositionListHistoricalResponse

type LPPositionListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange                 `json:"historical,required"`
	Items      []LPPositionListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPPositionListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*LPPositionListHistoricalResponse) UnmarshalJSON

func (r *LPPositionListHistoricalResponse) UnmarshalJSON(data []byte) error

type LPPositionListHistoricalResponseItem

type LPPositionListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of liquidity pool positions
	Items []LPPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPPositionListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*LPPositionListHistoricalResponseItem) UnmarshalJSON

func (r *LPPositionListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type LPPositionListParams

type LPPositionListParams struct {

	// This field is a request body variant, only one variant field can be set. A
	// request to query positions by blockchain, venues and assets
	OfLPPositionsByVenueAssetRequestInput *LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set. A
	// request to query positions by pool ids
	OfLPPositionsByPoolIDsRequestInput *LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (LPPositionListParams) MarshalJSON

func (u LPPositionListParams) MarshalJSON() ([]byte, error)

func (*LPPositionListParams) UnmarshalJSON

func (r *LPPositionListParams) UnmarshalJSON(data []byte) error

type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput

type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of LP pool IDs
	LPPoolIDs []string `json:"lp_pool_ids,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Whether to exclude empty positions
	ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

A request to query positions by pool ids

The properties Accounts, Blockchain, LPPoolIDs are required.

func (LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput) MarshalJSON

func (*LPPositionListParamsBodyLPPositionsByPoolIDsRequestInput) UnmarshalJSON

type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion

type LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion) MarshalJSON

func (*LPPositionListParamsBodyLPPositionsByPoolIDsRequestInputAtUnion) UnmarshalJSON

type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput

type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Whether to exclude empty positions
	ExcludeZeros param.Opt[bool] `json:"exclude_zeros,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

A request to query positions by blockchain, venues and assets

The properties Accounts, Assets, Blockchain, Venues are required.

func (LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput) MarshalJSON

func (*LPPositionListParamsBodyLPPositionsByVenueAssetRequestInput) UnmarshalJSON

type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion

type LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion) MarshalJSON

func (*LPPositionListParamsBodyLPPositionsByVenueAssetRequestInputAtUnion) UnmarshalJSON

type LPPositionListResponse

type LPPositionListResponse struct {
	// A list of liquidity pool positions
	Items []LPPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPPositionListResponse) RawJSON

func (r LPPositionListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPPositionListResponse) UnmarshalJSON

func (r *LPPositionListResponse) UnmarshalJSON(data []byte) error

type LPPositionService

type LPPositionService struct {
	Options []option.RequestOption
}

LPPositionService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPPositionService method instead.

func NewLPPositionService

func NewLPPositionService(opts ...option.RequestOption) (r LPPositionService)

NewLPPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LPPositionService) List

Get info on LP positions

func (*LPPositionService) ListHistorical

Get info on LP positions

type LPQuote

type LPQuote struct {
	// An EVM address
	Account Account `json:"account,required"`
	// A list of arbitrary precision decimals
	Amounts []Decimal `json:"amounts,required"`
	// A list of arbitrary precision decimals
	AmountsDelta []Decimal `json:"amounts_delta,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	Ownership string `json:"ownership,required"`
	// A liquidity pool
	Pool LPPool `json:"pool,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account          respjson.Field
		Amounts          respjson.Field
		AmountsDelta     respjson.Field
		Blockstamp       respjson.Field
		Ownership        respjson.Field
		Pool             respjson.Field
		QuoteAssetSymbol respjson.Field
		Value            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An LP quote

func (LPQuote) RawJSON

func (r LPQuote) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPQuote) UnmarshalJSON

func (r *LPQuote) UnmarshalJSON(data []byte) error

type LPService

type LPService struct {
	Options       []option.RequestOption
	Pools         LPPoolService
	Positions     LPPositionService
	DepositQuote  LPDepositQuoteService
	WithdrawQuote LPWithdrawQuoteService
}

LPService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPService method instead.

func NewLPService

func NewLPService(opts ...option.RequestOption) (r LPService)

NewLPService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type LPWithdrawQuoteNewParams

type LPWithdrawQuoteNewParams struct {
	// An EVM address
	Account Account `json:"account,required"`
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	LPPoolID string `json:"lp_pool_id,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Uniswap position specifier
	Specifier LPWithdrawQuoteNewParamsSpecifier `json:"specifier,omitzero"`
	// contains filtered or unexported fields
}

func (LPWithdrawQuoteNewParams) MarshalJSON

func (r LPWithdrawQuoteNewParams) MarshalJSON() (data []byte, err error)

func (*LPWithdrawQuoteNewParams) UnmarshalJSON

func (r *LPWithdrawQuoteNewParams) UnmarshalJSON(data []byte) error

type LPWithdrawQuoteNewParamsSpecifier

type LPWithdrawQuoteNewParamsSpecifier struct {
	// A NFT
	PositionNFT NFTParam `json:"position_nft,omitzero,required"`
	// contains filtered or unexported fields
}

Uniswap position specifier

The property PositionNFT is required.

func (LPWithdrawQuoteNewParamsSpecifier) MarshalJSON

func (r LPWithdrawQuoteNewParamsSpecifier) MarshalJSON() (data []byte, err error)

func (*LPWithdrawQuoteNewParamsSpecifier) UnmarshalJSON

func (r *LPWithdrawQuoteNewParamsSpecifier) UnmarshalJSON(data []byte) error

type LPWithdrawQuoteNewResponse

type LPWithdrawQuoteNewResponse struct {
	// An LP quote
	Items LPQuote `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LPWithdrawQuoteNewResponse) RawJSON

func (r LPWithdrawQuoteNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LPWithdrawQuoteNewResponse) UnmarshalJSON

func (r *LPWithdrawQuoteNewResponse) UnmarshalJSON(data []byte) error

type LPWithdrawQuoteService

type LPWithdrawQuoteService struct {
	Options []option.RequestOption
}

LPWithdrawQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLPWithdrawQuoteService method instead.

func NewLPWithdrawQuoteService

func NewLPWithdrawQuoteService(opts ...option.RequestOption) (r LPWithdrawQuoteService)

NewLPWithdrawQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LPWithdrawQuoteService) New

Simulate withdrawing liquidity from a specific existing LP position

type LendBorrowAPYs

type LendBorrowAPYs struct {
	// APY Data
	Base APY `json:"base,required"`
	// Array of APY
	Rewards []APY `json:"rewards,required"`
	// An arbitrary precision decimal represented as a string
	Total Decimal `json:"total,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Base        respjson.Field
		Rewards     respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

APY Data for lend/borrow markets

func (LendBorrowAPYs) RawJSON

func (r LendBorrowAPYs) RawJSON() string

Returns the unmodified JSON received from the API

func (*LendBorrowAPYs) UnmarshalJSON

func (r *LendBorrowAPYs) UnmarshalJSON(data []byte) error

type LendBorrowMarketID

type LendBorrowMarketID = string

type LendLendNewParams

type LendLendNewParams struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// contains filtered or unexported fields
}

func (LendLendNewParams) MarshalJSON

func (r LendLendNewParams) MarshalJSON() (data []byte, err error)

func (*LendLendNewParams) UnmarshalJSON

func (r *LendLendNewParams) UnmarshalJSON(data []byte) error

type LendLendService

type LendLendService struct {
	Options []option.RequestOption
}

LendLendService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendLendService method instead.

func NewLendLendService

func NewLendLendService(opts ...option.RequestOption) (r LendLendService)

NewLendLendService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LendLendService) New

func (r *LendLendService) New(ctx context.Context, body LendLendNewParams, opts ...option.RequestOption) (res *Execution, err error)

Lend an asset

type LendMarket

type LendMarket struct {
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	ID LendBorrowMarketID `json:"id,required"`
	// APY Data for lend/borrow markets
	APYs LendBorrowAPYs `json:"apys,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	Liquidity Decimal `json:"liquidity,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	TotalSupply Decimal `json:"total_supply,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		APYs             respjson.Field
		Asset            respjson.Field
		Blockstamp       respjson.Field
		Liquidity        respjson.Field
		QuoteAssetSymbol respjson.Field
		TotalSupply      respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A lend market

func (LendMarket) RawJSON

func (r LendMarket) RawJSON() string

Returns the unmodified JSON received from the API

func (*LendMarket) UnmarshalJSON

func (r *LendMarket) UnmarshalJSON(data []byte) error

type LendMarketListHistoricalParams

type LendMarketListHistoricalParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend markets by venues and assets
	OfHistoricalLendMarketsByVenuesAssetsRequest *LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend markets by IDs
	OfHistoricalLendMarketsByIDsRequest *LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest `json:",inline"`
	// contains filtered or unexported fields
}

func (LendMarketListHistoricalParams) MarshalJSON

func (u LendMarketListHistoricalParams) MarshalJSON() ([]byte, error)

func (*LendMarketListHistoricalParams) UnmarshalJSON

func (r *LendMarketListHistoricalParams) UnmarshalJSON(data []byte) error

type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest

type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend markets by IDs

The properties Blockchain, From, MarketIDs, To are required.

func (LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest) MarshalJSON

func (*LendMarketListHistoricalParamsBodyHistoricalLendMarketsByIDsRequest) UnmarshalJSON

type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest

type LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend markets by venues and assets

The properties Assets, Blockchain, From, To, Venues are required.

func (LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest) MarshalJSON

func (*LendMarketListHistoricalParamsBodyHistoricalLendMarketsByVenuesAssetsRequest) UnmarshalJSON

type LendMarketListHistoricalResponse

type LendMarketListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange                 `json:"historical,required"`
	Items      []LendMarketListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LendMarketListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*LendMarketListHistoricalResponse) UnmarshalJSON

func (r *LendMarketListHistoricalResponse) UnmarshalJSON(data []byte) error

type LendMarketListHistoricalResponseItem

type LendMarketListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of lend markets
	Items []LendMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LendMarketListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*LendMarketListHistoricalResponseItem) UnmarshalJSON

func (r *LendMarketListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type LendMarketListParams

type LendMarketListParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend markets by venues and assets
	OfLendMarketsByVenuesAssetsRequestInput *LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend markets by IDs
	OfLendMarketsByIDsRequestInput *LendMarketListParamsBodyLendMarketsByIDsRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (LendMarketListParams) MarshalJSON

func (u LendMarketListParams) MarshalJSON() ([]byte, error)

func (*LendMarketListParams) UnmarshalJSON

func (r *LendMarketListParams) UnmarshalJSON(data []byte) error

type LendMarketListParamsBodyLendMarketsByIDsRequestInput

type LendMarketListParamsBodyLendMarketsByIDsRequestInput struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend markets by IDs

The properties Blockchain, MarketIDs are required.

func (LendMarketListParamsBodyLendMarketsByIDsRequestInput) MarshalJSON

func (r LendMarketListParamsBodyLendMarketsByIDsRequestInput) MarshalJSON() (data []byte, err error)

func (*LendMarketListParamsBodyLendMarketsByIDsRequestInput) UnmarshalJSON

type LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion

type LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion) MarshalJSON

func (*LendMarketListParamsBodyLendMarketsByIDsRequestInputAtUnion) UnmarshalJSON

type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput

type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend markets by venues and assets

The properties Assets, Blockchain, Venues are required.

func (LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput) MarshalJSON

func (*LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInput) UnmarshalJSON

type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion

type LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion) MarshalJSON

func (*LendMarketListParamsBodyLendMarketsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON

type LendMarketListResponse

type LendMarketListResponse struct {
	// A list of lend markets
	Items []LendMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LendMarketListResponse) RawJSON

func (r LendMarketListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LendMarketListResponse) UnmarshalJSON

func (r *LendMarketListResponse) UnmarshalJSON(data []byte) error

type LendMarketService

type LendMarketService struct {
	Options []option.RequestOption
}

LendMarketService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendMarketService method instead.

func NewLendMarketService

func NewLendMarketService(opts ...option.RequestOption) (r LendMarketService)

NewLendMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LendMarketService) List

Get the current market rates for lending an asset

func (*LendMarketService) ListHistorical

Get the current market rates for lending an asset

type LendPosition

type LendPosition struct {
	// An EVM address
	Account Account `json:"account,required"`
	// Information about a specific block number and its timestamp
	Blockstamp        Blockstamp `json:"blockstamp,required"`
	CollateralEnabled bool       `json:"collateral_enabled,required"`
	// A lend market
	Market LendMarket `json:"market,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	SuppliedAmount Decimal `json:"supplied_amount,required"`
	// An arbitrary precision decimal represented as a string
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account           respjson.Field
		Blockstamp        respjson.Field
		CollateralEnabled respjson.Field
		Market            respjson.Field
		QuoteAssetSymbol  respjson.Field
		SuppliedAmount    respjson.Field
		Value             respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A lend position

func (LendPosition) RawJSON

func (r LendPosition) RawJSON() string

Returns the unmodified JSON received from the API

func (*LendPosition) UnmarshalJSON

func (r *LendPosition) UnmarshalJSON(data []byte) error

type LendPositionListHistoricalParams

type LendPositionListHistoricalParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend positions by venues and assets
	OfHistoricalLendPositionsByVenuesAssetsRequest *LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend positions by IDs
	OfHistoricalLendPositionsByIDsRequest *LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest `json:",inline"`
	// contains filtered or unexported fields
}

func (LendPositionListHistoricalParams) MarshalJSON

func (u LendPositionListHistoricalParams) MarshalJSON() ([]byte, error)

func (*LendPositionListHistoricalParams) UnmarshalJSON

func (r *LendPositionListHistoricalParams) UnmarshalJSON(data []byte) error

type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest

type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend positions by IDs

The properties Accounts, Blockchain, From, MarketIDs, To are required.

func (LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest) MarshalJSON

func (*LendPositionListHistoricalParamsBodyHistoricalLendPositionsByIDsRequest) UnmarshalJSON

type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest

type LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// Either a ISO8601 timestamp or a block number
	From TimestampOrBlockNumberUnionParam `json:"from,omitzero,required"`
	// Either a ISO8601 timestamp or a block number
	To TimestampOrBlockNumberUnionParam `json:"to,omitzero,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend positions by venues and assets

The properties Accounts, Assets, Blockchain, From, To, Venues are required.

func (LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest) MarshalJSON

func (*LendPositionListHistoricalParamsBodyHistoricalLendPositionsByVenuesAssetsRequest) UnmarshalJSON

type LendPositionListHistoricalResponse

type LendPositionListHistoricalResponse struct {
	// A range of blockstamps
	Historical OnChainHistoricalRange                   `json:"historical,required"`
	Items      []LendPositionListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LendPositionListHistoricalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*LendPositionListHistoricalResponse) UnmarshalJSON

func (r *LendPositionListHistoricalResponse) UnmarshalJSON(data []byte) error

type LendPositionListHistoricalResponseItem

type LendPositionListHistoricalResponseItem struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of lend positions
	Items []LendPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LendPositionListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*LendPositionListHistoricalResponseItem) UnmarshalJSON

func (r *LendPositionListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type LendPositionListParams

type LendPositionListParams struct {

	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend positions by venues and assets
	OfLendPositionsByVenuesAssetsRequestInput *LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Parameters for querying lend positions by IDs
	OfLendPositionsByIDsRequestInput *LendPositionListParamsBodyLendPositionsByIDsRequestInput `json:",inline"`
	// contains filtered or unexported fields
}

func (LendPositionListParams) MarshalJSON

func (u LendPositionListParams) MarshalJSON() ([]byte, error)

func (*LendPositionListParams) UnmarshalJSON

func (r *LendPositionListParams) UnmarshalJSON(data []byte) error

type LendPositionListParamsBodyLendPositionsByIDsRequestInput

type LendPositionListParamsBodyLendPositionsByIDsRequestInput struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of lend/borrow market IDs
	MarketIDs []LendBorrowMarketID `json:"market_ids,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend positions by IDs

The properties Accounts, Blockchain, MarketIDs are required.

func (LendPositionListParamsBodyLendPositionsByIDsRequestInput) MarshalJSON

func (*LendPositionListParamsBodyLendPositionsByIDsRequestInput) UnmarshalJSON

type LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion

type LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion) MarshalJSON

func (*LendPositionListParamsBodyLendPositionsByIDsRequestInputAtUnion) UnmarshalJSON

type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput

type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// Either a ISO8601 timestamp or a block number
	At LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion `json:"at,omitzero"`
	// contains filtered or unexported fields
}

Parameters for querying lend positions by venues and assets

The properties Accounts, Assets, Blockchain, Venues are required.

func (LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput) MarshalJSON

func (*LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInput) UnmarshalJSON

type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion

type LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion) MarshalJSON

func (*LendPositionListParamsBodyLendPositionsByVenuesAssetsRequestInputAtUnion) UnmarshalJSON

type LendPositionListResponse

type LendPositionListResponse struct {
	// A list of lend positions
	Items []LendPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LendPositionListResponse) RawJSON

func (r LendPositionListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LendPositionListResponse) UnmarshalJSON

func (r *LendPositionListResponse) UnmarshalJSON(data []byte) error

type LendPositionService

type LendPositionService struct {
	Options []option.RequestOption
}

LendPositionService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendPositionService method instead.

func NewLendPositionService

func NewLendPositionService(opts ...option.RequestOption) (r LendPositionService)

NewLendPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LendPositionService) List

Get info on lending positions

func (*LendPositionService) ListHistorical

Get info on lending positions

type LendService

type LendService struct {
	Options       []option.RequestOption
	Markets       LendMarketService
	Positions     LendPositionService
	Lend          LendLendService
	Withdraw      LendWithdrawService
	SetCollateral LendSetCollateralService
}

LendService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendService method instead.

func NewLendService

func NewLendService(opts ...option.RequestOption) (r LendService)

NewLendService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type LendSetCollateralNewParams

type LendSetCollateralNewParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	MarketID LendBorrowMarketID `json:"market_id,required"`
	Status   bool               `json:"status,required"`
	// contains filtered or unexported fields
}

func (LendSetCollateralNewParams) MarshalJSON

func (r LendSetCollateralNewParams) MarshalJSON() (data []byte, err error)

func (*LendSetCollateralNewParams) UnmarshalJSON

func (r *LendSetCollateralNewParams) UnmarshalJSON(data []byte) error

type LendSetCollateralService

type LendSetCollateralService struct {
	Options []option.RequestOption
}

LendSetCollateralService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendSetCollateralService method instead.

func NewLendSetCollateralService

func NewLendSetCollateralService(opts ...option.RequestOption) (r LendSetCollateralService)

NewLendSetCollateralService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LendSetCollateralService) New

Enable/disable a specific lending position to be used as collateral

type LendWithdrawNewParams

type LendWithdrawNewParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	MarketID LendBorrowMarketID `json:"market_id,required"`
	// An arbitrary precision decimal represented as a string
	Amount param.Opt[string] `json:"amount,omitzero"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset param.Opt[AssetID] `json:"asset,omitzero"`
	// contains filtered or unexported fields
}

func (LendWithdrawNewParams) MarshalJSON

func (r LendWithdrawNewParams) MarshalJSON() (data []byte, err error)

func (*LendWithdrawNewParams) UnmarshalJSON

func (r *LendWithdrawNewParams) UnmarshalJSON(data []byte) error

type LendWithdrawService

type LendWithdrawService struct {
	Options []option.RequestOption
}

LendWithdrawService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLendWithdrawService method instead.

func NewLendWithdrawService

func NewLendWithdrawService(opts ...option.RequestOption) (r LendWithdrawService)

NewLendWithdrawService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LendWithdrawService) New

Withdraw an asset

type LockMarket

type LockMarket struct {
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Asset       respjson.Field
		Blockchain  respjson.Field
		Venue       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A lock market

func (LockMarket) RawJSON

func (r LockMarket) RawJSON() string

Returns the unmodified JSON received from the API

func (*LockMarket) UnmarshalJSON

func (r *LockMarket) UnmarshalJSON(data []byte) error

type LockMarketListParams

type LockMarketListParams struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// contains filtered or unexported fields
}

func (LockMarketListParams) MarshalJSON

func (r LockMarketListParams) MarshalJSON() (data []byte, err error)

func (*LockMarketListParams) UnmarshalJSON

func (r *LockMarketListParams) UnmarshalJSON(data []byte) error

type LockMarketListResponse

type LockMarketListResponse struct {
	// A list of lock markets
	Items []LockMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LockMarketListResponse) RawJSON

func (r LockMarketListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LockMarketListResponse) UnmarshalJSON

func (r *LockMarketListResponse) UnmarshalJSON(data []byte) error

type LockMarketService

type LockMarketService struct {
	Options []option.RequestOption
}

LockMarketService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLockMarketService method instead.

func NewLockMarketService

func NewLockMarketService(opts ...option.RequestOption) (r LockMarketService)

NewLockMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LockMarketService) List

Get a list of markets where assets can be locked

type LockPosition

type LockPosition struct {
	// An EVM address
	Account Account `json:"account,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// An arbitrary precision decimal represented as a string
	LockedAmount Decimal `json:"locked_amount,required"`
	// A NFT
	LockedAsset NFT `json:"locked_asset,required"`
	// A lock market
	Market LockMarket `json:"market,required"`
	// ISO8601 Timestamp
	UnlockedAt Timestamp `json:"unlocked_at,required"`
	Used       bool      `json:"used,required"`
	// An arbitrary precision decimal represented as a string
	VotingPower Decimal `json:"voting_power,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account      respjson.Field
		Blockstamp   respjson.Field
		LockedAmount respjson.Field
		LockedAsset  respjson.Field
		Market       respjson.Field
		UnlockedAt   respjson.Field
		Used         respjson.Field
		VotingPower  respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A lock position

func (LockPosition) RawJSON

func (r LockPosition) RawJSON() string

Returns the unmodified JSON received from the API

func (*LockPosition) UnmarshalJSON

func (r *LockPosition) UnmarshalJSON(data []byte) error

type LockPositionListParams

type LockPositionListParams struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// contains filtered or unexported fields
}

func (LockPositionListParams) MarshalJSON

func (r LockPositionListParams) MarshalJSON() (data []byte, err error)

func (*LockPositionListParams) UnmarshalJSON

func (r *LockPositionListParams) UnmarshalJSON(data []byte) error

type LockPositionListResponse

type LockPositionListResponse struct {
	// A list of lock positions
	Items []LockPosition `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LockPositionListResponse) RawJSON

func (r LockPositionListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*LockPositionListResponse) UnmarshalJSON

func (r *LockPositionListResponse) UnmarshalJSON(data []byte) error

type LockPositionService

type LockPositionService struct {
	Options []option.RequestOption
}

LockPositionService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLockPositionService method instead.

func NewLockPositionService

func NewLockPositionService(opts ...option.RequestOption) (r LockPositionService)

NewLockPositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LockPositionService) List

Get info on locked positions

type LockService

type LockService struct {
	Options   []option.RequestOption
	Markets   LockMarketService
	Positions LockPositionService
}

LockService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLockService method instead.

func NewLockService

func NewLockService(opts ...option.RequestOption) (r LockService)

NewLockService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type MoveNewParams

type MoveNewParams struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	Asset AssetIDOrAddressEVMOrAssetSymbol `json:"asset,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// An EVM address
	To Account `json:"to,required"`
	// contains filtered or unexported fields
}

func (MoveNewParams) MarshalJSON

func (r MoveNewParams) MarshalJSON() (data []byte, err error)

func (*MoveNewParams) UnmarshalJSON

func (r *MoveNewParams) UnmarshalJSON(data []byte) error

type MoveService

type MoveService struct {
	Options []option.RequestOption
}

MoveService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMoveService method instead.

func NewMoveService

func NewMoveService(opts ...option.RequestOption) (r MoveService)

NewMoveService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MoveService) New

func (r *MoveService) New(ctx context.Context, body MoveNewParams, opts ...option.RequestOption) (res *Execution, err error)

Move balance from one address to another

type NFT

type NFT struct {
	// The NFT id
	ID int64 `json:"id,required"`
	// A NFT Collection
	Collection NFTCollection `json:"collection,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Collection  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A NFT

func (NFT) RawJSON

func (r NFT) RawJSON() string

Returns the unmodified JSON received from the API

func (NFT) ToParam

func (r NFT) ToParam() NFTParam

ToParam converts this NFT to a NFTParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with NFTParam.Overrides()

func (*NFT) UnmarshalJSON

func (r *NFT) UnmarshalJSON(data []byte) error

type NFTCollection

type NFTCollection struct {
	// The NFT Collection's address
	Address string `json:"address,required"`
	// Data about a blockchain
	Blockchain NFTCollectionBlockchain `json:"blockchain"`
	// The NFT Collection's name
	Name string `json:"name"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Address     respjson.Field
		Blockchain  respjson.Field
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A NFT Collection

func (NFTCollection) RawJSON

func (r NFTCollection) RawJSON() string

Returns the unmodified JSON received from the API

func (NFTCollection) ToParam

func (r NFTCollection) ToParam() NFTCollectionParam

ToParam converts this NFTCollection to a NFTCollectionParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with NFTCollectionParam.Overrides()

func (*NFTCollection) UnmarshalJSON

func (r *NFTCollection) UnmarshalJSON(data []byte) error

type NFTCollectionBlockchain

type NFTCollectionBlockchain struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	ID BlockchainID `json:"id,required"`
	// Data about an EVM blockchain
	ChainData EVMChainData `json:"chain_data,required"`
	// Blockchain ecosystem
	//
	// Any of "evm".
	ChainType ChainType `json:"chain_type,required"`
	// The blockchain's explorer URL
	ExplorerURL string `json:"explorer_url,required"`
	// BlockchainName
	Name BlockchainName `json:"name,required"`
	// Blockchain's network
	Network NetworkName `json:"network,required"`
	// A blockchain symbol
	Symbol BlockchainSymbol `json:"symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ChainData   respjson.Field
		ChainType   respjson.Field
		ExplorerURL respjson.Field
		Name        respjson.Field
		Network     respjson.Field
		Symbol      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Data about a blockchain

func (NFTCollectionBlockchain) RawJSON

func (r NFTCollectionBlockchain) RawJSON() string

Returns the unmodified JSON received from the API

func (*NFTCollectionBlockchain) UnmarshalJSON

func (r *NFTCollectionBlockchain) UnmarshalJSON(data []byte) error

type NFTCollectionBlockchainParam

type NFTCollectionBlockchainParam struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	ID BlockchainID `json:"id,required"`
	// Data about an EVM blockchain
	ChainData EVMChainDataParam `json:"chain_data,omitzero,required"`
	// Blockchain ecosystem
	//
	// Any of "evm".
	ChainType ChainType `json:"chain_type,omitzero,required"`
	// The blockchain's explorer URL
	ExplorerURL string `json:"explorer_url,required"`
	// BlockchainName
	Name BlockchainName `json:"name,required"`
	// Blockchain's network
	Network NetworkName `json:"network,required"`
	// A blockchain symbol
	Symbol BlockchainSymbol `json:"symbol,required"`
	// contains filtered or unexported fields
}

Data about a blockchain

The properties ID, ChainData, ChainType, ExplorerURL, Name, Network, Symbol are required.

func (NFTCollectionBlockchainParam) MarshalJSON

func (r NFTCollectionBlockchainParam) MarshalJSON() (data []byte, err error)

func (*NFTCollectionBlockchainParam) UnmarshalJSON

func (r *NFTCollectionBlockchainParam) UnmarshalJSON(data []byte) error

type NFTCollectionParam

type NFTCollectionParam struct {
	// The NFT Collection's address
	Address string `json:"address,required"`
	// contains filtered or unexported fields
}

A NFT Collection

The property Address is required.

func (NFTCollectionParam) MarshalJSON

func (r NFTCollectionParam) MarshalJSON() (data []byte, err error)

func (*NFTCollectionParam) UnmarshalJSON

func (r *NFTCollectionParam) UnmarshalJSON(data []byte) error

type NFTParam

type NFTParam struct {
	// The NFT id
	ID int64 `json:"id,required"`
	// A NFT Collection
	Collection NFTCollectionParam `json:"collection,omitzero,required"`
	// contains filtered or unexported fields
}

A NFT

The properties ID, Collection are required.

func (NFTParam) MarshalJSON

func (r NFTParam) MarshalJSON() (data []byte, err error)

func (*NFTParam) UnmarshalJSON

func (r *NFTParam) UnmarshalJSON(data []byte) error

type NetworkName

type NetworkName = string

type OffChainHistoricalRange

type OffChainHistoricalRange struct {
	// ISO8601 Timestamp
	From Timestamp `json:"from,required"`
	// ISO8601 Timestamp
	To Timestamp `json:"to,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		From        respjson.Field
		To          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A range of timestamps

func (OffChainHistoricalRange) RawJSON

func (r OffChainHistoricalRange) RawJSON() string

Returns the unmodified JSON received from the API

func (*OffChainHistoricalRange) UnmarshalJSON

func (r *OffChainHistoricalRange) UnmarshalJSON(data []byte) error

type OnChainHistoricalRange

type OnChainHistoricalRange struct {
	// Information about a specific block number and its timestamp
	From Blockstamp `json:"from,required"`
	// Information about a specific block number and its timestamp
	To Blockstamp `json:"to,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		From        respjson.Field
		To          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A range of blockstamps

func (OnChainHistoricalRange) RawJSON

func (r OnChainHistoricalRange) RawJSON() string

Returns the unmodified JSON received from the API

func (*OnChainHistoricalRange) UnmarshalJSON

func (r *OnChainHistoricalRange) UnmarshalJSON(data []byte) error

type Pagination added in v1.21.0

type Pagination = shared.Pagination

Pagination response details.

This is an alias to an internal type.

type Price

type Price struct {
	// An asset symbol
	AssetSymbol AssetSymbol `json:"asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	Change1h string `json:"change_1h,required"`
	// An arbitrary precision decimal represented as a string
	Change1y string `json:"change_1y,required"`
	// An arbitrary precision decimal represented as a string
	Change24h string `json:"change_24h,required"`
	// An arbitrary precision decimal represented as a string
	Change30d string `json:"change_30d,required"`
	// An arbitrary precision decimal represented as a string
	Change7d string `json:"change_7d,required"`
	// An arbitrary precision decimal represented as a string
	MarketCap string `json:"market_cap,required"`
	// An arbitrary precision decimal represented as a string
	Price Decimal `json:"price,required"`
	// An asset symbol
	QuoteAssetSymbol AssetSymbol `json:"quote_asset_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AssetSymbol      respjson.Field
		Change1h         respjson.Field
		Change1y         respjson.Field
		Change24h        respjson.Field
		Change30d        respjson.Field
		Change7d         respjson.Field
		MarketCap        respjson.Field
		Price            respjson.Field
		QuoteAssetSymbol respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A price

func (Price) RawJSON

func (r Price) RawJSON() string

Returns the unmodified JSON received from the API

func (*Price) UnmarshalJSON

func (r *Price) UnmarshalJSON(data []byte) error

type PriceListHistoricalParams

type PriceListHistoricalParams struct {
	// A list of asset symbols
	AssetSymbols []AssetSymbol `json:"asset_symbols,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (PriceListHistoricalParams) MarshalJSON

func (r PriceListHistoricalParams) MarshalJSON() (data []byte, err error)

func (*PriceListHistoricalParams) UnmarshalJSON

func (r *PriceListHistoricalParams) UnmarshalJSON(data []byte) error

type PriceListHistoricalResponse

type PriceListHistoricalResponse struct {
	// A range of timestamps
	Historical OffChainHistoricalRange           `json:"historical,required"`
	Items      []PriceListHistoricalResponseItem `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Historical  respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PriceListHistoricalResponse) RawJSON

func (r PriceListHistoricalResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*PriceListHistoricalResponse) UnmarshalJSON

func (r *PriceListHistoricalResponse) UnmarshalJSON(data []byte) error

type PriceListHistoricalResponseItem

type PriceListHistoricalResponseItem struct {
	// Array of price
	Items []Price `json:"items,required"`
	// ISO8601 Timestamp
	Timestamp Timestamp `json:"timestamp,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		Timestamp   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PriceListHistoricalResponseItem) RawJSON

Returns the unmodified JSON received from the API

func (*PriceListHistoricalResponseItem) UnmarshalJSON

func (r *PriceListHistoricalResponseItem) UnmarshalJSON(data []byte) error

type PriceListParams

type PriceListParams struct {
	// A list of asset symbols
	AssetSymbols []AssetSymbol `json:"asset_symbols,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[AssetSymbol] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (PriceListParams) MarshalJSON

func (r PriceListParams) MarshalJSON() (data []byte, err error)

func (*PriceListParams) UnmarshalJSON

func (r *PriceListParams) UnmarshalJSON(data []byte) error

type PriceListResponse

type PriceListResponse struct {
	// Array of price
	Items []Price `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PriceListResponse) RawJSON

func (r PriceListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*PriceListResponse) UnmarshalJSON

func (r *PriceListResponse) UnmarshalJSON(data []byte) error

type PriceService

type PriceService struct {
	Options []option.RequestOption
}

PriceService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPriceService method instead.

func NewPriceService

func NewPriceService(opts ...option.RequestOption) (r PriceService)

NewPriceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PriceService) List

func (r *PriceService) List(ctx context.Context, body PriceListParams, opts ...option.RequestOption) (res *PriceListResponse, err error)

Get a list of asset prices

func (*PriceService) ListHistorical

Get a list of asset prices

type QuoteInfo0x

type QuoteInfo0x struct {
	// An arbitrary precision decimal represented as a string
	EstimatedGasUsed string `json:"estimated_gas_used,required"`
	// A route in a 0x quote
	Route QuoteInfo0xRoute `json:"route,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EstimatedGasUsed respjson.Field
		Route            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Quote info for 0x

func (QuoteInfo0x) RawJSON

func (r QuoteInfo0x) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfo0x) UnmarshalJSON

func (r *QuoteInfo0x) UnmarshalJSON(data []byte) error

type QuoteInfo0xFill

type QuoteInfo0xFill struct {
	// An EVM address
	From          AddressEVM `json:"from,required"`
	ProportionBps int64      `json:"proportion_bps,required"`
	Source        string     `json:"source,required"`
	// An EVM address
	To AddressEVM `json:"to,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		From          respjson.Field
		ProportionBps respjson.Field
		Source        respjson.Field
		To            respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A fill in a 0x quote

func (QuoteInfo0xFill) RawJSON

func (r QuoteInfo0xFill) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfo0xFill) UnmarshalJSON

func (r *QuoteInfo0xFill) UnmarshalJSON(data []byte) error

type QuoteInfo0xRoute

type QuoteInfo0xRoute struct {
	// A list of fills in a 0x quote
	Fills []QuoteInfo0xFill `json:"fills,required"`
	// A list of tokens in a 0x quote
	Tokens []QuoteInfo0xToken `json:"tokens,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Fills       respjson.Field
		Tokens      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A route in a 0x quote

func (QuoteInfo0xRoute) RawJSON

func (r QuoteInfo0xRoute) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfo0xRoute) UnmarshalJSON

func (r *QuoteInfo0xRoute) UnmarshalJSON(data []byte) error

type QuoteInfo0xToken

type QuoteInfo0xToken struct {
	// An EVM address
	Address AddressEVM `json:"address,required"`
	Symbol  string     `json:"symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Address     respjson.Field
		Symbol      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A token in a 0x quote

func (QuoteInfo0xToken) RawJSON

func (r QuoteInfo0xToken) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfo0xToken) UnmarshalJSON

func (r *QuoteInfo0xToken) UnmarshalJSON(data []byte) error

type QuoteInfoCurve

type QuoteInfoCurve struct {
	IIndex int64 `json:"i_index,required"`
	JIndex int64 `json:"j_index,required"`
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	PoolID   string `json:"pool_id,required"`
	SwapType string `json:"swap_type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IIndex      respjson.Field
		JIndex      respjson.Field
		PoolID      respjson.Field
		SwapType    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Quote info for Curve

func (QuoteInfoCurve) RawJSON

func (r QuoteInfoCurve) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfoCurve) UnmarshalJSON

func (r *QuoteInfoCurve) UnmarshalJSON(data []byte) error

type QuoteInfoUniswapV2

type QuoteInfoUniswapV2 struct {
	// A list of LP pool IDs
	PoolIDs []string `json:"pool_ids,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PoolIDs     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Quote info for Uniswap V2

func (QuoteInfoUniswapV2) RawJSON

func (r QuoteInfoUniswapV2) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfoUniswapV2) UnmarshalJSON

func (r *QuoteInfoUniswapV2) UnmarshalJSON(data []byte) error

type QuoteInfoUniswapV3

type QuoteInfoUniswapV3 struct {
	// A list of LP pool IDs
	PoolIDs []string `json:"pool_ids,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		PoolIDs     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Quote info for Uniswap V3

func (QuoteInfoUniswapV3) RawJSON

func (r QuoteInfoUniswapV3) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuoteInfoUniswapV3) UnmarshalJSON

func (r *QuoteInfoUniswapV3) UnmarshalJSON(data []byte) error

type RegionName

type RegionName = shared.RegionName

Region the resource is in.

This is an alias to an internal type.

type RegistryAssetListParams

type RegistryAssetListParams struct {
	// An asset ID, represented as a TypeID with `asset` prefix
	ID param.Opt[string] `json:"id,omitzero"`
	// An asset symbol
	Symbol param.Opt[string] `json:"symbol,omitzero"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryAssetListParams) MarshalJSON

func (r RegistryAssetListParams) MarshalJSON() (data []byte, err error)

func (*RegistryAssetListParams) UnmarshalJSON

func (r *RegistryAssetListParams) UnmarshalJSON(data []byte) error

type RegistryAssetListResponse

type RegistryAssetListResponse struct {
	// Response for multiple assets
	Items []Asset `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryAssetListResponse) RawJSON

func (r RegistryAssetListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryAssetListResponse) UnmarshalJSON

func (r *RegistryAssetListResponse) UnmarshalJSON(data []byte) error

type RegistryAssetService

type RegistryAssetService struct {
	Options []option.RequestOption
}

RegistryAssetService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryAssetService method instead.

func NewRegistryAssetService

func NewRegistryAssetService(opts ...option.RequestOption) (r RegistryAssetService)

NewRegistryAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryAssetService) List

List supported assets, optionally filtered by blockchain

type RegistryBlockchainListParams

type RegistryBlockchainListParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	ID param.Opt[string] `json:"id,omitzero"`
	// A blockchain symbol
	Symbol param.Opt[string] `json:"symbol,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryBlockchainListParams) MarshalJSON

func (r RegistryBlockchainListParams) MarshalJSON() (data []byte, err error)

func (*RegistryBlockchainListParams) UnmarshalJSON

func (r *RegistryBlockchainListParams) UnmarshalJSON(data []byte) error

type RegistryBlockchainListResponse

type RegistryBlockchainListResponse struct {
	// A list of blockchains
	Items []Blockchain `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryBlockchainListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*RegistryBlockchainListResponse) UnmarshalJSON

func (r *RegistryBlockchainListResponse) UnmarshalJSON(data []byte) error

type RegistryBlockchainService

type RegistryBlockchainService struct {
	Options []option.RequestOption
}

RegistryBlockchainService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryBlockchainService method instead.

func NewRegistryBlockchainService

func NewRegistryBlockchainService(opts ...option.RequestOption) (r RegistryBlockchainService)

NewRegistryBlockchainService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryBlockchainService) List

List supported blockchains

type RegistryBorrowMarketListParams

type RegistryBorrowMarketListParams struct {
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	ID param.Opt[string] `json:"id,omitzero"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryBorrowMarketListParams) MarshalJSON

func (r RegistryBorrowMarketListParams) MarshalJSON() (data []byte, err error)

func (*RegistryBorrowMarketListParams) UnmarshalJSON

func (r *RegistryBorrowMarketListParams) UnmarshalJSON(data []byte) error

type RegistryBorrowMarketListResponse

type RegistryBorrowMarketListResponse struct {
	// A list of registry data for lend borrow markets
	Items []RegistryLendBorrowMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryBorrowMarketListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*RegistryBorrowMarketListResponse) UnmarshalJSON

func (r *RegistryBorrowMarketListResponse) UnmarshalJSON(data []byte) error

type RegistryBorrowMarketService

type RegistryBorrowMarketService struct {
	Options []option.RequestOption
}

RegistryBorrowMarketService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryBorrowMarketService method instead.

func NewRegistryBorrowMarketService

func NewRegistryBorrowMarketService(opts ...option.RequestOption) (r RegistryBorrowMarketService)

NewRegistryBorrowMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryBorrowMarketService) List

List borrow markets in the registry, optionally filtered by blockchain, assets or venues

type RegistryErrorListParams

type RegistryErrorListParams struct {
	Errors []string `json:"errors,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryErrorListParams) MarshalJSON

func (r RegistryErrorListParams) MarshalJSON() (data []byte, err error)

func (*RegistryErrorListParams) UnmarshalJSON

func (r *RegistryErrorListParams) UnmarshalJSON(data []byte) error

type RegistryErrorService

type RegistryErrorService struct {
	Options []option.RequestOption
}

RegistryErrorService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryErrorService method instead.

func NewRegistryErrorService

func NewRegistryErrorService(opts ...option.RequestOption) (r RegistryErrorService)

NewRegistryErrorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryErrorService) List

A list with one example of each error type

type RegistryLPPool

type RegistryLPPool struct {
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	ID string `json:"id,required"`
	// Response for multiple assets
	Assets []Asset `json:"assets,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Assets      respjson.Field
		Blockchain  respjson.Field
		Venue       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Registry data for an LP pool

func (RegistryLPPool) RawJSON

func (r RegistryLPPool) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryLPPool) UnmarshalJSON

func (r *RegistryLPPool) UnmarshalJSON(data []byte) error

type RegistryLPPoolListParams

type RegistryLPPoolListParams struct {
	// A LP pool ID, represented as a TypeID with `lp_pool` prefix
	ID param.Opt[string] `json:"id,omitzero"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryLPPoolListParams) MarshalJSON

func (r RegistryLPPoolListParams) MarshalJSON() (data []byte, err error)

func (*RegistryLPPoolListParams) UnmarshalJSON

func (r *RegistryLPPoolListParams) UnmarshalJSON(data []byte) error

type RegistryLPPoolListResponse

type RegistryLPPoolListResponse struct {
	// A list of registry data for LP pools
	Items []RegistryLPPool `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryLPPoolListResponse) RawJSON

func (r RegistryLPPoolListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryLPPoolListResponse) UnmarshalJSON

func (r *RegistryLPPoolListResponse) UnmarshalJSON(data []byte) error

type RegistryLPPoolService

type RegistryLPPoolService struct {
	Options []option.RequestOption
}

RegistryLPPoolService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryLPPoolService method instead.

func NewRegistryLPPoolService

func NewRegistryLPPoolService(opts ...option.RequestOption) (r RegistryLPPoolService)

NewRegistryLPPoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryLPPoolService) List

List LP pools in the registry, optionally filtered by blockchain, assets or venues

type RegistryLendBorrowMarket

type RegistryLendBorrowMarket struct {
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	ID LendBorrowMarketID `json:"id,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Asset       respjson.Field
		Blockchain  respjson.Field
		Venue       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Registry data for a lend borrow market

func (RegistryLendBorrowMarket) RawJSON

func (r RegistryLendBorrowMarket) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryLendBorrowMarket) UnmarshalJSON

func (r *RegistryLendBorrowMarket) UnmarshalJSON(data []byte) error

type RegistryLendMarketListParams

type RegistryLendMarketListParams struct {
	// A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
	// prefix
	ID param.Opt[string] `json:"id,omitzero"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain param.Opt[BlockchainID] `json:"blockchain,omitzero"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryLendMarketListParams) MarshalJSON

func (r RegistryLendMarketListParams) MarshalJSON() (data []byte, err error)

func (*RegistryLendMarketListParams) UnmarshalJSON

func (r *RegistryLendMarketListParams) UnmarshalJSON(data []byte) error

type RegistryLendMarketListResponse

type RegistryLendMarketListResponse struct {
	// A list of registry data for lend borrow markets
	Items []RegistryLendBorrowMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryLendMarketListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*RegistryLendMarketListResponse) UnmarshalJSON

func (r *RegistryLendMarketListResponse) UnmarshalJSON(data []byte) error

type RegistryLendMarketService

type RegistryLendMarketService struct {
	Options []option.RequestOption
}

RegistryLendMarketService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryLendMarketService method instead.

func NewRegistryLendMarketService

func NewRegistryLendMarketService(opts ...option.RequestOption) (r RegistryLendMarketService)

NewRegistryLendMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryLendMarketService) List

List lend markets in the registry, optionally filtered by blockchain, assets or venues

type RegistryService

type RegistryService struct {
	Options       []option.RequestOption
	Assets        RegistryAssetService
	Blockchains   RegistryBlockchainService
	Venues        RegistryVenueService
	Errors        RegistryErrorService
	LendMarkets   RegistryLendMarketService
	BorrowMarkets RegistryBorrowMarketService
	LPPools       RegistryLPPoolService
}

RegistryService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryService method instead.

func NewRegistryService

func NewRegistryService(opts ...option.RequestOption) (r RegistryService)

NewRegistryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type RegistryVenueListParams

type RegistryVenueListParams struct {
	// A venue ID, represented as a TypeID with `venue` prefix
	ID param.Opt[string] `json:"id,omitzero"`
	// A venue symbol
	Symbol param.Opt[string] `json:"symbol,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryVenueListParams) MarshalJSON

func (r RegistryVenueListParams) MarshalJSON() (data []byte, err error)

func (*RegistryVenueListParams) UnmarshalJSON

func (r *RegistryVenueListParams) UnmarshalJSON(data []byte) error

type RegistryVenueListResponse

type RegistryVenueListResponse struct {
	// A list of venues
	Items []Venue `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryVenueListResponse) RawJSON

func (r RegistryVenueListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryVenueListResponse) UnmarshalJSON

func (r *RegistryVenueListResponse) UnmarshalJSON(data []byte) error

type RegistryVenueService

type RegistryVenueService struct {
	Options []option.RequestOption
}

RegistryVenueService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegistryVenueService method instead.

func NewRegistryVenueService

func NewRegistryVenueService(opts ...option.RequestOption) (r RegistryVenueService)

NewRegistryVenueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RegistryVenueService) List

List supported venues

type ResourceStatus

type ResourceStatus = shared.ResourceStatus

Status of the resource.

This is an alias to an internal type.

type SellQuote

type SellQuote struct {
	// Data about a blockchain
	Blockchain Blockchain `json:"blockchain,required"`
	// Estimated cost of an operation
	FeeEstimate SellQuoteFeeEstimate `json:"fee_estimate,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// Quote info for sell quotes
	QuoteInfo SellQuoteQuoteInfoUnion `json:"quote_info,required"`
	// An arbitrary precision decimal represented as a string
	QuoteValue string `json:"quote_value,required"`
	// An arbitrary precision decimal represented as a string
	ReceiveAmount Decimal `json:"receive_amount,required"`
	// On-chain asset (aka token)
	ReceiveAsset Asset `json:"receive_asset,required"`
	// An arbitrary precision decimal represented as a string
	SpendAmount Decimal `json:"spend_amount,required"`
	// On-chain asset (aka token)
	SpendAsset Asset `json:"spend_asset,required"`
	// On-chain venue
	Venue Venue `json:"venue,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockchain       respjson.Field
		FeeEstimate      respjson.Field
		QuoteAssetSymbol respjson.Field
		QuoteInfo        respjson.Field
		QuoteValue       respjson.Field
		ReceiveAmount    respjson.Field
		ReceiveAsset     respjson.Field
		SpendAmount      respjson.Field
		SpendAsset       respjson.Field
		Venue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A sell quote

func (SellQuote) RawJSON

func (r SellQuote) RawJSON() string

Returns the unmodified JSON received from the API

func (*SellQuote) UnmarshalJSON

func (r *SellQuote) UnmarshalJSON(data []byte) error

type SellQuoteFeeEstimate

type SellQuoteFeeEstimate struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// On-chain asset (aka token)
	Asset Asset `json:"asset,required"`
	// An arbitrary precision decimal represented as a string
	Cost string `json:"cost,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount           respjson.Field
		Asset            respjson.Field
		Cost             respjson.Field
		QuoteAssetSymbol respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Estimated cost of an operation

func (SellQuoteFeeEstimate) RawJSON

func (r SellQuoteFeeEstimate) RawJSON() string

Returns the unmodified JSON received from the API

func (*SellQuoteFeeEstimate) UnmarshalJSON

func (r *SellQuoteFeeEstimate) UnmarshalJSON(data []byte) error

type SellQuoteListParams

type SellQuoteListParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
	// An arbitrary precision decimal represented as a string
	SpendAmount Decimal `json:"spend_amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (SellQuoteListParams) MarshalJSON

func (r SellQuoteListParams) MarshalJSON() (data []byte, err error)

func (*SellQuoteListParams) UnmarshalJSON

func (r *SellQuoteListParams) UnmarshalJSON(data []byte) error

type SellQuoteListResponse

type SellQuoteListResponse struct {
	// A list of sell quotes
	Items []SellQuote `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SellQuoteListResponse) RawJSON

func (r SellQuoteListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SellQuoteListResponse) UnmarshalJSON

func (r *SellQuoteListResponse) UnmarshalJSON(data []byte) error

type SellQuoteQuoteInfoUnion

type SellQuoteQuoteInfoUnion struct {
	// This field is from variant [QuoteInfoCurve].
	IIndex int64 `json:"i_index"`
	// This field is from variant [QuoteInfoCurve].
	JIndex int64 `json:"j_index"`
	// This field is from variant [QuoteInfoCurve].
	PoolID string `json:"pool_id"`
	// This field is from variant [QuoteInfoCurve].
	SwapType string   `json:"swap_type"`
	PoolIDs  []string `json:"pool_ids"`
	// This field is from variant [QuoteInfo0x].
	EstimatedGasUsed string `json:"estimated_gas_used"`
	// This field is from variant [QuoteInfo0x].
	Route QuoteInfo0xRoute `json:"route"`
	JSON  struct {
		IIndex           respjson.Field
		JIndex           respjson.Field
		PoolID           respjson.Field
		SwapType         respjson.Field
		PoolIDs          respjson.Field
		EstimatedGasUsed respjson.Field
		Route            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SellQuoteQuoteInfoUnion contains all possible properties and values from QuoteInfoCurve, QuoteInfoUniswapV2, QuoteInfoUniswapV3, QuoteInfo0x.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (SellQuoteQuoteInfoUnion) AsQuoteInfo0x

func (u SellQuoteQuoteInfoUnion) AsQuoteInfo0x() (v QuoteInfo0x)

func (SellQuoteQuoteInfoUnion) AsQuoteInfoCurve

func (u SellQuoteQuoteInfoUnion) AsQuoteInfoCurve() (v QuoteInfoCurve)

func (SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2

func (u SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV2() (v QuoteInfoUniswapV2)

func (SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3

func (u SellQuoteQuoteInfoUnion) AsQuoteInfoUniswapV3() (v QuoteInfoUniswapV3)

func (SellQuoteQuoteInfoUnion) RawJSON

func (u SellQuoteQuoteInfoUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*SellQuoteQuoteInfoUnion) UnmarshalJSON

func (r *SellQuoteQuoteInfoUnion) UnmarshalJSON(data []byte) error

type SellQuoteService

type SellQuoteService struct {
	Options []option.RequestOption
}

SellQuoteService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSellQuoteService method instead.

func NewSellQuoteService

func NewSellQuoteService(opts ...option.RequestOption) (r SellQuoteService)

NewSellQuoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SellQuoteService) List

Get quotes for selling an exact amount of an asset at current market rate

type SellSellNewParams

type SellSellNewParams struct {
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	ReceiveAsset AssetIDOrAddressEVMOrAssetSymbol `json:"receive_asset,required"`
	// An arbitrary precision decimal represented as a string
	SpendAmount Decimal `json:"spend_amount,required"`
	// An asset ID, represented as a TypeID with `asset` prefix
	SpendAsset AssetIDOrAddressEVMOrAssetSymbol `json:"spend_asset,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An arbitrary precision decimal represented as a string
	Slippage param.Opt[string] `json:"slippage,omitzero"`
	// contains filtered or unexported fields
}

func (SellSellNewParams) MarshalJSON

func (r SellSellNewParams) MarshalJSON() (data []byte, err error)

func (*SellSellNewParams) UnmarshalJSON

func (r *SellSellNewParams) UnmarshalJSON(data []byte) error

type SellSellService

type SellSellService struct {
	Options []option.RequestOption
}

SellSellService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSellSellService method instead.

func NewSellSellService

func NewSellSellService(opts ...option.RequestOption) (r SellSellService)

NewSellSellService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SellSellService) New

func (r *SellSellService) New(ctx context.Context, body SellSellNewParams, opts ...option.RequestOption) (res *Execution, err error)

Sell an asset for another asset

type SellService

type SellService struct {
	Options []option.RequestOption
	Quotes  SellQuoteService
	Sell    SellSellService
}

SellService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSellService method instead.

func NewSellService

func NewSellService(opts ...option.RequestOption) (r SellService)

NewSellService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Timestamp

type Timestamp = string

type TimestampOrBlockNumberUnionParam

type TimestampOrBlockNumberUnionParam struct {
	OfString param.Opt[Timestamp]   `json:",omitzero,inline"`
	OfInt    param.Opt[BlockNumber] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (TimestampOrBlockNumberUnionParam) MarshalJSON

func (u TimestampOrBlockNumberUnionParam) MarshalJSON() ([]byte, error)

func (*TimestampOrBlockNumberUnionParam) UnmarshalJSON

func (u *TimestampOrBlockNumberUnionParam) UnmarshalJSON(data []byte) error

type VektorError

type VektorError struct {
	// Error context
	Context VektorErrorContext `json:"context,required"`
	// Error message
	Message string `json:"message,required"`
	// Request ID
	RequestID string `json:"request_id,required"`
	// Error resource
	Resource string `json:"resource,required"`
	// ISO8601 Timestamp
	Timestamp Timestamp `json:"timestamp,required"`
	// Error type
	Type string `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Context     respjson.Field
		Message     respjson.Field
		RequestID   respjson.Field
		Resource    respjson.Field
		Timestamp   respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Vektor error

func (VektorError) RawJSON

func (r VektorError) RawJSON() string

Returns the unmodified JSON received from the API

func (*VektorError) UnmarshalJSON

func (r *VektorError) UnmarshalJSON(data []byte) error

type VektorErrorContext added in v1.11.0

type VektorErrorContext struct {
	// Error parameters
	Parameters map[string]any `json:"parameters,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Parameters  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Error context

func (VektorErrorContext) RawJSON added in v1.11.0

func (r VektorErrorContext) RawJSON() string

Returns the unmodified JSON received from the API

func (*VektorErrorContext) UnmarshalJSON added in v1.11.0

func (r *VektorErrorContext) UnmarshalJSON(data []byte) error

type VektorErrorList added in v1.11.0

type VektorErrorList []VektorError

type VektorService

type VektorService struct {
	Options     []option.RequestOption
	Registry    RegistryService
	Balances    BalanceService
	Prices      PriceService
	Lend        LendService
	Borrow      BorrowService
	LP          LPService
	Buy         BuyService
	Sell        SellService
	Move        MoveService
	Wrap        WrapService
	Bridge      BridgeService
	Lock        LockService
	Vote        VoteService
	Incentivize IncentivizeService
	Executions  ExecutionService
}

VektorService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVektorService method instead.

func NewVektorService

func NewVektorService(opts ...option.RequestOption) (r VektorService)

NewVektorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Venue

type Venue struct {
	// A venue ID, represented as a TypeID with `venue` prefix
	ID VenueID `json:"id,required"`
	// A list of blockchain IDs
	BlockchainIDs []BlockchainID `json:"blockchain_ids,required"`
	// Venue name
	Name string `json:"name,required"`
	// A venue symbol
	Symbol VenueSymbol `json:"symbol,required"`
	// Venue type
	Type string `json:"type,required"`
	// Venue url
	URL string `json:"url,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		BlockchainIDs respjson.Field
		Name          respjson.Field
		Symbol        respjson.Field
		Type          respjson.Field
		URL           respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

On-chain venue

func (Venue) RawJSON

func (r Venue) RawJSON() string

Returns the unmodified JSON received from the API

func (*Venue) UnmarshalJSON

func (r *Venue) UnmarshalJSON(data []byte) error

type VenueID

type VenueID = string

type VenueIDOrVenueSymbol

type VenueIDOrVenueSymbol = string

type VenueSymbol

type VenueSymbol = string

type VoteMarket

type VoteMarket struct {
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A lp pool incentive market
	Market IncentivizeMarket `json:"market,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// A list of arbitrary precision decimals
	TradingFeesAmounts []Decimal `json:"trading_fees_amounts,required"`
	// Response for multiple assets
	TradingFeesAssets []Asset `json:"trading_fees_assets,required"`
	// An arbitrary precision decimal represented as a string
	Value Decimal `json:"value,required"`
	// An arbitrary precision decimal represented as a string
	ValuePerVote Decimal `json:"value_per_vote,required"`
	// An arbitrary precision decimal represented as a string
	Votes Decimal `json:"votes,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Blockstamp         respjson.Field
		Market             respjson.Field
		QuoteAssetSymbol   respjson.Field
		TradingFeesAmounts respjson.Field
		TradingFeesAssets  respjson.Field
		Value              respjson.Field
		ValuePerVote       respjson.Field
		Votes              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A LP incentive vote market

func (VoteMarket) RawJSON

func (r VoteMarket) RawJSON() string

Returns the unmodified JSON received from the API

func (*VoteMarket) UnmarshalJSON

func (r *VoteMarket) UnmarshalJSON(data []byte) error

type VoteMarketListParams

type VoteMarketListParams struct {
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (VoteMarketListParams) MarshalJSON

func (r VoteMarketListParams) MarshalJSON() (data []byte, err error)

func (*VoteMarketListParams) UnmarshalJSON

func (r *VoteMarketListParams) UnmarshalJSON(data []byte) error

type VoteMarketListResponse

type VoteMarketListResponse struct {
	// A list of LP incentive vote markets
	Items []VoteMarket `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (VoteMarketListResponse) RawJSON

func (r VoteMarketListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*VoteMarketListResponse) UnmarshalJSON

func (r *VoteMarketListResponse) UnmarshalJSON(data []byte) error

type VoteMarketService

type VoteMarketService struct {
	Options []option.RequestOption
}

VoteMarketService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoteMarketService method instead.

func NewVoteMarketService

func NewVoteMarketService(opts ...option.RequestOption) (r VoteMarketService)

NewVoteMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VoteMarketService) List

Get the current LP voting markets

type VoteReward

type VoteReward struct {
	// An EVM address
	Account Account `json:"account,required"`
	// Information about a specific block number and its timestamp
	Blockstamp Blockstamp `json:"blockstamp,required"`
	// A list of arbitrary precision decimals
	FeeAmounts []Decimal `json:"fee_amounts,required"`
	// Response for multiple assets
	FeeAssets []Asset `json:"fee_assets,required"`
	// A list of arbitrary precision decimals
	IncentiveAmounts []Decimal `json:"incentive_amounts,required"`
	// Response for multiple assets
	IncentiveAssets []Asset `json:"incentive_assets,required"`
	// A list of lock positions
	LockPositions []LockPosition `json:"lock_positions,required"`
	// A liquidity pool
	Pool LPPool `json:"pool,required"`
	// An asset symbol
	QuoteAssetSymbol string `json:"quote_asset_symbol,required"`
	// An arbitrary precision decimal represented as a string
	Value Decimal `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account          respjson.Field
		Blockstamp       respjson.Field
		FeeAmounts       respjson.Field
		FeeAssets        respjson.Field
		IncentiveAmounts respjson.Field
		IncentiveAssets  respjson.Field
		LockPositions    respjson.Field
		Pool             respjson.Field
		QuoteAssetSymbol respjson.Field
		Value            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A LP vote reward

func (VoteReward) RawJSON

func (r VoteReward) RawJSON() string

Returns the unmodified JSON received from the API

func (*VoteReward) UnmarshalJSON

func (r *VoteReward) UnmarshalJSON(data []byte) error

type VoteRewardListParams

type VoteRewardListParams struct {
	// A list of accounts. Currently only EVM addresses are supported.
	Accounts []Account `json:"accounts,omitzero,required"`
	// A list of asset IDs, EVM addresses or asset symbols
	Assets []AssetIDOrAddressEVMOrAssetSymbol `json:"assets,omitzero,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// A list of venue IDs or venue symbols
	Venues []VenueIDOrVenueSymbol `json:"venues,omitzero,required"`
	// An asset symbol
	QuoteAssetSymbol param.Opt[string] `json:"quote_asset_symbol,omitzero"`
	// contains filtered or unexported fields
}

func (VoteRewardListParams) MarshalJSON

func (r VoteRewardListParams) MarshalJSON() (data []byte, err error)

func (*VoteRewardListParams) UnmarshalJSON

func (r *VoteRewardListParams) UnmarshalJSON(data []byte) error

type VoteRewardListResponse

type VoteRewardListResponse struct {
	// A list of LP vote rewards
	Items []VoteReward `json:"items,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (VoteRewardListResponse) RawJSON

func (r VoteRewardListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*VoteRewardListResponse) UnmarshalJSON

func (r *VoteRewardListResponse) UnmarshalJSON(data []byte) error

type VoteRewardService

type VoteRewardService struct {
	Options []option.RequestOption
}

VoteRewardService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoteRewardService method instead.

func NewVoteRewardService

func NewVoteRewardService(opts ...option.RequestOption) (r VoteRewardService)

NewVoteRewardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VoteRewardService) List

Get the unclaimed rewards from LP voting markets

type VoteService

type VoteService struct {
	Options []option.RequestOption
	Markets VoteMarketService
	Rewards VoteRewardService
}

VoteService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoteService method instead.

func NewVoteService

func NewVoteService(opts ...option.RequestOption) (r VoteService)

NewVoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type WrapService

type WrapService struct {
	Options []option.RequestOption
	Wrap    WrapWrapService
	Unwrap  WrapUnwrapService
}

WrapService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWrapService method instead.

func NewWrapService

func NewWrapService(opts ...option.RequestOption) (r WrapService)

NewWrapService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type WrapUnwrapNewParams

type WrapUnwrapNewParams struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// contains filtered or unexported fields
}

func (WrapUnwrapNewParams) MarshalJSON

func (r WrapUnwrapNewParams) MarshalJSON() (data []byte, err error)

func (*WrapUnwrapNewParams) UnmarshalJSON

func (r *WrapUnwrapNewParams) UnmarshalJSON(data []byte) error

type WrapUnwrapService

type WrapUnwrapService struct {
	Options []option.RequestOption
}

WrapUnwrapService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWrapUnwrapService method instead.

func NewWrapUnwrapService

func NewWrapUnwrapService(opts ...option.RequestOption) (r WrapUnwrapService)

NewWrapUnwrapService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*WrapUnwrapService) New

Unwrap the wrapped native asset

type WrapWrapNewParams

type WrapWrapNewParams struct {
	// An arbitrary precision decimal represented as a string
	Amount Decimal `json:"amount,required"`
	// A blockchain ID, represented as a TypeID with `blockchain` prefix
	Blockchain BlockchainIDOrBlockchainSymbol `json:"blockchain,required"`
	// An EVM address
	From Account `json:"from,required"`
	// contains filtered or unexported fields
}

func (WrapWrapNewParams) MarshalJSON

func (r WrapWrapNewParams) MarshalJSON() (data []byte, err error)

func (*WrapWrapNewParams) UnmarshalJSON

func (r *WrapWrapNewParams) UnmarshalJSON(data []byte) error

type WrapWrapService

type WrapWrapService struct {
	Options []option.RequestOption
}

WrapWrapService contains methods and other services that help with interacting with the Nirvana Labs API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWrapWrapService method instead.

func NewWrapWrapService

func NewWrapWrapService(opts ...option.RequestOption) (r WrapWrapService)

NewWrapWrapService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*WrapWrapService) New

func (r *WrapWrapService) New(ctx context.Context, body WrapWrapNewParams, opts ...option.RequestOption) (res *Execution, err error)

Wrap the native asset

Jump to

Keyboard shortcuts

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