gen

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBatchAlreadyClosed = errors.New("batch already closed")
)

Functions

This section is empty.

Types

type CreateIndexedBlockParams

type CreateIndexedBlockParams struct {
	Hash                string
	Height              int32
	PrevHash            string
	EventHash           string
	CumulativeEventHash string
}

type CreateOutPointBalancesBatchResults

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

func (*CreateOutPointBalancesBatchResults) Close

func (*CreateOutPointBalancesBatchResults) Exec

func (b *CreateOutPointBalancesBatchResults) Exec(f func(int, error))

type CreateOutPointBalancesParams

type CreateOutPointBalancesParams struct {
	RuneID      string
	Pkscript    string
	TxHash      string
	TxIdx       int32
	Amount      pgtype.Numeric
	BlockHeight int32
	SpentHeight pgtype.Int4
}

type CreateRuneBalanceAtBlockBatchResults

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

func (*CreateRuneBalanceAtBlockBatchResults) Close

func (*CreateRuneBalanceAtBlockBatchResults) Exec

type CreateRuneBalanceAtBlockParams

type CreateRuneBalanceAtBlockParams struct {
	Pkscript    string
	BlockHeight int32
	RuneID      string
	Amount      pgtype.Numeric
}

type CreateRuneEntryParams

type CreateRuneEntryParams struct {
	RuneID           string
	Rune             string
	Number           int64
	Spacers          int32
	Premine          pgtype.Numeric
	Symbol           int32
	Divisibility     int16
	Terms            bool
	TermsAmount      pgtype.Numeric
	TermsCap         pgtype.Numeric
	TermsHeightStart pgtype.Int4
	TermsHeightEnd   pgtype.Int4
	TermsOffsetStart pgtype.Int4
	TermsOffsetEnd   pgtype.Int4
	Turbo            bool
	EtchingBlock     int32
	EtchingTxHash    string
	EtchedAt         pgtype.Timestamp
}

type CreateRuneEntryStateParams

type CreateRuneEntryStateParams struct {
	RuneID            string
	BlockHeight       int32
	Mints             pgtype.Numeric
	BurnedAmount      pgtype.Numeric
	CompletedAt       pgtype.Timestamp
	CompletedAtHeight pgtype.Int4
}

type CreateRuneTransactionParams

type CreateRuneTransactionParams struct {
	Hash        string
	BlockHeight int32
	Index       int32
	Timestamp   pgtype.Timestamp
	Inputs      []byte
	Outputs     []byte
	Mints       []byte
	Burns       []byte
	RuneEtched  bool
}

type CreateRunestoneParams

type CreateRunestoneParams struct {
	TxHash                  string
	BlockHeight             int32
	Etching                 bool
	EtchingDivisibility     pgtype.Int2
	EtchingPremine          pgtype.Numeric
	EtchingRune             pgtype.Text
	EtchingSpacers          pgtype.Int4
	EtchingSymbol           pgtype.Int4
	EtchingTerms            pgtype.Bool
	EtchingTermsAmount      pgtype.Numeric
	EtchingTermsCap         pgtype.Numeric
	EtchingTermsHeightStart pgtype.Int4
	EtchingTermsHeightEnd   pgtype.Int4
	EtchingTermsOffsetStart pgtype.Int4
	EtchingTermsOffsetEnd   pgtype.Int4
	EtchingTurbo            pgtype.Bool
	Edicts                  []byte
	Mint                    pgtype.Text
	Pointer                 pgtype.Int4
	Cenotaph                bool
	Flaws                   int32
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	SendBatch(context.Context, *pgx.Batch) pgx.BatchResults
}

type GetBalanceByPkScriptAndRuneIdParams

type GetBalanceByPkScriptAndRuneIdParams struct {
	Pkscript    string
	RuneID      string
	BlockHeight int32
}

type GetBalancesByPkScriptParams

type GetBalancesByPkScriptParams struct {
	Pkscript    string
	BlockHeight int32
}

type GetBalancesByPkScriptRow

type GetBalancesByPkScriptRow struct {
	Pkscript    string
	BlockHeight int32
	RuneID      string
	Amount      pgtype.Numeric
}

type GetBalancesByRuneIdParams

type GetBalancesByRuneIdParams struct {
	RuneID      string
	BlockHeight int32
}

type GetBalancesByRuneIdRow

