{"modulePath":"github.com/lightninglabs/loop","version":"v0.36.0-beta","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sqlc\n\n## Types\n\n```go\ntype AllDepositsRow struct {\n\tID                    int32\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tAmount                int64\n\tConfirmationHeight    int64\n\tTimeoutSweepPkScript  []byte\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n\tSwapHash              []byte\n\tOnchainCost           int64\n\tOnchainCostKnown      sql.NullBool\n\tStaticAddressID       sql.NullInt32\n\tClientPubkey          []byte\n\tServerPubkey          []byte\n\tExpiry                sql.NullInt32\n\tClientKeyFamily       sql.NullInt32\n\tClientKeyIndex        sql.NullInt32\n\tPkscript              []byte\n\tProtocolVersion       sql.NullInt32\n\tInitiationHeight      sql.NullInt32\n}\n```\n\n```go\ntype CreateDepositParams struct {\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tAmount                int64\n\tConfirmationHeight    int64\n\tTimeoutSweepPkScript  []byte\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n\tOnchainCost           int64\n\tOnchainCostKnown      sql.NullBool\n\tStaticAddressID       sql.NullInt32\n}\n```\n\n```go\ntype CreateReservationParams struct {\n\tReservationID    []byte\n\tClientPubkey     []byte\n\tServerPubkey     []byte\n\tExpiry           int32\n\tValue            int64\n\tClientKeyFamily  int32\n\tClientKeyIndex   int32\n\tInitiationHeight int32\n\tProtocolVersion  int32\n}\n```\n\n```go\ntype CreateStaticAddressParams struct {\n\tClientPubkey     []byte\n\tServerPubkey     []byte\n\tExpiry           int32\n\tClientKeyFamily  int32\n\tClientKeyIndex   int32\n\tPkscript         []byte\n\tProtocolVersion  int32\n\tInitiationHeight int32\n}\n```\n\n```go\ntype CreateWithdrawalDepositParams struct {\n\tWithdrawalID []byte\n\tDepositID    []byte\n}\n```\n\n```go\ntype CreateWithdrawalParams struct {\n\tWithdrawalID       []byte\n\tTotalDepositAmount int64\n\tInitiationTime     time.Time\n}\n```\n\n```go\ntype DBTX interface {\n\tExecContext(context.Context, string, ...interface{}) (sql.Result, error)\n\tPrepareContext(context.Context, string) (*sql.Stmt, error)\n\tQueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)\n\tQueryRowContext(context.Context, string, ...interface{}) *sql.Row\n}\n```\n\n```go\ntype Deposit struct {\n\tID                    int32\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tAmount                int64\n\tConfirmationHeight    int64\n\tTimeoutSweepPkScript  []byte\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n\tSwapHash              []byte\n\tOnchainCost           int64\n\tOnchainCostKnown      sql.NullBool\n\tStaticAddressID       sql.NullInt32\n}\n```\n\n```go\ntype DepositForOutpointParams struct {\n\tTxHash   []byte\n\tOutIndex int32\n}\n```\n\n```go\ntype DepositForOutpointRow struct {\n\tID                    int32\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tAmount                int64\n\tConfirmationHeight    int64\n\tTimeoutSweepPkScript  []byte\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n\tSwapHash              []byte\n\tOnchainCost           int64\n\tOnchainCostKnown      sql.NullBool\n\tStaticAddressID       sql.NullInt32\n\tClientPubkey          []byte\n\tServerPubkey          []byte\n\tExpiry                sql.NullInt32\n\tClientKeyFamily       sql.NullInt32\n\tClientKeyIndex        sql.NullInt32\n\tPkscript              []byte\n\tProtocolVersion       sql.NullInt32\n\tInitiationHeight      sql.NullInt32\n}\n```\n\n```go\ntype DepositUpdate struct {\n\tID              int32\n\tDepositID       []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype DepositsForSwapHashRow struct {\n\tID                    int32\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tAmount                int64\n\tConfirmationHeight    int64\n\tTimeoutSweepPkScript  []byte\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n\tSwapHash              []byte\n\tOnchainCost           int64\n\tOnchainCostKnown      sql.NullBool\n\tStaticAddressID       sql.NullInt32\n\tClientPubkey          []byte\n\tServerPubkey          []byte\n\tExpiry                sql.NullInt32\n\tClientKeyFamily       sql.NullInt32\n\tClientKeyIndex        sql.NullInt32\n\tPkscript              []byte\n\tProtocolVersion       sql.NullInt32\n\tInitiationHeight      sql.NullInt32\n\tUpdateState           sql.NullString\n\tUpdateTimestamp       sql.NullTime\n}\n```\n\n```go\ntype GetDepositRow struct {\n\tID                    int32\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tAmount                int64\n\tConfirmationHeight    int64\n\tTimeoutSweepPkScript  []byte\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n\tSwapHash              []byte\n\tOnchainCost           int64\n\tOnchainCostKnown      sql.NullBool\n\tStaticAddressID       sql.NullInt32\n\tClientPubkey          []byte\n\tServerPubkey          []byte\n\tExpiry                sql.NullInt32\n\tClientKeyFamily       sql.NullInt32\n\tClientKeyIndex        sql.NullInt32\n\tPkscript              []byte\n\tProtocolVersion       sql.NullInt32\n\tInitiationHeight      sql.NullInt32\n}\n```\n\n```go\ntype GetInstantOutSwapRow struct {\n\tID                        int32\n\tSwapHash                  []byte\n\tPreimage                  []byte\n\tInitiationTime            time.Time\n\tAmountRequested           int64\n\tCltvExpiry                int32\n\tMaxMinerFee               int64\n\tMaxSwapFee                int64\n\tInitiationHeight          int32\n\tProtocolVersion           int32\n\tLabel                     string\n\tSwapHash_2                []byte\n\tPreimage_2                []byte\n\tSweepAddress              string\n\tOutgoingChanSet           string\n\tHtlcFeeRate               int64\n\tReservationIds            []byte\n\tSwapInvoice               string\n\tFinalizedHtlcTx           []byte\n\tSweepTxHash               []byte\n\tFinalizedSweeplessSweepTx []byte\n\tSweepConfirmationHeight   sql.NullInt32\n\tSwapHash_3                []byte\n\tSenderScriptPubkey        []byte\n\tReceiverScriptPubkey      []byte\n\tSenderInternalPubkey      []byte\n\tReceiverInternalPubkey    []byte\n\tClientKeyFamily           int32\n\tClientKeyIndex            int32\n}\n```\n\n```go\ntype GetInstantOutSwapsRow struct {\n\tID                        int32\n\tSwapHash                  []byte\n\tPreimage                  []byte\n\tInitiationTime            time.Time\n\tAmountRequested           int64\n\tCltvExpiry                int32\n\tMaxMinerFee               int64\n\tMaxSwapFee                int64\n\tInitiationHeight          int32\n\tProtocolVersion           int32\n\tLabel                     string\n\tSwapHash_2                []byte\n\tPreimage_2                []byte\n\tSweepAddress              string\n\tOutgoingChanSet           string\n\tHtlcFeeRate               int64\n\tReservationIds            []byte\n\tSwapInvoice               string\n\tFinalizedHtlcTx           []byte\n\tSweepTxHash               []byte\n\tFinalizedSweeplessSweepTx []byte\n\tSweepConfirmationHeight   sql.NullInt32\n\tSwapHash_3                []byte\n\tSenderScriptPubkey        []byte\n\tReceiverScriptPubkey      []byte\n\tSenderInternalPubkey      []byte\n\tReceiverInternalPubkey    []byte\n\tClientKeyFamily           int32\n\tClientKeyIndex            int32\n}\n```\n\n```go\ntype GetLoopInSwapRow struct {\n\tID                     int32\n\tSwapHash               []byte\n\tPreimage               []byte\n\tInitiationTime         time.Time\n\tAmountRequested        int64\n\tCltvExpiry             int32\n\tMaxMinerFee            int64\n\tMaxSwapFee             int64\n\tInitiationHeight       int32\n\tProtocolVersion        int32\n\tLabel                  string\n\tSwapHash_2             []byte\n\tHtlcConfTarget         int32\n\tLastHop                []byte\n\tExternalHtlc           bool\n\tSwapHash_3             []byte\n\tSenderScriptPubkey     []byte\n\tReceiverScriptPubkey   []byte\n\tSenderInternalPubkey   []byte\n\tReceiverInternalPubkey []byte\n\tClientKeyFamily        int32\n\tClientKeyIndex         int32\n}\n```\n\n```go\ntype GetLoopInSwapsRow struct {\n\tID                     int32\n\tSwapHash               []byte\n\tPreimage               []byte\n\tInitiationTime         time.Time\n\tAmountRequested        int64\n\tCltvExpiry             int32\n\tMaxMinerFee            int64\n\tMaxSwapFee             int64\n\tInitiationHeight       int32\n\tProtocolVersion        int32\n\tLabel                  string\n\tSwapHash_2             []byte\n\tHtlcConfTarget         int32\n\tLastHop                []byte\n\tExternalHtlc           bool\n\tSwapHash_3             []byte\n\tSenderScriptPubkey     []byte\n\tReceiverScriptPubkey   []byte\n\tSenderInternalPubkey   []byte\n\tReceiverInternalPubkey []byte\n\tClientKeyFamily        int32\n\tClientKeyIndex         int32\n}\n```\n\n```go\ntype GetLoopOutSwapRow struct {\n\tID                     int32\n\tSwapHash               []byte\n\tPreimage               []byte\n\tInitiationTime         time.Time\n\tAmountRequested        int64\n\tCltvExpiry             int32\n\tMaxMinerFee            int64\n\tMaxSwapFee             int64\n\tInitiationHeight       int32\n\tProtocolVersion        int32\n\tLabel                  string\n\tSwapHash_2             []byte\n\tDestAddress            string\n\tSwapInvoice            string\n\tMaxSwapRoutingFee      int64\n\tSweepConfTarget        int32\n\tHtlcConfirmations      int32\n\tOutgoingChanSet        string\n\tPrepayInvoice          string\n\tMaxPrepayRoutingFee    int64\n\tPublicationDeadline    time.Time\n\tSingleSweep            bool\n\tPaymentTimeout         int32\n\tPaymentAddress         []byte\n\tSwapHash_3             []byte\n\tSenderScriptPubkey     []byte\n\tReceiverScriptPubkey   []byte\n\tSenderInternalPubkey   []byte\n\tReceiverInternalPubkey []byte\n\tClientKeyFamily        int32\n\tClientKeyIndex         int32\n\tSwapHash_4             []byte\n\tAssetID                []byte\n\tSwapRfqID              []byte\n\tPrepayRfqID            []byte\n\tAssetAmtPaidSwap       sql.NullInt64\n\tAssetAmtPaidPrepay     sql.NullInt64\n}\n```\n\n```go\ntype GetLoopOutSwapsRow struct {\n\tID                     int32\n\tSwapHash               []byte\n\tPreimage               []byte\n\tInitiationTime         time.Time\n\tAmountRequested        int64\n\tCltvExpiry             int32\n\tMaxMinerFee            int64\n\tMaxSwapFee             int64\n\tInitiationHeight       int32\n\tProtocolVersion        int32\n\tLabel                  string\n\tSwapHash_2             []byte\n\tDestAddress            string\n\tSwapInvoice            string\n\tMaxSwapRoutingFee      int64\n\tSweepConfTarget        int32\n\tHtlcConfirmations      int32\n\tOutgoingChanSet        string\n\tPrepayInvoice          string\n\tMaxPrepayRoutingFee    int64\n\tPublicationDeadline    time.Time\n\tSingleSweep            bool\n\tPaymentTimeout         int32\n\tPaymentAddress         []byte\n\tSwapHash_3             []byte\n\tSenderScriptPubkey     []byte\n\tReceiverScriptPubkey   []byte\n\tSenderInternalPubkey   []byte\n\tReceiverInternalPubkey []byte\n\tClientKeyFamily        int32\n\tClientKeyIndex         int32\n\tSwapHash_4             []byte\n\tAssetID                []byte\n\tSwapRfqID              []byte\n\tPrepayRfqID            []byte\n\tAssetAmtPaidSwap       sql.NullInt64\n\tAssetAmtPaidPrepay     sql.NullInt64\n}\n```\n\n```go\ntype GetPaidStaticAddressLoopInClaimsRow struct {\n\tSwapID           int32\n\tSwapHash         []byte\n\tDepositOutpoints string\n\tUpdateState      string\n}\n```\n\n```go\ntype GetStaticAddressLoopInSwapRow struct {\n\tID                           int32\n\tSwapHash                     []byte\n\tPreimage                     []byte\n\tInitiationTime               time.Time\n\tAmountRequested              int64\n\tCltvExpiry                   int32\n\tMaxMinerFee                  int64\n\tMaxSwapFee                   int64\n\tInitiationHeight             int32\n\tProtocolVersion              int32\n\tLabel                        string\n\tID_2                         int32\n\tSwapHash_2                   []byte\n\tSwapInvoice                  string\n\tLastHop                      []byte\n\tPaymentTimeoutSeconds        int32\n\tQuotedSwapFeeSatoshis        int64\n\tDepositOutpoints             string\n\tHtlcTxFeeRateSatKw           int64\n\tHtlcTimeoutSweepTxID         sql.NullString\n\tHtlcTimeoutSweepAddress      string\n\tSelectedAmount               int64\n\tFast                         bool\n\tConfirmationRiskDecision     string\n\tConfirmationRiskDecisionTime sql.NullTime\n\tChangeStaticAddressID        sql.NullInt32\n\tFundingTxs                   []byte\n\tSwapHash_3                   []byte\n\tSenderScriptPubkey           []byte\n\tReceiverScriptPubkey         []byte\n\tSenderInternalPubkey         []byte\n\tReceiverInternalPubkey       []byte\n\tClientKeyFamily              int32\n\tClientKeyIndex               int32\n\tChangeClientPubkey           []byte\n\tChangeServerPubkey           []byte\n\tChangeExpiry                 sql.NullInt32\n\tChangeClientKeyFamily        sql.NullInt32\n\tChangeClientKeyIndex         sql.NullInt32\n\tChangePkscript               []byte\n\tChangeProtocolVersion        sql.NullInt32\n\tChangeInitiationHeight       sql.NullInt32\n}\n```\n\n```go\ntype GetStaticAddressLoopInSwapsByStatesRow struct {\n\tID                           int32\n\tSwapHash                     []byte\n\tPreimage                     []byte\n\tInitiationTime               time.Time\n\tAmountRequested              int64\n\tCltvExpiry                   int32\n\tMaxMinerFee                  int64\n\tMaxSwapFee                   int64\n\tInitiationHeight             int32\n\tProtocolVersion              int32\n\tLabel                        string\n\tID_2                         int32\n\tSwapHash_2                   []byte\n\tSwapInvoice                  string\n\tLastHop                      []byte\n\tPaymentTimeoutSeconds        int32\n\tQuotedSwapFeeSatoshis        int64\n\tDepositOutpoints             string\n\tHtlcTxFeeRateSatKw           int64\n\tHtlcTimeoutSweepTxID         sql.NullString\n\tHtlcTimeoutSweepAddress      string\n\tSelectedAmount               int64\n\tFast                         bool\n\tConfirmationRiskDecision     string\n\tConfirmationRiskDecisionTime sql.NullTime\n\tChangeStaticAddressID        sql.NullInt32\n\tFundingTxs                   []byte\n\tSwapHash_3                   []byte\n\tSenderScriptPubkey           []byte\n\tReceiverScriptPubkey         []byte\n\tSenderInternalPubkey         []byte\n\tReceiverInternalPubkey       []byte\n\tClientKeyFamily              int32\n\tClientKeyIndex               int32\n\tChangeClientPubkey           []byte\n\tChangeServerPubkey           []byte\n\tChangeExpiry                 sql.NullInt32\n\tChangeClientKeyFamily        sql.NullInt32\n\tChangeClientKeyIndex         sql.NullInt32\n\tChangePkscript               []byte\n\tChangeProtocolVersion        sql.NullInt32\n\tChangeInitiationHeight       sql.NullInt32\n}\n```\n\n```go\ntype HtlcKey struct {\n\tSwapHash               []byte\n\tSenderScriptPubkey     []byte\n\tReceiverScriptPubkey   []byte\n\tSenderInternalPubkey   []byte\n\tReceiverInternalPubkey []byte\n\tClientKeyFamily        int32\n\tClientKeyIndex         int32\n}\n```\n\n```go\ntype InsertBatchParams struct {\n\tConfirmed          bool\n\tBatchTxID          sql.NullString\n\tBatchPkScript      []byte\n\tLastRbfHeight      sql.NullInt32\n\tLastRbfSatPerKw    sql.NullInt32\n\tMaxTimeoutDistance int32\n}\n```\n\n```go\ntype InsertDepositUpdateParams struct {\n\tDepositID       []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype InsertHtlcKeysParams struct {\n\tSwapHash               []byte\n\tSenderScriptPubkey     []byte\n\tReceiverScriptPubkey   []byte\n\tSenderInternalPubkey   []byte\n\tReceiverInternalPubkey []byte\n\tClientKeyFamily        int32\n\tClientKeyIndex         int32\n}\n```\n\n```go\ntype InsertInstantOutParams struct {\n\tSwapHash        []byte\n\tPreimage        []byte\n\tSweepAddress    string\n\tOutgoingChanSet string\n\tHtlcFeeRate     int64\n\tReservationIds  []byte\n\tSwapInvoice     string\n}\n```\n\n```go\ntype InsertInstantOutUpdateParams struct {\n\tSwapHash        []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype InsertLoopInParams struct {\n\tSwapHash       []byte\n\tHtlcConfTarget int32\n\tLastHop        []byte\n\tExternalHtlc   bool\n}\n```\n\n```go\ntype InsertLoopOutAssetParams struct {\n\tSwapHash    []byte\n\tAssetID     []byte\n\tSwapRfqID   []byte\n\tPrepayRfqID []byte\n}\n```\n\n```go\ntype InsertLoopOutParams struct {\n\tSwapHash            []byte\n\tDestAddress         string\n\tSwapInvoice         string\n\tMaxSwapRoutingFee   int64\n\tSweepConfTarget     int32\n\tHtlcConfirmations   int32\n\tOutgoingChanSet     string\n\tPrepayInvoice       string\n\tMaxPrepayRoutingFee int64\n\tPublicationDeadline time.Time\n\tSingleSweep         bool\n\tPaymentTimeout      int32\n\tPaymentAddress      []byte\n}\n```\n\n```go\ntype InsertMigrationParams struct {\n\tMigrationID string\n\tMigrationTs sql.NullTime\n}\n```\n\n```go\ntype InsertReservationUpdateParams struct {\n\tReservationID   []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype InsertStaticAddressLoopInParams struct {\n\tSwapHash                []byte\n\tSwapInvoice             string\n\tLastHop                 []byte\n\tPaymentTimeoutSeconds   int32\n\tQuotedSwapFeeSatoshis   int64\n\tDepositOutpoints        string\n\tSelectedAmount          int64\n\tHtlcTxFeeRateSatKw      int64\n\tHtlcTimeoutSweepTxID    sql.NullString\n\tHtlcTimeoutSweepAddress string\n\tFast                    bool\n\tChangeStaticAddressID   sql.NullInt32\n\tFundingTxs              []byte\n}\n```\n\n```go\ntype InsertStaticAddressMetaUpdateParams struct {\n\tSwapHash        []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype InsertSwapParams struct {\n\tSwapHash         []byte\n\tPreimage         []byte\n\tInitiationTime   time.Time\n\tAmountRequested  int64\n\tCltvExpiry       int32\n\tMaxMinerFee      int64\n\tMaxSwapFee       int64\n\tInitiationHeight int32\n\tProtocolVersion  int32\n\tLabel            string\n}\n```\n\n```go\ntype InsertSwapUpdateParams struct {\n\tSwapHash        []byte\n\tUpdateTimestamp time.Time\n\tUpdateState     int32\n\tHtlcTxhash      string\n\tServerCost      int64\n\tOnchainCost     int64\n\tOffchainCost    int64\n}\n```\n\n```go\ntype InstantoutSwap struct {\n\tSwapHash                  []byte\n\tPreimage                  []byte\n\tSweepAddress              string\n\tOutgoingChanSet           string\n\tHtlcFeeRate               int64\n\tReservationIds            []byte\n\tSwapInvoice               string\n\tFinalizedHtlcTx           []byte\n\tSweepTxHash               []byte\n\tFinalizedSweeplessSweepTx []byte\n\tSweepConfirmationHeight   sql.NullInt32\n}\n```\n\n```go\ntype InstantoutUpdate struct {\n\tID              int32\n\tSwapHash        []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype LiquidityParam struct {\n\tID     int32\n\tParams []byte\n}\n```\n\n```go\ntype ListStaticAddressesParams struct {\n\tAfterID  int32\n\tPageSize int32\n}\n```\n\n```go\ntype LoopinSwap struct {\n\tSwapHash       []byte\n\tHtlcConfTarget int32\n\tLastHop        []byte\n\tExternalHtlc   bool\n}\n```\n\n```go\ntype LoopoutSwap struct {\n\tSwapHash            []byte\n\tDestAddress         string\n\tSwapInvoice         string\n\tMaxSwapRoutingFee   int64\n\tSweepConfTarget     int32\n\tHtlcConfirmations   int32\n\tOutgoingChanSet     string\n\tPrepayInvoice       string\n\tMaxPrepayRoutingFee int64\n\tPublicationDeadline time.Time\n\tSingleSweep         bool\n\tPaymentTimeout      int32\n\tPaymentAddress      []byte\n}\n```\n\n```go\ntype LoopoutSwapsAssetInfo struct {\n\tSwapHash           []byte\n\tAssetID            []byte\n\tSwapRfqID          []byte\n\tPrepayRfqID        []byte\n\tAssetAmtPaidSwap   int64\n\tAssetAmtPaidPrepay int64\n}\n```\n\n```go\ntype MapDepositToSwapParams struct {\n\tDepositID []byte\n\tSwapHash  []byte\n}\n```\n\n```go\ntype MigrationTracker struct {\n\tMigrationID string\n\tMigrationTs sql.NullTime\n}\n```\n\n```go\ntype OverrideSelectedSwapAmountParams struct {\n\tSwapHash       []byte\n\tSelectedAmount int64\n}\n```\n\n```go\ntype OverrideSwapCostsParams struct {\n\tID           int32\n\tServerCost   int64\n\tOnchainCost  int64\n\tOffchainCost int64\n}\n```\n\n```go\ntype Querier interface {\n\tAllDeposits(ctx context.Context) ([]AllDepositsRow, error)\n\tAllStaticAddresses(ctx context.Context) ([]StaticAddress, error)\n\tCancelBatch(ctx context.Context, id int32) error\n\tCreateDeposit(ctx context.Context, arg CreateDepositParams) error\n\tCreateReservation(ctx context.Context, arg CreateReservationParams) error\n\tCreateStaticAddress(ctx context.Context, arg CreateStaticAddressParams) error\n\tCreateWithdrawal(ctx context.Context, arg CreateWithdrawalParams) error\n\tCreateWithdrawalDeposit(ctx context.Context, arg CreateWithdrawalDepositParams) error\n\tDepositForOutpoint(ctx context.Context, arg DepositForOutpointParams) (DepositForOutpointRow, error)\n\tDepositIDsForSwapHash(ctx context.Context, swapHash []byte) ([][]byte, error)\n\tDepositsForSwapHash(ctx context.Context, swapHash []byte) ([]DepositsForSwapHashRow, error)\n\tFetchLiquidityParams(ctx context.Context) ([]byte, error)\n\tGetAllWithdrawals(ctx context.Context) ([]Withdrawal, error)\n\tGetBatchSweeps(ctx context.Context, batchID int32) ([]Sweep, error)\n\tGetBatchSweptAmount(ctx context.Context, batchID int32) (int64, error)\n\tGetDeposit(ctx context.Context, depositID []byte) (GetDepositRow, error)\n\tGetInstantOutSwap(ctx context.Context, swapHash []byte) (GetInstantOutSwapRow, error)\n\tGetInstantOutSwapUpdates(ctx context.Context, swapHash []byte) ([]InstantoutUpdate, error)\n\tGetInstantOutSwaps(ctx context.Context) ([]GetInstantOutSwapsRow, error)\n\tGetLastUpdateID(ctx context.Context, swapHash []byte) (int32, error)\n\tGetLatestDepositUpdate(ctx context.Context, depositID []byte) (DepositUpdate, error)\n\t// GetLegacyAddress returns the lowest-ID address, which is always the legacy\n\t// root in key family 42060. Receive and change address creation first ensures\n\t// that this root exists, so derived addresses always have higher IDs.\n\tGetLegacyAddress(ctx context.Context) (StaticAddress, error)\n\tGetLoopInSwap(ctx context.Context, swapHash []byte) (GetLoopInSwapRow, error)\n\t// The last update is the swap's current state.\n\tGetLoopInSwapUpdates(ctx context.Context, swapHash []byte) ([]StaticAddressSwapUpdate, error)\n\tGetLoopInSwaps(ctx context.Context) ([]GetLoopInSwapsRow, error)\n\tGetLoopOutSwap(ctx context.Context, swapHash []byte) (GetLoopOutSwapRow, error)\n\tGetLoopOutSwaps(ctx context.Context) ([]GetLoopOutSwapsRow, error)\n\tGetMaxStaticAddressHtlcKeyIndex(ctx context.Context, clientKeyFamily int32) (int32, error)\n\tGetMigration(ctx context.Context, migrationID string) (MigrationTracker, error)\n\t// Startup only needs ownership metadata for paid terminal swaps, without\n\t// fetching each swap's deposit rows, keys and update history.\n\tGetPaidStaticAddressLoopInClaims(ctx context.Context, id int32) ([]GetPaidStaticAddressLoopInClaimsRow, error)\n\tGetParentBatch(ctx context.Context, outpoint string) (SweepBatch, error)\n\tGetReservation(ctx context.Context, reservationID []byte) (Reservation, error)\n\tGetReservationUpdates(ctx context.Context, reservationID []byte) ([]ReservationUpdate, error)\n\tGetReservations(ctx context.Context) ([]Reservation, error)\n\tGetStaticAddress(ctx context.Context, pkscript []byte) (StaticAddress, error)\n\tGetStaticAddressID(ctx context.Context, pkscript []byte) (int32, error)\n\tGetStaticAddressLoopInSwap(ctx context.Context, swapHash []byte) (GetStaticAddressLoopInSwapRow, error)\n\tGetStaticAddressLoopInSwapsByStates(ctx context.Context, dollar_1 sql.NullString) ([]GetStaticAddressLoopInSwapsByStatesRow, error)\n\tGetSwapUpdates(ctx context.Context, swapHash []byte) ([]SwapUpdate, error)\n\tGetSweepStatus(ctx context.Context, outpoint string) (bool, error)\n\tGetUnconfirmedBatches(ctx context.Context) ([]SweepBatch, error)\n\tGetWithdrawalDeposits(ctx context.Context, withdrawalID []byte) ([][]byte, error)\n\tGetWithdrawalIDByDepositID(ctx context.Context, depositID []byte) ([]byte, error)\n\tInsertBatch(ctx context.Context, arg InsertBatchParams) (int32, error)\n\tInsertDepositUpdate(ctx context.Context, arg InsertDepositUpdateParams) error\n\tInsertHtlcKeys(ctx context.Context, arg InsertHtlcKeysParams) error\n\tInsertInstantOut(ctx context.Context, arg InsertInstantOutParams) error\n\tInsertInstantOutUpdate(ctx context.Context, arg InsertInstantOutUpdateParams) error\n\tInsertLoopIn(ctx context.Context, arg InsertLoopInParams) error\n\tInsertLoopOut(ctx context.Context, arg InsertLoopOutParams) error\n\tInsertLoopOutAsset(ctx context.Context, arg InsertLoopOutAssetParams) error\n\tInsertMigration(ctx context.Context, arg InsertMigrationParams) error\n\tInsertReservationUpdate(ctx context.Context, arg InsertReservationUpdateParams) error\n\tInsertStaticAddressLoopIn(ctx context.Context, arg InsertStaticAddressLoopInParams) error\n\tInsertStaticAddressMetaUpdate(ctx context.Context, arg InsertStaticAddressMetaUpdateParams) (int32, error)\n\tInsertSwap(ctx context.Context, arg InsertSwapParams) error\n\tInsertSwapUpdate(ctx context.Context, arg InsertSwapUpdateParams) error\n\tIsStored(ctx context.Context, swapHash []byte) (bool, error)\n\tListStaticAddresses(ctx context.Context, arg ListStaticAddressesParams) ([]StaticAddress, error)\n\tMapDepositToSwap(ctx context.Context, arg MapDepositToSwapParams) error\n\tOverrideSelectedSwapAmount(ctx context.Context, arg OverrideSelectedSwapAmountParams) error\n\tOverrideSwapCosts(ctx context.Context, arg OverrideSwapCostsParams) error\n\tRecordStaticAddressRiskDecision(ctx context.Context, arg RecordStaticAddressRiskDecisionParams) error\n\tSetDepositOnchainCost(ctx context.Context, arg SetDepositOnchainCostParams) error\n\tSwapHashForDepositID(ctx context.Context, depositID []byte) ([]byte, error)\n\tUpdateBatch(ctx context.Context, arg UpdateBatchParams) error\n\tUpdateDeposit(ctx context.Context, arg UpdateDepositParams) error\n\tUpdateInstantOut(ctx context.Context, arg UpdateInstantOutParams) error\n\tUpdateLoopOutAssetOffchainPayments(ctx context.Context, arg UpdateLoopOutAssetOffchainPaymentsParams) error\n\tUpdateReservation(ctx context.Context, arg UpdateReservationParams) error\n\tUpdateStaticAddressLoopIn(ctx context.Context, arg UpdateStaticAddressLoopInParams) error\n\tUpdateWithdrawal(ctx context.Context, arg UpdateWithdrawalParams) error\n\tUpsertLiquidityParams(ctx context.Context, params []byte) error\n\tUpsertSweep(ctx context.Context, arg UpsertSweepParams) error\n}\n```\n\n```go\ntype Queries struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(db DBTX) *Queries\n```\n\n```go\nfunc (q *Queries) AllDeposits(ctx context.Context) ([]AllDepositsRow, error)\n```\n\n```go\nfunc (q *Queries) AllStaticAddresses(ctx context.Context) ([]StaticAddress, error)\n```\n\n```go\nfunc (q *Queries) CancelBatch(ctx context.Context, id int32) error\n```\n\n```go\nfunc (q *Queries) CreateDeposit(ctx context.Context, arg CreateDepositParams) error\n```\n\n```go\nfunc (q *Queries) CreateReservation(ctx context.Context, arg CreateReservationParams) error\n```\n\n```go\nfunc (q *Queries) CreateStaticAddress(ctx context.Context, arg CreateStaticAddressParams) error\n```\n\n```go\nfunc (q *Queries) CreateWithdrawal(ctx context.Context, arg CreateWithdrawalParams) error\n```\n\n```go\nfunc (q *Queries) CreateWithdrawalDeposit(ctx context.Context, arg CreateWithdrawalDepositParams) error\n```\n\n```go\nfunc (q *Queries) DepositForOutpoint(ctx context.Context, arg DepositForOutpointParams) (DepositForOutpointRow, error)\n```\n\n```go\nfunc (q *Queries) DepositIDsForSwapHash(ctx context.Context, swapHash []byte) ([][]byte, error)\n```\n\n```go\nfunc (q *Queries) DepositsForSwapHash(ctx context.Context, swapHash []byte) ([]DepositsForSwapHashRow, error)\n```\n\n```go\nfunc (q *Queries) FetchLiquidityParams(ctx context.Context) ([]byte, error)\n```\n\n```go\nfunc (q *Queries) GetAllWithdrawals(ctx context.Context) ([]Withdrawal, error)\n```\n\n```go\nfunc (q *Queries) GetBatchSweeps(ctx context.Context, batchID int32) ([]Sweep, error)\n```\n\n```go\nfunc (q *Queries) GetBatchSweptAmount(ctx context.Context, batchID int32) (int64, error)\n```\n\n```go\nfunc (q *Queries) GetDeposit(ctx context.Context, depositID []byte) (GetDepositRow, error)\n```\n\n```go\nfunc (q *Queries) GetInstantOutSwap(ctx context.Context, swapHash []byte) (GetInstantOutSwapRow, error)\n```\n\n```go\nfunc (q *Queries) GetInstantOutSwapUpdates(ctx context.Context, swapHash []byte) ([]InstantoutUpdate, error)\n```\n\n```go\nfunc (q *Queries) GetInstantOutSwaps(ctx context.Context) ([]GetInstantOutSwapsRow, error)\n```\n\n```go\nfunc (q *Queries) GetLastUpdateID(ctx context.Context, swapHash []byte) (int32, error)\n```\n\n```go\nfunc (q *Queries) GetLatestDepositUpdate(ctx context.Context, depositID []byte) (DepositUpdate, error)\n```\n\n```go\nfunc (q *Queries) GetLegacyAddress(ctx context.Context) (StaticAddress, error)\n```\nGetLegacyAddress returns the lowest-ID address, which is always the legacy root in key family 42060. Receive and change address creation first ensures that this root exists, so derived addresses always have higher IDs.\n\n```go\nfunc (q *Queries) GetLoopInSwap(ctx context.Context, swapHash []byte) (GetLoopInSwapRow, error)\n```\n\n```go\nfunc (q *Queries) GetLoopInSwapUpdates(ctx context.Context, swapHash []byte) ([]StaticAddressSwapUpdate, error)\n```\nThe last update is the swap's current state.\n\n```go\nfunc (q *Queries) GetLoopInSwaps(ctx context.Context) ([]GetLoopInSwapsRow, error)\n```\n\n```go\nfunc (q *Queries) GetLoopOutSwap(ctx context.Context, swapHash []byte) (GetLoopOutSwapRow, error)\n```\n\n```go\nfunc (q *Queries) GetLoopOutSwaps(ctx context.Context) ([]GetLoopOutSwapsRow, error)\n```\n\n```go\nfunc (q *Queries) GetMaxStaticAddressHtlcKeyIndex(ctx context.Context, clientKeyFamily int32) (int32, error)\n```\n\n```go\nfunc (q *Queries) GetMigration(ctx context.Context, migrationID string) (MigrationTracker, error)\n```\n\n```go\nfunc (q *Queries) GetPaidStaticAddressLoopInClaims(ctx context.Context, id int32) ([]GetPaidStaticAddressLoopInClaimsRow, error)\n```\nStartup only needs ownership metadata for paid terminal swaps, without fetching each swap's deposit rows, keys and update history.\n\n```go\nfunc (q *Queries) GetParentBatch(ctx context.Context, outpoint string) (SweepBatch, error)\n```\n\n```go\nfunc (q *Queries) GetReservation(ctx context.Context, reservationID []byte) (Reservation, error)\n```\n\n```go\nfunc (q *Queries) GetReservationUpdates(ctx context.Context, reservationID []byte) ([]ReservationUpdate, error)\n```\n\n```go\nfunc (q *Queries) GetReservations(ctx context.Context) ([]Reservation, error)\n```\n\n```go\nfunc (q *Queries) GetStaticAddress(ctx context.Context, pkscript []byte) (StaticAddress, error)\n```\n\n```go\nfunc (q *Queries) GetStaticAddressID(ctx context.Context, pkscript []byte) (int32, error)\n```\n\n```go\nfunc (q *Queries) GetStaticAddressLoopInSwap(ctx context.Context, swapHash []byte) (GetStaticAddressLoopInSwapRow, error)\n```\n\n```go\nfunc (q *Queries) GetStaticAddressLoopInSwapsByStates(ctx context.Context, dollar_1 sql.NullString) ([]GetStaticAddressLoopInSwapsByStatesRow, error)\n```\n\n```go\nfunc (q *Queries) GetSwapUpdates(ctx context.Context, swapHash []byte) ([]SwapUpdate, error)\n```\n\n```go\nfunc (q *Queries) GetSweepStatus(ctx context.Context, outpoint string) (bool, error)\n```\n\n```go\nfunc (q *Queries) GetUnconfirmedBatches(ctx context.Context) ([]SweepBatch, error)\n```\n\n```go\nfunc (q *Queries) GetWithdrawalDeposits(ctx context.Context, withdrawalID []byte) ([][]byte, error)\n```\n\n```go\nfunc (q *Queries) GetWithdrawalIDByDepositID(ctx context.Context, depositID []byte) ([]byte, error)\n```\n\n```go\nfunc (q *Queries) InsertBatch(ctx context.Context, arg InsertBatchParams) (int32, error)\n```\n\n```go\nfunc (q *Queries) InsertDepositUpdate(ctx context.Context, arg InsertDepositUpdateParams) error\n```\n\n```go\nfunc (q *Queries) InsertHtlcKeys(ctx context.Context, arg InsertHtlcKeysParams) error\n```\n\n```go\nfunc (q *Queries) InsertInstantOut(ctx context.Context, arg InsertInstantOutParams) error\n```\n\n```go\nfunc (q *Queries) InsertInstantOutUpdate(ctx context.Context, arg InsertInstantOutUpdateParams) error\n```\n\n```go\nfunc (q *Queries) InsertLoopIn(ctx context.Context, arg InsertLoopInParams) error\n```\n\n```go\nfunc (q *Queries) InsertLoopOut(ctx context.Context, arg InsertLoopOutParams) error\n```\n\n```go\nfunc (q *Queries) InsertLoopOutAsset(ctx context.Context, arg InsertLoopOutAssetParams) error\n```\n\n```go\nfunc (q *Queries) InsertMigration(ctx context.Context, arg InsertMigrationParams) error\n```\n\n```go\nfunc (q *Queries) InsertReservationUpdate(ctx context.Context, arg InsertReservationUpdateParams) error\n```\n\n```go\nfunc (q *Queries) InsertStaticAddressLoopIn(ctx context.Context, arg InsertStaticAddressLoopInParams) error\n```\n\n```go\nfunc (q *Queries) InsertStaticAddressMetaUpdate(ctx context.Context, arg InsertStaticAddressMetaUpdateParams) (int32, error)\n```\n\n```go\nfunc (q *Queries) InsertSwap(ctx context.Context, arg InsertSwapParams) error\n```\n\n```go\nfunc (q *Queries) InsertSwapUpdate(ctx context.Context, arg InsertSwapUpdateParams) error\n```\n\n```go\nfunc (q *Queries) IsStored(ctx context.Context, swapHash []byte) (bool, error)\n```\n\n```go\nfunc (q *Queries) ListStaticAddresses(ctx context.Context, arg ListStaticAddressesParams) ([]StaticAddress, error)\n```\n\n```go\nfunc (q *Queries) MapDepositToSwap(ctx context.Context, arg MapDepositToSwapParams) error\n```\n\n```go\nfunc (q *Queries) OverrideSelectedSwapAmount(ctx context.Context, arg OverrideSelectedSwapAmountParams) error\n```\n\n```go\nfunc (q *Queries) OverrideSwapCosts(ctx context.Context, arg OverrideSwapCostsParams) error\n```\n\n```go\nfunc (q *Queries) RecordStaticAddressRiskDecision(ctx context.Context, arg RecordStaticAddressRiskDecisionParams) error\n```\n\n```go\nfunc (q *Queries) SetDepositOnchainCost(ctx context.Context, arg SetDepositOnchainCostParams) error\n```\n\n```go\nfunc (q *Queries) SwapHashForDepositID(ctx context.Context, depositID []byte) ([]byte, error)\n```\n\n```go\nfunc (q *Queries) UpdateBatch(ctx context.Context, arg UpdateBatchParams) error\n```\n\n```go\nfunc (q *Queries) UpdateDeposit(ctx context.Context, arg UpdateDepositParams) error\n```\n\n```go\nfunc (q *Queries) UpdateInstantOut(ctx context.Context, arg UpdateInstantOutParams) error\n```\n\n```go\nfunc (q *Queries) UpdateLoopOutAssetOffchainPayments(ctx context.Context, arg UpdateLoopOutAssetOffchainPaymentsParams) error\n```\n\n```go\nfunc (q *Queries) UpdateReservation(ctx context.Context, arg UpdateReservationParams) error\n```\n\n```go\nfunc (q *Queries) UpdateStaticAddressLoopIn(ctx context.Context, arg UpdateStaticAddressLoopInParams) error\n```\n\n```go\nfunc (q *Queries) UpdateWithdrawal(ctx context.Context, arg UpdateWithdrawalParams) error\n```\n\n```go\nfunc (q *Queries) UpsertLiquidityParams(ctx context.Context, params []byte) error\n```\n\n```go\nfunc (q *Queries) UpsertSweep(ctx context.Context, arg UpsertSweepParams) error\n```\n\n```go\nfunc (q *Queries) WithTx(tx *sql.Tx) *Queries\n```\n\n```go\ntype RecordStaticAddressRiskDecisionParams struct {\n\tSwapHash                     []byte\n\tConfirmationRiskDecision     string\n\tConfirmationRiskDecisionTime sql.NullTime\n}\n```\n\n```go\ntype Reservation struct {\n\tID                 int32\n\tReservationID      []byte\n\tClientPubkey       []byte\n\tServerPubkey       []byte\n\tExpiry             int32\n\tValue              int64\n\tClientKeyFamily    int32\n\tClientKeyIndex     int32\n\tInitiationHeight   int32\n\tTxHash             []byte\n\tOutIndex           sql.NullInt32\n\tConfirmationHeight sql.NullInt32\n\tProtocolVersion    int32\n}\n```\n\n```go\ntype ReservationUpdate struct {\n\tID              int32\n\tReservationID   []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype SetDepositOnchainCostParams struct {\n\tDepositID        []byte\n\tOnchainCost      int64\n\tOnchainCostKnown sql.NullBool\n}\n```\n\n```go\ntype StaticAddress struct {\n\tID               int32\n\tClientPubkey     []byte\n\tServerPubkey     []byte\n\tExpiry           int32\n\tClientKeyFamily  int32\n\tClientKeyIndex   int32\n\tPkscript         []byte\n\tProtocolVersion  int32\n\tInitiationHeight int32\n}\n```\n\n```go\ntype StaticAddressSwap struct {\n\tID                           int32\n\tSwapHash                     []byte\n\tSwapInvoice                  string\n\tLastHop                      []byte\n\tPaymentTimeoutSeconds        int32\n\tQuotedSwapFeeSatoshis        int64\n\tDepositOutpoints             string\n\tHtlcTxFeeRateSatKw           int64\n\tHtlcTimeoutSweepTxID         sql.NullString\n\tHtlcTimeoutSweepAddress      string\n\tSelectedAmount               int64\n\tFast                         bool\n\tConfirmationRiskDecision     string\n\tConfirmationRiskDecisionTime sql.NullTime\n\tChangeStaticAddressID        sql.NullInt32\n\tFundingTxs                   []byte\n}\n```\n\n```go\ntype StaticAddressSwapUpdate struct {\n\tID              int32\n\tSwapHash        []byte\n\tUpdateState     string\n\tUpdateTimestamp time.Time\n}\n```\n\n```go\ntype Swap struct {\n\tID               int32\n\tSwapHash         []byte\n\tPreimage         []byte\n\tInitiationTime   time.Time\n\tAmountRequested  int64\n\tCltvExpiry       int32\n\tMaxMinerFee      int64\n\tMaxSwapFee       int64\n\tInitiationHeight int32\n\tProtocolVersion  int32\n\tLabel            string\n}\n```\n\n```go\ntype SwapUpdate struct {\n\tID              int32\n\tSwapHash        []byte\n\tUpdateTimestamp time.Time\n\tUpdateState     int32\n\tHtlcTxhash      string\n\tServerCost      int64\n\tOnchainCost     int64\n\tOffchainCost    int64\n}\n```\n\n```go\ntype Sweep struct {\n\tID        int32\n\tSwapHash  []byte\n\tBatchID   int32\n\tOutpoint  string\n\tAmt       int64\n\tCompleted bool\n}\n```\n\n```go\ntype SweepBatch struct {\n\tID                 int32\n\tConfirmed          bool\n\tBatchTxID          sql.NullString\n\tBatchPkScript      []byte\n\tLastRbfHeight      sql.NullInt32\n\tLastRbfSatPerKw    sql.NullInt32\n\tMaxTimeoutDistance int32\n\tCancelled          bool\n}\n```\n\n```go\ntype SweepsOld struct {\n\tID            int32\n\tSwapHash      []byte\n\tBatchID       int32\n\tOutpointTxid  []byte\n\tOutpointIndex int32\n\tAmt           int64\n\tCompleted     bool\n}\n```\n\n```go\ntype UpdateBatchParams struct {\n\tID              int32\n\tConfirmed       bool\n\tBatchTxID       sql.NullString\n\tBatchPkScript   []byte\n\tLastRbfHeight   sql.NullInt32\n\tLastRbfSatPerKw sql.NullInt32\n}\n```\n\n```go\ntype UpdateDepositParams struct {\n\tDepositID             []byte\n\tTxHash                []byte\n\tOutIndex              int32\n\tConfirmationHeight    int64\n\tExpirySweepTxid       []byte\n\tFinalizedWithdrawalTx sql.NullString\n}\n```\n\n```go\ntype UpdateInstantOutParams struct {\n\tSwapHash                  []byte\n\tFinalizedHtlcTx           []byte\n\tSweepTxHash               []byte\n\tFinalizedSweeplessSweepTx []byte\n\tSweepConfirmationHeight   sql.NullInt32\n}\n```\n\n```go\ntype UpdateLoopOutAssetOffchainPaymentsParams struct {\n\tSwapHash           []byte\n\tAssetAmtPaidSwap   int64\n\tAssetAmtPaidPrepay int64\n}\n```\n\n```go\ntype UpdateReservationParams struct {\n\tReservationID      []byte\n\tTxHash             []byte\n\tOutIndex           sql.NullInt32\n\tConfirmationHeight sql.NullInt32\n}\n```\n\n```go\ntype UpdateStaticAddressLoopInParams struct {\n\tSwapHash             []byte\n\tHtlcTxFeeRateSatKw   int64\n\tHtlcTimeoutSweepTxID sql.NullString\n}\n```\n\n```go\ntype UpdateWithdrawalParams struct {\n\tWithdrawalID       []byte\n\tWithdrawalTxID     sql.NullString\n\tWithdrawnAmount    sql.NullInt64\n\tChangeAmount       sql.NullInt64\n\tConfirmationHeight sql.NullInt64\n}\n```\n\n```go\ntype UpsertSweepParams struct {\n\tSwapHash  []byte\n\tBatchID   int32\n\tOutpoint  string\n\tAmt       int64\n\tCompleted bool\n}\n```\n\n```go\ntype Withdrawal struct {\n\tID                 int32\n\tWithdrawalID       []byte\n\tWithdrawalTxID     sql.NullString\n\tTotalDepositAmount int64\n\tWithdrawnAmount    sql.NullInt64\n\tChangeAmount       sql.NullInt64\n\tInitiationTime     time.Time\n\tConfirmationHeight sql.NullInt64\n}\n```\n\n```go\ntype WithdrawalDeposit struct {\n\tID           int32\n\tWithdrawalID []byte\n\tDepositID    []byte\n}\n```\n\n","path":"github.com/lightninglabs/loop/loopdb/sqlc","name":"sqlc","synopsis":"","isRedistributable":true}
