case class SpendingInfoDAO()(implicit ec: ExecutionContext, appConfig: WalletAppConfig) extends CRUDAutoInc[UTXORecord] with Product with Serializable
- Alphabetic
- By Inheritance
- SpendingInfoDAO
- Serializable
- Serializable
- Product
- Equals
- CRUDAutoInc
- TableAutoIncComponent
- CRUD
- JdbcProfileComponent
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SpendingInfoDAO()(implicit ec: ExecutionContext, appConfig: WalletAppConfig)
Type Members
-
case class
SpendingInfoTable(tag: slick.jdbc.JdbcProfile.API.Tag) extends TableAutoInc[UTXORecord] with Product with Serializable
This table stores the necessary information to spend a transaction output (TXO) at a later point in time.
This table stores the necessary information to spend a transaction output (TXO) at a later point in time. It also stores how many confirmations it has, whether or not it is spent (i.e. if it is a UTXO or not) and the TXID of the transaction that created this output.
-
abstract
class
TableAutoInc[T] extends slick.jdbc.JdbcProfile.API.Table[T]
- Definition Classes
- TableAutoIncComponent
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
_findAllUnspent(): Future[Vector[UTXORecord]]
Enumerates all unspent TX outputs in the wallet with the state TxoState.PendingConfirmationsReceived or TxoState.ConfirmedReceived
-
implicit
val
appConfig: WalletAppConfig
- Definition Classes
- SpendingInfoDAO → CRUDAutoInc → CRUD → JdbcProfileComponent
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
count(): Future[Int]
- Definition Classes
- CRUD
- def create(si: SpendingInfoDb): Future[SpendingInfoDb]
-
def
create(t: UTXORecord): Future[UTXORecord]
- Definition Classes
- CRUD
-
def
createAll(ts: Vector[UTXORecord]): Future[Vector[UTXORecord]]
- Definition Classes
- CRUDAutoInc → CRUD
-
lazy val
database: slick.jdbc.JdbcProfile.API.Database
- Definition Classes
- JdbcProfileComponent
-
lazy val
dbConfig: DatabaseConfig[JdbcProfile]
- Definition Classes
- JdbcProfileComponent
-
def
debug(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
debug(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
debug(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def delete(si: SpendingInfoDb): Future[Int]
-
def
delete(t: UTXORecord): Future[Int]
- Definition Classes
- CRUD
-
def
deleteAll(): Future[Int]
- Definition Classes
- CRUD
-
def
deleteAll(ts: Vector[UTXORecord]): Future[Int]
- Definition Classes
- CRUD
- implicit val ec: ExecutionContext
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
error(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
find(t: UTXORecord): slick.jdbc.JdbcProfile.API.Query[slick.jdbc.JdbcProfile.API.Table[_], UTXORecord, Seq]
- Attributes
- protected
- Definition Classes
- CRUD
-
def
findAll(ts: Vector[UTXORecord]): slick.jdbc.JdbcProfile.API.Query[slick.jdbc.JdbcProfile.API.Table[_], UTXORecord, Seq]
- Definition Classes
- CRUDAutoInc → CRUD
-
def
findAll(): Future[Vector[UTXORecord]]
- Definition Classes
- CRUD
- def findAllForAccount(hdAccount: HDAccount): Future[Vector[SpendingInfoDb]]
-
def
findAllInMempool: Future[Vector[SpendingInfoDb]]
Enumerates all TX outputs in the wallet with the state TxoState.BroadcastSpent or TxoState.BroadcastReceived
-
def
findAllOutpoints(): Future[Vector[TransactionOutPoint]]
Enumerates all TX outpoints in the wallet
-
def
findAllPendingConfirmation: Future[Vector[SpendingInfoDb]]
Enumerates all TX outputs in the wallet with the state TxoState.PendingConfirmationsReceived or TxoState.PendingConfirmationsSpent
- def findAllSpendingInfos(): Future[Vector[SpendingInfoDb]]
- def findAllUnspent(): Future[Vector[SpendingInfoDb]]
-
def
findAllUnspentForAccount(hdAccount: HDAccount): Future[Vector[SpendingInfoDb]]
Finds all utxos for a given account
- def findAllUnspentForTag(tag: AddressTag): Future[Vector[SpendingInfoDb]]
-
def
findByOutPoints(outPoints: Vector[TransactionOutPoint]): Future[Vector[SpendingInfoDb]]
Enumerates all TX outpoints in the wallet
-
def
findByPrimaryKey(id: Long): slick.jdbc.JdbcProfile.API.Query[slick.jdbc.JdbcProfile.API.Table[_], UTXORecord, Seq]
- Attributes
- protected
- Definition Classes
- CRUD
-
def
findByPrimaryKeys(ids: Vector[Long]): slick.jdbc.JdbcProfile.API.Query[TableAutoInc[UTXORecord], UTXORecord, Seq]
- Definition Classes
- CRUDAutoInc → CRUD
- def findByScriptPubKey(scriptPubKey: ScriptPubKey): Future[Vector[SpendingInfoDb]]
- def findByScriptPubKeyId(scriptPubKeyId: Long): Future[Vector[UTXORecord]]
- def findByTxoState(state: TxoState): Future[Vector[SpendingInfoDb]]
-
def
findDbsForTx(txid: DoubleSha256DigestBE): Future[Vector[UTXORecord]]
Fetches all the incoming TXOs in our DB that are in the transaction with the given TXID
- def findOutputsBeingSpent(txs: Vector[Transaction]): Future[Vector[SpendingInfoDb]]
-
def
findOutputsBeingSpent(tx: Transaction): Future[Vector[SpendingInfoDb]]
Finds all the outputs being spent in the given transaction
-
def
findOutputsReceived(txids: Vector[DoubleSha256DigestBE]): Future[Vector[SpendingInfoDb]]
Fetches all the incoming TXOs in our DB that are in the transaction with the given TXID
-
def
findTx(tx: Transaction): Future[Vector[SpendingInfoDb]]
Fetches all the received TXOs in our DB that are in the given TX
-
def
findTxs(txs: Vector[Transaction]): Future[Vector[SpendingInfoDb]]
Fetches all received txos in our db that are in the given txs
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
info(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
info(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
info(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def infoToUtxo(infos: Vector[SpendingInfoDb]): Future[Vector[UTXORecord]]
-
def
isDebugEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isErrorEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isInfoEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isWarnEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
lazy val
numThreads: Int
- Definition Classes
- JdbcProfileComponent
-
lazy val
password: String
- Definition Classes
- JdbcProfileComponent
-
lazy val
profile: JdbcProfile
- Definition Classes
- JdbcProfileComponent
-
def
read(id: Long): Future[Option[UTXORecord]]
- Definition Classes
- CRUD
-
def
safeDatabase: SafeDatabase
- Definition Classes
- CRUD
-
val
schemaName: Option[String]
- Definition Classes
- CRUD
-
def
startHikariLogger(interval: Duration): HikariLogging
- Attributes
- protected
- Definition Classes
- JdbcProfileComponent
-
def
stopHikariLogger(): Unit
- Attributes
- protected
- Definition Classes
- JdbcProfileComponent
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
table: slick.jdbc.JdbcProfile.API.TableQuery[SpendingInfoTable]
The table inside our database we are inserting into
The table inside our database we are inserting into
- Definition Classes
- SpendingInfoDAO → CRUDAutoInc → CRUD
-
implicit
def
tableQuerySafeSubtypeCast[SpecificT <: AbstractTable[_], SomeT <: SpecificT](tableQuery: slick.jdbc.JdbcProfile.API.TableQuery[SomeT]): slick.jdbc.JdbcProfile.API.TableQuery[SpecificT]
- Attributes
- protected
- Definition Classes
- CRUD
-
def
trace(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
trace(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
trace(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def update(si: SpendingInfoDb): Future[SpendingInfoDb]
-
def
update(t: UTXORecord): Future[UTXORecord]
- Definition Classes
- CRUD
-
def
updateAll(ts: Vector[UTXORecord]): Future[Vector[UTXORecord]]
- Definition Classes
- CRUD
- def updateAllSpendingInfoDb(ts: Vector[SpendingInfoDb]): Future[Vector[SpendingInfoDb]]
- def upsert(si: SpendingInfoDb): Future[SpendingInfoDb]
-
def
upsert(t: UTXORecord): Future[UTXORecord]
- Definition Classes
- CRUD
-
def
upsertAll(ts: Vector[UTXORecord]): Future[Vector[UTXORecord]]
- Definition Classes
- CRUD
- def upsertAllSpendingInfoDb(ts: Vector[SpendingInfoDb]): Future[Vector[SpendingInfoDb]]
-
lazy val
username: String
- Definition Classes
- JdbcProfileComponent
- def utxoToInfo(utxos: Vector[UTXORecord]): Future[Vector[SpendingInfoDb]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
warn(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
warn(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
warn(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
withAddress(txid: DoubleSha256DigestBE): Future[Vector[(SpendingInfoDb, AddressDb)]]
Given a TXID, fetches all incoming TXOs and the address the TXO pays to