Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Dec 7, 2024
1 parent 0ef4ecd commit 970a620
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
52 changes: 52 additions & 0 deletions frameworks/bitcoin-move/doc/bbn.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- [Struct `BBNScriptPaths`](#0x4_bbn_BBNScriptPaths)
- [Struct `BBNStakingEvent`](#0x4_bbn_BBNStakingEvent)
- [Struct `BBNStakingFailedEvent`](#0x4_bbn_BBNStakingFailedEvent)
- [Struct `BBNStakingUnbondingEvent`](#0x4_bbn_BBNStakingUnbondingEvent)
- [Struct `TempStateDropEvent`](#0x4_bbn_TempStateDropEvent)
- [Constants](#@Constants_0)
- [Function `genesis_init`](#0x4_bbn_genesis_init)
- [Function `init_for_upgrade`](#0x4_bbn_init_for_upgrade)
Expand All @@ -22,6 +24,8 @@
- [Function `is_possible_bbn_transaction`](#0x4_bbn_is_possible_bbn_transaction)
- [Function `process_bbn_tx_entry`](#0x4_bbn_process_bbn_tx_entry)
- [Function `process_bbn_transaction`](#0x4_bbn_process_bbn_transaction)
- [Function `on_utxo_spend`](#0x4_bbn_on_utxo_spend)
- [Function `remove_bbn_seal`](#0x4_bbn_remove_bbn_seal)
- [Function `add_temp_state`](#0x4_bbn_add_temp_state)
- [Function `contains_temp_state`](#0x4_bbn_contains_temp_state)
- [Function `borrow_temp_state`](#0x4_bbn_borrow_temp_state)
Expand All @@ -45,6 +49,7 @@
<b>use</b> <a href="">0x1::vector</a>;
<b>use</b> <a href="">0x2::bcs</a>;
<b>use</b> <a href="">0x2::event</a>;
<b>use</b> <a href="">0x2::event_queue</a>;
<b>use</b> <a href="">0x2::object</a>;
<b>use</b> <a href="">0x2::result</a>;
<b>use</b> <a href="">0x2::sort</a>;
Expand Down Expand Up @@ -159,6 +164,31 @@



<a name="0x4_bbn_BBNStakingUnbondingEvent"></a>

## Struct `BBNStakingUnbondingEvent`



<pre><code><b>struct</b> <a href="bbn.md#0x4_bbn_BBNStakingUnbondingEvent">BBNStakingUnbondingEvent</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>



<a name="0x4_bbn_TempStateDropEvent"></a>

## Struct `TempStateDropEvent`

Event emitted when the temporary state of a BBNStakeSeal is dropped
The temporary state is dropped when the UTXO is spent
The event is onchain event, and the event_queue name is type_name of the temporary state


<pre><code><b>struct</b> <a href="bbn.md#0x4_bbn_TempStateDropEvent">TempStateDropEvent</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>



<a name="@Constants_0"></a>

## Constants
Expand Down Expand Up @@ -446,6 +476,28 @@ Use <code><a href="bbn_updater.md#0x4_bbn_updater_process_bbn_tx_entry">bbn_upda



<a name="0x4_bbn_on_utxo_spend"></a>

## Function `on_utxo_spend`



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="bbn.md#0x4_bbn_on_utxo_spend">on_utxo_spend</a>(<a href="utxo.md#0x4_utxo">utxo</a>: &<b>mut</b> <a href="utxo.md#0x4_utxo_UTXO">utxo::UTXO</a>)
</code></pre>



<a name="0x4_bbn_remove_bbn_seal"></a>

## Function `remove_bbn_seal`



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="bbn.md#0x4_bbn_remove_bbn_seal">remove_bbn_seal</a>(seal_obj_id: <a href="_ObjectID">object::ObjectID</a>)
</code></pre>



<a name="0x4_bbn_add_temp_state"></a>

## Function `add_temp_state`
Expand Down
14 changes: 14 additions & 0 deletions frameworks/bitcoin-move/doc/bbn_updater.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
- [Function `is_possible_bbn_tx`](#0x4_bbn_updater_is_possible_bbn_tx)
- [Function `process_bbn_tx_entry`](#0x4_bbn_updater_process_bbn_tx_entry)
- [Function `is_expired`](#0x4_bbn_updater_is_expired)
- [Function `clear_unbonded_stakes`](#0x4_bbn_updater_clear_unbonded_stakes)


<pre><code><b>use</b> <a href="">0x1::option</a>;
<b>use</b> <a href="">0x2::object</a>;
<b>use</b> <a href="bbn.md#0x4_bbn">0x4::bbn</a>;
<b>use</b> <a href="bitcoin.md#0x4_bitcoin">0x4::bitcoin</a>;
<b>use</b> <a href="types.md#0x4_types">0x4::types</a>;
<b>use</b> <a href="utxo.md#0x4_utxo">0x4::utxo</a>;
</code></pre>


Expand Down Expand Up @@ -65,3 +68,14 @@ If the transaction contains an OP_RETURN output with the correct tag, it is cons

<pre><code><b>public</b> <b>fun</b> <a href="bbn_updater.md#0x4_bbn_updater_is_expired">is_expired</a>(stake: &<a href="bbn.md#0x4_bbn_BBNStakeSeal">bbn::BBNStakeSeal</a>): bool
</code></pre>



<a name="0x4_bbn_updater_clear_unbonded_stakes"></a>

## Function `clear_unbonded_stakes`



<pre><code><b>public</b> entry <b>fun</b> <a href="bbn_updater.md#0x4_bbn_updater_clear_unbonded_stakes">clear_unbonded_stakes</a>(seal_obj_id: <a href="_ObjectID">object::ObjectID</a>)
</code></pre>

0 comments on commit 970a620

Please sign in to comment.