@typus/typus-sdk 1.1.5 → 1.1.6

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.
@@ -16,3 +16,50 @@ import { TransactionBlock } from "@mysten/sui.js";
16
16
  )
17
17
  */
18
18
  export declare function getOtcTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, coins: string[], deliveryPrice: string, deliverySize: string, bidderBidValue: string, bidderFeeBalanceValue: string, incentiveBidValue: string, incentiveFeeBalanceValue: string, depositorIncentiveValue: string, usingSponsoredGasCoin?: boolean): Promise<TransactionBlock>;
19
+ /**
20
+ public(friend) entry fun update_config(
21
+ registry: &mut Registry,
22
+ index: u64,
23
+ oracle_id: Option<address>,
24
+ deposit_lot_size: Option<u64>,
25
+ bid_lot_size: Option<u64>,
26
+ min_deposit_size: Option<u64>,
27
+ min_bid_size: Option<u64>,
28
+ max_deposit_entry: Option<u64>,
29
+ max_bid_entry: Option<u64>,
30
+ deposit_fee_bp: Option<u64>,
31
+ deposit_fee_share_bp: Option<u64>,
32
+ deposit_shared_fee_pool: Option<Option<vector<u8>>>,
33
+ bid_fee_bp: Option<u64>,
34
+ deposit_incentive_bp: Option<u64>,
35
+ bid_incentive_bp: Option<u64>,
36
+ auction_delay_ts_ms: Option<u64>,
37
+ auction_duration_ts_ms: Option<u64>,
38
+ recoup_delay_ts_ms: Option<u64>,
39
+ capacity: Option<u64>,
40
+ leverage: Option<u64>,
41
+ risk_level: Option<u64>,
42
+ ctx: &TxContext,
43
+ ) {
44
+ */
45
+ export declare function getUpdateConfigTx(gasBudget: number, packageId: string, registry: string, index: string, config: {
46
+ oracleId?: string;
47
+ depositLotSize?: string;
48
+ bidLotSize?: string;
49
+ minDepositSize?: string;
50
+ minBidSize?: string;
51
+ maxDepositEntry?: string;
52
+ maxBidEntry?: string;
53
+ depositFeeBp?: string;
54
+ depositFeeShareBp?: string;
55
+ depositSharedFeePool?: string;
56
+ bidFeeBp?: string;
57
+ depositIncentiveBp?: string;
58
+ bidIncentiveBp?: string;
59
+ auctionDelayTsMs?: string;
60
+ auctionDurationTsMs?: string;
61
+ recoupDelayTsMs?: string;
62
+ capacity?: string;
63
+ leverage?: string;
64
+ riskLevel?: string;
65
+ }): Promise<TransactionBlock>;
@@ -52,7 +52,7 @@ var __read = (this && this.__read) || function (o, n) {
52
52
  return ar;
53
53
  };
54
54
  Object.defineProperty(exports, "__esModule", { value: true });
55
- exports.getOtcTx = void 0;
55
+ exports.getUpdateConfigTx = exports.getOtcTx = void 0;
56
56
  var sui_js_1 = require("@mysten/sui.js");
57
57
  var constants_1 = require("../../constants");
