Skip to content

Commit

Permalink
updated docs to group by logical order
Browse files Browse the repository at this point in the history
  • Loading branch information
dsawali committed Oct 4, 2023
1 parent 7211847 commit 48037a1
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 62 deletions.
41 changes: 41 additions & 0 deletions docs/contract_API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Contract API
id: contract_API
author: Davis Sawali
---

## What is the Contract API?
Taquito Contract API provides a simple way to interact with the Tezos blockchain. It provides methods and abstractions to prepare, forge, sign, and send operations to the Tezos blockchain, as well as interact with smart contracts.

## Installing the Contract API
The Contract API is part of the `@taquito/taquito` package. To install it, run the following command:

```
npm install @taquito/taquito
```

## How does it work?
The Contract API is exposed through the `contract` property of the `TezosToolkit` object. The `contract` property exposes methods that allow you to interact with smart contracts.

Below is a quick example of how to use the `transaction` operation via the Contract API.

```js
import { TezosToolkit } from '@taquito/taquito';

const Tezos = new TezosToolkit('RPC address here');
const op = await Tezos.contract.transfer({ to: 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', amount: 100 });
await op.confirmation();
```

For a list of methods available from the Contract API please refer to this TypeDoc documentation: https://tezostaquito.io/typedoc/interfaces/_taquito_taquito.contractprovider

## How it works
Hopefully at this point, the Taquito Contract API seems simple enough to use. But how does it work under the hood?

Injecting an operation via the Contract API actually consists of a few steps that are abstracted away from the developer. These steps are:
- Preparing the operation
- Estimating the costs of the operation
- Forging the operation
- Signing the operation
- Sending/injecting the operation
2 changes: 1 addition & 1 deletion docs/ledger_integration_test.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Ledger
title: Ledger tests
author: Roxane Letourneau
---

Expand Down
2 changes: 1 addition & 1 deletion docs/local_forger.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Local Forging Package
title: Local Forger
id: local_forger
author: Michael Kernaghan
---
Expand Down
2 changes: 1 addition & 1 deletion docs/rpc_nodes_integration_test.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: RPC nodes
title: RPC tests
author: Roxane Letourneau
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rpc_package.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: RPC Package
title: RPC
author: Claude Barde
---

Expand Down
9 changes: 0 additions & 9 deletions docs/wallet_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ npm install @taquito/taquito
```

or

```
yarn add @taquito/taquito
```

Make sure you have the latest version (`7.1.0` when this article was written, but the API became available from `6.3.2-beta.0`).

Once the package is downloaded, you can install the wallet of your choice. The wallet API supports different kinds of wallets. The _Beacon_ and _Temple_ wallets are available to use at the moment. You can install one or both wallets, depending on your requirements:

```
Expand Down
2 changes: 1 addition & 1 deletion docs/web3js_taquito.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Web3js/Taquito differences
title: web3js vs Taquito
id: web3js_taquito
author: Claude Barde
---
Expand Down
1 change: 1 addition & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

