otomato-sdk 1.5.67 → 1.5.69

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.
@@ -0,0 +1 @@
1
+ export const SDK_VERSION = '1.5.69';
package/dist/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Exporting constants
2
2
  export * from './constants/Blocks.js';
3
3
  export * from './constants/chains.js';
4
+ export * from './constants/version.js';
4
5
  export * from './constants/tokens.js';
5
6
  export * from './constants/WorkflowTemplates.js';
6
7
  // Exporting models
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { ethers } from 'ethers';
11
+ import { CHAINS } from '../constants/chains.js';
11
12
  class RPCServices {
12
13
  constructor() {
13
14
  this.rpcUrls = {}; // Store the RPC URLs
@@ -17,11 +18,12 @@ class RPCServices {
17
18
  this.rpcUrls = Object.assign(Object.assign({}, this.rpcUrls), rpcs);
18
19
  }
19
20
  setRPCsFromTMS(env) {
21
+ console.log(CHAINS);
20
22
  if (env.MODE_HTTPS_PROVIDER) {
21
- this.rpcUrls[43334] = env.MODE_HTTPS_PROVIDER; // Chain ID 43334 is for Mode network
23
+ this.rpcUrls[CHAINS.MODE] = env.MODE_HTTPS_PROVIDER;
22
24
  }
23
25
  if (env.INFURA_HTTPS_PROVIDER) {
24
- this.rpcUrls[1] = env.INFURA_HTTPS_PROVIDER; // Chain ID 1 is for Ethereum mainnet
26
+ this.rpcUrls[CHAINS.ETHEREUM] = env.INFURA_HTTPS_PROVIDER;
25
27
  }
26
28
  }
27
29
  // Function to get the RPC URL for a specific chainId
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "1.5.69";
@@ -1,5 +1,6 @@
1
1
  export * from './constants/Blocks.js';
2
2
  export * from './constants/chains.js';
3
+ export * from './constants/version.js';
3
4
  export * from './constants/tokens.js';
4
5
  export * from './constants/WorkflowTemplates.js';
5
6
  export * from './models/Action.js';
@@ -1,4 +1,4 @@
1
- import { Token } from '../constants/tokens';
1
+ import { Token } from '../constants/tokens.js';
2
2
  declare class RPCServices {
3
3
  private rpcUrls;
4
4
  setRPCs(rpcs: {
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "1.5.67",
3
+ "version": "1.5.69",
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",
7
7
  "type": "module",
8
8
  "prepublishOnly": "npm run build; npm run test",
9
9
  "scripts": {
10
+ "prebuild": "node update-sdk-version.js",
10
11
  "build": "npx tsc",
11
12
  "test": "mocha --config .mocharc.json"
12
13
  },