Skip to content

Commit

Permalink
Update Mesh docs (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglescode authored Feb 27, 2023
1 parent 479704c commit 2999f11
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/get-started/mesh/get-started.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: get-started
sidebar_position: 2
title: Get Started - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Get Started
sidebar_label: Get Started
description: Get Started with Mesh
image: ../img/og/og-getstarted-mesh.png
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/mesh/overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: overview
sidebar_position: 1
title: Overview - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Overview
sidebar_label: Overview
description: Mesh is an open-source library providing everything you need to build on Web3
image: ../img/og/og-getstarted-mesh.png
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/mesh/react.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: react
sidebar_position: 8
title: React Web App - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: React Web App
sidebar_label: React Web App
description: Start building web3 applications, interact with your contracts using your wallets.
image: ../img/og/og-getstarted-mesh.png
Expand Down
41 changes: 36 additions & 5 deletions docs/get-started/mesh/transactions-basic.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: transactions-basic
sidebar_position: 4
title: Basic Transactions - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Basic Transactions
sidebar_label: Basic Transactions
description: Create transactions for sending assets.
image: ../img/og/og-getstarted-mesh.png
Expand All @@ -19,6 +19,7 @@ In this section, we will explore the following:
- [Send ADA to Addresses](#send-ada-to-addresses)
- [Send Multiple Assets to Addresses](#send-multiple-assets-to-addresses)
- [Send Assets to Handler](#send-assets-to-handler)
- [Send tokens and stable coins to addresses](#send-tokens-and-stable-coins-to-addresses)

## Send ADA to Addresses

Expand All @@ -33,6 +34,7 @@ const tx = new Transaction({ initiator: wallet })
"1000000"
)
.sendLovelace("ANOTHER ADDRESS HERE", "1500000");

const unsignedTx = await tx.build();
const signedTx = await wallet.signTx(unsignedTx);
const txHash = await wallet.submitTx(signedTx);
Expand Down Expand Up @@ -81,10 +83,39 @@ import { KoiosProvider, Transaction } from "@meshsdk/core";

const koios = new KoiosProvider("api");

const tx = new Transaction({ initiator: wallet }).sendLovelace(
await koios.fetchHandleAddress("jingles"),
"1000000"
);
const tx = new Transaction({ initiator: wallet })
.sendLovelace(
await koios.fetchHandleAddress("jingles"),
"1000000"
);

const unsignedTx = await tx.build();
const signedTx = await wallet.signTx(unsignedTx);
const txHash = await wallet.submitTx(signedTx);
```

## Send tokens and stable coins to addresses

Like `sendLovelace()`, we can chain `sendToken()` along side `tx.sendLovelace()` to send multiple assets to multiple recipients.

For instance, lets send some DJED to ADA to `jingles`:

```javascript
import { Transaction } from '@meshsdk/core';

const koios = new KoiosProvider("api");
const address = await koios.fetchHandleAddress("jingles");

const tx = new Transaction({ initiator: wallet })
.sendToken(
address,
'DJED',
'1000000'
)
.sendLovelace(
address,
"1000000"
);

const unsignedTx = await tx.build();
const signedTx = await wallet.signTx(unsignedTx);
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/mesh/transactions-minting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: transactions-minting
sidebar_position: 6
title: Minting Transactions - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Minting Transactions
sidebar_label: Minting Transactions
description: Learn to use ForgeScript to create minting transactions for minting and burning native assets.
image: ../img/og/og-getstarted-mesh.png
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/mesh/transactions-smart-contract.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: transactions-smart-contract
sidebar_position: 5
title: Smart Contracts Transactions - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Smart Contracts Transactions
sidebar_label: Smart Contracts Transactions
description: Create transactions to work with smart contracts.
image: ../img/og/og-getstarted-mesh.png
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/mesh/transactions-staking.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: transactions-staking
sidebar_position: 7
title: Staking Transactions - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Staking Transactions
sidebar_label: Staking Transactions
description: APIs for staking ADA and managing stake pools.
image: ../img/og/og-getstarted-mesh.png
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/mesh/wallets-integration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: wallets-integration
sidebar_position: 3
title: Wallets Integration - Mesh SDK (Open-Source Library for Building Web3 Apps on the Cardano Blockchain)
title: Wallets Integration
sidebar_label: Wallets Integration
description: Wallet for building transactions in your applications.
image: ../img/og/og-getstarted-mesh.png
Expand Down

0 comments on commit 2999f11

Please sign in to comment.