gen

package
v0.3.0-brc20-1 Latest Latest
Warning

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

Go to latest
Published: Jun 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 Brc20Balance

type Brc20Balance struct {
	Pkscript         string
	BlockHeight      int32
	Tick             string
	OverallBalance   pgtype.Numeric
	AvailableBalance pgtype.Numeric
}

type Brc20EventDeploy

type Brc20EventDeploy struct {
	Id                int64
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	Pkscript          string
	Satpoint          string
	TotalSupply       pgtype.Numeric
	Decimals          int16
	LimitPerMint      pgtype.Numeric
	IsSelfMint        bool
}

type Brc20EventInscribeTransfer

type Brc20EventInscribeTransfer struct {
	Id                int64
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	Pkscript          string
	Satpoint          string
	OutputIndex       int32
	SatsAmount        int64
	Amount            pgtype.Numeric
}

type Brc20EventMint

type Brc20EventMint struct {
	Id                int64
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	Pkscript          string
	Satpoint          string
	Amount            pgtype.Numeric
	ParentID          pgtype.Text
}

type Brc20EventTransferTransfer

type Brc20EventTransferTransfer struct {
	Id                int64
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	FromPkscript      string
	FromSatpoint      string
	FromInputIndex    int32
	ToPkscript        string
	ToSatpoint        string
	ToOutputIndex     int32
	SpentAsFee        bool
	Amount            pgtype.Numeric
}

type Brc20IndexedBlock

type Brc20IndexedBlock struct {
	Height              int32
	Hash                string
	EventHash           string
	CumulativeEventHash string
}

type Brc20IndexerState

type Brc20IndexerState struct {
	Id               int64
	ClientVersion    string
	Network          string
	DbVersion        int32
	EventHashVersion int32
	CreatedAt        pgtype.Timestamptz
}

type Brc20InscriptionEntry

type Brc20InscriptionEntry struct {
	Id              string
	Number          int64
	SequenceNumber  int64
	Delegate        pgtype.Text
	Metadata        []byte
	Metaprotocol    pgtype.Text
	Parents         []string
	Pointer         pgtype.Int8
	Content         []byte
	ContentEncoding pgtype.Text
	ContentType     pgtype.Text
	Cursed          bool
	CursedForBrc20  bool
	CreatedAt       pgtype.Timestamp
	CreatedAtHeight int32
}

type Brc20InscriptionEntryState

type Brc20InscriptionEntryState struct {
	Id            string
	BlockHeight   int32
	TransferCount int32
}

type Brc20InscriptionTransfer

type Brc20InscriptionTransfer struct {
	InscriptionID     string
	BlockHeight       int32
	TxIndex           int32
	TxHash            string
	FromInputIndex    int32
	OldSatpointTxHash pgtype.Text
	OldSatpointOutIdx pgtype.Int4
	OldSatpointOffset pgtype.Int8
	NewSatpointTxHash pgtype.Text
	NewSatpointOutIdx pgtype.Int4
	NewSatpointOffset pgtype.Int8
	NewPkscript       string
	NewOutputValue    int64
	SentAsFee         bool
	TransferCount     int32
}

type Brc20ProcessorStat

type Brc20ProcessorStat struct {
	BlockHeight             int32
	CursedInscriptionCount  int32
	BlessedInscriptionCount int32
	LostSats                int64
}

type Brc20TickEntry

type Brc20TickEntry struct {
	Tick                string
	OriginalTick        string
	TotalSupply         pgtype.Numeric
	Decimals            int16
	LimitPerMint        pgtype.Numeric
	IsSelfMint          bool
	DeployInscriptionID string
	DeployedAt          pgtype.Timestamp
	DeployedAtHeight    int32
}

type Brc20TickEntryState

type Brc20TickEntryState struct {
	Tick              string
	BlockHeight       int32
	MintedAmount      pgtype.Numeric
	BurnedAmount      pgtype.Numeric
	CompletedAt       pgtype.Timestamp
	CompletedAtHeight pgtype.Int4
}

type CreateEventDeploysBatchResults

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

func (*CreateEventDeploysBatchResults) Close

func (*CreateEventDeploysBatchResults) Exec

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

type CreateEventDeploysParams

type CreateEventDeploysParams struct {
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	Pkscript          string
	Satpoint          string
	TotalSupply       pgtype.Numeric
	Decimals          int16
	LimitPerMint      pgtype.Numeric
	IsSelfMint        bool
}

type CreateEventInscribeTransfersBatchResults

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

func (*CreateEventInscribeTransfersBatchResults) Close

func (*CreateEventInscribeTransfersBatchResults) Exec

type CreateEventInscribeTransfersParams

type CreateEventInscribeTransfersParams struct {
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	Pkscript          string
	Satpoint          string
	OutputIndex       int32
	SatsAmount        int64
	Amount            pgtype.Numeric
}

type CreateEventMintsBatchResults

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

func (*CreateEventMintsBatchResults) Close

func (*CreateEventMintsBatchResults) Exec

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

type CreateEventMintsParams

type CreateEventMintsParams struct {
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	Pkscript          string
	Satpoint          string
	Amount            pgtype.Numeric
	ParentID          pgtype.Text
}

