trait WalletApi extends StartStopAsync[WalletApi]

API for the wallet project.

This wallet API is BIP44 compliant.

See also

BIP44

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WalletApi
  2. StartStopAsync
  3. StartStop
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def bumpFeeCPFP(txId: DoubleSha256DigestBE, feeRate: FeeUnit): Future[Transaction]

    Bumps the fee of the parent transaction with a new child transaction with the given fee rate

  2. abstract def bumpFeeRBF(txId: DoubleSha256DigestBE, newFeeRate: FeeUnit): Future[Transaction]
  3. abstract val chainQueryApi: ChainQueryApi
  4. abstract def clearAllAddresses(): Future[WalletApi]
  5. abstract def clearAllUtxos(): Future[WalletApi]

    Removes all utxos from the wallet.

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

  6. abstract val creationTime: Instant
  7. abstract def dropAddressTag(addressTagDb: AddressTagDb): Future[Int]
  8. abstract def dropAddressTagName(address: BitcoinAddress, tagName: AddressTagName): Future[Int]
  9. abstract def dropAddressTagType(address: BitcoinAddress, addressTagType: AddressTagType): Future[Int]
  10. abstract def dropAddressTagType(addressTagType: AddressTagType): Future[Int]
  11. abstract val feeRateApi: FeeRateApi
  12. abstract def findByOutPoints(outPoints: Vector[TransactionOutPoint]): Future[Vector[SpendingInfoDb]]
  13. abstract def findByScriptPubKey(scriptPubKey: ScriptPubKey): Future[Vector[SpendingInfoDb]]
  14. abstract def findByTxIds(txIds: Vector[DoubleSha256DigestBE]): Future[Vector[TransactionDb]]
  15. abstract def findOutputsBeingSpent(tx: Transaction): Future[Vector[SpendingInfoDb]]

    Finds all the outputs in our wallet being spent in the given transaction

  16. abstract def findTransaction(txId: DoubleSha256DigestBE): Future[Option[TransactionDb]]
  17. abstract def fundRawTransaction(destinations: Vector[TransactionOutput], feeRate: FeeUnit, fromTagOpt: Option[AddressTag], markAsReserved: Boolean): Future[FundRawTxHelper[ShufflingNonInteractiveFinalizer]]

    Funds a transaction from the wallet.

    Funds a transaction from the wallet.

    returns

    funded transaction send funds to desinations with the given fee rate

  18. 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

  19. abstract def getAddressTags(tagType: AddressTagType): Future[Vector[AddressTagDb]]
  20. abstract def getAddressTags(): Future[Vector[AddressTagDb]]
  21. abstract def getAddressTags(address: BitcoinAddress, tagType: AddressTagType): Future[Vector[AddressTagDb]]
  22. abstract def getAddressTags(address: BitcoinAddress): Future[Vector[AddressTagDb]]
  23. abstract def getConfirmedBalance(tag: AddressTag): Future[CurrencyUnit]
  24. abstract def getConfirmedBalance(): Future[CurrencyUnit]

    Gets the sum of all confirmed UTXOs in this wallet

  25. abstract def getInfo(): Future[WalletInfo]
  26. abstract def getNewAddress(tags: Vector[AddressTag]): Future[BitcoinAddress]
  27. abstract def getNewAddress(addressType: AddressType, tags: Vector[AddressTag]): Future[BitcoinAddress]
  28. 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.

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

    Gets a new external address with the specified type.

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

    Generates a new change address

    Generates a new change address

    Attributes
    protected[wallet]
  31. abstract def getSyncDescriptorOpt(): Future[Option[SyncHeightDescriptor]]
  32. abstract def getSyncState(): Future[BlockSyncState]
  33. abstract def getUnconfirmedBalance(tag: AddressTag): Future[CurrencyUnit]
  34. abstract def getUnconfirmedBalance(): Future[CurrencyUnit]

    Gets the sum of all unconfirmed UTXOs in this wallet

  35. 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.

  36. 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.

  37. abstract def getWalletName(): Future[String]
  38. abstract def isChange(output: TransactionOutput): Future[Boolean]

    Determines if the given output is from this wallet and is a change output from this wallet

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

    Checks if the wallet contains any data

  40. abstract def isRescanning(): Future[Boolean]
  41. abstract def keyManager: KeyManagerApi
  42. abstract def listAddresses(): Future[Vector[AddressDb]]
  43. abstract def listFundedAddresses(): Future[Vector[(AddressDb, CurrencyUnit)]]
  44. abstract def listScriptPubKeys(): Future[Vector[ScriptPubKeyDb]]
  45. abstract def listSpentAddresses(): Future[Vector[AddressDb]]
  46. abstract def listTransactions(): Future[Vector[TransactionDb]]
  47. abstract def listUnusedAddresses(): Future[Vector[AddressDb]]
  48. abstract def listUtxos(state: TxoState): Future[Vector[SpendingInfoDb]]
  49. abstract def listUtxos(tag: AddressTag): Future[Vector[SpendingInfoDb]]
  50. abstract def listUtxos(): Future[Vector[SpendingInfoDb]]

    Lists unspent transaction outputs in the wallet

    Lists unspent transaction outputs in the wallet

    returns

    Vector[SpendingInfoDb]

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

    Marks all utxos that are ours in this transactions as reserved

  53. abstract def markUTXOsAsReserved(utxos: Vector[SpendingInfoDb]): Future[Vector[SpendingInfoDb]]
  54. abstract val nodeApi: NodeApi
  55. abstract def processBlock(block: Block): Future[WalletApi]

    Processes the give block, updating our DB state if it's relevant to us.

    Processes the give block, updating our DB state if it's relevant to us.

    block

    The block we're processing

  56. abstract def processOurTransaction(transaction: Transaction, feeRate: FeeUnit, inputAmount: CurrencyUnit, sentAmount: CurrencyUnit, blockHashOpt: Option[DoubleSha256DigestBE], newTags: Vector[AddressTag]): Future[ProcessTxResult]

    Processes TXs originating from our wallet.

    Processes TXs originating from our wallet. This is called right after we've signed a TX, updating our UTXO state.

  57. abstract def processTransaction(transaction: Transaction, blockHashOpt: 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

  58. abstract def sendFromOutPoints(outPoints: Vector[TransactionOutPoint], address: BitcoinAddress, feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  59. abstract def sendFromOutPoints(outPoints: Vector[TransactionOutPoint], address: BitcoinAddress, amount: CurrencyUnit, feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  60. 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

  61. abstract def sendToAddresses(addresses: Vector[BitcoinAddress], amounts: Vector[CurrencyUnit], feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  62. abstract def sendToOutputs(outputs: Vector[TransactionOutput], feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]
  63. abstract def sendWithAlgo(address: BitcoinAddress, amount: CurrencyUnit, feeRate: FeeUnit, algo: CoinSelectionAlgo)(implicit ec: ExecutionContext): Future[Transaction]
  64. abstract def start(): Future[WalletApi]
    Definition Classes
    WalletApiStartStop
  65. abstract def stop(): Future[WalletApi]
    Definition Classes
    WalletApiStartStop
  66. abstract def sweepWallet(address: BitcoinAddress, feeRate: FeeUnit)(implicit ec: ExecutionContext): Future[Transaction]

    Sends the entire wallet balance to the given address

  67. abstract def tagAddress(address: BitcoinAddress, tag: AddressTag): Future[AddressTagDb]

    Tags the address with the address tag, updates the tag if one of tag's TagType already exists

  68. abstract def unmarkUTXOsAsReserved(tx: Transaction): Future[Vector[SpendingInfoDb]]

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

  69. abstract def unmarkUTXOsAsReserved(utxos: Vector[SpendingInfoDb]): Future[Vector[SpendingInfoDb]]
  70. abstract def updateUtxoPendingStates(): Future[Vector[SpendingInfoDb]]

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

  71. abstract def watchScriptPubKey(scriptPubKey: ScriptPubKey): Future[ScriptPubKeyDb]

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()
  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 finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. def findByOutPoint(outPoint: TransactionOutPoint)(implicit ec: ExecutionContext): Future[Option[SpendingInfoDb]]
  12. def findByTxId(txId: DoubleSha256Digest)(implicit ec: ExecutionContext): Future[Option[TransactionDb]]
  13. def findByTxId(txId: DoubleSha256DigestBE)(implicit ec: ExecutionContext): Future[Option[TransactionDb]]
  14. def getAddressInfo(spendingInfoDb: SpendingInfoDb, networkParameters: NetworkParameters): Future[Option[AddressInfo]]
  15. def getBalance(tag: AddressTag)(implicit ec: ExecutionContext): Future[CurrencyUnit]

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

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

    Gets the sum of all UTXOs in this wallet

  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def getFeeRate(): Future[FeeUnit]
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def makeOpReturnCommitment(message: String, hashMessage: Boolean, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def processTransactions(transactions: Vector[Transaction], blockHashOpt: Option[DoubleSha256DigestBE])(implicit ec: ExecutionContext): Future[WalletApi]
  26. def sendFromOutPoints(outPoints: Vector[TransactionOutPoint], address: BitcoinAddress, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  27. def sendFromOutPoints(outPoints: Vector[TransactionOutPoint], address: BitcoinAddress, amount: CurrencyUnit, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  28. def sendToAddress(address: BitcoinAddress, amount: CurrencyUnit, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]
  29. def sendToAddresses(addresses: Vector[BitcoinAddress], amounts: Vector[CurrencyUnit], feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]

    Sends funds to each address

  30. 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

  31. def sendWithAlgo(address: BitcoinAddress, amount: CurrencyUnit, feeRateOpt: Option[FeeUnit], algo: CoinSelectionAlgo)(implicit ec: ExecutionContext): Future[Transaction]
  32. def sweepWallet(address: BitcoinAddress, feeRateOpt: Option[FeeUnit])(implicit ec: ExecutionContext): Future[Transaction]

    Sends the entire wallet balance to the given address

  33. def sweepWallet(address: BitcoinAddress)(implicit ec: ExecutionContext): Future[Transaction]

    Sends the entire wallet balance to the given address

  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from StartStopAsync[WalletApi]

Inherited from StartStop[Future[WalletApi]]

Inherited from AnyRef

Inherited from Any

Ungrouped