Skip to content

Commit

Permalink
[Documents] Make the move document exclude impl and private fun (#1079)
Browse files Browse the repository at this point in the history
* [Documents] Make the move document do not include impl and private fun

* Update readme
jolestar authored Oct 31, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 718449d commit 34be22c
Showing 70 changed files with 19 additions and 9,960 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,22 @@
* **X-Chain Rollup**: Rooch(Execution) + X-Chain(Settlement + Arbitration) + DA
* **Sovereign Rollup**: Rooch + DA

## Developer Network Information

* Name: dev
* ChainID: 20230103
* RPC: https://dev-seed.rooch.network/

Please refer to [Connect to Developer Test Network](https://rooch.network/docs/developer-guides/connect-devnet) for more information.

## MoveStd & MoveosStd & RoochFramework documentation

* std: 0x1 [MoveStdlib](./moveos/moveos-stdlib/move-stdlib/doc)
* moveos_std: 0x2 [MoveosStdlib](./moveos/moveos-stdlib/moveos-stdlib/doc)
* rooch_framework: 0x3 [RoochFramework](./crates/rooch-framework/doc/)

Please refer to [Rooch's built-in library](https://rooch.network/docs/developer-guides/library) for more information.

## Getting Started

1. Building from source:
@@ -43,6 +59,7 @@
rooch server start
```
* *`RUST_LOG=debug rooch server start` for debugging information*
* You can directly use the devnet and skip this step.

6. Publishing the Move project
```bash
@@ -56,7 +73,7 @@
<details>
<summary>Storage Abstraction</summary>

- [Docs](./docs/website/pages/docs/tech-highlights/storage_abstraction.en-US.mdx)
- [Docs](https://rooch.network/docs/dive-into-rooch/storage-abstraction)

- Overview:

299 changes: 0 additions & 299 deletions crates/rooch-framework/doc/account.md

Large diffs are not rendered by default.

204 changes: 0 additions & 204 deletions crates/rooch-framework/doc/account_authentication.md
Original file line number Diff line number Diff line change
@@ -46,22 +46,6 @@ ValidatorType is a phantom type parameter that is used to distinguish between di



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>authentication_key: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Resource `AuthenticationKeys`
@@ -74,22 +58,6 @@ A resource that holds the authentication keys for this account.



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>authentication_keys: <a href="_TypeTable">type_table::TypeTable</a></code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Resource `InstalledAuthValidator`
@@ -102,22 +70,6 @@ A resource tha holds the auth validator ids for this account has installed.



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>validators: <a href="">vector</a>&lt;u64&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -194,22 +146,6 @@ max authentication key length



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_init_authentication_keys">init_authentication_keys</a>(ctx: &<b>mut</b> Context, <a href="account.md#0x3_account">account</a>: &<a href="">signer</a>) {
<b>let</b> authentication_keys = <a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a> {
authentication_keys: <a href="_new">type_table::new</a>(ctx),
};
<a href="_global_move_to">account_storage::global_move_to</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, <a href="account.md#0x3_account">account</a>, authentication_keys);
}
</code></pre>



</details>

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

## Function `get_authentication_key`
@@ -221,28 +157,6 @@ max authentication key length



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_get_authentication_key">get_authentication_key</a>&lt;ValidatorType&gt;(ctx: &Context, account_addr: <b>address</b>): Option&lt;<a href="">vector</a>&lt;u8&gt;&gt; {
<b>if</b>(!<a href="_global_exists">account_storage::global_exists</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, account_addr)){
<a href="_none">option::none</a>&lt;<a href="">vector</a>&lt;u8&gt;&gt;()
}<b>else</b>{
<b>let</b> authentication_keys = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, account_addr);
<b>if</b>(<a href="_contains">type_table::contains</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt;&gt;(&authentication_keys.authentication_keys)){
<a href="_some">option::some</a>(<a href="_borrow">type_table::borrow</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt;&gt;(&authentication_keys.authentication_keys).authentication_key)
}<b>else</b>{
<a href="_none">option::none</a>&lt;<a href="">vector</a>&lt;u8&gt;&gt;()
}
}
}
</code></pre>



</details>

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

## Function `rotate_authentication_key`
@@ -255,38 +169,6 @@ This function is used to rotate a resource account's authentication key, only th



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_rotate_authentication_key">rotate_authentication_key</a>&lt;ValidatorType&gt;(ctx: &<b>mut</b> Context, account_addr: <b>address</b>, new_auth_key: <a href="">vector</a>&lt;u8&gt;) {

<b>assert</b>!(
<a href="_length">vector::length</a>(&new_auth_key) &lt;= <a href="account_authentication.md#0x3_account_authentication_MAX_AUTHENTICATION_KEY_LENGTH">MAX_AUTHENTICATION_KEY_LENGTH</a>,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="account_authentication.md#0x3_account_authentication_ErrorMalformedAuthenticationKey">ErrorMalformedAuthenticationKey</a>)
);
<b>assert</b>!(
<a href="_global_exists">account_storage::global_exists</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, account_addr),
<a href="_not_found">error::not_found</a>(<a href="account_authentication.md#0x3_account_authentication_ErrorAuthenticationKeysResourceNotFound">ErrorAuthenticationKeysResourceNotFound</a>)
);

<b>let</b> authentication_keys = <a href="_global_borrow_mut">account_storage::global_borrow_mut</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, account_addr);
<b>if</b>(<a href="_contains">type_table::contains</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt;&gt;(&authentication_keys.authentication_keys)){
<b>let</b> authentication_key = <a href="_borrow_mut">type_table::borrow_mut</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt;&gt;(&<b>mut</b> authentication_keys.authentication_keys);
authentication_key.authentication_key = new_auth_key;
}<b>else</b>{
<b>let</b> authentication_key = <a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt; {
authentication_key: new_auth_key,
};
<a href="_add">type_table::add</a>(&<b>mut</b> authentication_keys.authentication_keys, authentication_key);
};
}
</code></pre>



</details>

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

## Function `remove_authentication_key`
@@ -299,30 +181,6 @@ This function is used to remove a resource account's authentication key, only th



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_remove_authentication_key">remove_authentication_key</a>&lt;ValidatorType&gt;(ctx: &<b>mut</b> Context, account_addr: <b>address</b>): <a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt; {
<b>assert</b>!(
<a href="_global_exists">account_storage::global_exists</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, account_addr),
<a href="_not_found">error::not_found</a>(<a href="account_authentication.md#0x3_account_authentication_ErrorAuthenticationKeysResourceNotFound">ErrorAuthenticationKeysResourceNotFound</a>)
);
<b>let</b> authentication_keys = <a href="_global_borrow_mut">account_storage::global_borrow_mut</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKeys">AuthenticationKeys</a>&gt;(ctx, account_addr);
<b>assert</b>!(
<a href="_contains">type_table::contains</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt;&gt;(&authentication_keys.authentication_keys),
<a href="_not_found">error::not_found</a>(<a href="account_authentication.md#0x3_account_authentication_ErrorAuthenticationKeyNotFound">ErrorAuthenticationKeyNotFound</a>)
);

<b>let</b> removed_authentication_key = <a href="_remove">type_table::remove</a>&lt;<a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">AuthenticationKey</a>&lt;ValidatorType&gt;&gt;(&<b>mut</b> authentication_keys.authentication_keys);
removed_authentication_key
}
</code></pre>



</details>

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

## Function `is_auth_validator_installed`
@@ -335,24 +193,6 @@ Return if the authentication validator is installed for the account at <code>acc



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_is_auth_validator_installed">is_auth_validator_installed</a>(ctx: &Context, account_addr: <b>address</b>, auth_validator_id: u64): bool {
<b>if</b>(<a href="_global_exists">account_storage::global_exists</a>&lt;<a href="account_authentication.md#0x3_account_authentication_InstalledAuthValidator">InstalledAuthValidator</a>&gt;(ctx, account_addr)){
<b>let</b> installed_auth_validator = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="account_authentication.md#0x3_account_authentication_InstalledAuthValidator">InstalledAuthValidator</a>&gt;(ctx, account_addr);
<a href="_contains">vector::contains</a>(&installed_auth_validator.validators, &auth_validator_id)
}<b>else</b>{
<b>false</b>
}
}
</code></pre>



</details>

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

## Function `install_auth_validator`
@@ -364,35 +204,6 @@ Return if the authentication validator is installed for the account at <code>acc



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_install_auth_validator">install_auth_validator</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> Context, account_signer: &<a href="">signer</a>) {
<b>let</b> validator = <a href="auth_validator_registry.md#0x3_auth_validator_registry_borrow_validator_by_type">auth_validator_registry::borrow_validator_by_type</a>&lt;ValidatorType&gt;(ctx);
<b>let</b> validator_id = <a href="auth_validator.md#0x3_auth_validator_validator_id">auth_validator::validator_id</a>(validator);
<b>let</b> account_addr = <a href="_address_of">signer::address_of</a>(account_signer);

<b>assert</b>!(
!<a href="account_authentication.md#0x3_account_authentication_is_auth_validator_installed">is_auth_validator_installed</a>(ctx, account_addr, validator_id),
<a href="_already_exists">error::already_exists</a>(<a href="account_authentication.md#0x3_account_authentication_ErrorAuthValidatorAlreadyInstalled">ErrorAuthValidatorAlreadyInstalled</a>));


<b>if</b>(!<a href="_global_exists">account_storage::global_exists</a>&lt;<a href="account_authentication.md#0x3_account_authentication_InstalledAuthValidator">InstalledAuthValidator</a>&gt;(ctx, account_addr)){
<b>let</b> installed_auth_validator = <a href="account_authentication.md#0x3_account_authentication_InstalledAuthValidator">InstalledAuthValidator</a> {
validators: <a href="_empty">vector::empty</a>(),
};
<a href="_global_move_to">account_storage::global_move_to</a>&lt;<a href="account_authentication.md#0x3_account_authentication_InstalledAuthValidator">InstalledAuthValidator</a>&gt;(ctx, account_signer, installed_auth_validator);
};
<b>let</b> installed_auth_validator = <a href="_global_borrow_mut">account_storage::global_borrow_mut</a>&lt;<a href="account_authentication.md#0x3_account_authentication_InstalledAuthValidator">InstalledAuthValidator</a>&gt;(ctx, account_addr);
<a href="_push_back">vector::push_back</a>(&<b>mut</b> installed_auth_validator.validators, validator_id);
}
</code></pre>