170 changes: 125 additions & 45 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,58 +24,126 @@ const sidebars = {
collapsible: false,
items: [
'quick_start',
'amendment_and_voting',
'ballot',
'react-template',
'local_forger',
'rpc_nodes',
'web3js_taquito',
'dapp_prelaunch',
],
},
{
type: 'category',
label: 'Taquito Public API',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'batch_API',
'beaconwallet-singleton',
'confirmation_event_stream',
'wallet_API',
'contract_API',
{
type: 'category',
label: 'Taquito Providers',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'prepare',
'estimate',
]
},
]
},
{
type: 'category',
label: 'Operations',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'amendment_and_voting',
'consensus_key',
'contract_call_parameters',
'contracts_collection',
'dapp_prelaunch',
'estimate',
'fa2_parameters',
'failing_noop',
'global_constant',
'increase_paid_storage',
'lambda_view',
'liquidity_baking',
'local_forger',
'making_transfers',
'manager_lambda',
'maps_bigmaps',
'metadata-tzip16',
'michelsonmap',
'multisig_doc',
'on_chain_views',
'originate',
'prepare',
'react-template',
'rpc_nodes',
'rpc_package',
'set_delegate',
'signing',
'smart_rollups',
'failing_noop',
]
},
{
type: 'category',
label: 'Smart Contracts',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'smartcontracts',
'subscribe_event',
'tezos_domains',
'contract_call_parameters',
'fa2_parameters',
'manager_lambda',
'multisig_doc',
'validators',
],
},
{
type: 'category',
label: 'Michelson',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'maps_bigmaps',
'michelsonmap',
'tickets',
],
},
{
type: 'category',
label: 'Views',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'lambda_view',
'on_chain_views',
],
},
{
type: 'category',
label: 'Wallets',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'beaconwallet-singleton',
'wallets',
'transaction_limits',
'tutorial_links',
],
},
{
type: 'category',
label: 'Contract and Token Metadata',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'tzip12',
'validators',
'wallet_API',
'wallets',
'web3js_taquito'
'metadata-tzip16',
],
},
{
type: 'category',
label: 'Signer',
label: 'Signers',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: ['inmemory_signer', 'ledger_signer'],
items: [
'signing',
'inmemory_signer',
'ledger_signer'
],
},
{
type: 'category',
Expand All @@ -84,33 +152,34 @@ const sidebars = {
collapsed: false,
collapsible: false,
items: [
'rpc_package',
'michelson_encoder',
'contracts-library',
'taquito_utils',
{
type: 'category',
label: 'Sapling',
collapsed: true,
collapsible: true,
collapsed: false,
collapsible: false,
items: ['sapling', 'sapling_in_memory_spending_key', 'sapling_in_memory_viewing_key'],
},
],
},
{
type: 'category',
label: 'Optimistic Rollups',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: ['tx_rollups'],
},
{
type: 'category',
label: 'Advanced Examples',
label: 'Advanced Scenarios',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: ['complex_parameters', 'storage_annotations', 'drain_account'],
items: [
'drain_account',
'complex_parameters',
'confirmation_event_stream',
'subscribe_event',
'liquidity_baking',
'storage_annotations',
'tezos_domains',
],
},
{
type: 'category',
Expand All @@ -136,6 +205,17 @@ const sidebars = {
collapsible: false,
items: ['mobile_bundle'],
},
{
type: 'category',
label: 'Misc',
className: 'sidebarHeader',
collapsed: false,
collapsible: false,
items: [
'tutorial_links',
'contracts_collection',
],
},
{
'Upgrading Guide': ['upgrading_guide'],
},
Expand Down
33 changes: 32 additions & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"items": [
"quick_start",
"amendment_and_voting",
"ballot",
"batch_API",
"beaconwallet-singleton",
"boilerplate",
Expand Down Expand Up @@ -50,6 +49,38 @@
"web3js_taquito"
]
},
{
"type": "category",
"label": "Taquito Public API",
"items": [
"batch_API",
"wallet_API",
"contract_API",
{
"type": "category",
"label": "Taquito Providers",
"collapsed": false,
"collapsible": false,
"items": [
"prepare",
"estimate"
]
}
]
},
{
"type": "category",
"label": "Tezos Operations",
"items": [
"amendment_and_voting",
"consensus_key",
"global_constant",
"increase_paid_storage",
"making_transfers",
"originate",
"set_delegate"
]
},
{
"type": "category",
"label": "Signer",
Expand Down
4 changes: 2 additions & 2 deletions website/src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ aside {
}

.theme-doc-sidebar-item-category {
padding-bottom: 30px;
padding-bottom: 10px;
}
}

Expand Down Expand Up @@ -701,7 +701,7 @@ aside {
.menu__list-item-collapsible .menu__link {
color: var(--black-third) !important;
font-family: Source Sans Pro;
margin-left: 14px;
margin-left: 8px;
// margin-top: 30px;
text-transform: uppercase;
font-size: 16px !important;
Expand Down

0 comments on commit 48037a1

Please sign in to comment.