Documentation
¶
Index ¶
- Constants
- type Account
- type AccountType
- type ActivityEntry
- type ActivityEvent
- type ActivityKind
- type ActivityStatus
- type AppendActivityEventParams
- type BackendType
- type BackfillLedgerRoundUuidParams
- type BoardingAddress
- type BoardingIntent
- type BoardingStatus
- type BoardingSweep
- type BoardingSweepInput
- type CancelVHTLCRecoveryJobParams
- type ChainInfo
- type ClearPendingIntentAnchorByOutpointParams
- type ClientTreeTxid
- type CompleteVHTLCRecoveryJobParams
- type CreditOperation
- type DBTX
- type DeleteClientTreeTxidsParams
- type DeleteSpendingReservationParams
- type DeleteVTXOAncestryPathsParams
- type DeleteVTXOParams
- type EscalateVHTLCRecoveryJobParams
- type ExitFundingAddress
- type FailVHTLCRecoveryJobParams
- type FinalizeRoundParams
- type GetBoardingIntentParams
- type GetBoardingSweepByInputParams
- type GetClientLedgerStatsRow
- type GetClientTreeTxidsParams
- type GetClientTreeTxidsRow
- type GetExitFundingAddressParams
- type GetOORPackageByOutpointAndKindParams
- type GetOORPackageByOutpointAndKindRow
- type GetOORPackageByOutpointParams
- type GetOORPackageByOutpointRow
- type GetOORVTXOBindingByOutpointAndKindParams
- type GetOORVTXOBindingByOutpointParams
- type GetPendingIntentByIDRow
- type GetRoundClientTreeParams
- type GetUnilateralExitJobParams
- type GetVTXOForfeitTxParams
- type GetVTXOForfeitTxRow
- type GetVTXOParams
- type GetVTXOReplacementParams
- type GetVTXOReplacementRow
- type InsertBoardingAddressParams
- type InsertBoardingIntentParams
- type InsertBoardingSweepInputParams
- type InsertBoardingSweepParams
- type InsertClientLedgerEntryParams
- type InsertClientTreeTxidParams
- type InsertExitFundingAddressParams
- type InsertMacaroonRootKeyParams
- type InsertOORPackageCheckpointParams
- type InsertRoundBoardingIntentParams
- type InsertRoundClientTreeParams
- type InsertRoundParams
- type InsertRoundVtxoRequestParams
- type InsertVHTLCRecoveryJobParams
- type InsertVTXOAncestryPathParams
- type InsertVTXOParams
- type InsertWalletUTXOLogParams
- type InternalKey
- type LedgerEntry
- type LedgerEventType
- type ListActivityEntriesParams
- type ListBoardingIntentOutpointsRow
- type ListBoardingIntentsByStatusAndMinHeightParams
- type ListBoardingIntentsBySweepableStatusesParams
- type ListBoardingSweepsParams
- type ListClientAccountBalancesRow
- type ListClientLedgerEntriesByTypeParams
- type ListClientLedgerEntriesParams
- type ListClientLedgerEventTotalsRow
- type ListEntriesByKindStatusParams
- type ListForfeitingVTXOsByRoundRow
- type ListOORVTXOBindingsBySessionRow
- type ListPendingBoardIntentsRow
- type ListPendingSendIntentsRow
- type ListRoundsPaginatedParams
- type ListSpendingReservationOutpointsRow
- type ListTransactionHistoryParams
- type ListTransactionHistoryRow
- type ListVHTLCRecoveryJobsBySwapActionParams
- type ListVTXOAncestryPathsParams
- type ListVTXOSelectionCandidatesByStatusRow
- type ListVTXOsByStatusRow
- type ListWalletUTXOLogByClassificationParams
- type ListWalletUTXOLogParams
- type Macaroon
- type MarkBoardingSweepInputSpentByOutpointParams
- type MarkBoardingSweepInputStatusParams
- type MarkBoardingSweepInputsStatusParams
- type MarkBoardingSweepStatusParams
- type MarkPendingSendIntentFailedByOutpointParams
- type MarkUnilateralExitJobTerminalParams
- type MarkVHTLCRecoveryExitTxBroadcastParams
- type MarkVHTLCRecoveryExitTxBuiltParams
- type MarkVHTLCRecoveryExitTxSubmittingParams
- type MarkVHTLCRecoveryTargetDetectedParams
- type MarkVTXOForfeitedParams
- type MarkVTXOForfeitingParams
- type MarkVTXOSpentParams
- type OorPackage
- type OorPackageCheckpoint
- type OorPackageDirection
- type OorRecipientCursor
- type OorSessionRegistry
- type OorVtxoBinding
- type OorVtxoBindingLinkKind
- type OwnedReceiveScript
- type OwnedReceiveScriptSource
- type PendingBoardIntent
- type PendingIntent
- type PendingIntentAnchor
- type PendingIntentKind
- type PendingSendIntent
- type PullActivityEventsParams
- type Querier
- type Queries
- func (q *Queries) AppendActivityEvent(ctx context.Context, arg AppendActivityEventParams) (int64, error)
- func (q *Queries) Backend() BackendType
- func (q *Queries) BackfillLedgerRoundUuid(ctx context.Context, arg BackfillLedgerRoundUuidParams) error
- func (q *Queries) CancelVHTLCRecoveryJob(ctx context.Context, arg CancelVHTLCRecoveryJobParams) (int64, error)
- func (q *Queries) ClearPendingIntentAnchorByOutpoint(ctx context.Context, arg ClearPendingIntentAnchorByOutpointParams) error
- func (q *Queries) CompleteVHTLCRecoveryJob(ctx context.Context, arg CompleteVHTLCRecoveryJobParams) (int64, error)
- func (q *Queries) CountActivityEntriesByStatus(ctx context.Context, status int64) (int64, error)
- func (q *Queries) CountBoardingIntentsByStatus(ctx context.Context, status string) (int64, error)
- func (q *Queries) CountClientLedgerEntries(ctx context.Context) (int64, error)
- func (q *Queries) CountPendingIntentAnchorsByIntentID(ctx context.Context, intentID []byte) (int64, error)
- func (q *Queries) CountPendingSendIntentsByIntentID(ctx context.Context, intentID []byte) (int64, error)
- func (q *Queries) CountUnresolvedBoardingSweepInputs(ctx context.Context, txid []byte) (int64, error)
- func (q *Queries) CountUnspentVTXOs(ctx context.Context) (int64, error)
- func (q *Queries) CountVTXOsByStatus(ctx context.Context, status int32) (int64, error)
- func (q *Queries) CountWalletUTXOLog(ctx context.Context) (int64, error)
- func (q *Queries) DeleteClientTreeTxids(ctx context.Context, arg DeleteClientTreeTxidsParams) error
- func (q *Queries) DeleteOORPackageCheckpoints(ctx context.Context, sessionID []byte) error
- func (q *Queries) DeleteOrphanedPendingBoardIntents(ctx context.Context) error
- func (q *Queries) DeleteOrphanedPendingIntents(ctx context.Context) error
- func (q *Queries) DeleteOrphanedPendingSendIntents(ctx context.Context) error
- func (q *Queries) DeletePendingBoardIntentByID(ctx context.Context, intentID []byte) error
- func (q *Queries) DeletePendingBoardIntentsAll(ctx context.Context) error
- func (q *Queries) DeletePendingIntentAnchorsByIntentID(ctx context.Context, intentID []byte) error
- func (q *Queries) DeletePendingIntentAnchorsByKind(ctx context.Context, kind string) error
- func (q *Queries) DeletePendingIntentByID(ctx context.Context, intentID []byte) error
- func (q *Queries) DeletePendingIntentsByKind(ctx context.Context, kind string) error
- func (q *Queries) DeletePendingSendIntentByID(ctx context.Context, intentID []byte) error
- func (q *Queries) DeletePendingSendIntentsAll(ctx context.Context) error
- func (q *Queries) DeleteSpendingReservation(ctx context.Context, arg DeleteSpendingReservationParams) error
- func (q *Queries) DeleteVTXO(ctx context.Context, arg DeleteVTXOParams) error
- func (q *Queries) DeleteVTXOAncestryPaths(ctx context.Context, arg DeleteVTXOAncestryPathsParams) error
- func (q *Queries) EscalateVHTLCRecoveryJob(ctx context.Context, arg EscalateVHTLCRecoveryJobParams) (int64, error)
- func (q *Queries) FailVHTLCRecoveryJob(ctx context.Context, arg FailVHTLCRecoveryJobParams) (int64, error)
- func (q *Queries) FinalizeRound(ctx context.Context, arg FinalizeRoundParams) error
- func (q *Queries) GetActivityEntry(ctx context.Context, canonicalID string) (ActivityEntry, error)
- func (q *Queries) GetBoardingAddress(ctx context.Context, pkScript []byte) (BoardingAddress, error)
- func (q *Queries) GetBoardingIntent(ctx context.Context, arg GetBoardingIntentParams) (BoardingIntent, error)
- func (q *Queries) GetBoardingSweep(ctx context.Context, txid []byte) (BoardingSweep, error)
- func (q *Queries) GetBoardingSweepByInput(ctx context.Context, arg GetBoardingSweepByInputParams) (BoardingSweep, error)
- func (q *Queries) GetChainInfo(ctx context.Context, chainName string) (ChainInfo, error)
- func (q *Queries) GetClientAccountBalance(ctx context.Context, accountID string) (int64, error)
- func (q *Queries) GetClientLedgerStats(ctx context.Context) (GetClientLedgerStatsRow, error)
- func (q *Queries) GetClientTreeByTxid(ctx context.Context, txid []byte) (RoundClientTree, error)
- func (q *Queries) GetClientTreeTxidInfo(ctx context.Context, txid []byte) (ClientTreeTxid, error)
- func (q *Queries) GetClientTreeTxids(ctx context.Context, arg GetClientTreeTxidsParams) ([]GetClientTreeTxidsRow, error)
- func (q *Queries) GetConfirmedExitCost(ctx context.Context, idempotencyKey []byte) (int64, error)
- func (q *Queries) GetCreditOperation(ctx context.Context, opID string) (CreditOperation, error)
- func (q *Queries) GetExitFundingAddress(ctx context.Context, arg GetExitFundingAddressParams) (ExitFundingAddress, error)
- func (q *Queries) GetInternalKeyByID(ctx context.Context, id int64) (InternalKey, error)
- func (q *Queries) GetMacaroonRootKey(ctx context.Context, id []byte) (Macaroon, error)
- func (q *Queries) GetOORPackage(ctx context.Context, sessionID []byte) (OorPackage, error)
- func (q *Queries) GetOORPackageByOutpoint(ctx context.Context, arg GetOORPackageByOutpointParams) (GetOORPackageByOutpointRow, error)
- func (q *Queries) GetOORPackageByOutpointAndKind(ctx context.Context, arg GetOORPackageByOutpointAndKindParams) (GetOORPackageByOutpointAndKindRow, error)
- func (q *Queries) GetOORRecipientCursor(ctx context.Context, recipientPkScript []byte) (OorRecipientCursor, error)
- func (q *Queries) GetOORSessionRegistry(ctx context.Context, sessionID []byte) (OorSessionRegistry, error)
- func (q *Queries) GetOORVTXOBindingByOutpoint(ctx context.Context, arg GetOORVTXOBindingByOutpointParams) (OorVtxoBinding, error)
- func (q *Queries) GetOORVTXOBindingByOutpointAndKind(ctx context.Context, arg GetOORVTXOBindingByOutpointAndKindParams) (OorVtxoBinding, error)
- func (q *Queries) GetOwnedReceiveScript(ctx context.Context, pkScript []byte) (OwnedReceiveScript, error)
- func (q *Queries) GetPendingIntentByID(ctx context.Context, intentID []byte) (GetPendingIntentByIDRow, error)
- func (q *Queries) GetRound(ctx context.Context, roundID string) (Round, error)
- func (q *Queries) GetRoundBoardingIntents(ctx context.Context, roundID string) ([]RoundBoardingIntent, error)
- func (q *Queries) GetRoundByCommitmentTxid(ctx context.Context, commitmentTxid []byte) (Round, error)
- func (q *Queries) GetRoundClientTree(ctx context.Context, arg GetRoundClientTreeParams) (RoundClientTree, error)
- func (q *Queries) GetRoundClientTrees(ctx context.Context, roundID string) ([]RoundClientTree, error)
- func (q *Queries) GetRoundVtxoRequests(ctx context.Context, roundID string) ([]RoundVtxoRequest, error)
- func (q *Queries) GetTotalOperatorFeesPaid(ctx context.Context) (int64, error)
- func (q *Queries) GetUnilateralExitJob(ctx context.Context, arg GetUnilateralExitJobParams) (UnilateralExitJob, error)
- func (q *Queries) GetVHTLCRecoveryJob(ctx context.Context, id string) (VhtlcRecoveryJob, error)
- func (q *Queries) GetVHTLCRecoveryJobByRequestID(ctx context.Context, requestID string) (VhtlcRecoveryJob, error)
- func (q *Queries) GetVTXO(ctx context.Context, arg GetVTXOParams) (Vtxo, error)
- func (q *Queries) GetVTXOForfeitTx(ctx context.Context, arg GetVTXOForfeitTxParams) (GetVTXOForfeitTxRow, error)
- func (q *Queries) GetVTXOReplacement(ctx context.Context, arg GetVTXOReplacementParams) (GetVTXOReplacementRow, error)
- func (q *Queries) InsertBoardingAddress(ctx context.Context, arg InsertBoardingAddressParams) error
- func (q *Queries) InsertBoardingIntent(ctx context.Context, arg InsertBoardingIntentParams) error
- func (q *Queries) InsertBoardingSweep(ctx context.Context, arg InsertBoardingSweepParams) error
- func (q *Queries) InsertBoardingSweepInput(ctx context.Context, arg InsertBoardingSweepInputParams) error
- func (q *Queries) InsertClientLedgerEntry(ctx context.Context, arg InsertClientLedgerEntryParams) error
- func (q *Queries) InsertClientTreeTxid(ctx context.Context, arg InsertClientTreeTxidParams) error
- func (q *Queries) InsertExitFundingAddress(ctx context.Context, arg InsertExitFundingAddressParams) error
- func (q *Queries) InsertMacaroonRootKey(ctx context.Context, arg InsertMacaroonRootKeyParams) error
- func (q *Queries) InsertOORPackageCheckpoint(ctx context.Context, arg InsertOORPackageCheckpointParams) error
- func (q *Queries) InsertRound(ctx context.Context, arg InsertRoundParams) error
- func (q *Queries) InsertRoundBoardingIntent(ctx context.Context, arg InsertRoundBoardingIntentParams) error
- func (q *Queries) InsertRoundClientTree(ctx context.Context, arg InsertRoundClientTreeParams) error
- func (q *Queries) InsertRoundVtxoRequest(ctx context.Context, arg InsertRoundVtxoRequestParams) error
- func (q *Queries) InsertVHTLCRecoveryJob(ctx context.Context, arg InsertVHTLCRecoveryJobParams) error
- func (q *Queries) InsertVTXO(ctx context.Context, arg InsertVTXOParams) error
- func (q *Queries) InsertVTXOAncestryPath(ctx context.Context, arg InsertVTXOAncestryPathParams) error
- func (q *Queries) InsertWalletUTXOLog(ctx context.Context, arg InsertWalletUTXOLogParams) error
- func (q *Queries) ListActiveRounds(ctx context.Context) ([]Round, error)
- func (q *Queries) ListActivityEntries(ctx context.Context, arg ListActivityEntriesParams) ([]ActivityEntry, error)
- func (q *Queries) ListAllBoardingAddresses(ctx context.Context) ([]BoardingAddress, error)
- func (q *Queries) ListAllBoardingIntents(ctx context.Context) ([]BoardingIntent, error)
- func (q *Queries) ListAllCreditOperations(ctx context.Context) ([]CreditOperation, error)
- func (q *Queries) ListAllOORSessionRegistry(ctx context.Context) ([]OorSessionRegistry, error)
- func (q *Queries) ListAllVTXOs(ctx context.Context) ([]Vtxo, error)
- func (q *Queries) ListBoardingIntentOutpoints(ctx context.Context) ([]ListBoardingIntentOutpointsRow, error)
- func (q *Queries) ListBoardingIntentsByConfHeight(ctx context.Context, confHeight int32) ([]BoardingIntent, error)
- func (q *Queries) ListBoardingIntentsByPkScript(ctx context.Context, pkScript []byte) ([]BoardingIntent, error)
- func (q *Queries) ListBoardingIntentsByStatus(ctx context.Context, status string) ([]BoardingIntent, error)
- func (q *Queries) ListBoardingIntentsByStatusAndMinHeight(ctx context.Context, arg ListBoardingIntentsByStatusAndMinHeightParams) ([]BoardingIntent, error)
- func (q *Queries) ListBoardingIntentsBySweepableStatuses(ctx context.Context, arg ListBoardingIntentsBySweepableStatusesParams) ([]BoardingIntent, error)
- func (q *Queries) ListBoardingSweepInputs(ctx context.Context, txid []byte) ([]BoardingSweepInput, error)
- func (q *Queries) ListBoardingSweeps(ctx context.Context, arg ListBoardingSweepsParams) ([]BoardingSweep, error)
- func (q *Queries) ListChainInfo(ctx context.Context) ([]ChainInfo, error)
- func (q *Queries) ListClientAccountBalances(ctx context.Context) ([]ListClientAccountBalancesRow, error)
- func (q *Queries) ListClientAccounts(ctx context.Context) ([]Account, error)
- func (q *Queries) ListClientLedgerEntries(ctx context.Context, arg ListClientLedgerEntriesParams) ([]LedgerEntry, error)
- func (q *Queries) ListClientLedgerEntriesByType(ctx context.Context, arg ListClientLedgerEntriesByTypeParams) ([]LedgerEntry, error)
- func (q *Queries) ListClientLedgerEventTotals(ctx context.Context) ([]ListClientLedgerEventTotalsRow, error)
- func (q *Queries) ListEntriesByKindStatus(ctx context.Context, arg ListEntriesByKindStatusParams) ([]ActivityEntry, error)
- func (q *Queries) ListForfeitingVTXOsByRound(ctx context.Context, forfeitRoundID sql.NullString) ([]ListForfeitingVTXOsByRoundRow, error)
- func (q *Queries) ListLedgerRoundIDsMissingUuid(ctx context.Context) ([][]byte, error)
- func (q *Queries) ListLiveVTXOAncestryPaths(ctx context.Context) ([]VtxoAncestryPath, error)
- func (q *Queries) ListLiveVTXOs(ctx context.Context) ([]Vtxo, error)
- func (q *Queries) ListNonTerminalCreditOperations(ctx context.Context) ([]CreditOperation, error)
- func (q *Queries) ListNonTerminalOORSessionRegistry(ctx context.Context) ([]OorSessionRegistry, error)
- func (q *Queries) ListNonTerminalUnilateralExitJobs(ctx context.Context) ([]UnilateralExitJob, error)
- func (q *Queries) ListNonTerminalVHTLCRecoveryJobs(ctx context.Context) ([]VhtlcRecoveryJob, error)
- func (q *Queries) ListOORPackageCheckpoints(ctx context.Context, sessionID []byte) ([]OorPackageCheckpoint, error)
- func (q *Queries) ListOORPackages(ctx context.Context) ([]OorPackage, error)
- func (q *Queries) ListOORPackagesByDirection(ctx context.Context, direction int32) ([]OorPackage, error)
- func (q *Queries) ListOORRecipientCursors(ctx context.Context) ([]OorRecipientCursor, error)
- func (q *Queries) ListOORVTXOBindingsBySession(ctx context.Context, sessionID []byte) ([]ListOORVTXOBindingsBySessionRow, error)
- func (q *Queries) ListOwnedReceiveScripts(ctx context.Context) ([]OwnedReceiveScript, error)
- func (q *Queries) ListPendingBoardIntents(ctx context.Context) ([]ListPendingBoardIntentsRow, error)
- func (q *Queries) ListPendingBoardingSweepInputs(ctx context.Context) ([]BoardingSweepInput, error)
- func (q *Queries) ListPendingBoardingSweeps(ctx context.Context) ([]BoardingSweep, error)
- func (q *Queries) ListPendingIntentAnchorsByKind(ctx context.Context, kind string) ([]PendingIntentAnchor, error)
- func (q *Queries) ListPendingSendIntents(ctx context.Context) ([]ListPendingSendIntentsRow, error)
- func (q *Queries) ListRecoverableVTXOs(ctx context.Context) ([]Vtxo, error)
- func (q *Queries) ListRoundsByStatus(ctx context.Context, status string) ([]Round, error)
- func (q *Queries) ListRoundsPaginated(ctx context.Context, arg ListRoundsPaginatedParams) ([]Round, error)
- func (q *Queries) ListSpendingReservationOutpoints(ctx context.Context) ([]ListSpendingReservationOutpointsRow, error)
- func (q *Queries) ListTransactionHistory(ctx context.Context, arg ListTransactionHistoryParams) ([]ListTransactionHistoryRow, error)
- func (q *Queries) ListUnspentVTXOAncestryPaths(ctx context.Context) ([]VtxoAncestryPath, error)
- func (q *Queries) ListUnspentVTXOs(ctx context.Context) ([]Vtxo, error)
- func (q *Queries) ListVHTLCRecoveryJobs(ctx context.Context) ([]VhtlcRecoveryJob, error)
- func (q *Queries) ListVHTLCRecoveryJobsBySwapAction(ctx context.Context, arg ListVHTLCRecoveryJobsBySwapActionParams) ([]VhtlcRecoveryJob, error)
- func (q *Queries) ListVTXOAncestryPaths(ctx context.Context, arg ListVTXOAncestryPathsParams) ([]VtxoAncestryPath, error)
- func (q *Queries) ListVTXOAncestryPathsByStatus(ctx context.Context, status int32) ([]VtxoAncestryPath, error)
- func (q *Queries) ListVTXOSelectionCandidatesByStatus(ctx context.Context, status int32) ([]ListVTXOSelectionCandidatesByStatusRow, error)
- func (q *Queries) ListVTXOsByRound(ctx context.Context, roundID string) ([]Vtxo, error)
- func (q *Queries) ListVTXOsByStatus(ctx context.Context, status int32) ([]ListVTXOsByStatusRow, error)
- func (q *Queries) ListWalletUTXOLog(ctx context.Context, arg ListWalletUTXOLogParams) ([]WalletUtxoLog, error)
- func (q *Queries) ListWalletUTXOLogByBlock(ctx context.Context, blockHeight int32) ([]WalletUtxoLog, error)
- func (q *Queries) ListWalletUTXOLogByClassification(ctx context.Context, arg ListWalletUTXOLogByClassificationParams) ([]WalletUtxoLog, error)
- func (q *Queries) LookupActiveCreditOperationByKey(ctx context.Context, opKey string) (CreditOperation, error)
- func (q *Queries) LookupActiveOORSessionRegistryByIdempotencyKey(ctx context.Context, idempotencyKey sql.NullString) (OorSessionRegistry, error)
- func (q *Queries) MarkBoardingSweepInputSpentByOutpoint(ctx context.Context, arg MarkBoardingSweepInputSpentByOutpointParams) (int64, error)
- func (q *Queries) MarkBoardingSweepInputStatus(ctx context.Context, arg MarkBoardingSweepInputStatusParams) error
- func (q *Queries) MarkBoardingSweepInputsStatus(ctx context.Context, arg MarkBoardingSweepInputsStatusParams) error
- func (q *Queries) MarkBoardingSweepStatus(ctx context.Context, arg MarkBoardingSweepStatusParams) error
- func (q *Queries) MarkPendingSendIntentFailedByOutpoint(ctx context.Context, arg MarkPendingSendIntentFailedByOutpointParams) error
- func (q *Queries) MarkUnilateralExitJobTerminal(ctx context.Context, arg MarkUnilateralExitJobTerminalParams) error
- func (q *Queries) MarkVHTLCRecoveryExitTxBroadcast(ctx context.Context, arg MarkVHTLCRecoveryExitTxBroadcastParams) error
- func (q *Queries) MarkVHTLCRecoveryExitTxBuilt(ctx context.Context, arg MarkVHTLCRecoveryExitTxBuiltParams) error
- func (q *Queries) MarkVHTLCRecoveryExitTxSubmitting(ctx context.Context, arg MarkVHTLCRecoveryExitTxSubmittingParams) error
- func (q *Queries) MarkVHTLCRecoveryTargetDetected(ctx context.Context, arg MarkVHTLCRecoveryTargetDetectedParams) error
- func (q *Queries) MarkVTXOForfeited(ctx context.Context, arg MarkVTXOForfeitedParams) error
- func (q *Queries) MarkVTXOForfeiting(ctx context.Context, arg MarkVTXOForfeitingParams) error
- func (q *Queries) MarkVTXOSpent(ctx context.Context, arg MarkVTXOSpentParams) error
- func (q *Queries) PullActivityEvents(ctx context.Context, arg PullActivityEventsParams) ([]ActivityEvent, error)
- func (q *Queries) SumBoardingIntentAmountsByStatus(ctx context.Context, status string) (interface{}, error)
- func (q *Queries) SumUnspentVTXOAmounts(ctx context.Context) (interface{}, error)
- func (q *Queries) UpdateBoardingIntentStatus(ctx context.Context, arg UpdateBoardingIntentStatusParams) error
- func (q *Queries) UpdateRoundBoardingIntentSignature(ctx context.Context, arg UpdateRoundBoardingIntentSignatureParams) error
- func (q *Queries) UpdateRoundStatus(ctx context.Context, arg UpdateRoundStatusParams) error
- func (q *Queries) UpdateVTXOStatus(ctx context.Context, arg UpdateVTXOStatusParams) error
- func (q *Queries) UpsertActivityEntry(ctx context.Context, arg UpsertActivityEntryParams) (int64, error)
- func (q *Queries) UpsertChainInfo(ctx context.Context, arg UpsertChainInfoParams) error
- func (q *Queries) UpsertCreditOperation(ctx context.Context, arg UpsertCreditOperationParams) error
- func (q *Queries) UpsertInternalKey(ctx context.Context, arg UpsertInternalKeyParams) (int64, error)
- func (q *Queries) UpsertOORPackage(ctx context.Context, arg UpsertOORPackageParams) (int64, error)
- func (q *Queries) UpsertOORRecipientCursor(ctx context.Context, arg UpsertOORRecipientCursorParams) error
- func (q *Queries) UpsertOORSessionRegistry(ctx context.Context, arg UpsertOORSessionRegistryParams) error
- func (q *Queries) UpsertOORVTXOBinding(ctx context.Context, arg UpsertOORVTXOBindingParams) (int64, error)
- func (q *Queries) UpsertOwnedReceiveScript(ctx context.Context, arg UpsertOwnedReceiveScriptParams) error
- func (q *Queries) UpsertPendingBoardIntent(ctx context.Context, arg UpsertPendingBoardIntentParams) error
- func (q *Queries) UpsertPendingIntentAnchor(ctx context.Context, arg UpsertPendingIntentAnchorParams) error
- func (q *Queries) UpsertPendingIntentHeader(ctx context.Context, arg UpsertPendingIntentHeaderParams) error
- func (q *Queries) UpsertPendingSendIntent(ctx context.Context, arg UpsertPendingSendIntentParams) error
- func (q *Queries) UpsertSpendingReservation(ctx context.Context, arg UpsertSpendingReservationParams) error
- func (q *Queries) UpsertUnilateralExitJob(ctx context.Context, arg UpsertUnilateralExitJobParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Round
- type RoundBoardingIntent
- type RoundClientTree
- type RoundStatus
- type RoundVtxoRequest
- type SpendingReservation
- type UnilateralExitJob
- type UpdateBoardingIntentStatusParams
- type UpdateRoundBoardingIntentSignatureParams
- type UpdateRoundStatusParams
- type UpdateVTXOStatusParams
- type UpsertActivityEntryParams
- type UpsertChainInfoParams
- type UpsertCreditOperationParams
- type UpsertInternalKeyParams
- type UpsertOORPackageParams
- type UpsertOORRecipientCursorParams
- type UpsertOORSessionRegistryParams
- type UpsertOORVTXOBindingParams
- type UpsertOwnedReceiveScriptParams
- type UpsertPendingBoardIntentParams
- type UpsertPendingIntentAnchorParams
- type UpsertPendingIntentHeaderParams
- type UpsertPendingSendIntentParams
- type UpsertSpendingReservationParams
- type UpsertUnilateralExitJobParams
- type UtxoClassification
- type UtxoEvent
- type VhtlcRecoveryJob
- type Vtxo
- type VtxoAncestryPath
- type WalletUtxoLog
Constants ¶
const AppendActivityEvent = `` /* 181-byte string literal not displayed */
const BackfillLedgerRoundUuid = `` /* 126-byte string literal not displayed */
const CancelVHTLCRecoveryJob = `` /* 303-byte string literal not displayed */
const ClearPendingIntentAnchorByOutpoint = `` /* 134-byte string literal not displayed */
const CompleteVHTLCRecoveryJob = `` /* 254-byte string literal not displayed */
const CountActivityEntriesByStatus = `-- name: CountActivityEntriesByStatus :one
SELECT COUNT(*) FROM activity_entries WHERE status = $1
`
const CountBoardingIntentsByStatus = `-- name: CountBoardingIntentsByStatus :one
SELECT COUNT(*) FROM boarding_intents
WHERE status = $1
`
const CountClientLedgerEntries = `-- name: CountClientLedgerEntries :one
SELECT COUNT(*) FROM ledger_entries
`
const CountPendingIntentAnchorsByIntentID = `-- name: CountPendingIntentAnchorsByIntentID :one
SELECT COUNT(*) FROM pending_intent_anchors
WHERE intent_id = $1
`
const CountPendingSendIntentsByIntentID = `-- name: CountPendingSendIntentsByIntentID :one
SELECT COUNT(*) FROM pending_send_intents
WHERE intent_id = $1
`
const CountUnresolvedBoardingSweepInputs = `` /* 149-byte string literal not displayed */
const CountUnspentVTXOs = `-- name: CountUnspentVTXOs :one
SELECT COUNT(*) FROM vtxos
WHERE spent = FALSE
AND status != 4
`
const CountVTXOsByStatus = `-- name: CountVTXOsByStatus :one
SELECT COUNT(*) FROM vtxos WHERE status = $1
`
const CountWalletUTXOLog = `-- name: CountWalletUTXOLog :one
SELECT COUNT(*) FROM wallet_utxo_log
`
const DeleteClientTreeTxids = `-- name: DeleteClientTreeTxids :exec
DELETE FROM client_tree_txids WHERE round_id = $1 AND client_key = $2
`
const DeleteOORPackageCheckpoints = `-- name: DeleteOORPackageCheckpoints :exec
DELETE FROM oor_package_checkpoints
WHERE session_id = $1
`
const DeleteOrphanedPendingBoardIntents = `` /* 203-byte string literal not displayed */
const DeleteOrphanedPendingIntents = `` /* 209-byte string literal not displayed */
const DeleteOrphanedPendingSendIntents = `` /* 340-byte string literal not displayed */
const DeletePendingBoardIntentByID = `-- name: DeletePendingBoardIntentByID :exec
DELETE FROM pending_board_intents
WHERE intent_id = $1
`
const DeletePendingBoardIntentsAll = `-- name: DeletePendingBoardIntentsAll :exec
DELETE FROM pending_board_intents
`
const DeletePendingIntentAnchorsByIntentID = `-- name: DeletePendingIntentAnchorsByIntentID :exec
DELETE FROM pending_intent_anchors
WHERE intent_id = $1
`
const DeletePendingIntentAnchorsByKind = `` /* 164-byte string literal not displayed */
const DeletePendingIntentByID = `-- name: DeletePendingIntentByID :exec
DELETE FROM pending_intents
WHERE intent_id = $1
`
const DeletePendingIntentsByKind = `-- name: DeletePendingIntentsByKind :exec
DELETE FROM pending_intents
WHERE kind = $1
`
const DeletePendingSendIntentByID = `-- name: DeletePendingSendIntentByID :exec
DELETE FROM pending_send_intents
WHERE intent_id = $1
`
const DeletePendingSendIntentsAll = `-- name: DeletePendingSendIntentsAll :exec
DELETE FROM pending_send_intents
`
const DeleteSpendingReservation = `-- name: DeleteSpendingReservation :exec
DELETE FROM spending_reservations
WHERE outpoint_hash = $1 AND outpoint_index = $2
`
const DeleteVTXO = `-- name: DeleteVTXO :exec
DELETE FROM vtxos
WHERE outpoint_hash = $1 AND outpoint_index = $2
`
const DeleteVTXOAncestryPaths = `` /* 130-byte string literal not displayed */
const EscalateVHTLCRecoveryJob = `` /* 378-byte string literal not displayed */
const FailVHTLCRecoveryJob = `` /* 245-byte string literal not displayed */
const FinalizeRound = `` /* 205-byte string literal not displayed */
const GetActivityEntry = `` /* 351-byte string literal not displayed */
const GetBoardingAddress = `` /* 193-byte string literal not displayed */
const GetBoardingIntent = `` /* 243-byte string literal not displayed */
const GetBoardingSweep = `` /* 251-byte string literal not displayed */
const GetBoardingSweepByInput = `` /* 441-byte string literal not displayed */
const GetChainInfo = `-- name: GetChainInfo :one
SELECT id, chain_name, genesis_hash FROM chain_info WHERE chain_name = $1
`
const GetClientAccountBalance = `` /* 287-byte string literal not displayed */
const GetClientLedgerStats = `` /* 247-byte string literal not displayed */
const GetClientTreeByTxid = `` /* 215-byte string literal not displayed */
const GetClientTreeTxidInfo = `` /* 135-byte string literal not displayed */
const GetClientTreeTxids = `` /* 159-byte string literal not displayed */
const GetConfirmedExitCost = `` /* 189-byte string literal not displayed */
const GetCreditOperation = `` /* 309-byte string literal not displayed */
const GetExitFundingAddress = `` /* 210-byte string literal not displayed */
const GetInternalKeyByID = `-- name: GetInternalKeyByID :one
SELECT id, pubkey, key_family, key_index, created_at FROM internal_keys
WHERE id = $1
`
const GetMacaroonRootKey = `-- name: GetMacaroonRootKey :one
SELECT id, root_key FROM macaroons
WHERE id = $1
`
const GetOORPackage = `` /* 131-byte string literal not displayed */
const GetOORPackageByOutpoint = `` /* 678-byte string literal not displayed */
const GetOORPackageByOutpointAndKind = `` /* 661-byte string literal not displayed */
const GetOORRecipientCursor = `` /* 165-byte string literal not displayed */
const GetOORSessionRegistry = `` /* 238-byte string literal not displayed */
const GetOORVTXOBindingByOutpoint = `` /* 261-byte string literal not displayed */
const GetOORVTXOBindingByOutpointAndKind = `` /* 246-byte string literal not displayed */
const GetOwnedReceiveScript = `` /* 179-byte string literal not displayed */
const GetPendingIntentByID = `-- name: GetPendingIntentByID :one
SELECT status, failure_reason, failure_code
FROM pending_intents
WHERE intent_id = $1
`
const GetRound = `` /* 242-byte string literal not displayed */
const GetRoundBoardingIntents = `` /* 229-byte string literal not displayed */
const GetRoundByCommitmentTxid = `` /* 265-byte string literal not displayed */
const GetRoundClientTree = `` /* 136-byte string literal not displayed */
const GetRoundClientTrees = `-- name: GetRoundClientTrees :many
SELECT round_id, client_key, tree_data FROM round_client_trees WHERE round_id = $1
`
const GetRoundVtxoRequests = `` /* 245-byte string literal not displayed */
const GetTotalOperatorFeesPaid = `` /* 159-byte string literal not displayed */
const GetUnilateralExitJob = `` /* 287-byte string literal not displayed */
const GetVHTLCRecoveryJob = `` /* 700-byte string literal not displayed */
const GetVHTLCRecoveryJobByRequestID = `` /* 719-byte string literal not displayed */
const GetVTXO = `` /* 416-byte string literal not displayed */
const GetVTXOForfeitTx = `` /* 127-byte string literal not displayed */
const GetVTXOReplacement = `` /* 136-byte string literal not displayed */
const InsertBoardingAddress = `` /* 249-byte string literal not displayed */
const InsertBoardingIntent = `` /* 1677-byte string literal not displayed */
const InsertBoardingSweep = `` /* 902-byte string literal not displayed */
const InsertBoardingSweepInput = `` /* 581-byte string literal not displayed */
const InsertClientLedgerEntry = `` /* 352-byte string literal not displayed */
const InsertClientTreeTxid = `` /* 202-byte string literal not displayed */
const InsertExitFundingAddress = `` /* 255-byte string literal not displayed */
const InsertMacaroonRootKey = `-- name: InsertMacaroonRootKey :exec
INSERT INTO macaroons (id, root_key)
VALUES ($1, $2)
`
const InsertOORPackageCheckpoint = `` /* 278-byte string literal not displayed */
const InsertRound = `` /* 1166-byte string literal not displayed */
const InsertRoundBoardingIntent = `` /* 524-byte string literal not displayed */
const InsertRoundClientTree = `` /* 203-byte string literal not displayed */
const InsertRoundVtxoRequest = `` /* 315-byte string literal not displayed */
const InsertVHTLCRecoveryJob = `` /* 707-byte string literal not displayed */
const InsertVTXO = `` /* 1717-byte string literal not displayed */
const InsertVTXOAncestryPath = `` /* 258-byte string literal not displayed */
const InsertWalletUTXOLog = `` /* 263-byte string literal not displayed */
const ListActiveRounds = `` /* 290-byte string literal not displayed */
const ListActivityEntries = `` /* 559-byte string literal not displayed */
const ListAllBoardingAddresses = `` /* 207-byte string literal not displayed */
const ListAllBoardingIntents = `` /* 228-byte string literal not displayed */
const ListAllCreditOperations = `` /* 322-byte string literal not displayed */
const ListAllOORSessionRegistry = `` /* 245-byte string literal not displayed */
const ListAllVTXOs = `` /* 401-byte string literal not displayed */
const ListBoardingIntentOutpoints = `-- name: ListBoardingIntentOutpoints :many
SELECT outpoint_hash, outpoint_index FROM boarding_intents
`
const ListBoardingIntentsByConfHeight = `` /* 259-byte string literal not displayed */
const ListBoardingIntentsByPkScript = `` /* 256-byte string literal not displayed */
const ListBoardingIntentsByStatus = `` /* 1052-byte string literal not displayed */
const ListBoardingIntentsByStatusAndMinHeight = `` /* 691-byte string literal not displayed */
const ListBoardingIntentsBySweepableStatuses = `` /* 703-byte string literal not displayed */
const ListBoardingSweepInputs = `` /* 252-byte string literal not displayed */
const ListBoardingSweeps = `` /* 315-byte string literal not displayed */
const ListChainInfo = `-- name: ListChainInfo :many
SELECT id, chain_name, genesis_hash FROM chain_info ORDER BY id
`
const ListClientAccountBalances = `` /* 591-byte string literal not displayed */
const ListClientAccounts = `-- name: ListClientAccounts :many
SELECT account_id, account_name, account_type
FROM accounts
ORDER BY account_id
`
const ListClientLedgerEntries = `` /* 316-byte string literal not displayed */
const ListClientLedgerEntriesByType = `` /* 344-byte string literal not displayed */
const ListClientLedgerEventTotals = `` /* 235-byte string literal not displayed */
const ListEntriesByKindStatus = `` /* 432-byte string literal not displayed */
const ListForfeitingVTXOsByRound = `` /* 157-byte string literal not displayed */
const ListLedgerRoundIDsMissingUuid = `` /* 142-byte string literal not displayed */
const ListLiveVTXOAncestryPaths = `` /* 503-byte string literal not displayed */
const ListLiveVTXOs = `` /* 453-byte string literal not displayed */
const ListNonTerminalCreditOperations = `` /* 357-byte string literal not displayed */
const ListNonTerminalOORSessionRegistry = `` /* 280-byte string literal not displayed */
const ListNonTerminalUnilateralExitJobs = `` /* 290-byte string literal not displayed */
const ListNonTerminalVHTLCRecoveryJobs = `` /* 796-byte string literal not displayed */
const ListOORPackageCheckpoints = `` /* 187-byte string literal not displayed */
const ListOORPackages = `` /* 137-byte string literal not displayed */
const ListOORPackagesByDirection = `` /* 169-byte string literal not displayed */
const ListOORRecipientCursors = `` /* 162-byte string literal not displayed */
const ListOORVTXOBindingsBySession = `` /* 435-byte string literal not displayed */
const ListOwnedReceiveScripts = `` /* 186-byte string literal not displayed */
const ListPendingBoardIntents = `` /* 287-byte string literal not displayed */
const ListPendingBoardingSweepInputs = `` /* 267-byte string literal not displayed */
const ListPendingBoardingSweeps = `` /* 312-byte string literal not displayed */
const ListPendingIntentAnchorsByKind = `` /* 268-byte string literal not displayed */
const ListPendingSendIntents = `` /* 379-byte string literal not displayed */
const ListRecoverableVTXOs = `` /* 474-byte string literal not displayed */
const ListRoundsByStatus = `` /* 279-byte string literal not displayed */
const ListRoundsPaginated = `` /* 405-byte string literal not displayed */
const ListSpendingReservationOutpoints = `-- name: ListSpendingReservationOutpoints :many
SELECT outpoint_hash, outpoint_index FROM spending_reservations
`
const ListTransactionHistory = `` /* 10031-byte string literal not displayed */
const ListUnspentVTXOAncestryPaths = `` /* 489-byte string literal not displayed */
const ListUnspentVTXOs = `` /* 445-byte string literal not displayed */
const ListVHTLCRecoveryJobs = `` /* 731-byte string literal not displayed */
const ListVHTLCRecoveryJobsBySwapAction = `` /* 780-byte string literal not displayed */
const ListVTXOAncestryPaths = `` /* 278-byte string literal not displayed */
const ListVTXOAncestryPathsByStatus = `` /* 470-byte string literal not displayed */
const ListVTXOSelectionCandidatesByStatus = `` /* 164-byte string literal not displayed */
const ListVTXOsByRound = `` /* 425-byte string literal not displayed */
const ListVTXOsByStatus = `` /* 994-byte string literal not displayed */
const ListWalletUTXOLog = `` /* 227-byte string literal not displayed */
const ListWalletUTXOLogByBlock = `` /* 217-byte string literal not displayed */
const ListWalletUTXOLogByClassification = `` /* 268-byte string literal not displayed */
const LookupActiveCreditOperationByKey = `` /* 340-byte string literal not displayed */
const LookupActiveOORSessionRegistryByIdempotencyKey = `` /* 284-byte string literal not displayed */
const MarkBoardingSweepInputSpentByOutpoint = `` /* 268-byte string literal not displayed */
const MarkBoardingSweepInputStatus = `` /* 279-byte string literal not displayed */
const MarkBoardingSweepInputsStatus = `` /* 174-byte string literal not displayed */
const MarkBoardingSweepStatus = `` /* 221-byte string literal not displayed */
const MarkPendingSendIntentFailedByOutpoint = `` /* 338-byte string literal not displayed */
const MarkUnilateralExitJobTerminal = `` /* 217-byte string literal not displayed */
const MarkVHTLCRecoveryExitTxBroadcast = `` /* 280-byte string literal not displayed */
const MarkVHTLCRecoveryExitTxBuilt = `` /* 288-byte string literal not displayed */
const MarkVHTLCRecoveryExitTxSubmitting = `` /* 180-byte string literal not displayed */
const MarkVHTLCRecoveryTargetDetected = `` /* 332-byte string literal not displayed */
const MarkVTXOForfeited = `` /* 228-byte string literal not displayed */
const MarkVTXOForfeiting = `` /* 200-byte string literal not displayed */
const MarkVTXOSpent = `` /* 143-byte string literal not displayed */
const PullActivityEvents = `` /* 183-byte string literal not displayed */
const SumBoardingIntentAmountsByStatus = `` /* 128-byte string literal not displayed */
const SumUnspentVTXOAmounts = `` /* 128-byte string literal not displayed */
const UpdateBoardingIntentStatus = `` /* 154-byte string literal not displayed */
const UpdateRoundBoardingIntentSignature = `` /* 190-byte string literal not displayed */
const UpdateRoundStatus = `-- name: UpdateRoundStatus :exec
UPDATE rounds
SET status = $2, last_update_time = $3
WHERE round_id = $1
`
const UpdateVTXOStatus = `` /* 314-byte string literal not displayed */
const UpsertActivityEntry = `` /* 1770-byte string literal not displayed */
const UpsertChainInfo = `` /* 162-byte string literal not displayed */
const UpsertCreditOperation = `` /* 1114-byte string literal not displayed */
const UpsertInternalKey = `` /* 229-byte string literal not displayed */
const UpsertOORPackage = `` /* 320-byte string literal not displayed */
const UpsertOORRecipientCursor = `` /* 353-byte string literal not displayed */
const UpsertOORSessionRegistry = `` /* 686-byte string literal not displayed */
const UpsertOORVTXOBinding = `` /* 441-byte string literal not displayed */
const UpsertOwnedReceiveScript = `` /* 455-byte string literal not displayed */
const UpsertPendingBoardIntent = `` /* 216-byte string literal not displayed */
const UpsertPendingIntentAnchor = `` /* 242-byte string literal not displayed */
const UpsertPendingIntentHeader = `` /* 298-byte string literal not displayed */
const UpsertPendingSendIntent = `` /* 543-byte string literal not displayed */
const UpsertSpendingReservation = `` /* 349-byte string literal not displayed */
const UpsertUnilateralExitJob = `` /* 682-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountType ¶
type AccountType struct {
AccountType string
}
type ActivityEntry ¶
type ActivityEntry struct {
CanonicalID string
Kind int64
Status int64
AmountSat int64
FeeSat int64
Counterparty string
Note string
Phase int64
PhaseLabel string
FailureCode int64
FailureReason string
PaymentHash []byte
Txid []byte
ConfirmationHeight sql.NullInt64
VtxoOutpoint string
SwapSessionID []byte
LedgerTxid []byte
BoardingAddr []byte
RequestJson string
CreatedAtUnix int64
UpdatedAtUnix int64
}
type ActivityEvent ¶
type ActivityKind ¶
type ActivityStatus ¶
type BackendType ¶
type BackendType uint8
BackendType is an enum that represents the type of database backend we're using.
const ( // BackendTypeUnknown indicates we're using an unknown backend. BackendTypeUnknown BackendType = iota // BackendTypeSqlite indicates we're using a SQLite backend. BackendTypeSqlite // BackendTypePostgres indicates we're using a Postgres backend. BackendTypePostgres )
type BackfillLedgerRoundUuidParams ¶
type BackfillLedgerRoundUuidParams struct {
RoundUuid sql.NullString
RoundID []byte
}
type BoardingAddress ¶
type BoardingIntent ¶
type BoardingStatus ¶
type BoardingSweep ¶
type BoardingSweepInput ¶
type CancelVHTLCRecoveryJobParams ¶
type CancelVHTLCRecoveryJobParams struct {
ID string
CancelReason sql.NullString
CooperativeTxid []byte
UpdatedAt int64
}
type ClientTreeTxid ¶
type CreditOperation ¶
type CreditOperation struct {
OpID string
OpKey string
Kind int32
State string
Status int32
ServerOpID sql.NullString
PaymentHash []byte
DestinationPubkey []byte
OorSessionID sql.NullString
Invoice sql.NullString
AmountSat int64
TopupSat int64
MaxCreditSat int64
MaxFeeSat int64
LastError sql.NullString
SnapshotData []byte
SnapshotVersion int32
CreatedAt int64
UpdatedAt int64
}
type DeleteVTXOParams ¶
type ExitFundingAddress ¶
type FailVHTLCRecoveryJobParams ¶
type FailVHTLCRecoveryJobParams struct {
ID string
LastError sql.NullString
UpdatedAt int64
}
type FinalizeRoundParams ¶
type GetBoardingIntentParams ¶
type GetClientLedgerStatsRow ¶
type GetClientTreeTxidsRow ¶
type GetOORPackageByOutpointAndKindRow ¶
type GetOORPackageByOutpointAndKindRow struct {
SessionID []byte
Direction int32
ArkPsbt []byte
PackageCreatedAt int64
PackageUpdatedAt int64
OutpointHash []byte
OutpointIndex int32
OutputIndex int32
LinkKind int32
RecipientPkScript []byte
ValueSat int64
BindingCreatedAt int64
BindingUpdatedAt int64
}
type GetPendingIntentByIDRow ¶
type GetPendingIntentByIDRow struct {
Status string
FailureReason sql.NullString
FailureCode int32
}
type GetVTXOForfeitTxParams ¶
type GetVTXOForfeitTxRow ¶
type GetVTXOForfeitTxRow struct {
ForfeitTx []byte
ForfeitRoundID sql.NullString
}
type GetVTXOParams ¶
type GetVTXOReplacementRow ¶
type InsertClientLedgerEntryParams ¶
type InsertClientLedgerEntryParams struct {
DebitAccount string
CreditAccount string
AmountSat int64
RoundID []byte
SessionID []byte
IdempotencyKey []byte
EventType string
Description string
CreatedAt int64
ChainTxid []byte
ChainVout sql.NullInt32
ConfirmationHeight sql.NullInt32
RoundUuid sql.NullString
}
type InsertRoundParams ¶
type InsertVHTLCRecoveryJobParams ¶
type InsertVHTLCRecoveryJobParams struct {
ID string
RequestID string
SwapID []byte
Direction string
Action string
VtxoTxid []byte
VtxoVout int32
VtxoAmountSat int64
SenderPubkey []byte
ReceiverPubkey []byte
ServerPubkey []byte
RefundLocktime int32
UnilateralClaimDelay int32
UnilateralRefundDelay int32
UnilateralRefundWithoutReceiverDelay int32
PreimageHash []byte
SignerKeyFamily int32
SignerKeyIndex int32
DestinationScript []byte
MaxFeeRateSatPerKw int32
UnrollTargetOutpointHash []byte
UnrollTargetOutpointIndex sql.NullInt32
ExitPolicyKind string
CreatedAt int64
}
type InsertVTXOParams ¶
type InsertVTXOParams struct {
OutpointHash []byte
OutpointIndex int32
RoundID string
Amount int64
PkScript []byte
Expiry int32
PolicyTemplate []byte
ClientKeyID sql.NullInt64
OperatorPubkey []byte
BatchExpiry int32
ChainDepth int32
CreatedHeight int32
CommitmentTxid []byte
Spent bool
CreationTime int64
LastUpdateTime int64
ConstructionVersion int32
}
type InternalKey ¶
type LedgerEntry ¶
type LedgerEntry struct {
EntryID int64
DebitAccount string
CreditAccount string
AmountSat int64
RoundID []byte
SessionID []byte
IdempotencyKey []byte
EventType string
Description string
CreatedAt int64
ChainTxid []byte
ChainVout sql.NullInt32
ConfirmationHeight sql.NullInt32
RoundUuid sql.NullString
}
type LedgerEventType ¶
type LedgerEventType struct {
EventType string
}
type ListRoundsPaginatedParams ¶
type ListRoundsPaginatedParams struct {
Cursor interface{}
StatusFilter interface{}
CreatedAfter interface{}
CreatedBefore interface{}
LimitCount int32
}
type ListTransactionHistoryRow ¶
type ListTransactionHistoryRow struct {
Source string
EntryID int64
Txid []byte
TransactionType string
Subtype string
AmountSat int64
FeeSat int64
CreatedAt int64
Status string
Description string
DebitAccount string
CreditAccount string
RoundID []byte
SessionID []byte
ConfirmationHeight int32
OutputIndex int32
BoardingAddress string
}
type ListVTXOsByStatusRow ¶
type ListWalletUTXOLogParams ¶
type MarkPendingSendIntentFailedByOutpointParams ¶
type MarkPendingSendIntentFailedByOutpointParams struct {
OutpointHash []byte
OutpointIndex int32
FailureReason sql.NullString
FailureCode int32
}
type MarkVTXOForfeitedParams ¶
type MarkVTXOSpentParams ¶
type OorPackage ¶
type OorPackageCheckpoint ¶
type OorPackageDirection ¶
type OorRecipientCursor ¶
type OorSessionRegistry ¶
type OorVtxoBinding ¶
type OorVtxoBindingLinkKind ¶
type OwnedReceiveScript ¶
type PendingBoardIntent ¶
type PendingIntent ¶
type PendingIntentAnchor ¶
type PendingIntentKind ¶
type PendingIntentKind struct {
Kind string
}
type PendingSendIntent ¶
type Querier ¶
type Querier interface {
// AppendActivityEvent records one immutable lifecycle-transition row and
// returns the event_seq the database assigned (monotonic, not necessarily
// contiguous). Callers use it as the resumable-subscribe cursor for the update.
AppendActivityEvent(ctx context.Context, arg AppendActivityEventParams) (int64, error)
// BackfillLedgerRoundUuid stamps the canonical UUID string form onto every
// entry carrying the given raw round_id that does not have one yet. The
// round_uuid IS NULL guard makes re-running the backfill (e.g. after a crash
// mid-migration) a no-op for already-converted rows.
BackfillLedgerRoundUuid(ctx context.Context, arg BackfillLedgerRoundUuidParams) error
CancelVHTLCRecoveryJob(ctx context.Context, arg CancelVHTLCRecoveryJobParams) (int64, error)
ClearPendingIntentAnchorByOutpoint(ctx context.Context, arg ClearPendingIntentAnchorByOutpointParams) error
CompleteVHTLCRecoveryJob(ctx context.Context, arg CompleteVHTLCRecoveryJobParams) (int64, error)
// CountActivityEntriesByStatus returns the number of current-state rows in the
// given status. It backs the wallet status summary's pending count, which must
// reflect the whole feed rather than a single paginated page.
CountActivityEntriesByStatus(ctx context.Context, status int64) (int64, error)
CountBoardingIntentsByStatus(ctx context.Context, status string) (int64, error)
CountClientLedgerEntries(ctx context.Context) (int64, error)
// Count the anchors retained for one intent (a failed intent keeps its
// anchors so it stays correlatable by its consumed outpoints).
CountPendingIntentAnchorsByIntentID(ctx context.Context, intentID []byte) (int64, error)
// Count the send-detail rows retained for one intent.
CountPendingSendIntentsByIntentID(ctx context.Context, intentID []byte) (int64, error)
CountUnresolvedBoardingSweepInputs(ctx context.Context, txid []byte) (int64, error)
CountUnspentVTXOs(ctx context.Context) (int64, error)
// CountVTXOsByStatus returns the count of VTXOs with the specified status.
CountVTXOsByStatus(ctx context.Context, status int32) (int64, error)
CountWalletUTXOLog(ctx context.Context) (int64, error)
DeleteClientTreeTxids(ctx context.Context, arg DeleteClientTreeTxidsParams) error
DeleteOORPackageCheckpoints(ctx context.Context, sessionID []byte) error
DeleteOrphanedPendingBoardIntents(ctx context.Context) error
// A terminally failed intent is a durable record, not a sweepable orphan:
// keep its header even once its anchors are reused. Replay already skips it on
// the status filter, and the activity projection still surfaces it as failed.
DeleteOrphanedPendingIntents(ctx context.Context) error
// Keep the detail row of a terminally failed send even after its anchors are
// gone (a released coin got reused by a later send, stealing the anchor). The
// failed record is durable and correlated by intent_id, so its detail must
// survive alongside its header for the activity projection to surface it.
DeleteOrphanedPendingSendIntents(ctx context.Context) error
DeletePendingBoardIntentByID(ctx context.Context, intentID []byte) error
DeletePendingBoardIntentsAll(ctx context.Context) error
DeletePendingIntentAnchorsByIntentID(ctx context.Context, intentID []byte) error
DeletePendingIntentAnchorsByKind(ctx context.Context, kind string) error
DeletePendingIntentByID(ctx context.Context, intentID []byte) error
DeletePendingIntentsByKind(ctx context.Context, kind string) error
DeletePendingSendIntentByID(ctx context.Context, intentID []byte) error
DeletePendingSendIntentsAll(ctx context.Context) error
// DeleteSpendingReservation removes the reservation for one outpoint. Called
// when the VTXO leaves SpendingState (released or completed).
DeleteSpendingReservation(ctx context.Context, arg DeleteSpendingReservationParams) error
// DeleteVTXO removes a VTXO from storage. Used for cleanup after terminal
// states are reached and the VTXO is no longer needed.
DeleteVTXO(ctx context.Context, arg DeleteVTXOParams) error
// DeleteVTXOAncestryPaths removes every ancestry row for the given VTXO.
// Used as the first half of an upsert when the VTXO manager fills in
// finalized lineage on top of a partially-written round-create row.
DeleteVTXOAncestryPaths(ctx context.Context, arg DeleteVTXOAncestryPathsParams) error
EscalateVHTLCRecoveryJob(ctx context.Context, arg EscalateVHTLCRecoveryJobParams) (int64, error)
FailVHTLCRecoveryJob(ctx context.Context, arg FailVHTLCRecoveryJobParams) (int64, error)
FinalizeRound(ctx context.Context, arg FinalizeRoundParams) error
// GetActivityEntry returns one entry by its canonical id.
GetActivityEntry(ctx context.Context, canonicalID string) (ActivityEntry, error)
GetBoardingAddress(ctx context.Context, pkScript []byte) (BoardingAddress, error)
GetBoardingIntent(ctx context.Context, arg GetBoardingIntentParams) (BoardingIntent, error)
GetBoardingSweep(ctx context.Context, txid []byte) (BoardingSweep, error)
GetBoardingSweepByInput(ctx context.Context, arg GetBoardingSweepByInputParams) (BoardingSweep, error)
GetChainInfo(ctx context.Context, chainName string) (ChainInfo, error)
GetClientAccountBalance(ctx context.Context, accountID string) (int64, error)
GetClientLedgerStats(ctx context.Context) (GetClientLedgerStatsRow, error)
GetClientTreeByTxid(ctx context.Context, txid []byte) (RoundClientTree, error)
GetClientTreeTxidInfo(ctx context.Context, txid []byte) (ClientTreeTxid, error)
GetClientTreeTxids(ctx context.Context, arg GetClientTreeTxidsParams) ([]GetClientTreeTxidsRow, error)
// GetConfirmedExitCost returns the confirmed on-chain cost of a unilateral
// exit: the onchain_fee_paid leg the ledger booked after the exit's final
// sweep confirmed, keyed by the exit's outpoint-derived idempotency key
// (ledger.ExitIdempotencyKey). Zero when the exit has not confirmed (or
// predates exit-cost accounting).
GetConfirmedExitCost(ctx context.Context, idempotencyKey []byte) (int64, error)
GetCreditOperation(ctx context.Context, opID string) (CreditOperation, error)
// Exit funding address persistence queries (wavelength#893).
GetExitFundingAddress(ctx context.Context, arg GetExitFundingAddressParams) (ExitFundingAddress, error)
GetInternalKeyByID(ctx context.Context, id int64) (InternalKey, error)
// Macaroon root key store queries.
GetMacaroonRootKey(ctx context.Context, id []byte) (Macaroon, error)
GetOORPackage(ctx context.Context, sessionID []byte) (OorPackage, error)
GetOORPackageByOutpoint(ctx context.Context, arg GetOORPackageByOutpointParams) (GetOORPackageByOutpointRow, error)
GetOORPackageByOutpointAndKind(ctx context.Context, arg GetOORPackageByOutpointAndKindParams) (GetOORPackageByOutpointAndKindRow, error)
GetOORRecipientCursor(ctx context.Context, recipientPkScript []byte) (OorRecipientCursor, error)
GetOORSessionRegistry(ctx context.Context, sessionID []byte) (OorSessionRegistry, error)
GetOORVTXOBindingByOutpoint(ctx context.Context, arg GetOORVTXOBindingByOutpointParams) (OorVtxoBinding, error)
GetOORVTXOBindingByOutpointAndKind(ctx context.Context, arg GetOORVTXOBindingByOutpointAndKindParams) (OorVtxoBinding, error)
GetOwnedReceiveScript(ctx context.Context, pkScript []byte) (OwnedReceiveScript, error)
// Fetch one intent header by id, exposing the terminal-failure columns so
// callers (and tests) can assert send-failure state without raw SQL.
GetPendingIntentByID(ctx context.Context, intentID []byte) (GetPendingIntentByIDRow, error)
GetRound(ctx context.Context, roundID string) (Round, error)
GetRoundBoardingIntents(ctx context.Context, roundID string) ([]RoundBoardingIntent, error)
GetRoundByCommitmentTxid(ctx context.Context, commitmentTxid []byte) (Round, error)
GetRoundClientTree(ctx context.Context, arg GetRoundClientTreeParams) (RoundClientTree, error)
GetRoundClientTrees(ctx context.Context, roundID string) ([]RoundClientTree, error)
GetRoundVtxoRequests(ctx context.Context, roundID string) ([]RoundVtxoRequest, error)
// Returns cumulative Ark protocol fees paid to the operator (fees_paid
// account only). Does not include L1 chain/miner fees (onchain_fees).
GetTotalOperatorFeesPaid(ctx context.Context) (int64, error)
GetUnilateralExitJob(ctx context.Context, arg GetUnilateralExitJobParams) (UnilateralExitJob, error)
GetVHTLCRecoveryJob(ctx context.Context, id string) (VhtlcRecoveryJob, error)
GetVHTLCRecoveryJobByRequestID(ctx context.Context, requestID string) (VhtlcRecoveryJob, error)
GetVTXO(ctx context.Context, arg GetVTXOParams) (Vtxo, error)
// GetVTXOForfeitTx retrieves the persisted forfeit transaction for a VTXO.
// Used during recovery to restore the ForfeitingState with its tx.
GetVTXOForfeitTx(ctx context.Context, arg GetVTXOForfeitTxParams) (GetVTXOForfeitTxRow, error)
// GetVTXOReplacement retrieves the replacement VTXO outpoint for a forfeited
// VTXO. Returns NULL if not forfeited or no replacement recorded.
GetVTXOReplacement(ctx context.Context, arg GetVTXOReplacementParams) (GetVTXOReplacementRow, error)
// Boarding address queries.
InsertBoardingAddress(ctx context.Context, arg InsertBoardingAddressParams) error
// Boarding intent queries.
InsertBoardingIntent(ctx context.Context, arg InsertBoardingIntentParams) error
// Boarding sweep queries.
InsertBoardingSweep(ctx context.Context, arg InsertBoardingSweepParams) error
InsertBoardingSweepInput(ctx context.Context, arg InsertBoardingSweepInputParams) error
// Column order matches the ledger_entries CREATE TABLE layout
// from migration 000006 plus the chain metadata columns added in
// migration 000014, so the generated row type for SELECTs stays
// structurally identical to the LedgerEntry model returned by the
// adapter. Changing the table column order requires changing these
// SELECTs in lockstep.
//
// ON CONFLICT DO NOTHING makes the insert idempotent against
// every partial unique index on ledger_entries:
// - idx_client_ledger_idempotent_round covers per-round events
// - idx_client_ledger_idempotent_session covers per-OOR-session events
// - idx_client_ledger_idempotent_key covers outpoint-keyed events
// (unilateral exit send leg + fee leg share the same key)
// A redelivered durable-actor message that reprocesses an entry
// already persisted in a committed tx becomes a silent no-op
// instead of surfacing a constraint violation that would drive
// an infinite nack-and-retry loop on a permanent condition.
InsertClientLedgerEntry(ctx context.Context, arg InsertClientLedgerEntryParams) error
// Client tree txids queries.
InsertClientTreeTxid(ctx context.Context, arg InsertClientTreeTxidParams) error
InsertExitFundingAddress(ctx context.Context, arg InsertExitFundingAddressParams) error
InsertMacaroonRootKey(ctx context.Context, arg InsertMacaroonRootKeyParams) error
InsertOORPackageCheckpoint(ctx context.Context, arg InsertOORPackageCheckpointParams) error
// Round queries.
InsertRound(ctx context.Context, arg InsertRoundParams) error
// Round boarding intents queries.
InsertRoundBoardingIntent(ctx context.Context, arg InsertRoundBoardingIntentParams) error
// Client trees queries.
InsertRoundClientTree(ctx context.Context, arg InsertRoundClientTreeParams) error
// Round VTXO request queries.
InsertRoundVtxoRequest(ctx context.Context, arg InsertRoundVtxoRequestParams) error
// vHTLC recovery job queries.
InsertVHTLCRecoveryJob(ctx context.Context, arg InsertVHTLCRecoveryJobParams) error
// VTXO queries.
// InsertVTXO creates or updates a VTXO. On conflict, richer semantic and
// metadata fields from the later insert win when present. This allows the
// round store to create the initial row and the VTXO manager to heal it with
// the finalized descriptor (policy template, key material, batch metadata).
InsertVTXO(ctx context.Context, arg InsertVTXOParams) error
// InsertVTXOAncestryPath inserts one ancestry tree fragment for a VTXO.
// Callers replace the full set on update by deleting via
// DeleteVTXOAncestryPaths first.
InsertVTXOAncestryPath(ctx context.Context, arg InsertVTXOAncestryPathParams) error
// Crash-replay safe: duplicate (outpoint, event) inserts from
// RestartMessage replay are silently ignored so the audit log stays
// at-most-once per outpoint+event.
InsertWalletUTXOLog(ctx context.Context, arg InsertWalletUTXOLogParams) error
ListActiveRounds(ctx context.Context) ([]Round, error)
// ListActivityEntries returns entries newest-first, paged by the immutable
// (created_at_unix, canonical_id) cursor so a row that transitions in place
// keeps its position. An empty cursor (created = 0) starts from the newest.
// Callers pass limit_count + 1 and trim the extra row to compute has_more.
ListActivityEntries(ctx context.Context, arg ListActivityEntriesParams) ([]ActivityEntry, error)
ListAllBoardingAddresses(ctx context.Context) ([]BoardingAddress, error)
ListAllBoardingIntents(ctx context.Context) ([]BoardingIntent, error)
ListAllCreditOperations(ctx context.Context) ([]CreditOperation, error)
ListAllOORSessionRegistry(ctx context.Context) ([]OorSessionRegistry, error)
ListAllVTXOs(ctx context.Context) ([]Vtxo, error)
ListBoardingIntentOutpoints(ctx context.Context) ([]ListBoardingIntentOutpointsRow, error)
ListBoardingIntentsByConfHeight(ctx context.Context, confHeight int32) ([]BoardingIntent, error)
ListBoardingIntentsByPkScript(ctx context.Context, pkScript []byte) ([]BoardingIntent, error)
ListBoardingIntentsByStatus(ctx context.Context, status string) ([]BoardingIntent, error)
ListBoardingIntentsByStatusAndMinHeight(ctx context.Context, arg ListBoardingIntentsByStatusAndMinHeightParams) ([]BoardingIntent, error)
ListBoardingIntentsBySweepableStatuses(ctx context.Context, arg ListBoardingIntentsBySweepableStatusesParams) ([]BoardingIntent, error)
ListBoardingSweepInputs(ctx context.Context, txid []byte) ([]BoardingSweepInput, error)
ListBoardingSweeps(ctx context.Context, arg ListBoardingSweepsParams) ([]BoardingSweep, error)
ListChainInfo(ctx context.Context) ([]ChainInfo, error)
ListClientAccountBalances(ctx context.Context) ([]ListClientAccountBalancesRow, error)
ListClientAccounts(ctx context.Context) ([]Account, error)
ListClientLedgerEntries(ctx context.Context, arg ListClientLedgerEntriesParams) ([]LedgerEntry, error)
ListClientLedgerEntriesByType(ctx context.Context, arg ListClientLedgerEntriesByTypeParams) ([]LedgerEntry, error)
ListClientLedgerEventTotals(ctx context.Context) ([]ListClientLedgerEventTotalsRow, error)
// ListEntriesByKindStatus returns entries of the given kind and status, paged
// by the unique canonical_id ascending. It backs the startup rehydration of
// the wallet-local pending map: filtering in SQL keeps that scan O(matching
// rows) instead of decoding the whole activity feed, and the canonical_id
// cursor is strictly monotonic (a full page always advances it).
ListEntriesByKindStatus(ctx context.Context, arg ListEntriesByKindStatusParams) ([]ActivityEntry, error)
// ListForfeitingVTXOsByRound returns the outpoint and amount of every VTXO
// sitting in Forfeiting status whose forfeit reservation is bound to the
// given round. Used during restart recovery to rebuild a reloaded round's
// forfeit set, so the status-reconcile release path has real outpoints to
// return to Live rather than the empty in-memory set the crash discarded.
ListForfeitingVTXOsByRound(ctx context.Context, forfeitRoundID sql.NullString) ([]ListForfeitingVTXOsByRoundRow, error)
// ListLedgerRoundIDsMissingUuid returns the distinct raw round_id BLOBs that
// have not yet been mirrored into the round_uuid TEXT column. The BLOB-to-UUID
// string conversion is not expressible in the SQL dialect subset shared by
// SQLite and Postgres, so the migration-015 post-step performs it in Go and
// writes the result back via BackfillLedgerRoundUuid.
ListLedgerRoundIDsMissingUuid(ctx context.Context) ([][]byte, error)
// ListLiveVTXOAncestryPaths returns every ancestry row whose parent VTXO
// is non-terminal, mirroring the filter on ListLiveVTXOs. Used as a
// single batched companion query so descriptor materialization across
// the live set runs in two queries total instead of N+1.
ListLiveVTXOAncestryPaths(ctx context.Context) ([]VtxoAncestryPath, error)
// ListLiveVTXOs returns all VTXOs that are not in a terminal state.
// Terminal states are: Forfeited (3), Spent (4), UnilateralExit (5),
// Failed (6).
// Non-terminal states: Live (0), PendingForfeit (1), Forfeiting (2),
// Spending (7).
// This is used during startup to recover active VTXO actors.
// Also filter on spent = FALSE to handle VTXOs marked spent via the earlier
// flag before the status field was introduced.
ListLiveVTXOs(ctx context.Context) ([]Vtxo, error)
// Status 1 = Completed, 2 = Failed (anchored to Go iota in
// db/credit_operation_store.go CreditOpStatus).
ListNonTerminalCreditOperations(ctx context.Context) ([]CreditOperation, error)
// Status 1 = Completed, 2 = Failed (anchored to Go iota in
// db/oor_session_registry_store.go OORSessionStatus).
ListNonTerminalOORSessionRegistry(ctx context.Context) ([]OorSessionRegistry, error)
// Status 4 = Completed, 5 = Failed, 7 = FailedRecoverable (anchored to Go
// iota in db/unilateral_exit_store.go UnilateralExitJobStatus).
ListNonTerminalUnilateralExitJobs(ctx context.Context) ([]UnilateralExitJob, error)
ListNonTerminalVHTLCRecoveryJobs(ctx context.Context) ([]VhtlcRecoveryJob, error)
ListOORPackageCheckpoints(ctx context.Context, sessionID []byte) ([]OorPackageCheckpoint, error)
ListOORPackages(ctx context.Context) ([]OorPackage, error)
ListOORPackagesByDirection(ctx context.Context, direction int32) ([]OorPackage, error)
ListOORRecipientCursors(ctx context.Context) ([]OorRecipientCursor, error)
ListOORVTXOBindingsBySession(ctx context.Context, sessionID []byte) ([]ListOORVTXOBindingsBySessionRow, error)
ListOwnedReceiveScripts(ctx context.Context) ([]OwnedReceiveScript, error)
// Only status = 'pending' rows replay; a 'failed' intent is terminally
// retired and must not be re-submitted on restart.
ListPendingBoardIntents(ctx context.Context) ([]ListPendingBoardIntentsRow, error)
ListPendingBoardingSweepInputs(ctx context.Context) ([]BoardingSweepInput, error)
ListPendingBoardingSweeps(ctx context.Context) ([]BoardingSweep, error)
ListPendingIntentAnchorsByKind(ctx context.Context, kind string) ([]PendingIntentAnchor, error)
// Only status = 'pending' rows replay; a 'failed' intent is terminally
// retired and must not be re-submitted on restart.
ListPendingSendIntents(ctx context.Context) ([]ListPendingSendIntentsRow, error)
// ListRecoverableVTXOs returns every VTXO whose actor must be restored at
// startup: the non-terminal set of ListLiveVTXOs plus Expired (8).
//
// Expired is deliberately absent from ListLiveVTXOs, which feeds spendable
// balance and refresh estimation, because an expired VTXO holds no spendable
// value until it has been reissued. Its actor still has to exist though: the
// value is recoverable by forfeiting the VTXO in an ordinary round, and the
// actor is what holds the descriptor and signing material that forfeit needs.
ListRecoverableVTXOs(ctx context.Context) ([]Vtxo, error)
ListRoundsByStatus(ctx context.Context, status string) ([]Round, error)
// ListRoundsPaginated returns rounds ordered by round_id with cursor-
// based pagination. When cursor is empty, returns from the beginning.
ListRoundsPaginated(ctx context.Context, arg ListRoundsPaginatedParams) ([]Round, error)
// ListSpendingReservationOutpoints returns every reserved outpoint. Used by
// the startup sweep to build the set of live reservations.
ListSpendingReservationOutpoints(ctx context.Context) ([]ListSpendingReservationOutpointsRow, error)
// ListTransactionHistory returns a unified newest-first history from the
// client-side ledger and tracked boarding sweep transactions. Filters are
// applied before LIMIT/OFFSET so filtered pagination never skips over matching
// rows hidden behind non-matching entries.
ListTransactionHistory(ctx context.Context, arg ListTransactionHistoryParams) ([]ListTransactionHistoryRow, error)
// ListUnspentVTXOAncestryPaths returns every ancestry row whose parent
// VTXO is unspent (status != 4 AND spent = FALSE), mirroring the filter
// on ListUnspentVTXOs. Companion to the round-side ListVTXOs path.
ListUnspentVTXOAncestryPaths(ctx context.Context) ([]VtxoAncestryPath, error)
// Unspent requires both spent=false and status!=Spent(4).
ListUnspentVTXOs(ctx context.Context) ([]Vtxo, error)
ListVHTLCRecoveryJobs(ctx context.Context) ([]VhtlcRecoveryJob, error)
ListVHTLCRecoveryJobsBySwapAction(ctx context.Context, arg ListVHTLCRecoveryJobsBySwapActionParams) ([]VhtlcRecoveryJob, error)
// ListVTXOAncestryPaths returns the ancestry rows for one VTXO ordered by
// path_order so the unroller sees the fragments in the same sequence the
// indexer chose at materialization time.
ListVTXOAncestryPaths(ctx context.Context, arg ListVTXOAncestryPathsParams) ([]VtxoAncestryPath, error)
// ListVTXOAncestryPathsByStatus returns every ancestry row whose parent
// VTXO matches the given status code. Companion to ListVTXOsByStatus.
ListVTXOAncestryPathsByStatus(ctx context.Context, status int32) ([]VtxoAncestryPath, error)
// ListVTXOSelectionCandidatesByStatus returns the lightweight projection coin
// selection runs on: outpoint, amount, and pkScript. Selection happens on
// every payment and only needs these three fields, so this avoids decoding
// full descriptors (pubkey parsing, taproot script reconstruction, policy
// template decode) and the batched ancestry-path query on the hot path.
ListVTXOSelectionCandidatesByStatus(ctx context.Context, status int32) ([]ListVTXOSelectionCandidatesByStatusRow, error)
ListVTXOsByRound(ctx context.Context, roundID string) ([]Vtxo, error)
// VTXO status and lifecycle queries.
// These queries support the vtxo.VTXOStore interface for VTXO lifecycle
// management, including status transitions and forfeit transaction tracking.
// ListVTXOsByStatus returns all VTXOs with the specified status. It also
// LEFT JOINs the round that forfeited each VTXO (via forfeit_round_id) so a
// FORFEITED VTXO can surface the settling commitment txid and its confirmation
// height. The join columns are NULL for every VTXO whose forfeit round is
// unknown (all non-forfeited VTXOs, and forfeited ones whose round row is
// absent), so consumers must treat them as optional.
//
// settlement_fee_sat is the TOTAL operator fee the client's ledger booked for
// the forfeit round (boarding_fee_paid + refresh_fee_paid, joined via the
// round_uuid TEXT mirror of the ledger's BLOB round_id). Every VTXO forfeited
// in the same round reports the same round-level figure — consumers must not
// sum it across VTXOs. Zero when the forfeit round is unknown or its fee rows
// are absent (e.g. rows written before the round_uuid backfill ran).
//
// The fee lookup is a correlated scalar subquery rather than a grouped join:
// the planner then resolves it as a per-row probe of the
// idx_client_ledger_round_uuid index for the (few) forfeited rows that carry
// a forfeit_round_id, instead of aggregating every fee row in the ledger on
// every call.
ListVTXOsByStatus(ctx context.Context, status int32) ([]ListVTXOsByStatusRow, error)
ListWalletUTXOLog(ctx context.Context, arg ListWalletUTXOLogParams) ([]WalletUtxoLog, error)
ListWalletUTXOLogByBlock(ctx context.Context, blockHeight int32) ([]WalletUtxoLog, error)
ListWalletUTXOLogByClassification(ctx context.Context, arg ListWalletUTXOLogByClassificationParams) ([]WalletUtxoLog, error)
// Status 2 = Failed (anchored to Go iota in db/credit_operation_store.go
// CreditOpStatus). Failed operations never dedup a keyed retry, so the lookup
// skips them: only a pending or completed operation answers for an op_key.
LookupActiveCreditOperationByKey(ctx context.Context, opKey string) (CreditOperation, error)
// Status 2 = Failed (anchored to Go iota in
// db/oor_session_registry_store.go OORSessionStatus). Failed sessions never
// dedup a keyed retry, so the lookup skips them: only a pending or completed
// session answers for an idempotency key.
LookupActiveOORSessionRegistryByIdempotencyKey(ctx context.Context, idempotencyKey sql.NullString) (OorSessionRegistry, error)
MarkBoardingSweepInputSpentByOutpoint(ctx context.Context, arg MarkBoardingSweepInputSpentByOutpointParams) (int64, error)
MarkBoardingSweepInputStatus(ctx context.Context, arg MarkBoardingSweepInputStatusParams) error
MarkBoardingSweepInputsStatus(ctx context.Context, arg MarkBoardingSweepInputsStatusParams) error
MarkBoardingSweepStatus(ctx context.Context, arg MarkBoardingSweepStatusParams) error
// Terminally fail the pending send intent anchored to the given outpoint,
// recording the reason and typed failure code. Idempotent: the status guard
// makes a repeat call (e.g. a second forfeit outpoint of the same intent) a
// no-op. Anchors are intentionally retained so the activity projection can
// still correlate the failed job by its consumed outpoint.
MarkPendingSendIntentFailedByOutpoint(ctx context.Context, arg MarkPendingSendIntentFailedByOutpointParams) error
MarkUnilateralExitJobTerminal(ctx context.Context, arg MarkUnilateralExitJobTerminalParams) error
MarkVHTLCRecoveryExitTxBroadcast(ctx context.Context, arg MarkVHTLCRecoveryExitTxBroadcastParams) error
MarkVHTLCRecoveryExitTxBuilt(ctx context.Context, arg MarkVHTLCRecoveryExitTxBuiltParams) error
MarkVHTLCRecoveryExitTxSubmitting(ctx context.Context, arg MarkVHTLCRecoveryExitTxSubmittingParams) error
// Intermediate states waiting_for_target and building_exit_spend are written
// by the execution-layer PR. This storage slice accepts them as source states
// so replay can resume from each durable pipeline boundary once those writes
// exist.
MarkVHTLCRecoveryTargetDetected(ctx context.Context, arg MarkVHTLCRecoveryTargetDetectedParams) error
// MarkVTXOForfeited marks a VTXO as forfeited and records the forfeit
// transaction ID and replacement VTXO outpoint. Called when the new round's
// commitment transaction confirms.
MarkVTXOForfeited(ctx context.Context, arg MarkVTXOForfeitedParams) error
// MarkVTXOForfeiting transitions a VTXO to Forfeiting status and persists
// the forfeit round ID and transaction for crash recovery. Called when
// entering the forfeit flow.
MarkVTXOForfeiting(ctx context.Context, arg MarkVTXOForfeitingParams) error
// Also sets status = 4 (Spent) to keep status in sync with spent flag.
MarkVTXOSpent(ctx context.Context, arg MarkVTXOSpentParams) error
// PullActivityEvents returns transition rows strictly after the cursor in
// event_seq order, the resumable-subscribe replay primitive.
PullActivityEvents(ctx context.Context, arg PullActivityEventsParams) ([]ActivityEvent, error)
SumBoardingIntentAmountsByStatus(ctx context.Context, status string) (interface{}, error)
SumUnspentVTXOAmounts(ctx context.Context) (interface{}, error)
UpdateBoardingIntentStatus(ctx context.Context, arg UpdateBoardingIntentStatusParams) error
UpdateRoundBoardingIntentSignature(ctx context.Context, arg UpdateRoundBoardingIntentSignatureParams) error
UpdateRoundStatus(ctx context.Context, arg UpdateRoundStatusParams) error
// UpdateVTXOStatus atomically updates a VTXO's status. This is the primary
// method for state transitions that don't require additional data.
UpdateVTXOStatus(ctx context.Context, arg UpdateVTXOStatusParams) error
// Canonical activity log queries. activity_entries is the current-state
// projection read by List; activity_events is the append-only transition log
// read by a resumable SubscribeWallet. See docs/canonical_activity_log_design.md.
// UpsertActivityEntry inserts the activity row or advances it in place. On
// conflict the mutable lifecycle columns are overwritten with the new
// projection and updated_at_unix is bumped, but created_at_unix is preserved so
// the row keeps its position in the created-ordered feed. The settlement and
// correlation handles are COALESCEd so an early projection that does not yet
// know a txid never clobbers one a later projection already recorded.
UpsertActivityEntry(ctx context.Context, arg UpsertActivityEntryParams) (int64, error)
UpsertChainInfo(ctx context.Context, arg UpsertChainInfoParams) error
// Credit operations control-plane queries.
UpsertCreditOperation(ctx context.Context, arg UpsertCreditOperationParams) error
// Internal key registry queries.
// Register an internal key and return the stored row's id in a single
// round-trip on both backends. ON CONFLICT (pubkey, key_family, key_index)
// makes re-registration of an already-known triple idempotent; the no-op DO
// UPDATE (rather than DO NOTHING) is required so RETURNING still fires on
// conflict and the caller gets the existing id, closing the read-then-insert
// race a separate re-select would leave open.
UpsertInternalKey(ctx context.Context, arg UpsertInternalKeyParams) (int64, error)
// OOR artifact store queries.
UpsertOORPackage(ctx context.Context, arg UpsertOORPackageParams) (int64, error)
UpsertOORRecipientCursor(ctx context.Context, arg UpsertOORRecipientCursorParams) error
// OOR session registry control-plane queries.
UpsertOORSessionRegistry(ctx context.Context, arg UpsertOORSessionRegistryParams) error
UpsertOORVTXOBinding(ctx context.Context, arg UpsertOORVTXOBindingParams) (int64, error)
UpsertOwnedReceiveScript(ctx context.Context, arg UpsertOwnedReceiveScriptParams) error
UpsertPendingBoardIntent(ctx context.Context, arg UpsertPendingBoardIntentParams) error
UpsertPendingIntentAnchor(ctx context.Context, arg UpsertPendingIntentAnchorParams) error
// Re-arm a re-persisted intent as pending. NewPendingIntentID is
// deterministic, so retrying a terminally failed send (same inputs and
// payload) reuses the same intent_id and lands here on the retained 'failed'
// row. Resetting the status and failure fields makes the retry replayable
// again; without it the replay query (which now skips non-pending rows) would
// silently drop a retry that crashes before the round adopts it.
UpsertPendingIntentHeader(ctx context.Context, arg UpsertPendingIntentHeaderParams) error
UpsertPendingSendIntent(ctx context.Context, arg UpsertPendingSendIntentParams) error
// Spending reservation queries.
// These queries maintain a durable index of VTXO outpoints reserved by an
// active spend owner (e.g. an outgoing OOR session) so a startup sweep can
// release orphaned Spending VTXOs that have no live reservation.
// UpsertSpendingReservation records (or refreshes) the reservation for one
// outpoint. The owner fields are updated on conflict so a re-checkpointed
// session re-binds the same outpoint to its current owner.
UpsertSpendingReservation(ctx context.Context, arg UpsertSpendingReservationParams) error
// Unilateral-exit job control-plane queries.
UpsertUnilateralExitJob(ctx context.Context, arg UpsertUnilateralExitJobParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
NewPostgres creates a new Queries instance for a Postgres database.
func (*Queries) AppendActivityEvent ¶
func (q *Queries) AppendActivityEvent(ctx context.Context, arg AppendActivityEventParams) (int64, error)
AppendActivityEvent records one immutable lifecycle-transition row and returns the event_seq the database assigned (monotonic, not necessarily contiguous). Callers use it as the resumable-subscribe cursor for the update.
func (*Queries) Backend ¶
func (q *Queries) Backend() BackendType
Backend returns the type of database backend we're using.
func (*Queries) BackfillLedgerRoundUuid ¶
func (q *Queries) BackfillLedgerRoundUuid(ctx context.Context, arg BackfillLedgerRoundUuidParams) error
BackfillLedgerRoundUuid stamps the canonical UUID string form onto every entry carrying the given raw round_id that does not have one yet. The round_uuid IS NULL guard makes re-running the backfill (e.g. after a crash mid-migration) a no-op for already-converted rows.
func (*Queries) CancelVHTLCRecoveryJob ¶
func (*Queries) ClearPendingIntentAnchorByOutpoint ¶
func (q *Queries) ClearPendingIntentAnchorByOutpoint(ctx context.Context, arg ClearPendingIntentAnchorByOutpointParams) error
func (*Queries) CompleteVHTLCRecoveryJob ¶
func (*Queries) CountActivityEntriesByStatus ¶
CountActivityEntriesByStatus returns the number of current-state rows in the given status. It backs the wallet status summary's pending count, which must reflect the whole feed rather than a single paginated page.
func (*Queries) CountBoardingIntentsByStatus ¶
func (*Queries) CountClientLedgerEntries ¶
func (*Queries) CountPendingIntentAnchorsByIntentID ¶
func (q *Queries) CountPendingIntentAnchorsByIntentID(ctx context.Context, intentID []byte) (int64, error)
Count the anchors retained for one intent (a failed intent keeps its anchors so it stays correlatable by its consumed outpoints).
func (*Queries) CountPendingSendIntentsByIntentID ¶
func (q *Queries) CountPendingSendIntentsByIntentID(ctx context.Context, intentID []byte) (int64, error)
Count the send-detail rows retained for one intent.
func (*Queries) CountUnresolvedBoardingSweepInputs ¶
func (*Queries) CountUnspentVTXOs ¶
func (*Queries) CountVTXOsByStatus ¶
CountVTXOsByStatus returns the count of VTXOs with the specified status.
func (*Queries) CountWalletUTXOLog ¶
func (*Queries) DeleteClientTreeTxids ¶
func (q *Queries) DeleteClientTreeTxids(ctx context.Context, arg DeleteClientTreeTxidsParams) error
func (*Queries) DeleteOORPackageCheckpoints ¶
func (*Queries) DeleteOrphanedPendingBoardIntents ¶
func (*Queries) DeleteOrphanedPendingIntents ¶
A terminally failed intent is a durable record, not a sweepable orphan: keep its header even once its anchors are reused. Replay already skips it on the status filter, and the activity projection still surfaces it as failed.
func (*Queries) DeleteOrphanedPendingSendIntents ¶
Keep the detail row of a terminally failed send even after its anchors are gone (a released coin got reused by a later send, stealing the anchor). The failed record is durable and correlated by intent_id, so its detail must survive alongside its header for the activity projection to surface it.
func (*Queries) DeletePendingBoardIntentByID ¶
func (*Queries) DeletePendingBoardIntentsAll ¶
func (*Queries) DeletePendingIntentAnchorsByIntentID ¶
func (*Queries) DeletePendingIntentAnchorsByKind ¶
func (*Queries) DeletePendingIntentByID ¶
func (*Queries) DeletePendingIntentsByKind ¶
func (*Queries) DeletePendingSendIntentByID ¶
func (*Queries) DeletePendingSendIntentsAll ¶
func (*Queries) DeleteSpendingReservation ¶
func (q *Queries) DeleteSpendingReservation(ctx context.Context, arg DeleteSpendingReservationParams) error
DeleteSpendingReservation removes the reservation for one outpoint. Called when the VTXO leaves SpendingState (released or completed).
func (*Queries) DeleteVTXO ¶
func (q *Queries) DeleteVTXO(ctx context.Context, arg DeleteVTXOParams) error
DeleteVTXO removes a VTXO from storage. Used for cleanup after terminal states are reached and the VTXO is no longer needed.
func (*Queries) DeleteVTXOAncestryPaths ¶
func (q *Queries) DeleteVTXOAncestryPaths(ctx context.Context, arg DeleteVTXOAncestryPathsParams) error
DeleteVTXOAncestryPaths removes every ancestry row for the given VTXO. Used as the first half of an upsert when the VTXO manager fills in finalized lineage on top of a partially-written round-create row.
func (*Queries) EscalateVHTLCRecoveryJob ¶
func (*Queries) FailVHTLCRecoveryJob ¶
func (*Queries) FinalizeRound ¶
func (q *Queries) FinalizeRound(ctx context.Context, arg FinalizeRoundParams) error
func (*Queries) GetActivityEntry ¶
GetActivityEntry returns one entry by its canonical id.
func (*Queries) GetBoardingAddress ¶
func (*Queries) GetBoardingIntent ¶
func (q *Queries) GetBoardingIntent(ctx context.Context, arg GetBoardingIntentParams) (BoardingIntent, error)
func (*Queries) GetBoardingSweep ¶
func (*Queries) GetBoardingSweepByInput ¶
func (q *Queries) GetBoardingSweepByInput(ctx context.Context, arg GetBoardingSweepByInputParams) (BoardingSweep, error)
func (*Queries) GetChainInfo ¶
func (*Queries) GetClientAccountBalance ¶
func (*Queries) GetClientLedgerStats ¶
func (q *Queries) GetClientLedgerStats(ctx context.Context) (GetClientLedgerStatsRow, error)
func (*Queries) GetClientTreeByTxid ¶
func (*Queries) GetClientTreeTxidInfo ¶
func (*Queries) GetClientTreeTxids ¶
func (q *Queries) GetClientTreeTxids(ctx context.Context, arg GetClientTreeTxidsParams) ([]GetClientTreeTxidsRow, error)
func (*Queries) GetConfirmedExitCost ¶
GetConfirmedExitCost returns the confirmed on-chain cost of a unilateral exit: the onchain_fee_paid leg the ledger booked after the exit's final sweep confirmed, keyed by the exit's outpoint-derived idempotency key (ledger.ExitIdempotencyKey). Zero when the exit has not confirmed (or predates exit-cost accounting).
func (*Queries) GetCreditOperation ¶
func (*Queries) GetExitFundingAddress ¶
func (q *Queries) GetExitFundingAddress(ctx context.Context, arg GetExitFundingAddressParams) (ExitFundingAddress, error)
Exit funding address persistence queries (wavelength#893).
func (*Queries) GetInternalKeyByID ¶
func (*Queries) GetMacaroonRootKey ¶
Macaroon root key store queries.
func (*Queries) GetOORPackage ¶
func (*Queries) GetOORPackageByOutpoint ¶
func (q *Queries) GetOORPackageByOutpoint(ctx context.Context, arg GetOORPackageByOutpointParams) (GetOORPackageByOutpointRow, error)
func (*Queries) GetOORPackageByOutpointAndKind ¶
func (q *Queries) GetOORPackageByOutpointAndKind(ctx context.Context, arg GetOORPackageByOutpointAndKindParams) (GetOORPackageByOutpointAndKindRow, error)
func (*Queries) GetOORRecipientCursor ¶
func (*Queries) GetOORSessionRegistry ¶
func (*Queries) GetOORVTXOBindingByOutpoint ¶
func (q *Queries) GetOORVTXOBindingByOutpoint(ctx context.Context, arg GetOORVTXOBindingByOutpointParams) (OorVtxoBinding, error)
func (*Queries) GetOORVTXOBindingByOutpointAndKind ¶
func (q *Queries) GetOORVTXOBindingByOutpointAndKind(ctx context.Context, arg GetOORVTXOBindingByOutpointAndKindParams) (OorVtxoBinding, error)
func (*Queries) GetOwnedReceiveScript ¶
func (*Queries) GetPendingIntentByID ¶
func (q *Queries) GetPendingIntentByID(ctx context.Context, intentID []byte) (GetPendingIntentByIDRow, error)
Fetch one intent header by id, exposing the terminal-failure columns so callers (and tests) can assert send-failure state without raw SQL.
func (*Queries) GetRoundBoardingIntents ¶
func (*Queries) GetRoundByCommitmentTxid ¶
func (*Queries) GetRoundClientTree ¶
func (q *Queries) GetRoundClientTree(ctx context.Context, arg GetRoundClientTreeParams) (RoundClientTree, error)
func (*Queries) GetRoundClientTrees ¶
func (*Queries) GetRoundVtxoRequests ¶
func (*Queries) GetTotalOperatorFeesPaid ¶
Returns cumulative Ark protocol fees paid to the operator (fees_paid account only). Does not include L1 chain/miner fees (onchain_fees).
func (*Queries) GetUnilateralExitJob ¶
func (q *Queries) GetUnilateralExitJob(ctx context.Context, arg GetUnilateralExitJobParams) (UnilateralExitJob, error)
func (*Queries) GetVHTLCRecoveryJob ¶
func (*Queries) GetVHTLCRecoveryJobByRequestID ¶
func (*Queries) GetVTXOForfeitTx ¶
func (q *Queries) GetVTXOForfeitTx(ctx context.Context, arg GetVTXOForfeitTxParams) (GetVTXOForfeitTxRow, error)
GetVTXOForfeitTx retrieves the persisted forfeit transaction for a VTXO. Used during recovery to restore the ForfeitingState with its tx.
func (*Queries) GetVTXOReplacement ¶
func (q *Queries) GetVTXOReplacement(ctx context.Context, arg GetVTXOReplacementParams) (GetVTXOReplacementRow, error)
GetVTXOReplacement retrieves the replacement VTXO outpoint for a forfeited VTXO. Returns NULL if not forfeited or no replacement recorded.
func (*Queries) InsertBoardingAddress ¶
func (q *Queries) InsertBoardingAddress(ctx context.Context, arg InsertBoardingAddressParams) error
Boarding address queries.
func (*Queries) InsertBoardingIntent ¶
func (q *Queries) InsertBoardingIntent(ctx context.Context, arg InsertBoardingIntentParams) error
Boarding intent queries.
func (*Queries) InsertBoardingSweep ¶
func (q *Queries) InsertBoardingSweep(ctx context.Context, arg InsertBoardingSweepParams) error
Boarding sweep queries.
func (*Queries) InsertBoardingSweepInput ¶
func (q *Queries) InsertBoardingSweepInput(ctx context.Context, arg InsertBoardingSweepInputParams) error
func (*Queries) InsertClientLedgerEntry ¶
func (q *Queries) InsertClientLedgerEntry(ctx context.Context, arg InsertClientLedgerEntryParams) error
Column order matches the ledger_entries CREATE TABLE layout from migration 000006 plus the chain metadata columns added in migration 000014, so the generated row type for SELECTs stays structurally identical to the LedgerEntry model returned by the adapter. Changing the table column order requires changing these SELECTs in lockstep.
ON CONFLICT DO NOTHING makes the insert idempotent against every partial unique index on ledger_entries:
- idx_client_ledger_idempotent_round covers per-round events
- idx_client_ledger_idempotent_session covers per-OOR-session events
- idx_client_ledger_idempotent_key covers outpoint-keyed events (unilateral exit send leg + fee leg share the same key)
A redelivered durable-actor message that reprocesses an entry already persisted in a committed tx becomes a silent no-op instead of surfacing a constraint violation that would drive an infinite nack-and-retry loop on a permanent condition.
func (*Queries) InsertClientTreeTxid ¶
func (q *Queries) InsertClientTreeTxid(ctx context.Context, arg InsertClientTreeTxidParams) error
Client tree txids queries.
func (*Queries) InsertExitFundingAddress ¶
func (q *Queries) InsertExitFundingAddress(ctx context.Context, arg InsertExitFundingAddressParams) error
func (*Queries) InsertMacaroonRootKey ¶
func (q *Queries) InsertMacaroonRootKey(ctx context.Context, arg InsertMacaroonRootKeyParams) error
func (*Queries) InsertOORPackageCheckpoint ¶
func (q *Queries) InsertOORPackageCheckpoint(ctx context.Context, arg InsertOORPackageCheckpointParams) error
func (*Queries) InsertRound ¶
func (q *Queries) InsertRound(ctx context.Context, arg InsertRoundParams) error
Round queries.
func (*Queries) InsertRoundBoardingIntent ¶
func (q *Queries) InsertRoundBoardingIntent(ctx context.Context, arg InsertRoundBoardingIntentParams) error
Round boarding intents queries.
func (*Queries) InsertRoundClientTree ¶
func (q *Queries) InsertRoundClientTree(ctx context.Context, arg InsertRoundClientTreeParams) error
Client trees queries.
func (*Queries) InsertRoundVtxoRequest ¶
func (q *Queries) InsertRoundVtxoRequest(ctx context.Context, arg InsertRoundVtxoRequestParams) error
Round VTXO request queries.
func (*Queries) InsertVHTLCRecoveryJob ¶
func (q *Queries) InsertVHTLCRecoveryJob(ctx context.Context, arg InsertVHTLCRecoveryJobParams) error
vHTLC recovery job queries.
func (*Queries) InsertVTXO ¶
func (q *Queries) InsertVTXO(ctx context.Context, arg InsertVTXOParams) error
VTXO queries. InsertVTXO creates or updates a VTXO. On conflict, richer semantic and metadata fields from the later insert win when present. This allows the round store to create the initial row and the VTXO manager to heal it with the finalized descriptor (policy template, key material, batch metadata).
func (*Queries) InsertVTXOAncestryPath ¶
func (q *Queries) InsertVTXOAncestryPath(ctx context.Context, arg InsertVTXOAncestryPathParams) error
InsertVTXOAncestryPath inserts one ancestry tree fragment for a VTXO. Callers replace the full set on update by deleting via DeleteVTXOAncestryPaths first.
func (*Queries) InsertWalletUTXOLog ¶
func (q *Queries) InsertWalletUTXOLog(ctx context.Context, arg InsertWalletUTXOLogParams) error
Crash-replay safe: duplicate (outpoint, event) inserts from RestartMessage replay are silently ignored so the audit log stays at-most-once per outpoint+event.
func (*Queries) ListActiveRounds ¶
func (*Queries) ListActivityEntries ¶
func (q *Queries) ListActivityEntries(ctx context.Context, arg ListActivityEntriesParams) ([]ActivityEntry, error)
ListActivityEntries returns entries newest-first, paged by the immutable (created_at_unix, canonical_id) cursor so a row that transitions in place keeps its position. An empty cursor (created = 0) starts from the newest. Callers pass limit_count + 1 and trim the extra row to compute has_more.
func (*Queries) ListAllBoardingAddresses ¶
func (q *Queries) ListAllBoardingAddresses(ctx context.Context) ([]BoardingAddress, error)
func (*Queries) ListAllBoardingIntents ¶
func (q *Queries) ListAllBoardingIntents(ctx context.Context) ([]BoardingIntent, error)
func (*Queries) ListAllCreditOperations ¶
func (q *Queries) ListAllCreditOperations(ctx context.Context) ([]CreditOperation, error)
func (*Queries) ListAllOORSessionRegistry ¶
func (q *Queries) ListAllOORSessionRegistry(ctx context.Context) ([]OorSessionRegistry, error)
func (*Queries) ListBoardingIntentOutpoints ¶
func (q *Queries) ListBoardingIntentOutpoints(ctx context.Context) ([]ListBoardingIntentOutpointsRow, error)
func (*Queries) ListBoardingIntentsByConfHeight ¶
func (*Queries) ListBoardingIntentsByPkScript ¶
func (*Queries) ListBoardingIntentsByStatus ¶
func (*Queries) ListBoardingIntentsByStatusAndMinHeight ¶
func (q *Queries) ListBoardingIntentsByStatusAndMinHeight(ctx context.Context, arg ListBoardingIntentsByStatusAndMinHeightParams) ([]BoardingIntent, error)
func (*Queries) ListBoardingIntentsBySweepableStatuses ¶
func (q *Queries) ListBoardingIntentsBySweepableStatuses(ctx context.Context, arg ListBoardingIntentsBySweepableStatusesParams) ([]BoardingIntent, error)
func (*Queries) ListBoardingSweepInputs ¶
func (*Queries) ListBoardingSweeps ¶
func (q *Queries) ListBoardingSweeps(ctx context.Context, arg ListBoardingSweepsParams) ([]BoardingSweep, error)
func (*Queries) ListChainInfo ¶
func (*Queries) ListClientAccountBalances ¶
func (q *Queries) ListClientAccountBalances(ctx context.Context) ([]ListClientAccountBalancesRow, error)
func (*Queries) ListClientAccounts ¶
func (*Queries) ListClientLedgerEntries ¶
func (q *Queries) ListClientLedgerEntries(ctx context.Context, arg ListClientLedgerEntriesParams) ([]LedgerEntry, error)
func (*Queries) ListClientLedgerEntriesByType ¶
func (q *Queries) ListClientLedgerEntriesByType(ctx context.Context, arg ListClientLedgerEntriesByTypeParams) ([]LedgerEntry, error)
func (*Queries) ListClientLedgerEventTotals ¶
func (q *Queries) ListClientLedgerEventTotals(ctx context.Context) ([]ListClientLedgerEventTotalsRow, error)
func (*Queries) ListEntriesByKindStatus ¶
func (q *Queries) ListEntriesByKindStatus(ctx context.Context, arg ListEntriesByKindStatusParams) ([]ActivityEntry, error)
ListEntriesByKindStatus returns entries of the given kind and status, paged by the unique canonical_id ascending. It backs the startup rehydration of the wallet-local pending map: filtering in SQL keeps that scan O(matching rows) instead of decoding the whole activity feed, and the canonical_id cursor is strictly monotonic (a full page always advances it).
func (*Queries) ListForfeitingVTXOsByRound ¶
func (q *Queries) ListForfeitingVTXOsByRound(ctx context.Context, forfeitRoundID sql.NullString) ([]ListForfeitingVTXOsByRoundRow, error)
ListForfeitingVTXOsByRound returns the outpoint and amount of every VTXO sitting in Forfeiting status whose forfeit reservation is bound to the given round. Used during restart recovery to rebuild a reloaded round's forfeit set, so the status-reconcile release path has real outpoints to return to Live rather than the empty in-memory set the crash discarded.
func (*Queries) ListLedgerRoundIDsMissingUuid ¶
ListLedgerRoundIDsMissingUuid returns the distinct raw round_id BLOBs that have not yet been mirrored into the round_uuid TEXT column. The BLOB-to-UUID string conversion is not expressible in the SQL dialect subset shared by SQLite and Postgres, so the migration-015 post-step performs it in Go and writes the result back via BackfillLedgerRoundUuid.
func (*Queries) ListLiveVTXOAncestryPaths ¶
func (q *Queries) ListLiveVTXOAncestryPaths(ctx context.Context) ([]VtxoAncestryPath, error)
ListLiveVTXOAncestryPaths returns every ancestry row whose parent VTXO is non-terminal, mirroring the filter on ListLiveVTXOs. Used as a single batched companion query so descriptor materialization across the live set runs in two queries total instead of N+1.
func (*Queries) ListLiveVTXOs ¶
ListLiveVTXOs returns all VTXOs that are not in a terminal state. Terminal states are: Forfeited (3), Spent (4), UnilateralExit (5), Failed (6). Non-terminal states: Live (0), PendingForfeit (1), Forfeiting (2), Spending (7). This is used during startup to recover active VTXO actors. Also filter on spent = FALSE to handle VTXOs marked spent via the earlier flag before the status field was introduced.
func (*Queries) ListNonTerminalCreditOperations ¶
func (q *Queries) ListNonTerminalCreditOperations(ctx context.Context) ([]CreditOperation, error)
Status 1 = Completed, 2 = Failed (anchored to Go iota in db/credit_operation_store.go CreditOpStatus).
func (*Queries) ListNonTerminalOORSessionRegistry ¶
func (q *Queries) ListNonTerminalOORSessionRegistry(ctx context.Context) ([]OorSessionRegistry, error)
Status 1 = Completed, 2 = Failed (anchored to Go iota in db/oor_session_registry_store.go OORSessionStatus).
func (*Queries) ListNonTerminalUnilateralExitJobs ¶
func (q *Queries) ListNonTerminalUnilateralExitJobs(ctx context.Context) ([]UnilateralExitJob, error)
Status 4 = Completed, 5 = Failed, 7 = FailedRecoverable (anchored to Go iota in db/unilateral_exit_store.go UnilateralExitJobStatus).
func (*Queries) ListNonTerminalVHTLCRecoveryJobs ¶
func (q *Queries) ListNonTerminalVHTLCRecoveryJobs(ctx context.Context) ([]VhtlcRecoveryJob, error)
func (*Queries) ListOORPackageCheckpoints ¶
func (*Queries) ListOORPackages ¶
func (q *Queries) ListOORPackages(ctx context.Context) ([]OorPackage, error)
func (*Queries) ListOORPackagesByDirection ¶
func (*Queries) ListOORRecipientCursors ¶
func (q *Queries) ListOORRecipientCursors(ctx context.Context) ([]OorRecipientCursor, error)
func (*Queries) ListOORVTXOBindingsBySession ¶
func (*Queries) ListOwnedReceiveScripts ¶
func (q *Queries) ListOwnedReceiveScripts(ctx context.Context) ([]OwnedReceiveScript, error)
func (*Queries) ListPendingBoardIntents ¶
func (q *Queries) ListPendingBoardIntents(ctx context.Context) ([]ListPendingBoardIntentsRow, error)
Only status = 'pending' rows replay; a 'failed' intent is terminally retired and must not be re-submitted on restart.
func (*Queries) ListPendingBoardingSweepInputs ¶
func (q *Queries) ListPendingBoardingSweepInputs(ctx context.Context) ([]BoardingSweepInput, error)
func (*Queries) ListPendingBoardingSweeps ¶
func (q *Queries) ListPendingBoardingSweeps(ctx context.Context) ([]BoardingSweep, error)
func (*Queries) ListPendingIntentAnchorsByKind ¶
func (*Queries) ListPendingSendIntents ¶
func (q *Queries) ListPendingSendIntents(ctx context.Context) ([]ListPendingSendIntentsRow, error)
Only status = 'pending' rows replay; a 'failed' intent is terminally retired and must not be re-submitted on restart.
func (*Queries) ListRecoverableVTXOs ¶
ListRecoverableVTXOs returns every VTXO whose actor must be restored at startup: the non-terminal set of ListLiveVTXOs plus Expired (8).
Expired is deliberately absent from ListLiveVTXOs, which feeds spendable balance and refresh estimation, because an expired VTXO holds no spendable value until it has been reissued. Its actor still has to exist though: the value is recoverable by forfeiting the VTXO in an ordinary round, and the actor is what holds the descriptor and signing material that forfeit needs.
func (*Queries) ListRoundsByStatus ¶
func (*Queries) ListRoundsPaginated ¶
func (q *Queries) ListRoundsPaginated(ctx context.Context, arg ListRoundsPaginatedParams) ([]Round, error)
ListRoundsPaginated returns rounds ordered by round_id with cursor- based pagination. When cursor is empty, returns from the beginning.
func (*Queries) ListSpendingReservationOutpoints ¶
func (q *Queries) ListSpendingReservationOutpoints(ctx context.Context) ([]ListSpendingReservationOutpointsRow, error)
ListSpendingReservationOutpoints returns every reserved outpoint. Used by the startup sweep to build the set of live reservations.
func (*Queries) ListTransactionHistory ¶
func (q *Queries) ListTransactionHistory(ctx context.Context, arg ListTransactionHistoryParams) ([]ListTransactionHistoryRow, error)
ListTransactionHistory returns a unified newest-first history from the client-side ledger and tracked boarding sweep transactions. Filters are applied before LIMIT/OFFSET so filtered pagination never skips over matching rows hidden behind non-matching entries.
func (*Queries) ListUnspentVTXOAncestryPaths ¶
func (q *Queries) ListUnspentVTXOAncestryPaths(ctx context.Context) ([]VtxoAncestryPath, error)
ListUnspentVTXOAncestryPaths returns every ancestry row whose parent VTXO is unspent (status != 4 AND spent = FALSE), mirroring the filter on ListUnspentVTXOs. Companion to the round-side ListVTXOs path.
func (*Queries) ListUnspentVTXOs ¶
Unspent requires both spent=false and status!=Spent(4).
func (*Queries) ListVHTLCRecoveryJobs ¶
func (q *Queries) ListVHTLCRecoveryJobs(ctx context.Context) ([]VhtlcRecoveryJob, error)
func (*Queries) ListVHTLCRecoveryJobsBySwapAction ¶
func (q *Queries) ListVHTLCRecoveryJobsBySwapAction(ctx context.Context, arg ListVHTLCRecoveryJobsBySwapActionParams) ([]VhtlcRecoveryJob, error)
func (*Queries) ListVTXOAncestryPaths ¶
func (q *Queries) ListVTXOAncestryPaths(ctx context.Context, arg ListVTXOAncestryPathsParams) ([]VtxoAncestryPath, error)
ListVTXOAncestryPaths returns the ancestry rows for one VTXO ordered by path_order so the unroller sees the fragments in the same sequence the indexer chose at materialization time.
func (*Queries) ListVTXOAncestryPathsByStatus ¶
func (q *Queries) ListVTXOAncestryPathsByStatus(ctx context.Context, status int32) ([]VtxoAncestryPath, error)
ListVTXOAncestryPathsByStatus returns every ancestry row whose parent VTXO matches the given status code. Companion to ListVTXOsByStatus.
func (*Queries) ListVTXOSelectionCandidatesByStatus ¶
func (q *Queries) ListVTXOSelectionCandidatesByStatus(ctx context.Context, status int32) ([]ListVTXOSelectionCandidatesByStatusRow, error)
ListVTXOSelectionCandidatesByStatus returns the lightweight projection coin selection runs on: outpoint, amount, and pkScript. Selection happens on every payment and only needs these three fields, so this avoids decoding full descriptors (pubkey parsing, taproot script reconstruction, policy template decode) and the batched ancestry-path query on the hot path.
func (*Queries) ListVTXOsByRound ¶
func (*Queries) ListVTXOsByStatus ¶
func (q *Queries) ListVTXOsByStatus(ctx context.Context, status int32) ([]ListVTXOsByStatusRow, error)
VTXO status and lifecycle queries. These queries support the vtxo.VTXOStore interface for VTXO lifecycle management, including status transitions and forfeit transaction tracking. ListVTXOsByStatus returns all VTXOs with the specified status. It also LEFT JOINs the round that forfeited each VTXO (via forfeit_round_id) so a FORFEITED VTXO can surface the settling commitment txid and its confirmation height. The join columns are NULL for every VTXO whose forfeit round is unknown (all non-forfeited VTXOs, and forfeited ones whose round row is absent), so consumers must treat them as optional.
settlement_fee_sat is the TOTAL operator fee the client's ledger booked for the forfeit round (boarding_fee_paid + refresh_fee_paid, joined via the round_uuid TEXT mirror of the ledger's BLOB round_id). Every VTXO forfeited in the same round reports the same round-level figure — consumers must not sum it across VTXOs. Zero when the forfeit round is unknown or its fee rows are absent (e.g. rows written before the round_uuid backfill ran).
The fee lookup is a correlated scalar subquery rather than a grouped join: the planner then resolves it as a per-row probe of the idx_client_ledger_round_uuid index for the (few) forfeited rows that carry a forfeit_round_id, instead of aggregating every fee row in the ledger on every call.
func (*Queries) ListWalletUTXOLog ¶
func (q *Queries) ListWalletUTXOLog(ctx context.Context, arg ListWalletUTXOLogParams) ([]WalletUtxoLog, error)
func (*Queries) ListWalletUTXOLogByBlock ¶
func (*Queries) ListWalletUTXOLogByClassification ¶
func (q *Queries) ListWalletUTXOLogByClassification(ctx context.Context, arg ListWalletUTXOLogByClassificationParams) ([]WalletUtxoLog, error)
func (*Queries) LookupActiveCreditOperationByKey ¶
func (q *Queries) LookupActiveCreditOperationByKey(ctx context.Context, opKey string) (CreditOperation, error)
Status 2 = Failed (anchored to Go iota in db/credit_operation_store.go CreditOpStatus). Failed operations never dedup a keyed retry, so the lookup skips them: only a pending or completed operation answers for an op_key.
func (*Queries) LookupActiveOORSessionRegistryByIdempotencyKey ¶
func (q *Queries) LookupActiveOORSessionRegistryByIdempotencyKey(ctx context.Context, idempotencyKey sql.NullString) (OorSessionRegistry, error)
Status 2 = Failed (anchored to Go iota in db/oor_session_registry_store.go OORSessionStatus). Failed sessions never dedup a keyed retry, so the lookup skips them: only a pending or completed session answers for an idempotency key.
func (*Queries) MarkBoardingSweepInputSpentByOutpoint ¶
func (*Queries) MarkBoardingSweepInputStatus ¶
func (q *Queries) MarkBoardingSweepInputStatus(ctx context.Context, arg MarkBoardingSweepInputStatusParams) error
func (*Queries) MarkBoardingSweepInputsStatus ¶
func (q *Queries) MarkBoardingSweepInputsStatus(ctx context.Context, arg MarkBoardingSweepInputsStatusParams) error
func (*Queries) MarkBoardingSweepStatus ¶
func (q *Queries) MarkBoardingSweepStatus(ctx context.Context, arg MarkBoardingSweepStatusParams) error
func (*Queries) MarkPendingSendIntentFailedByOutpoint ¶
func (q *Queries) MarkPendingSendIntentFailedByOutpoint(ctx context.Context, arg MarkPendingSendIntentFailedByOutpointParams) error
Terminally fail the pending send intent anchored to the given outpoint, recording the reason and typed failure code. Idempotent: the status guard makes a repeat call (e.g. a second forfeit outpoint of the same intent) a no-op. Anchors are intentionally retained so the activity projection can still correlate the failed job by its consumed outpoint.
func (*Queries) MarkUnilateralExitJobTerminal ¶
func (q *Queries) MarkUnilateralExitJobTerminal(ctx context.Context, arg MarkUnilateralExitJobTerminalParams) error
func (*Queries) MarkVHTLCRecoveryExitTxBroadcast ¶
func (q *Queries) MarkVHTLCRecoveryExitTxBroadcast(ctx context.Context, arg MarkVHTLCRecoveryExitTxBroadcastParams) error
func (*Queries) MarkVHTLCRecoveryExitTxBuilt ¶
func (q *Queries) MarkVHTLCRecoveryExitTxBuilt(ctx context.Context, arg MarkVHTLCRecoveryExitTxBuiltParams) error
func (*Queries) MarkVHTLCRecoveryExitTxSubmitting ¶
func (q *Queries) MarkVHTLCRecoveryExitTxSubmitting(ctx context.Context, arg MarkVHTLCRecoveryExitTxSubmittingParams) error
func (*Queries) MarkVHTLCRecoveryTargetDetected ¶
func (q *Queries) MarkVHTLCRecoveryTargetDetected(ctx context.Context, arg MarkVHTLCRecoveryTargetDetectedParams) error
Intermediate states waiting_for_target and building_exit_spend are written by the execution-layer PR. This storage slice accepts them as source states so replay can resume from each durable pipeline boundary once those writes exist.
func (*Queries) MarkVTXOForfeited ¶
func (q *Queries) MarkVTXOForfeited(ctx context.Context, arg MarkVTXOForfeitedParams) error
MarkVTXOForfeited marks a VTXO as forfeited and records the forfeit transaction ID and replacement VTXO outpoint. Called when the new round's commitment transaction confirms.
func (*Queries) MarkVTXOForfeiting ¶
func (q *Queries) MarkVTXOForfeiting(ctx context.Context, arg MarkVTXOForfeitingParams) error
MarkVTXOForfeiting transitions a VTXO to Forfeiting status and persists the forfeit round ID and transaction for crash recovery. Called when entering the forfeit flow.
func (*Queries) MarkVTXOSpent ¶
func (q *Queries) MarkVTXOSpent(ctx context.Context, arg MarkVTXOSpentParams) error
Also sets status = 4 (Spent) to keep status in sync with spent flag.
func (*Queries) PullActivityEvents ¶
func (q *Queries) PullActivityEvents(ctx context.Context, arg PullActivityEventsParams) ([]ActivityEvent, error)
PullActivityEvents returns transition rows strictly after the cursor in event_seq order, the resumable-subscribe replay primitive.
func (*Queries) SumBoardingIntentAmountsByStatus ¶
func (*Queries) SumUnspentVTXOAmounts ¶
func (*Queries) UpdateBoardingIntentStatus ¶
func (q *Queries) UpdateBoardingIntentStatus(ctx context.Context, arg UpdateBoardingIntentStatusParams) error
func (*Queries) UpdateRoundBoardingIntentSignature ¶
func (q *Queries) UpdateRoundBoardingIntentSignature(ctx context.Context, arg UpdateRoundBoardingIntentSignatureParams) error
func (*Queries) UpdateRoundStatus ¶
func (q *Queries) UpdateRoundStatus(ctx context.Context, arg UpdateRoundStatusParams) error
func (*Queries) UpdateVTXOStatus ¶
func (q *Queries) UpdateVTXOStatus(ctx context.Context, arg UpdateVTXOStatusParams) error
UpdateVTXOStatus atomically updates a VTXO's status. This is the primary method for state transitions that don't require additional data.
func (*Queries) UpsertActivityEntry ¶
func (q *Queries) UpsertActivityEntry(ctx context.Context, arg UpsertActivityEntryParams) (int64, error)
Canonical activity log queries. activity_entries is the current-state projection read by List; activity_events is the append-only transition log read by a resumable SubscribeWallet. See docs/canonical_activity_log_design.md. UpsertActivityEntry inserts the activity row or advances it in place. On conflict the mutable lifecycle columns are overwritten with the new projection and updated_at_unix is bumped, but created_at_unix is preserved so the row keeps its position in the created-ordered feed. The settlement and correlation handles are COALESCEd so an early projection that does not yet know a txid never clobbers one a later projection already recorded.
func (*Queries) UpsertChainInfo ¶
func (q *Queries) UpsertChainInfo(ctx context.Context, arg UpsertChainInfoParams) error
func (*Queries) UpsertCreditOperation ¶
func (q *Queries) UpsertCreditOperation(ctx context.Context, arg UpsertCreditOperationParams) error
Credit operations control-plane queries.
func (*Queries) UpsertInternalKey ¶
func (q *Queries) UpsertInternalKey(ctx context.Context, arg UpsertInternalKeyParams) (int64, error)
Internal key registry queries. Register an internal key and return the stored row's id in a single round-trip on both backends. ON CONFLICT (pubkey, key_family, key_index) makes re-registration of an already-known triple idempotent; the no-op DO UPDATE (rather than DO NOTHING) is required so RETURNING still fires on conflict and the caller gets the existing id, closing the read-then-insert race a separate re-select would leave open.
func (*Queries) UpsertOORPackage ¶
OOR artifact store queries.
func (*Queries) UpsertOORRecipientCursor ¶
func (q *Queries) UpsertOORRecipientCursor(ctx context.Context, arg UpsertOORRecipientCursorParams) error
func (*Queries) UpsertOORSessionRegistry ¶
func (q *Queries) UpsertOORSessionRegistry(ctx context.Context, arg UpsertOORSessionRegistryParams) error
OOR session registry control-plane queries.
func (*Queries) UpsertOORVTXOBinding ¶
func (*Queries) UpsertOwnedReceiveScript ¶
func (q *Queries) UpsertOwnedReceiveScript(ctx context.Context, arg UpsertOwnedReceiveScriptParams) error
func (*Queries) UpsertPendingBoardIntent ¶
func (q *Queries) UpsertPendingBoardIntent(ctx context.Context, arg UpsertPendingBoardIntentParams) error
func (*Queries) UpsertPendingIntentAnchor ¶
func (q *Queries) UpsertPendingIntentAnchor(ctx context.Context, arg UpsertPendingIntentAnchorParams) error
func (*Queries) UpsertPendingIntentHeader ¶
func (q *Queries) UpsertPendingIntentHeader(ctx context.Context, arg UpsertPendingIntentHeaderParams) error
Re-arm a re-persisted intent as pending. NewPendingIntentID is deterministic, so retrying a terminally failed send (same inputs and payload) reuses the same intent_id and lands here on the retained 'failed' row. Resetting the status and failure fields makes the retry replayable again; without it the replay query (which now skips non-pending rows) would silently drop a retry that crashes before the round adopts it.
func (*Queries) UpsertPendingSendIntent ¶
func (q *Queries) UpsertPendingSendIntent(ctx context.Context, arg UpsertPendingSendIntentParams) error
func (*Queries) UpsertSpendingReservation ¶
func (q *Queries) UpsertSpendingReservation(ctx context.Context, arg UpsertSpendingReservationParams) error
Spending reservation queries. These queries maintain a durable index of VTXO outpoints reserved by an active spend owner (e.g. an outgoing OOR session) so a startup sweep can release orphaned Spending VTXOs that have no live reservation. UpsertSpendingReservation records (or refreshes) the reservation for one outpoint. The owner fields are updated on conflict so a re-checkpointed session re-binds the same outpoint to its current owner.
func (*Queries) UpsertUnilateralExitJob ¶
func (q *Queries) UpsertUnilateralExitJob(ctx context.Context, arg UpsertUnilateralExitJobParams) error
Unilateral-exit job control-plane queries.
type RoundBoardingIntent ¶
type RoundClientTree ¶
type RoundStatus ¶
type RoundVtxoRequest ¶
type SpendingReservation ¶
type UnilateralExitJob ¶
type UpdateRoundStatusParams ¶
type UpdateVTXOStatusParams ¶
type UpsertActivityEntryParams ¶
type UpsertActivityEntryParams struct {
CanonicalID string
Kind int64
Status int64
AmountSat int64
FeeSat int64
Counterparty string
Note string
Phase int64
PhaseLabel string
FailureCode int64
FailureReason string
PaymentHash []byte
Txid []byte
ConfirmationHeight sql.NullInt64
VtxoOutpoint string
SwapSessionID []byte
LedgerTxid []byte
BoardingAddr []byte
RequestJson string
CreatedAtUnix int64
UpdatedAtUnix int64
PendingStatus int64
}
type UpsertChainInfoParams ¶
type UpsertCreditOperationParams ¶
type UpsertCreditOperationParams struct {
OpID string
OpKey string
Kind int32
State string
Status int32
ServerOpID sql.NullString
PaymentHash []byte
DestinationPubkey []byte
OorSessionID sql.NullString
Invoice sql.NullString
AmountSat int64
TopupSat int64
MaxCreditSat int64
MaxFeeSat int64
LastError sql.NullString
SnapshotData []byte
SnapshotVersion int32
CreatedAt int64
UpdatedAt int64
}
type UpsertInternalKeyParams ¶
type UpsertOORPackageParams ¶
type UtxoClassification ¶
type UtxoClassification struct {
Classification string
}
type VhtlcRecoveryJob ¶
type VhtlcRecoveryJob struct {
ID string
RequestID string
SwapID []byte
Direction string
Action string
State string
VtxoTxid []byte
VtxoVout int32
VtxoAmountSat int64
SenderPubkey []byte
ReceiverPubkey []byte
ServerPubkey []byte
RefundLocktime int32
UnilateralClaimDelay int32
UnilateralRefundDelay int32
UnilateralRefundWithoutReceiverDelay int32
PreimageHash []byte
ClaimPreimage []byte
SignerKeyFamily int32
SignerKeyIndex int32
DestinationScript []byte
MaxFeeRateSatPerKw int32
UnrollTargetOutpointHash []byte
UnrollTargetOutpointIndex sql.NullInt32
ExitPolicyKind string
ExitTx []byte
ExitTxid []byte
CooperativeTxid []byte
LastError sql.NullString
CancelReason sql.NullString
CreatedAt int64
UpdatedAt int64
ArmedAt sql.NullInt64
EscalatedAt sql.NullInt64
TargetDetectedAt sql.NullInt64
ExitTxBuiltAt sql.NullInt64
ExitTxBroadcastAt sql.NullInt64
TerminalAt sql.NullInt64
}
type Vtxo ¶
type Vtxo struct {
OutpointHash []byte
OutpointIndex int32
RoundID string
Amount int64
PkScript []byte
Expiry int32
PolicyTemplate []byte
ClientKeyID sql.NullInt64
OperatorPubkey []byte
BatchExpiry int32
CreatedHeight int32
CommitmentTxid []byte
Spent bool
Status int32
ForfeitRoundID sql.NullString
ForfeitTx []byte
ForfeitTxid []byte
ReplacedByHash []byte
ReplacedByIndex sql.NullInt32
CreationTime int64
LastUpdateTime int64
ChainDepth int32
ConstructionVersion int32
}
type VtxoAncestryPath ¶
Source Files
¶
- activity_log.sql.go
- boarding.sql.go
- chain_info.sql.go
- credit_operations.sql.go
- db.go
- db_custom.go
- fee_accounting.sql.go
- internal_keys.sql.go
- macaroons.sql.go
- models.go
- oor_artifacts.sql.go
- oor_session_registry.sql.go
- pending_intents.sql.go
- querier.go
- round.sql.go
- spending_reservations.sql.go
- unilateral_exit.sql.go
- utxo_audit.sql.go
- vhtlc_recovery_jobs.sql.go
- vtxo.sql.go