protocol

package
v0.0.0-...-5d200cf Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

Protocol

GoDoc

Package protocol implements structs for epoch protocol parameters.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	// The 'a' parameter to calculate the minimum transaction fee in the
	// linear equation a * byte_size(tx) + b
	TxFeePerByte uint `json:"txFeePerByte"`

	// The 'b' parameter to calculate the minimum transaction fee.
	TxFeeFixed uint `json:"txFeeFixed"`

	// The maximum transaction size (in bytes).
	MaxTxSize uint `json:"maxTxSize"`

	// The Protocol Version
	ProtocolVersion ProtocolVersion `json:"protocolVersion"`

	// Minimum UTXO Value
	MinUTXOValue uint `json:"minUTxOValue"`
}

Protocol contains protocol parameters.

func LoadProtocol

func LoadProtocol(fp string) (*Protocol, error)

LOadProtocol returns a pointer to a unmarshalled Protocol given a file path of a protocol parameters file in the cardano-cli generated format.

type ProtocolVersion

type ProtocolVersion struct {
	Major uint8 `json:"major"`
	Minor uint8 `json:"minor"`
}

Jump to

Keyboard shortcuts

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