⛏️getTransferFromAddress

Description

The getTransfersFromAddress function is an asynchronous function used to retrieve transfer transactions from a specific address on a specified blockchain.

It returns the result containing the transfer transactions from the address.

Parameters

Parameter
Data Type
Description

address

string

The address from which to retrieve transfer transactions.

blockchain

string

The blockchain on which the address exists.

env

string

The environment or network of the blockchain.

Response

Field
Data Type
Description

code

number

The response code indicating the success or failure of the operation.

result

object[]

An array of transfer transactions from the specified address.

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/explorer-lib
OR
yarn add @nest25/explorer-lib

Request

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

const {Explorer} = require("@nest25/explorer-lib")
const explorer = new Explorer('', 'testnet');


async function main (){
    const response = await explorer.getTransfersFromAddress("0xEcfCdBf37F21ec5FB66653f651eb670226557Eaf", "MATIC");
    // console.log(response);
    console.log(response.hash);
}

main()

Response

  hash: '0xa739063d3bbb86a259c40f3d34ee806673fd6484d4c26260902b2a617e265807'

Use Cases

  • Retrieving transfer transactions: By invoking this function with the appropriate parameters, you can retrieve transfer transactions from a specific address on a specified blockchain.

  • Address validation: The function validates the address to ensure it is valid.

  • Sending HTTP request: The function sends an HTTP request to the blockchain explorer's API to fetch transfer transactions from the specified address.

Last updated