blockfrost

package
v0.61.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPaginationCount = 100
	MaxPaginationCount     = 100
	DefaultPaginationPage  = 1
	PaginationOrderAsc     = "asc"
	PaginationOrderDesc    = "desc"
)

Variables

View Source
var (
	ErrInvalidAddress      = errors.New("invalid address")
	ErrInvalidBlockID      = errors.New("invalid block id")
	ErrBlockNotFound       = errors.New("block not found")
	ErrEpochNotFound       = errors.New("epoch not found")
	ErrAssetNotFound       = errors.New("asset not found")
	ErrDRepNotFound        = errors.New("drep not found")
	ErrInvalidTransaction  = errors.New("invalid transaction")
	ErrMempoolUnavailable  = errors.New("mempool unavailable")
	ErrMempoolFull         = errors.New("mempool full")
	ErrTransactionNotFound = errors.New("transaction not found")
	ErrInvalidStakeAddress = errors.New("invalid stake address")
)
View Source
var ErrInvalidPaginationParameters = errors.New(
	"invalid pagination parameters",
)

Functions

func SetPaginationHeaders

func SetPaginationHeaders(
	w http.ResponseWriter,
	totalItems int,
	params PaginationParams,
)

SetPaginationHeaders sets Blockfrost pagination headers.

Types

type AccountAssociatedAddressInfo

type AccountAssociatedAddressInfo struct {
	Address string
}

AccountAssociatedAddressInfo holds a payment address associated with a stake key.

type AccountAssociatedAddressResponse

type AccountAssociatedAddressResponse struct {
	Address string `json:"address"`
}

AccountAssociatedAddressResponse represents a stake account associated payment address.

type AccountDelegationHistoryInfo

type AccountDelegationHistoryInfo struct {
	ActiveEpoch int32
	TxHash      string
	Amount      string
	PoolID      string
	TxSlot      int64
	BlockTime   int64
	BlockHeight int64
}

AccountDelegationHistoryInfo holds a stake-account delegation history row.

type AccountDelegationHistoryResponse

type AccountDelegationHistoryResponse struct {
	ActiveEpoch int32  `json:"active_epoch"`
	TxHash      string `json:"tx_hash"`
	Amount      string `json:"amount"`
	PoolID      string `json:"pool_id"`
	TxSlot      int64  `json:"tx_slot"`
	BlockTime   int64  `json:"block_time"`
	BlockHeight int64  `json:"block_height"`
}

AccountDelegationHistoryResponse represents a stake-account delegation history row.

type AccountInfo

type AccountInfo struct {
	StakeAddress       string
	Active             bool
	ActiveEpoch        *int64
	ControlledAmount   string
	RewardsSum         string
	WithdrawalsSum     string
	ReservesSum        string
	TreasurySum        string
	WithdrawableAmount string
	PoolID             *string
	DrepID             *string
	Registered         bool
}

AccountInfo holds stake-account data needed by the API.

type AccountRegistrationHistoryInfo

type AccountRegistrationHistoryInfo struct {
	TxHash      string
	Action      string
	Deposit     string
	TxSlot      int64
	BlockTime   int64
	BlockHeight int64
}

AccountRegistrationHistoryInfo holds a stake-account registration history row.

type AccountRegistrationHistoryResponse

type AccountRegistrationHistoryResponse struct {
	TxHash      string `json:"tx_hash"`
	Action      string `json:"action"`
	Deposit     string `json:"deposit"`
	TxSlot      int64  `json:"tx_slot"`
	BlockTime   int64  `json:"block_time"`
	BlockHeight int64  `json:"block_height"`
}

AccountRegistrationHistoryResponse represents a stake-account registration history row.

type AccountResponse

type AccountResponse struct {
	StakeAddress       string  `json:"stake_address"`
	Active             bool    `json:"active"`
	ActiveEpoch        *int64  `json:"active_epoch"`
	ControlledAmount   string  `json:"controlled_amount"`
	RewardsSum         string  `json:"rewards_sum"`
	WithdrawalsSum     string  `json:"withdrawals_sum"`
	ReservesSum        string  `json:"reserves_sum"`
	TreasurySum        string  `json:"treasury_sum"`
	WithdrawableAmount string  `json:"withdrawable_amount"`
	PoolID             *string `json:"pool_id"`
	DrepID             *string `json:"drep_id"`
	Registered         bool    `json:"registered"`
}

AccountResponse represents a Blockfrost stake account.

type AccountRewardHistoryInfo

type AccountRewardHistoryInfo struct {
	Epoch  int32
	Amount string
	PoolID string
}

AccountRewardHistoryInfo holds a stake-account reward history row.

type AccountRewardHistoryResponse

type AccountRewardHistoryResponse struct {
	Epoch  int32  `json:"epoch"`
	Amount string `json:"amount"`
	PoolID string `json:"pool_id"`
}

AccountRewardHistoryResponse represents a stake-account reward history row.

type AddressAmountInfo

type AddressAmountInfo struct {
	Unit     string
	Quantity string
}

AddressAmountInfo holds amount data needed by address UTxO responses.

type AddressAmountResponse

type AddressAmountResponse struct {
	Unit     string `json:"unit"`
	Quantity string `json:"quantity"`
}

AddressAmountResponse represents a Blockfrost address amount object.

type AddressTransactionInfo

type AddressTransactionInfo struct {
	TxHash      string
	TxIndex     uint32
	BlockHeight uint64
	BlockTime   int64
}

AddressTransactionInfo holds address transaction data needed by the API.

type AddressTransactionResponse

type AddressTransactionResponse struct {
	TxHash      string `json:"tx_hash"`
	TxIndex     int    `json:"tx_index"`
	BlockHeight uint64 `json:"block_height"`
	BlockTime   int    `json:"block_time"`
}

AddressTransactionResponse represents a Blockfrost address transaction object.

type AddressUTXOInfo

type AddressUTXOInfo struct {
	Address             string
	TxHash              string
	OutputIndex         uint32
	Amount              []AddressAmountInfo
	Block               string
	DataHash            *string
	InlineDatum         *string
	ReferenceScriptHash *string
}

AddressUTXOInfo holds address UTxO data needed by the API.

type AddressUTXOResponse

type AddressUTXOResponse struct {
	Address             string                  `json:"address"`
	TxHash              string                  `json:"tx_hash"`
	OutputIndex         int                     `json:"output_index"`
	Amount              []AddressAmountResponse `json:"amount"`
	Block               string                  `json:"block"`
	DataHash            *string                 `json:"data_hash"`
	InlineDatum         *string                 `json:"inline_datum"`
	ReferenceScriptHash *string                 `json:"reference_script_hash"`
}

