OgmiosChainContext

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Utxo_OgmigoToApollo added in v1.0.5

func Utxo_OgmigoToApollo(u statequery.Utxo) UTxO.UTxO

Types

type Bytes added in v1.0.5

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

type ExUnits added in v1.0.5

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

type Lovelace added in v1.0.5

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

type OgmiosChainContext

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

func NewOgmiosChainContext added in v1.0.5

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

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

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 added in v1.0.5

type OgmiosProtocolParameters struct {
	MinFeeConstant                  Lovelace `json:"minFeeConstant"`
	MinFeeCoefficient               uint64   `json:"minFeeCoefficient"`
	MaxBlockSize                    Bytes    `json:"maxBlockBodySize"`
	MaxTxSize                       Bytes    `json:"maxTransactionSize"`
	MaxBlockHeaderSize              Bytes    `json:"maxBlockHeaderSize"`
	KeyDeposits                     Lovelace `json:"stakeCredentialDeposit"`
	PoolDeposits                    Lovelace `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          uint64   `json:"minUtxoDepositConstant"`
	MinStakePoolCost                Lovelace `json:"minStakePoolCost"`
	MaxExecutionUnitsPerTransaction ExUnits  `json:"maxExecutionUnitsPerTransaction"`
	MaxExecutionUnitsPerBlock       ExUnits  `json:"maxExecutionUnitsPerBlock"`
	CollateralPercentage            uint64   `json:"collateralPercentage"`
	MaxCollateralInputs             uint64   `json:"maxCollateralInputs"`
	Version                         Version  `json:"version"`
}

type Prices added in v1.0.5

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

func (*Prices) UnmarshalJSON added in v1.0.5

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

type Version added in v1.0.5

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