</details>

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

## Function `install_auth_validator_entry`
@@ -401,18 +212,3 @@ Return if the authentication validator is installed for the account at <code>acc

<pre><code><b>public</b> entry <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_install_auth_validator_entry">install_auth_validator_entry</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, account_signer: &<a href="">signer</a>)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> entry <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_install_auth_validator_entry">install_auth_validator_entry</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> Context, account_signer: &<a href="">signer</a>) {
<a href="account_authentication.md#0x3_account_authentication_install_auth_validator">install_auth_validator</a>&lt;ValidatorType&gt;(ctx, account_signer);
}
</code></pre>



</details>
438 changes: 0 additions & 438 deletions crates/rooch-framework/doc/account_coin_store.md

Large diffs are not rendered by default.

125 changes: 0 additions & 125 deletions crates/rooch-framework/doc/address_mapping.md
Original file line number Diff line number Diff line change
@@ -39,22 +39,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>mapping: <a href="_Table">table::Table</a>&lt;<a href="multichain_address.md#0x3_multichain_address_MultiChainAddress">multichain_address::MultiChainAddress</a>, <b>address</b>&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -80,22 +64,6 @@



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_genesis_init">genesis_init</a>(ctx: &<b>mut</b> Context, genesis_account: &<a href="">signer</a>) {
<b>let</b> mapping = <a href="_new">table::new</a>&lt;MultiChainAddress, <b>address</b>&gt;(ctx);
<a href="_global_move_to">account_storage::global_move_to</a>(ctx, genesis_account, <a href="address_mapping.md#0x3_address_mapping_AddressMapping">AddressMapping</a>{
mapping,
});
}
</code></pre>



</details>

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

## Function `resolve`
@@ -108,28 +76,6 @@ Resolve a multi-chain address to a rooch address



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_resolve">resolve</a>(ctx: &Context, maddress: MultiChainAddress): Option&lt;<b>address</b>&gt; {
<b>if</b> (<a href="multichain_address.md#0x3_multichain_address_is_rooch_address">multichain_address::is_rooch_address</a>(&maddress)) {
<b>return</b> <a href="_some">option::some</a>(<a href="multichain_address.md#0x3_multichain_address_into_rooch_address">multichain_address::into_rooch_address</a>(maddress))
};
<b>let</b> am = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="address_mapping.md#0x3_address_mapping_AddressMapping">AddressMapping</a>&gt;(ctx, @rooch_framework);
<b>if</b>(<a href="_contains">table::contains</a>(&am.mapping, maddress)){
<b>let</b> addr = <a href="_borrow">table::borrow</a>(&am.mapping, maddress);
<a href="_some">option::some</a>(*addr)
}<b>else</b>{
<a href="_none">option::none</a>()
}
}
</code></pre>



</details>

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

## Function `resolve_or_generate`
@@ -142,24 +88,6 @@ Resolve a multi-chain address to a rooch address, if not exists, generate a new



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_resolve_or_generate">resolve_or_generate</a>(ctx: &Context, maddress: MultiChainAddress): <b>address</b> {
<b>let</b> addr = <a href="address_mapping.md#0x3_address_mapping_resolve">resolve</a>(ctx, maddress);
<b>if</b>(<a href="_is_none">option::is_none</a>(&addr)){
<a href="address_mapping.md#0x3_address_mapping_generate_rooch_address">generate_rooch_address</a>(&maddress)
}<b>else</b>{
<a href="_extract">option::extract</a>(&<b>mut</b> addr)
}
}
</code></pre>



</details>

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

## Function `exists_mapping`
@@ -172,23 +100,6 @@ Check if a multi-chain address is bound to a rooch address



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_exists_mapping">exists_mapping</a>(ctx: &Context, maddress: MultiChainAddress): bool {
<b>if</b> (<a href="multichain_address.md#0x3_multichain_address_is_rooch_address">multichain_address::is_rooch_address</a>(&maddress)) {
<b>return</b> <b>true</b>
};
<b>let</b> am = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="address_mapping.md#0x3_address_mapping_AddressMapping">AddressMapping</a>&gt;(ctx, @rooch_framework);
<a href="_contains">table::contains</a>(&am.mapping, maddress)
}
</code></pre>



</details>

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

## Function `bind`
@@ -202,19 +113,6 @@ The caller need to ensure the relationship between the multi-chain address and t



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_bind">bind</a>(ctx: &<b>mut</b> Context, sender: &<a href="">signer</a>, maddress: MultiChainAddress) {
<a href="address_mapping.md#0x3_address_mapping_bind_no_check">bind_no_check</a>(ctx, <a href="_address_of">signer::address_of</a>(sender), maddress);
}
</code></pre>



</details>

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

## Function `bind_no_check`
@@ -224,26 +122,3 @@ Bind a rooch address to a multi-chain address

<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_bind_no_check">bind_no_check</a>(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, rooch_address: <b>address</b>, maddress: <a href="multichain_address.md#0x3_multichain_address_MultiChainAddress">multichain_address::MultiChainAddress</a>)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="address_mapping.md#0x3_address_mapping_bind_no_check">bind_no_check</a>(ctx: &<b>mut</b> Context, rooch_address: <b>address</b>, maddress: MultiChainAddress) {
<b>if</b>(<a href="multichain_address.md#0x3_multichain_address_is_rooch_address">multichain_address::is_rooch_address</a>(&maddress)){
<b>assert</b>!(
<a href="multichain_address.md#0x3_multichain_address_into_rooch_address">multichain_address::into_rooch_address</a>(maddress) == rooch_address,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="address_mapping.md#0x3_address_mapping_ErrorMultiChainAddressInvalid">ErrorMultiChainAddressInvalid</a>)
);
};
<b>let</b> am = <a href="_global_borrow_mut">account_storage::global_borrow_mut</a>&lt;<a href="address_mapping.md#0x3_address_mapping_AddressMapping">AddressMapping</a>&gt;(ctx, @rooch_framework);
<a href="_add">table::add</a>(&<b>mut</b> am.mapping, maddress, rooch_address);
//TODO matienance the reverse mapping rooch_address -&gt; <a href="">vector</a>&lt;MultiChainAddress&gt;
}
</code></pre>



</details>
240 changes: 0 additions & 240 deletions crates/rooch-framework/doc/auth_validator.md
Original file line number Diff line number Diff line change
@@ -47,34 +47,6 @@ The Authentication Validator



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>id: u64</code>
</dt>
<dd>

</dd>
<dt>
<code>module_address: <b>address</b></code>
</dt>
<dd>

</dd>
<dt>
<code>module_name: <a href="_String">ascii::String</a></code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Struct `TxValidateResult`
@@ -88,34 +60,6 @@ this result will be stored in the TxContext



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>auth_validator_id: u64</code>
</dt>
<dd>
The auth validator's id that validate the transaction
</dd>
<dt>
<code><a href="auth_validator.md#0x3_auth_validator">auth_validator</a>: <a href="_Option">option::Option</a>&lt;<a href="auth_validator.md#0x3_auth_validator_AuthValidator">auth_validator::AuthValidator</a>&gt;</code>
</dt>
<dd>

</dd>
<dt>
<code><a href="session_key.md#0x3_session_key">session_key</a>: <a href="_Option">option::Option</a>&lt;<a href="">vector</a>&lt;u8&gt;&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -162,19 +106,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_error_invalid_account_auth_key">error_invalid_account_auth_key</a>(): u64 {
<a href="_invalid_argument">error::invalid_argument</a>(<a href="auth_validator.md#0x3_auth_validator_ErrorValidateInvalidAccountAuthKey">ErrorValidateInvalidAccountAuthKey</a>)
}
</code></pre>



</details>

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

## Function `error_invalid_authenticator`
@@ -186,19 +117,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_error_invalid_authenticator">error_invalid_authenticator</a>(): u64 {
<a href="_invalid_argument">error::invalid_argument</a>(<a href="auth_validator.md#0x3_auth_validator_ErrorValidateInvalidAuthenticator">ErrorValidateInvalidAuthenticator</a>)
}
</code></pre>



</details>

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

## Function `new_auth_validator`
@@ -210,27 +128,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_new_auth_validator">new_auth_validator</a>(
id: u64,
module_address: <b>address</b>,
module_name: std::ascii::String
): <a href="auth_validator.md#0x3_auth_validator_AuthValidator">AuthValidator</a> {
<a href="auth_validator.md#0x3_auth_validator_AuthValidator">AuthValidator</a> {
id: id,
module_address: module_address,
module_name: module_name,
}
}
</code></pre>



</details>

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

## Function `validator_id`
@@ -242,19 +139,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_validator_id">validator_id</a>(validator: &<a href="auth_validator.md#0x3_auth_validator_AuthValidator">AuthValidator</a>): u64 {
validator.id
}
</code></pre>



</details>

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

## Function `validator_module_address`
@@ -266,19 +150,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_validator_module_address">validator_module_address</a>(validator: &<a href="auth_validator.md#0x3_auth_validator_AuthValidator">AuthValidator</a>): <b>address</b> {
validator.module_address
}
</code></pre>



</details>

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

## Function `validator_module_name`
@@ -290,19 +161,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_validator_module_name">validator_module_name</a>(validator: &<a href="auth_validator.md#0x3_auth_validator_AuthValidator">AuthValidator</a>): std::ascii::String {
validator.module_name
}
</code></pre>



</details>

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

