queries

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckpointTx

type CheckpointTx struct {
	Txid                 string
	Tx                   string
	CommitmentTxid       string
	IsRootCommitmentTxid bool
	OffchainTxid         string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type InsertVtxoCommitmentTxidParams

type InsertVtxoCommitmentTxidParams struct {
	VtxoTxid       string
	VtxoVout       int32
	CommitmentTxid string
}

type Intent

type Intent struct {
	ID      sql.NullString
	RoundID sql.NullString
	Proof   sql.NullString
	Message sql.NullString
}

type IntentWithInputsVw

type IntentWithInputsVw struct {
	Txid           sql.NullString
	Vout           sql.NullInt32
	Pubkey         sql.NullString
	Amount         sql.NullInt64
	ExpiresAt      sql.NullInt64
	CreatedAt      sql.NullInt64
	CommitmentTxid sql.NullString
	SpentBy        sql.NullString
	Spent          sql.NullBool
	Unrolled       sql.NullBool
	Swept          sql.NullBool
	Preconfirmed   sql.NullBool
	SettledBy      sql.NullString
	ArkTxid        sql.NullString
	IntentID       sql.NullString
	Commitments    []byte
	ID             sql.NullString
	RoundID        sql.NullString
	Proof          sql.NullString
	Message        sql.NullString
}

type IntentWithReceiversVw

type IntentWithReceiversVw struct {
	IntentID       sql.NullString
	Pubkey         sql.NullString
	OnchainAddress sql.NullString
	Amount         sql.NullInt64
	ID             sql.NullString
	RoundID        sql.NullString
	Proof          sql.NullString
	Message        sql.NullString
}

type MarketHour

type MarketHour struct {
	ID            int32
	StartTime     int64
	EndTime       int64
	Period        int64
	RoundInterval int64
	UpdatedAt     int64
}

type OffchainTx

type OffchainTx struct {
	Txid              string
	Tx                string
	StartingTimestamp int64
	EndingTimestamp   int64
	ExpiryTimestamp   int64
	FailReason        sql.NullString
	StageCode         int32
}

type OffchainTxVw

type OffchainTxVw struct {
	Txid                 string
	Tx                   string
	StartingTimestamp    int64
	EndingTimestamp      int64
	ExpiryTimestamp      int64
	FailReason           sql.NullString
	StageCode            int32
	CheckpointTxid       sql.NullString
	CheckpointTx         sql.NullString
	CommitmentTxid       sql.NullString
	IsRootCommitmentTxid sql.NullBool
	OffchainTxid         sql.NullString
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) InsertVtxoCommitmentTxid

func (q *Queries) InsertVtxoCommitmentTxid(ctx context.Context, arg InsertVtxoCommitmentTxidParams) error

func (*Queries) SelectAllRoundIds

func (q *Queries) SelectAllRoundIds(ctx context.Context) ([]string, error)

func (*Queries) SelectAllVtxos

func (q *Queries) SelectAllVtxos(ctx context.Context) ([]SelectAllVtxosRow, error)

func (*Queries) SelectLatestMarketHour

func (q *Queries) SelectLatestMarketHour(ctx context.Context) (MarketHour, error)

func (*Queries) SelectNotUnrolledVtxos

func (q *Queries) SelectNotUnrolledVtxos(ctx context.Context) ([]SelectNotUnrolledVtxosRow, error)

func (*Queries) SelectNotUnrolledVtxosWithPubkey

func (q *Queries) SelectNotUnrolledVtxosWithPubkey(ctx context.Context, pubkey string) ([]SelectNotUnrolledVtxosWithPubkeyRow, error)

func (*Queries) SelectOffchainTx

func (q *Queries) SelectOffchainTx(ctx context.Context, txid string) ([]SelectOffchainTxRow, error)

func (*Queries) SelectRoundConnectors

func (q *Queries) SelectRoundConnectors(ctx context.Context, txid string) ([]Tx, error)

func (*Queries) SelectRoundForfeitTxs

func (q *Queries) SelectRoundForfeitTxs(ctx context.Context, txid string) ([]Tx, error)

func (*Queries) SelectRoundIdsInTimeRange

func (q *Queries) SelectRoundIdsInTimeRange(ctx context.Context, arg SelectRoundIdsInTimeRangeParams) ([]string, error)

func (*Queries) SelectRoundStats

func (q *Queries) SelectRoundStats(ctx context.Context, txid string) (SelectRoundStatsRow, error)

func (*Queries) SelectRoundVtxoTree

func (q *Queries) SelectRoundVtxoTree(ctx context.Context, txid string) ([]Tx, error)

func (*Queries) SelectRoundVtxoTreeLeaves

func (q *Queries) SelectRoundVtxoTreeLeaves(ctx context.Context, commitmentTxid string) ([]SelectRoundVtxoTreeLeavesRow, error)

func (*Queries) SelectRoundWithId

func (q *Queries) SelectRoundWithId(ctx context.Context, id string) ([]SelectRoundWithIdRow, error)

func (*Queries) SelectRoundWithTxid

func (q *Queries) SelectRoundWithTxid(ctx context.Context, txid string) ([]SelectRoundWithTxidRow, error)

func (*Queries) SelectRoundsWithTxids

func (q *Queries) SelectRoundsWithTxids(ctx context.Context, dollar_1 []string) ([]string, error)

func (*Queries) SelectSweepableRounds

func (q *Queries) SelectSweepableRounds(ctx context.Context) ([]string, error)

func (*Queries) SelectSweepableVtxos

func (q *Queries) SelectSweepableVtxos(ctx context.Context) ([]SelectSweepableVtxosRow, error)

func (*Queries) SelectSweptRoundsConnectorAddress

func (q *Queries) SelectSweptRoundsConnectorAddress(ctx context.Context) ([]string, error)

func (*Queries) SelectTxs

func (q *Queries) SelectTxs(ctx context.Context, dollar_1 []string) ([]SelectTxsRow, error)

func (*Queries) SelectVtxo

func (q *Queries) SelectVtxo(ctx context.Context, arg SelectVtxoParams) (SelectVtxoRow, error)

func (*Queries) SelectVtxosWithCommitmentTxid

func (q *Queries) SelectVtxosWithCommitmentTxid(ctx context.Context, commitmentTxid string) ([]SelectVtxosWithCommitmentTxidRow, error)

func (*Queries) SelectVtxosWithPubkeys

func (q *Queries) SelectVtxosWithPubkeys(ctx context.Context, dollar_1 []string) ([]SelectVtxosWithPubkeysRow, error)

func (*Queries) UpdateVtxoExpiration

func (q *Queries) UpdateVtxoExpiration(ctx context.Context, arg UpdateVtxoExpirationParams) error

func (*Queries) UpdateVtxoIntentId

func (q *Queries) UpdateVtxoIntentId(ctx context.Context, arg UpdateVtxoIntentIdParams) error

func (*Queries) UpdateVtxoSettled

func (q *Queries) UpdateVtxoSettled(ctx context.Context, arg UpdateVtxoSettledParams) error

func (*Queries) UpdateVtxoSpent

func (q *Queries) UpdateVtxoSpent(ctx context.Context, arg UpdateVtxoSpentParams) error

func (*Queries) UpdateVtxoSwept

func (q *Queries) UpdateVtxoSwept(ctx context.Context, arg UpdateVtxoSweptParams) error

func (*Queries) UpdateVtxoUnrolled

func (q *Queries) UpdateVtxoUnrolled(ctx context.Context, arg UpdateVtxoUnrolledParams) error

func (*Queries) UpsertCheckpointTx

func (q *Queries) UpsertCheckpointTx(ctx context.Context, arg UpsertCheckpointTxParams) error

func (*Queries) UpsertIntent

func (q *Queries) UpsertIntent(ctx context.Context, arg UpsertIntentParams) error

func (*Queries) UpsertMarketHour

func (q *Queries) UpsertMarketHour(ctx context.Context, arg UpsertMarketHourParams) error

func (*Queries) UpsertOffchainTx

func (q *Queries) UpsertOffchainTx(ctx context.Context, arg UpsertOffchainTxParams) error

func (*Queries) UpsertReceiver

func (q *Queries) UpsertReceiver(ctx context.Context, arg UpsertReceiverParams) error

func (*Queries) UpsertRound

func (q *Queries) UpsertRound(ctx context.Context, arg UpsertRoundParams) error

func (*Queries) UpsertTx

func (q *Queries) UpsertTx(ctx context.Context, arg UpsertTxParams) error

func (*Queries) UpsertVtxo

func (q *Queries) UpsertVtxo(ctx context.Context, arg UpsertVtxoParams) error

func (*Queries) WithTx

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

type Receiver

type Receiver struct {
	IntentID       string
	Pubkey         string
	OnchainAddress string
	Amount         int64
}

type Round

type Round struct {
	ID                 string
	StartingTimestamp  int64
	EndingTimestamp    int64
	Ended              bool
	Failed             bool
	StageCode          int32
	ConnectorAddress   string
	Version            int32
	Swept              bool
	VtxoTreeExpiration int64
	FailReason         sql.NullString
}

type RoundIntentsVw

type RoundIntentsVw struct {
	ID      sql.NullString
	RoundID sql.NullString
	Proof   sql.NullString
	Message sql.NullString
}

type RoundTxsVw

type RoundTxsVw struct {
	Txid     sql.NullString
	Tx       sql.NullString
	RoundID  sql.NullString
	Type     sql.NullString
	Position sql.NullInt32
	Children pqtype.NullRawMessage
}

type RoundWithCommitmentTxVw

type RoundWithCommitmentTxVw struct {
	ID                 string
	StartingTimestamp  int64
	EndingTimestamp    int64
	Ended              bool
	Failed             bool
	StageCode          int32
	ConnectorAddress   string
	Version            int32
	Swept              bool
	VtxoTreeExpiration int64
	FailReason         sql.NullString
	Txid               string
	Tx                 string
	RoundID            string
	Type               string
	Position           int32
	Children           pqtype.NullRawMessage
}

type SelectAllVtxosRow

type SelectAllVtxosRow struct {
	VtxoVw VtxoVw
}

type SelectNotUnrolledVtxosRow

type SelectNotUnrolledVtxosRow struct {
	VtxoVw VtxoVw
}

type SelectNotUnrolledVtxosWithPubkeyRow

type SelectNotUnrolledVtxosWithPubkeyRow struct {
	VtxoVw VtxoVw
}

type SelectOffchainTxRow

type SelectOffchainTxRow struct {
	OffchainTxVw OffchainTxVw
}

type SelectRoundIdsInTimeRangeParams

type SelectRoundIdsInTimeRangeParams struct {
	StartTs int64
	EndTs   int64
}

type SelectRoundStatsRow

type SelectRoundStatsRow struct {
	Swept              bool
	StartingTimestamp  int64
	EndingTimestamp    int64
	TotalForfeitAmount int64
	TotalInputVtxos    int64
	TotalBatchAmount   int64
	TotalOutputVtxos   int64
	ExpiresAt          interface{}
}

type SelectRoundVtxoTreeLeavesRow

type SelectRoundVtxoTreeLeavesRow struct {
	VtxoVw VtxoVw
}

type SelectRoundWithIdRow

type SelectRoundWithIdRow struct {
	Round                 Round
	RoundIntentsVw        RoundIntentsVw
	RoundTxsVw            RoundTxsVw
	IntentWithReceiversVw IntentWithReceiversVw
	IntentWithInputsVw    IntentWithInputsVw
}

type SelectRoundWithTxidRow

type SelectRoundWithTxidRow struct {
	Round                 Round
	RoundIntentsVw        RoundIntentsVw
	RoundTxsVw            RoundTxsVw
	IntentWithReceiversVw IntentWithReceiversVw
	IntentWithInputsVw    IntentWithInputsVw
}

type SelectSweepableVtxosRow

type SelectSweepableVtxosRow struct {
	VtxoVw VtxoVw
}

type SelectTxsRow

type SelectTxsRow struct {
	Txid string
	Data string
}

type SelectVtxoParams

type SelectVtxoParams struct {
	Txid string
	Vout int32
}

type SelectVtxoRow

type SelectVtxoRow struct {
	VtxoVw VtxoVw
}

type SelectVtxosWithCommitmentTxidRow

type SelectVtxosWithCommitmentTxidRow struct {
	VtxoVw VtxoVw
}

type SelectVtxosWithPubkeysRow

type SelectVtxosWithPubkeysRow struct {
	VtxoVw VtxoVw
}

type Tx

type Tx struct {
	Txid     string
	Tx       string
	RoundID  string
	Type     string
	Position int32
	Children pqtype.NullRawMessage
}

type UpdateVtxoExpirationParams

type UpdateVtxoExpirationParams struct {
	ExpiresAt int64
	Txid      string
	Vout      int32
}

type UpdateVtxoIntentIdParams

type UpdateVtxoIntentIdParams struct {
	IntentID sql.NullString
	Txid     string
	Vout     int32
}

type UpdateVtxoSettledParams

type UpdateVtxoSettledParams struct {
	SpentBy   sql.NullString
	SettledBy sql.NullString
	Txid      string
	Vout      int32
}

type UpdateVtxoSpentParams

type UpdateVtxoSpentParams struct {
	SpentBy sql.NullString
	ArkTxid sql.NullString
	Txid    string
	Vout    int32
}

type UpdateVtxoSweptParams

type UpdateVtxoSweptParams struct {
	Txid string
	Vout int32
}

type UpdateVtxoUnrolledParams

type UpdateVtxoUnrolledParams struct {
	Txid string
	Vout int32
}

type UpsertCheckpointTxParams

type UpsertCheckpointTxParams struct {
	Txid                 string
	Tx                   string
	CommitmentTxid       string
	IsRootCommitmentTxid bool
	OffchainTxid         string
}

type UpsertIntentParams

type UpsertIntentParams struct {
	ID      sql.NullString
	RoundID sql.NullString
	Proof   sql.NullString
	Message sql.NullString
}

type UpsertMarketHourParams

type UpsertMarketHourParams struct {
	ID            int32
	StartTime     int64
	EndTime       int64
	Period        int64
	RoundInterval int64
	UpdatedAt     int64
}

type UpsertOffchainTxParams

type UpsertOffchainTxParams struct {
	Txid              string
	Tx                string
	StartingTimestamp int64
	EndingTimestamp   int64
	ExpiryTimestamp   int64
	FailReason        sql.NullString
	StageCode         int32
}

type UpsertReceiverParams

type UpsertReceiverParams struct {
	IntentID       string
	Pubkey         string
	OnchainAddress string
	Amount         int64
}

type UpsertRoundParams

type UpsertRoundParams struct {
	ID                 string
	StartingTimestamp  int64
	EndingTimestamp    int64
	Ended              bool
	Failed             bool
	FailReason         sql.NullString
	StageCode          int32
	ConnectorAddress   string
	Version            int32
	Swept              bool
	VtxoTreeExpiration int64
}

type UpsertTxParams

type UpsertTxParams struct {
	Tx       string
	RoundID  string
	Type     string
	Position int32
	Txid     string
	Children pqtype.NullRawMessage
}

type UpsertVtxoParams

type UpsertVtxoParams struct {
	Txid           string
	Vout           int32
	Pubkey         string
	Amount         int64
	CommitmentTxid string
	SettledBy      sql.NullString
	ArkTxid        sql.NullString
	SpentBy        sql.NullString
	Spent          bool
	Unrolled       bool
	Swept          bool
	Preconfirmed   bool
	ExpiresAt      int64
	CreatedAt      int64
}

type Vtxo

type Vtxo struct {
	Txid           string
	Vout           int32
	Pubkey         string
	Amount         int64
	ExpiresAt      int64
	CreatedAt      int64
	CommitmentTxid string
	SpentBy        sql.NullString
	Spent          bool
	Unrolled       bool
	Swept          bool
	Preconfirmed   bool
	SettledBy      sql.NullString
	ArkTxid        sql.NullString
	IntentID       sql.NullString
}

type VtxoCommitmentTxid

type VtxoCommitmentTxid struct {
	VtxoTxid       string
	VtxoVout       int32
	CommitmentTxid string
}

type VtxoVw

type VtxoVw struct {
	Txid           string
	Vout           int32
	Pubkey         string
	Amount         int64
	ExpiresAt      int64
	CreatedAt      int64
	CommitmentTxid string
	SpentBy        sql.NullString
	Spent          bool
	Unrolled       bool
	Swept          bool
	Preconfirmed   bool
	SettledBy      sql.NullString
	ArkTxid        sql.NullString
	IntentID       sql.NullString
	Commitments    []byte
}

Jump to

Keyboard shortcuts

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