otomato-sdk 1.5.50 → 1.5.52
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/dist/src/constants/Blocks.js +1 -1
- package/dist/src/constants/WorkflowTemplates.js +24 -1
- package/dist/src/models/Authorization.js +0 -30
- package/dist/types/src/constants/Blocks.d.ts +1 -1
- package/dist/types/src/constants/WorkflowTemplates.d.ts +2 -0
- package/dist/types/src/models/Authorization.d.ts +0 -13
- package/package.json +1 -1
|
@@ -1152,10 +1152,10 @@ export const ACTIONS = {
|
|
|
1152
1152
|
},
|
|
1153
1153
|
"SWAP": {
|
|
1154
1154
|
"description": "Swap two assets using the best market rates accross multiple pools",
|
|
1155
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/swap.png",
|
|
1155
1156
|
"chains": [
|
|
1156
1157
|
34443
|
|
1157
1158
|
],
|
|
1158
|
-
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/swap.png",
|
|
1159
1159
|
"SWAP": {
|
|
1160
1160
|
"name": "Swap",
|
|
1161
1161
|
"description": "Swap two assets using the best market rates accross multiple pools",
|
|
@@ -108,6 +108,10 @@ export const WORKFLOW_TEMPLATES = [
|
|
|
108
108
|
'description': 'Receive notifications when a top $MODE holder (0x74B8....C6B4) transfers $MODE',
|
|
109
109
|
'tags': [WORKFLOW_TEMPLATES_TAGS.ON_CHAIN_MONITORING, WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS],
|
|
110
110
|
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/transfer-monitoring.png',
|
|
111
|
+
'image': [
|
|
112
|
+
TRIGGERS.TOKENS.TRANSFER.TRANSFER.image,
|
|
113
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
114
|
+
],
|
|
111
115
|
createWorkflow: createModeTransferNotificationWorkflow
|
|
112
116
|
},
|
|
113
117
|
{
|
|
@@ -115,13 +119,23 @@ export const WORKFLOW_TEMPLATES = [
|
|
|
115
119
|
'description': 'Buy ETH when the Bitcoin Fear and Greed Index is below 30',
|
|
116
120
|
'tags': [WORKFLOW_TEMPLATES_TAGS.TRADING, WORKFLOW_TEMPLATES_TAGS.SOCIALS],
|
|
117
121
|
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/fear_and_greed.jpg',
|
|
122
|
+
'image': [
|
|
123
|
+
TRIGGERS.SOCIALS.FEAR_AND_GREED.GET_FEAR_AND_GREED_INDEX.image,
|
|
124
|
+
ACTIONS.SWAP.ODOS.SWAP.image
|
|
125
|
+
],
|
|
118
126
|
createWorkflow: createETHFearAndGreedBuy
|
|
119
127
|
},
|
|
120
128
|
{
|
|
121
129
|
'name': 'Buy ETH when the market sentiment is extremely fearful - capital efficient',
|
|
122
|
-
'description': 'Buy ETH when the Bitcoin Fear and Greed Index is below
|
|
130
|
+
'description': 'Buy ETH when the Bitcoin Fear and Greed Index is below 45. The idle funds are generating yield on Ionic.',
|
|
123
131
|
'tags': [WORKFLOW_TEMPLATES_TAGS.TRADING, WORKFLOW_TEMPLATES_TAGS.SOCIALS, WORKFLOW_TEMPLATES_TAGS.YIELD],
|
|
124
132
|
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/fear_and_greed.jpg',
|
|
133
|
+
'image': [
|
|
134
|
+
TRIGGERS.SOCIALS.FEAR_AND_GREED.GET_FEAR_AND_GREED_INDEX.image,
|
|
135
|
+
ACTIONS.LENDING.IONIC.WITHDRAW.image,
|
|
136
|
+
ACTIONS.SWAP.ODOS.SWAP.image,
|
|
137
|
+
ACTIONS.LENDING.IONIC.DEPOSIT.image
|
|
138
|
+
],
|
|
125
139
|
createWorkflow: createETHFearAndGreedCapitalEfficientBuy
|
|
126
140
|
},
|
|
127
141
|
{
|
|
@@ -129,6 +143,11 @@ export const WORKFLOW_TEMPLATES = [
|
|
|
129
143
|
'description': 'Buy sUSDE when the yield is above 20%',
|
|
130
144
|
'tags': [WORKFLOW_TEMPLATES_TAGS.TRADING, WORKFLOW_TEMPLATES_TAGS.ON_CHAIN_MONITORING],
|
|
131
145
|
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/buySusde.jpg',
|
|
146
|
+
'image': [
|
|
147
|
+
TRIGGERS.YIELD.ETHENA.SUSDE_YIELD.image,
|
|
148
|
+
ACTIONS.SWAP.ODOS.SWAP.image,
|
|
149
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
150
|
+
],
|
|
132
151
|
createWorkflow: createSUsdeYieldBuy
|
|
133
152
|
},
|
|
134
153
|
{
|
|
@@ -136,6 +155,10 @@ export const WORKFLOW_TEMPLATES = [
|
|
|
136
155
|
'description': 'Notify me when the sUSDe yield becomes negative',
|
|
137
156
|
'tags': [WORKFLOW_TEMPLATES_TAGS.TRADING, WORKFLOW_TEMPLATES_TAGS.ON_CHAIN_MONITORING, WORKFLOW_TEMPLATES_TAGS.NOTIFICATIONS],
|
|
138
157
|
'thumbnail': 'https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/templates/shortEna.jpg',
|
|
158
|
+
'image': [
|
|
159
|
+
TRIGGERS.YIELD.ETHENA.SUSDE_YIELD.image,
|
|
160
|
+
ACTIONS.NOTIFICATIONS.TELEGRAM.SEND_MESSAGE.image
|
|
161
|
+
],
|
|
139
162
|
createWorkflow: createSusdeYieldNotification
|
|
140
163
|
},
|
|
141
164
|
];
|
|
@@ -45,34 +45,4 @@ export class Authorization {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Grant authorization to the contracts.
|
|
50
|
-
*
|
|
51
|
-
* @param chainId - The chain ID of the blockchain network.
|
|
52
|
-
* @param sessionKeyAddress - The session key address to authorize.
|
|
53
|
-
* @param contractAddresses - The list of contract addresses to authorize.
|
|
54
|
-
* @returns A promise resolving to the authorization result.
|
|
55
|
-
*/
|
|
56
|
-
static grantContracts(chainId, sessionKeyAddress, contractAddresses) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
var _a;
|
|
59
|
-
const payload = {
|
|
60
|
-
chainId,
|
|
61
|
-
sessionKeyAddress,
|
|
62
|
-
contractAddresses
|
|
63
|
-
};
|
|
64
|
-
try {
|
|
65
|
-
const response = yield apiServices.post('/auth/contracts', payload);
|
|
66
|
-
if (response.status === 201) {
|
|
67
|
-
return { success: true };
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return { success: false, error: ((_a = response.data) === null || _a === void 0 ? void 0 : _a.message) || 'Unknown error' };
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
return { success: false, error: error.message || 'Unknown error' };
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
48
|
}
|
|
@@ -12,11 +12,13 @@ export declare const WORKFLOW_TEMPLATES: ({
|
|
|
12
12
|
description: string;
|
|
13
13
|
tags: string[];
|
|
14
14
|
thumbnail: string;
|
|
15
|
+
image: string[];
|
|
15
16
|
createWorkflow: () => Workflow;
|
|
16
17
|
} | {
|
|
17
18
|
name: string;
|
|
18
19
|
description: string;
|
|
19
20
|
tags: string[];
|
|
20
21
|
thumbnail: string;
|
|
22
|
+
image: string[];
|
|
21
23
|
createWorkflow: () => Promise<Workflow>;
|
|
22
24
|
})[];
|
|
@@ -12,17 +12,4 @@ export declare class Authorization {
|
|
|
12
12
|
diff?: {};
|
|
13
13
|
error?: string;
|
|
14
14
|
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Grant authorization to the contracts.
|
|
17
|
-
*
|
|
18
|
-
* @param chainId - The chain ID of the blockchain network.
|
|
19
|
-
* @param sessionKeyAddress - The session key address to authorize.
|
|
20
|
-
* @param contractAddresses - The list of contract addresses to authorize.
|
|
21
|
-
* @returns A promise resolving to the authorization result.
|
|
22
|
-
*/
|
|
23
|
-
static grantContracts(chainId: string, sessionKeyAddress: string, contractAddresses: string[]): Promise<{
|
|
24
|
-
success: boolean;
|
|
25
|
-
message?: string;
|
|
26
|
-
error?: string;
|
|
27
|
-
}>;
|
|
28
15
|
}
|