## Function `new_tx_validate_result`
@@ -314,27 +172,6 @@ InvalidAuthenticator, include invalid signature



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_new_tx_validate_result">new_tx_validate_result</a>(
auth_validator_id: u64,
<a href="auth_validator.md#0x3_auth_validator">auth_validator</a>: Option&lt;<a href="auth_validator.md#0x3_auth_validator_AuthValidator">AuthValidator</a>&gt;,
<a href="session_key.md#0x3_session_key">session_key</a>: Option&lt;<a href="">vector</a>&lt;u8&gt;&gt;
): <a href="auth_validator.md#0x3_auth_validator_TxValidateResult">TxValidateResult</a> {
<a href="auth_validator.md#0x3_auth_validator_TxValidateResult">TxValidateResult</a> {
auth_validator_id: auth_validator_id,
<a href="auth_validator.md#0x3_auth_validator">auth_validator</a>: <a href="auth_validator.md#0x3_auth_validator">auth_validator</a>,
<a href="session_key.md#0x3_session_key">session_key</a>: <a href="session_key.md#0x3_session_key">session_key</a>,
}
}
</code></pre>



</details>

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

## Function `get_validate_result_from_ctx`
@@ -347,21 +184,6 @@ Get the TxValidateResult from the TxContext, Only can be called after the transa



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_get_validate_result_from_ctx">get_validate_result_from_ctx</a>(ctx: &Context): <a href="auth_validator.md#0x3_auth_validator_TxValidateResult">TxValidateResult</a> {
<b>let</b> validate_result_opt = <a href="_get">context::get</a>&lt;<a href="auth_validator.md#0x3_auth_validator_TxValidateResult">TxValidateResult</a>&gt;(ctx);
<b>assert</b>!(<a href="_is_some">option::is_some</a>(&validate_result_opt), <a href="_invalid_state">error::invalid_state</a>(<a href="auth_validator.md#0x3_auth_validator_ErrorMustExecuteAfterValidate">ErrorMustExecuteAfterValidate</a>));
<a href="_extract">option::extract</a>(&<b>mut</b> validate_result_opt)
}
</code></pre>



</details>

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

## Function `get_validator_id_from_ctx`
@@ -374,20 +196,6 @@ Get the auth validator's id from the TxValidateResult in the TxContext



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_get_validator_id_from_ctx">get_validator_id_from_ctx</a>(ctx: &Context): u64 {
<b>let</b> validate_result = <a href="auth_validator.md#0x3_auth_validator_get_validate_result_from_ctx">get_validate_result_from_ctx</a>(ctx);
validate_result.auth_validator_id
}
</code></pre>



</details>

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

## Function `get_session_key_from_ctx_option`
@@ -401,25 +209,6 @@ If the TxValidateResult is None or SessionKey is None, return None



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_get_session_key_from_ctx_option">get_session_key_from_ctx_option</a>(ctx: &Context): Option&lt;<a href="">vector</a>&lt;u8&gt;&gt; {
<b>let</b> validate_result_opt = <a href="_get">context::get</a>&lt;<a href="auth_validator.md#0x3_auth_validator_TxValidateResult">TxValidateResult</a>&gt;(ctx);
<b>if</b> (<a href="_is_some">option::is_some</a>(&validate_result_opt)) {
<b>let</b> validate_result = <a href="_extract">option::extract</a>(&<b>mut</b> validate_result_opt);
validate_result.<a href="session_key.md#0x3_session_key">session_key</a>
}<b>else</b> {
<a href="_none">option::none</a>&lt;<a href="">vector</a>&lt;u8&gt;&gt;()
}
}
</code></pre>



</details>

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

## Function `is_validate_via_session_key`
@@ -432,19 +221,6 @@ The current tx is validate via the session key or not



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_is_validate_via_session_key">is_validate_via_session_key</a>(ctx: &Context): bool {
<a href="_is_some">option::is_some</a>(&<a href="auth_validator.md#0x3_auth_validator_get_session_key_from_ctx_option">get_session_key_from_ctx_option</a>(ctx))
}
</code></pre>



</details>

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

## Function `get_session_key_from_ctx`
@@ -455,19 +231,3 @@ Only can be called after the transaction is validated

<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_get_session_key_from_ctx">get_session_key_from_ctx</a>(ctx: &<a href="_Context">context::Context</a>): <a href="">vector</a>&lt;u8&gt;
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator.md#0x3_auth_validator_get_session_key_from_ctx">get_session_key_from_ctx</a>(ctx: &Context): <a href="">vector</a>&lt;u8&gt; {
<b>assert</b>!(<a href="auth_validator.md#0x3_auth_validator_is_validate_via_session_key">is_validate_via_session_key</a>(ctx), <a href="_invalid_state">error::invalid_state</a>(<a href="auth_validator.md#0x3_auth_validator_ErrorMustExecuteAfterValidate">ErrorMustExecuteAfterValidate</a>));
<a href="_extract">option::extract</a>(&<b>mut</b> <a href="auth_validator.md#0x3_auth_validator_get_session_key_from_ctx_option">get_session_key_from_ctx_option</a>(ctx))
}
</code></pre>



</details>
145 changes: 0 additions & 145 deletions crates/rooch-framework/doc/auth_validator_registry.md
Original file line number Diff line number Diff line change
@@ -38,22 +38,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>id: u64</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Resource `ValidatorRegistry`
@@ -65,34 +49,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>validator_num: u64</code>
</dt>
<dd>
Number of registered validators
</dd>
<dt>
<code>validators: <a href="_Table">table::Table</a>&lt;u64, <a href="auth_validator.md#0x3_auth_validator_AuthValidator">auth_validator::AuthValidator</a>&gt;</code>
</dt>
<dd>

</dd>
<dt>
<code>validators_with_type: <a href="_TypeTable">type_table::TypeTable</a></code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -128,24 +84,6 @@ Init function called by genesis.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_genesis_init">genesis_init</a>(ctx: &<b>mut</b> Context, sender: &<a href="">signer</a>){
<b>let</b> registry = <a href="auth_validator_registry.md#0x3_auth_validator_registry_ValidatorRegistry">ValidatorRegistry</a> {
validator_num: 0,
validators: <a href="_new">table::new</a>(ctx),
validators_with_type: <a href="_new">type_table::new</a>(ctx),
};
<a href="_global_move_to">account_storage::global_move_to</a>(ctx, sender, registry);
}
</code></pre>



</details>

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

## Function `register`
@@ -157,19 +95,6 @@ Init function called by genesis.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_register">register</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> Context) : u64{
<a href="auth_validator_registry.md#0x3_auth_validator_registry_register_internal">register_internal</a>&lt;ValidatorType&gt;(ctx)
}
</code></pre>



</details>

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

## Function `register_internal`
@@ -181,42 +106,6 @@ Init function called by genesis.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_register_internal">register_internal</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> Context) : u64{
<b>let</b> <a href="">type_info</a> = <a href="_type_of">type_info::type_of</a>&lt;ValidatorType&gt;();
<b>let</b> module_address = <a href="_account_address">type_info::account_address</a>(&<a href="">type_info</a>);
//TODO consider change <a href="_module_name">type_info::module_name</a> <b>to</b> <a href="_String">ascii::String</a>.
<b>let</b> module_name = std::ascii::string(<a href="_module_name">type_info::module_name</a>(&<a href="">type_info</a>));

<b>let</b> registry = <a href="_global_borrow_mut">account_storage::global_borrow_mut</a>&lt;<a href="auth_validator_registry.md#0x3_auth_validator_registry_ValidatorRegistry">ValidatorRegistry</a>&gt;(ctx, @rooch_framework);
<b>let</b> id = registry.validator_num;

<b>assert</b>!(!<a href="_contains">type_table::contains</a>&lt;<a href="auth_validator_registry.md#0x3_auth_validator_registry_AuthValidatorWithType">AuthValidatorWithType</a>&lt;ValidatorType&gt;&gt;(&registry.validators_with_type), <a href="_already_exists">error::already_exists</a>(<a href="auth_validator_registry.md#0x3_auth_validator_registry_ErrorValidatorAlreadyRegistered">ErrorValidatorAlreadyRegistered</a>));

<b>let</b> validator_with_type = <a href="auth_validator_registry.md#0x3_auth_validator_registry_AuthValidatorWithType">AuthValidatorWithType</a>&lt;ValidatorType&gt;{
id,
};
<a href="_add">type_table::add</a>(&<b>mut</b> registry.validators_with_type, validator_with_type);

<b>let</b> validator = <a href="auth_validator.md#0x3_auth_validator_new_auth_validator">auth_validator::new_auth_validator</a>(
id,
module_address,
module_name,
);
<a href="_add">table::add</a>(&<b>mut</b> registry.validators, id, validator);

registry.validator_num = registry.validator_num + 1;
id
}
</code></pre>



</details>

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

## Function `borrow_validator`
@@ -228,21 +117,6 @@ Init function called by genesis.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_borrow_validator">borrow_validator</a>(ctx: &Context, id: u64): &AuthValidator {
<b>let</b> registry = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="auth_validator_registry.md#0x3_auth_validator_registry_ValidatorRegistry">ValidatorRegistry</a>&gt;(ctx, @rooch_framework);
<b>assert</b>!(<a href="_contains">table::contains</a>(&registry.validators, id), <a href="_not_found">error::not_found</a>(<a href="auth_validator_registry.md#0x3_auth_validator_registry_ErrorValidatorUnregistered">ErrorValidatorUnregistered</a>));
<a href="_borrow">table::borrow</a>(&registry.validators, id)
}
</code></pre>



</details>

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

## Function `borrow_validator_by_type`
@@ -251,22 +125,3 @@ Init function called by genesis.