type GetBalancesByRuneIdRow struct {
	Pkscript    string
	BlockHeight int32
	RuneID      string
	Amount      pgtype.Numeric
}

type GetLatestIndexerStatsRow

type GetLatestIndexerStatsRow struct {
	ClientVersion string
	Network       string
}

type GetOutPointBalancesAtOutPointParams

type GetOutPointBalancesAtOutPointParams struct {
	TxHash string
	TxIdx  int32
}

type GetRuneEntriesByRuneIdsAndHeightParams

type GetRuneEntriesByRuneIdsAndHeightParams struct {
	RuneIds []string
	Height  int32
}

type GetRuneEntriesByRuneIdsAndHeightRow

type GetRuneEntriesByRuneIdsAndHeightRow struct {
	RuneID            string
	Number            int64
	Rune              string
	Spacers           int32
	Premine           pgtype.Numeric
	Symbol            int32
	Divisibility      int16
	Terms             bool
	TermsAmount       pgtype.Numeric
	TermsCap          pgtype.Numeric
	TermsHeightStart  pgtype.Int4
	TermsHeightEnd    pgtype.Int4
	TermsOffsetStart  pgtype.Int4
	TermsOffsetEnd    pgtype.Int4
	Turbo             bool
	EtchingBlock      int32
	EtchingTxHash     string
	EtchedAt          pgtype.Timestamp
	RuneID_2          pgtype.Text
	BlockHeight       pgtype.Int4
	Mints             pgtype.Numeric
	BurnedAmount      pgtype.Numeric
	CompletedAt       pgtype.Timestamp
	CompletedAtHeight pgtype.Int4
}

type GetRuneEntriesByRuneIdsRow

type GetRuneEntriesByRuneIdsRow struct {
	RuneID            string
	Number            int64
	Rune              string
	Spacers           int32
	Premine           pgtype.Numeric
	Symbol            int32
	Divisibility      int16
	Terms             bool
	TermsAmount       pgtype.Numeric
	TermsCap          pgtype.Numeric
	TermsHeightStart  pgtype.Int4
	TermsHeightEnd    pgtype.Int4
	TermsOffsetStart  pgtype.Int4
	TermsOffsetEnd    pgtype.Int4
	Turbo             bool
	EtchingBlock      int32
	EtchingTxHash     string
	EtchedAt          pgtype.Timestamp
	RuneID_2          pgtype.Text
	BlockHeight       pgtype.Int4
	Mints             pgtype.Numeric
	BurnedAmount      pgtype.Numeric
	CompletedAt       pgtype.Timestamp
	CompletedAtHeight pgtype.Int4
}

type GetRuneTransactionsParams

type GetRuneTransactionsParams struct {
	FilterPkScript    bool
	PkScriptParam     []byte
	FilterRuneID      bool
	RuneIDParam       []byte
	RuneID            []byte
	RuneIDBlockHeight int32
	RuneIDTxIndex     int32
	FromBlock         int32
	ToBlock           int32
}

type GetRuneTransactionsRow

type GetRuneTransactionsRow struct {
	Hash                    string
	BlockHeight             int32
	Index                   int32
	Timestamp               pgtype.Timestamp
	Inputs                  []byte
	Outputs                 []byte
	Mints                   []byte
	Burns                   []byte
	RuneEtched              bool
	TxHash                  pgtype.Text
	BlockHeight_2           pgtype.Int4
	Etching                 pgtype.Bool
	EtchingDivisibility     pgtype.Int2
	EtchingPremine          pgtype.Numeric
	EtchingRune             pgtype.Text
	EtchingSpacers          pgtype.Int4
	EtchingSymbol           pgtype.Int4
	EtchingTerms            pgtype.Bool
	EtchingTermsAmount      pgtype.Numeric
	EtchingTermsCap         pgtype.Numeric
	EtchingTermsHeightStart pgtype.Int4
	EtchingTermsHeightEnd   pgtype.Int4
	EtchingTermsOffsetStart pgtype.Int4
	EtchingTermsOffsetEnd   pgtype.Int4
	EtchingTurbo            pgtype.Bool
	Edicts                  []byte
	Mint                    pgtype.Text
	Pointer                 pgtype.Int4
	Cenotaph                pgtype.Bool
	Flaws                   pgtype.Int4
}

type GetUnspentOutPointBalancesByPkScriptParams

