otomato-sdk 2.0.4 → 2.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/src/constants/tokens.js +7 -0
- package/dist/src/constants/version.js +1 -1
- package/dist/src/services/ApiService.js +10 -3
- package/dist/src/services/RpcServices.js +5 -1
- package/dist/src/utils/helpers.js +1 -1
- package/dist/types/examples/get-all-workflows-from-user.d.ts +1 -0
- package/dist/types/examples/load-workflows.d.ts +1 -0
- package/dist/types/src/constants/version.d.ts +1 -1
- package/dist/types/src/services/ApiService.d.ts +1 -1
- package/package.json +1 -1
|
@@ -398,6 +398,13 @@ export const TOKENS = {
|
|
|
398
398
|
symbol: "wrsETH",
|
|
399
399
|
decimals: 18,
|
|
400
400
|
image: "https://assets.coingecko.com/coins/images/37919/small/rseth.png?1715936438"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
contractAddress: "0xA88594D404727625A9437C3f886C7643872296AE",
|
|
404
|
+
name: "WELL",
|
|
405
|
+
symbol: "WELL",
|
|
406
|
+
decimals: 18,
|
|
407
|
+
image: "https://assets.coingecko.com/coins/images/26133/small/WELL.png?1696525221"
|
|
401
408
|
}
|
|
402
409
|
]
|
|
403
410
|
};
|
|
@@ -79,13 +79,20 @@ class ApiServices {
|
|
|
79
79
|
return response.data;
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
getWorkflowsOfUser() {
|
|
82
|
+
getWorkflowsOfUser(offset, limit) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
84
|
if (!this.auth) {
|
|
85
85
|
throw new Error('Authorization token is required');
|
|
86
86
|
}
|
|
87
|
-
const headers =
|
|
88
|
-
|
|
87
|
+
const headers = { 'Authorization': this.auth };
|
|
88
|
+
// Set defaults if offset and limit are not provided
|
|
89
|
+
const finalOffset = offset !== null && offset !== void 0 ? offset : 0;
|
|
90
|
+
const finalLimit = limit !== null && limit !== void 0 ? limit : 8;
|
|
91
|
+
const params = new URLSearchParams();
|
|
92
|
+
params.append('offset', finalOffset.toString());
|
|
93
|
+
params.append('limit', finalLimit.toString());
|
|
94
|
+
const url = `/workflows?${params.toString()}`;
|
|
95
|
+
const response = yield axiosInstance.get(url, { headers });
|
|
89
96
|
return response.data;
|
|
90
97
|
});
|
|
91
98
|
}
|
|
@@ -52,7 +52,11 @@ class RPCServices {
|
|
|
52
52
|
let attempt = 0;
|
|
53
53
|
while (attempt <= retries) {
|
|
54
54
|
try {
|
|
55
|
-
|
|
55
|
+
const result = yield fn();
|
|
56
|
+
if (typeof result === 'bigint') {
|
|
57
|
+
return +(result.toString());
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
56
60
|
}
|
|
57
61
|
catch (error) {
|
|
58
62
|
if (attempt === retries) {
|
|
@@ -89,5 +89,5 @@ export function getComputeERC20Variable(amount, chainId, contractAddress) {
|
|
|
89
89
|
// Check if the amount is a numeric string and wrap it in quotes if it is
|
|
90
90
|
const formattedAmount = isNumericString(amount) ? `${amount}` : amount;
|
|
91
91
|
// Construct the computeERC20Amount formula
|
|
92
|
-
return `{{computeERC20Amount(${formattedAmount}, ${chainId}, ${formattedContractAddress})}}`;
|
|
92
|
+
return `{{computeERC20Amount(${formattedAmount}, ${chainId}, '${formattedContractAddress}')}}`;
|
|
93
93
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.6";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|
|
@@ -11,7 +11,7 @@ declare class ApiServices {
|
|
|
11
11
|
token: any;
|
|
12
12
|
}>;
|
|
13
13
|
verifyToken(token: string): Promise<any>;
|
|
14
|
-
getWorkflowsOfUser(): Promise<any>;
|
|
14
|
+
getWorkflowsOfUser(offset?: number, limit?: number): Promise<any>;
|
|
15
15
|
getSessionKeyPermissions(workflowId: string): Promise<any>;
|
|
16
16
|
}
|
|
17
17
|
export declare const apiServices: ApiServices;
|