<pre><code><b>public</b> <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_borrow_validator_by_type">borrow_validator_by_type</a>&lt;ValidatorType: store&gt;(ctx: &<a href="_Context">context::Context</a>): &<a href="auth_validator.md#0x3_auth_validator_AuthValidator">auth_validator::AuthValidator</a>
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_borrow_validator_by_type">borrow_validator_by_type</a>&lt;ValidatorType: store&gt;(ctx: &Context): &AuthValidator {
<b>let</b> registry = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="auth_validator_registry.md#0x3_auth_validator_registry_ValidatorRegistry">ValidatorRegistry</a>&gt;(ctx, @rooch_framework);
<b>assert</b>!(<a href="_contains">type_table::contains</a>&lt;<a href="auth_validator_registry.md#0x3_auth_validator_registry_AuthValidatorWithType">AuthValidatorWithType</a>&lt;ValidatorType&gt;&gt;(&registry.validators_with_type), <a href="_not_found">error::not_found</a>(<a href="auth_validator_registry.md#0x3_auth_validator_registry_ErrorValidatorUnregistered">ErrorValidatorUnregistered</a>));
<b>let</b> validator_with_type = <a href="_borrow">type_table::borrow</a>&lt;<a href="auth_validator_registry.md#0x3_auth_validator_registry_AuthValidatorWithType">AuthValidatorWithType</a>&lt;ValidatorType&gt;&gt;(&registry.validators_with_type);
<b>assert</b>!(<a href="_contains">table::contains</a>(&registry.validators, validator_with_type.id), <a href="_not_found">error::not_found</a>(<a href="auth_validator_registry.md#0x3_auth_validator_registry_ErrorValidatorUnregistered">ErrorValidatorUnregistered</a>));
<a href="_borrow">table::borrow</a>(&registry.validators, validator_with_type.id)
}
</code></pre>



</details>
91 changes: 0 additions & 91 deletions crates/rooch-framework/doc/bcs.md
Original file line number Diff line number Diff line change
@@ -51,19 +51,6 @@ The request Move type is not match with input Move type.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bcs.md#0x3_bcs_to_bytes">to_bytes</a>&lt;MoveValue&gt;(v: &MoveValue): <a href="">vector</a>&lt;u8&gt; {
std::bcs::to_bytes(v)
}
</code></pre>



</details>

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

## Function `to_bool`
@@ -75,19 +62,6 @@ The request Move type is not match with input Move type.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bcs.md#0x3_bcs_to_bool">to_bool</a>(v: <a href="">vector</a>&lt;u8&gt;): bool {
<a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;bool&gt;(v)
}
</code></pre>



</details>

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

## Function `to_u8`
@@ -99,19 +73,6 @@ The request Move type is not match with input Move type.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bcs.md#0x3_bcs_to_u8">to_u8</a>(v: <a href="">vector</a>&lt;u8&gt;): u8 {
<a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;u8&gt;(v)
}
</code></pre>



</details>

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

## Function `to_u64`
@@ -123,19 +84,6 @@ The request Move type is not match with input Move type.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bcs.md#0x3_bcs_to_u64">to_u64</a>(v: <a href="">vector</a>&lt;u8&gt;): u64 {
<a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;u64&gt;(v)
}
</code></pre>



</details>

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

## Function `to_u128`
@@ -147,19 +95,6 @@ The request Move type is not match with input Move type.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bcs.md#0x3_bcs_to_u128">to_u128</a>(v: <a href="">vector</a>&lt;u8&gt;): u128 {
<a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;u128&gt;(v)
}
</code></pre>



</details>

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

## Function `to_address`
@@ -171,19 +106,6 @@ The request Move type is not match with input Move type.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bcs.md#0x3_bcs_to_address">to_address</a>(v: <a href="">vector</a>&lt;u8&gt;): <b>address</b> {
<a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;<b>address</b>&gt;(v)
}
</code></pre>



</details>

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

## Function `from_bytes`
@@ -194,16 +116,3 @@ Note the <code>private_generics</code> ensure only the <code>MoveValue</code>'s

<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;MoveValue&gt;(bytes: <a href="">vector</a>&lt;u8&gt;): MoveValue
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b>(<b>friend</b>) <b>fun</b> <a href="bcs.md#0x3_bcs_from_bytes">from_bytes</a>&lt;MoveValue&gt;(bytes: <a href="">vector</a>&lt;u8&gt;): MoveValue;
</code></pre>



</details>
181 changes: 0 additions & 181 deletions crates/rooch-framework/doc/bitcoin_address.md
Original file line number Diff line number Diff line change
@@ -35,22 +35,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>bytes: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -170,41 +154,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_new_legacy">new_legacy</a>(pub_key: &<a href="">vector</a>&lt;u8&gt;, decimal_prefix: u8): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
// Check the decimal_prefix, i.e. <b>address</b> type
<b>assert</b>!(
decimal_prefix == <a href="bitcoin_address.md#0x3_bitcoin_address_P2PKH_ADDR_DECIMAL_PREFIX">P2PKH_ADDR_DECIMAL_PREFIX</a>
|| decimal_prefix == <a href="bitcoin_address.md#0x3_bitcoin_address_P2SH_ADDR_DECIMAL_PREFIX">P2SH_ADDR_DECIMAL_PREFIX</a>,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="bitcoin_address.md#0x3_bitcoin_address_ErrorInvalidDecimalPrefix">ErrorInvalidDecimalPrefix</a>)
);
// Check the <b>public</b> key length
<b>assert</b>!(
<a href="_length">vector::length</a>(pub_key) == <a href="ecdsa_k1.md#0x3_ecdsa_k1_public_key_length">ecdsa_k1::public_key_length</a>(),
<a href="_invalid_argument">error::invalid_argument</a>(<a href="bitcoin_address.md#0x3_bitcoin_address_ErrorInvalidCompressedPublicKeyLength">ErrorInvalidCompressedPublicKeyLength</a>)
);
// Perform <b>address</b> creation
<b>let</b> <a href="bitcoin_address.md#0x3_bitcoin_address">bitcoin_address</a> = <b>if</b> (decimal_prefix == <a href="bitcoin_address.md#0x3_bitcoin_address_P2PKH_ADDR_DECIMAL_PREFIX">P2PKH_ADDR_DECIMAL_PREFIX</a>) { // P2PKH <b>address</b>
<a href="bitcoin_address.md#0x3_bitcoin_address_create_p2pkh_address">create_p2pkh_address</a>(pub_key)
} <b>else</b> <b>if</b> (decimal_prefix == <a href="bitcoin_address.md#0x3_bitcoin_address_P2SH_ADDR_DECIMAL_PREFIX">P2SH_ADDR_DECIMAL_PREFIX</a>) { // P2SH <b>address</b>
<a href="bitcoin_address.md#0x3_bitcoin_address_create_p2sh_address">create_p2sh_address</a>(pub_key)
} <b>else</b> {
<a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
bytes: <a href="_empty">vector::empty</a>&lt;u8&gt;()
}
};

<a href="bitcoin_address.md#0x3_bitcoin_address">bitcoin_address</a>
}
</code></pre>



</details>

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

## Function `new_bech32`
@@ -216,40 +165,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_new_bech32">new_bech32</a>(pub_key: &<a href="">vector</a>&lt;u8&gt;, version: u8): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
// Check the <b>script</b> version
<b>assert</b>!(
version &lt;= 16,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="bitcoin_address.md#0x3_bitcoin_address_ErrorInvalidScriptVersion">ErrorInvalidScriptVersion</a>)
);
// Check the <b>script</b> version and the <b>public</b> key relationship
<b>if</b> (version == 0) {
<b>assert</b>!(
<a href="_length">vector::length</a>(pub_key) == 20 || <a href="_length">vector::length</a>(pub_key) == 32,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="bitcoin_address.md#0x3_bitcoin_address_ErrorInvalidHashedPublicKeyLength">ErrorInvalidHashedPublicKeyLength</a>)
);
};
<b>if</b> (version == 1) {
<b>assert</b>!(
<a href="_length">vector::length</a>(pub_key) == 32,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="bitcoin_address.md#0x3_bitcoin_address_ErrorInvalidSchnorrPublicKeyLength">ErrorInvalidSchnorrPublicKeyLength</a>)
);
};
// This will create Segwit Bech32 or Taproot Bech32m addresses depending on the <b>public</b> key length and the <b>script</b> version
<b>let</b> <a href="bitcoin_address.md#0x3_bitcoin_address">bitcoin_address</a> = <a href="bitcoin_address.md#0x3_bitcoin_address_create_bech32_address">create_bech32_address</a>(pub_key, version);

<a href="bitcoin_address.md#0x3_bitcoin_address">bitcoin_address</a>
}
</code></pre>



</details>

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

## Function `from_bytes`
@@ -261,22 +176,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_from_bytes">from_bytes</a>(bytes: <a href="">vector</a>&lt;u8&gt;): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
//TODO check the <b>address</b> bytes.
<a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
bytes: bytes,
}
}
</code></pre>



</details>

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

## Function `as_bytes`
@@ -288,19 +187,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_as_bytes">as_bytes</a>(addr: &<a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a>): &<a href="">vector</a>&lt;u8&gt; {
&addr.bytes
}
</code></pre>



</details>

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

## Function `into_bytes`
@@ -312,20 +198,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_into_bytes">into_bytes</a>(addr: <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a>): <a href="">vector</a>&lt;u8&gt; {
<b>let</b> <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> { bytes } = addr;
bytes
}
</code></pre>



</details>

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

## Function `create_p2pkh_address`
@@ -337,23 +209,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_create_p2pkh_address">create_p2pkh_address</a>(pub_key: &<a href="">vector</a>&lt;u8&gt;): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
<b>let</b> address_bytes = <a href="encoding.md#0x3_encoding_p2pkh">encoding::p2pkh</a>(pub_key);

<a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
bytes: address_bytes
}
}
</code></pre>



</details>

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

## Function `create_p2sh_address`
@@ -365,23 +220,6 @@ P2TR addresses with Bech32m encoding are 62 characters



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_create_p2sh_address">create_p2sh_address</a>(pub_key: &<a href="">vector</a>&lt;u8&gt;): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
<b>let</b> address_bytes = <a href="encoding.md#0x3_encoding_p2sh">encoding::p2sh</a>(pub_key);

<a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
bytes: address_bytes
}
}
</code></pre>



</details>

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

## Function `create_bech32_address`
@@ -390,22 +228,3 @@ P2TR addresses with Bech32m encoding are 62 characters

<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_create_bech32_address">create_bech32_address</a>(pub_key: &<a href="">vector</a>&lt;u8&gt;, version: u8): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">bitcoin_address::BTCAddress</a>
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="bitcoin_address.md#0x3_bitcoin_address_create_bech32_address">create_bech32_address</a>(pub_key: &<a href="">vector</a>&lt;u8&gt;, version: u8): <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
<b>let</b> address_bytes = <a href="encoding.md#0x3_encoding_bech32">encoding::bech32</a>(pub_key, version);

