Using the view and custody services to construct a transaction has four steps.
TransactionPlanner RPC in the view service, compute a
This RPC translates a general intent, like “send these tokens to this address” into a fully deterministic plan of the exact transaction, with all spends and outputs, all blinding factors selected, and so on.
TransactionPlan in hand, use the
RPC to request authorization of the transaction from the custody service.
Note that authorization happens on the cleartext transaction plan, not the shielded transaction, so that the custodian can inspect the transaction before signing it.
AuthorizationData in hand, use the
WitnessAndBuild RPC to have the view service build the transaction, using the latest witness data to construct the ZK proofs.
With the resulting shielded
Transaction complete, use the
request to broadcast the transaction to the network.
await_detection parameter will wait for the transaction to be confirmed
await_detection is a simple way to ensure that different
transactions can’t conflict with each other.