mapper

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account

func Account(block *graph.Block, input *graph.Account) (*model.Account, error)

Account returns an account model constructed from the graph input

func AccountFromStagedLedger added in v0.5.0

func AccountFromStagedLedger(block *graph.Block, entry *archive.StakingInfo) (*model.Account, error)

func Accounts

func Accounts(block *graph.Block) ([]model.Account, error)

Accounts returns accounts models references from the block data

func BlockFromArchive

func BlockFromArchive(input *archive.Block) (*model.Block, error)

func BlockHeight

func BlockHeight(input *graph.Block) uint64

BlockHeight returns a parsed block height

func BlockRewardTransaction

func BlockRewardTransaction(block *graph.Block) (*model.Transaction, error)

func BlockTime

func BlockTime(input *graph.Block) time.Time

BlockTime returns a parsed block time

func DelegatorBlockRewards added in v0.11.0

func DelegatorBlockRewards(accounts []model.Delegation, block model.Block) ([]model.BlockReward, error)

DelegatorBlockRewards returns delegator reward models references from the block data

func FeeTransaction

func FeeTransaction(block *graph.Block, transfer *graph.FeeTransfer) (*model.Transaction, error)

func RewardTimeBucket added in v0.11.0

func RewardTimeBucket(input time.Time) (time.Time, error)

RewardTimeBucket daily time bucket for rewards

func SnarkFeeTransaction

func SnarkFeeTransaction(block *graph.Block, transfer *graph.FeeTransfer) (*model.Transaction, error)

func SnarkJob

func SnarkJob(block *graph.Block, w *graph.CompletedWork) (*model.SnarkJob, error)

SnarkJob returns a job model constructed from the graph input

func SnarkJobs

func SnarkJobs(block *graph.Block) ([]model.SnarkJob, error)

SnarkJobs returns list of jobs constructed from the graph input

func Snarker

func Snarker(block *graph.Block, job *graph.CompletedWork) (*model.Snarker, error)

Snarker returns a snarker model constructed from the graph input

func Snarkers

func Snarkers(block *graph.Block) ([]model.Snarker, error)

Snarkers returns a collection of snarker models constructed from the graph input

func TransactionFees added in v0.11.0

func TransactionFees(block *graph.Block) types.Amount

func Transactions

func Transactions(block *graph.Block) ([]model.Transaction, error)

Transactions returns a list of transactions from the coda input

func TransactionsFromArchive

func TransactionsFromArchive(block *archive.Block) ([]model.Transaction, error)

func UserTransaction

func UserTransaction(block *graph.Block, t *graph.UserCommand) (*model.Transaction, error)

func Validator

func Validator(block *archive.Block) (*model.Validator, error)

Validator returns a validator model constructed from the coda input

func ValidatorBlockReward added in v0.11.0

func ValidatorBlockReward(block model.Block) (*model.BlockReward, error)

ValidatorBlockReward returns validator reward models references from the block data

Types

type LedgerData

type LedgerData struct {
	Ledger  *model.Ledger
	Entries []model.LedgerEntry
}

func Ledger

func Ledger(tip *graph.Block, records []archive.StakingInfo) (*LedgerData, error)

func (*LedgerData) UpdateLedgerID

func (data *LedgerData) UpdateLedgerID()

Jump to

Keyboard shortcuts

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