From df5f76715c556751a49f626d2b1174e1ffc3f49c Mon Sep 17 00:00:00 2001 From: hukla <129692708+huklaa@users.noreply.github.com> Date: Wed, 12 Aug 2026 01:05:45 +0300 Subject: [PATCH] docs: use component terminology for exported methods --- docs/src/miden-bank/01-account-components.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/miden-bank/01-account-components.md b/docs/src/miden-bank/01-account-components.md index a4000cf..2045b33 100644 --- a/docs/src/miden-bank/01-account-components.md +++ b/docs/src/miden-bank/01-account-components.md @@ -240,11 +240,11 @@ The bank requires initialization before accepting deposits: `require_initialized ### Exported vs Internal Methods -- **Trait methods** (declared in the `#[component] trait`) are exposed in the generated WIT interface and can be called by other contracts +- **Trait methods** (declared in the `#[component] trait`) are exposed in the generated WIT interface and can be called by other components - **Inherent helpers** (in the plain `impl BankStorage`) are internal and cannot be called from the outside ```rust -// Exported: Can be called by note scripts and other contracts +// Exported: Can be called by note scripts and other components fn get_depositor_balance(&self, depositor: AccountId, asset: Asset) -> Felt { ... } // Internal helper, not exposed @@ -497,7 +497,7 @@ impl BankStorage { 2. **`StorageValue`** stores a single Word, read with `.get()`, write with `.set()` 3. **`StorageMap`** stores key-value pairs, access with `.get()` and `.set()` 4. **Storage slots** are identified by name (IDs derived from hashed slot names), each holds 4 Felts (32 bytes) -5. **Trait methods** (declared in the `#[component] trait`) are callable by other contracts via generated bindings; private helpers live in a plain `impl` block +5. **Trait methods** (declared in the `#[component] trait`) are callable by other components via generated bindings; private helpers live in a plain `impl` block :::tip View Complete Source See the complete bank account implementation in [contracts/bank-account/src/lib.rs](https://github.com/0xMiden/miden-tutorials/blob/main/examples/miden-bank/contracts/bank-account/src/lib.rs).