queries

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	AssetID        string
	ControlAssetID sql.NullString
	Metadata       sql.NullString
}

type AssetVtxo

type AssetVtxo struct {
	VtxoTxid string
	VtxoVout int64
	AssetID  string
	Amount   int64
}

type AssetVtxoVw

type AssetVtxoVw struct {
	Txid            string
	Vout            int64
	Script          string
	Amount          int64
	CommitmentTxids string
	SpentBy         sql.NullString
	Spent           bool
	ExpiresAt       int64
	CreatedAt       int64
	Preconfirmed    bool
	Swept           bool
	SettledBy       sql.NullString
	Unrolled        bool
	ArkTxid         sql.NullString
	AssetID         sql.NullString
	AssetAmount     sql.NullInt64
}

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 DeleteUtxoParams

type DeleteUtxoParams struct {
	Txid string
	Vout int64
}

type InsertAssetVtxoParams

type InsertAssetVtxoParams struct {
	VtxoTxid string
	VtxoVout int64
	AssetID  string
	Amount   int64
}

type InsertTxParams

type InsertTxParams struct {
	Txid        string
	TxidType    string
	Amount      int64
	Type        string
	CreatedAt   int64
	Hex         sql.NullString
	SettledBy   sql.NullString
	Settled     bool
	AssetPacket sql.NullString
}

type InsertUtxoParams

type InsertUtxoParams struct {
	Txid        string
	Vout        int64
	Script      string
	Amount      int64
	SpentBy     sql.NullString
	Spent       bool
	Tapscripts  sql.NullString
	SpendableAt sql.NullInt64
	CreatedAt   sql.NullInt64
	DelayValue  sql.NullInt64
	DelayType   sql.NullString
	Tx          sql.NullString
}

type InsertVtxoParams

