# 4.5 receiptList(sent/received)

Get the receipt's list sent from an acccount.

Get the receipt's list received from an acccount.

# Tools

The Commercio SDK, our own open source tool to format transactions to Commercio.network

# Functions and APIs

  • DocsHelper getSentReceipts;
  • DocsHelper getReceivedReceipts.

# Step by step sequence

  1. Generate the wallet;
  2. Execute the DocsHelper getSentReceipts function to get the sent receipt's list;
  3. Execute the DocsHelper getReceivedReceipts function to get the received receipt's list.

# Code Examples

Here's an example of the implemetation in all the available languages.

# Dart

final wallet = Wallet.derive(mnemonic, networkInfo);

final sentReceipts = await DocsHelper.getSentReceipts(
  "did:com:1z6ezqssnqqc6un3henna0flr05aukcwcr5ge6t",
  wallet,
);

final receivedReceipts = await DocsHelper.getReceivedReceipts(
  "did:com:1z6ezqssnqqc6un3henna0flr05aukcwcr5ge6t",
  wallet,
);
1
2
3
4
5
6
7
8
9
10
11

# Kotlin

val wallet = Wallet.derive(mnemonic = mnemonic, networkInfo = networkInfo)

val sentReceiptsURL = "${wallet.networkInfo.lcdUrl}/receipts/${wallet.bech32Address}/sent"

val sentReceipts = Network.queryChain<List<Objects>>(url = sentReceiptsURL)

val receivedReceiptsURL = "${wallet.networkInfo.lcdUrl}/receipts/${wallet.bech32Address}/received"

val receivedReceipts = Network.queryChain<List<Objects>>(url = receivedReceiptsURL)
1
2
3
4
5
6
7
8
9

# C#

var wallet = commercio.sacco.lib.Wallet.derive(mnemonic, networkInfo);

var sentReceiptsURL = $"{wallet.networkInfo.lcdUrl}/receipts/{wallet.bech32Address}/sent";

var sentReceipts = commercio.sdk.Network.queryChain(sentReceiptsURL);

var receivedReceiptsURL = $"{wallet.networkInfo.lcdUrl}/receipts/{wallet.bech32Address}/received";
var receivedReceipts = commercio.sdk.Network.queryChain(receivedReceiptsURL);
1
2
3
4
5
6
7
8