AddressUTXOResponse represents a Blockfrost address UTxO object.

type AssetInfo

type AssetInfo struct {
	Asset             string
	PolicyID          string
	AssetName         string
	AssetNameASCII    string
	Fingerprint       string
	Quantity          string
	InitialMintTxHash string
	MintOrBurnCount   int
	OnchainMetadata   *any
}

AssetInfo holds native asset data needed by the API.

type AssetResponse

type AssetResponse struct {
	Asset                   string  `json:"asset"`
	PolicyID                string  `json:"policy_id"`
	AssetName               string  `json:"asset_name"`
	AssetNameASCII          string  `json:"asset_name_ascii"`
	Fingerprint             string  `json:"fingerprint"`
	Quantity                string  `json:"quantity"`
	InitialMintTxHash       string  `json:"initial_mint_tx_hash"`
	MintOrBurnCount         int     `json:"mint_or_burn_count"`
	OnchainMetadata         *any    `json:"onchain_metadata"`
	OnchainMetadataStandard *string `json:"onchain_metadata_standard"`
	OnchainMetadataExtra    *string `json:"onchain_metadata_extra"`
	Metadata                *any    `json:"metadata"`
}

AssetResponse represents a Blockfrost native asset object.

type BlockInfo

type BlockInfo struct {
	Hash          string
	Slot          uint64
	Epoch         uint64
	EpochSlot     uint64
	Height        uint64
	Time          int64
	Size          uint64
	TxCount       int
	SlotLeader    string
	PreviousBlock string
	Confirmations uint64
}

BlockInfo holds block data needed by the API.

type BlockResponse

type BlockResponse struct {
	Time          int64   `json:"time"`
	Height        uint64  `json:"height"`
	Hash          string  `json:"hash"`
	Slot          uint64  `json:"slot"`
	Epoch         uint64  `json:"epoch"`
	EpochSlot     uint64  `json:"epoch_slot"`
	SlotLeader    string  `json:"slot_leader"`
	Size          uint64  `json:"size"`
	TxCount       int     `json:"tx_count"`
	Output        *string `json:"output"`
	Fees          *string `json:"fees"`
	BlockVRF      *string `json:"block_vrf"`
	OPCert        *string `json:"op_cert"`
	OPCertCounter *string `json:"op_cert_counter"`
	PreviousBlock string  `json:"previous_block"`
	NextBlock     *string `json:"next_block"`
	Confirmations uint64  `json:"confirmations"`
}

BlockResponse represents a Blockfrost block object.

type Blockfrost

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

Blockfrost is the Blockfrost-compatible REST API server.

func New

func New(
	cfg BlockfrostConfig,
	node BlockfrostNode,
	logger *slog.Logger,
) *Blockfrost

New creates a new Blockfrost API server instance.

func (*Blockfrost) Start

func (b *Blockfrost) Start(
	ctx context.Context,
) error

Start starts the HTTP server in a background goroutine.

func (*Blockfrost) Stop

func (b *Blockfrost) Stop(
	ctx context.Context,
) error

Stop gracefully shuts down the HTTP server.

type BlockfrostConfig

type BlockfrostConfig struct {
	// ListenAddress is the address to listen on.
	// Defaults to ":3000".
	ListenAddress string
	// CORSAllowedOrigins configures Access-Control-Allow-Origin.
	// Empty disables CORS.
	CORSAllowedOrigins []string
}

BlockfrostConfig holds configuration for the Blockfrost API server.

type BlockfrostNode

type BlockfrostNode interface {
	// ChainTip returns the current chain tip info.
	ChainTip() (ChainTipInfo, error)

	// LatestBlock returns information about the latest
	// block on the chain.
	LatestBlock() (BlockInfo, error)

	// BlockByHashOrNumber returns information about a block
	// identified by a 64-character hex hash or decimal height.
	BlockByHashOrNumber(id string) (BlockInfo, error)

	// LatestBlockTxHashes returns the transaction hashes
	// for the latest block.
	LatestBlockTxHashes() ([]string, error)

	// CurrentEpoch returns information about the current
	// epoch.
	CurrentEpoch() (EpochInfo, error)

	// CurrentProtocolParams returns the current protocol
	// parameters.
	CurrentProtocolParams() (ProtocolParamsInfo, error)

	// EpochProtocolParams returns protocol parameters for a
	// specific epoch.
	EpochProtocolParams(epoch uint64) (ProtocolParamsInfo, error)

	// Network returns current network supply and stake information.
	Network() (NetworkInfo, error)

	// NetworkEras returns hard-fork era summaries.
	NetworkEras() ([]NetworkEraInfo, error)

	// Genesis returns Shelley genesis configuration values.
	Genesis() (GenesisInfo, error)

	// PoolsExtended returns the current active pools with
	// extended details.
	PoolsExtended() ([]PoolExtendedInfo, error)

	// AddressUTXOs returns the paginated current UTxOs for
	// an address along with the total number of matching
	// results before pagination.
	AddressUTXOs(
		address string,
		params PaginationParams,
	) ([]AddressUTXOInfo, int, error)

	// AddressTransactions returns the paginated transaction
	// history for an address along with the total number of
	// matching results before pagination.
	AddressTransactions(
		address string,
		params PaginationParams,
	) ([]AddressTransactionInfo, int, error)

	// MetadataTransactions returns the paginated transactions
	// containing the requested metadata label, with JSON values.
	MetadataTransactions(
		label uint64,
		params PaginationParams,
	) ([]MetadataTransactionJSONInfo, int, error)

	// MetadataTransactionsCBOR returns the paginated transactions
	// containing the requested metadata label, with CBOR values.
	MetadataTransactionsCBOR(
		label uint64,
		params PaginationParams,
	) ([]MetadataTransactionCBORInfo, int, error)

	// Transaction returns summary details for a transaction hash.
	Transaction(hash []byte) (TransactionInfo, error)

	// TransactionSubmit submits raw signed transaction CBOR to the mempool.
	TransactionSubmit(txCbor []byte) (string, error)

	// TransactionCBOR returns raw signed transaction CBOR bytes.
	TransactionCBOR(hash []byte) ([]byte, error)

	// TransactionMetadata returns transaction metadata labels as JSON values.
	TransactionMetadata(hash []byte) ([]TransactionMetadataInfo, error)

	// TransactionMetadataCBOR returns transaction metadata labels as CBOR values.
	TransactionMetadataCBOR(hash []byte) ([]TransactionMetadataCBORInfo, error)

	// TransactionUTXOs returns transaction inputs and outputs.
	TransactionUTXOs(hash []byte) (TransactionUTXOsInfo, error)

	// TransactionDelegations returns delegation certificates in a transaction.
	TransactionDelegations(hash []byte) ([]TransactionDelegationInfo, error)

	// TransactionStakeAddresses returns stake address certificates in a transaction.
	TransactionStakeAddresses(hash []byte) ([]TransactionStakeAddressInfo, error)

	// TransactionWithdrawals returns reward withdrawals in a transaction.
	TransactionWithdrawals(hash []byte) ([]TransactionWithdrawalInfo, error)

	// TransactionMIRs returns MIR certificates in a transaction.
	TransactionMIRs(hash []byte) ([]TransactionMIRInfo, error)

	// TransactionPoolUpdates returns pool registration certificates in a transaction.
	TransactionPoolUpdates(hash []byte) ([]TransactionPoolUpdateInfo, error)

	// TransactionPoolRetires returns pool retirement certificates in a transaction.
	TransactionPoolRetires(hash []byte) ([]TransactionPoolRetireInfo, error)

	// TransactionRedeemers returns Plutus redeemers in a transaction.
	TransactionRedeemers(hash []byte) ([]TransactionRedeemerInfo, error)

	// TransactionRequiredSigners returns required signing key hashes in a transaction.
	TransactionRequiredSigners(hash []byte) ([]TransactionRequiredSignerInfo, error)

	// Asset returns native asset information for a
	// concatenated hex asset ID ({policy_id}{asset_name}).
	Asset(
		policyID string,
		assetName []byte,
	) (AssetInfo, error)

	// DRep returns governance DRep information for a parsed
	// DRep credential.
	DRep(DRepCredential) (DRepInfo, error)

	// Account returns stake-account information for the
	// requested stake address.
	Account(string) (AccountInfo, error)

	// AccountAssociatedAddresses returns payment addresses
	// associated with the requested stake address.
	AccountAssociatedAddresses(
		string,
		PaginationParams,
	) ([]AccountAssociatedAddressInfo, int, error)

	// AccountDelegationHistory returns delegation history
	// rows for the requested stake address.
	AccountDelegationHistory(
		string,
		PaginationParams,
	) ([]AccountDelegationHistoryInfo, int, error)

	// AccountRegistrationHistory returns registration
	// history rows for the requested stake address.
	AccountRegistrationHistory(
		string,
		PaginationParams,
	) ([]AccountRegistrationHistoryInfo, int, error)

	// AccountRewardHistory returns reward history rows for
	// the requested stake address.
	AccountRewardHistory(
		string,
		PaginationParams,
	) ([]AccountRewardHistoryInfo, int, error)
}

