document contract account binding

This commit is contained in:
wiesche
2026-09-04 21:00:37 +02:00
parent 3d5b769511
commit 7bd69374af
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! Test a wallet doing contracts with different accounts and switching between them
//! Test that a contract stays with its original account after switching accounts
// #[macro_use]
extern crate grin_wallet_controller as wallet;
extern crate grin_wallet_impls as impls;
+3
View File
@@ -38,6 +38,9 @@ is used for the fee estimate, so any required inputs need enough confirmations a
A value of `0` allows unconfirmed non-coinbase outputs. Open contracts do not reserve funds,
so a late-locked contract can fail if another transaction spends the available outputs first.
Each side's account is fixed when it first joins the contract. Changing the active account
later does not affect setup or signing; they use the account stored in the context.
## View and revoke
`view` reads a slate or Slatepack and shows its inputs and outputs when present, fees,
-2
View File
@@ -62,8 +62,6 @@ Separating side effects until the 'save_step' part would make these functions mu
- Add full API and RPC examples once the contract interface is stable.
- Separate side effects out from the computation, as described above.
- Store transactions in LMDB so they can be committed with the wallet state.
- Decide whether `contract_accounts_switch.rs` is a legitimate scenario, or whether
signing under a different account than setup should error.
### Side-effects
+1
View File
@@ -118,6 +118,7 @@ pub struct ContractSetupArgsAPI {
/// The human readable account name from which to draw outputs
/// for the transaction, overriding whatever the active account is as set via the
/// [`set_active_account`](../grin_wallet_api/owner/struct.Owner.html#method.set_active_account) method.
/// Only used when creating the local contract context
pub src_acct_name: Option<String>,
/// The net change we will agree on. The amount is in nanogrins (`1 G = 1_000_000_000nG`).
/// The value is positive when we are on the receiving end and negative when we are the sender.