<a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> {
bytes: address_bytes
}
}
</code></pre>



</details>
35 changes: 0 additions & 35 deletions crates/rooch-framework/doc/builtin_validators.md
Original file line number Diff line number Diff line change
@@ -44,25 +44,6 @@



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="builtin_validators.md#0x3_builtin_validators_genesis_init">genesis_init</a>(ctx: &<b>mut</b> Context, _genesis_account: &<a href="">signer</a>) {
// NATIVE_AUTH_VALIDATOR_ID: u64 = 0;
<b>let</b> id = <a href="auth_validator_registry.md#0x3_auth_validator_registry_register_internal">auth_validator_registry::register_internal</a>&lt;<a href="native_validator.md#0x3_native_validator_NativeValidator">native_validator::NativeValidator</a>&gt;(ctx);
<b>assert</b>!(id == <a href="native_validator.md#0x3_native_validator_auth_validator_id">native_validator::auth_validator_id</a>(), std::error::internal(<a href="builtin_validators.md#0x3_builtin_validators_ErrorGenesisInit">ErrorGenesisInit</a>));

// ETHEREUM_AUTH_VALIDATOR_ID: u64 = 1;
<b>let</b> id = <a href="auth_validator_registry.md#0x3_auth_validator_registry_register_internal">auth_validator_registry::register_internal</a>&lt;<a href="ethereum_validator.md#0x3_ethereum_validator_EthereumValidator">ethereum_validator::EthereumValidator</a>&gt;(ctx);
<b>assert</b>!(id == <a href="ethereum_validator.md#0x3_ethereum_validator_auth_validator_id">ethereum_validator::auth_validator_id</a>(), std::error::internal(<a href="builtin_validators.md#0x3_builtin_validators_ErrorGenesisInit">ErrorGenesisInit</a>));
}
</code></pre>



</details>

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

## Function `is_builtin_auth_validator`
@@ -71,19 +52,3 @@

<pre><code><b>public</b> <b>fun</b> <a href="builtin_validators.md#0x3_builtin_validators_is_builtin_auth_validator">is_builtin_auth_validator</a>(auth_validator_id: u64): bool
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="builtin_validators.md#0x3_builtin_validators_is_builtin_auth_validator">is_builtin_auth_validator</a>(auth_validator_id: u64): bool {
auth_validator_id == <a href="native_validator.md#0x3_native_validator_auth_validator_id">native_validator::auth_validator_id</a>()
|| auth_validator_id == <a href="ethereum_validator.md#0x3_ethereum_validator_auth_validator_id">ethereum_validator::auth_validator_id</a>()
}
</code></pre>



</details>
100 changes: 0 additions & 100 deletions crates/rooch-framework/doc/chain_id.md
Original file line number Diff line number Diff line change
@@ -33,22 +33,6 @@ The ChainID in the global storage



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>id: u64</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -101,22 +85,6 @@ The ChainID in the global storage



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="chain_id.md#0x3_chain_id_genesis_init">genesis_init</a>(ctx: &<b>mut</b> Context, genesis_account: &<a href="">signer</a>, <a href="chain_id.md#0x3_chain_id">chain_id</a>: u64){
<b>let</b> <a href="chain_id.md#0x3_chain_id">chain_id</a> = <a href="chain_id.md#0x3_chain_id_ChainID">ChainID</a>{
id: <a href="chain_id.md#0x3_chain_id">chain_id</a>
};
<a href="_global_move_to">account_storage::global_move_to</a>(ctx, genesis_account, <a href="chain_id.md#0x3_chain_id">chain_id</a>);
}
</code></pre>



</details>

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

## Function `chain_id`
@@ -128,20 +96,6 @@ The ChainID in the global storage



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="chain_id.md#0x3_chain_id">chain_id</a>(ctx: &Context) : u64 {
<b>let</b> <a href="chain_id.md#0x3_chain_id">chain_id</a> = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="chain_id.md#0x3_chain_id_ChainID">ChainID</a>&gt;(ctx, @rooch_framework);
<a href="chain_id.md#0x3_chain_id">chain_id</a>.id
}
</code></pre>



</details>

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

## Function `is_local`
@@ -153,19 +107,6 @@ The ChainID in the global storage



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="chain_id.md#0x3_chain_id_is_local">is_local</a>(ctx: &Context) : bool {
<a href="chain_id.md#0x3_chain_id">chain_id</a>(ctx) == <a href="chain_id.md#0x3_chain_id_CHAIN_ID_LOCAL">CHAIN_ID_LOCAL</a>
}
</code></pre>



</details>

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

## Function `is_dev`
@@ -177,19 +118,6 @@ The ChainID in the global storage



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="chain_id.md#0x3_chain_id_is_dev">is_dev</a>(ctx: &Context) : bool {
<a href="chain_id.md#0x3_chain_id">chain_id</a>(ctx) == <a href="chain_id.md#0x3_chain_id_CHAIN_ID_DEV">CHAIN_ID_DEV</a>
}
</code></pre>



</details>

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

## Function `is_test`
@@ -201,19 +129,6 @@ The ChainID in the global storage



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="chain_id.md#0x3_chain_id_is_test">is_test</a>(ctx: &Context) : bool {
<a href="chain_id.md#0x3_chain_id">chain_id</a>(ctx) == <a href="chain_id.md#0x3_chain_id_CHAIN_ID_TEST">CHAIN_ID_TEST</a>
}
</code></pre>



</details>

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

## Function `is_main`
@@ -222,18 +137,3 @@ The ChainID in the global storage

<pre><code><b>public</b> <b>fun</b> <a href="chain_id.md#0x3_chain_id_is_main">is_main</a>(ctx: &<a href="_Context">context::Context</a>): bool
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="chain_id.md#0x3_chain_id_is_main">is_main</a>(ctx: &Context) : bool {
<a href="chain_id.md#0x3_chain_id">chain_id</a>(ctx) == <a href="chain_id.md#0x3_chain_id_CHAIN_ID_MAIN">CHAIN_ID_MAIN</a>
}
</code></pre>



</details>
433 changes: 0 additions & 433 deletions crates/rooch-framework/doc/coin.md

Large diffs are not rendered by default.

210 changes: 0 additions & 210 deletions crates/rooch-framework/doc/coin_store.md
Original file line number Diff line number Diff line change
@@ -43,22 +43,6 @@ The Balance resource that stores the balance of a specific coin type.



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>value: u256</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Resource `CoinStore`
@@ -72,34 +56,6 @@ These are kept in a single resource to ensure locality of data.



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>coin_type: <a href="_String">string::String</a></code>
</dt>
<dd>

</dd>
<dt>
<code>balance: <a href="coin_store.md#0x3_coin_store_Balance">coin_store::Balance</a></code>
</dt>
<dd>

</dd>
<dt>
<code>frozen: bool</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -158,19 +114,6 @@ Anyone can create a CoinStore Object for public Coin<CoinType>, the <code>CoinTy



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_create_coin_store">create_coin_store</a>&lt;CoinType: key + store&gt;(ctx: &<b>mut</b> Context): Object&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt;{
<a href="coin_store.md#0x3_coin_store_create_coin_store_internal">create_coin_store_internal</a>&lt;CoinType&gt;(ctx)
}
</code></pre>



</details>

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

## Function `create_coin_store_extend`
@@ -183,19 +126,6 @@ This function is for the <code>CoinType</code> module to extend



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_create_coin_store_extend">create_coin_store_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> Context): Object&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt; {
<a href="coin_store.md#0x3_coin_store_create_coin_store_internal">create_coin_store_internal</a>&lt;CoinType&gt;(ctx)
}
</code></pre>



</details>

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

## Function `remove_coin_store`
@@ -208,26 +138,6 @@ Remove the CoinStore Object, return the Coin<T> in balance



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_remove_coin_store">remove_coin_store</a>&lt;CoinType: key&gt;(coin_store_object: Object&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt;) : Coin&lt;CoinType&gt; {
<b>let</b> <a href="coin_store.md#0x3_coin_store">coin_store</a> = <a href="_remove">object::remove</a>(coin_store_object);
<b>let</b> coin_type = <a href="_type_name">type_info::type_name</a>&lt;CoinType&gt;();
<b>assert</b>!(<a href="coin_store.md#0x3_coin_store">coin_store</a>.coin_type == coin_type, <a href="_invalid_argument">error::invalid_argument</a>(<a href="coin_store.md#0x3_coin_store_ErrorCoinTypeAndStoreMismatch">ErrorCoinTypeAndStoreMismatch</a>));
<b>let</b> <a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>{coin_type:_, balance, frozen} = <a href="coin_store.md#0x3_coin_store">coin_store</a>;
// Cannot remove a frozen <a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>, because <b>if</b> we allow this, the frozen is meaningless
<b>assert</b>!(!frozen, <a href="_permission_denied">error::permission_denied</a>(<a href="coin_store.md#0x3_coin_store_ErrorCoinStoreIsFrozen">ErrorCoinStoreIsFrozen</a>));
<b>let</b> <a href="coin_store.md#0x3_coin_store_Balance">Balance</a>{value} = balance;
<a href="coin.md#0x3_coin_pack">coin::pack</a>&lt;CoinType&gt;(value)
}
</code></pre>



</details>

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

## Function `coin_type`
@@ -239,19 +149,6 @@ Remove the CoinStore Object, return the Coin<T> in balance



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_coin_type">coin_type</a>(self: &<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>): <a href="_String">string::String</a> {
self.coin_type
}
</code></pre>



</details>

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

## Function `balance`
@@ -263,19 +160,6 @@ Remove the CoinStore Object, return the Coin<T> in balance



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_balance">balance</a>(self: &<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>): u256 {
self.balance.value
}
</code></pre>



</details>

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

## Function `is_frozen`
@@ -287,19 +171,6 @@ Remove the CoinStore Object, return the Coin<T> in balance



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_is_frozen">is_frozen</a>(self: &<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>): bool {
self.frozen
}
</code></pre>



</details>

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

