otomato-sdk 2.0.8 → 2.0.9

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.
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.8';
1
+ export const SDK_VERSION = '2.0.9';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -53,10 +53,10 @@ class ApiServices {
53
53
  return yield axiosInstance.delete(url, { headers });
54
54
  });
55
55
  }
56
- generateLoginPayload(address, chainId, accessCode) {
56
+ generateLoginPayload(address, chainId, referralCode) {
57
57
  return __awaiter(this, void 0, void 0, function* () {
58
58
  const headers = { 'Content-Type': 'application/json' };
59
- const response = yield axiosInstance.post('/auth/generate-payload', { address, chainId, accessCode }, { headers });
59
+ const response = yield axiosInstance.post('/auth/generate-payload', { address, chainId, referralCode }, { headers });
60
60
  return response.data;
61
61
  });
62
62
  }
@@ -108,7 +108,7 @@ function isValidValue(value) {
108
108
  return false;
109
109
  }
110
110
  function isVariable(value) {
111
- return /\{\{nodeMap\.[^.}]+\.(?:output|parameters(?:\.abi\.parameters)?)\.[^.}]+\}\}/.test(value);
111
+ return /\{\{(?:nodeMap\.[^.}]+\.(?:output|parameters(?:\.abi\.parameters)?)|external\.functions\.[^(}]+)\([^)]*\)\}\}/.test(value);
112
112
  }
113
113
  export function typeIsNumber(type) {
114
114
  switch (type) {
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.8";
1
+ export declare const SDK_VERSION = "2.0.9";
2
2
  export declare function compareVersions(v1: string, v2: string): number;
@@ -6,7 +6,7 @@ declare class ApiServices {
6
6
  patch(url: string, data: any): Promise<import("axios").AxiosResponse<any, any>>;
7
7
  get(url: string): Promise<any>;
8
8
  delete(url: string): Promise<import("axios").AxiosResponse<any, any>>;
9
- generateLoginPayload(address: string, chainId: number, accessCode: string): Promise<any>;
9
+ generateLoginPayload(address: string, chainId: number, referralCode: string): Promise<any>;
10
10
  getToken(loginPayload: any, signature: string): Promise<{
11
11
  token: any;
12
12
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/types/src/index.d.ts",