BlockfrostNode is the interface that the Blockfrost API server uses to query the node for blockchain data. This decouples the HTTP server from the concrete Node struct and enables testing with mock implementations.

type ChainTipInfo

type ChainTipInfo struct {
	BlockHash   string
	Slot        uint64
	BlockNumber uint64
}

ChainTipInfo holds chain tip data needed by the API.

type DRepCredential

type DRepCredential struct {
	ID                 string
	Hash               []byte
	HasScript          bool
	CredentialTagKnown bool
}

DRepCredential holds a parsed governance DRep identifier.

type DRepInfo

type DRepInfo struct {
	DRepID      string
	Hex         string
	HasScript   bool
	Registered  bool
	Epoch       uint64
	Amount      string
	Active      bool
	ActiveEpoch uint64
	LiveStake   string
}

DRepInfo holds DRep data needed by the governance API.

type DRepResponse

type DRepResponse struct {
	DRepID      string `json:"drep_id"`
	Hex         string `json:"hex"`
	HasScript   bool   `json:"has_script"`
	Registered  bool   `json:"registered"`
	Epoch       uint64 `json:"epoch"`
	Amount      string `json:"amount"`
	Active      bool   `json:"active"`
	ActiveEpoch uint64 `json:"active_epoch"`
	LiveStake   string `json:"live_stake"`
}

DRepResponse represents a Blockfrost governance DRep object.

type EpochInfo

type EpochInfo struct {
	Epoch          uint64
	StartTime      int64
	EndTime        int64
	FirstBlockTime int64
	LastBlockTime  int64
	BlockCount     int
	TxCount        int
}

EpochInfo holds epoch data needed by the API.

type EpochResponse

type EpochResponse struct {
	Epoch          uint64  `json:"epoch"`
	StartTime      int64   `json:"start_time"`
	EndTime        int64   `json:"end_time"`
	FirstBlockTime int64   `json:"first_block_time"`
	LastBlockTime  int64   `json:"last_block_time"`
	BlockCount     int     `json:"block_count"`
	TxCount        int     `json:"tx_count"`
	Output         string  `json:"output"`
	Fees           string  `json:"fees"`
	ActiveStake    *string `json:"active_stake"`
}

EpochResponse represents a Blockfrost epoch object.

type ErrorResponse

type ErrorResponse struct {
	StatusCode int    `json:"status_code"`
	Error      string `json:"error"`
	Message    string `json:"message"`
}

ErrorResponse represents a Blockfrost error response.

type GenesisInfo

type GenesisInfo struct {
	ActiveSlotsCoefficient float32
	UpdateQuorum           int
	MaxLovelaceSupply      string
	NetworkMagic           int
	EpochLength            int
	SystemStart            int
	SlotsPerKESPeriod      int
	SlotLength             int
	MaxKESEvolutions       int
	SecurityParam          int
}

GenesisInfo holds Shelley genesis configuration values.

type GenesisResponse

type GenesisResponse struct {
	ActiveSlotsCoefficient float32 `json:"active_slots_coefficient"`
	UpdateQuorum           int     `json:"update_quorum"`
	MaxLovelaceSupply      string  `json:"max_lovelace_supply"`
	NetworkMagic           int     `json:"network_magic"`
	EpochLength            int     `json:"epoch_length"`
	SystemStart            int     `json:"system_start"`
	SlotsPerKESPeriod      int     `json:"slots_per_kes_period"`
	SlotLength             int     `json:"slot_length"`
	MaxKESEvolutions       int     `json:"max_kes_evolutions"`
	SecurityParam          int     `json:"security_param"`
}

GenesisResponse represents Blockfrost genesis info.

type HealthResponse

type HealthResponse struct {
	IsHealthy bool `json:"is_healthy"`
}

HealthResponse is returned by GET /health.

type MetadataTransactionCBORInfo

type MetadataTransactionCBORInfo struct {
	TxHash   string
	Metadata string
}

MetadataTransactionCBORInfo holds metadata label query data for the CBOR endpoint.

type MetadataTransactionCBORResponse

