aftermath-ts-sdk 1.3.23-perps.29 → 1.3.23-perps.30

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.
@@ -52,80 +52,91 @@ class PerpetualsVault extends caller_1.Caller {
52
52
  });
53
53
  });
54
54
  }
55
- getProcessWithdrawRequestsTx(inputs) {
55
+ getUpdateWithdrawRequestSlippageTx(inputs) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
57
  var _a;
58
58
  const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
59
- return this.fetchApiTxObject("vault/transactions/process-withdraw-requests", Object.assign(Object.assign({}, otherInputs), {
60
- // NOTE: should this be `vaultIds` ?
61
- vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
59
+ return this.fetchApiTxObject("vault/transactions/update-withdraw-request-slippage", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
62
60
  tx: tx !== null && tx !== void 0 ? tx : new transactions_1.Transaction(),
63
61
  })) }), undefined, {
64
62
  txKind: true,
65
63
  });
66
64
  });
67
65
  }
68
- getUpdateWithdrawRequestSlippageTx(inputs) {
66
+ // =========================================================================
67
+ // Owner Settings Txs
68
+ // =========================================================================
69
+ getOwnerUpdateForceWithdrawDelayTx(inputs) {
69
70
  return __awaiter(this, void 0, void 0, function* () {
70
71
  var _a;
71
- const { tx, minLpAmountOut } = inputs, otherInputs = __rest(inputs, ["tx", "minLpAmountOut"]);
72
- return this.fetchApiTxObject("vault/transactions/update-withdraw-request-slippages", Object.assign(Object.assign({}, otherInputs), { vaultIds: [this.vaultObject.objectId], minLpAmountsOut: [minLpAmountOut], txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
72
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
73
+ return this.fetchApiTxObject("vault/transactions/owner/update-force-withdraw-delay", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
73
74
  tx: tx !== null && tx !== void 0 ? tx : new transactions_1.Transaction(),
74
75
  })) }), undefined, {
75
76
  txKind: true,
76
77
  });
77
78
  });
78
79
  }
79
- // =========================================================================
80
- // Admin Settings Txs
81
- // =========================================================================
82
- getUpdateForceWithdrawDelayTx(inputs) {
80
+ getOwnerUpdateLockPeriodTx(inputs) {
83
81
  return __awaiter(this, void 0, void 0, function* () {
84
82
  var _a;
85
83
  const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
86
- return this.fetchApiTxObject("vault/transactions/update-force-withdraw-delay", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
84
+ return this.fetchApiTxObject("vault/transactions/owner/update-lock-period", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
87
85
  tx: tx !== null && tx !== void 0 ? tx : new transactions_1.Transaction(),
88
86
  })) }), undefined, {
89
87
  txKind: true,
90
88
  });
91
89
  });
92
90
  }
93
- getUpdateLockPeriodTx(inputs) {
91
+ getOwnerUpdatePerformanceFeeTx(inputs) {
94
92
  return __awaiter(this, void 0, void 0, function* () {
95
93
  var _a;
96
94
  const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
97
- return this.fetchApiTxObject("vault/transactions/update-lock-period", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
95
+ return this.fetchApiTxObject("vault/transactions/owner/update-performance-fee", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
98
96
  tx: tx !== null && tx !== void 0 ? tx : new transactions_1.Transaction(),
99
97
  })) }), undefined, {
100
98
  txKind: true,
101
99
  });
102
100
  });
103
101
  }
104
- getUpdateOwnerFeePercentageTx(inputs) {
102
+ // =========================================================================
103
+ // Owner Interactions Txs
104
+ // =========================================================================
105
+ getOwnerProcessWithdrawRequestsTx(inputs) {
105
106
  return __awaiter(this, void 0, void 0, function* () {
106
107
  var _a;
107
108
  const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
108
- return this.fetchApiTxObject("vault/transactions/update-owner-fee-percentage", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
109
+ return this.fetchApiTxObject("vault/transactions/owner/process-withdraw-requests", Object.assign(Object.assign({}, otherInputs), {
110
+ // NOTE: should this be `vaultIds` ?
111
+ vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
109
112
  tx: tx !== null && tx !== void 0 ? tx : new transactions_1.Transaction(),
110
113
  })) }), undefined, {
111
114
  txKind: true,
112
115
  });
113
116
  });
114
117
  }
