otomato-sdk 1.1.0 → 1.2.1

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.
Files changed (45) hide show
  1. package/dist/examples/create-action.js +2 -2
  2. package/dist/examples/create-automation.js +20 -8
  3. package/dist/examples/create-trigger.js +2 -2
  4. package/dist/examples/sandbox.js +9 -0
  5. package/dist/src/constants/Blocks.js +379 -284
  6. package/dist/src/index.js +1 -0
  7. package/dist/src/models/Action.js +1 -1
  8. package/dist/src/models/Automation.js +15 -9
  9. package/dist/src/models/Edge.js +25 -0
  10. package/dist/src/models/Node.js +36 -10
  11. package/dist/src/models/Trigger.js +7 -4
  12. package/dist/src/utils/typeValidator.js +2 -1
  13. package/dist/test/action.spec.js +19 -16
  14. package/dist/test/automation.spec.js +26 -17
  15. package/dist/test/node.spec.js +29 -19
  16. package/dist/test/trigger.spec.js +7 -2
  17. package/dist/test/typeValidator.spec.js +2 -1
  18. package/dist/types/examples/sandbox.d.ts +1 -0
  19. package/dist/types/src/constants/Blocks.d.ts +52 -14
  20. package/dist/types/src/index.d.ts +1 -0
  21. package/dist/types/src/models/Action.d.ts +3 -3
  22. package/dist/types/src/models/Automation.d.ts +12 -10
  23. package/dist/types/src/models/Edge.d.ts +14 -0
  24. package/dist/types/src/models/Node.d.ts +12 -5
  25. package/dist/types/src/models/Parameter.d.ts +1 -1
  26. package/dist/types/src/models/Trigger.d.ts +4 -3
  27. package/examples/create-action.ts +2 -2
  28. package/examples/create-automation.ts +23 -9
  29. package/examples/create-trigger.ts +2 -2
  30. package/examples/sandbox.ts +12 -0
  31. package/package.json +4 -3
  32. package/src/constants/Blocks.ts +379 -283
  33. package/src/index.ts +1 -0
  34. package/src/models/Action.ts +4 -4
  35. package/src/models/Automation.ts +22 -14
  36. package/src/models/Edge.ts +33 -0
  37. package/src/models/Node.ts +48 -11
  38. package/src/models/Parameter.ts +1 -1
  39. package/src/models/Trigger.ts +10 -6
  40. package/src/utils/typeValidator.ts +2 -1
  41. package/test/action.spec.ts +10 -8
  42. package/test/automation.spec.ts +26 -17
  43. package/test/node.spec.ts +27 -19
  44. package/test/trigger.spec.ts +7 -2
  45. package/test/typeValidator.spec.ts +2 -1
@@ -1,391 +1,486 @@
1
- import { CHAINS } from './chains.js';
2
1
  const TRIGGER_TYPE = {
3
2
  SUBSCRIPTION: 0,
4
3
  POLLING: 1,
5
4
  };