type MetadataTransactionCBORResponse struct {
	TxHash       string  `json:"tx_hash"`
	CborMetadata *string `json:"cbor_metadata"`
	Metadata     string  `json:"metadata"`
}

MetadataTransactionCBORResponse represents a Blockfrost metadata label transaction item with CBOR content.

type MetadataTransactionJSONInfo

type MetadataTransactionJSONInfo struct {
	TxHash       string
	JSONMetadata json.RawMessage
}

MetadataTransactionJSONInfo holds metadata label query data for the JSON endpoint.

type MetadataTransactionJSONResponse

type MetadataTransactionJSONResponse struct {
	TxHash       string          `json:"tx_hash"`
	JSONMetadata json.RawMessage `json:"json_metadata"`
}

MetadataTransactionJSONResponse represents a Blockfrost metadata label transaction item with JSON content.

type NetworkEraBound

type NetworkEraBound struct {
	Time  int64  `json:"time"`
	Slot  uint64 `json:"slot"`
	Epoch uint64 `json:"epoch"`
}

NetworkEraBound represents an era boundary.

type NetworkEraBoundInfo

type NetworkEraBoundInfo struct {
	Time  int64
	Slot  uint64
	Epoch uint64
}

NetworkEraBoundInfo holds an era boundary.

type NetworkEraInfo

type NetworkEraInfo struct {
	Era    string
	Start  NetworkEraBoundInfo
	End    *NetworkEraBoundInfo
	Params NetworkEraParamsInfo
}

NetworkEraInfo holds a Blockfrost hard-fork era summary.

type NetworkEraParameters

type NetworkEraParameters struct {
	EpochLength uint64 `json:"epoch_length"`
	SlotLength  uint64 `json:"slot_length"`
	SafeZone    uint64 `json:"safe_zone"`
}

NetworkEraParameters represents era timing parameters.

type NetworkEraParamsInfo

type NetworkEraParamsInfo struct {
	EpochLength uint64
	SlotLength  uint64
	SafeZone    uint64
}

NetworkEraParamsInfo holds era timing parameters.

type NetworkEraResponse

type NetworkEraResponse struct {
	Start      NetworkEraBound      `json:"start"`
	End        *NetworkEraBound     `json:"end"`
	Parameters NetworkEraParameters `json:"parameters"`
}

NetworkEraResponse represents a Blockfrost era summary. Per Blockfrost OpenAPI 0.1.88 (schema network-eras) each item carries only start, end, and parameters; the human-readable era name is intentionally omitted to keep the response shape compatible with the published schema.

type NetworkInfo

type NetworkInfo struct {
	Supply NetworkSupplyInfo
	Stake  NetworkStakeInfo
}

NetworkInfo holds network supply and stake data needed by the API.

type NetworkResponse

type NetworkResponse struct {
	Supply NetworkSupply `json:"supply"`
	Stake  NetworkStake  `json:"stake"`
}

NetworkResponse represents Blockfrost network info.

type NetworkStake

type NetworkStake struct {
	Live   string `json:"live"`
	Active string `json:"active"`
}

NetworkStake holds stake information.

type NetworkStakeInfo

type NetworkStakeInfo struct {
	Live   string
	Active string
}

NetworkStakeInfo holds network stake data needed by the API.

type NetworkSupply

type NetworkSupply struct {
	Max         string `json:"max"`
	Total       string `json:"total"`
	Circulating string `json:"circulating"`
	Locked      string `json:"locked"`
	Treasury    string `json:"treasury"`
	Reserves    string `json:"reserves"`
}

NetworkSupply holds supply information.

type NetworkSupplyInfo

type NetworkSupplyInfo struct {
	Max         string
	Total       string
	Circulating string
	Locked      string
	Treasury    string
	Reserves    string
}

NetworkSupplyInfo holds network supply data needed by the API.

type NodeAdapter

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

NodeAdapter wraps a real dingo Node's LedgerState to implement the BlockfrostNode interface.

func NewNodeAdapter

func NewNodeAdapter(
	ls *ledger.LedgerState,
	submitter TransactionSubmitter,
) (*NodeAdapter, error)

NewNodeAdapter creates a NodeAdapter that queries the given LedgerState for blockchain data.

func (*NodeAdapter) Account

func (a *NodeAdapter) Account(
	stakeAddress string,
) (AccountInfo, error)

Account returns stake-account information for the requested stake address.

func (*NodeAdapter) AccountAssociatedAddresses

func (a *NodeAdapter) AccountAssociatedAddresses(
	stakeAddress string,
	params PaginationParams,
) ([]AccountAssociatedAddressInfo, int, error)

AccountAssociatedAddresses returns payment addresses associated with the requested stake address.

func (*NodeAdapter) AccountDelegationHistory

func (a *NodeAdapter) AccountDelegationHistory(
	stakeAddress string,
	params PaginationParams,
) ([]AccountDelegationHistoryInfo, int, error)

AccountDelegationHistory returns delegation history rows for the requested stake address.

func (*NodeAdapter) AccountRegistrationHistory

func (a *NodeAdapter) AccountRegistrationHistory(
	stakeAddress string,
	params PaginationParams,
) ([]AccountRegistrationHistoryInfo, int, error)

AccountRegistrationHistory returns registration history rows for the requested stake address.

func (*NodeAdapter) AccountRewardHistory

func (a *NodeAdapter) AccountRewardHistory(
	stakeAddress string,
	params PaginationParams,
) ([]AccountRewardHistoryInfo, int, error)

AccountRewardHistory returns reward history rows for the requested stake address.

func (*NodeAdapter) AddressTransactions

func (a *NodeAdapter) AddressTransactions(
	address string,
	params PaginationParams,
) ([]AddressTransactionInfo, int, error)

AddressTransactions returns paginated transaction history for the requested address.

func (*NodeAdapter) AddressUTXOs

func (a *NodeAdapter) AddressUTXOs(
	address string,
	params PaginationParams,
) ([]AddressUTXOInfo, int, error)

AddressUTXOs returns paginated current UTxOs for the requested address.

func (*NodeAdapter) Asset

func (a *NodeAdapter) Asset(
	policyID string,
	assetName []byte,
) (AssetInfo, error)

Asset returns native asset information for a policy ID and raw asset name bytes.

func (*NodeAdapter) BlockByHashOrNumber

func (a *NodeAdapter) BlockByHashOrNumber(
	id string,
) (BlockInfo, error)

BlockByHashOrNumber returns block information by hash or height.

func (*NodeAdapter) ChainTip

func (a *NodeAdapter) ChainTip() (
	ChainTipInfo, error,
)

ChainTip returns the current chain tip from the ledger state.