type CreateEventTransferTransfersBatchResults

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

func (*CreateEventTransferTransfersBatchResults) Close

func (*CreateEventTransferTransfersBatchResults) Exec

type CreateEventTransferTransfersParams

type CreateEventTransferTransfersParams struct {
	InscriptionID     string
	InscriptionNumber int64
	Tick              string
	OriginalTick      string
	TxHash            string
	BlockHeight       int32
	TxIndex           int32
	Timestamp         pgtype.Timestamp
	FromPkscript      string
	FromSatpoint      string
	FromInputIndex    int32
	ToPkscript        string
	ToSatpoint        string
	ToOutputIndex     int32
	SpentAsFee        bool
	Amount            pgtype.Numeric
}

type CreateIndexedBlockParams

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

type CreateIndexerStateParams

type CreateIndexerStateParams struct {
	ClientVersion    string
	Network          string
	DbVersion        int32
	EventHashVersion int32
}

type CreateInscriptionEntriesBatchResults

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

func (*CreateInscriptionEntriesBatchResults) Close

func (*CreateInscriptionEntriesBatchResults) Exec

type CreateInscriptionEntriesParams

type CreateInscriptionEntriesParams struct {
	Id              string
	Number          int64
	SequenceNumber  int64
	Delegate        pgtype.Text
	Metadata        []byte
	Metaprotocol    pgtype.Text
	Parents         []string
	Pointer         pgtype.Int8
	Content         []byte
	ContentEncoding pgtype.Text
	ContentType     pgtype.Text
	Cursed          bool
	CursedForBrc20  bool
	CreatedAt       pgtype.Timestamp
	CreatedAtHeight int32
}

type CreateInscriptionEntryStatesBatchResults

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

func (*CreateInscriptionEntryStatesBatchResults) Close

func (*CreateInscriptionEntryStatesBatchResults) Exec

type CreateInscriptionEntryStatesParams

type CreateInscriptionEntryStatesParams struct {
	Id            string
	BlockHeight   int32
	TransferCount int32
}

type CreateInscriptionTransfersBatchResults

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

func (*CreateInscriptionTransfersBatchResults) Close

func (*CreateInscriptionTransfersBatchResults) Exec

type CreateInscriptionTransfersParams

type CreateInscriptionTransfersParams struct {
	InscriptionID     string
	BlockHeight       int32
	TxIndex           int32
	TxHash            string
	FromInputIndex    int32
	OldSatpointTxHash pgtype.Text
	OldSatpointOutIdx pgtype.Int4
	OldSatpointOffset pgtype.Int8
	NewSatpointTxHash pgtype.Text
	NewSatpointOutIdx pgtype.Int4
	NewSatpointOffset pgtype.Int8
	NewPkscript       string
	NewOutputValue    int64
	SentAsFee         bool
	TransferCount     int32
}

type CreateProcessorStatsParams

type CreateProcessorStatsParams struct {
	BlockHeight             int32
	CursedInscriptionCount  int32
	BlessedInscriptionCount int32
	LostSats                int64
}

type CreateTickEntriesBatchResults

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

func (*CreateTickEntriesBatchResults) Close

func (*CreateTickEntriesBatchResults) Exec

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

type CreateTickEntriesParams

type CreateTickEntriesParams struct {
	Tick                string
	OriginalTick        string
	TotalSupply         pgtype.Numeric
	Decimals            int16
	LimitPerMint        pgtype.Numeric
	IsSelfMint          bool
	DeployInscriptionID string
	DeployedAt          pgtype.Timestamp
	DeployedAtHeight    int32
}

type CreateTickEntryStatesBatchResults

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

func (*CreateTickEntryStatesBatchResults) Close

func (*CreateTickEntryStatesBatchResults) Exec

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

type CreateTickEntryStatesParams

type CreateTickEntryStatesParams struct {
	Tick              string
	BlockHeight       int32
	MintedAmount      pgtype.Numeric
	BurnedAmount      pgtype.Numeric
	CompletedAt       pgtype.Timestamp
	CompletedAtHeight pgtype.Int4
}

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 GetBalancesBatchAtHeightParams

type GetBalancesBatchAtHeightParams struct {
	PkscriptArr []string
	TickArr     []string
	BlockHeight int32
}

type GetInscriptionEntriesByIdsRow

type GetInscriptionEntriesByIdsRow struct {
	Id              string
	Number          int64
	SequenceNumber  int64
	Delegate        pgtype.Text
	Metadata        []byte
	Metaprotocol    pgtype.Text
	Parents         []string
	Pointer         pgtype.Int8
	Content         []byte
	ContentEncoding pgtype.Text
	ContentType     pgtype.Text
	Cursed          bool
	CursedForBrc20  bool
	CreatedAt       pgtype.Timestamp
	CreatedAtHeight int32
	Id_2            pgtype.Text
	BlockHeight     pgtype.Int4
	TransferCount   pgtype.Int4
}

type GetInscriptionNumbersByIdsRow

type GetInscriptionNumbersByIdsRow struct {
	Id     string
	Number int64
}

