otomato-sdk 2.0.342 → 2.0.343

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.
@@ -1901,7 +1901,7 @@ export const TRIGGERS = {
1901
1901
  },
1902
1902
  "LTV": {
1903
1903
  "name": "LTV",
1904
- "dynamicName": "async (env, { otomatoSDK }) => {\n const { getChainHTML, getComparisonString } = otomatoSDK;\n return `<div><b>${env.parameters['abiParams.user']}</b> LTC on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}</div>`;\n }",
1904
+ "dynamicName": "async (env, { otomatoSDK }) => {\n const { getChainHTML, getComparisonString, shortenAddress } = otomatoSDK;\n return `<div><b>${shortenAddress(env.parameters['abiParams.user'])}</b> LTV on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}</div>`;\n }",
1905
1905
  "description": "Get the maximum and current Loan-to-Value (LTV) ratios for the given wallet address on Aave",
1906
1906
  "type": 1,
1907
1907
  "prototype": "aaveLTV",
@@ -1970,7 +1970,7 @@ export const TRIGGERS = {
1970
1970
  },
1971
1971
  "HEALTH_FACTOR": {
1972
1972
  "name": "Health Factor",
1973
- "dynamicName": "async (env, { otomatoSDK }) => {\n const { getChainHTML, getComparisonString } = otomatoSDK;\n return `<div><b>${env.parameters['abiParams.user']}</b> health factor on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}</div>`;\n }",
1973
+ "dynamicName": "async (env, { otomatoSDK }) => {\n const { getChainHTML, getComparisonString, shortenAddress } = otomatoSDK;\n return `<div><b>${shortenAddress(env.parameters['abiParams.user'])}</b> health factor on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}</div>`;\n }",
1974
1974
  "description": "Get the health factor for a given account on Aave",
1975
1975
  "type": 1,
1976
1976
  "prototype": "aaveHealthFactor",
@@ -4250,6 +4250,143 @@ export const TRIGGERS = {
4250
4250
  ],
4251
4251
  "blockId": 72,
4252
4252
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/hyperlend.webp"
4253
+ },
4254
+ "LTV": {
4255
+ "name": "LTV",
4256
+ "dynamicName": "async (env, { otomatoSDK }) => {\n const { getChainHTML, getComparisonString, shortenAddress } = otomatoSDK;\n return `<div><b>${shortenAddress(env.parameters['abiParams.user'])}</b> LTV on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}</div>`;\n }",
4257
+ "description": "Get the maximum and current Loan-to-Value (LTV) ratios for the given wallet address on Hyperlend",
4258
+ "type": 1,
4259
+ "prototype": "hyperlendLTV",
4260
+ "method": "function getUserAccountData(address user) external view returns (uint256 totalCollateralBase, uint256 totalDebtBase, uint256 availableBorrowsBase, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor)",
4261
+ "parameters": [
4262
+ {
4263
+ "key": "chainId",
4264
+ "type": "chainId",
4265
+ "description": "Chain ID of the network",
4266
+ "mandatory": true,
4267
+ "category": 0
4268
+ },
4269
+ {
4270
+ "key": "abiParams.user",
4271
+ "type": "address",
4272
+ "description": "The wallet address to fetch Hyperlend account data for",
4273
+ "mandatory": true,
4274
+ "category": 0
4275
+ },
4276
+ {
4277
+ "key": "condition",
4278
+ "type": "logic_operator",
4279
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
4280
+ "mandatory": true,
4281
+ "category": 0
4282
+ },
4283
+ {
4284
+ "key": "comparisonValue",
4285
+ "type": "float",
4286
+ "description": "The value to compare to",
4287
+ "mandatory": true,
4288
+ "category": 0
4289
+ },
4290
+ ],
4291
+ "output": {
4292
+ "maxLTV": "float",
4293
+ "currentLTV": "float"
4294
+ },
4295
+ "examples": [
4296
+ {
4297
+ "name": "Hyperlend LTV for wallet address",
4298
+ "description": "Fetches the maximum and current LTV for the given wallet address on Hyperlend on HyperEVM",
4299
+ "externalVariableDescription": "Hyperlend LTV data",
4300
+ "parameters": [
4301
+ {
4302
+ "key": "chainId",
4303
+ "value": 999
4304
+ },
4305
+ {
4306
+ "key": "abiParams.user",
4307
+ "value": "0xe6fDce21F9787C2fa04A2CbC11011F77458fCfb4"
4308
+ },
4309
+ {
4310
+ "key": "condition",
4311
+ "value": "gte"
4312
+ },
4313
+ {
4314
+ "key": "comparisonValue",
4315
+ "value": 60
4316
+ }
4317
+ ]
4318
+ }
4319
+ ],
4320
+ "blockId": 80,
4321
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/hyperlend.webp"
4322
+ },
4323
+ "HEALTH_FACTOR": {
4324
+ "name": "Health Factor",
4325
+ "dynamicName": "async (env, { otomatoSDK }) => {\n const { getChainHTML, getComparisonString, shortenAddress } = otomatoSDK;\n return `<div><b>${shortenAddress(env.parameters['abiParams.user'])}</b> health factor on ${getChainHTML(env.parameters.chainId)} ${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}</div>`;\n }",
4326
+ "description": "Get the health factor for a given account on Hyperlend",
4327
+ "type": 1,
4328
+ "prototype": "hyperlendHealthFactor",
4329
+ "method": "function getUserAccountData(address user) external view returns (uint256 totalCollateralBase, uint256 totalDebtBase, uint256 availableBorrowsBase, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor)",
4330
+ "parameters": [
4331
+ {
4332
+ "key": "chainId",
4333
+ "type": "chainId",
4334
+ "description": "Chain ID of the network",
4335
+ "mandatory": true,
4336
+ "category": 0
4337
+ },
4338
+ {
4339
+ "key": "abiParams.user",
4340
+ "type": "address",
4341
+ "description": "The wallet address to fetch Hyperlend account data for",
4342
+ "mandatory": true,
4343
+ "category": 0
4344
+ },
4345
+ {
4346
+ "key": "condition",
4347
+ "type": "logic_operator",
4348
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ...",
4349
+ "mandatory": true,
4350
+ "category": 0
4351
+ },
4352
+ {
4353
+ "key": "comparisonValue",
4354
+ "type": "float",
4355
+ "description": "The value to compare to",
4356
+ "mandatory": true,
4357
+ "category": 0
4358
+ },
4359
+ ],
4360
+ "output": {
4361
+ "healthFactor": "float"
4362
+ },
4363
+ "examples": [
4364
+ {
4365
+ "name": "Hyperlend Health Factor for wallet address",
4366
+ "description": "Fetches the health factor for the given wallet address on Hyperlend on HyperEVM",
4367
+ "externalVariableDescription": "Hyperlend health factor",
4368
+ "parameters": [
4369
+ {
4370
+ "key": "chainId",
4371
+ "value": 999
4372
+ },
4373
+ {
4374
+ "key": "abiParams.user",
4375
+ "value": "0xe6fDce21F9787C2fa04A2CbC11011F77458fCfb4"
4376
+ },
4377
+ {
4378
+ "key": "condition",
4379
+ "value": "lte"
4380
+ },
4381
+ {
4382
+ "key": "comparisonValue",
4383
+ "value": 1.2
4384
+ }
4385
+ ]
4386
+ }
4387
+ ],
4388
+ "blockId": 81,
4389
+ "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/hyperlend.webp"
4253
4390
  }
4254
4391
  },
