otomato-sdk 2.0.78 → 2.0.79
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/README.md
CHANGED
|
@@ -66,7 +66,7 @@ A Workflow is a collection of Nodes (Triggers and Actions) connected by Edges.
|
|
|
66
66
|
import { Workflow, Trigger, Action, Edge, TRIGGERS, ACTIONS, CHAINS } from 'otomato-sdk';
|
|
67
67
|
|
|
68
68
|
// Initialize Trigger and Action nodes
|
|
69
|
-
const priceTrigger = new Trigger(TRIGGERS.TOKENS.
|
|
69
|
+
const priceTrigger = new Trigger(TRIGGERS.TOKENS.PRICE.PRICE_MOVEMENT_AGAINST_CURRENCY);
|
|
70
70
|
priceTrigger.setChainId(CHAINS.MODE);
|
|
71
71
|
priceTrigger.setComparisonValue(3000);
|
|
72
72
|
priceTrigger.setCondition('lte');
|
|
@@ -166,7 +166,7 @@ This example demonstrates how to create a workflow that swaps tokens and then de
|
|
|
166
166
|
import { Workflow, Trigger, Action, Edge, TRIGGERS, ACTIONS, CHAINS, getTokenFromSymbol } from 'otomato-sdk';
|
|
167
167
|
|
|
168
168
|
// Initialize Trigger
|
|
169
|
-
const priceTrigger = new Trigger(TRIGGERS.TOKENS.
|
|
169
|
+
const priceTrigger = new Trigger(TRIGGERS.TOKENS.PRICE.PRICE_MOVEMENT_AGAINST_CURRENCY);
|
|
170
170
|
priceTrigger.setChainId(CHAINS.MODE);
|
|
171
171
|
priceTrigger.setComparisonValue(3000);
|
|
172
172
|
priceTrigger.setCondition('lte');
|
|
@@ -204,7 +204,7 @@ An advanced workflow using conditional branching based on ETH price.
|
|
|
204
204
|
import { Workflow, Trigger, Action, Edge, TRIGGERS, ACTIONS, CHAINS, LOGIC_OPERATORS, ConditionGroup } from 'otomato-sdk';
|
|
205
205
|
|
|
206
206
|
// Initialize Trigger
|
|
207
|
-
const ethPriceTrigger = new Trigger(TRIGGERS.TOKENS.
|
|
207
|
+
const ethPriceTrigger = new Trigger(TRIGGERS.TOKENS.PRICE.PRICE_MOVEMENT_AGAINST_CURRENCY);
|
|
208
208
|
ethPriceTrigger.setChainId(CHAINS.MODE);
|
|
209
209
|
ethPriceTrigger.setComparisonValue(3000);
|
|
210
210
|
ethPriceTrigger.setCondition('lt');
|
|
@@ -360,8 +360,8 @@ export const TRIGGERS = {
|
|
|
360
360
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/approval.png"
|
|
361
361
|
}
|
|
362
362
|
},
|
|
363
|
-
"
|
|
364
|
-
"description": "Triggers based on
|
|
363
|
+
"PRICE": {
|
|
364
|
+
"description": "Triggers based on on-chain price changes",
|
|
365
365
|
"chains": [
|
|
366
366
|
0
|
|
367
367
|
],
|
|
@@ -418,11 +418,11 @@ export const TRIGGERS = {
|
|
|
418
418
|
"examples": [
|
|
419
419
|
{
|
|
420
420
|
"name": "ETH > 2850$",
|
|
421
|
-
"description": "Gets triggered when ETH rises above 2850$ on
|
|
421
|
+
"description": "Gets triggered when ETH rises above 2850$ on Base",
|
|
422
422
|
"parameters": [
|
|
423
423
|
{
|
|
424
424
|
"key": "chainId",
|
|
425
|
-
"value":
|
|
425
|
+
"value": 8453
|
|
426
426
|
},
|
|
427
427
|
{
|
|
428
428
|
"key": "comparisonValue",
|
|
@@ -438,13 +438,13 @@ export const TRIGGERS = {
|
|
|
438
438
|
},
|
|
439
439
|
{
|
|
440
440
|
"key": "contractAddress",
|
|
441
|
-
"value": "
|
|
441
|
+
"value": "0x4200000000000000000000000000000000000006"
|
|
442
442
|
}
|
|
443
443
|
]
|
|
444
444
|
},
|
|
445
445
|
{
|
|
446
446
|
"name": "ETH < 2100$",
|
|
447
|
-
"description": "Gets triggered when ETH falls below 2100$ on
|
|
447
|
+
"description": "Gets triggered when ETH falls below 2100$ on Base",
|
|
448
448
|
"parameters": [
|
|
449
449
|
{
|
|
450
450
|
"key": "chainId",
|
|
@@ -464,7 +464,7 @@ export const TRIGGERS = {
|
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
466
|
"key": "contractAddress",
|
|
467
|
-
"value": "
|
|
467
|
+
"value": "0x4200000000000000000000000000000000000006"
|
|
468
468
|
}
|
|
469
469
|
]
|
|
470
470
|
},
|
|
@@ -502,7 +502,7 @@ export const TRIGGERS = {
|
|
|
502
502
|
},
|
|
503
503
|
"YIELD": {
|
|
504
504
|
"ETHENA": {
|
|
505
|
-
"description": "Ethena is a synthetic dollar protocol
|
|
505
|
+
"description": "Ethena is a synthetic dollar protocol on Ethereum",
|
|
506
506
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/ethena.svg",
|
|
507
507
|
"SUSDE_YIELD": {
|
|
508
508
|
"name": "sUSDE yield",
|
|
@@ -678,7 +678,7 @@ export const TRIGGERS = {
|
|
|
678
678
|
},
|
|
679
679
|
"LENDING": {
|
|
680
680
|
"IONIC": {
|
|
681
|
-
"description": "
|
|
681
|
+
"description": "Yield-bearing money market on the OP Superchain",
|
|
682
682
|
"chains": [
|
|
683
683
|
34443,
|
|
684
684
|
8453
|
|
@@ -820,7 +820,7 @@ export const TRIGGERS = {
|
|
|
820
820
|
}
|
|
821
821
|
},
|
|
822
822
|
"ASTARIA": {
|
|
823
|
-
"description": "
|
|
823
|
+
"description": "Intent-based lending protocol",
|
|
824
824
|
"chains": [
|
|
825
825
|
34443
|
|
826
826
|
],
|
|
@@ -908,7 +908,7 @@ export const TRIGGERS = {
|
|
|
908
908
|
}
|
|
909
909
|
},
|
|
910
910
|
"AAVE": {
|
|
911
|
-
"description": "
|
|
911
|
+
"description": "The most used protocol for borrowing, lending, and yield generation",
|
|
912
912
|
"chains": [
|
|
913
913
|
8453
|
|
914
914
|
],
|
|
@@ -1049,7 +1049,7 @@ export const TRIGGERS = {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
},
|
|
1051
1051
|
"MOONWELL": {
|
|
1052
|
-
"description": "
|
|
1052
|
+
"description": "Yield-bearing money market",
|
|
1053
1053
|
"chains": [
|
|
1054
1054
|
8453
|
|
1055
1055
|
],
|
|
@@ -1200,7 +1200,7 @@ export const TRIGGERS = {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
},
|
|
1202
1202
|
"COMPOUND": {
|
|
1203
|
-
"description": "
|
|
1203
|
+
"description": "One of the biggest yield-bearing money market",
|
|
1204
1204
|
"chains": [
|
|
1205
1205
|
8453
|
|
1206
1206
|
],
|
|
@@ -1357,7 +1357,7 @@ export const TRIGGERS = {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
},
|
|
1359
1359
|
"IRONCLAD": {
|
|
1360
|
-
"description": "
|
|
1360
|
+
"description": "Yield-bearing money market available on multiple chains.",
|
|
1361
1361
|
"chains": [
|
|
1362
1362
|
8453,
|
|
1363
1363
|
34443
|
|
@@ -1501,7 +1501,7 @@ export const TRIGGERS = {
|
|
|
1501
1501
|
},
|
|
1502
1502
|
"DEXES": {
|
|
1503
1503
|
"ODOS": {
|
|
1504
|
-
"description": "
|
|
1504
|
+
"description": "Monitors events on Odos router",
|
|
1505
1505
|
"chains": [
|
|
1506
1506
|
34443,
|
|
1507
1507
|
1,
|
|
@@ -2197,48 +2197,6 @@ export const TRIGGERS = {
|
|
|
2197
2197
|
}
|
|
2198
2198
|
},
|
|
2199
2199
|
"SOCIALS": {
|
|
2200
|
-
"MODE_NAME_SERVICE": {
|
|
2201
|
-
"description": "Next generation of Mode Mainnet Domains",
|
|
2202
|
-
"chains": [
|
|
2203
|
-
34443
|
|
2204
|
-
],
|
|
2205
|
-
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/modens.png",
|
|
2206
|
-
"NAME_REGISTERED": {
|
|
2207
|
-
"name": "Name Registered",
|
|
2208
|
-
"description": "Name registered in Mode Name Service",
|
|
2209
|
-
"type": 0,
|
|
2210
|
-
"contractAddress": "0x2aD86eeEC513AC16804bb05310214C3Fd496835B",
|
|
2211
|
-
"output": {
|
|
2212
|
-
"id": "uint256",
|
|
2213
|
-
"owner": "address",
|
|
2214
|
-
"expires": "uint256",
|
|
2215
|
-
"transactionHash": "string"
|
|
2216
|
-
},
|
|
2217
|
-
"parameters": [
|
|
2218
|
-
{
|
|
2219
|
-
"key": "abiParams.id",
|
|
2220
|
-
"type": "uint256",
|
|
2221
|
-
"description": "ID of the name registered",
|
|
2222
|
-
"category": 1
|
|
2223
|
-
},
|
|
2224
|
-
{
|
|
2225
|
-
"key": "abiParams.owner",
|
|
2226
|
-
"type": "address",
|
|
2227
|
-
"description": "Owner address",
|
|
2228
|
-
"category": 1
|
|
2229
|
-
},
|
|
2230
|
-
{
|
|
2231
|
-
"key": "abiParams.expires",
|
|
2232
|
-
"type": "uint256",
|
|
2233
|
-
"description": "Expiration time",
|
|
2234
|
-
"category": 1
|
|
2235
|
-
},
|
|
2236
|
-
],
|
|
2237
|
-
"examples": [],
|
|
2238
|
-
"blockId": 3,
|
|
2239
|
-
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/modens.png"
|
|
2240
|
-
}
|
|
2241
|
-
},
|
|
2242
2200
|
"FEAR_AND_GREED": {
|
|
2243
2201
|
"description": "Fetches the Fear and Greed Index",
|
|
2244
2202
|
"tags": {},
|
|
@@ -2302,7 +2260,7 @@ export const TRIGGERS = {
|
|
|
2302
2260
|
}
|
|
2303
2261
|
},
|
|
2304
2262
|
"X": {
|
|
2305
|
-
"description": "
|
|
2263
|
+
"description": "Tracks new tweets in real time",
|
|
2306
2264
|
"tags": {},
|
|
2307
2265
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/X.webp",
|
|
2308
2266
|
"X_POST_TRIGGER": {
|
|
@@ -145,7 +145,7 @@ export declare const TRIGGERS: {
|
|
|
145
145
|
image: string;
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
|
-
|
|
148
|
+
PRICE: {
|
|
149
149
|
description: string;
|
|
150
150
|
chains: number[];
|
|
151
151
|
image: string;
|
|
@@ -926,27 +926,6 @@ export declare const TRIGGERS: {
|
|
|
926
926
|
};
|
|
927
927
|
};
|
|
928
928
|
SOCIALS: {
|
|
929
|
-
MODE_NAME_SERVICE: {
|
|
930
|
-
description: string;
|
|
931
|
-
chains: number[];
|
|
932
|
-
image: string;
|
|
933
|
-
NAME_REGISTERED: {
|
|
934
|
-
name: string;
|
|
935
|
-
description: string;
|
|
936
|
-
type: number;
|
|
937
|
-
contractAddress: string;
|
|
938
|
-
output: {
|
|
939
|
-
id: string;
|
|
940
|
-
owner: string;
|
|
941
|
-
expires: string;
|
|
942
|
-
transactionHash: string;
|
|
943
|
-
};
|
|
944
|
-
parameters: Parameter[];
|
|
945
|
-
examples: never[];
|
|
946
|
-
blockId: number;
|
|
947
|
-
image: string;
|
|
948
|
-
};
|
|
949
|
-
};
|
|
950
929
|
FEAR_AND_GREED: {
|
|
951
930
|
description: string;
|
|
952
931
|
tags: {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.79";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|