type GetInscriptionParentsByIdsRow

type GetInscriptionParentsByIdsRow struct {
	Id      string
	Parents []string
}

type GetInscriptionTransfersInOutPointsParams

type GetInscriptionTransfersInOutPointsParams struct {
	TxHashArr   []string
	TxOutIdxArr []int32
}

type GetInscriptionTransfersInOutPointsRow

type GetInscriptionTransfersInOutPointsRow struct {
	InscriptionID     string
	BlockHeight       int32
	TxIndex           int32
	TxHash            string
	FromInputIndex    int32
	OldSatpointTxHash pgtype.Text
	OldSatpointOutIdx pgtype.Int4
	OldSatpointOffset pgtype.Int8
	NewSatpointTxHash pgtype.Text
	NewSatpointOutIdx pgtype.Int4
	NewSatpointOffset pgtype.Int8
	NewPkscript       string
	NewOutputValue    int64
	SentAsFee         bool
	TransferCount     int32
	Content           []byte
}

type GetLatestEventIdsRow

type GetLatestEventIdsRow struct {
	EventDeployID           int64
	EventMintID             int64
	EventInscribeTransferID int64
	EventTransferTransferID int64
}

type GetTickEntriesByTicksRow

type GetTickEntriesByTicksRow struct {
	Tick                string
	OriginalTick        string
	TotalSupply         pgtype.Numeric
	Decimals            int16
	LimitPerMint        pgtype.Numeric
	IsSelfMint          bool
	DeployInscriptionID string
	DeployedAt          pgtype.Timestamp
	DeployedAtHeight    int32
	Tick_2              pgtype.Text
	BlockHeight         pgtype.Int4
	MintedAmount        pgtype.Numeric
	BurnedAmount        pgtype.Numeric
	CompletedAt         pgtype.Timestamp
	CompletedAtHeight   pgtype.Int4
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateEventDeploys

func (*Queries) CreateEventMints

func (*Queries) CreateIndexedBlock

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

func (*Queries) CreateIndexerState

func (q *Queries) CreateIndexerState(ctx context.Context, arg CreateIndexerStateParams) error

func (*Queries) CreateProcessorStats

func (q *Queries) CreateProcessorStats(ctx context.Context, arg CreateProcessorStatsParams) error

func (*Queries) CreateTickEntries

func (*Queries) DeleteBalancesSinceHeight

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

func (*Queries) DeleteEventDeploysSinceHeight

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

func (*Queries) DeleteEventInscribeTransfersSinceHeight

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

func (*Queries) DeleteEventMintsSinceHeight

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

func (*Queries) DeleteEventTransferTransfersSinceHeight

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

func (*Queries) DeleteIndexedBlocksSinceHeight

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

func (*Queries) DeleteInscriptionEntriesSinceHeight

func (q *Queries) DeleteInscriptionEntriesSinceHeight(ctx context.Context, createdAtHeight int32) error

func (*Queries) DeleteInscriptionEntryStatesSinceHeight

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

func (*Queries) DeleteInscriptionTransfersSinceHeight

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

func (*Queries) DeleteProcessorStatsSinceHeight

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

func (*Queries) DeleteTickEntriesSinceHeight

func (q *Queries) DeleteTickEntriesSinceHeight(ctx context.Context, deployedAtHeight int32) error

func (*Queries) DeleteTickEntryStatesSinceHeight

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

func (*Queries) GetBalancesBatchAtHeight

func (q *Queries) GetBalancesBatchAtHeight(ctx context.Context, arg GetBalancesBatchAtHeightParams) ([]Brc20Balance, error)

func (*Queries) GetEventInscribeTransfersByInscriptionIds

func (q *Queries) GetEventInscribeTransfersByInscriptionIds(ctx context.Context, inscriptionIds []string) ([]Brc20EventInscribeTransfer, error)

func (*Queries) GetIndexedBlockByHeight

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

func (*Queries) GetInscriptionEntriesByIds

func (q *Queries) GetInscriptionEntriesByIds(ctx context.Context, inscriptionIds []string) ([]GetInscriptionEntriesByIdsRow, error)

func (*Queries) GetInscriptionNumbersByIds

func (q *Queries) GetInscriptionNumbersByIds(ctx context.Context, inscriptionIds []string) ([]GetInscriptionNumbersByIdsRow, error)

func (*Queries) GetInscriptionParentsByIds

func (q *Queries) GetInscriptionParentsByIds(ctx context.Context, inscriptionIds []string) ([]GetInscriptionParentsByIdsRow, error)

func (*Queries) GetLatestEventIds

func (q *Queries) GetLatestEventIds(ctx context.Context) (GetLatestEventIdsRow, error)

func (*Queries) GetLatestIndexedBlock

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

func (*Queries) GetLatestIndexerState

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

func (*Queries) GetLatestProcessorStats

func (q *Queries) GetLatestProcessorStats(ctx context.Context) (Brc20ProcessorStat, error)

func (*Queries) GetTickEntriesByTicks

func (q *Queries) GetTickEntriesByTicks(ctx context.Context, ticks []string) ([]GetTickEntriesByTicksRow, error)

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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