func (*NodeAdapter) CurrentEpoch

func (a *NodeAdapter) CurrentEpoch() (
	EpochInfo, error,
)

CurrentEpoch returns information about the current epoch.

func (*NodeAdapter) CurrentProtocolParams

func (a *NodeAdapter) CurrentProtocolParams() (
	ProtocolParamsInfo, error,
)

CurrentProtocolParams returns the current protocol parameters.

func (*NodeAdapter) DRep

func (a *NodeAdapter) DRep(
	credential DRepCredential,
) (DRepInfo, error)

DRep returns governance DRep information for the requested credential.

func (*NodeAdapter) EpochProtocolParams

func (a *NodeAdapter) EpochProtocolParams(
	epoch uint64,
) (ProtocolParamsInfo, error)

EpochProtocolParams returns protocol parameters for the requested epoch.

func (*NodeAdapter) Genesis

func (a *NodeAdapter) Genesis() (GenesisInfo, error)

Genesis returns Shelley genesis configuration values.

func (*NodeAdapter) LatestBlock

func (a *NodeAdapter) LatestBlock() (
	BlockInfo, error,
)

LatestBlock returns information about the latest block.

func (*NodeAdapter) LatestBlockTxHashes

func (a *NodeAdapter) LatestBlockTxHashes() (
	[]string, error,
)

LatestBlockTxHashes returns transaction hashes from the latest block.

func (*NodeAdapter) MetadataTransactions

func (a *NodeAdapter) MetadataTransactions(
	label uint64,
	params PaginationParams,
) ([]MetadataTransactionJSONInfo, int, error)

MetadataTransactions returns paginated transaction metadata values for the requested label in JSON form.

func (*NodeAdapter) MetadataTransactionsCBOR

func (a *NodeAdapter) MetadataTransactionsCBOR(
	label uint64,
	params PaginationParams,
) ([]MetadataTransactionCBORInfo, int, error)

MetadataTransactionsCBOR returns paginated transaction metadata values for the requested label in CBOR-hex form.

func (*NodeAdapter) Network

func (a *NodeAdapter) Network() (NetworkInfo, error)

Network returns current network supply and stake information.

func (*NodeAdapter) NetworkEras

func (a *NodeAdapter) NetworkEras() ([]NetworkEraInfo, error)

NetworkEras returns hard-fork era summaries.

func (*NodeAdapter) PoolsExtended

func (a *NodeAdapter) PoolsExtended() (
	[]PoolExtendedInfo, error,
)

PoolsExtended returns the current active pools with extended details.

func (*NodeAdapter) Transaction

func (a *NodeAdapter) Transaction(
	hash []byte,
) (TransactionInfo, error)

Transaction returns summary details for the requested transaction.

func (*NodeAdapter) TransactionCBOR

func (a *NodeAdapter) TransactionCBOR(
	hash []byte,
) ([]byte, error)

TransactionCBOR returns raw signed transaction CBOR bytes for the requested transaction hash.

func (*NodeAdapter) TransactionDelegations

func (a *NodeAdapter) TransactionDelegations(
	hash []byte,
) ([]TransactionDelegationInfo, error)

TransactionDelegations returns delegation certificates in the requested transaction.

func (*NodeAdapter) TransactionMIRs

func (a *NodeAdapter) TransactionMIRs(
	hash []byte,
) ([]TransactionMIRInfo, error)

TransactionMIRs returns MIR certificate reward targets in the requested transaction.

func (*NodeAdapter) TransactionMetadata

func (a *NodeAdapter) TransactionMetadata(
	hash []byte,
) ([]TransactionMetadataInfo, error)

TransactionMetadata returns metadata labels for the requested transaction as JSON values.

func (*NodeAdapter) TransactionMetadataCBOR

func (a *NodeAdapter) TransactionMetadataCBOR(
	hash []byte,
) ([]TransactionMetadataCBORInfo, error)

TransactionMetadataCBOR returns metadata labels for the requested transaction as CBOR hex values.

func (*NodeAdapter) TransactionPoolRetires

func (a *NodeAdapter) TransactionPoolRetires(
	hash []byte,
) ([]TransactionPoolRetireInfo, error)

TransactionPoolRetires returns pool retirement certificates in the requested transaction.

func (*NodeAdapter) TransactionPoolUpdates

func (a *NodeAdapter) TransactionPoolUpdates(
	hash []byte,
) ([]TransactionPoolUpdateInfo, error)

TransactionPoolUpdates returns pool registration certificates in the requested transaction.

func (*NodeAdapter) TransactionRedeemers

func (a *NodeAdapter) TransactionRedeemers(
	hash []byte,
) ([]TransactionRedeemerInfo, error)

TransactionRedeemers returns Plutus redeemers stored for the requested transaction.

func (*NodeAdapter) TransactionRequiredSigners

func (a *NodeAdapter) TransactionRequiredSigners(
	hash []byte,
) ([]TransactionRequiredSignerInfo, error)

TransactionRequiredSigners returns the required signers (extra signing key hashes) declared in the requested transaction.

func (*NodeAdapter) TransactionStakeAddresses

func (a *NodeAdapter) TransactionStakeAddresses(
	hash []byte,
) ([]TransactionStakeAddressInfo, error)

TransactionStakeAddresses returns stake registration/deregistration certificates in the requested transaction.

func (*NodeAdapter) TransactionSubmit

func (a *NodeAdapter) TransactionSubmit(
	txCbor []byte,
) (string, error)

TransactionSubmit submits raw signed transaction CBOR to the mempool.

func (*NodeAdapter) TransactionUTXOs

func (a *NodeAdapter) TransactionUTXOs(
	hash []byte,
) (TransactionUTXOsInfo, error)

TransactionUTXOs returns inputs and outputs for the requested transaction.

func (*NodeAdapter) TransactionWithdrawals

func (a *NodeAdapter) TransactionWithdrawals(
	hash []byte,
) ([]TransactionWithdrawalInfo, error)

TransactionWithdrawals returns reward withdrawals in the requested transaction.

type PaginationParams

type PaginationParams struct {
	Count int
	Page  int
	Order string
}

PaginationParams contains parsed pagination query values.

func ParsePagination

func ParsePagination(r *http.Request) (PaginationParams, error)

ParsePagination parses pagination query parameters and applies defaults and bounds clamping.

type PoolExtendedInfo

type PoolExtendedInfo struct {
	PoolID         string
	Hex            string
	VrfKey         string
	ActiveStake    string
	LiveStake      string
	DeclaredPledge string
	FixedCost      string
	MarginCost     float64
	Relays         []PoolRelayInfo
}

PoolExtendedInfo holds pool data needed by the /pools/extended endpoint.

