# 4.5 receiptList(sent/received)

Get the sent receipt's list of an acccount.

Get the received receipt's list of an acccount.

# Tools

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

# Functions and APIs

  • Network queryChain.

# Step by step sequence

  1. Generate the wallet;
  2. Execute the Network queryChain function to get the sent receipt's list; 3 Execute the Network queryChain 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 sentReceiptsURL = '${wallet.networkInfo.lcdUrl}/receipts/${wallet.bech32Address}/sent';

final sentReceipts = await Network.queryChain(sentReceiptsURL);

final receivedReceiptsURL = '${wallet.networkInfo.lcdUrl}/receipts/${wallet.bech32Address}/received';

final receivedReceipts = await Network.queryChain(receivedReceiptsURL);
1
2
3
4
5
6
7
8
9

# 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