Expand description
§Functions for creating Zcash transactions that spend funds belonging to the wallet
This module contains several different ways of creating Zcash transactions. This module is designed around the idea that a Zcash wallet holds its funds in notes in either the Orchard or Sapling shielded pool. In order to better preserve users’ privacy, it does not provide any functionality that allows users to directly spend transparent funds except by sending them to a shielded internal address belonging to their wallet.
The important high-level operations provided by this module are propose_transfer
,
and create_proposed_transactions
.
propose_transfer
takes a TransactionRequest
object, selects inputs notes and
computes the fees required to satisfy that request, and returns a Proposal
object that
describes the transaction to be made.
create_proposed_transactions
constructs one or more Zcash [Transaction
]s based upon a
provided Proposal
, stores them to the wallet database, and returns the [TxId
] for each
constructed transaction to the caller. The caller can then use the
WalletRead::get_transaction
method to retrieve the newly constructed transactions. It is
the responsibility of the caller to retrieve and serialize the transactions and submit them for
inclusion into the Zcash blockchain.
Another important high-level operation provided by this module is propose_shielding
, which
takes a set of transparent source addresses, and constructs a Proposal
to send those funds
to a wallet-internal shielded address, as described in ZIP 316.
Modules§
- input_
selection - Types related to the process of selecting inputs to be spent given a transaction request.
Functions§
- create_
proposed_ transactions - Construct, prove, and sign a transaction or series of transactions using the inputs supplied by the given proposal, and persist it to the wallet database.
- decrypt_
and_ store_ transaction - Scans a [
Transaction
] for any information that can be decrypted by the accounts in the wallet, and saves it to the wallet. - propose_
shielding transparent-inputs
- Constructs a proposal to shield all of the funds belonging to the provided set of addresses.
- propose_
standard_ transfer_ to_ address - Proposes making a payment to the specified address from the given account.
- propose_
transfer - Select transaction inputs, compute fees, and construct a proposal for a transaction or series
of transactions that can then be authorized and made ready for submission to the network with
create_proposed_transactions
. - shield_
transparent_ funds transparent-inputs
- Constructs a transaction that consumes available transparent UTXOs belonging to the specified secret key, and sends them to the most-preferred receiver of the default internal address for the provided Unified Spending Key.
Type Aliases§
- Create
ErrT - Errors that may be generated in combined creation and execution of transaction proposals.
- Propose
Shielding ErrT transparent-inputs
- Errors that may be generated in construction of proposals for transparent->shielded wallet-internal transfers.
- Propose
Transfer ErrT - Errors that may be generated in construction of proposals for shielded->shielded or shielded->transparent transfers.
- Shield
ErrT transparent-inputs
- Errors that may be generated in the execution of shielding proposals.
- Transfer
ErrT - Errors that may be generated in the execution of proposals that may send shielded inputs.