58
58
  /**
@@ -125,3 +125,67 @@ function getOtcTx(gasBudget, packageId, typeArguments, registry, index, coins, d
125
125
  });
126
126
  }
127
127
  exports.getOtcTx = getOtcTx;
128
+ /**
129
+ public(friend) entry fun update_config(
130
+ registry: &mut Registry,
131
+ index: u64,
132
+ oracle_id: Option<address>,
133
+ deposit_lot_size: Option<u64>,
134
+ bid_lot_size: Option<u64>,
135
+ min_deposit_size: Option<u64>,
136
+ min_bid_size: Option<u64>,
137
+ max_deposit_entry: Option<u64>,
138
+ max_bid_entry: Option<u64>,
139
+ deposit_fee_bp: Option<u64>,
140
+ deposit_fee_share_bp: Option<u64>,
141
+ deposit_shared_fee_pool: Option<Option<vector<u8>>>,
142
+ bid_fee_bp: Option<u64>,
143
+ deposit_incentive_bp: Option<u64>,
144
+ bid_incentive_bp: Option<u64>,
145
+ auction_delay_ts_ms: Option<u64>,
146
+ auction_duration_ts_ms: Option<u64>,
147
+ recoup_delay_ts_ms: Option<u64>,
148
+ capacity: Option<u64>,
149
+ leverage: Option<u64>,
150
+ risk_level: Option<u64>,
151
+ ctx: &TxContext,
152
+ ) {
153
+ */
154
+ function getUpdateConfigTx(gasBudget, packageId, registry, index, config) {
155
+ return __awaiter(this, void 0, void 0, function () {
156
+ var tx;
157
+ return __generator(this, function (_a) {
158
+ tx = new sui_js_1.TransactionBlock();
159
+ tx.moveCall({
160
+ target: "".concat(packageId, "::tds_authorized_entry::update_config"),
161
+ typeArguments: [],
162
+ arguments: [
163
+ tx.object(registry),
164
+ tx.pure(index),
165
+ tx.pure(config.oracleId ? [config.oracleId] : []),
166
+ tx.pure(config.depositLotSize ? [config.depositLotSize] : []),
167
+ tx.pure(config.bidLotSize ? [config.bidLotSize] : []),
168
+ tx.pure(config.minDepositSize ? [config.minDepositSize] : []),
169
+ tx.pure(config.minBidSize ? [config.minBidSize] : []),
170
+ tx.pure(config.maxDepositEntry ? [config.maxDepositEntry] : []),
171
+ tx.pure(config.maxBidEntry ? [config.maxBidEntry] : []),
172
+ tx.pure(config.depositFeeBp ? [config.depositFeeBp] : []),
173
+ tx.pure(config.depositFeeShareBp ? [config.depositFeeShareBp] : []),
174
+ tx.pure(config.depositSharedFeePool ? [config.depositSharedFeePool] : []),
175
+ tx.pure(config.bidFeeBp ? [config.bidFeeBp] : []),
176
+ tx.pure(config.depositIncentiveBp ? [config.depositIncentiveBp] : []),
177
+ tx.pure(config.bidIncentiveBp ? [config.bidIncentiveBp] : []),
178
+ tx.pure(config.auctionDelayTsMs ? [config.auctionDelayTsMs] : []),
179
+ tx.pure(config.auctionDurationTsMs ? [config.auctionDurationTsMs] : []),
180
+ tx.pure(config.recoupDelayTsMs ? [config.recoupDelayTsMs] : []),
181
+ tx.pure(config.capacity ? [config.capacity] : []),
182
+ tx.pure(config.leverage ? [config.leverage] : []),
183
+ tx.pure(config.riskLevel ? [config.riskLevel] : []),
184
+ ],
185
+ });
186
+ tx.setGasBudget(gasBudget);
187
+ return [2 /*return*/, tx];
188
+ });
189
+ });
190
+ }
191
+ exports.getUpdateConfigTx = getUpdateConfigTx;
@@ -0,0 +1,16 @@
1
+ import { JsonRpcProvider } from "@mysten/sui.js";
2
+ import { Vault } from "./view-function";
3
+ export declare function getUserHistory(provider: JsonRpcProvider, originPackage: string, vaults: {
4
+ [key: string]: Vault;
5
+ }, sender: string, startTimeMs: number): Promise<TxHistory[]>;
6
+ interface TxHistory {
7
+ Action: string;
8
+ Amount: string | undefined;
9
+ Vault: string | undefined;
10
+ RiskLevel: string | undefined;
11
+ Tails: string | undefined;
12
+ Exp: string | undefined;
13
+ Date: Date;
14
+ txDigest: string;
15
+ }
16
+ export {};
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ 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;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getUserHistory = void 0;
40
+ var token_1 = require("../token");
41
+ function getUserHistory(provider, originPackage, vaults, sender, startTimeMs) {
42
+ return __awaiter(this, void 0, void 0, function () {
43
+ var senderFilter, result, txHistory, nextPage;
44
+ return __generator(this, function (_a) {
45
+ switch (_a.label) {
46
+ case 0:
47
+ senderFilter = {
48
+ Sender: sender,
49
+ };
50
+ return [4 /*yield*/, provider.queryEvents({ query: senderFilter, order: "descending" })];
51
+ case 1:
52
+ result = _a.sent();
53
+ return [4 /*yield*/, parseTxHistory(result.data, originPackage, vaults)];
54
+ case 2:
55
+ txHistory = _a.sent();
56
+ _a.label = 3;
57
+ case 3:
58
+ if (!result.hasNextPage) return [3 /*break*/, 6];
59
+ return [4 /*yield*/, provider.queryEvents({ query: senderFilter, cursor: result.nextCursor })];
60
+ case 4:
61
+ result = _a.sent();
62
+ return [4 /*yield*/, parseTxHistory(result.data, originPackage, vaults)];
63
+ case 5:
64
+ nextPage = _a.sent();
65
+ txHistory = txHistory.concat(nextPage);
66
+ if (result.hasNextPage && Number(result.data[24].timestampMs) < startTimeMs) {
67
+ return [3 /*break*/, 6];
68
+ }
69
+ return [3 /*break*/, 3];
70
+ case 6: return [2 /*return*/, txHistory];
71
+ }
72
+ });
73
+ });
74
+ }
75
+ exports.getUserHistory = getUserHistory;
76
+ function parseTxHistory(datas, originPackage, vaults) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var _this = this;
79
+ return __generator(this, function (_a) {
80
+ switch (_a.label) {
81
+ case 0: return [4 /*yield*/, datas
82
+ .filter(function (event) {
83
+ var type = event.type;
84
+ return type.startsWith(originPackage) || type.includes("typus_nft::First");
85
+ })
86
+ .reduce(function (promise, event) { return __awaiter(_this, void 0, void 0, function () {
87
+ var txHistory, functionType, action, Action, Amount, Vault, RiskLevel, Tails, Exp, v, period, optionType, i, i, token, amount;
88
+ var _a;
89
+ return __generator(this, function (_b) {
90
+ switch (_b.label) {
91
+ case 0: return [4 /*yield*/, promise];
92
+ case 1:
93
+ txHistory = _b.sent();
94
+ functionType = (_a = new RegExp("^([^::]+)::([^::]+)::([^<]+)").exec(event.type)) === null || _a === void 0 ? void 0 : _a.slice(1, 4);
95
+ action = functionType[2];
96
+ if (event.parsedJson.index) {
97
+ v = vaults[event.parsedJson.index];
98
+ period = void 0;
99
+ switch (v.info.period) {
100
+ case "0":
101
+ period = "Daily";
102
+ break;
103
+ case "1":
104
+ period = "Weekly";
105
+ break;
106
+ case "2":
107
+ period = "Monthly";
108
+ break;
109
+ default:
110
+ period = "";
111
+ break;
112
+ }
113
+ optionType = void 0;
114
+ switch (v.info.optionType) {
115
+ case "0":
116
+ optionType = "Call";
117
+ break;
118
+ case "1":
119
+ optionType = "Put";
120
+ break;
121
+ default:
122
+ optionType = "";
123
+ break;
124
+ }
125
+ switch (v.config.riskLevel) {
126
+ case "1":
127
+ RiskLevel = "Conservative";
128
+ break;
129
+ case "2":
130
+ RiskLevel = "Moderate";
131
+ break;
132
+ case "3":
133
+ RiskLevel = "Aggressive";
134
+ break;
135
+ default:
136
+ RiskLevel = "";
137
+ break;
138
+ }
139
+ Vault = "".concat(v.info.settlementBaseName, " ").concat(period, " ").concat(optionType);
140
+ }
141
+ switch (action) {
142
+ case "StakeNftEvent":
143
+ Action = "Stake";
144
+ Amount = "0.05 SUI";
145
+ Tails = "#".concat(event.parsedJson.number);
146
+ break;
147
+ case "UnstakeNftEvent":
148
+ Action = "Unstake";
149
+ Tails = "#".concat(event.parsedJson.number);
150
+ break;
151
+ case "SnapshotNftEvent":
152
+ i = txHistory.findIndex(function (x) { return x.txDigest == event.id.txDigest; });
153
+ if (i == -1) {
154
+ Action = "Collect EXP";
155
+ Tails = "#".concat(event.parsedJson.number);
156
+ Exp = event.parsedJson.exp_earn;
157
+ }
158
+ else {
159
+ txHistory[i].Exp = event.parsedJson.exp_earn;
160
+ txHistory[i].Tails = "#".concat(event.parsedJson.number);
161
+ return [2 /*return*/, txHistory];
162
+ }
163
+ break;
164
+ case "TransferNftEvent":
165
+ Action = "Transfer";
166
+ Amount = "0.01 SUI";
167
+ Tails = "#".concat(event.parsedJson.number);
168
+ break;
169
+ case "DailyAttendEvent":
170
+ Action = "Check In";
171
+ Tails = "#".concat(event.parsedJson.number);
172
+ Exp = "10";
173
+ break;
174
+ case "FirstDepositEvent":
175
+ Action = "First Deposit";
176
+ Tails = "#".concat(event.parsedJson.number);
177
+ Exp = event.parsedJson.exp_earn;
178
+ break;
179
+ case "FirstBidEvent":
180
+ Action = "First Bid";
181
+ Tails = "#".concat(event.parsedJson.number);
182
+ Exp = event.parsedJson.exp_earn;
183
+ break;
184
+ case "LevelUpEvent":
185
+ Action = "Level Up to Level ".concat(event.parsedJson.level);
186
+ Tails = "#".concat(event.parsedJson.number);
187
+ break;
188
+ case "DepositEvent":
189
+ case "WithdrawEvent":
190
+ case "UnsubscribeEvent":
191
+ case "ClaimEvent":
192
+ case "HarvestEvent":
193
+ i = txHistory.findIndex(function (x) { return x.txDigest == event.id.txDigest; });
194
+ token = (0, token_1.typeArgsToAssets)(["0x" + event.parsedJson.token.name])[0];
195
+ amount = Number(event.parsedJson.amount) / Math.pow(10, Number(event.parsedJson.decimal));
196
+ Action = action.slice(0, action.length - 5);
197
+ Amount = "".concat(amount, " ").concat(token);
198
+ if (i != -1) {
199
+ txHistory[i].Action = Action;
200
+ txHistory[i].Amount = Amount;
201
+ txHistory[i].Vault = Vault;
202
+ txHistory[i].RiskLevel = RiskLevel;
203
+ return [2 /*return*/, txHistory];
204
+ }
205
+ break;
206
+ default:
207
+ return [2 /*return*/, txHistory];
208
+ }
209
+ txHistory.push({
210
+ Action: Action,
211
+ Amount: Amount,
212
+ Vault: Vault,
213
+ RiskLevel: RiskLevel,
214
+ Tails: Tails,
215
+ Exp: Exp,
216
+ Date: new Date(Number(event.timestampMs)),
217
+ txDigest: event.id.txDigest,
218
+ });
219
+ return [2 /*return*/, txHistory];
220
+ }
221
+ });
222
+ }); }, Promise.resolve(new Array()))];
223
+ case 1: return [2 /*return*/, _a.sent()];
224
+ }
225
+ });
226
+ });
227
+ }
@@ -129,7 +129,7 @@ export interface DepositVault {
129
129
  u64Padding: string[];
130
130
  bcsPadding: string[];
131
131
  }