type PoolExtendedResponse

type PoolExtendedResponse struct {
	PoolID         string              `json:"pool_id"`
	Hex            string              `json:"hex"`
	VrfKey         string              `json:"vrf_key"`
	ActiveStake    string              `json:"active_stake"`
	LiveStake      string              `json:"live_stake"`
	DeclaredPledge string              `json:"declared_pledge"`
	FixedCost      string              `json:"fixed_cost"`
	MarginCost     float64             `json:"margin_cost"`
	Relays         []PoolRelayResponse `json:"relays"`
}

PoolExtendedResponse represents an extended stake pool list item.

type PoolRelayInfo

type PoolRelayInfo struct {
	IPv4 string
	IPv6 string
	DNS  string
	Port *int
}

PoolRelayInfo holds relay data for pool responses.

type PoolRelayResponse

type PoolRelayResponse struct {
	IPv4 *string `json:"ipv4"`
	IPv6 *string `json:"ipv6"`
	DNS  *string `json:"dns"`
	Port *int    `json:"port"`
}

PoolRelayResponse represents a stake pool relay.

type ProtocolParamsInfo

type ProtocolParamsInfo struct {
	Epoch               uint64
	MinFeeA             int
	MinFeeB             int
	MaxBlockSize        int
	MaxTxSize           int
	MaxBlockHeaderSize  int
	KeyDeposit          string
	PoolDeposit         string
	EMax                int
	NOpt                int
	A0                  float64
	Rho                 float64
	Tau                 float64
	ProtocolMajorVer    int
	ProtocolMinorVer    int
	MinPoolCost         string
	CoinsPerUtxoSize    string
	PriceMem            float64
	PriceStep           float64
	MaxTxExMem          string
	MaxTxExSteps        string
	MaxBlockExMem       string
	MaxBlockExSteps     string
	MaxValSize          string
	CollateralPercent   int
	MaxCollateralInputs int
	// Conway-era governance and reference-script parameters. These are nil
	// for pre-Conway eras where they do not apply.
	PvtMotionNoConfidence      *float64
	PvtCommitteeNormal         *float64
	PvtCommitteeNoConfidence   *float64
	PvtHardForkInitiation      *float64
	PvtPPSecurityGroup         *float64
	DvtMotionNoConfidence      *float64
	DvtCommitteeNormal         *float64
	DvtCommitteeNoConfidence   *float64
	DvtUpdateToConstitution    *float64
	DvtHardForkInitiation      *float64
	DvtPPNetworkGroup          *float64
	DvtPPEconomicGroup         *float64
	DvtPPTechnicalGroup        *float64
	DvtPPGovGroup              *float64
	DvtTreasuryWithdrawal      *float64
	CommitteeMinSize           *string
	CommitteeMaxTermLength     *string
	GovActionLifetime          *string
	GovActionDeposit           *string
	DRepDeposit                *string
	DRepActivity               *string
	MinFeeRefScriptCostPerByte *float64
	// CostModelsRaw holds cost models keyed by Plutus version name with raw
	// integer arrays, matching the Blockfrost cost_models_raw field. nil
	// when the era carries no cost models.
	CostModelsRaw *any
}

ProtocolParamsInfo holds protocol parameter data needed by the API.

type ProtocolParamsResponse

type ProtocolParamsResponse struct {
	Epoch              uint64  `json:"epoch"`
	MinFeeA            int     `json:"min_fee_a"`
	MinFeeB            int     `json:"min_fee_b"`
	MaxBlockSize       int     `json:"max_block_size"`
	MaxTxSize          int     `json:"max_tx_size"`
	MaxBlockHeaderSize int     `json:"max_block_header_size"`
	KeyDeposit         string  `json:"key_deposit"`
	PoolDeposit        string  `json:"pool_deposit"`
	EMax               int     `json:"e_max"`
	NOpt               int     `json:"n_opt"`
	A0                 float64 `json:"a0"`
	Rho                float64 `json:"rho"`
	Tau                float64 `json:"tau"`
	//nolint:tagliatelle
	DecentralisationParam float64         `json:"decentralisation_param"`
	ExtraEntropy          *map[string]any `json:"extra_entropy"`
	ProtocolMajorVer      int             `json:"protocol_major_ver"`
	ProtocolMinorVer      int             `json:"protocol_minor_ver"`
	MinUtxo               string          `json:"min_utxo"`
	MinPoolCost           string          `json:"min_pool_cost"`
	Nonce                 string          `json:"nonce"`
	CoinsPerUtxoSize      *string         `json:"coins_per_utxo_size"`
	CoinsPerUtxoWord      string          `json:"coins_per_utxo_word"`
	CostModels            *any            `json:"cost_models"`
	PriceMem              *float64        `json:"price_mem"`
	PriceStep             *float64        `json:"price_step"`
	MaxTxExMem            *string         `json:"max_tx_ex_mem"`
	MaxTxExSteps          *string         `json:"max_tx_ex_steps"`
	MaxBlockExMem         *string         `json:"max_block_ex_mem"`
	MaxBlockExSteps       *string         `json:"max_block_ex_steps"`
	MaxValSize            *string         `json:"max_val_size"`
	CollateralPercent     *int            `json:"collateral_percent"`
	MaxCollateralInputs   *int            `json:"max_collateral_inputs"`
	// Conway-era governance and reference-script parameters. These are
	// null for pre-Conway eras where they do not apply.
	PvtMotionNoConfidence    *float64 `json:"pvt_motion_no_confidence"`
	PvtCommitteeNormal       *float64 `json:"pvt_committee_normal"`
	PvtCommitteeNoConfidence *float64 `json:"pvt_committee_no_confidence"`
	PvtHardForkInitiation    *float64 `json:"pvt_hard_fork_initiation"`
	DvtMotionNoConfidence    *float64 `json:"dvt_motion_no_confidence"`
	DvtCommitteeNormal       *float64 `json:"dvt_committee_normal"`
	DvtCommitteeNoConfidence *float64 `json:"dvt_committee_no_confidence"`
	DvtUpdateToConstitution  *float64 `json:"dvt_update_to_constitution"`
	DvtHardForkInitiation    *float64 `json:"dvt_hard_fork_initiation"`
	//nolint:tagliatelle
	DvtPPNetworkGroup *float64 `json:"dvt_p_p_network_group"`
	//nolint:tagliatelle
	DvtPPEconomicGroup *float64 `json:"dvt_p_p_economic_group"`
	//nolint:tagliatelle
	DvtPPTechnicalGroup *float64 `json:"dvt_p_p_technical_group"`
	//nolint:tagliatelle
	DvtPPGovGroup          *float64 `json:"dvt_p_p_gov_group"`
	DvtTreasuryWithdrawal  *float64 `json:"dvt_treasury_withdrawal"`
	CommitteeMinSize       *string  `json:"committee_min_size"`
	CommitteeMaxTermLength *string  `json:"committee_max_term_length"`
	GovActionLifetime      *string  `json:"gov_action_lifetime"`
	GovActionDeposit       *string  `json:"gov_action_deposit"`
	DrepDeposit            *string  `json:"drep_deposit"`
	DrepActivity           *string  `json:"drep_activity"`
	PvtppSecurityGroup     *float64 `json:"pvtpp_security_group"`
	//nolint:tagliatelle
	PvtPPSecurityGroup         *float64 `json:"pvt_p_p_security_group"`
	MinFeeRefScriptCostPerByte *float64 `json:"min_fee_ref_script_cost_per_byte"`
	CostModelsRaw              *any     `json:"cost_models_raw"`
}