type InsertVtxoParams struct {
	Txid            string
	Vout            int64
	Script          string
	Amount          int64
	CommitmentTxids string
	SpentBy         sql.NullString
	Spent           bool
	Preconfirmed    bool
	ExpiresAt       int64
	CreatedAt       int64
	Swept           bool
	Unrolled        bool
	SettledBy       sql.NullString
	ArkTxid         sql.NullString
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CleanAssetVtxos

func (q *Queries) CleanAssetVtxos(ctx context.Context) error

func (*Queries) CleanAssets

func (q *Queries) CleanAssets(ctx context.Context) error

func (*Queries) CleanTxs

func (q *Queries) CleanTxs(ctx context.Context) error

func (*Queries) CleanUtxos

func (q *Queries) CleanUtxos(ctx context.Context) error

func (*Queries) CleanVtxos

func (q *Queries) CleanVtxos(ctx context.Context) error

func (*Queries) DeleteUtxo

func (q *Queries) DeleteUtxo(ctx context.Context, arg DeleteUtxoParams) error

func (*Queries) InsertAssetVtxo

func (q *Queries) InsertAssetVtxo(ctx context.Context, arg InsertAssetVtxoParams) error

func (*Queries) InsertTx

func (q *Queries) InsertTx(ctx context.Context, arg InsertTxParams) error

func (*Queries) InsertUtxo

func (q *Queries) InsertUtxo(ctx context.Context, arg InsertUtxoParams) error

func (*Queries) InsertVtxo

func (q *Queries) InsertVtxo(ctx context.Context, arg InsertVtxoParams) error

func (*Queries) ReplaceTx

func (q *Queries) ReplaceTx(ctx context.Context, arg ReplaceTxParams) error

func (*Queries) SelectAllTxs

func (q *Queries) SelectAllTxs(ctx context.Context) ([]Tx, error)

func (*Queries) SelectAllUtxos

func (q *Queries) SelectAllUtxos(ctx context.Context) ([]Utxo, error)

func (*Queries) SelectAllVtxos

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

func (*Queries) SelectAsset

func (q *Queries) SelectAsset(ctx context.Context, assetID string) (Asset, error)

func (*Queries) SelectSpendableVtxos

func (q *Queries) SelectSpendableVtxos(ctx context.Context) ([]AssetVtxoVw, error)

func (*Queries) SelectTxs

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

func (*Queries) SelectUtxo

func (q *Queries) SelectUtxo(ctx context.Context, arg SelectUtxoParams) (Utxo, error)

func (*Queries) SelectVtxo

func (q *Queries) SelectVtxo(ctx context.Context, arg SelectVtxoParams) ([]AssetVtxoVw, error)

func (*Queries) SettleVtxo

func (q *Queries) SettleVtxo(ctx context.Context, arg SettleVtxoParams) error

func (*Queries) SpendVtxo

func (q *Queries) SpendVtxo(ctx context.Context, arg SpendVtxoParams) error

func (*Queries) SweepVtxo

func (q *Queries) SweepVtxo(ctx context.Context, arg SweepVtxoParams) error

func (*Queries) UnrollVtxo

func (q *Queries) UnrollVtxo(ctx context.Context, arg UnrollVtxoParams) error

func (*Queries) UpdateTx

func (q *Queries) UpdateTx(ctx context.Context, arg UpdateTxParams) error

func (*Queries) UpdateUtxo

func (q *Queries) UpdateUtxo(ctx context.Context, arg UpdateUtxoParams) error

func (*Queries) UpsertAsset

func (q *Queries) UpsertAsset(ctx context.Context, arg UpsertAssetParams) error

func (*Queries) WithTx

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

type ReplaceTxParams

type ReplaceTxParams struct {
	NewTxid   string
	TxidType  string
	Amount    int64
	Type      string
	SettledBy sql.NullString
	CreatedAt int64
	Hex       sql.NullString
	OldTxid   string
}

type SelectUtxoParams

type SelectUtxoParams struct {
	Txid string
	Vout int64
}

type SelectVtxoParams

type SelectVtxoParams struct {
	Txid string
	Vout int64
}

type SettleVtxoParams

type SettleVtxoParams struct {
	SpentBy   sql.NullString
	SettledBy sql.NullString
	Txid      string
	Vout      int64
}

type SpendVtxoParams

type SpendVtxoParams struct {
	SpentBy sql.NullString
	ArkTxid sql.NullString
	Txid    string
	Vout    int64
}

type SweepVtxoParams

type SweepVtxoParams struct {
	Txid string
	Vout int64
}

type Tx

type Tx struct {
	Txid        string
	TxidType    string
	Amount      int64
	Type        string
	Settled     bool
	CreatedAt   int64
	Hex         sql.NullString
	SettledBy   sql.NullString
	AssetPacket sql.NullString
}

type UnrollVtxoParams

type UnrollVtxoParams struct {
	Txid string
	Vout int64
}

type UpdateTxParams

type UpdateTxParams struct {
	CreatedAt sql.NullInt64
	SettledBy interface{}
	Txid      string
}

type UpdateUtxoParams

type UpdateUtxoParams struct {
	Spent       interface{}
	SpentBy     sql.NullString
	CreatedAt   sql.NullInt64
	SpendableAt sql.NullInt64
	Txid        string
	Vout        int64
}

type UpsertAssetParams

type UpsertAssetParams struct {
	AssetID        string
	ControlAssetID sql.NullString
	Metadata       sql.NullString
}

type Utxo

type Utxo struct {
	Txid        string
	Vout        int64
	Script      string
	Amount      int64
	SpentBy     sql.NullString
	Spent       bool
	Tapscripts  sql.NullString
	SpendableAt sql.NullInt64
	CreatedAt   sql.NullInt64
	DelayValue  sql.NullInt64
	DelayType   sql.NullString
	Tx          sql.NullString
}

type Vtxo

type Vtxo struct {
	Txid            string
	Vout            int64
	Script          string
	Amount          int64
	CommitmentTxids string
	SpentBy         sql.NullString
	Spent           bool
	ExpiresAt       int64
	CreatedAt       int64
	Preconfirmed    bool
	Swept           bool
	SettledBy       sql.NullString
	Unrolled        bool
	ArkTxid         sql.NullString
}

Jump to

Keyboard shortcuts

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