132
- export declare function getVaults(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[]): Promise<{
132
+ export declare function getVaults(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[], sender?: string): Promise<{
133
133
  [key: string]: Vault;
134
134
  }>;
135
135
  export interface Auction {
@@ -150,7 +150,7 @@ export interface Auction {
150
150
  ableToRemoveBid: boolean;
151
151
  bidIndex: string;
152
152
  }
153
- export declare function getAuctions(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[]): Promise<{
153
+ export declare function getAuctions(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[], sender?: string): Promise<{
154
154
  [key: string]: Auction;
155
155
  }>;
156
156
  export interface Bid {
@@ -163,7 +163,7 @@ export interface Bid {
163
163
  feeDiscount: string;
164
164
  tsMs: string;
165
165
  }
166
- export declare function getAuctionBids(provider: JsonRpcProvider, packageId: string, registry: string, index: string): Promise<Bid[]>;
166
+ export declare function getAuctionBids(provider: JsonRpcProvider, packageId: string, registry: string, index: string, sender?: string): Promise<Bid[]>;
167
167
  export interface DepositShare {
168
168
  index: string;
169
169
  activeSubVaultUserShare: string;
@@ -173,7 +173,7 @@ export interface DepositShare {
173
173
  premiumSubVaultUserShare: string;
174
174
  performanceFeeSubVaultUserShare: string;
175
175
  }
176
- export declare function getDepositShares(provider: JsonRpcProvider, typusFrameworkPackageId: string, packageId: string, registry: string, receipts: string[]): Promise<{
176
+ export declare function getDepositShares(provider: JsonRpcProvider, typusFrameworkPackageId: string, packageId: string, registry: string, receipts: string[], sender?: string): Promise<{
177
177
  [key: string]: DepositShare;
178
178
  }>;
179
179
  export interface BidVault {
@@ -191,9 +191,9 @@ export interface BidShare {
191
191
  bidVault: BidVault;
192
192
  share: string;
193
193
  }
194
- export declare function getMyBids(provider: JsonRpcProvider, typusFrameworkPackageId: string, packageId: string, registry: string, receipts: string[]): Promise<{
194
+ export declare function getMyBids(provider: JsonRpcProvider, typusFrameworkPackageId: string, packageId: string, registry: string, receipts: string[], sender?: string): Promise<{
195
195
  [key: string]: BidShare;
196
196
  }>;
197
- export declare function getRefundShares(provider: JsonRpcProvider, packageId: string, registry: string, user: string, typeArguments: string[]): Promise<{
197
+ export declare function getRefundShares(provider: JsonRpcProvider, packageId: string, registry: string, typeArguments: string[], sender?: string): Promise<{
198
198
  [key: string]: string;
199
199
  }>;
@@ -57,7 +57,8 @@ var sui_js_1 = require("@mysten/sui.js");
57
57
  var bcs_1 = require("@mysten/bcs");
58
58
  var tools_1 = require("../tools");
59
59
  exports.SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
60
- function getVaults(provider, packageId, registry, indexes) {
60
+ function getVaults(provider, packageId, registry, indexes, sender) {
61
+ if (sender === void 0) { sender = exports.SENDER; }
61
62
  return __awaiter(this, void 0, void 0, function () {
62
63
  var transactionBlock, target, transactionBlockArguments, results, bytes, reader, result;
63
64
  return __generator(this, function (_a) {
@@ -71,7 +72,7 @@ function getVaults(provider, packageId, registry, indexes) {
71
72
  typeArguments: [],
72
73
  arguments: transactionBlockArguments,
73
74
  });
74
- return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: exports.SENDER })];
75
+ return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: sender })];
75
76
  case 1:
76
77
  results = (_a.sent()).results;
77
78
  bytes = results[results.length - 1].returnValues[0][0];
@@ -288,7 +289,8 @@ function getVaults(provider, packageId, registry, indexes) {
288
289
  });
289
290
  }
290
291
  exports.getVaults = getVaults;
291
- function getAuctions(provider, packageId, registry, indexes) {
292
+ function getAuctions(provider, packageId, registry, indexes, sender) {
293
+ if (sender === void 0) { sender = exports.SENDER; }
292
294
  return __awaiter(this, void 0, void 0, function () {
293
295
  var transactionBlock, target, transactionBlockArguments, results, bytes, reader, result;
294
296
  return __generator(this, function (_a) {
@@ -302,7 +304,7 @@ function getAuctions(provider, packageId, registry, indexes) {
302
304
  typeArguments: [],
303
305
  arguments: transactionBlockArguments,
304
306
  });
305
- return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: exports.SENDER })];
307
+ return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: sender })];
306
308
  case 1:
307
309
  results = (_a.sent()).results;
308
310
  bytes = results[results.length - 1].returnValues[0][0];
@@ -356,7 +358,8 @@ function getAuctions(provider, packageId, registry, indexes) {
356
358
  });
357
359
  }
358
360
  exports.getAuctions = getAuctions;
359
- function getAuctionBids(provider, packageId, registry, index) {
361
+ function getAuctionBids(provider, packageId, registry, index, sender) {
362
+ if (sender === void 0) { sender = exports.SENDER; }
360
363
  return __awaiter(this, void 0, void 0, function () {
361
364
  var transactionBlock, target, transactionBlockArguments, results, bytes, reader, result;
362
365
  return __generator(this, function (_a) {
@@ -370,7 +373,7 @@ function getAuctionBids(provider, packageId, registry, index) {
370
373
  typeArguments: [],
371
374
  arguments: transactionBlockArguments,
372
375
  });
373
- return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: exports.SENDER })];
376
+ return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: sender })];
374
377
  case 1:
375
378
  results = (_a.sent()).results;
376
379
  bytes = results[results.length - 1].returnValues[0][0];
@@ -395,7 +398,8 @@ function getAuctionBids(provider, packageId, registry, index) {
395
398
  });
396
399
  }
