mmn-client-js 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ declare class IndexerClient {
|
|
|
176
176
|
constructor(config: IndexerClientConfig);
|
|
177
177
|
private makeRequest;
|
|
178
178
|
getTransactionByHash(hash: string): Promise<Transaction>;
|
|
179
|
-
getTransactionByWallet(wallet: string, page: number | undefined, limit: number | undefined, filter: number): Promise<ListTransactionResponse>;
|
|
179
|
+
getTransactionByWallet(wallet: string, page: number | undefined, limit: number | undefined, filter: number, sortBy?: string, sortOrder?: 'asc' | 'desc'): Promise<ListTransactionResponse>;
|
|
180
180
|
getWalletDetail(wallet: string): Promise<WalletDetail>;
|
|
181
181
|
}
|
|
182
182
|
|
package/dist/index.esm.js
CHANGED
|
@@ -35,7 +35,7 @@ class IndexerClient {
|
|
|
35
35
|
const res = await this.makeRequest('GET', path);
|
|
36
36
|
return res.data.transaction;
|
|
37
37
|
}
|
|
38
|
-
async getTransactionByWallet(wallet, page = 1, limit = 50, filter) {
|
|
38
|
+
async getTransactionByWallet(wallet, page = 1, limit = 50, filter, sortBy = 'transaction_timestamp', sortOrder = 'desc') {
|
|
39
39
|
if (!wallet) {
|
|
40
40
|
throw new Error('wallet address cannot be empty');
|
|
41
41
|
}
|
|
@@ -48,8 +48,8 @@ class IndexerClient {
|
|
|
48
48
|
const params = {
|
|
49
49
|
page: page - 1,
|
|
50
50
|
limit,
|
|
51
|
-
sort_by:
|
|
52
|
-
sort_order:
|
|
51
|
+
sort_by: sortBy,
|
|
52
|
+
sort_order: sortOrder,
|
|
53
53
|
};
|
|
54
54
|
switch (filter) {
|
|
55
55
|
case API_FILTER_PARAMS.ALL:
|