6
5
  export const TRIGGERS = {
7
- TOKENS: {
8
- ERC20: {
9
- CHAINS: [CHAINS.ALL],
10
- TRANSFER: {
11
- id: 1,
12
- name: "Transfer token",
13
- description: "Transfer an ERC-20 token",
14
- type: TRIGGER_TYPE.SUBSCRIPTION,
15
- parameters: [
6
+ "TOKENS": {
7
+ "ERC20": {
8
+ "CHAINS": [
9
+ 0
10
+ ],
11
+ "TRANSFER": {
12
+ "id": 1,
13
+ "name": "Transfer token",
14
+ "description": "This block gets triggered when someone transfers the ERC20 configured in the params",
15
+ "type": 0,
16
+ "parameters": [
16
17
  {
17
- key: "chainId",
18
- type: "chainId",
19
- description: "Chain ID of the ETH blockchain"
18
+ "key": "chainId",
19
+ "type": "chainId",
20
+ "description": "Chain ID of the ETH blockchain",
21
+ "mandatory": true
20
22
  },
21
23
  {
22
- key: "abiParams.value",
23
- type: "uint256",
24
- description: "Amount of crypto to transfer"
24
+ "key": "abiParams.from",
25
+ "type": "address",
26
+ "description": "Address that transfers the funds"
25
27
  },
26
28
  {
27
- key: "abiParams.to",
28
- type: "address",
29
- description: "Address to transfer crypto to"
29
+ "key": "abiParams.value",
30
+ "type": "uint256",
31
+ "description": "Amount of crypto to transfer"
30
32
  },
31
33
  {
32
- key: "contractAddress",
33
- type: "address",
34
- description: "The contract address of the ERC20"
35
- }
34
+ "key": "abiParams.to",
35
+ "type": "address",
36
+ "description": "Address that receives the funds"
37
+ },
38
+ {
39
+ "key": "contractAddress",
40
+ "type": "erc20",
41
+ "description": "The contract address of the ERC20",
42
+ "mandatory": true
43
+ },
36
44
  ]
37
45
  },
38
- BALANCE: {
39
- id: 1000,
40
- name: "ERC20 balance check",
41
- description: "Fetches the balance of an ERC20 and checks it against the specified condition.",
42
- type: TRIGGER_TYPE.POLLING,
43
- parameters: [
46
+ "BALANCE": {
47
+ "id": 5,
48
+ "name": "ERC20 balance check",
49
+ "description": "Fetches the balance of an ERC20 and checks it against the specified condition.",
50
+ "type": 1,
51
+ "method": "function balanceOf(address account) view returns (uint256)",
52
+ "handler": "output => { const params=JSON.parse(output);const balance = BigInt(params)/1000000n; return Number(balance); }",
53
+ "parameters": [
44
54
  {
45
- key: "chainId",
46
- type: "chainId",
47
- description: "Chain ID of the ETH blockchain"
55
+ "key": "chainId",
56
+ "type": "chainId",
57
+ "description": "Chain ID of the ETH blockchain"
48
58
  },
49
59
  {
50
- key: "abiParams.account",
51
- type: "address",
52
- description: "Amount of crypto to transfer"
60
+ "key": "abiParams.account",
61
+ "type": "address",
62
+ "description": "Amount of crypto to transfer"
53
63
  },
54
64
  {
55
- key: "contractAddress",
56
- type: "address",
57
- description: "The contract address of the ERC20"
65
+ "key": "contractAddress",
66
+ "type": "address",
67
+ "description": "The contract address of the ERC20"
58
68
  },
59
69
  {
60
- key: "condition",
61
- type: "logic_operator",
62
- description: "Logic operator used for the comparison: <, >, <=, >=, ==, ..."
70
+ "key": "condition",
71
+ "type": "logic_operator",
72
+ "description": "Logic operator used for the comparison: <, >, <=, >=, ==, ..."
63
73
  },
64
- // todo: it should be in the same type as the output of the function
65
74
  {
66
- key: "comparisonValue",
67
- type: "any",
68
- description: "The value to compare to"
75
+ "key": "comparisonValue",
76
+ "type": "any",
77
+ "description": "The value to compare to"
69
78
  },
70
79
  {
71
- key: "interval",
72
- type: "integer",
73
- description: "The waiting time between each polling"
80
+ "key": "interval",
81
+ "type": "integer",
82
+ "description": "The waiting time between each polling"
74
83
  },
75
- ],
84
+ ]
76
85
  }
77
- },
86
+ }
78
87
  },
79
- YIELD: {
80
- SPLICE_FI: {
81
- CHAINS: [CHAINS.MODE],
82
- SWAP: {
83
- id: 2,
84
- name: "Splice Finance Swap",
85
- description: "Swap in Splice Finance",
86
- type: TRIGGER_TYPE.SUBSCRIPTION,
87
- parameters: [
88
+ "YIELD": {
89
+ "SPLICE_FI": {
90
+ "CHAINS": [
91
+ 43334
92
+ ],
93
+ "SWAP": {
94
+ "id": 2,
95
+ "name": "Splice Finance Swap",
96
+ "description": "Swap in Splice Finance",
97
+ "type": 0,
98
+ "contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
99
+ "parameters": [
88
100
  {
89
- key: "abiParams.caller",
90
- type: "address",
91
- description: "Caller address"
101
+ "key": "abiParams.caller",
102
+ "type": "address",
103
+ "description": "Caller address"
92
104
  },
93
105
  {
94
- key: "abiParams.market",
95
- type: "address",
96
- description: "Market address"
106
+ "key": "abiParams.market",
107
+ "type": "address",
108
+ "description": "Market address"
97
109
  },
98
110
  {
99
- key: "abiParams.receiver",
100
- type: "address",
101
- description: "Receiver address"
111
+ "key": "abiParams.receiver",
112
+ "type": "address",
113
+ "description": "Receiver address"
102
114
  },
103
115
  {
104
- key: "abiParams.netPtToAccount",
105
- type: "int256",
106
- description: "Net PT to account"
116
+ "key": "abiParams.netPtToAccount",
117
+ "type": "int256",
118
+ "description": "Net PT to account"
107
119
  },
108
120
  {
109
- key: "abiParams.netSyToAccount",
110
- type: "int256",
111
- description: "Net SY to account"
112
- }
121
+ "key": "abiParams.netSyToAccount",
122
+ "type": "int256",
123
+ "description": "Net SY to account"
124
+ },
113
125
  ]
114
126
  },
115
- LIQUIDITY_REMOVED: {
116
- id: 6,
117
- name: "Liquidity Removed",
118
- description: "Liquidity removed in Splice Finance",
119
- type: TRIGGER_TYPE.SUBSCRIPTION,
120
- parameters: [
127
+ "LIQUIDITY_REMOVED": {
128
+ "id": 6,
129
+ "name": "Liquidity Removed",
130
+ "description": "Liquidity removed in Splice Finance",
131
+ "type": 0,
132
+ "contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
133
+ "parameters": [
121
134
  {
122
- key: "abiParams.caller",
123
- type: "address",
124
- description: "Caller address"
135
+ "key": "abiParams.caller",
136
+ "type": "address",
137
+ "description": "Caller address"
125
138
  },
126
139
  {
127
- key: "abiParams.market",
128
- type: "address",
129
- description: "Market address"
140
+ "key": "abiParams.market",
141
+ "type": "address",
142
+ "description": "Market address"
130
143
  },
131
144
  {
132
- key: "abiParams.receiver",
133
- type: "address",
134
- description: "Receiver address"
145
+ "key": "abiParams.receiver",
146
+ "type": "address",
147
+ "description": "Receiver address"
135
148
  },
136
149
  {
137
- key: "abiParams.netLpToRemove",
138
- type: "uint256",
139
- description: "Net LP to remove"
150
+ "key": "abiParams.netLpToRemove",
151
+ "type": "uint256",
152
+ "description": "Net LP to remove"
140
153
  },
141
154
  {
142
- key: "abiParams.netPtOut",
143
- type: "uint256",
144
- description: "Net PT out"
155
+ "key": "abiParams.netPtOut",
156
+ "type": "uint256",
157
+ "description": "Net PT out"
145
158
  },
146
159
  {
147
- key: "abiParams.netSyOut",
148
- type: "uint256",
149
- description: "Net SY out"
150
- }
160
+ "key": "abiParams.netSyOut",
161
+ "type": "uint256",
162
+ "description": "Net SY out"
163
+ },
151
164
  ]
152
165
  },
153
- MARKET_CREATION: {
154
- id: 7,
155
- name: "Market Creation",
156
- description: "Market creation in Splice Finance",
157
- type: TRIGGER_TYPE.SUBSCRIPTION,
158
- parameters: [
166
+ "MARKET_CREATION": {
167
+ "id": 7,
168
+ "name": "Market Creation",
169
+ "description": "Market creation in Splice Finance",
170
+ "type": 0,
171
+ "contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
172
+ "parameters": [
159
173
  {
160
- key: "abiParams.market",
161
- type: "address",
162
- description: "Market address"
174
+ "key": "abiParams.market",
175
+ "type": "address",
176
+ "description": "Market address"
163
177
  },
164
178
  {
165
- key: "abiParams.PT",
166
- type: "address",
167
- description: "PT address"
179
+ "key": "abiParams.PT",
180
+ "type": "address",
181
+ "description": "PT address"
168
182
  },
169
183
  {
170
- key: "abiParams.scalarRoot",
171
- type: "int256",
172
- description: "Scalar root"
184
+ "key": "abiParams.scalarRoot",
185
+ "type": "int256",
186
+ "description": "Scalar root"
173
187
  },
174
188
  {
175
- key: "abiParams.initialAnchor",
176
- type: "int256",
177
- description: "Initial anchor"
189
+ "key": "abiParams.initialAnchor",
190
+ "type": "int256",
191
+ "description": "Initial anchor"
178
192
  },
179
193
  {
180
- key: "abiParams.lnFeeRateRoot",
181
- type: "uint256",
182
- description: "LN fee rate root"
183
- }
194
+ "key": "abiParams.lnFeeRateRoot",
195
+ "type": "uint256",
196
+ "description": "LN fee rate root"
197
+ },
184
198
  ]
185
199
  },
186
- INTEREST_RATE_UPDATE: {
187
- id: 9,
188
- name: "Interest Rate Update",
189
- description: "Interest rate update in Splice Finance",
190
- type: TRIGGER_TYPE.SUBSCRIPTION,
191
- parameters: [
192
- {
193
- key: "abiParams.timestamp",
194
- type: "uint256",
195
- description: "Timestamp"
196
- },
197
- {
198
- key: "abiParams.lastLnImpliedRate",
199
- type: "int256",
200
- description: "Last LN implied rate"
201
- },
202
- {
203
- key: "contractAddress",
204
- type: "address",
205
- description: "Contract address to monitor",
206
- enum: [
207
- "0xDE95511418EBD8Bd36294B11C86314DdFA50e212", // wrsETH
208
- "0x34cf9BF641bd5f34197060A3f3478a1f97f78f0a", // ezETH
209
- "0xb950A73Ea0842B0Cd06D0e369aE974799BB346f1", // MODE
210
- "0xbF14932e1A7962C77D0b31be80075936bE1A43D4" // weETH
200
+ "INTEREST_RATE_UPDATE": {
201
+ "id": 9,
202
+ "name": "Interest Rate Update",
203
+ "description": "Interest rate update in Splice Finance",
204
+ "type": 0,
205
+ "contractAddress": "0x7A3a94AE0fC1421A3eac23eA6371036ac8d8f448",
206
+ "parameters": [
207
+ {
208
+ "key": "abiParams.timestamp",
209
+ "type": "uint256",
210
+ "description": "Timestamp"
211
+ },
212
+ {
213
+ "key": "abiParams.lastLnImpliedRate",
214
+ "type": "int256",
215
+ "description": "Last LN implied rate"
216
+ },
217
+ {
218
+ "key": "contractAddress",
219
+ "type": "address",
220
+ "description": "Contract address to monitor",
221
+ "mandatory": true,
222
+ "enum": [
223
+ "0xDE95511418EBD8Bd36294B11C86314DdFA50e212",
224
+ "0x34cf9BF641bd5f34197060A3f3478a1f97f78f0a",
225
+ "0xb950A73Ea0842B0Cd06D0e369aE974799BB346f1",
226
+ "0xbF14932e1A7962C77D0b31be80075936bE1A43D4"
211
227
  ]
212
- }
228
+ },
213
229
  ]
214
230
  }
215
231
  }
216
232
  },
217
- LENDING: {
218
- ASTARIA: {
219
- CHAINS: [CHAINS.MODE],
220
- LEND_RECALLED: {
221
- id: 8,
222
- name: "Lend Recalled",
223
- description: "Lend recalled in Astaria",
224
- type: TRIGGER_TYPE.SUBSCRIPTION,
225
- parameters: [
226
- {
227
- key: "abiParams.loanId",
228
- type: "uint256",
229
- description: "Loan ID"
230
- },
231
- {
232
- key: "abiParams.recaller",
233
- type: "address",
234
- description: "Recaller address"
235
- },
236
- {
237
- key: "abiParams.end",
238
- type: "uint256",
239
- description: "End time"
240
- }
233
+ "LENDING": {
234
+ "ASTARIA": {
235
+ "CHAINS": [
236
+ 43334
237
+ ],
238
+ "LEND_RECALLED": {
239
+ "id": 8,
240
+ "name": "Lend Recalled",
241
+ "description": "Lend recalled in Astaria",
242
+ "type": 0,
243
+ "contractAddress": "0x34cf9BF641bd5f34197060A3f3478a1f97f78f0a",
244
+ "parameters": [
245
+ {
246
+ "key": "abiParams.loanId",
247
+ "type": "uint256",
248
+ "description": "Loan ID"
249
+ },
250
+ {
251
+ "key": "abiParams.recaller",
252
+ "type": "address",
253
+ "description": "Recaller address"
254
+ },
255
+ {
256
+ "key": "abiParams.end",
257
+ "type": "uint256",
258
+ "description": "End time"
259
+ },
241
260
  ]
242
261
  }
243
262
  }
244
263
  },
245
- DEXES: {
246
- ODOS: {
247
- CHAINS: [CHAINS.MODE, CHAINS.ETHEREUM],
248
- SWAP: {
249
- id: 4,
250
- name: "Odos Swap",
251
- description: "Swap on Odos",
252
- type: TRIGGER_TYPE.SUBSCRIPTION,
253
- parameters: [
264
+ "DEXES": {
265
+ "ODOS": {
266
+ "CHAINS": [
267
+ 43334,
268
+ 1
269
+ ],
270
+ "SWAP": {
271
+ "id": 4,
272
+ "name": "Odos Swap",
273
+ "description": "Swap on Odos",
274
+ "type": 0,
275
+ "contractAddress": "0x7E15EB462cdc67Cf92Af1f7102465a8F8c784874",
276
+ "parameters": [
277
+ {
278
+ "key": "chainId",
279
+ "type": "chainId",
280
+ "description": "Chain ID of the ETH blockchain",
281
+ "mandatory": true
282
+ },
254
283
  {
255
- key: "chainId",
256
- type: "int",
257
- description: "Chain ID of the ETH blockchain"
284
+ "key": "abiParams.sender",
285
+ "type": "address",
286
+ "description": "Sender address"
258
287
  },
259
288
  {
260
- key: "abiParams.sender",
261
- type: "address",
262
- description: "Sender address"
289
+ "key": "abiParams.inputAmount",
290
+ "type": "uint256",
291
+ "description": "Input amount"
263
292
  },
264
293
  {
265
- key: "abiParams.inputAmount",
266
- type: "uint256",
267
- description: "Input amount"
294
+ "key": "abiParams.inputToken",
295
+ "type": "address",
296
+ "description": "Input token address"
268
297
  },
269
298
  {
270
- key: "abiParams.inputToken",
271
- type: "address",
272
- description: "Input token address"
299
+ "key": "abiParams.amountOut",
300
+ "type": "uint256",
301
+ "description": "Output amount"
273
302
  },
274
303
  {
275
- key: "abiParams.amountOut",
276
- type: "uint256",
277
- description: "Output amount"
304
+ "key": "abiParams.outputToken",
305
+ "type": "address",
306
+ "description": "Output token address"
307
+ },
308
+ ]
309
+ }
310
+ }
311
+ },
312
+ "SOCIALS": {
313
+ "MODE_NAME_SERVICE": {
314
+ "CHAINS": [
315
+ 43334
316
+ ],
317
+ "NAME_REGISTERED": {
318
+ "id": 3,
319
+ "name": "Name Registered",
320
+ "description": "Name registered in Mode Name Service",
321
+ "type": 0,
322
+ "contractAddress": "0x2aD86eeEC513AC16804bb05310214C3Fd496835B",
323
+ "parameters": [
324
+ {
325
+ "key": "abiParams.id",
326
+ "type": "uint256",
327
+ "description": "ID of the name registered"
278
328
  },
279
329
  {
280
- key: "abiParams.outputToken",
281
- type: "address",
282
- description: "Output token address"
330
+ "key": "abiParams.owner",
331
+ "type": "address",
332
+ "description": "Owner address"
283
333
  },
284
334
  {
285
- key: "abiParams.exchangeRate",
286
- type: "float",
287
- description: "Exchange rate"
288
- }
335
+ "key": "abiParams.expires",
336
+ "type": "uint256",
337
+ "description": "Expiration time"
338
+ },
289
339
  ]
290
340
  }
291
341
  }
292
342
  },
293
- SOCIALS: {
294
- MODE_NAME_SERVICE: {
295
- CHAINS: [CHAINS.MODE],
296
- NAME_REGISTERED: {
297
- id: 3,
298
- name: "Name Registered",
299
- description: "Name registered in Mode Name Service",
300
- type: TRIGGER_TYPE.SUBSCRIPTION,
301
- parameters: [
302
- {
303
- key: "abiParams.id",
304
- type: "uint256",
305
- description: "ID of the name registered"
306
- },
307
- {
308
- key: "abiParams.owner",
309
- type: "address",
310
- description: "Owner address"
311
- },
312
- {
313
- key: "abiParams.expires",
314
- type: "uint256",
315
- description: "Expiration time"
316
- }
343
+ "PRICE_ACTION": {
344
+ "ON_CHAIN_PRICE_MOVEMENT": {
345
+ "CHAINS": [
346
+ 0
347
+ ],
348
+ "PRICE_MOVEMENT_AGAINST_CURRENCY": {
349
+ "id": 10,
350
+ "name": "On-Chain Price Movement Against Fiat Currency",
351
+ "description": "This trigger activates when the on-chain price of an asset moves against a specified currency based on the given condition.",
352
+ "type": 2,
353
+ "parameters": [
354
+ {
355
+ "key": "chainId",
356
+ "type": "chainId",
357
+ "description": "Chain ID of the blockchain to monitor"
358
+ },
359
+ {
360
+ "key": "comparisonValue",
361
+ "type": "float",
362
+ "description": "The price to compare against"
363
+ },
364
+ {
365
+ "key": "currency",
366
+ "type": "string",
367
+ "description": "The currency in which the comparison price is denominated",
368
+ "enum": [
369
+ "USD"
370
+ ]
371
+ },
372
+ {
373
+ "key": "condition",
374
+ "type": "logic_operator",
375
+ "description": "The logic operator used for the comparison (e.g., >, <, >=, <=, ==, !=)"
376
+ },
377
+ {
378
+ "key": "contractAddress",
379
+ "type": "erc20",
380
+ "description": "The asset that you want to track"
381
+ },
317
382
  ]
318
383
  }
319
384
  }
320
385
  }
321
386
  };
322
387
  export const ACTIONS = {
323
- TOKENS: {
324
- ERC20: {
325
- CHAINS: [CHAINS.ALL],
326
- TRANSFER: {
327
- id: 1,
328
- name: "Transfer ERC-20 Token",
329
- description: "Transfer an ERC-20 token",
330
- parameters: [
388
+ "NOTIFICATIONS": {
389
+ "SLACK": {
390
+ "SEND_MESSAGE": {
391
+ "id": 100002,
392
+ "name": "Send message",
393
+ "type": 0,
394
+ "description": "Notifies you by sending a Slack message to the channel of your choice",
395
+ "parameters": [
331
396
  {
332
- key: "chainId",
333
- type: "chainId",
334
- description: "Chain ID of the blockchain"
397
+ "key": "webhook",
398
+ "type": "url",
399
+ "description": "The webhook URL for the Slack channel"
335
400
  },
336
401
  {
337
- key: "abiParams.value",
338
- type: "uint256",
339
- description: "Amount of crypto to transfer"
402
+ "key": "message",
403
+ "type": "paragraph",
404
+ "description": "The text content to send"
340
405
  },
406
+ ]
407
+ }
408
+ },
409
+ "DISCORD": {
410
+ "SEND_MESSAGE": {
411
+ "id": 100003,
412
+ "name": "Send message",
413
+ "type": 0,
414
+ "description": "Notifies you by sending a Discord message to the channel of your choice",
415
+ "parameters": [
341
416
  {
342
- key: "abiParams.to",
343
- type: "address",
344
- description: "Address to transfer crypto to"
417
+ "key": "webhook",
418
+ "type": "url",
419
+ "description": "The webhook URL for the Discord channel"
345
420
  },
346
421
  {
347
- key: "contractAddress",
348
- type: "address",
349
- description: "The contract address of the ERC-20 token"
350
- }
422
+ "key": "message",
423
+ "type": "paragraph",
424
+ "description": "The text content to send"
425
+ },
351
426
  ]
352
- },
427
+ }
353
428
  },
429
+ "TELEGRAM": {
430
+ "SEND_MESSAGE": {
431
+ "id": 100001,
432
+ "name": "Send message",
433
+ "type": 0,
434
+ "description": "Notifies you by sending a Telegram message to the chat of your choice",
435
+ "parameters": [
436
+ {
437
+ "key": "webhook",
438
+ "type": "url",
439
+ "description": "The webhook URL for the Telegram bot"
440
+ },
441
+ {
442
+ "key": "message",
443
+ "type": "paragraph",
444
+ "description": "The text content to send"
445
+ },
446
+ ]
447
+ }
448
+ }
354
449
  },
355
- NOTIFICATIONS: {
356
- SMS: {
357
- id: 3,
358
- name: "Send SMS",
359
- description: "Send an SMS notification to a specified phone number",
360
- parameters: [
361
- {
362
- key: "phoneNumber",
363
- type: "phone_number",
364
- description: "Phone number to send the message to"
365
- },
366
- {
367
- key: "text",
368
- type: "paragraph",
369
- description: "Content of the SMS message"
370
- },
371
- ]
372
- },
373
- SLACK: {
374
- id: 4,
375
- name: "Send Slack Message",
376
- description: "Send a message to a specified Slack channel via webhook",
377
- parameters: [
378
- {
379
- key: "webhook",
380
- type: "url",
381
- description: "Slack channel webhook URL"
382
- },
383
- {
384
- key: "text",
385
- type: "paragraph",
386
- description: "Content of the Slack message"
387
- },
388
- ]
389
- },
450
+ "TOKENS": {
451
+ "ERC20": {
452
+ "CHAINS": [
453
+ 0
454
+ ],
455
+ "TRANSFER": {
456
+ "id": 100004,
457
+ "name": "Transfer token",
458
+ "description": "Transfers an ERC20 token",
459
+ "type": 1,
460
+ "method": "Transfer(address from, address to, uint256 value)",
461
+ "parameters": [
462
+ {
463
+ "key": "chainId",
464
+ "type": "chainId",
465
+ "description": "Chain ID of the network"
466
+ },
467
+ {
468
+ "key": "abiParams.value",
469
+ "type": "uint256",
470
+ "description": "Amount of crypto to transfer"
471
+ },
472
+ {
473
+ "key": "abiParams.to",
474
+ "type": "address",
475
+ "description": "Address to transfer crypto to"
476
+ },
477
+ {
478
+ "key": "contractAddress",
479
+ "type": "erc20",
480
+ "description": "The contract address of the ERC20"
481
+ },
482
+ ]
483
+ }
484
+ }
390
485
  }
391
486
  };