397
400
  exports.getAuctionBids = getAuctionBids;
398
- function getDepositShares(provider, typusFrameworkPackageId, packageId, registry, receipts) {
401
+ function getDepositShares(provider, typusFrameworkPackageId, packageId, registry, receipts, sender) {
402
+ if (sender === void 0) { sender = exports.SENDER; }
399
403
  return __awaiter(this, void 0, void 0, function () {
400
404
  var transactionBlock, target, transactionBlockArguments, results, bytes, reader, result;
401
405
  return __generator(this, function (_a) {
@@ -415,7 +419,7 @@ function getDepositShares(provider, typusFrameworkPackageId, packageId, registry
415
419
  typeArguments: [],
416
420
  arguments: transactionBlockArguments,
417
421
  });
418
- return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: exports.SENDER })];
422
+ return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: sender })];
419
423
  case 1:
420
424
  results = (_a.sent()).results;
421
425
  bytes = results[results.length - 1].returnValues[0][0];
@@ -451,7 +455,8 @@ function getDepositShares(provider, typusFrameworkPackageId, packageId, registry
451
455
  });
452
456
  }
453
457
  exports.getDepositShares = getDepositShares;
454
- function getMyBids(provider, typusFrameworkPackageId, packageId, registry, receipts) {
458
+ function getMyBids(provider, typusFrameworkPackageId, packageId, registry, receipts, sender) {
459
+ if (sender === void 0) { sender = exports.SENDER; }
455
460
  return __awaiter(this, void 0, void 0, function () {
456
461
  var transactionBlock, target, transactionBlockArguments, results, bytes, reader, result;
457
462
  return __generator(this, function (_a) {
@@ -471,7 +476,7 @@ function getMyBids(provider, typusFrameworkPackageId, packageId, registry, recei
471
476
  typeArguments: [],
472
477
  arguments: transactionBlockArguments,
473
478
  });
474
- return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: exports.SENDER })];
479
+ return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: sender })];
475
480
  case 1:
476
481
  results = (_a.sent()).results;
477
482
  bytes = results[results.length - 1].returnValues[0][0];
@@ -514,7 +519,8 @@ function getMyBids(provider, typusFrameworkPackageId, packageId, registry, recei
514
519
  });
515
520
  }
516
521
  exports.getMyBids = getMyBids;
517
- function getRefundShares(provider, packageId, registry, user, typeArguments) {
522
+ function getRefundShares(provider, packageId, registry, typeArguments, sender) {
523
+ if (sender === void 0) { sender = exports.SENDER; }
518
524
  return __awaiter(this, void 0, void 0, function () {
519
525
  var transactionBlock, target, transactionBlockArguments, results, refundShares;
520
526
  return __generator(this, function (_a) {
@@ -532,7 +538,7 @@ function getRefundShares(provider, packageId, registry, user, typeArguments) {
532
538
  });
533
539
  return [4 /*yield*/, provider.devInspectTransactionBlock({
534
540
  transactionBlock: transactionBlock,
535
- sender: user,
541
+ sender: sender,
536
542
  })];
537
543
  case 1:
538
544
  results = (_a.sent()).results;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.1.5",
5
+ "version": "1.1.6",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "^0.3.3",