Packages

trait WalletApi extends WalletLogger

API for the wallet project.

This wallet API is BIP44 compliant.

See also

BIP44

Linear Supertypes
WalletLogger, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WalletApi
  2. WalletLogger
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract val chainQueryApi: ChainQueryApi
  2. abstract def clearAllUtxosAndAddresses(): Future[WalletApi]

    Removes all utxos and addresses from the wallet.

    Removes all utxos and addresses from the wallet. Don't call this unless you are sure you can recover your wallet

  3. abstract val creationTime: Instant
  4. abstract val feeRateApi: FeeRateApi
  5. abstract def getAddressInfo(address: BitcoinAddress): Future[Option[AddressInfo]]

    Mimics the getaddressinfo RPC call in Bitcoin Core

    Mimics the getaddressinfo RPC call in Bitcoin Core

    returns

    If the address is found in our database Some(address) is returned, otherwise None

  6. abstract def getConfirmedBalance(tag: AddressTag): Future[CurrencyUnit]
  7. abstract def getConfirmedBalance(): Future[CurrencyUnit]

    Gets the sum of all confirmed UTXOs in this wallet

  8. abstract def getNewAddress(tags: Vector[AddressTag]): Future[BitcoinAddress]
  9. abstract def getNewAddress(addressType: AddressType, tags: Vector[AddressTag]): Future[BitcoinAddress]
  10. abstract def getNewAddress(): Future[BitcoinAddress]

    Gets a new external address Calling this method multiple times will return the same address, until it has received funds.

  11. abstract def getNewAddress(addressType: AddressType): Future[BitcoinAddress]

    Gets a new external address with the specified type.

  12. abstract def getNewChangeAddress()(implicit ec: ExecutionContext): Future[BitcoinAddress]

    Generates a new change address

    Generates a new change address

    Attributes
    protected[wallet]
  13. abstract def getUnconfirmedBalance(tag: AddressTag): Future[CurrencyUnit]
  14. abstract def getUnconfirmedBalance(): Future[CurrencyUnit]

    Gets the sum of all unconfirmed UTXOs in this wallet

  15. abstract def getUnusedAddress: Future[BitcoinAddress]

    Gets a external address.

    Gets a external address. Calling this method multiple times will return the same address, until it has received funds.

  16. abstract def getUnusedAddress(addressType: AddressType): Future[BitcoinAddress]

    Gets a external address the given AddressType.

    Gets a external address the given AddressType. Calling this method multiple times will return the same address, until it has received funds.

  17. abstract def isEmpty(): Future[Boolean]

    Checks if the wallet contains any data

  18. abstract def keyManager: KeyManager
  19. abstract def listAddresses(): Future[Vector[AddressDb]]
  20. abstract def listFundedAddresses(): Future[Vector[(AddressDb, CurrencyUnit)]]
  21. abstract def listSpentAddresses(): Future[Vector[AddressDb]]
  22. abstract def listTransactions(): Future[Vector[TransactionDb]]
  23. abstract def listUnusedAddresses(): Future[Vector[AddressDb]]
  24. abstract def listUtxos(state: TxoState): Future[Vector[SpendingInfoDb]]
  25. abstract def listUtxos(tag: AddressTag): Future[Vector[SpendingInfoDb]]
  26. abstract def listUtxos(): Future[Vector[SpendingInfoDb]]

    Lists unspent transaction outputs in the wallet

    Lists unspent transaction outputs in the wallet

    returns

    Vector[SpendingInfoDb]

  27. abstract def makeOpReturnCommitment(message: String, hashMessage: Boolean, feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  28. abstract def markUTXOsAsReserved(tx: Transaction): Future[Vector[SpendingInfoDb]]

    Marks all utxos that are ours in this transactions as reserved

  29. abstract def markUTXOsAsReserved(utxos: Vector[SpendingInfoDb]): Future[Vector[SpendingInfoDb]]
  30. abstract val nodeApi: NodeApi
  31. abstract def processTransaction(transaction: Transaction, blockHash: Option[DoubleSha256DigestBE]): Future[WalletApi]

    Processes the given transaction, updating our DB state if it's relevant to us.

    Processes the given transaction, updating our DB state if it's relevant to us.

    transaction

    The transaction we're processing

    blockHash

    Containing block hash

  32. abstract def sendFromOutPoints(outPoints: Vector[TransactionOutPoint], address: BitcoinAddress, amount: CurrencyUnit, feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  33. abstract def sendToAddress(address: BitcoinAddress, amount: CurrencyUnit, feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]

    Sends money to the address

    Sends money to the address

    todo: add error handling to signature

  34. abstract def sendToAddresses(addresses: Vector[BitcoinAddress], amounts: Vector[CurrencyUnit], feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  35. abstract def sendToOutputs(outputs: Vector[TransactionOutput], feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  36. abstract def sendWithAlgo(address: BitcoinAddress, amount: CurrencyUnit, feeRate: FeeUnit, algo: CoinSelectionAlgo)(implicit ec: ExecutionContext): Future[Transaction]
  37. abstract def start(): Future[Unit]
  38. abstract def stop(): Unit
  39. abstract def unmarkUTXOsAsReserved(tx: Transaction): Future[Vector[SpendingInfoDb]]

    Unmarks all utxos that are ours in this transactions indicating they are no longer reserved

  40. abstract def unmarkUTXOsAsReserved(utxos: Vector[SpendingInfoDb]): Future[Vector[SpendingInfoDb]]
  41. abstract def updateUtxoPendingStates(blockHeader: BlockHeader): Future[Vector[SpendingInfoDb]]

    Takes in a block header and updates our TxoStates to the new chain tip

    Takes in a block header and updates our TxoStates to the new chain tip

    blockHeader

    Block header we are processing

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def broadcastTransaction(transaction: Transaction): Future[Unit]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def determineFeeRate(feeRateOpt: Option[FeeUnit]): Future[FeeUnit]
    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def getAddressInfo(spendingInfoDb: SpendingInfoDb, networkParameters: NetworkParameters): Future[Option[AddressInfo]]
  11. def getBalance(tag: AddressTag)(implicit ec: ExecutionContext): Future[CurrencyUnit]

    Gets the sum of all UTXOs in this wallet with the address tag

  12. def getBalance()(implicit ec: ExecutionContext): Future[CurrencyUnit]

    Gets the sum of all UTXOs in this wallet

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def logger(implicit config: LoggerConfig): Logger
    Attributes
    protected[bitcoins]
    Definition Classes
    WalletLogger
  17. def makeOpReturnCommitment(message: String, hashMessage: Boolean, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def processTransactions(transactions: Vector[Transaction], blockHash: Option[DoubleSha256DigestBE])(implicit ec: ExecutionContext): Future[WalletApi]
  22. def sendFromOutPoints(outPoints: Vector[TransactionOutPoint], address: BitcoinAddress, amount: CurrencyUnit, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  23. def sendToAddress(address: BitcoinAddress, amount: CurrencyUnit, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  24. def sendToAddresses(addresses: Vector[BitcoinAddress], amounts: Vector[CurrencyUnit], feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]

    Sends funds to each address

  25. def sendToOutputs(outputs: Vector[TransactionOutput], feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]

    Sends funds using the specified outputs

    Sends funds using the specified outputs

    todo: add error handling to signature

  26. def sendWithAlgo(address: BitcoinAddress, amount: CurrencyUnit, feeRateOpt: Option[FeeUnit], algo: CoinSelectionAlgo)(implicit ec: ExecutionContext): Future[Transaction]
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from WalletLogger

Inherited from AnyRef

Inherited from Any

Ungrouped