## Function `withdraw`
@@ -312,20 +183,6 @@ Withdraw <code>amount</code> Coin<CoinType> from the balance of the passed-in <c



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_withdraw">withdraw</a>&lt;CoinType: key&gt;(<a href="coin_store.md#0x3_coin_store">coin_store</a>: &<b>mut</b> <a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>, amount: u256) : Coin&lt;CoinType&gt; {
<a href="coin_store.md#0x3_coin_store_check_coin_store_not_frozen">check_coin_store_not_frozen</a>(<a href="coin_store.md#0x3_coin_store">coin_store</a>);
<a href="coin_store.md#0x3_coin_store_extract_from_balance">extract_from_balance</a>&lt;CoinType&gt;(<a href="coin_store.md#0x3_coin_store">coin_store</a>, amount)
}
</code></pre>



</details>

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

## Function `deposit`
@@ -338,20 +195,6 @@ Deposit <code>amount</code> Coin<CoinType> to the balance of the passed-in <code



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_deposit">deposit</a>&lt;CoinType: key&gt;(<a href="coin_store.md#0x3_coin_store">coin_store</a>: &<b>mut</b> <a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>, <a href="coin.md#0x3_coin">coin</a>: Coin&lt;CoinType&gt;) {
<a href="coin_store.md#0x3_coin_store_check_coin_store_not_frozen">check_coin_store_not_frozen</a>(<a href="coin_store.md#0x3_coin_store">coin_store</a>);
<a href="coin_store.md#0x3_coin_store_merge_to_balance">merge_to_balance</a>&lt;CoinType&gt;(<a href="coin_store.md#0x3_coin_store">coin_store</a>, <a href="coin.md#0x3_coin">coin</a>);
}
</code></pre>



</details>

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

## Function `freeze_coin_store_extend`
@@ -366,25 +209,6 @@ Only the <code>CoinType</code> module can freeze or unfreeze a CoinStore by the



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="coin_store.md#0x3_coin_store_freeze_coin_store_extend">freeze_coin_store_extend</a>&lt;CoinType: key&gt;(
ctx: &<b>mut</b> Context,
coin_store_id: ObjectID,
frozen: bool,
) {
<b>assert</b>!(<a href="_exist_object">context::exist_object</a>&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt;(ctx, coin_store_id), <a href="_invalid_argument">error::invalid_argument</a>(<a href="coin_store.md#0x3_coin_store_ErrorCoinStoreNotFound">ErrorCoinStoreNotFound</a>));
<b>let</b> coin_store_object = <a href="_borrow_mut_object_extend">context::borrow_mut_object_extend</a>&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt;(ctx, coin_store_id);
<a href="_borrow_mut">object::borrow_mut</a>(coin_store_object).frozen = frozen;
}
</code></pre>



</details>

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

## Function `create_coin_store_internal`
@@ -396,25 +220,6 @@ Only the <code>CoinType</code> module can freeze or unfreeze a CoinStore by the



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="coin_store.md#0x3_coin_store_create_coin_store_internal">create_coin_store_internal</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> Context): Object&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt;{
<a href="coin.md#0x3_coin_check_coin_info_registered">coin::check_coin_info_registered</a>&lt;CoinType&gt;(ctx);

<a href="_new_object">context::new_object</a>(ctx, <a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>{
coin_type: <a href="_type_name">type_info::type_name</a>&lt;CoinType&gt;(),
balance: <a href="coin_store.md#0x3_coin_store_Balance">Balance</a> { value: 0 },
frozen: <b>false</b>,
})
}
</code></pre>



</details>

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

## Function `transfer`
@@ -423,18 +228,3 @@ Only the <code>CoinType</code> module can freeze or unfreeze a CoinStore by the

<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="transfer.md#0x3_transfer">transfer</a>(coin_store_obj: &<b>mut</b> <a href="_Object">object::Object</a>&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">coin_store::CoinStore</a>&gt;, owner: <b>address</b>)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="transfer.md#0x3_transfer">transfer</a>(coin_store_obj: &<b>mut</b> Object&lt;<a href="coin_store.md#0x3_coin_store_CoinStore">CoinStore</a>&gt;, owner: <b>address</b>){
<a href="_transfer_extend">object::transfer_extend</a>(coin_store_obj, owner)
}
</code></pre>



</details>
225 changes: 0 additions & 225 deletions crates/rooch-framework/doc/core_addresses.md
Original file line number Diff line number Diff line change
@@ -96,19 +96,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_rooch_genesis">assert_rooch_genesis</a>(<a href="account.md#0x3_account">account</a>: &<a href="">signer</a>) {
<a href="core_addresses.md#0x3_core_addresses_assert_rooch_genesis_address">assert_rooch_genesis_address</a>(<a href="_address_of">signer::address_of</a>(<a href="account.md#0x3_account">account</a>))
}
</code></pre>



</details>

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

## Function `assert_rooch_genesis_address`
@@ -120,19 +107,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_rooch_genesis_address">assert_rooch_genesis_address</a>(addr: <b>address</b>) {
<b>assert</b>!(<a href="core_addresses.md#0x3_core_addresses_is_rooch_genesis_address">is_rooch_genesis_address</a>(addr), <a href="_permission_denied">error::permission_denied</a>(<a href="core_addresses.md#0x3_core_addresses_ErrorNotGenesisAddress">ErrorNotGenesisAddress</a>))
}
</code></pre>



</details>

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

## Function `is_rooch_genesis_address`
@@ -144,19 +118,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_rooch_genesis_address">is_rooch_genesis_address</a>(addr: <b>address</b>): bool {
addr == <a href="core_addresses.md#0x3_core_addresses_genesis_address">genesis_address</a>()
}
</code></pre>



</details>

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

## Function `assert_rooch_association`
@@ -168,19 +129,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_rooch_association">assert_rooch_association</a>(<a href="account.md#0x3_account">account</a>: &<a href="">signer</a>) {
<a href="core_addresses.md#0x3_core_addresses_assert_rooch_association_address">assert_rooch_association_address</a>(<a href="_address_of">signer::address_of</a>(<a href="account.md#0x3_account">account</a>))
}
</code></pre>



</details>

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

## Function `assert_rooch_association_address`
@@ -192,19 +140,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_rooch_association_address">assert_rooch_association_address</a>(addr: <b>address</b>) {
<b>assert</b>!(<a href="core_addresses.md#0x3_core_addresses_is_rooch_association_address">is_rooch_association_address</a>(addr), <a href="_permission_denied">error::permission_denied</a>(<a href="core_addresses.md#0x3_core_addresses_ErrorNotAssociationAddress">ErrorNotAssociationAddress</a>))
}
</code></pre>



</details>

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

## Function `is_rooch_association_address`
@@ -216,19 +151,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_rooch_association_address">is_rooch_association_address</a>(addr: <b>address</b>): bool {
addr == @rooch_association
}
</code></pre>



</details>

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

## Function `assert_rooch_framework`
@@ -240,22 +162,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_rooch_framework">assert_rooch_framework</a>(<a href="account.md#0x3_account">account</a>: &<a href="">signer</a>) {
<b>assert</b>!(
<a href="core_addresses.md#0x3_core_addresses_is_rooch_framework_address">is_rooch_framework_address</a>(<a href="_address_of">signer::address_of</a>(<a href="account.md#0x3_account">account</a>)),
<a href="_permission_denied">error::permission_denied</a>(<a href="core_addresses.md#0x3_core_addresses_ErrorNotRoochFrameworkAddress">ErrorNotRoochFrameworkAddress</a>),
)
}
</code></pre>



</details>

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

## Function `assert_framework_reserved_address`
@@ -267,19 +173,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_framework_reserved_address">assert_framework_reserved_address</a>(<a href="account.md#0x3_account">account</a>: &<a href="">signer</a>) {
<a href="core_addresses.md#0x3_core_addresses_assert_framework_reserved">assert_framework_reserved</a>(<a href="_address_of">signer::address_of</a>(<a href="account.md#0x3_account">account</a>));
}
</code></pre>



</details>

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

## Function `assert_framework_reserved`
@@ -291,22 +184,6 @@ The operation can only be performed by the VM



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_framework_reserved">assert_framework_reserved</a>(addr: <b>address</b>) {
<b>assert</b>!(
<a href="core_addresses.md#0x3_core_addresses_is_framework_reserved_address">is_framework_reserved_address</a>(addr),
<a href="_permission_denied">error::permission_denied</a>(<a href="core_addresses.md#0x3_core_addresses_ErrorNotFrameworkReservedAddress">ErrorNotFrameworkReservedAddress</a>),
)
}
</code></pre>



</details>

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

## Function `is_framework_reserved_address`
@@ -319,28 +196,6 @@ Return true if <code>addr</code> is 0x0 or under the on chain governance's contr



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_framework_reserved_address">is_framework_reserved_address</a>(addr: <b>address</b>): bool {
<a href="core_addresses.md#0x3_core_addresses_is_rooch_framework_address">is_rooch_framework_address</a>(addr) ||
addr == @0x2 ||
addr == @0x3 ||
addr == @0x4 ||
addr == @0x5 ||
addr == @0x6 ||
addr == @0x7 ||
addr == @0x8 ||
addr == @0x9 ||
addr == @0xa
}
</code></pre>



</details>

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

## Function `is_rooch_framework_address`
@@ -353,19 +208,6 @@ Return true if <code>addr</code> is 0x3.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_rooch_framework_address">is_rooch_framework_address</a>(addr: <b>address</b>): bool {
addr == @rooch_framework
}
</code></pre>



</details>

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

## Function `assert_vm`
@@ -378,19 +220,6 @@ Assert that the signer has the VM reserved address.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_assert_vm">assert_vm</a>(<a href="account.md#0x3_account">account</a>: &<a href="">signer</a>) {
<b>assert</b>!(<a href="core_addresses.md#0x3_core_addresses_is_vm">is_vm</a>(<a href="account.md#0x3_account">account</a>), <a href="_permission_denied">error::permission_denied</a>(<a href="core_addresses.md#0x3_core_addresses_ErrorNotVM">ErrorNotVM</a>))
}
</code></pre>



</details>

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

