Skip to content

Commit 912eb29

Browse files
authored
Merge pull request #113 from ChainSafe/irubido/updateWebZJSWalletComments
webzjs-wallet description comments update
2 parents 1878524 + 88f585b commit 912eb29

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

crates/webzjs-wallet/src/bindgen/wallet.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,19 @@ pub type NoteRef = <MemoryWalletDb<Network> as InputSource>::NoteRef;
7979
/// The proposal should be presented to the user for review before being authorized.
8080
///
8181
/// To authorize the transaction the caller must currently provide the seed phrase and account index of the account that will be used to sign the transaction. This method also perform the SNARK proving which is an expensive operation and performed in parallel by a series of WebWorkers.
82-
/// Note: Handing the sensitive key material this way is not recommended for production applications. Upcoming changes to how proposals are authorized will allow separation of proof generation and signing but currently these are coupled.
8382
///
8483
/// Finally, A transaction can be sent to the network by calling `send_authorized_transactions` with the list of transaction IDs that were generated by the authorization step.
8584
///
85+
/// ## PCZT Transactions
86+
///
87+
/// PCZT (Partially Constructed Zcash Transaction)
88+
///
89+
/// 1. **`pczt_create`** - Creates a PCZT which designates how funds from this account can be spent to realize the requested transfer (does NOT sign, generate proofs, or send)
90+
/// 2. **`pczt_sign`** - Signs the PCZT using USK (should be done in secure environment)
91+
/// 3. **`pczt_prove`** - Creates and inserts proofs for the PCZT
92+
///
8693
/// The full flow looks like
87-
/// ```javascript
88-
/// const proposal = wallet.propose_transfer(1, "...", 100000000);
89-
/// const authorized_txns = wallet.create_proposed_transactions(proposal, "...", 1);
90-
/// await wallet.send_authorized_transactions(authorized_txns);
94+
/// The full PCZT flow: `pczt_create` → `pczt_sign` → `pczt_prove` → `pczt_send`
9195
/// ```
9296
///
9397
#[wasm_bindgen]

0 commit comments

Comments
 (0)