@covalenthq/client-sdk
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -204,3 +204,3 @@ import { Chains } from "./Client"; | ||
*/ | ||
getRecentTransactionsForAddress(chainName: Chains, walletAddress: string, quoteCurrency?: Quotes, noLogs?: boolean): AsyncIterable<Response<RecentTransactionsResponse>>; | ||
getAllTransactionsForAddress(chainName: Chains, walletAddress: string, quoteCurrency?: Quotes, noLogs?: boolean): AsyncIterable<Response<RecentTransactionsResponse>>; | ||
/** | ||
@@ -207,0 +207,0 @@ * |
@@ -285,3 +285,3 @@ "use strict"; | ||
*/ | ||
async *getRecentTransactionsForAddress(chainName, walletAddress, quoteCurrency, noLogs) { | ||
async *getAllTransactionsForAddress(chainName, walletAddress, quoteCurrency, noLogs) { | ||
let success = false; | ||
@@ -288,0 +288,0 @@ while (!success) { |
{ | ||
"name": "@covalenthq/client-sdk", | ||
"version": "0.1.4", | ||
"main": "dist/services/index.js", | ||
"types": "dist/services/index.d.ts", | ||
"version": "0.1.5", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
@@ -7,0 +7,0 @@ "/dist" |
@@ -105,3 +105,3 @@ # covalent-api-sdk-js | ||
- `getRecentTransactionsForAddress()`: Fetch and render the most recent transactions involving an address. Frequently seen in wallet applications. | ||
- `getAllTransactionsForAddress()`: Fetch and render the most recent transactions involving an address. Frequently seen in wallet applications. | ||
- `getTransaction()`: Fetch and render a single transaction including its decoded log events. Additionally return semantically decoded information for DEX trades, lending and NFT sales. | ||
@@ -129,3 +129,3 @@ - `getTransactionsForBlock()`: Fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions. | ||
The Covalent `getRecentTransactionsForAddress()` endpoint is currently the only endpoint that supports pagination which return 100 results per page. To get the next page, it uses a link url that is grabbed from the previous call. Here's an example of how to paginate through all recent transactions on the ethereum blockchain for the demo's ENS address: | ||
The Covalent `getAllTransactionsForAddress()` endpoint is currently the only endpoint that supports pagination which return 100 results per page. To get the next page, it uses a link url that is grabbed from the previous call. Here's an example of how to paginate through all recent transactions on the ethereum blockchain for the demo's ENS address: | ||
@@ -137,3 +137,3 @@ ```ts | ||
const client = new Client("YOUR_API_KEY"); // Replace with your Covalent API key. | ||
for await (const resp of client.TransactionService.getRecentTransactionsForAddress("eth-mainnet", "demo.eth")) { | ||
for await (const resp of client.TransactionService.getAllTransactionsForAddress("eth-mainnet", "demo.eth")) { | ||
console.log("resp", resp); | ||
@@ -140,0 +140,0 @@ } |
Sorry, the diff of this file is not supported yet
411528