## Function `is_vm`
@@ -403,19 +232,6 @@ Return true if <code>addr</code> is a reserved address for the VM to call system



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_vm">is_vm</a>(<a href="account.md#0x3_account">account</a>: &<a href="">signer</a>): bool {
<a href="core_addresses.md#0x3_core_addresses_is_vm_address">is_vm_address</a>(<a href="_address_of">signer::address_of</a>(<a href="account.md#0x3_account">account</a>))
}
</code></pre>



</details>

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

## Function `is_vm_address`
@@ -428,19 +244,6 @@ Return true if <code>addr</code> is a reserved address for the VM to call system



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_vm_address">is_vm_address</a>(addr: <b>address</b>): bool {
addr == @vm_reserved
}
</code></pre>



</details>

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

## Function `is_reserved_address`
@@ -453,19 +256,6 @@ Return true if <code>addr</code> is either the VM address or an Rooch Framework



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_is_reserved_address">is_reserved_address</a>(addr: <b>address</b>): bool {
<a href="core_addresses.md#0x3_core_addresses_is_rooch_framework_address">is_rooch_framework_address</a>(addr) || <a href="core_addresses.md#0x3_core_addresses_is_vm_address">is_vm_address</a>(addr)
}
</code></pre>



</details>

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

## Function `genesis_address`
@@ -475,18 +265,3 @@ The address of the genesis

<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_genesis_address">genesis_address</a>(): <b>address</b>
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="core_addresses.md#0x3_core_addresses_genesis_address">genesis_address</a>(): <b>address</b> {
@rooch_framework
}
</code></pre>



</details>
24 changes: 0 additions & 24 deletions crates/rooch-framework/doc/decoding.md
Original file line number Diff line number Diff line change
@@ -43,17 +43,6 @@ Decode the Bitcoin address bytes with Base58 algorithm and returns a raw address



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="decoding.md#0x3_decoding_base58">base58</a>(encoded_address_bytes: &<a href="">vector</a>&lt;u8&gt;): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `base58check`
@@ -65,16 +54,3 @@ Decode the Bitcoin address bytes with Base58Check algorithm and returns a raw ad

<pre><code><b>public</b> <b>fun</b> <a href="decoding.md#0x3_decoding_base58check">base58check</a>(encoded_address_bytes: &<a href="">vector</a>&lt;u8&gt;, version_byte: u8): <a href="">vector</a>&lt;u8&gt;
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="decoding.md#0x3_decoding_base58check">base58check</a>(encoded_address_bytes: &<a href="">vector</a>&lt;u8&gt;, version_byte: u8): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>
83 changes: 0 additions & 83 deletions crates/rooch-framework/doc/ecdsa_k1.md
Original file line number Diff line number Diff line change
@@ -102,19 +102,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_auth_validator_id_length">auth_validator_id_length</a>(): u64 {
<a href="ecdsa_k1.md#0x3_ecdsa_k1_ECDSA_K1_TO_BITCOIN_VALIDATOR_ID_LENGTH">ECDSA_K1_TO_BITCOIN_VALIDATOR_ID_LENGTH</a>
}
</code></pre>



</details>

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

## Function `public_key_length`
@@ -126,19 +113,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_public_key_length">public_key_length</a>(): u64 {
<a href="ecdsa_k1.md#0x3_ecdsa_k1_ECDSA_K1_COMPRESSED_PUBKEY_LENGTH">ECDSA_K1_COMPRESSED_PUBKEY_LENGTH</a>
}
</code></pre>



</details>

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

## Function `signature_length`
@@ -150,19 +124,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_signature_length">signature_length</a>(): u64 {
<a href="ecdsa_k1.md#0x3_ecdsa_k1_ECDSA_K1_SIG_LENGTH">ECDSA_K1_SIG_LENGTH</a>
}
</code></pre>



</details>

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

## Function `sha256`
@@ -174,19 +135,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_sha256">sha256</a>(): u8 {
<a href="ecdsa_k1.md#0x3_ecdsa_k1_SHA256">SHA256</a>
}
</code></pre>



</details>

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

## Function `ripemd160`
@@ -198,19 +146,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_ripemd160">ripemd160</a>(): u8 {
<a href="ecdsa_k1.md#0x3_ecdsa_k1_RIPEMD160">RIPEMD160</a>
}
</code></pre>



</details>

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

## Function `verify`
@@ -226,21 +161,3 @@ If the signature is valid to the pubkey and hashed message, return true. Else fa

<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_verify">verify</a>(signature: &<a href="">vector</a>&lt;u8&gt;, public_key: &<a href="">vector</a>&lt;u8&gt;, msg: &<a href="">vector</a>&lt;u8&gt;, <a href="">hash</a>: u8): bool
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="ecdsa_k1.md#0x3_ecdsa_k1_verify">verify</a>(
signature: &<a href="">vector</a>&lt;u8&gt;,
public_key: &<a href="">vector</a>&lt;u8&gt;,
msg: &<a href="">vector</a>&lt;u8&gt;,
<a href="">hash</a>: u8
): bool;
</code></pre>



</details>
91 changes: 0 additions & 91 deletions crates/rooch-framework/doc/ecdsa_k1_recoverable.md
Original file line number Diff line number Diff line change
@@ -115,19 +115,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_public_key_length">public_key_length</a>(): u64 {
<a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_ECDSA_K1_RECOVERABLE_COMPRESSED_PUBKEY_LENGTH">ECDSA_K1_RECOVERABLE_COMPRESSED_PUBKEY_LENGTH</a>
}
</code></pre>



</details>

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

## Function `uncompressed_public_key_length`
@@ -139,19 +126,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_uncompressed_public_key_length">uncompressed_public_key_length</a>(): u64 {
<a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_ECDSA_K1_RECOVERABLE_UNCOMPRESSED_PUBKEY_LENGTH">ECDSA_K1_RECOVERABLE_UNCOMPRESSED_PUBKEY_LENGTH</a>
}
</code></pre>



</details>

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

## Function `signature_length`
@@ -163,19 +137,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_signature_length">signature_length</a>(): u64 {
<a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_ECDSA_K1_RECOVERABLE_SIG_LENGTH">ECDSA_K1_RECOVERABLE_SIG_LENGTH</a>
}
</code></pre>



</details>

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

## Function `keccak256`
@@ -187,19 +148,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_keccak256">keccak256</a>(): u8 {
<a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_KECCAK256">KECCAK256</a>
}
</code></pre>



</details>

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

## Function `ecrecover`
@@ -219,17 +167,6 @@ applied to Ecdsa signatures.



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_ecrecover">ecrecover</a>(signature: &<a href="">vector</a>&lt;u8&gt;, msg: &<a href="">vector</a>&lt;u8&gt;, <a href="">hash</a>: u8): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `decompress_pubkey`
@@ -245,17 +182,6 @@ otherwise throw error.



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_decompress_pubkey">decompress_pubkey</a>(pubkey: &<a href="">vector</a>&lt;u8&gt;): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `verify`
@@ -270,20 +196,3 @@ If the signature is valid to the pubkey and hashed message, return true. Else fa

<pre><code><b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_verify">verify</a>(signature: &<a href="">vector</a>&lt;u8&gt;, msg: &<a href="">vector</a>&lt;u8&gt;, <a href="">hash</a>: u8): bool
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_verify">verify</a>(
signature: &<a href="">vector</a>&lt;u8&gt;,
msg: &<a href="">vector</a>&lt;u8&gt;,
<a href="">hash</a>: u8
): bool;
</code></pre>



</details>
39 changes: 0 additions & 39 deletions crates/rooch-framework/doc/ed25519.md
Original file line number Diff line number Diff line change
@@ -51,19 +51,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ed25519.md#0x3_ed25519_public_key_length">public_key_length</a>(): u64 {
<a href="ed25519.md#0x3_ed25519_ED25519_PUBKEY_LENGTH">ED25519_PUBKEY_LENGTH</a>
}
</code></pre>



</details>

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

## Function `signature_length`
@@ -75,19 +62,6 @@ built-in functions



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ed25519.md#0x3_ed25519_signature_length">signature_length</a>(): u64 {
<a href="ed25519.md#0x3_ed25519_ED25519_SIG_LENGTH">ED25519_SIG_LENGTH</a>
}
</code></pre>



</details>

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

## Function `verify`
@@ -102,16 +76,3 @@ Otherwise, return false.

<pre><code><b>public</b> <b>fun</b> <a href="ed25519.md#0x3_ed25519_verify">verify</a>(signature: &<a href="">vector</a>&lt;u8&gt;, public_key: &<a href="">vector</a>&lt;u8&gt;, msg: &<a href="">vector</a>&lt;u8&gt;): bool
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="ed25519.md#0x3_ed25519_verify">verify</a>(signature: &<a href="">vector</a>&lt;u8&gt;, public_key: &<a href="">vector</a>&lt;u8&gt;, msg: &<a href="">vector</a>&lt;u8&gt;): bool;
</code></pre>



</details>
15 changes: 0 additions & 15 deletions crates/rooch-framework/doc/empty.md
Original file line number Diff line number Diff line change
@@ -23,18 +23,3 @@ This empty function does nothing

<pre><code><b>public</b> entry <b>fun</b> <a href="empty.md#0x3_empty">empty</a>()
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> entry <b>fun</b> <a href="empty.md#0x3_empty">empty</a>(){
//Just do nothing
}
</code></pre>



</details>
57 changes: 0 additions & 57 deletions crates/rooch-framework/doc/encoding.md
Original file line number Diff line number Diff line change
@@ -76,17 +76,6 @@ Encode the address bytes with Base58 algorithm and returns an encoded Bitcoin ad



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="encoding.md#0x3_encoding_base58">base58</a>(address_bytes: &<a href="">vector</a>&lt;u8&gt;): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `base58check`
@@ -101,17 +90,6 @@ Encode the address bytes with Base58Check algorithm and returns an encoded Bitco



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="encoding.md#0x3_encoding_base58check">base58check</a>(address_bytes: &<a href="">vector</a>&lt;u8&gt;, version_byte: u8): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `bech32`
@@ -126,17 +104,6 @@ Encode the public key with Bech32 or Bech32m encoding algorithm and returns 42 o



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="encoding.md#0x3_encoding_bech32">bech32</a>(public_key: &<a href="">vector</a>&lt;u8&gt;, version: u8): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `p2sh`
@@ -150,17 +117,6 @@ Creates a pay to script hash P2SH address from a script converted from a compres



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="encoding.md#0x3_encoding_p2sh">p2sh</a>(public_key: &<a href="">vector</a>&lt;u8&gt;): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>

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

