Skip to content

Commit 27114f3

Browse files
committed
Automated update of documentation
1 parent 3a4afee commit 27114f3

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/miden-base/architecture/transactions/contexts.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,21 @@ proc.add_note_assets_to_account
4040
while.true
4141
...
4242
43-
# load the asset and add it to the account
44-
mem_loadw call.wallet::receive_asset
43+
# load the asset
44+
mem_loadw
4545
# => [ASSET, ptr, end_ptr, ...]
46+
47+
# pad the stack before call
48+
padw swapw padw padw swapdw
49+
# => [ASSET, pad(12), ptr, end_ptr, ...]
50+
51+
# add asset to the account
52+
call.wallet::receive_asset
53+
# => [pad(16), ptr, end_ptr, ...]
54+
55+
# clean the stack after call
56+
dropw dropw dropw
57+
# => [0, 0, 0, 0, ptr, end_ptr, ...]
4658
...
4759
end
4860
...
@@ -64,7 +76,7 @@ The [account API](https://github.com/0xPolygonMiden/miden-base/blob/main/miden-l
6476
#! Add the specified asset to the vault.
6577
#! ...
6678
export.add_asset
67-
exec.kernel_proc_offsets::account_vault_add_asset_offset
79+
exec.kernel_proc_offsets::account_add_asset_offset
6880
syscall.exec_kernel_proc
6981
end
7082
```

src/miden-base/architecture/transactions/kernel.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ If provided, the transaction script is executed after all notes are consumed. Th
9494
use.miden::contracts::auth::basic->auth_tx
9595
9696
begin
97+
padw padw padw padw
9798
call.auth_tx::auth_tx_rpo_falcon512
99+
dropw dropw dropw dropw
98100
end
99101
```
100102

src/miden-base/architecture/transactions/procedures.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ To import the note procedures, set `use.miden::note` at the beginning of the fil
3939
| `get_inputs` | `[dest_ptr]` | `[dest_ptr]` | note | <ul> <li>Writes the inputs of the currently executed note into memory starting at the specified address, `dest_ptr`. </li> </ul> |
4040
| `get_sender` | `[]` | `[sender]` | note | <ul> <li>Returns the `sender` of the note currently being processed. Panics if a note is not being processed. </li> </ul> |
4141
| `compute_inputs_hash` | `[inputs_ptr, num_inputs]` | `[HASH]` | note | <ul> <li>Computes hash of note inputs starting at the specified memory address.</li> </ul> |
42+
| `get_note_serial_number`| `[]` | `[SERIAL_NUMBER]` | note | <ul> <li>Returns the serial number of the note currently being processed.</li> </ul> |
43+
| `get_script_hash` | `[]` | `[SCRIPT_HASH]` | note | <ul> <li>Returns the script hash of the note currently being processed.</li> </ul> |
4244

4345
### Tx
4446

@@ -48,8 +50,8 @@ To import the transaction procedures set `use.miden::tx` at the beginning of the
4850
| ----------------------- | ------------------------- | ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4951
| `get_block_number` | `[]` | `[num]` | account, note | <ul> <li>Returns the block number `num` of the last known block at the time of transaction execution. |
5052
| `get_block_hash` | `[]` | `[H]` | account, note | <ul> <li>Returns the block hash `H` of the last known block at the time of transaction execution.</li> </ul> |
51-
| `get_input_notes_hash` | `[]` | `[COM]` | account, note | <ul> <li>Returns the input notes hash `COM`. </li><li>This is computed as a sequential hash of (nullifier, empty_word_or_note_hash) tuples over all input notes. The `empty_word_or_notes_hash` functions as a flag, if the value is set to zero, then the notes are authenticated by the transaction kernel. If the value is non-zero, then note authentication will be delayed to the batch/block kernel. The delayed authentication allows a transaction to consume a public note that is not yet included to a block. </li> </ul> |
52-
| `get_output_notes_hash` | `[0, 0, 0, 0]` | `[COM]` | account, note | <ul> <li>Returns the output notes hash `COM`. </li><li>This is computed as a sequential hash of (note_id, note_metadata) tuples over all output notes. </li> </ul> |
53+
| `get_input_notes_commitment` | `[]` | `[COM]` | account, note | <ul> <li>Returns the input notes hash `COM`. </li><li>This is computed as a sequential hash of (nullifier, empty_word_or_note_hash) tuples over all input notes. The `empty_word_or_notes_hash` functions as a flag, if the value is set to zero, then the notes are authenticated by the transaction kernel. If the value is non-zero, then note authentication will be delayed to the batch/block kernel. The delayed authentication allows a transaction to consume a public note that is not yet included to a block. </li> </ul> |
54+
| `get_output_notes_commitment` | `[0, 0, 0, 0]` | `[COM]` | account, note | <ul> <li>Returns the output notes hash `COM`. </li><li>This is computed as a sequential hash of (note_id, note_metadata) tuples over all output notes. </li> </ul> |
5355
| `create_note` | `[ASSET, tag, RECIPIENT]` | `[ptr]` | account | <ul> <li>Creates a new note and returns a pointer to the memory address at which the note is stored.</li><li> `ASSET` is the asset to be included in the note. </li><li>`tag` is the tag to be included in the note. `RECIPIENT` is the recipient of the note.</li><li> `ptr` is the pointer to the memory address at which the note is stored.</li> </ul> |
5456

5557
### Asset

0 commit comments

Comments
 (0)