🔗depositEther

Description

The depositEther function is used to transfer Ether from one wallet to another by sending it to the designated receptor contract with a unique ID.

Parameters

Response

Example Request and Response

Prerequisites

Before making requests with Nest SDK, you must have it installed.

You can install Nest SDK using either npm or yarn. Use the following commands to install Nest SDK:

npm install @nest25/evm-chains-lib
OR
yarn add @nest25/evm-chains-lib

Request

Here is an example of how to make a depositEther request using the Nest SDK:

const {Wallet} = require('@nest25/evm-chains-lib')
// create a new wallet instance
const wallet = new Wallet();
const privateKey = "your private key here"

const main = async () => {
    // deposit 0.001 ETH to the wallet
    let receipt = await wallet.depositEther(
        '123',
        '0.001',
        privateKey
    )
    // print the receipt
    console.log(receipt);
}
main()

Response

Use Cases

  • Crypto Wallets: The function can be used by crypto wallets to send Ether from one wallet to another.

  • Online Marketplaces: The function can be used by online marketplaces to facilitate payments in Ether for goods and services.

  • Cryptocurrency Exchanges: The function can be used by cryptocurrency exchanges to facilitate the buying and selling of Ether.

Last updated