## Function `p2pkh`
@@ -171,16 +127,3 @@ Creates a pay to (compressed) public key hash address from a public key.

<pre><code><b>public</b> <b>fun</b> <a href="encoding.md#0x3_encoding_p2pkh">p2pkh</a>(public_key: &<a href="">vector</a>&lt;u8&gt;): <a href="">vector</a>&lt;u8&gt;
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>native</b> <b>public</b> <b>fun</b> <a href="encoding.md#0x3_encoding_p2pkh">p2pkh</a>(public_key: &<a href="">vector</a>&lt;u8&gt;): <a href="">vector</a>&lt;u8&gt;;
</code></pre>



</details>
108 changes: 0 additions & 108 deletions crates/rooch-framework/doc/ethereum_address.md
Original file line number Diff line number Diff line change
@@ -31,22 +31,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>bytes: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -100,50 +84,6 @@ Ethereum addresses are always 20 bytes



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ethereum_address.md#0x3_ethereum_address_new">new</a>(pub_key: <a href="">vector</a>&lt;u8&gt;): <a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a> {
// A pubkey is a 33-bytes compressed <b>public</b> key
<b>assert</b>!(
<a href="_length">vector::length</a>(&pub_key) == <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_public_key_length">ecdsa_k1_recoverable::public_key_length</a>(),
<a href="_invalid_argument">error::invalid_argument</a>(<a href="ethereum_address.md#0x3_ethereum_address_ErrorMalformedPublicKey">ErrorMalformedPublicKey</a>)
);
// Decompressing the pubkey <b>to</b> a 65-bytes <b>public</b> key.
<b>let</b> uncompressed = <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_decompress_pubkey">ecdsa_k1_recoverable::decompress_pubkey</a>(&pub_key);
<b>assert</b>!(
<a href="_length">vector::length</a>(&uncompressed) == <a href="ecdsa_k1_recoverable.md#0x3_ecdsa_k1_recoverable_uncompressed_public_key_length">ecdsa_k1_recoverable::uncompressed_public_key_length</a>(),
<a href="_internal">error::internal</a>(<a href="ethereum_address.md#0x3_ethereum_address_ErrorDecompressPublicKey">ErrorDecompressPublicKey</a>)
);
// Ignore the first byte and take the last 64-bytes of the uncompressed pubkey.
<b>let</b> uncompressed_64 = <a href="_empty">vector::empty</a>&lt;u8&gt;();
<b>let</b> i = 1;
<b>while</b> (i &lt; 65) {
<b>let</b> value = <a href="_borrow">vector::borrow</a>(&uncompressed, i);
<a href="_push_back">vector::push_back</a>(&<b>mut</b> uncompressed_64, *value);
i = i + 1;
};
// Take the last 20 bytes of the <a href="">hash</a> of the 64-bytes uncompressed pubkey.
<b>let</b> hashed = hash::keccak256(&uncompressed_64);
<b>let</b> address_bytes = <a href="_empty">vector::empty</a>&lt;u8&gt;();
<b>let</b> i = 12;
<b>while</b> (i &lt; 32) {
<b>let</b> value = <a href="_borrow">vector::borrow</a>(&hashed, i);
<a href="_push_back">vector::push_back</a>(&<b>mut</b> address_bytes, *value);
i = i + 1;
};
// Return the 20 bytes <b>address</b> <b>as</b> the Ethereum <b>address</b>
<a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a> {
bytes: address_bytes,
}
}
</code></pre>



</details>

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

## Function `from_bytes`
@@ -155,25 +95,6 @@ Ethereum addresses are always 20 bytes



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ethereum_address.md#0x3_ethereum_address_from_bytes">from_bytes</a>(bytes: <a href="">vector</a>&lt;u8&gt;): <a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a> {
<b>assert</b>!(
<a href="_length">vector::length</a>(&bytes) == <a href="ethereum_address.md#0x3_ethereum_address_ETHEREUM_ADDR_LENGTH">ETHEREUM_ADDR_LENGTH</a>,
<a href="_invalid_argument">error::invalid_argument</a>(<a href="ethereum_address.md#0x3_ethereum_address_ErrorInvaidAddressBytes">ErrorInvaidAddressBytes</a>)
);
<a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a> {
bytes: bytes,
}
}
</code></pre>



</details>

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

## Function `as_bytes`
@@ -185,19 +106,6 @@ Ethereum addresses are always 20 bytes



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ethereum_address.md#0x3_ethereum_address_as_bytes">as_bytes</a>(addr: &<a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a>): &<a href="">vector</a>&lt;u8&gt; {
&addr.bytes
}
</code></pre>



</details>

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

## Function `into_bytes`
@@ -206,19 +114,3 @@ Ethereum addresses are always 20 bytes

<pre><code><b>public</b> <b>fun</b> <a href="ethereum_address.md#0x3_ethereum_address_into_bytes">into_bytes</a>(addr: <a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ethereum_address::ETHAddress</a>): <a href="">vector</a>&lt;u8&gt;
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ethereum_address.md#0x3_ethereum_address_into_bytes">into_bytes</a>(addr: <a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a>): <a href="">vector</a>&lt;u8&gt; {
<b>let</b> <a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ETHAddress</a> { bytes } = addr;
bytes
}
</code></pre>



</details>
156 changes: 0 additions & 156 deletions crates/rooch-framework/doc/ethereum_light_client.md
Original file line number Diff line number Diff line change
@@ -35,100 +35,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code><a href="">hash</a>: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Hash of the block
</dd>
<dt>
<code>parent_hash: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Hash of the parent
</dd>
<dt>
<code>uncles_hash: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Hash of the uncles
</dd>
<dt>
<code>author: <a href="ethereum_address.md#0x3_ethereum_address_ETHAddress">ethereum_address::ETHAddress</a></code>
</dt>
<dd>
Miner/author's address.
</dd>
<dt>
<code>state_root: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
State root hash
</dd>
<dt>
<code>transactions_root: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Transactions root hash
</dd>
<dt>
<code>receipts_root: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Transactions receipts root hash
</dd>
<dt>
<code>logs_bloom: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Logs bloom
</dd>
<dt>
<code>difficulty: u256</code>
</dt>
<dd>
Difficulty
</dd>
<dt>
<code>number: u64</code>
</dt>
<dd>
Block number.
</dd>
<dt>
<code>gas_limit: u256</code>
</dt>
<dd>
Gas Limit
</dd>
<dt>
<code>gas_used: u256</code>
</dt>
<dd>
Gas Used
</dd>
<dt>
<code><a href="timestamp.md#0x3_timestamp">timestamp</a>: u256</code>
</dt>
<dd>
Timestamp
</dd>
<dt>
<code>extra_data: <a href="">vector</a>&lt;u8&gt;</code>
</dt>
<dd>
Extra data
</dd>
</dl>


</details>

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

## Resource `BlockStore`
@@ -140,22 +46,6 @@



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>blocks: <a href="_Table">table::Table</a>&lt;u64, <a href="ethereum_light_client.md#0x3_ethereum_light_client_BlockHeader">ethereum_light_client::BlockHeader</a>&gt;</code>
</dt>
<dd>

</dd>
</dl>


</details>

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

## Constants
@@ -181,22 +71,6 @@



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="ethereum_light_client.md#0x3_ethereum_light_client_genesis_init">genesis_init</a>(ctx: &<b>mut</b> Context, genesis_account: &<a href="">signer</a>){
<b>let</b> block_store = <a href="ethereum_light_client.md#0x3_ethereum_light_client_BlockStore">BlockStore</a>{
blocks: <a href="_new">table::new</a>(ctx),
};
<a href="_global_move_to">account_storage::global_move_to</a>(ctx, genesis_account, block_store);
}
</code></pre>



</details>

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

## Function `submit_new_block`
@@ -209,19 +83,6 @@ The relay server submit a new Ethereum block to the light client.



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> entry <b>fun</b> <a href="ethereum_light_client.md#0x3_ethereum_light_client_submit_new_block">submit_new_block</a>(ctx: &<b>mut</b> Context, block_header_bytes: <a href="">vector</a>&lt;u8&gt;){
<a href="ethereum_light_client.md#0x3_ethereum_light_client_process_block">process_block</a>(ctx, block_header_bytes);
}
</code></pre>



</details>

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

## Function `get_block`
@@ -231,20 +92,3 @@ Get block via block_number

<pre><code><b>public</b> <b>fun</b> <a href="ethereum_light_client.md#0x3_ethereum_light_client_get_block">get_block</a>(ctx: &<a href="_Context">context::Context</a>, block_number: u64): &<a href="ethereum_light_client.md#0x3_ethereum_light_client_BlockHeader">ethereum_light_client::BlockHeader</a>
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="ethereum_light_client.md#0x3_ethereum_light_client_get_block">get_block</a>(ctx: &Context, block_number: u64): &<a href="ethereum_light_client.md#0x3_ethereum_light_client_BlockHeader">BlockHeader</a>{
<b>let</b> block_store = <a href="_global_borrow">account_storage::global_borrow</a>&lt;<a href="ethereum_light_client.md#0x3_ethereum_light_client_BlockStore">BlockStore</a>&gt;(ctx, @rooch_framework);
<b>assert</b>!(<a href="_contains">table::contains</a>(&block_store.blocks, block_number), <a href="_invalid_argument">error::invalid_argument</a>(<a href="ethereum_light_client.md#0x3_ethereum_light_client_ErrorBlockNotFound">ErrorBlockNotFound</a>));
<a href="_borrow">table::borrow</a>(&block_store.blocks, block_number)
}
</code></pre>



</details>
Loading

0 comments on commit 34be22c

Please sign in to comment.