4255
4392
  "HYPERBEAT": {
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.342';
1
+ export const SDK_VERSION = '2.0.343';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -1629,6 +1629,59 @@ export declare const TRIGGERS: {
1629
1629
  blockId: number;
1630
1630
  image: string;
1631
1631
  };
1632
+ LTV: {
1633
+ name: string;
1634
+ dynamicName: string;
1635
+ description: string;
1636
+ type: number;
1637
+ prototype: string;
1638
+ method: string;
1639
+ parameters: Parameter[];
1640
+ output: {
1641
+ maxLTV: string;
1642
+ currentLTV: string;
1643
+ };
1644
+ examples: {
1645
+ name: string;
1646
+ description: string;
1647
+ externalVariableDescription: string;
1648
+ parameters: ({
1649
+ key: string;
1650
+ value: number;
1651
+ } | {
1652
+ key: string;
1653
+ value: string;
1654
+ })[];
1655
+ }[];
1656
+ blockId: number;
1657
+ image: string;
1658
+ };
1659
+ HEALTH_FACTOR: {
1660
+ name: string;
1661
+ dynamicName: string;
1662
+ description: string;
1663
+ type: number;
1664
+ prototype: string;
1665
+ method: string;
1666
+ parameters: Parameter[];
1667
+ output: {
1668
+ healthFactor: string;
1669
+ };
1670
+ examples: {
1671
+ name: string;
1672
+ description: string;
1673
+ externalVariableDescription: string;
1674
+ parameters: ({
1675
+ key: string;
1676
+ value: number;
1677
+ } | {
1678
+ key: string;
1679
+ value: string;
1680
+ })[];
1681
+ }[];
1682
+ blockId: number;
1683
+ image: string;
1684
+ };
1632
1685
  };
1633
1686
  HYPERBEAT: {
1634
1687
  description: string;
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.342";
1
+ export declare const SDK_VERSION = "2.0.343";
2
2
  export declare function compareVersions(v1: string, v2: string): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "2.0.342",
3
+ "version": "2.0.343",
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",