OgmiosChainContext

package
v0.0.0-...-ec97d81 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Utxo_OgmigoToApollo

func Utxo_OgmigoToApollo(u statequery.TxOut) UTxO.UTxO

Types

type AdaLovelace

type AdaLovelace struct {
	Ada Lovelace `json:"ada"`
}

type Bytes

type Bytes struct {
	Bytes uint64 `json:"bytes"`
}

type ExUnits

type ExUnits struct {
	Cpu    uint64 `json:"cpu"`
	Memory uint64 `json:"memory"`
}

type Lovelace

type Lovelace struct {
	Lovelace uint64 `json:"lovelace"`
}

type OgmiosChainContext

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

func NewOgmiosChainContext

func NewOgmiosChainContext(ogmigoClient ogmigo.Client, kugoClient kugo.Client) OgmiosChainContext

func (*OgmiosChainContext) AddressUtxos

func (occ *OgmiosChainContext) AddressUtxos(address string, gather bool) []Base.AddressUTXO

func (*OgmiosChainContext) Epoch

func (occ *OgmiosChainContext) Epoch() int

func (*OgmiosChainContext) EvaluateTx

func (occ *OgmiosChainContext) EvaluateTx(tx []byte) (map[string]Redeemer.ExecutionUnits, error)

func (*OgmiosChainContext) GenesisParams

func (occ *OgmiosChainContext) GenesisParams() Base.GenesisParameters

func (*OgmiosChainContext) GetContractCbor

func (occ *OgmiosChainContext) GetContractCbor(scriptHash string) string

This is unused

func (*OgmiosChainContext) GetGenesisParams

func (occ *OgmiosChainContext) GetGenesisParams() Base.GenesisParameters

func (*OgmiosChainContext) GetProtocolParams

func (occ *OgmiosChainContext) GetProtocolParams() Base.ProtocolParameters

func (*OgmiosChainContext) GetUtxoFromRef

func (occ *OgmiosChainContext) GetUtxoFromRef(txHash string, index int) *UTxO.UTxO

func (*OgmiosChainContext) Init

func (occ *OgmiosChainContext) Init()

func (*OgmiosChainContext) LastBlockSlot

func (occ *OgmiosChainContext) LastBlockSlot() int

Seems unused

func (*OgmiosChainContext) LatestBlock

func (occ *OgmiosChainContext) LatestBlock() Base.Block

Seems unused

func (*OgmiosChainContext) LatestEpoch

func (occ *OgmiosChainContext) LatestEpoch() Base.Epoch

Because ogmios does not return the end time when querying the current epoch, we have to dig through the era summaries and query the network start time

func (*OgmiosChainContext) LatestEpochParams

func (occ *OgmiosChainContext) LatestEpochParams() Base.ProtocolParameters

func (*OgmiosChainContext) MaxTxFee

func (occ *OgmiosChainContext) MaxTxFee() int

func (*OgmiosChainContext) Network

func (occ *OgmiosChainContext) Network() int

func (*OgmiosChainContext) SubmitTx

func (*OgmiosChainContext) TxOuts

func (occ *OgmiosChainContext) TxOuts(txHash string) []Base.Output

func (*OgmiosChainContext) Utxos

func (occ *OgmiosChainContext) Utxos(address Address.Address) []UTxO.UTxO

Copied from blockfrost context def since it just calls AddressUtxos and then converts

type OgmiosProtocolParameters

type OgmiosProtocolParameters struct {
	MinFeeConstant                  AdaLovelace `json:"minFeeConstant"`
	MinFeeCoefficient               uint64      `json:"minFeeCoefficient"`
	MaxBlockSize                    Bytes       `json:"maxBlockBodySize"`
	MaxTxSize                       Bytes       `json:"maxTransactionSize"`
	MaxBlockHeaderSize              Bytes       `json:"maxBlockHeaderSize"`
	KeyDeposits                     AdaLovelace `json:"stakeCredentialDeposit"`
	PoolDeposits                    AdaLovelace `json:"stakePoolDeposit"`
	PoolInfluence                   string      `json:"stakePoolPledgeInfluence"`
	MonetaryExpansion               string      `json:"monetaryExpansion"`
	TreasuryExpansion               string      `json:"treasuryExpansion"`
	ExtraEntropy                    string      `json:"extraEntropy"`
	MaxValSize                      Bytes       `json:"maxValueSize"`
	ScriptExecutionPrices           Prices      `json:"scriptExecutionPrices"`
	MinUtxoDepositCoefficient       uint64      `json:"minUtxoDepositCoefficient"`
	MinUtxoDepositConstant          AdaLovelace `json:"minUtxoDepositConstant"`
	MinStakePoolCost                AdaLovelace `json:"minStakePoolCost"`
	MaxExecutionUnitsPerTransaction ExUnits     `json:"maxExecutionUnitsPerTransaction"`
	MaxExecutionUnitsPerBlock       ExUnits     `json:"maxExecutionUnitsPerBlock"`
	CollateralPercentage            uint64      `json:"collateralPercentage"`
	MaxCollateralInputs             uint64      `json:"maxCollateralInputs"`
	Version                         Version     `json:"version"`
}

type Prices

type Prices struct {
	Memory float64 `json:"memory"`
	Cpu    float64 `json:"cpu"`
}

func (*Prices) UnmarshalJSON

func (p *Prices) UnmarshalJSON(b []byte) error

type Version

type Version struct {
	Major uint64 `json:"major"`
	Minor uint64 `json:"minor"`
	Patch uint64 `json:"patch"`
}

Jump to

Keyboard shortcuts

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