ProtocolParamsResponse represents Blockfrost protocol parameters.

type RootResponse

type RootResponse struct {
	URL     string `json:"url"`
	Version string `json:"version"`
}

RootResponse is returned by GET /.

type TransactionCBORResponse

type TransactionCBORResponse struct {
	CBOR string `json:"cbor"`
}

TransactionCBORResponse represents transaction CBOR in hex form.

type TransactionDelegationInfo

type TransactionDelegationInfo struct {
	Address     string
	PoolID      string
	Index       int
	CertIndex   int
	ActiveEpoch uint64
}

TransactionDelegationInfo holds one delegation certificate.

type TransactionDelegationResponse

type TransactionDelegationResponse struct {
	Address     string `json:"address"`
	PoolID      string `json:"pool_id"`
	Index       int    `json:"index"`
	CertIndex   int    `json:"cert_index"`
	ActiveEpoch uint64 `json:"active_epoch"`
}

TransactionDelegationResponse represents one delegation certificate.

type TransactionInfo

type TransactionInfo struct {
	InvalidBefore      *string
	InvalidHereafter   *string
	OutputAmount       []AddressAmountInfo
	Hash               string
	Block              string
	Deposit            string
	Fees               string
	TreasuryDonation   string
	Slot               uint64
	BlockHeight        uint64
	BlockTime          int64
	Size               int
	Index              uint32
	UtxoCount          int
	WithdrawalCount    int
	MirCertCount       int
	DelegationCount    int
	StakeCertCount     int
	PoolUpdateCount    int
	PoolRetireCount    int
	AssetMintBurnCount int
	RedeemerCount      int
	ValidContract      bool
}

TransactionInfo holds transaction summary data needed by the API.

type TransactionInputInfo

type TransactionInputInfo struct {
	ReferenceScriptHash *string
	InlineDatum         *string
	DataHash            *string
	Address             string
	TxHash              string
	Amount              []AddressAmountInfo
	OutputIndex         uint32
	Collateral          bool
	Reference           *bool
}

TransactionInputInfo holds one transaction input.

type TransactionInputResponse

type TransactionInputResponse struct {
	ReferenceScriptHash *string                 `json:"reference_script_hash"`
	InlineDatum         *string                 `json:"inline_datum"`
	DataHash            *string                 `json:"data_hash"`
	Reference           *bool                   `json:"reference"`
	Address             string                  `json:"address"`
	TxHash              string                  `json:"tx_hash"`
	Amount              []AddressAmountResponse `json:"amount"`
	OutputIndex         int                     `json:"output_index"`
	Collateral          bool                    `json:"collateral"`
}

TransactionInputResponse represents one transaction input.

type TransactionMIRInfo

type TransactionMIRInfo struct {
	Address   string
	Amount    string
	CertIndex int
	Pot       string
}

TransactionMIRInfo holds one MIR target.

type TransactionMIRResponse

type TransactionMIRResponse struct {
	Address   string `json:"address"`
	Amount    string `json:"amount"`
	CertIndex int    `json:"cert_index"`
	Pot       string `json:"pot"`
}

TransactionMIRResponse represents one MIR certificate target.

type TransactionMetadataCBORInfo

type TransactionMetadataCBORInfo struct {
	CBORMetadata string
	Label        string
}

TransactionMetadataCBORInfo holds a transaction metadata label and CBOR value.

type TransactionMetadataCBORResponse

type TransactionMetadataCBORResponse struct {
	CborMetadata *string `json:"cbor_metadata"`
	Metadata     string  `json:"metadata"`
	Label        string  `json:"label"`
}

TransactionMetadataCBORResponse represents one transaction metadata label in CBOR form.

type TransactionMetadataInfo

type TransactionMetadataInfo struct {
	JSONMetadata json.RawMessage
	Label        string
}

TransactionMetadataInfo holds a transaction metadata label and JSON value.

type TransactionMetadataResponse

type TransactionMetadataResponse struct {
	JSONMetadata json.RawMessage `json:"json_metadata"`
	Label        string          `json:"label"`
}

TransactionMetadataResponse represents one transaction metadata label in JSON form.

type TransactionOutputInfo

type TransactionOutputInfo struct {
	ReferenceScriptHash *string
	InlineDatum         *string
	DataHash            *string
	ConsumedByTx        *string
	Address             string
	Amount              []AddressAmountInfo
	OutputIndex         uint32
	Collateral          bool
}

TransactionOutputInfo holds one transaction output.

type TransactionOutputResponse

type TransactionOutputResponse struct {
	ReferenceScriptHash *string                 `json:"reference_script_hash"`
	InlineDatum         *string                 `json:"inline_datum"`
	DataHash            *string                 `json:"data_hash"`
	ConsumedByTx        *string                 `json:"consumed_by_tx"`
	Address             string                  `json:"address"`
	Amount              []AddressAmountResponse `json:"amount"`
	OutputIndex         int                     `json:"output_index"`
	Collateral          bool                    `json:"collateral"`
}

TransactionOutputResponse represents one transaction output.

type TransactionPoolMetadataInfo

type TransactionPoolMetadataInfo struct {
	URL  string
	Hash string
}

TransactionPoolMetadataInfo holds on-chain pool metadata pointer data.

type TransactionPoolMetadataResponse

type TransactionPoolMetadataResponse struct {
	Hash string `json:"hash"`
	URL  string `json:"url"`
}

TransactionPoolMetadataResponse represents pool metadata pointer data.

type TransactionPoolRelayInfo

type TransactionPoolRelayInfo struct {
	DNS    string
	DNSSrv string
	IPv4   string
	IPv6   string
	Port   *int
}

TransactionPoolRelayInfo holds one pool relay from a pool registration cert.

