Skip to content

Commit

Permalink
Website update 2024 03 08 (#2860)
Browse files Browse the repository at this point in the history
* docs: add doc of @taquito/beacon-wallet bundle

* docs: add notes to simulate page

* docs: addressing comments
  • Loading branch information
hui-an-yang authored Mar 19, 2024
1 parent f036740 commit ebee0ba
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 59 deletions.
2 changes: 1 addition & 1 deletion docs/contract_call_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You will find below tables that match some of the most common values that smart

> You can find the tests used to check these values [in this GitHub repo](https://github.com/claudebarde/taquito-contract-call-params)
::: note
:::note
Since Taquito version 16.2.0, we introduced syntax support for nested options in `methodsObject` but not `methods` due to the limitation of the flattened form. We recommend users migrate to using `methodsObject` as its syntax is consistent with storage parameters, supports all Michelson data types, and is continually maintained.
:::

Expand Down
4 changes: 4 additions & 0 deletions docs/estimate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import TabItem from '@theme/TabItem';

Taquito's estimate method can be used to estimate fees, gas, and storage associated with an operation.

:::note
Our estimation of `fee`, `gasLimit` and `storageLimit` is based on the RPC call response to `simulate_operation` plus a small buffer. The context and volume at the time of `simulate_operation` might differ from `preapply/operations` and `injection/operation`, potentially causing errors like `fees_too_low`, `storage_exhausted.operation` and `gas_exhausted.operation`.
:::

## The `Estimate` object

The `Estimate` object has the following properties:
Expand Down
26 changes: 0 additions & 26 deletions docs/mobile_bundle.md

This file was deleted.

36 changes: 36 additions & 0 deletions docs/package_bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Client-Side Environments
id: package_bundle
author: Davis Sawali
---
# Using Taquito in Client-Side Environments
While Taquito works best in Node runtime applications, some of our users working in client-side development might not have access to such features. To accommodate for that, we have decided to provide separate pure JavaScript bundles that you can import into your client-side environment.

Currently, the available bundles are `@taquito/local-forging` and `@taquito/beacon-wallet` packages.

The bundle wraps functions from the `@taquito/local-forging` package into a single variable called `taquito_local_forging`, and from the `@taquito/beacon-wallet` package into a single variable called `taquito_beacon_wallet`.

## Instructions for Using the Bundle

To use the JavaScript bundle for your project, download the zip file under `Assets` from your preferred Taquito [release](https://github.com/ecadlabs/taquito/releases).

After that, simply copy the `.js` file and the `.map.js` file into your project.

Example of how to use the `LocalForger` class in a simple HTML script tag:
```
<script type="text/javascript" src="/path/to/taquito_local_forging.js"></script>
<script type="text/javascript">
let op = {...}
let forger = new taquito_local_forging.LocalForger();
let res = forger.forge(op);
</script>
```
Example of how to use the `BeaconWallet` class in a simple HTML script tag:

```
<script type="text/javascript" src="/path/to/taquito_beacon_wallet.js"></script>
<script type="text/javascript">
let op = {...}
let wallet = new taquito_beacon_wallet.BeaconWallet();
</script>
```
6 changes: 3 additions & 3 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ const sidebars = {
collapsed: false,
collapsible: false,
items: [
'signing',
'inmemory_signer',
'signing',
'inmemory_signer',
'ledger_signer'
],
},
Expand Down Expand Up @@ -192,7 +192,7 @@ const sidebars = {
collapsed: false,
collapsible: false,
items: [
'mobile_bundle',
'package_bundle',
'dapp_template',
'dapp_prelaunch',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You will find below tables that match some of the most common values that smart

> You can find the tests used to check these values [in this GitHub repo](https://github.com/claudebarde/taquito-contract-call-params)
::: note
:::note
Since Taquito version 16.2.0, we introduced syntax support for nested options in `methodsObject` but not `methods` due to the limitation of the flattened form. We recommend users migrate to using `methodsObject` as its syntax is consistent with storage parameters, supports all Michelson data types, and is continually maintained.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You will find below tables that match some of the most common values that smart

> You can find the tests used to check these values [in this GitHub repo](https://github.com/claudebarde/taquito-contract-call-params)
::: note
:::note
Since Taquito version 16.2.0, we introduced syntax support for nested options in `methodsObject` but not `methods` due to the limitation of the flattened form. We recommend users migrate to using `methodsObject` as its syntax is consistent with storage parameters, supports all Michelson data types, and is continually maintained.
:::

Expand Down
4 changes: 4 additions & 0 deletions website/versioned_docs/version-19.1.0/estimate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import TabItem from '@theme/TabItem';

Taquito's estimate method can be used to estimate fees, gas, and storage associated with an operation.

:::note
Our estimation of `fee`, `gasLimit` and `storageLimit` is based on the RPC call response to `simulate_operation` plus a small buffer. The context and volume at the time of `simulate_operation` might differ from `preapply/operations` and `injection/operation`, potentially causing errors like `fees_too_low`, `storage_exhausted.operation` and `gas_exhausted.operation`.
:::

## The `Estimate` object

The `Estimate` object has the following properties:
Expand Down
26 changes: 0 additions & 26 deletions website/versioned_docs/version-19.1.0/mobile_bundle.md

This file was deleted.

36 changes: 36 additions & 0 deletions website/versioned_docs/version-19.1.0/package_bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Client-Side Environments
id: package_bundle
author: Davis Sawali
---
# Using Taquito in Client-Side Environments
While Taquito works best in Node runtime applications, some of our users working in client-side development might not have access to such features. To accommodate for that, we have decided to provide separate pure JavaScript bundles that you can import into your client-side environment.

Currently, the available bundles are `@taquito/local-forging` and `@taquito/beacon-wallet` packages.

The bundle wraps functions from the `@taquito/local-forging` package into a single variable called `taquito_local_forging`, and from the `@taquito/beacon-wallet` package into a single variable called `taquito_beacon_wallet`.

## Instructions for Using the Bundle

To use the JavaScript bundle for your project, download the zip file under `Assets` from your preferred Taquito [release](https://github.com/ecadlabs/taquito/releases).

After that, simply copy the `.js` file and the `.map.js` file into your project.

Example of how to use the `LocalForger` class in a simple HTML script tag:
```
<script type="text/javascript" src="/path/to/taquito_local_forging.js"></script>
<script type="text/javascript">
let op = {...}
let forger = new taquito_local_forging.LocalForger();
let res = forger.forge(op);
</script>
```
Example of how to use the `BeaconWallet` class in a simple HTML script tag:

```
<script type="text/javascript" src="/path/to/taquito_beacon_wallet.js"></script>
<script type="text/javascript">
let op = {...}
let wallet = new taquito_beacon_wallet.BeaconWallet();
</script>
```
2 changes: 1 addition & 1 deletion website/versioned_sidebars/version-19.1.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"collapsed": false,
"collapsible": false,
"items": [
"mobile_bundle",
"package_bundle",
"dapp_template",
"dapp_prelaunch"
]
Expand Down

0 comments on commit ebee0ba

Please sign in to comment.