Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalized Receive Payments with Cardano-wallet article #77

Merged
merged 4 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cardano-integration/creating-wallet-faucet.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: creating-wallet-faucet
title: Exploring Cardano wallets
sidebar_label: Exploring Cardano wallets and the faucet
sidebar_label: Exploring Cardano wallets
description: This article explains how you can create different kinds of Cardano Wallets and how you can recieve some tADA(test ADA) from the faucet.
image: ./img/og-developer-portal.png
---
Expand Down
3 changes: 1 addition & 2 deletions docs/cardano-integration/installing-cardano-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,5 +411,4 @@ Next, we will talk about how to [run cardano-node](/docs/cardano-integration/run

:::important
Currently, the **Windows** installation guide is still in-progress. In the meantime we recommend using [WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/) to get a Linux environment on-top of Windows. Once you have that installed you can use the [Linux](#linux) guide to install and run `cardano-node` within **WSL**.
:::
Simplicity Simplicity
:::
2 changes: 1 addition & 1 deletion docs/cardano-integration/installing-cardano-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You must connect your `cardano-node` to the `testnet` network and make sure it i

## MacOS / Linux

In this section, we will walk you through the process of downloading, compiling and installing `cardano-wallet` into your **Linux** based operating system.
In this section, we will walk you through the process of downloading, compiling and installing `cardano-wallet` into your **Linux / MacOS** based operating system.

#### Downloading & Compiling

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
id: listening-for-payments
id: listening-for-payments-cli
title: Listening for ADA payments using cardano-cli
sidebar_label: Receiving payments (CLI)
description: How to listen for ADA Payments using the cardano-cli
sidebar_label: Receiving payments (cardano-cli)
description: How to listen for ADA Payments with the cardano-cli
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

### Overview
:::note
This guide assumes that you have basic understanding of `cardano-cli`, how to use it and that you have installed it into your system. Otherwise we recommend reading [Installing cardano-node](/docs/cardano-integration/installing-cardano-node), [Running cardano-node](/docs/cardano-integration/running-cardano) and [Exploring Cardano Wallets](/docs/cardano-integration/creating-wallet-faucet) guides first.

This guide also assumes that you have `cardano-node` running in the background and connected to the `testnet` network.
:::

### Use case
Expand Down Expand Up @@ -80,6 +82,7 @@ First we will set the initial variables that we will be using as explained below

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -117,7 +120,7 @@ const TOTAL_EXPECTED_LOVELACE = 1000000;
*/

import * as fs from 'fs';
// Please add this dependency using npm install node-cmd but there is no @type definition for typescript
// Please add this dependency using npm install node-cmd but there is no @type definition for it
const cmd: any = require('node-cmd');

// Path to the cardano-cli binary or use the global one
Expand Down Expand Up @@ -188,6 +191,7 @@ Next, we get the string value of the **wallet address** from the `payment.addr`

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -228,7 +232,7 @@ const walletAddress = fs.readFileSync(`${CARDANO_KEYS_DIR}/payment.addr`).toStri
*/

import * as fs from 'fs';
// Please add this dependency using npm install node-cmd but there is no @type definition for typescript
// Please add this dependency using npm install node-cmd but there is no @type definition for it
const cmd: any = require('node-cmd');

// Path to the cardano-cli binary or use the global one
Expand Down Expand Up @@ -310,6 +314,7 @@ Then we execute `cardano-cli` programatically and telling it to query the **UTXO

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -358,7 +363,7 @@ const rawUtxoTable = cmd.runSync([
*/

import * as fs from 'fs';
// Please add this dependency using npm install node-cmd but there is no @type definition for typescript
// Please add this dependency using npm install node-cmd but there is no @type definition for it
const cmd: any = require('node-cmd');

// Path to the cardano-cli binary or use the global one
Expand Down Expand Up @@ -462,6 +467,7 @@ Once we have access to the **UTXO** table string, we will then parse it and comp

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -520,7 +526,7 @@ for(let x = 2; x < utxoTableRows.length; x++) {
*/

import * as fs from 'fs';
// Please add this dependency using npm install node-cmd but there is no @type definition for typescript
// Please add this dependency using npm install node-cmd but there is no @type definition for it
const cmd: any = require('node-cmd');

// Path to the cardano-cli binary or use the global one
Expand Down Expand Up @@ -653,6 +659,7 @@ Once we have the total lovelace amount, we will then determine using our code if

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -719,7 +726,7 @@ console.log(`Payment Complete: ${(isPaymentComplete ? "✅" : "❌")}`);
*/

import * as fs from 'fs';
// Please add this dependency using npm install node-cmd but there is no @type definition for typescript
// Please add this dependency using npm install node-cmd but there is no @type definition for it
const cmd: any = require('node-cmd');

// Path to the cardano-cli binary or use the global one
Expand Down Expand Up @@ -876,6 +883,7 @@ Our final code should look something like this:

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -944,7 +952,7 @@ console.log(`Payment Complete: ${(isPaymentComplete ? "✅" : "❌")}`);
*/

import * as fs from 'fs';
// Please add this dependency using npm install node-cmd but there is no @type definition for typescript
// Please add this dependency using npm install node-cmd but there is no @type definition for it
const cmd: any = require('node-cmd');

// Path to the cardano-cli binary or use the global one
Expand Down Expand Up @@ -1100,6 +1108,7 @@ Your project directory should look something like this:

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -1180,6 +1189,7 @@ Now we are ready to test 🚀, running the code should give us the following res

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down Expand Up @@ -1249,6 +1259,7 @@ Now simply send atleast `1,000,000 lovelace` to this **wallet address** or reque

<Tabs
defaultValue="js"
groupId="language"
values={[
{label: 'JavaScript', value: 'js'},
{label: 'Typescript', value: 'ts'},
Expand Down
Loading