@typus/typus-perp-sdk 1.0.59 → 1.0.61-ui-upgrade-e
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/api/sentio.d.ts +2 -2
- package/dist/src/api/sentio.js +8 -8
- package/dist/src/fetch.d.ts +16 -3
- package/dist/src/fetch.js +139 -8
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +8 -4
- package/dist/src/typus_perp/admin/functions.d.ts +10 -0
- package/dist/src/typus_perp/admin/functions.js +17 -0
- package/dist/src/typus_perp/competition/functions.d.ts +24 -0
- package/dist/src/typus_perp/competition/functions.js +38 -0
- package/dist/src/typus_perp/competition/structs.d.ts +92 -0
- package/dist/src/typus_perp/competition/structs.js +288 -0
- package/dist/src/typus_perp/error/functions.d.ts +5 -0
- package/dist/src/typus_perp/error/functions.js +25 -0
- package/dist/src/typus_perp/lp-pool/functions.d.ts +60 -27
- package/dist/src/typus_perp/lp-pool/functions.js +92 -52
- package/dist/src/typus_perp/lp-pool/structs.d.ts +161 -210
- package/dist/src/typus_perp/lp-pool/structs.js +384 -284
- package/dist/src/typus_perp/position/functions.d.ts +8 -0
- package/dist/src/typus_perp/position/functions.js +8 -0
- package/dist/src/typus_perp/trading/functions.d.ts +186 -0
- package/dist/src/typus_perp/trading/functions.js +263 -0
- package/dist/src/typus_perp/trading/structs.d.ts +127 -0
- package/dist/src/typus_perp/trading/structs.js +395 -204
- package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +9 -0
- package/dist/src/typus_stake_pool/stake-pool/functions.js +20 -0
- package/dist/src/user/order.js +3 -1
- package/dist/src/user/orderWithBidReceipt.js +6 -2
- package/dist/src/user/tlp.d.ts +23 -9
- package/dist/src/user/tlp.js +148 -61
- package/package.json +2 -2
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
47
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
48
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
50
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
51
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
52
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
56
|
+
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);
|
|
57
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
58
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
59
|
+
function step(op) {
|
|
60
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
61
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
62
|
+
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;
|
|
63
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
64
|
+
switch (op[0]) {
|
|
65
|
+
case 0: case 1: t = op; break;
|
|
66
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
67
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
68
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
69
|
+
default:
|
|
70
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
71
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
72
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
73
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
74
|
+
if (t[2]) _.ops.pop();
|
|
75
|
+
_.trys.pop(); continue;
|
|
76
|
+
}
|
|
77
|
+
op = body.call(thisArg, _);
|
|
78
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
79
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
83
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
84
|
+
if (!m) return o;
|
|
85
|
+
var i = m.call(o), r, ar = [], e;
|
|
86
|
+
try {
|
|
87
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
88
|
+
}
|
|
89
|
+
catch (error) { e = { error: error }; }
|
|
90
|
+
finally {
|
|
91
|
+
try {
|
|
92
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
93
|
+
}
|
|
94
|
+
finally { if (e) throw e.error; }
|
|
95
|
+
}
|
|
96
|
+
return ar;
|
|
97
|
+
};
|
|
98
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
99
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
100
|
+
if (ar || !(i in from)) {
|
|
101
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
102
|
+
ar[i] = from[i];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
106
|
+
};
|
|
107
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
108
|
+
exports.CompetitionConfig = void 0;
|
|
109
|
+
exports.isCompetitionConfig = isCompetitionConfig;
|
|
110
|
+
var reified = __importStar(require("../../_framework/reified"));
|
|
111
|
+
var structs_1 = require("../../_dependencies/source/0x1/ascii/structs");
|
|
112
|
+
var structs_2 = require("../../_dependencies/source/0x2/object/structs");
|
|
113
|
+
var reified_1 = require("../../_framework/reified");
|
|
114
|
+
var util_1 = require("../../_framework/util");
|
|
115
|
+
var index_1 = require("../index");
|
|
116
|
+
var bcs_1 = require("@mysten/sui/bcs");
|
|
117
|
+
var utils_1 = require("@mysten/sui/utils");
|
|
118
|
+
/* ============================== CompetitionConfig =============================== */
|
|
119
|
+
function isCompetitionConfig(type) {
|
|
120
|
+
type = (0, util_1.compressSuiType)(type);
|
|
121
|
+
return type === "".concat(index_1.PKG_V1, "::competition::CompetitionConfig");
|
|
122
|
+
}
|
|
123
|
+
var CompetitionConfig = /** @class */ (function () {
|
|
124
|
+
function CompetitionConfig(typeArgs, fields) {
|
|
125
|
+
this.__StructClass = true;
|
|
126
|
+
this.$typeName = CompetitionConfig.$typeName;
|
|
127
|
+
this.$isPhantom = CompetitionConfig.$isPhantom;
|
|
128
|
+
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([CompetitionConfig.$typeName], __read(typeArgs), false));
|
|
129
|
+
this.$typeArgs = typeArgs;
|
|
130
|
+
this.id = fields.id;
|
|
131
|
+
this.boostBp = fields.boostBp;
|
|
132
|
+
this.isActive = fields.isActive;
|
|
133
|
+
this.programName = fields.programName;
|
|
134
|
+
this.u64Padding = fields.u64Padding;
|
|
135
|
+
}
|
|
136
|
+
CompetitionConfig.reified = function () {
|
|
137
|
+
var _this = this;
|
|
138
|
+
return {
|
|
139
|
+
typeName: CompetitionConfig.$typeName,
|
|
140
|
+
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([CompetitionConfig.$typeName], [], false)),
|
|
141
|
+
typeArgs: [],
|
|
142
|
+
isPhantom: CompetitionConfig.$isPhantom,
|
|
143
|
+
reifiedTypeArgs: [],
|
|
144
|
+
fromFields: function (fields) { return CompetitionConfig.fromFields(fields); },
|
|
145
|
+
fromFieldsWithTypes: function (item) { return CompetitionConfig.fromFieldsWithTypes(item); },
|
|
146
|
+
fromBcs: function (data) { return CompetitionConfig.fromBcs(data); },
|
|
147
|
+
bcs: CompetitionConfig.bcs,
|
|
148
|
+
fromJSONField: function (field) { return CompetitionConfig.fromJSONField(field); },
|
|
149
|
+
fromJSON: function (json) { return CompetitionConfig.fromJSON(json); },
|
|
150
|
+
fromSuiParsedData: function (content) { return CompetitionConfig.fromSuiParsedData(content); },
|
|
151
|
+
fromSuiObjectData: function (content) { return CompetitionConfig.fromSuiObjectData(content); },
|
|
152
|
+
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
153
|
+
return [2 /*return*/, CompetitionConfig.fetch(client, id)];
|
|
154
|
+
}); }); },
|
|
155
|
+
new: function (fields) {
|
|
156
|
+
return new CompetitionConfig([], fields);
|
|
157
|
+
},
|
|
158
|
+
kind: "StructClassReified",
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
Object.defineProperty(CompetitionConfig, "r", {
|
|
162
|
+
get: function () {
|
|
163
|
+
return CompetitionConfig.reified();
|
|
164
|
+
},
|
|
165
|
+
enumerable: false,
|
|
166
|
+
configurable: true
|
|
167
|
+
});
|
|
168
|
+
CompetitionConfig.phantom = function () {
|
|
169
|
+
return (0, reified_1.phantom)(CompetitionConfig.reified());
|
|
170
|
+
};
|
|
171
|
+
Object.defineProperty(CompetitionConfig, "p", {
|
|
172
|
+
get: function () {
|
|
173
|
+
return CompetitionConfig.phantom();
|
|
174
|
+
},
|
|
175
|
+
enumerable: false,
|
|
176
|
+
configurable: true
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(CompetitionConfig, "bcs", {
|
|
179
|
+
get: function () {
|
|
180
|
+
return bcs_1.bcs.struct("CompetitionConfig", {
|
|
181
|
+
id: structs_2.UID.bcs,
|
|
182
|
+
boost_bp: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
183
|
+
is_active: bcs_1.bcs.bool(),
|
|
184
|
+
program_name: structs_1.String.bcs,
|
|
185
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
enumerable: false,
|
|
189
|
+
configurable: true
|
|
190
|
+
});
|
|
191
|
+
CompetitionConfig.fromFields = function (fields) {
|
|
192
|
+
return CompetitionConfig.reified().new({
|
|
193
|
+
id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
|
|
194
|
+
boostBp: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.boost_bp),
|
|
195
|
+
isActive: (0, reified_1.decodeFromFields)("bool", fields.is_active),
|
|
196
|
+
programName: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.program_name),
|
|
197
|
+
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
CompetitionConfig.fromFieldsWithTypes = function (item) {
|
|
201
|
+
if (!isCompetitionConfig(item.type)) {
|
|
202
|
+
throw new Error("not a CompetitionConfig type");
|
|
203
|
+
}
|
|
204
|
+
return CompetitionConfig.reified().new({
|
|
205
|
+
id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
|
|
206
|
+
boostBp: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.boost_bp),
|
|
207
|
+
isActive: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_active),
|
|
208
|
+
programName: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.program_name),
|
|
209
|
+
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
CompetitionConfig.fromBcs = function (data) {
|
|
213
|
+
return CompetitionConfig.fromFields(CompetitionConfig.bcs.parse(data));
|
|
214
|
+
};
|
|
215
|
+
CompetitionConfig.prototype.toJSONField = function () {
|
|
216
|
+
return {
|
|
217
|
+
id: this.id,
|
|
218
|
+
boostBp: (0, reified_1.fieldToJSON)("vector<u64>", this.boostBp),
|
|
219
|
+
isActive: this.isActive,
|
|
220
|
+
programName: this.programName,
|
|
221
|
+
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
CompetitionConfig.prototype.toJSON = function () {
|
|
225
|
+
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
226
|
+
};
|
|
227
|
+
CompetitionConfig.fromJSONField = function (field) {
|
|
228
|
+
return CompetitionConfig.reified().new({
|
|
229
|
+
id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
|
|
230
|
+
boostBp: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.boostBp),
|
|
231
|
+
isActive: (0, reified_1.decodeFromJSONField)("bool", field.isActive),
|
|
232
|
+
programName: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.programName),
|
|
233
|
+
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
CompetitionConfig.fromJSON = function (json) {
|
|
237
|
+
if (json.$typeName !== CompetitionConfig.$typeName) {
|
|
238
|
+
throw new Error("not a WithTwoGenerics json object");
|
|
239
|
+
}
|
|
240
|
+
return CompetitionConfig.fromJSONField(json);
|
|
241
|
+
};
|
|
242
|
+
CompetitionConfig.fromSuiParsedData = function (content) {
|
|
243
|
+
if (content.dataType !== "moveObject") {
|
|
244
|
+
throw new Error("not an object");
|
|
245
|
+
}
|
|
246
|
+
if (!isCompetitionConfig(content.type)) {
|
|
247
|
+
throw new Error("object at ".concat(content.fields.id, " is not a CompetitionConfig object"));
|
|
248
|
+
}
|
|
249
|
+
return CompetitionConfig.fromFieldsWithTypes(content);
|
|
250
|
+
};
|
|
251
|
+
CompetitionConfig.fromSuiObjectData = function (data) {
|
|
252
|
+
if (data.bcs) {
|
|
253
|
+
if (data.bcs.dataType !== "moveObject" || !isCompetitionConfig(data.bcs.type)) {
|
|
254
|
+
throw new Error("object at is not a CompetitionConfig object");
|
|
255
|
+
}
|
|
256
|
+
return CompetitionConfig.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
257
|
+
}
|
|
258
|
+
if (data.content) {
|
|
259
|
+
return CompetitionConfig.fromSuiParsedData(data.content);
|
|
260
|
+
}
|
|
261
|
+
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
262
|
+
};
|
|
263
|
+
CompetitionConfig.fetch = function (client, id) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
265
|
+
var res;
|
|
266
|
+
var _a, _b;
|
|
267
|
+
return __generator(this, function (_c) {
|
|
268
|
+
switch (_c.label) {
|
|
269
|
+
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
270
|
+
case 1:
|
|
271
|
+
res = _c.sent();
|
|
272
|
+
if (res.error) {
|
|
273
|
+
throw new Error("error fetching CompetitionConfig object at id ".concat(id, ": ").concat(res.error.code));
|
|
274
|
+
}
|
|
275
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isCompetitionConfig(res.data.bcs.type)) {
|
|
276
|
+
throw new Error("object at id ".concat(id, " is not a CompetitionConfig object"));
|
|
277
|
+
}
|
|
278
|
+
return [2 /*return*/, CompetitionConfig.fromSuiObjectData(res.data)];
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
};
|
|
283
|
+
CompetitionConfig.$typeName = "".concat(index_1.PKG_V1, "::competition::CompetitionConfig");
|
|
284
|
+
CompetitionConfig.$numTypeParams = 0;
|
|
285
|
+
CompetitionConfig.$isPhantom = [];
|
|
286
|
+
return CompetitionConfig;
|
|
287
|
+
}());
|
|
288
|
+
exports.CompetitionConfig = CompetitionConfig;
|
|
@@ -12,14 +12,18 @@ export declare function bidReceiptNotExpired(tx: Transaction, published_at?: str
|
|
|
12
12
|
export declare function bidReceiptNotItm(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
13
13
|
export declare function bidTokenMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
14
14
|
export declare function collateralTokenTypeMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
15
|
+
export declare function deactivatingSharesAlreadyExisted(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
15
16
|
export declare function depositAmountInsufficient(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
16
17
|
export declare function depositTokenMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
17
18
|
export declare function exceedMaxLeverage(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
19
|
+
export declare function exceedMaxOpenInterest(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
18
20
|
export declare function frictionTooLarge(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
19
21
|
export declare function insufficientAmountForMintFee(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
20
22
|
export declare function invalidBidReceiptsInput(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
23
|
+
export declare function invalidBoostBpArrayLength(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
21
24
|
export declare function invalidOrderSide(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
22
25
|
export declare function invalidOrderSize(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
26
|
+
export declare function invalidTokenType(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
23
27
|
export declare function invalidTradingFeeConfig(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
24
28
|
export declare function invalidVersion(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
25
29
|
export declare function linkedOrderIdNotExisted(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -62,6 +66,7 @@ export declare function tvlNotYetUpdated(tx: Transaction, published_at?: string)
|
|
|
62
66
|
export declare function unauthorized(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
63
67
|
export declare function unsupportedOrderTypeTag(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
64
68
|
export declare function unsupportedProcessStatusCode(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
69
|
+
export declare function userDeactivatingSharesNotExisted(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
65
70
|
export declare function userMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
66
71
|
export declare function wrongCollateralType(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
67
72
|
export declare function zeroPrice(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -13,14 +13,18 @@ exports.bidReceiptNotExpired = bidReceiptNotExpired;
|
|
|
13
13
|
exports.bidReceiptNotItm = bidReceiptNotItm;
|
|
14
14
|
exports.bidTokenMismatched = bidTokenMismatched;
|
|
15
15
|
exports.collateralTokenTypeMismatched = collateralTokenTypeMismatched;
|
|
16
|
+
exports.deactivatingSharesAlreadyExisted = deactivatingSharesAlreadyExisted;
|
|
16
17
|
exports.depositAmountInsufficient = depositAmountInsufficient;
|
|
17
18
|
exports.depositTokenMismatched = depositTokenMismatched;
|
|
18
19
|
exports.exceedMaxLeverage = exceedMaxLeverage;
|
|
20
|
+
exports.exceedMaxOpenInterest = exceedMaxOpenInterest;
|
|
19
21
|
exports.frictionTooLarge = frictionTooLarge;
|
|
20
22
|
exports.insufficientAmountForMintFee = insufficientAmountForMintFee;
|
|
21
23
|
exports.invalidBidReceiptsInput = invalidBidReceiptsInput;
|
|
24
|
+
exports.invalidBoostBpArrayLength = invalidBoostBpArrayLength;
|
|
22
25
|
exports.invalidOrderSide = invalidOrderSide;
|
|
23
26
|
exports.invalidOrderSize = invalidOrderSize;
|
|
27
|
+
exports.invalidTokenType = invalidTokenType;
|
|
24
28
|
exports.invalidTradingFeeConfig = invalidTradingFeeConfig;
|
|
25
29
|
exports.invalidVersion = invalidVersion;
|
|
26
30
|
exports.linkedOrderIdNotExisted = linkedOrderIdNotExisted;
|
|
@@ -63,6 +67,7 @@ exports.tvlNotYetUpdated = tvlNotYetUpdated;
|
|
|
63
67
|
exports.unauthorized = unauthorized;
|
|
64
68
|
exports.unsupportedOrderTypeTag = unsupportedOrderTypeTag;
|
|
65
69
|
exports.unsupportedProcessStatusCode = unsupportedProcessStatusCode;
|
|
70
|
+
exports.userDeactivatingSharesNotExisted = userDeactivatingSharesNotExisted;
|
|
66
71
|
exports.userMismatched = userMismatched;
|
|
67
72
|
exports.wrongCollateralType = wrongCollateralType;
|
|
68
73
|
exports.zeroPrice = zeroPrice;
|
|
@@ -120,6 +125,10 @@ function collateralTokenTypeMismatched(tx, published_at) {
|
|
|
120
125
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
121
126
|
return tx.moveCall({ target: "".concat(published_at, "::error::collateral_token_type_mismatched"), arguments: [] });
|
|
122
127
|
}
|
|
128
|
+
function deactivatingSharesAlreadyExisted(tx, published_at) {
|
|
129
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
130
|
+
return tx.moveCall({ target: "".concat(published_at, "::error::deactivating_shares_already_existed"), arguments: [] });
|
|
131
|
+
}
|
|
123
132
|
function depositAmountInsufficient(tx, published_at) {
|
|
124
133
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
125
134
|
return tx.moveCall({ target: "".concat(published_at, "::error::deposit_amount_insufficient"), arguments: [] });
|
|
@@ -132,6 +141,10 @@ function exceedMaxLeverage(tx, published_at) {
|
|
|
132
141
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
133
142
|
return tx.moveCall({ target: "".concat(published_at, "::error::exceed_max_leverage"), arguments: [] });
|
|
134
143
|
}
|
|
144
|
+
function exceedMaxOpenInterest(tx, published_at) {
|
|
145
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
146
|
+
return tx.moveCall({ target: "".concat(published_at, "::error::exceed_max_open_interest"), arguments: [] });
|
|
147
|
+
}
|
|
135
148
|
function frictionTooLarge(tx, published_at) {
|
|
136
149
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
137
150
|
return tx.moveCall({ target: "".concat(published_at, "::error::friction_too_large"), arguments: [] });
|
|
@@ -144,6 +157,10 @@ function invalidBidReceiptsInput(tx, published_at) {
|
|
|
144
157
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
145
158
|
return tx.moveCall({ target: "".concat(published_at, "::error::invalid_bid_receipts_input"), arguments: [] });
|
|
146
159
|
}
|
|
160
|
+
function invalidBoostBpArrayLength(tx, published_at) {
|
|
161
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
162
|
+
return tx.moveCall({ target: "".concat(published_at, "::error::invalid_boost_bp_array_length"), arguments: [] });
|
|
163
|
+
}
|
|
147
164
|
function invalidOrderSide(tx, published_at) {
|
|
148
165
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
149
166
|
return tx.moveCall({ target: "".concat(published_at, "::error::invalid_order_side"), arguments: [] });
|
|
@@ -152,6 +169,10 @@ function invalidOrderSize(tx, published_at) {
|
|
|
152
169
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
153
170
|
return tx.moveCall({ target: "".concat(published_at, "::error::invalid_order_size"), arguments: [] });
|
|
154
171
|
}
|
|
172
|
+
function invalidTokenType(tx, published_at) {
|
|
173
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
174
|
+
return tx.moveCall({ target: "".concat(published_at, "::error::invalid_token_type"), arguments: [] });
|
|
175
|
+
}
|
|
155
176
|
function invalidTradingFeeConfig(tx, published_at) {
|
|
156
177
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
157
178
|
return tx.moveCall({ target: "".concat(published_at, "::error::invalid_trading_fee_config"), arguments: [] });
|
|
@@ -320,6 +341,10 @@ function unsupportedProcessStatusCode(tx, published_at) {
|
|
|
320
341
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
321
342
|
return tx.moveCall({ target: "".concat(published_at, "::error::unsupported_process_status_code"), arguments: [] });
|
|
322
343
|
}
|
|
344
|
+
function userDeactivatingSharesNotExisted(tx, published_at) {
|
|
345
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
346
|
+
return tx.moveCall({ target: "".concat(published_at, "::error::user_deactivating_shares_not_existed"), arguments: [] });
|
|
347
|
+
}
|
|
323
348
|
function userMismatched(tx, published_at) {
|
|
324
349
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
325
350
|
return tx.moveCall({ target: "".concat(published_at, "::error::user_mismatched"), arguments: [] });
|
|
@@ -35,6 +35,16 @@ export interface BurnLpArgs {
|
|
|
35
35
|
clock: TransactionObjectInput;
|
|
36
36
|
}
|
|
37
37
|
export declare function burnLp(tx: Transaction, typeArgs: [string, string], args: BurnLpArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
38
|
+
export interface BurnLp_Args {
|
|
39
|
+
version: TransactionObjectInput;
|
|
40
|
+
registry: TransactionObjectInput;
|
|
41
|
+
index: bigint | TransactionArgument;
|
|
42
|
+
treasuryCaps: TransactionObjectInput;
|
|
43
|
+
oracle: TransactionObjectInput;
|
|
44
|
+
burnLpBalance: TransactionObjectInput;
|
|
45
|
+
clock: TransactionObjectInput;
|
|
46
|
+
}
|
|
47
|
+
export declare function burnLp_(tx: Transaction, typeArgs: [string, string], args: BurnLp_Args, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
38
48
|
export interface CalculateBurnLpArgs {
|
|
39
49
|
registry: TransactionObjectInput;
|
|
40
50
|
index: bigint | TransactionArgument;
|
|
@@ -91,6 +101,15 @@ export interface CheckTvlUpdatedArgs {
|
|
|
91
101
|
clock: TransactionObjectInput;
|
|
92
102
|
}
|
|
93
103
|
export declare function checkTvlUpdated(tx: Transaction, args: CheckTvlUpdatedArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
104
|
+
export interface ClaimArgs {
|
|
105
|
+
version: TransactionObjectInput;
|
|
106
|
+
registry: TransactionObjectInput;
|
|
107
|
+
index: bigint | TransactionArgument;
|
|
108
|
+
treasuryCaps: TransactionObjectInput;
|
|
109
|
+
oracle: TransactionObjectInput;
|
|
110
|
+
clock: TransactionObjectInput;
|
|
111
|
+
}
|
|
112
|
+
export declare function claim(tx: Transaction, typeArgs: [string, string], args: ClaimArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
94
113
|
export interface CompleteRemoveLiquidityTokenProcessArgs {
|
|
95
114
|
version: TransactionObjectInput;
|
|
96
115
|
registry: TransactionObjectInput;
|
|
@@ -98,14 +117,13 @@ export interface CompleteRemoveLiquidityTokenProcessArgs {
|
|
|
98
117
|
process: TransactionObjectInput;
|
|
99
118
|
}
|
|
100
119
|
export declare function completeRemoveLiquidityTokenProcess(tx: Transaction, typeArg: string, args: CompleteRemoveLiquidityTokenProcessArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
101
|
-
export interface
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
clock: TransactionObjectInput;
|
|
106
|
-
depositAmount: bigint | TransactionArgument;
|
|
120
|
+
export interface CreateDeactivatingSharesArgs {
|
|
121
|
+
version: TransactionObjectInput;
|
|
122
|
+
registry: TransactionObjectInput;
|
|
123
|
+
index: bigint | TransactionArgument;
|
|
107
124
|
}
|
|
108
|
-
export declare function
|
|
125
|
+
export declare function createDeactivatingShares(tx: Transaction, typeArg: string, args: CreateDeactivatingSharesArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
126
|
+
export declare function deprecated(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
109
127
|
export declare function getBorrowRateDecimal(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
110
128
|
export interface GetCumulativeBorrowRateArgs {
|
|
111
129
|
liquidityPool: TransactionObjectInput;
|
|
@@ -172,17 +190,27 @@ export interface GetTokenPoolStateArgs {
|
|
|
172
190
|
}
|
|
173
191
|
export declare function getTokenPoolState(tx: Transaction, args: GetTokenPoolStateArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
174
192
|
export declare function getTvlUsd(tx: Transaction, liquidityPool: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
193
|
+
export interface GetUserDeactivatingSharesArgs {
|
|
194
|
+
registry: TransactionObjectInput;
|
|
195
|
+
index: bigint | TransactionArgument;
|
|
196
|
+
user: string | TransactionArgument;
|
|
197
|
+
}
|
|
198
|
+
export declare function getUserDeactivatingShares(tx: Transaction, typeArg: string, args: GetUserDeactivatingSharesArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
175
199
|
export declare function init(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
176
|
-
export interface
|
|
200
|
+
export interface ManagerEmergencyDepositArgs {
|
|
177
201
|
version: TransactionObjectInput;
|
|
178
202
|
registry: TransactionObjectInput;
|
|
179
203
|
index: bigint | TransactionArgument;
|
|
180
|
-
|
|
181
|
-
scallopMarket: TransactionObjectInput;
|
|
182
|
-
clock: TransactionObjectInput;
|
|
183
|
-
lendingAmount: bigint | TransactionArgument | TransactionArgument | null;
|
|
204
|
+
coin: TransactionObjectInput;
|
|
184
205
|
}
|
|
185
|
-
export declare function
|
|
206
|
+
export declare function managerEmergencyDeposit(tx: Transaction, typeArgs: [string, string], args: ManagerEmergencyDepositArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
207
|
+
export interface ManagerEmergencyWithdrawArgs {
|
|
208
|
+
version: TransactionObjectInput;
|
|
209
|
+
registry: TransactionObjectInput;
|
|
210
|
+
index: bigint | TransactionArgument;
|
|
211
|
+
receipt: TransactionObjectInput;
|
|
212
|
+
}
|
|
213
|
+
export declare function managerEmergencyWithdraw(tx: Transaction, typeArgs: [string, string], args: ManagerEmergencyWithdrawArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
186
214
|
export interface ManagerFlashRemoveLiquidityArgs {
|
|
187
215
|
version: TransactionObjectInput;
|
|
188
216
|
registry: TransactionObjectInput;
|
|
@@ -202,16 +230,14 @@ export interface ManagerFlashRepayLiquidityArgs {
|
|
|
202
230
|
clock: TransactionObjectInput;
|
|
203
231
|
}
|
|
204
232
|
export declare function managerFlashRepayLiquidity(tx: Transaction, typeArg: string, args: ManagerFlashRepayLiquidityArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
205
|
-
export interface
|
|
233
|
+
export interface ManagerHotfixBurnLpArgs {
|
|
206
234
|
version: TransactionObjectInput;
|
|
207
235
|
registry: TransactionObjectInput;
|
|
208
236
|
index: bigint | TransactionArgument;
|
|
209
|
-
|
|
210
|
-
scallopMarket: TransactionObjectInput;
|
|
237
|
+
oracle: TransactionObjectInput;
|
|
211
238
|
clock: TransactionObjectInput;
|
|
212
|
-
withdrawAmount: bigint | TransactionArgument | TransactionArgument | null;
|
|
213
239
|
}
|
|
214
|
-
export declare function
|
|
240
|
+
export declare function managerHotfixBurnLp(tx: Transaction, typeArg: string, args: ManagerHotfixBurnLpArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
215
241
|
export interface MintLpArgs {
|
|
216
242
|
version: TransactionObjectInput;
|
|
217
243
|
registry: TransactionObjectInput;
|
|
@@ -226,6 +252,7 @@ export interface NewLiquidityPoolArgs {
|
|
|
226
252
|
version: TransactionObjectInput;
|
|
227
253
|
registry: TransactionObjectInput;
|
|
228
254
|
lpTokenDecimal: bigint | TransactionArgument;
|
|
255
|
+
unlockCountdownTsMs: bigint | TransactionArgument;
|
|
229
256
|
}
|
|
230
257
|
export declare function newLiquidityPool(tx: Transaction, typeArg: string, args: NewLiquidityPoolArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
231
258
|
export interface OracleMatchedArgs {
|
|
@@ -253,6 +280,14 @@ export interface PutReceiptCollateralsArgs {
|
|
|
253
280
|
unsettledBidReceipts: Array<TransactionObjectInput> | TransactionArgument;
|
|
254
281
|
}
|
|
255
282
|
export declare function putReceiptCollaterals(tx: Transaction, args: PutReceiptCollateralsArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
283
|
+
export interface RedeemArgs {
|
|
284
|
+
version: TransactionObjectInput;
|
|
285
|
+
registry: TransactionObjectInput;
|
|
286
|
+
index: bigint | TransactionArgument;
|
|
287
|
+
balance: TransactionObjectInput;
|
|
288
|
+
clock: TransactionObjectInput;
|
|
289
|
+
}
|
|
290
|
+
export declare function redeem(tx: Transaction, typeArg: string, args: RedeemArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
256
291
|
export interface RequestCollateralArgs {
|
|
257
292
|
liquidityPool: TransactionObjectInput;
|
|
258
293
|
collateralAmount: bigint | TransactionArgument;
|
|
@@ -372,6 +407,13 @@ export interface UpdateTvlArgs {
|
|
|
372
407
|
clock: TransactionObjectInput;
|
|
373
408
|
}
|
|
374
409
|
export declare function updateTvl(tx: Transaction, args: UpdateTvlArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
410
|
+
export interface UpdateUnlockCountdownTsMsArgs {
|
|
411
|
+
version: TransactionObjectInput;
|
|
412
|
+
registry: TransactionObjectInput;
|
|
413
|
+
index: bigint | TransactionArgument;
|
|
414
|
+
unlockCountdownTsMs: bigint | TransactionArgument;
|
|
415
|
+
}
|
|
416
|
+
export declare function updateUnlockCountdownTsMs(tx: Transaction, args: UpdateUnlockCountdownTsMsArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
375
417
|
export interface ViewSwapResultArgs {
|
|
376
418
|
version: TransactionObjectInput;
|
|
377
419
|
registry: TransactionObjectInput;
|
|
@@ -382,12 +424,3 @@ export interface ViewSwapResultArgs {
|
|
|
382
424
|
clock: TransactionObjectInput;
|
|
383
425
|
}
|
|
384
426
|
export declare function viewSwapResult(tx: Transaction, typeArgs: [string, string], args: ViewSwapResultArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|
|
385
|
-
export interface WithdrawScallopBasicArgs {
|
|
386
|
-
version: TransactionObjectInput;
|
|
387
|
-
liquidityPool: TransactionObjectInput;
|
|
388
|
-
scallopVersion: TransactionObjectInput;
|
|
389
|
-
scallopMarket: TransactionObjectInput;
|
|
390
|
-
clock: TransactionObjectInput;
|
|
391
|
-
withdrawAmount: bigint | TransactionArgument;
|
|
392
|
-
}
|
|
393
|
-
export declare function withdrawScallopBasic(tx: Transaction, typeArg: string, args: WithdrawScallopBasicArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
|