115
- // =========================================================================
116
- // Admin Interactions Txs
117
- // =========================================================================
118
- getWithdrawOwnerFeesTx(inputs) {
118
+ getOwnerWithdrawPerformanceFeesTx(inputs) {
119
119
  return __awaiter(this, void 0, void 0, function* () {
120
120
  var _a;
121
121
  const { tx: txFromInputs } = inputs, otherInputs = __rest(inputs, ["tx"]);
122
- return this.fetchApiTxObject("vault/transactions/withdraw-owner-fees", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
122
+ return this.fetchApiTxObject("vault/transactions/owner/withdraw-performance-fees", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
123
123
  tx: txFromInputs !== null && txFromInputs !== void 0 ? txFromInputs : new transactions_1.Transaction(),
124
124
  })) }), undefined, {
125
125
  txKind: true,
126
126
  });
127
127
  });
128
128
  }
129
+ getOwnerWithdrawCollateralTx(inputs) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ var _a;
132
+ const { tx } = inputs, otherInputs = __rest(inputs, ["tx"]);
133
+ return this.fetchApiTxObject("vault/transactions/owner/withdraw-collateral", Object.assign(Object.assign({}, otherInputs), { vaultId: this.vaultObject.objectId, txKind: yield ((_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Transactions().fetchBase64TxKindFromTx({
134
+ tx: tx !== null && tx !== void 0 ? tx : new transactions_1.Transaction(),
135
+ })) }), undefined, {
136
+ txKind: true,
137
+ });
138
+ });
139
+ }
129
140
  // =========================================================================
130
141
  // User Interactions Txs
131
142
  // =========================================================================
@@ -193,16 +204,23 @@ class PerpetualsVault extends caller_1.Caller {
193
204
  // });
194
205
  // }
195
206
  // =========================================================================
196
- // Admin Previews
207
+ // Owner Previews
197
208
  // =========================================================================
198
- getPreviewProcessWithdrawRequests(inputs) {
209
+ getPreviewOwnerProcessWithdrawRequests(inputs) {
199
210
  return __awaiter(this, void 0, void 0, function* () {
200
- return this.fetchApi("vault/previews/process-withdraw-requests", Object.assign(Object.assign({}, inputs), { vaultId: this.vaultObject.objectId }));
211
+ return this.fetchApi("vault/previews/owner/process-withdraw-requests", Object.assign(Object.assign({}, inputs), { vaultId: this.vaultObject.objectId }));
212
+ });
213
+ }
214
+ getPreviewOwnerWithdrawPerformanceFees() {
215
+ return __awaiter(this, void 0, void 0, function* () {
216
+ return this.fetchApi("vault/previews/owner/withdraw-performance-fees", {
217
+ vaultId: this.vaultObject.objectId,
218
+ });
201
219
  });
202
220
  }
203
- getPreviewWithdrawOwnerFees(inputs) {
221
+ getPreviewOwnerWithdrawCollateral(inputs) {
204
222
  return __awaiter(this, void 0, void 0, function* () {
205
- return this.fetchApi("vault/previews/withdraw-owner-fees", Object.assign(Object.assign({}, inputs), { vaultId: this.vaultObject.objectId }));
223
+ return this.fetchApi("vault/previews/owner/withdraw-collateral", Object.assign(Object.assign({}, inputs), { vaultId: this.vaultObject.objectId }));
206
224
  });
207
225
  }
208
226
  // =========================================================================
@@ -278,9 +296,9 @@ PerpetualsVault.constants = {
278
296
  /// Minimum period for force withdraw delay in milliseconds.
279
297
  minForceWithdrawDelayMs: 3600000, // 1 hour
280
298
  /// Minimum vault fee.
281
- minOwnerFeePercentage: 0.0, // 0%
299
+ minPerformanceFeePercentage: 0.0, // 0%
282
300
  /// Maximum vault fee.
283
- maxOwnerFeePercentage: 0.2, // 20%
301
+ maxPerformanceFeePercentage: 0.2, // 20%
284
302
  // Minimum USD value required for users deposits.
285
303
  minDepositUsd: 1,
286
304
  // Minimum USD value required to be locked by vault owner during vault creation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aftermath-ts-sdk",
3
- "version": "1.3.23-perps.29",
3
+ "version": "1.3.23-perps.30",
4
4
  "description": "Aftermath TypeScript SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",