@orb-labs/orby-core 0.0.6 → 0.0.8
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/CHANGELOG.md +7 -0
- package/dist/actions/account_cluster.d.ts +12 -5
- package/dist/actions/account_cluster.js +185 -338
- package/dist/actions/admin.d.ts +3 -3
- package/dist/actions/admin.js +37 -127
- package/dist/actions/application.d.ts +2 -2
- package/dist/actions/application.js +14 -77
- package/dist/actions/blockchain.d.ts +16 -0
- package/dist/actions/blockchain.js +35 -0
- package/dist/actions/instance.d.ts +3 -4
- package/dist/actions/instance.js +90 -255
- package/dist/actions/operation.d.ts +19 -10
- package/dist/actions/operation.js +323 -259
- package/dist/actions/token.d.ts +3 -3
- package/dist/actions/token.js +43 -119
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +70 -71
- package/dist/entities/account.d.ts +1 -1
- package/dist/entities/account.js +25 -30
- package/dist/entities/financial/account_balance.d.ts +2 -2
- package/dist/entities/financial/account_balance.js +20 -22
- package/dist/entities/financial/asset.js +13 -15
- package/dist/entities/financial/currency.d.ts +1 -1
- package/dist/entities/financial/currency.js +16 -35
- package/dist/entities/financial/currency_amount.d.ts +1 -1
- package/dist/entities/financial/currency_amount.js +49 -71
- package/dist/entities/financial/fungible_token.d.ts +3 -3
- package/dist/entities/financial/fungible_token.js +31 -52
- package/dist/entities/financial/fungible_token_amount.d.ts +2 -2
- package/dist/entities/financial/fungible_token_amount.js +53 -75
- package/dist/entities/financial/non_fungible_token.d.ts +2 -2
- package/dist/entities/financial/non_fungible_token.js +25 -45
- package/dist/entities/financial/semi_fungible_token.d.ts +2 -2
- package/dist/entities/financial/semi_fungible_token.js +25 -45
- package/dist/entities/library_request.d.ts +1 -1
- package/dist/entities/library_request.js +7 -9
- package/dist/entities/state.d.ts +4 -4
- package/dist/entities/state.js +57 -67
- package/dist/index.d.ts +29 -27
- package/dist/index.js +29 -27
- package/dist/interfaces/account_cluster.d.ts +11 -4
- package/dist/interfaces/admin.d.ts +1 -1
- package/dist/interfaces/blockchain.d.ts +13 -0
- package/dist/interfaces/blockchain.js +1 -0
- package/dist/interfaces/instance.d.ts +1 -2
- package/dist/interfaces/operation.d.ts +25 -10
- package/dist/interfaces/orby.d.ts +8 -7
- package/dist/interfaces/token.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +9 -9
- package/dist/utils/action_helpers.d.ts +1 -1
- package/dist/utils/action_helpers.js +43 -63
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +23 -19
- package/dist/utils/validateAndParseAddress.js +3 -3
- package/package.json +4 -2
package/dist/actions/instance.js
CHANGED
@@ -1,259 +1,94 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
})
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
21
|
-
t[p] = s[p];
|
1
|
+
import { extractGasSponsorshipPolicy, } from "../utils/action_helpers.js";
|
2
|
+
import { LibraryRequest } from "../entities/library_request.js";
|
3
|
+
import { getChainIdFromOrbyChainId, getOrbyChainId } from "../utils/utils.js";
|
4
|
+
export class InstanceActions extends LibraryRequest {
|
5
|
+
constructor(library, client, provider) {
|
6
|
+
super(library, client, provider);
|
7
|
+
}
|
8
|
+
async setCustomChainEndpointsForInstance(chainEndpoints) {
|
9
|
+
const formattedEndpoints = chainEndpoints.map((endpoint) => {
|
10
|
+
return {
|
11
|
+
chainId: getOrbyChainId(endpoint.chainId),
|
12
|
+
customRpcUrls: endpoint.customRpcUrls,
|
13
|
+
customIndexerUrls: endpoint.customIndexerUrls,
|
14
|
+
};
|
15
|
+
});
|
16
|
+
const { success, code, message } = await this.sendRequest("orby_setCustomChainEndpointsForInstance", [{ chainEndpoints: formattedEndpoints }]);
|
17
|
+
if (code && message) {
|
18
|
+
console.error("[setCustomChainEndpointsForInstance]", code, message);
|
19
|
+
return undefined;
|
22
20
|
}
|
23
|
-
return
|
24
|
-
};
|
25
|
-
return __assign.apply(this, arguments);
|
26
|
-
};
|
27
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
29
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
30
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
31
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
32
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
33
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
34
|
-
});
|
35
|
-
};
|
36
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
37
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
38
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
39
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
40
|
-
function step(op) {
|
41
|
-
if (f) throw new TypeError("Generator is already executing.");
|
42
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
43
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
44
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
45
|
-
switch (op[0]) {
|
46
|
-
case 0: case 1: t = op; break;
|
47
|
-
case 4: _.label++; return { value: op[1], done: false };
|
48
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
49
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
50
|
-
default:
|
51
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
52
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
53
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
54
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
55
|
-
if (t[2]) _.ops.pop();
|
56
|
-
_.trys.pop(); continue;
|
57
|
-
}
|
58
|
-
op = body.call(thisArg, _);
|
59
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
60
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
21
|
+
return success;
|
61
22
|
}
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
return
|
23
|
+
async removeCustomChainEndpointForInstance(chainIds) {
|
24
|
+
const formattedChainIds = chainIds.map((chainId) => getOrbyChainId(chainId));
|
25
|
+
const { success, code, message } = await this.sendRequest("orby_removeCustomChainEndpointForInstance", [{ chainIds: formattedChainIds }]);
|
26
|
+
if (code && message) {
|
27
|
+
console.error("[removeCustomChainEndpointForInstance]", code, message);
|
28
|
+
return undefined;
|
29
|
+
}
|
30
|
+
return success;
|
70
31
|
}
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
});
|
84
|
-
return [4 /*yield*/, this.sendRequest("orby_setCustomChainEndpointsForInstance", [{ chainEndpoints: formattedEndpoints }])];
|
85
|
-
case 1:
|
86
|
-
_a = _b.sent(), success = _a.success, code = _a.code, message = _a.message;
|
87
|
-
if (code && message) {
|
88
|
-
console.error("[setCustomChainEndpointsForInstance]", code, message);
|
89
|
-
return [2 /*return*/, undefined];
|
90
|
-
}
|
91
|
-
return [2 /*return*/, success];
|
92
|
-
}
|
93
|
-
});
|
94
|
-
});
|
95
|
-
};
|
96
|
-
InstanceActions.prototype.removeCustomChainEndpointForInstance = function (chainIds) {
|
97
|
-
return __awaiter(this, void 0, void 0, function () {
|
98
|
-
var formattedChainIds, _a, success, code, message;
|
99
|
-
return __generator(this, function (_b) {
|
100
|
-
switch (_b.label) {
|
101
|
-
case 0:
|
102
|
-
formattedChainIds = chainIds.map(function (chainId) { return "EIP155-".concat(chainId); });
|
103
|
-
return [4 /*yield*/, this.sendRequest("orby_removeCustomChainEndpointForInstance", [{ chainIds: formattedChainIds }])];
|
104
|
-
case 1:
|
105
|
-
_a = _b.sent(), success = _a.success, code = _a.code, message = _a.message;
|
106
|
-
if (code && message) {
|
107
|
-
console.error("[removeCustomChainEndpointForInstance]", code, message);
|
108
|
-
return [2 /*return*/, undefined];
|
109
|
-
}
|
110
|
-
return [2 /*return*/, success];
|
111
|
-
}
|
112
|
-
});
|
113
|
-
});
|
114
|
-
};
|
115
|
-
InstanceActions.prototype.getCustomChainEndpointsForInstance = function (returnChainIdsOnly) {
|
116
|
-
return __awaiter(this, void 0, void 0, function () {
|
117
|
-
var _a, chainEndpoints, code, message;
|
118
|
-
return __generator(this, function (_b) {
|
119
|
-
switch (_b.label) {
|
120
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_getCustomChainEndpointsForInstance", [{ returnChainIdsOnly: returnChainIdsOnly }])];
|
121
|
-
case 1:
|
122
|
-
_a = _b.sent(), chainEndpoints = _a.chainEndpoints, code = _a.code, message = _a.message;
|
123
|
-
if (code && message) {
|
124
|
-
console.error("[getCustomChainEndpointsForInstance]", code, message);
|
125
|
-
return [2 /*return*/, undefined];
|
126
|
-
}
|
127
|
-
return [2 /*return*/, chainEndpoints.map(function (endpoint) {
|
128
|
-
return {
|
129
|
-
chainId: getChainIdFromOrbyChainId(endpoint.chainId),
|
130
|
-
customRpcUrls: endpoint.customRpcUrls,
|
131
|
-
customIndexerUrls: endpoint.customIndexerUrls,
|
132
|
-
};
|
133
|
-
})];
|
134
|
-
}
|
135
|
-
});
|
136
|
-
});
|
137
|
-
};
|
138
|
-
InstanceActions.prototype.getChainsSupportedByDefault = function () {
|
139
|
-
return __awaiter(this, void 0, void 0, function () {
|
140
|
-
var _a, supportedChains, code, message;
|
141
|
-
return __generator(this, function (_b) {
|
142
|
-
switch (_b.label) {
|
143
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_getChainsSupportedByDefault", [{}])];
|
144
|
-
case 1:
|
145
|
-
_a = _b.sent(), supportedChains = _a.supportedChains, code = _a.code, message = _a.message;
|
146
|
-
if (code && message) {
|
147
|
-
console.error("[getChainsSupportedByDefault]", code, message);
|
148
|
-
return [2 /*return*/, undefined];
|
149
|
-
}
|
150
|
-
return [2 /*return*/, extractBlockchainInformations(supportedChains)];
|
151
|
-
}
|
152
|
-
});
|
153
|
-
});
|
154
|
-
};
|
155
|
-
InstanceActions.prototype.enabledChainAbstractionForInstance = function (enable) {
|
156
|
-
return __awaiter(this, void 0, void 0, function () {
|
157
|
-
var _a, success, code, message;
|
158
|
-
return __generator(this, function (_b) {
|
159
|
-
switch (_b.label) {
|
160
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_enabledChainAbstractionForInstance", [{ enable: enable }])];
|
161
|
-
case 1:
|
162
|
-
_a = _b.sent(), success = _a.success, code = _a.code, message = _a.message;
|
163
|
-
if (code && message) {
|
164
|
-
console.error("[enabledChainAbstractionForInstance]", code, message);
|
165
|
-
return [2 /*return*/, undefined];
|
166
|
-
}
|
167
|
-
return [2 /*return*/, success];
|
168
|
-
}
|
169
|
-
});
|
170
|
-
});
|
171
|
-
};
|
172
|
-
InstanceActions.prototype.enableGasSponsorshipForInstance = function (enable) {
|
173
|
-
return __awaiter(this, void 0, void 0, function () {
|
174
|
-
var _a, success, code, message;
|
175
|
-
return __generator(this, function (_b) {
|
176
|
-
switch (_b.label) {
|
177
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_enableGasSponsorshipForInstance", [{ enable: enable }])];
|
178
|
-
case 1:
|
179
|
-
_a = _b.sent(), success = _a.success, code = _a.code, message = _a.message;
|
180
|
-
if (code && message) {
|
181
|
-
console.error("[enableGasSponsorshipForInstance]", code, message);
|
182
|
-
return [2 /*return*/, undefined];
|
183
|
-
}
|
184
|
-
return [2 /*return*/, success];
|
185
|
-
}
|
186
|
-
});
|
187
|
-
});
|
188
|
-
};
|
189
|
-
InstanceActions.prototype.getGasSponsorForInstance = function () {
|
190
|
-
return __awaiter(this, void 0, void 0, function () {
|
191
|
-
var _a, gasSponsor, code, message;
|
192
|
-
return __generator(this, function (_b) {
|
193
|
-
switch (_b.label) {
|
194
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_getGasSponsorForInstance", [{}])];
|
195
|
-
case 1:
|
196
|
-
_a = _b.sent(), gasSponsor = _a.gasSponsor, code = _a.code, message = _a.message;
|
197
|
-
if (code && message) {
|
198
|
-
console.error("[getGasSponsorForInstance]", code, message);
|
199
|
-
return [2 /*return*/, undefined];
|
200
|
-
}
|
201
|
-
return [2 /*return*/, gasSponsor];
|
202
|
-
}
|
203
|
-
});
|
204
|
-
});
|
205
|
-
};
|
206
|
-
InstanceActions.prototype.getOrbyGasSponsorPolicyForInstance = function () {
|
207
|
-
return __awaiter(this, void 0, void 0, function () {
|
208
|
-
var _a, gasSponsorshipPolicy, message, code;
|
209
|
-
return __generator(this, function (_b) {
|
210
|
-
switch (_b.label) {
|
211
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_getOrbyGasSponsorPolicyForInstance", [{}])];
|
212
|
-
case 1:
|
213
|
-
_a = _b.sent(), gasSponsorshipPolicy = _a.gasSponsorshipPolicy, message = _a.message, code = _a.code;
|
214
|
-
if (code && message) {
|
215
|
-
console.error("[getOrbyGasSponsorPolicyForInstance]", code, message);
|
216
|
-
return [2 /*return*/, undefined];
|
217
|
-
}
|
218
|
-
return [2 /*return*/, extractGasSponsorshipPolicy(gasSponsorshipPolicy)];
|
219
|
-
}
|
220
|
-
});
|
221
|
-
});
|
222
|
-
};
|
223
|
-
InstanceActions.prototype.setOrbyGasSponsorPolicyForInstance = function (gasSponsorshipPolicy) {
|
224
|
-
return __awaiter(this, void 0, void 0, function () {
|
225
|
-
var _a, success, code, message;
|
226
|
-
return __generator(this, function (_b) {
|
227
|
-
switch (_b.label) {
|
228
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_setOrbyGasSponsorPolicyForInstance", [__assign({}, gasSponsorshipPolicy)])];
|
229
|
-
case 1:
|
230
|
-
_a = _b.sent(), success = _a.success, code = _a.code, message = _a.message;
|
231
|
-
if (code && message) {
|
232
|
-
console.error("[setOrbyGasSponsorPolicyForInstance]", code, message);
|
233
|
-
return [2 /*return*/, undefined];
|
234
|
-
}
|
235
|
-
return [2 /*return*/, success];
|
236
|
-
}
|
237
|
-
});
|
238
|
-
});
|
239
|
-
};
|
240
|
-
InstanceActions.prototype.removeOrbyGasSponsorPolicyForInstance = function () {
|
241
|
-
return __awaiter(this, void 0, void 0, function () {
|
242
|
-
var _a, success, code, message;
|
243
|
-
return __generator(this, function (_b) {
|
244
|
-
switch (_b.label) {
|
245
|
-
case 0: return [4 /*yield*/, this.sendRequest("orby_removeOrbyGasSponsorPolicyForInstance", [{}])];
|
246
|
-
case 1:
|
247
|
-
_a = _b.sent(), success = _a.success, code = _a.code, message = _a.message;
|
248
|
-
if (code && message) {
|
249
|
-
console.error("[removeOrbyGasSponsorPolicyForInstance]", code, message);
|
250
|
-
return [2 /*return*/, undefined];
|
251
|
-
}
|
252
|
-
return [2 /*return*/, success];
|
253
|
-
}
|
254
|
-
});
|
32
|
+
async getCustomChainEndpointsForInstance(returnChainIdsOnly) {
|
33
|
+
const { chainEndpoints, code, message } = await this.sendRequest("orby_getCustomChainEndpointsForInstance", [{ returnChainIdsOnly }]);
|
34
|
+
if (code && message) {
|
35
|
+
console.error("[getCustomChainEndpointsForInstance]", code, message);
|
36
|
+
return undefined;
|
37
|
+
}
|
38
|
+
return chainEndpoints.map((endpoint) => {
|
39
|
+
return {
|
40
|
+
chainId: getChainIdFromOrbyChainId(endpoint.chainId),
|
41
|
+
customRpcUrls: endpoint.customRpcUrls,
|
42
|
+
customIndexerUrls: endpoint.customIndexerUrls,
|
43
|
+
};
|
255
44
|
});
|
256
|
-
}
|
257
|
-
|
258
|
-
}(
|
259
|
-
|
45
|
+
}
|
46
|
+
async enabledChainAbstractionForInstance(enable) {
|
47
|
+
const { success, code, message } = await this.sendRequest("orby_enabledChainAbstractionForInstance", [{ enable }]);
|
48
|
+
if (code && message) {
|
49
|
+
console.error("[enabledChainAbstractionForInstance]", code, message);
|
50
|
+
return undefined;
|
51
|
+
}
|
52
|
+
return success;
|
53
|
+
}
|
54
|
+
async enableGasSponsorshipForInstance(enable) {
|
55
|
+
const { success, code, message } = await this.sendRequest("orby_enableGasSponsorshipForInstance", [{ enable }]);
|
56
|
+
if (code && message) {
|
57
|
+
console.error("[enableGasSponsorshipForInstance]", code, message);
|
58
|
+
return undefined;
|
59
|
+
}
|
60
|
+
return success;
|
61
|
+
}
|
62
|
+
async getGasSponsorForInstance() {
|
63
|
+
const { gasSponsor, code, message } = await this.sendRequest("orby_getGasSponsorForInstance", []);
|
64
|
+
if (code && message) {
|
65
|
+
console.error("[getGasSponsorForInstance]", code, message);
|
66
|
+
return undefined;
|
67
|
+
}
|
68
|
+
return gasSponsor;
|
69
|
+
}
|
70
|
+
async getOrbyGasSponsorPolicyForInstance() {
|
71
|
+
const { gasSponsorshipPolicy, message, code } = await this.sendRequest("orby_getOrbyGasSponsorPolicyForInstance", []);
|
72
|
+
if (code && message) {
|
73
|
+
console.error("[getOrbyGasSponsorPolicyForInstance]", code, message);
|
74
|
+
return undefined;
|
75
|
+
}
|
76
|
+
return extractGasSponsorshipPolicy(gasSponsorshipPolicy);
|
77
|
+
}
|
78
|
+
async setOrbyGasSponsorPolicyForInstance(gasSponsorshipPolicy) {
|
79
|
+
const { success, code, message } = await this.sendRequest("orby_setOrbyGasSponsorPolicyForInstance", [{ ...gasSponsorshipPolicy }]);
|
80
|
+
if (code && message) {
|
81
|
+
console.error("[setOrbyGasSponsorPolicyForInstance]", code, message);
|
82
|
+
return undefined;
|
83
|
+
}
|
84
|
+
return success;
|
85
|
+
}
|
86
|
+
async removeOrbyGasSponsorPolicyForInstance() {
|
87
|
+
const { success, code, message } = await this.sendRequest("orby_removeOrbyGasSponsorPolicyForInstance", []);
|
88
|
+
if (code && message) {
|
89
|
+
console.error("[removeOrbyGasSponsorPolicyForInstance]", code, message);
|
90
|
+
return undefined;
|
91
|
+
}
|
92
|
+
return success;
|
93
|
+
}
|
94
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { OperationSet, OperationStatus, SignedOperation } from "../types";
|
2
|
-
import { CurrencyAmount } from "../entities/financial/currency_amount";
|
3
|
-
import { LIBRARY_TYPE, QuoteType } from "../enums";
|
4
|
-
import { LibraryRequest } from "../entities/library_request";
|
1
|
+
import { OnchainOperation, OperationSet, OperationStatus, SignedOperation } from "../types.js";
|
2
|
+
import { CurrencyAmount } from "../entities/financial/currency_amount.js";
|
3
|
+
import { LIBRARY_TYPE, OperationStatusType, QuoteType } from "../enums.js";
|
4
|
+
import { LibraryRequest } from "../entities/library_request.js";
|
5
5
|
export declare class OperationActions extends LibraryRequest {
|
6
6
|
constructor(library: LIBRARY_TYPE, client?: any, provider?: any);
|
7
7
|
getOperationsToExecuteTransaction(accountClusterId: string, to: string, data: string, value?: bigint, gasToken?: {
|
@@ -36,14 +36,14 @@ export declare class OperationActions extends LibraryRequest {
|
|
36
36
|
standardizedTokenId: string;
|
37
37
|
amount?: bigint;
|
38
38
|
tokenSources?: {
|
39
|
-
chainId:
|
39
|
+
chainId: bigint;
|
40
40
|
address?: string;
|
41
41
|
}[];
|
42
42
|
}, output: {
|
43
43
|
standardizedTokenId: string;
|
44
44
|
amount?: bigint;
|
45
45
|
tokenDestination?: {
|
46
|
-
chainId:
|
46
|
+
chainId: bigint;
|
47
47
|
address?: string;
|
48
48
|
};
|
49
49
|
}, gasToken?: {
|
@@ -57,22 +57,22 @@ export declare class OperationActions extends LibraryRequest {
|
|
57
57
|
standardizedTokenId: string;
|
58
58
|
amount?: bigint;
|
59
59
|
tokenSources?: {
|
60
|
-
chainId:
|
60
|
+
chainId: bigint;
|
61
61
|
address?: string;
|
62
62
|
}[];
|
63
63
|
}, output: {
|
64
64
|
standardizedTokenId: string;
|
65
65
|
amount?: bigint;
|
66
66
|
tokenDestination?: {
|
67
|
-
chainId:
|
67
|
+
chainId: bigint;
|
68
68
|
address?: string;
|
69
69
|
};
|
70
70
|
}): Promise<OperationSet>;
|
71
71
|
getOperationsToBridge(accountClusterId: string, standardizedTokenId: string, amount: bigint, tokenSources?: {
|
72
|
-
chainId:
|
72
|
+
chainId: bigint;
|
73
73
|
address?: string;
|
74
74
|
}[], tokenDestination?: {
|
75
|
-
chainId:
|
75
|
+
chainId: bigint;
|
76
76
|
address?: string;
|
77
77
|
}, gasToken?: {
|
78
78
|
standardizedTokenId: string;
|
@@ -81,4 +81,13 @@ export declare class OperationActions extends LibraryRequest {
|
|
81
81
|
address?: string;
|
82
82
|
}[];
|
83
83
|
}): Promise<OperationSet>;
|
84
|
+
subscribeToOperationStatuses(ids?: string[], onOperationStatusesUpdateCallback?: (statusSummary: OperationStatusType, primaryOperationStatus?: OperationStatus, allOperationStatuses?: OperationStatus[]) => void): {
|
85
|
+
intervalId: number | null;
|
86
|
+
};
|
87
|
+
sendOperationSet(accountClusterId: string, operationSet: OperationSet, signOperation: (operation: OnchainOperation) => Promise<SignedOperation | undefined>): Promise<{
|
88
|
+
success: boolean;
|
89
|
+
operationSetId?: string;
|
90
|
+
primaryOperationStatus?: OperationStatus;
|
91
|
+
operationResponses?: OperationStatus[];
|
92
|
+
}>;
|
84
93
|
}
|