type GetUnspentOutPointBalancesByPkScriptParams struct {
	Pkscript    string
	BlockHeight int32
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CountRuneEntries

func (q *Queries) CountRuneEntries(ctx context.Context) (int64, error)

func (*Queries) CreateIndexedBlock

func (q *Queries) CreateIndexedBlock(ctx context.Context, arg CreateIndexedBlockParams) error

func (*Queries) CreateRuneEntry

func (q *Queries) CreateRuneEntry(ctx context.Context, arg CreateRuneEntryParams) error

func (*Queries) CreateRuneEntryState

func (q *Queries) CreateRuneEntryState(ctx context.Context, arg CreateRuneEntryStateParams) error

func (*Queries) CreateRuneTransaction

func (q *Queries) CreateRuneTransaction(ctx context.Context, arg CreateRuneTransactionParams) error

func (*Queries) CreateRunestone

func (q *Queries) CreateRunestone(ctx context.Context, arg CreateRunestoneParams) error

func (*Queries) DeleteIndexedBlockSinceHeight

func (q *Queries) DeleteIndexedBlockSinceHeight(ctx context.Context, height int32) error

func (*Queries) DeleteOutPointBalancesSinceHeight

func (q *Queries) DeleteOutPointBalancesSinceHeight(ctx context.Context, blockHeight int32) error

func (*Queries) DeleteRuneBalancesSinceHeight

func (q *Queries) DeleteRuneBalancesSinceHeight(ctx context.Context, blockHeight int32) error

func (*Queries) DeleteRuneEntriesSinceHeight

func (q *Queries) DeleteRuneEntriesSinceHeight(ctx context.Context, etchingBlock int32) error

func (*Queries) DeleteRuneEntryStatesSinceHeight

func (q *Queries) DeleteRuneEntryStatesSinceHeight(ctx context.Context, blockHeight int32) error

func (*Queries) DeleteRuneTransactionsSinceHeight

func (q *Queries) DeleteRuneTransactionsSinceHeight(ctx context.Context, blockHeight int32) error

func (*Queries) DeleteRunestonesSinceHeight

func (q *Queries) DeleteRunestonesSinceHeight(ctx context.Context, blockHeight int32) error

func (*Queries) GetBalanceByPkScriptAndRuneId

func (q *Queries) GetBalanceByPkScriptAndRuneId(ctx context.Context, arg GetBalanceByPkScriptAndRuneIdParams) (RunesBalance, error)

func (*Queries) GetBalancesByPkScript

func (q *Queries) GetBalancesByPkScript(ctx context.Context, arg GetBalancesByPkScriptParams) ([]GetBalancesByPkScriptRow, error)

func (*Queries) GetBalancesByRuneId

func (q *Queries) GetBalancesByRuneId(ctx context.Context, arg GetBalancesByRuneIdParams) ([]GetBalancesByRuneIdRow, error)

func (*Queries) GetIndexedBlockByHeight

func (q *Queries) GetIndexedBlockByHeight(ctx context.Context, height int32) (RunesIndexedBlock, error)

func (*Queries) GetLatestIndexedBlock

func (q *Queries) GetLatestIndexedBlock(ctx context.Context) (RunesIndexedBlock, error)

func (*Queries) GetLatestIndexerState

func (q *Queries) GetLatestIndexerState(ctx context.Context) (RunesIndexerState, error)

func (*Queries) GetLatestIndexerStats

func (q *Queries) GetLatestIndexerStats(ctx context.Context) (GetLatestIndexerStatsRow, error)

func (*Queries) GetOutPointBalancesAtOutPoint

func (q *Queries) GetOutPointBalancesAtOutPoint(ctx context.Context, arg GetOutPointBalancesAtOutPointParams) ([]RunesOutpointBalance, error)

func (*Queries) GetRuneEntriesByRuneIds

func (q *Queries) GetRuneEntriesByRuneIds(ctx context.Context, runeIds []string) ([]GetRuneEntriesByRuneIdsRow, error)

func (*Queries) GetRuneIdFromRune

func (q *Queries) GetRuneIdFromRune(ctx context.Context, rune string) (string, error)

func (*Queries) GetRuneTransactions

func (q *Queries) GetRuneTransactions(ctx context.Context, arg GetRuneTransactionsParams) ([]GetRuneTransactionsRow, error)

func (*Queries) GetUnspentOutPointBalancesByPkScript

func (q *Queries) GetUnspentOutPointBalancesByPkScript(ctx context.Context, arg GetUnspentOutPointBalancesByPkScriptParams) ([]RunesOutpointBalance, error)

func (*Queries) SetIndexerState

func (q *Queries) SetIndexerState(ctx context.Context, arg SetIndexerStateParams) error

func (*Queries) SpendOutPointBalances

func (q *Queries) SpendOutPointBalances(ctx context.Context, arg SpendOutPointBalancesParams) error

func (*Queries) UnspendOutPointBalancesSinceHeight

func (q *Queries) UnspendOutPointBalancesSinceHeight(ctx context.Context, spentHeight pgtype.Int4) error

func (*Queries) UpdateIndexerStats

func (q *Queries) UpdateIndexerStats(ctx context.Context, arg UpdateIndexerStatsParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RunesBalance

type RunesBalance struct {
	Pkscript    string
	BlockHeight int32
	RuneID      string
	Amount      pgtype.Numeric
}

type RunesEntry

type RunesEntry struct {
	RuneID           string
	Number           int64
	Rune             string
	Spacers          int32
	Premine          pgtype.Numeric
	Symbol           int32
	Divisibility     int16
	Terms            bool
	TermsAmount      pgtype.Numeric
	TermsCap         pgtype.Numeric
	TermsHeightStart pgtype.Int4
	TermsHeightEnd   pgtype.Int4
	TermsOffsetStart pgtype.Int4
	TermsOffsetEnd   pgtype.Int4
	Turbo            bool
	EtchingBlock     int32
	EtchingTxHash    string
	EtchedAt         pgtype.Timestamp
}

type RunesEntryState

type RunesEntryState struct {
	RuneID            string
	BlockHeight       int32
	Mints             pgtype.Numeric
	BurnedAmount      pgtype.Numeric
	CompletedAt       pgtype.Timestamp
	CompletedAtHeight pgtype.Int4
}

type RunesIndexedBlock

type RunesIndexedBlock struct {
	Height              int32
	Hash                string
	PrevHash            string
	EventHash           string
	CumulativeEventHash string
}

type RunesIndexerStat

type RunesIndexerStat struct {
	Id            int64
	ClientVersion string
	Network       string
	CreatedAt     pgtype.Timestamptz
}

type RunesIndexerState

type RunesIndexerState struct {
	Id               int64
	DbVersion        int32
	EventHashVersion int32
	CreatedAt        pgtype.Timestamptz
}

type RunesOutpointBalance

type RunesOutpointBalance struct {
	RuneID      string
	Pkscript    string
	TxHash      string
	TxIdx       int32
	Amount      pgtype.Numeric
	BlockHeight int32
	SpentHeight pgtype.Int4
}

type RunesRunestone

type RunesRunestone struct {
	TxHash                  string
	BlockHeight             int32
	Etching                 bool
	EtchingDivisibility     pgtype.Int2
	EtchingPremine          pgtype.Numeric
	EtchingRune             pgtype.Text
	EtchingSpacers          pgtype.Int4
	EtchingSymbol           pgtype.Int4
	EtchingTerms            pgtype.Bool
	EtchingTermsAmount      pgtype.Numeric
	EtchingTermsCap         pgtype.Numeric
	EtchingTermsHeightStart pgtype.Int4
	EtchingTermsHeightEnd   pgtype.Int4
	EtchingTermsOffsetStart pgtype.Int4
	EtchingTermsOffsetEnd   pgtype.Int4
	EtchingTurbo            pgtype.Bool
	Edicts                  []byte
	Mint                    pgtype.Text
	Pointer                 pgtype.Int4
	Cenotaph                bool
	Flaws                   int32
}

type RunesTransaction

type RunesTransaction struct {
	Hash        string
	BlockHeight int32
	Index       int32
	Timestamp   pgtype.Timestamp
	Inputs      []byte
	Outputs     []byte
	Mints       []byte
	Burns       []byte
	RuneEtched  bool
}

type SetIndexerStateParams

type SetIndexerStateParams struct {
	DbVersion        int32
	EventHashVersion int32
}

type SpendOutPointBalancesParams

type SpendOutPointBalancesParams struct {
	SpentHeight pgtype.Int4
	TxHash      string
	TxIdx       int32
}

type UpdateIndexerStatsParams

type UpdateIndexerStatsParams struct {
	ClientVersion string
	Network       string
}

Jump to

Keyboard shortcuts

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