swaply-sdk-ts 0.0.21 → 0.0.22
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/apiClient.d.ts +1 -1
- package/dist/apiClient.js +2 -2
- package/package.json +1 -1
- package/src/apiClient.ts +6 -1
- package/tsconfig.json +0 -1
package/dist/apiClient.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class SwaplyApiClient {
|
|
|
8
8
|
addApproval(signedData: SignedApproval, intentId: string): Promise<void>;
|
|
9
9
|
getIntent(intentId: string): Promise<PublicSwapWithAdditionalInfo>;
|
|
10
10
|
getIntentStatus(intentId: string): Promise<IntentStatus>;
|
|
11
|
-
listRetailUserHistory(walletAddressOrRetailId: string): Promise<PaginatedResponse<PublicSwapWithAdditionalInfo>>;
|
|
11
|
+
listRetailUserHistory(walletAddressOrRetailId: string, limit?: number, offset?: number, active?: boolean): Promise<PaginatedResponse<PublicSwapWithAdditionalInfo>>;
|
|
12
12
|
getSwapByIntentId(intentId: string): Promise<PublicSwapWithAdditionalInfo>;
|
|
13
13
|
listNetworks(token?: string): Promise<Network[]>;
|
|
14
14
|
listTokens(limit?: number, offset?: number, q?: string, networkId?: number): Promise<PaginatedResponse<Token>>;
|
package/dist/apiClient.js
CHANGED
|
@@ -46,8 +46,8 @@ export class SwaplyApiClient {
|
|
|
46
46
|
const response = await this.client.get(`/intents/${intentId}/status`);
|
|
47
47
|
return response.data.status;
|
|
48
48
|
}
|
|
49
|
-
async listRetailUserHistory(walletAddressOrRetailId) {
|
|
50
|
-
const response = await this.client.get(`/history/${walletAddressOrRetailId}`);
|
|
49
|
+
async listRetailUserHistory(walletAddressOrRetailId, limit = 20, offset = 0, active = false) {
|
|
50
|
+
const response = await this.client.get(`/history/${walletAddressOrRetailId}?limit=${limit}&offset=${offset}&active=${active}`);
|
|
51
51
|
return response.data;
|
|
52
52
|
}
|
|
53
53
|
async getSwapByIntentId(intentId) {
|
package/package.json
CHANGED
package/src/apiClient.ts
CHANGED
|
@@ -97,9 +97,14 @@ export class SwaplyApiClient {
|
|
|
97
97
|
|
|
98
98
|
async listRetailUserHistory(
|
|
99
99
|
walletAddressOrRetailId: string,
|
|
100
|
+
limit: number = 20,
|
|
101
|
+
offset: number = 0,
|
|
102
|
+
active: boolean = false,
|
|
100
103
|
): Promise<PaginatedResponse<PublicSwapWithAdditionalInfo>> {
|
|
101
104
|
const response: AxiosResponse<PaginatedResponse<PublicSwapWithAdditionalInfo>> =
|
|
102
|
-
await this.client.get(
|
|
105
|
+
await this.client.get(
|
|
106
|
+
`/history/${walletAddressOrRetailId}?limit=${limit}&offset=${offset}&active=${active}`,
|
|
107
|
+
);
|
|
103
108
|
|
|
104
109
|
return response.data;
|
|
105
110
|
}
|