type TransactionPoolRelayResponse

type TransactionPoolRelayResponse struct {
	DNS    *string `json:"dns"`
	DNSSrv *string `json:"dns_srv"`
	IPv4   *string `json:"ipv4"`
	IPv6   *string `json:"ipv6"`
	Port   *int    `json:"port"`
}

TransactionPoolRelayResponse represents one relay in a pool registration cert.

type TransactionPoolRetireInfo

type TransactionPoolRetireInfo struct {
	PoolID        string
	CertIndex     int
	RetiringEpoch uint64
}

TransactionPoolRetireInfo holds one pool retirement certificate.

type TransactionPoolRetireResponse

type TransactionPoolRetireResponse struct {
	PoolID        string `json:"pool_id"`
	CertIndex     int    `json:"cert_index"`
	RetiringEpoch uint64 `json:"retiring_epoch"`
}

TransactionPoolRetireResponse represents one pool retirement certificate.

type TransactionPoolUpdateInfo

type TransactionPoolUpdateInfo struct {
	Metadata      *TransactionPoolMetadataInfo
	Owners        []string
	Relays        []TransactionPoolRelayInfo
	ActiveEpoch   uint64
	CertIndex     int
	FixedCost     string
	MarginCost    float64
	Pledge        string
	PoolID        string
	RewardAccount string
	VrfKey        string
}

TransactionPoolUpdateInfo holds one pool registration certificate.

type TransactionPoolUpdateResponse

type TransactionPoolUpdateResponse struct {
	Metadata      *TransactionPoolMetadataResponse `json:"metadata"`
	Owners        []string                         `json:"owners"`
	Relays        []TransactionPoolRelayResponse   `json:"relays"`
	ActiveEpoch   uint64                           `json:"active_epoch"`
	CertIndex     int                              `json:"cert_index"`
	FixedCost     string                           `json:"fixed_cost"`
	MarginCost    float64                          `json:"margin_cost"`
	Pledge        string                           `json:"pledge"`
	PoolID        string                           `json:"pool_id"`
	RewardAccount string                           `json:"reward_account"`
	VrfKey        string                           `json:"vrf_key"`
}

TransactionPoolUpdateResponse represents one pool registration certificate.

type TransactionRedeemerInfo

type TransactionRedeemerInfo struct {
	DatumHash        *string
	TxIndex          int
	Purpose          string
	ScriptHash       string
	RedeemerDataHash string
	UnitMem          string
	UnitSteps        string
	Fee              string
}

TransactionRedeemerInfo holds one Plutus redeemer.

type TransactionRedeemerResponse

type TransactionRedeemerResponse struct {
	DatumHash        *string `json:"datum_hash"`
	TxIndex          int     `json:"tx_index"`
	Purpose          string  `json:"purpose"`
	ScriptHash       string  `json:"script_hash"`
	RedeemerDataHash string  `json:"redeemer_data_hash"`
	UnitMem          string  `json:"unit_mem"`
	UnitSteps        string  `json:"unit_steps"`
	Fee              string  `json:"fee"`
}

TransactionRedeemerResponse represents one Plutus redeemer.

type TransactionRequiredSignerInfo

type TransactionRequiredSignerInfo struct {
	WitnessHash string
}

TransactionRequiredSignerInfo holds one required signing key hash.

type TransactionRequiredSignerResponse

type TransactionRequiredSignerResponse struct {
	WitnessHash string `json:"witness_hash"`
}

TransactionRequiredSignerResponse represents one required signing key hash.

type TransactionResponse

type TransactionResponse struct {
	InvalidBefore      *string                 `json:"invalid_before"`
	InvalidHereafter   *string                 `json:"invalid_hereafter"`
	OutputAmount       []AddressAmountResponse `json:"output_amount"`
	Hash               string                  `json:"hash"`
	Block              string                  `json:"block"`
	Deposit            string                  `json:"deposit"`
	Fees               string                  `json:"fees"`
	TreasuryDonation   string                  `json:"treasury_donation"`
	Slot               uint64                  `json:"slot"`
	BlockHeight        uint64                  `json:"block_height"`
	BlockTime          int64                   `json:"block_time"`
	Size               int                     `json:"size"`
	Index              int                     `json:"index"`
	UtxoCount          int                     `json:"utxo_count"`
	WithdrawalCount    int                     `json:"withdrawal_count"`
	MirCertCount       int                     `json:"mir_cert_count"`
	DelegationCount    int                     `json:"delegation_count"`
	StakeCertCount     int                     `json:"stake_cert_count"`
	PoolUpdateCount    int                     `json:"pool_update_count"`
	PoolRetireCount    int                     `json:"pool_retire_count"`
	AssetMintBurnCount int                     `json:"asset_mint_or_burn_count"`
	RedeemerCount      int                     `json:"redeemer_count"`
	ValidContract      bool                    `json:"valid_contract"`
}

TransactionResponse represents a Blockfrost transaction content object.

type TransactionStakeAddressInfo

type TransactionStakeAddressInfo struct {
	Address      string
	CertIndex    int
	Registration bool
}

TransactionStakeAddressInfo holds one stake registration/deregistration certificate.

type TransactionStakeAddressResponse

type TransactionStakeAddressResponse struct {
	Address      string `json:"address"`
	CertIndex    int    `json:"cert_index"`
	Registration bool   `json:"registration"`
}

TransactionStakeAddressResponse represents one stake address certificate.

type TransactionSubmitter

type TransactionSubmitter interface {
	AddTransaction(txType uint, txBytes []byte) error
}

TransactionSubmitter accepts raw transaction CBOR for mempool admission.

type TransactionUTXOsInfo

type TransactionUTXOsInfo struct {
	Hash    string
	Inputs  []TransactionInputInfo
	Outputs []TransactionOutputInfo
}

TransactionUTXOsInfo holds transaction inputs and outputs.

type TransactionUTXOsResponse

type TransactionUTXOsResponse struct {
	Hash    string                      `json:"hash"`
	Inputs  []TransactionInputResponse  `json:"inputs"`
	Outputs []TransactionOutputResponse `json:"outputs"`
}

TransactionUTXOsResponse represents transaction inputs and outputs.

type TransactionWithdrawalInfo

type TransactionWithdrawalInfo struct {
	Address string
	Amount  string
}

TransactionWithdrawalInfo holds one reward withdrawal.

type TransactionWithdrawalResponse

type TransactionWithdrawalResponse struct {
	Address string `json:"address"`
	Amount  string `json:"amount"`
}

TransactionWithdrawalResponse represents one reward withdrawal.

Jump to

Keyboard shortcuts

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