# 3.4 Request Deposit

# Use cases

Creates a new Did deposit request for the given recipient and of the given amount.

# Tools

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

# Functions and APIs

  • IdHelper requestDidDeposit.

# Background

From Bitcoin Wiki:

Bech32 is a segwit address format specified by BIP 0173. This address format is also known as "bc1 addresses".

From Wikipedia:

Segregated Witness, or SegWit, is the name used for an implemented soft fork change in the transaction format of the cryptocurrency bitcoin.

# Step by step sequence

  1. Set up the deposit;
  2. Finally, execute the IdHelper requestDidDeposit function to request the deposit.

# Code Examples

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

# Dart

final depositAmount = [const StdCoin(denom: 'ucommercio', amount: '100')];

await IdHelper.requestDidDeposit(
  wallet.bech32Address,
  depositAmount,
  wallet
);
1
2
3
4
5
6
7

# Kotlin

val depositAmount = listOf(StdCoin(denom = "ucommercio", amount = "100"))

IdHelper.requestDidDeposit(
    recipient = Did(wallet.bech32Address),
    amount = depositAmount,
    wallet = wallet
)
1
2
3
4
5
6
7

# C#

List<commercio.sacco.lib.StdCoin> depositAmount = new List<commercio.sacco.lib.StdCoin>();
depositAmount.Add(new commercio.sacco.lib.StdCoin(denom: "ucommercio", amount: "100"));

var res = commercio.sdk.IdHelper.requestDidDeposit(wallet.bech32Address, depositAmount, wallet);
1
2
3
4