@nightlylabs/dex-sdk 0.0.53 → 0.0.54
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/index.cjs +47 -22
- package/dist/index.d.cts +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +47 -22
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ var import_uuid = require("uuid");
|
|
|
65
65
|
|
|
66
66
|
// generated_types/addApiKey.ts
|
|
67
67
|
var ABI = {
|
|
68
|
-
"address": "
|
|
68
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
69
69
|
"name": "add_api_key",
|
|
70
70
|
"friends": [],
|
|
71
71
|
"exposed_functions": [
|
|
@@ -90,7 +90,7 @@ var addApiKey_default = ABI;
|
|
|
90
90
|
|
|
91
91
|
// generated_types/cancelAllPerpOrders.ts
|
|
92
92
|
var ABI2 = {
|
|
93
|
-
"address": "
|
|
93
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
94
94
|
"name": "cancel_all_perp_orders",
|
|
95
95
|
"friends": [],
|
|
96
96
|
"exposed_functions": [
|
|
@@ -113,7 +113,7 @@ var cancelAllPerpOrders_default = ABI2;
|
|
|
113
113
|
|
|
114
114
|
// generated_types/cancelPerpOrders.ts
|
|
115
115
|
var ABI3 = {
|
|
116
|
-
"address": "
|
|
116
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
117
117
|
"name": "cancel_perp_orders",
|
|
118
118
|
"friends": [],
|
|
119
119
|
"exposed_functions": [
|
|
@@ -138,7 +138,7 @@ var cancelPerpOrders_default = ABI3;
|
|
|
138
138
|
|
|
139
139
|
// generated_types/createUser.ts
|
|
140
140
|
var ABI4 = {
|
|
141
|
-
"address": "
|
|
141
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
142
142
|
"name": "create_user",
|
|
143
143
|
"friends": [],
|
|
144
144
|
"exposed_functions": [
|
|
@@ -163,7 +163,7 @@ var createUser_default = ABI4;
|
|
|
163
163
|
|
|
164
164
|
// generated_types/depositToVault.ts
|
|
165
165
|
var ABI5 = {
|
|
166
|
-
"address": "
|
|
166
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
167
167
|
"name": "deposit_to_vault",
|
|
168
168
|
"friends": [],
|
|
169
169
|
"exposed_functions": [
|
|
@@ -188,7 +188,7 @@ var depositToVault_default = ABI5;
|
|
|
188
188
|
|
|
189
189
|
// generated_types/depositToken.ts
|
|
190
190
|
var ABI6 = {
|
|
191
|
-
"address": "
|
|
191
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
192
192
|
"name": "deposit_token",
|
|
193
193
|
"friends": [],
|
|
194
194
|
"exposed_functions": [
|
|
@@ -213,7 +213,7 @@ var depositToken_default = ABI6;
|
|
|
213
213
|
|
|
214
214
|
// generated_types/lendToken.ts
|
|
215
215
|
var ABI7 = {
|
|
216
|
-
"address": "
|
|
216
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
217
217
|
"name": "lend_token",
|
|
218
218
|
"friends": [],
|
|
219
219
|
"exposed_functions": [
|
|
@@ -239,7 +239,7 @@ var lendToken_default = ABI7;
|
|
|
239
239
|
|
|
240
240
|
// generated_types/placePerpLimitOrder.ts
|
|
241
241
|
var ABI8 = {
|
|
242
|
-
"address": "
|
|
242
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
243
243
|
"name": "place_perp_limit_order",
|
|
244
244
|
"friends": [],
|
|
245
245
|
"exposed_functions": [
|
|
@@ -268,7 +268,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
268
268
|
|
|
269
269
|
// generated_types/changePerpOrderPrice.ts
|
|
270
270
|
var ABI9 = {
|
|
271
|
-
"address": "
|
|
271
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
272
272
|
"name": "change_perp_order_price",
|
|
273
273
|
"friends": [],
|
|
274
274
|
"exposed_functions": [
|
|
@@ -295,7 +295,7 @@ var changePerpOrderPrice_default = ABI9;
|
|
|
295
295
|
|
|
296
296
|
// generated_types/placePerpMarketOrder.ts
|
|
297
297
|
var ABI10 = {
|
|
298
|
-
"address": "
|
|
298
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
299
299
|
"name": "place_perp_market_order",
|
|
300
300
|
"friends": [],
|
|
301
301
|
"exposed_functions": [
|
|
@@ -323,7 +323,7 @@ var placePerpMarketOrder_default = ABI10;
|
|
|
323
323
|
|
|
324
324
|
// generated_types/redeemToken.ts
|
|
325
325
|
var ABI11 = {
|
|
326
|
-
"address": "
|
|
326
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
327
327
|
"name": "redeem_token",
|
|
328
328
|
"friends": [],
|
|
329
329
|
"exposed_functions": [
|
|
@@ -349,7 +349,7 @@ var redeemToken_default = ABI11;
|
|
|
349
349
|
|
|
350
350
|
// generated_types/removeApiKey.ts
|
|
351
351
|
var ABI12 = {
|
|
352
|
-
"address": "
|
|
352
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
353
353
|
"name": "remove_api_key",
|
|
354
354
|
"friends": [],
|
|
355
355
|
"exposed_functions": [
|
|
@@ -373,7 +373,7 @@ var removeApiKey_default = ABI12;
|
|
|
373
373
|
|
|
374
374
|
// generated_types/setAliasName.ts
|
|
375
375
|
var ABI13 = {
|
|
376
|
-
"address": "
|
|
376
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
377
377
|
"name": "set_alias_name",
|
|
378
378
|
"friends": [],
|
|
379
379
|
"exposed_functions": [
|
|
@@ -397,7 +397,7 @@ var setAliasName_default = ABI13;
|
|
|
397
397
|
|
|
398
398
|
// generated_types/setAutolend.ts
|
|
399
399
|
var ABI14 = {
|
|
400
|
-
"address": "
|
|
400
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
401
401
|
"name": "set_autolend",
|
|
402
402
|
"friends": [],
|
|
403
403
|
"exposed_functions": [
|
|
@@ -500,7 +500,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
500
500
|
|
|
501
501
|
// generated_types/withdrawFromVault.ts
|
|
502
502
|
var ABI15 = {
|
|
503
|
-
"address": "
|
|
503
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
504
504
|
"name": "withdraw_from_vault",
|
|
505
505
|
"friends": [],
|
|
506
506
|
"exposed_functions": [
|
|
@@ -571,6 +571,10 @@ var getTopicFromCommand = (data) => {
|
|
|
571
571
|
return "OracleUpdates";
|
|
572
572
|
case "UnsubscribeOracle":
|
|
573
573
|
return "OracleUpdates";
|
|
574
|
+
case "SubscribeBorrowLend":
|
|
575
|
+
return "BorrowLendUpdate";
|
|
576
|
+
case "UnsubscribeBorrowLend":
|
|
577
|
+
return "BorrowLendUpdate";
|
|
574
578
|
}
|
|
575
579
|
};
|
|
576
580
|
var getTopicFromMessage = (data) => {
|
|
@@ -607,7 +611,7 @@ var getTopicFromMessage = (data) => {
|
|
|
607
611
|
return data.content.userId;
|
|
608
612
|
case "OrderFills":
|
|
609
613
|
return data.content.userId;
|
|
610
|
-
case "
|
|
614
|
+
case "SetAutoLend":
|
|
611
615
|
return data.content.userId;
|
|
612
616
|
case "SetAlias":
|
|
613
617
|
return data.content.userId;
|
|
@@ -617,6 +621,8 @@ var getTopicFromMessage = (data) => {
|
|
|
617
621
|
return data.content.userId;
|
|
618
622
|
case "FundingPayment":
|
|
619
623
|
return data.content.userId;
|
|
624
|
+
case "BorrowLendUpdate":
|
|
625
|
+
return data.type;
|
|
620
626
|
}
|
|
621
627
|
};
|
|
622
628
|
|
|
@@ -1114,7 +1120,26 @@ var Client = class _Client {
|
|
|
1114
1120
|
}
|
|
1115
1121
|
async unsubscribeIndexPricesUpdates() {
|
|
1116
1122
|
const command = {
|
|
1117
|
-
type: "
|
|
1123
|
+
type: "UnsubscribeOracle",
|
|
1124
|
+
content: { id: getRandomId() }
|
|
1125
|
+
};
|
|
1126
|
+
await this.sendWsMessage(command);
|
|
1127
|
+
const topic = getTopicFromCommand(command);
|
|
1128
|
+
this._subscriptions.delete(topic);
|
|
1129
|
+
}
|
|
1130
|
+
async subscribeBorrowLendingUpdates(callback) {
|
|
1131
|
+
const command = {
|
|
1132
|
+
type: "SubscribeBorrowLend",
|
|
1133
|
+
content: { id: getRandomId() }
|
|
1134
|
+
};
|
|
1135
|
+
await this.sendWsMessage(command);
|
|
1136
|
+
const topic = getTopicFromCommand(command);
|
|
1137
|
+
this._subscriptions.set(topic, callback);
|
|
1138
|
+
return this.unsubscribeIndexPricesUpdates;
|
|
1139
|
+
}
|
|
1140
|
+
async unsubscribeBorrowLendingUpdates() {
|
|
1141
|
+
const command = {
|
|
1142
|
+
type: "UnsubscribeBorrowLend",
|
|
1118
1143
|
content: { id: getRandomId() }
|
|
1119
1144
|
};
|
|
1120
1145
|
await this.sendWsMessage(command);
|
|
@@ -1623,7 +1648,7 @@ var import_surf2 = require("@thalalabs/surf");
|
|
|
1623
1648
|
|
|
1624
1649
|
// generated_types/faucetEntrypoints.ts
|
|
1625
1650
|
var ABI16 = {
|
|
1626
|
-
"address": "
|
|
1651
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
1627
1652
|
"name": "faucet_entrypoints",
|
|
1628
1653
|
"friends": [],
|
|
1629
1654
|
"exposed_functions": [
|
|
@@ -1658,7 +1683,7 @@ var faucetEntrypoints_default = ABI16;
|
|
|
1658
1683
|
|
|
1659
1684
|
// generated_types/testFaucet.ts
|
|
1660
1685
|
var ABI17 = {
|
|
1661
|
-
"address": "
|
|
1686
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
1662
1687
|
"name": "test_faucet",
|
|
1663
1688
|
"friends": [],
|
|
1664
1689
|
"exposed_functions": [
|
|
@@ -1695,7 +1720,7 @@ var ABI17 = {
|
|
|
1695
1720
|
],
|
|
1696
1721
|
"return": [
|
|
1697
1722
|
"0x1::object::ConstructorRef",
|
|
1698
|
-
"0x1::object::Object<
|
|
1723
|
+
"0x1::object::Object<0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502::test_faucet::Token>"
|
|
1699
1724
|
]
|
|
1700
1725
|
},
|
|
1701
1726
|
{
|
|
@@ -1834,7 +1859,7 @@ var ABI17 = {
|
|
|
1834
1859
|
"0x1::object::Object<0x1::fungible_asset::Metadata>"
|
|
1835
1860
|
],
|
|
1836
1861
|
"return": [
|
|
1837
|
-
"
|
|
1862
|
+
"0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502::test_faucet::FaucetToken"
|
|
1838
1863
|
]
|
|
1839
1864
|
}
|
|
1840
1865
|
],
|
|
@@ -1866,7 +1891,7 @@ var ABI17 = {
|
|
|
1866
1891
|
"fields": [
|
|
1867
1892
|
{
|
|
1868
1893
|
"name": "tokens",
|
|
1869
|
-
"type": "0x1::smart_table::SmartTable<vector<u8>,
|
|
1894
|
+
"type": "0x1::smart_table::SmartTable<vector<u8>, 0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502::test_faucet::FaucetToken>"
|
|
1870
1895
|
}
|
|
1871
1896
|
]
|
|
1872
1897
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -27,6 +27,13 @@ interface Borrow {
|
|
|
27
27
|
tokenAmount: string;
|
|
28
28
|
sharesReceived: string;
|
|
29
29
|
}
|
|
30
|
+
interface BorrowLendUpdate {
|
|
31
|
+
tokenAddress: string;
|
|
32
|
+
lendShares: string;
|
|
33
|
+
lendAmount: string;
|
|
34
|
+
borrowShares: string;
|
|
35
|
+
borrowAmount: string;
|
|
36
|
+
}
|
|
30
37
|
interface UtilizationCurve {
|
|
31
38
|
base: string;
|
|
32
39
|
multiplier: string;
|
|
@@ -392,7 +399,7 @@ interface HistoricalWithdraw {
|
|
|
392
399
|
timestamp: string;
|
|
393
400
|
}
|
|
394
401
|
interface GetUserWithdrawalsResponse {
|
|
395
|
-
|
|
402
|
+
withdrawals: HistoricalWithdraw[];
|
|
396
403
|
paginationCursor?: PaginationCursor;
|
|
397
404
|
}
|
|
398
405
|
interface GetUsersByAddressRequest {
|
|
@@ -477,7 +484,7 @@ interface SetAlias {
|
|
|
477
484
|
userId: string;
|
|
478
485
|
newAlias: string;
|
|
479
486
|
}
|
|
480
|
-
interface
|
|
487
|
+
interface SetAutoLend {
|
|
481
488
|
userId: string;
|
|
482
489
|
enabled: boolean;
|
|
483
490
|
}
|
|
@@ -562,6 +569,9 @@ type Topic = {
|
|
|
562
569
|
} | {
|
|
563
570
|
type: "Oracle";
|
|
564
571
|
content?: undefined;
|
|
572
|
+
} | {
|
|
573
|
+
type: "BorrowLend";
|
|
574
|
+
content?: undefined;
|
|
565
575
|
};
|
|
566
576
|
declare enum UserStatus {
|
|
567
577
|
Active = "Active",
|
|
@@ -601,6 +611,16 @@ type WsCommand = {
|
|
|
601
611
|
content: {
|
|
602
612
|
id: string;
|
|
603
613
|
};
|
|
614
|
+
} | {
|
|
615
|
+
type: "SubscribeBorrowLend";
|
|
616
|
+
content: {
|
|
617
|
+
id: string;
|
|
618
|
+
};
|
|
619
|
+
} | {
|
|
620
|
+
type: "UnsubscribeBorrowLend";
|
|
621
|
+
content: {
|
|
622
|
+
id: string;
|
|
623
|
+
};
|
|
604
624
|
};
|
|
605
625
|
type WsMessage = {
|
|
606
626
|
type: "Ack";
|
|
@@ -656,8 +676,8 @@ type WsMessage = {
|
|
|
656
676
|
type: "OrderFills";
|
|
657
677
|
content: OrderFills;
|
|
658
678
|
} | {
|
|
659
|
-
type: "
|
|
660
|
-
content:
|
|
679
|
+
type: "SetAutoLend";
|
|
680
|
+
content: SetAutoLend;
|
|
661
681
|
} | {
|
|
662
682
|
type: "SetAlias";
|
|
663
683
|
content: SetAlias;
|
|
@@ -670,6 +690,9 @@ type WsMessage = {
|
|
|
670
690
|
} | {
|
|
671
691
|
type: "FundingPayment";
|
|
672
692
|
content: FundingPayment;
|
|
693
|
+
} | {
|
|
694
|
+
type: "BorrowLendUpdate";
|
|
695
|
+
content: BorrowLendUpdate;
|
|
673
696
|
};
|
|
674
697
|
|
|
675
698
|
type Address = `0x${string}`;
|
|
@@ -791,6 +814,8 @@ declare class Client {
|
|
|
791
814
|
}>;
|
|
792
815
|
subscribeIndexPricesUpdates(callback: (data: WsOracleUpdates) => void): Promise<() => Promise<void>>;
|
|
793
816
|
unsubscribeIndexPricesUpdates(): Promise<void>;
|
|
817
|
+
subscribeBorrowLendingUpdates(callback: (data: WsBorrowLendUpdate) => void): Promise<() => Promise<void>>;
|
|
818
|
+
unsubscribeBorrowLendingUpdates(): Promise<void>;
|
|
794
819
|
subscribeUserUpdates(userId: string, callback: (data: WsUserUpdates) => void): Promise<() => Promise<void>>;
|
|
795
820
|
unsubscribeUserUpdates(userId: string): Promise<void>;
|
|
796
821
|
subscribePerpMarketUpdates(market: string, callback: (data: WsPerpMarketUpdates) => void): Promise<() => Promise<void>>;
|
|
@@ -931,6 +956,9 @@ type WsUserUpdates = Extract<WsMessage, {
|
|
|
931
956
|
type WsPerpMarketUpdates = Extract<WsMessage, {
|
|
932
957
|
type: 'OrderbookUpdate' | 'TradesUpdate';
|
|
933
958
|
}>;
|
|
959
|
+
type WsBorrowLendUpdate = Extract<WsMessage, {
|
|
960
|
+
type: 'BorrowLendUpdate';
|
|
961
|
+
}>;
|
|
934
962
|
|
|
935
963
|
declare function parseEntryFunctionAbi(args: {
|
|
936
964
|
moduleAbi: MoveModule;
|
|
@@ -961,4 +989,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
961
989
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
962
990
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
963
991
|
|
|
964
|
-
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, PerpetualMarketStatus, type PlacePerpLimitOrder, type PlacePerpLimitOrderParams, type PlacePerpMarketOrder, type PlacePerpMarketOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type RemoveApiKey, type RemoveApiKeyParams, type RepayBorrow, type SetAlias, type SetAliasNameParams, type
|
|
992
|
+
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, PerpetualMarketStatus, type PlacePerpLimitOrder, type PlacePerpLimitOrderParams, type PlacePerpMarketOrder, type PlacePerpMarketOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type RemoveApiKey, type RemoveApiKeyParams, type RepayBorrow, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, Status, type StatusResponse, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenConfigEntry, type Topic, type Trade, TradeRole, type TradesUpdate, type User, type UserPortfolioValue, UserStatus, type UtilizationCurve, type Vault, type VaultInvestment, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,13 @@ interface Borrow {
|
|
|
27
27
|
tokenAmount: string;
|
|
28
28
|
sharesReceived: string;
|
|
29
29
|
}
|
|
30
|
+
interface BorrowLendUpdate {
|
|
31
|
+
tokenAddress: string;
|
|
32
|
+
lendShares: string;
|
|
33
|
+
lendAmount: string;
|
|
34
|
+
borrowShares: string;
|
|
35
|
+
borrowAmount: string;
|
|
36
|
+
}
|
|
30
37
|
interface UtilizationCurve {
|
|
31
38
|
base: string;
|
|
32
39
|
multiplier: string;
|
|
@@ -392,7 +399,7 @@ interface HistoricalWithdraw {
|
|
|
392
399
|
timestamp: string;
|
|
393
400
|
}
|
|
394
401
|
interface GetUserWithdrawalsResponse {
|
|
395
|
-
|
|
402
|
+
withdrawals: HistoricalWithdraw[];
|
|
396
403
|
paginationCursor?: PaginationCursor;
|
|
397
404
|
}
|
|
398
405
|
interface GetUsersByAddressRequest {
|
|
@@ -477,7 +484,7 @@ interface SetAlias {
|
|
|
477
484
|
userId: string;
|
|
478
485
|
newAlias: string;
|
|
479
486
|
}
|
|
480
|
-
interface
|
|
487
|
+
interface SetAutoLend {
|
|
481
488
|
userId: string;
|
|
482
489
|
enabled: boolean;
|
|
483
490
|
}
|
|
@@ -562,6 +569,9 @@ type Topic = {
|
|
|
562
569
|
} | {
|
|
563
570
|
type: "Oracle";
|
|
564
571
|
content?: undefined;
|
|
572
|
+
} | {
|
|
573
|
+
type: "BorrowLend";
|
|
574
|
+
content?: undefined;
|
|
565
575
|
};
|
|
566
576
|
declare enum UserStatus {
|
|
567
577
|
Active = "Active",
|
|
@@ -601,6 +611,16 @@ type WsCommand = {
|
|
|
601
611
|
content: {
|
|
602
612
|
id: string;
|
|
603
613
|
};
|
|
614
|
+
} | {
|
|
615
|
+
type: "SubscribeBorrowLend";
|
|
616
|
+
content: {
|
|
617
|
+
id: string;
|
|
618
|
+
};
|
|
619
|
+
} | {
|
|
620
|
+
type: "UnsubscribeBorrowLend";
|
|
621
|
+
content: {
|
|
622
|
+
id: string;
|
|
623
|
+
};
|
|
604
624
|
};
|
|
605
625
|
type WsMessage = {
|
|
606
626
|
type: "Ack";
|
|
@@ -656,8 +676,8 @@ type WsMessage = {
|
|
|
656
676
|
type: "OrderFills";
|
|
657
677
|
content: OrderFills;
|
|
658
678
|
} | {
|
|
659
|
-
type: "
|
|
660
|
-
content:
|
|
679
|
+
type: "SetAutoLend";
|
|
680
|
+
content: SetAutoLend;
|
|
661
681
|
} | {
|
|
662
682
|
type: "SetAlias";
|
|
663
683
|
content: SetAlias;
|
|
@@ -670,6 +690,9 @@ type WsMessage = {
|
|
|
670
690
|
} | {
|
|
671
691
|
type: "FundingPayment";
|
|
672
692
|
content: FundingPayment;
|
|
693
|
+
} | {
|
|
694
|
+
type: "BorrowLendUpdate";
|
|
695
|
+
content: BorrowLendUpdate;
|
|
673
696
|
};
|
|
674
697
|
|
|
675
698
|
type Address = `0x${string}`;
|
|
@@ -791,6 +814,8 @@ declare class Client {
|
|
|
791
814
|
}>;
|
|
792
815
|
subscribeIndexPricesUpdates(callback: (data: WsOracleUpdates) => void): Promise<() => Promise<void>>;
|
|
793
816
|
unsubscribeIndexPricesUpdates(): Promise<void>;
|
|
817
|
+
subscribeBorrowLendingUpdates(callback: (data: WsBorrowLendUpdate) => void): Promise<() => Promise<void>>;
|
|
818
|
+
unsubscribeBorrowLendingUpdates(): Promise<void>;
|
|
794
819
|
subscribeUserUpdates(userId: string, callback: (data: WsUserUpdates) => void): Promise<() => Promise<void>>;
|
|
795
820
|
unsubscribeUserUpdates(userId: string): Promise<void>;
|
|
796
821
|
subscribePerpMarketUpdates(market: string, callback: (data: WsPerpMarketUpdates) => void): Promise<() => Promise<void>>;
|
|
@@ -931,6 +956,9 @@ type WsUserUpdates = Extract<WsMessage, {
|
|
|
931
956
|
type WsPerpMarketUpdates = Extract<WsMessage, {
|
|
932
957
|
type: 'OrderbookUpdate' | 'TradesUpdate';
|
|
933
958
|
}>;
|
|
959
|
+
type WsBorrowLendUpdate = Extract<WsMessage, {
|
|
960
|
+
type: 'BorrowLendUpdate';
|
|
961
|
+
}>;
|
|
934
962
|
|
|
935
963
|
declare function parseEntryFunctionAbi(args: {
|
|
936
964
|
moduleAbi: MoveModule;
|
|
@@ -961,4 +989,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
961
989
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
962
990
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
963
991
|
|
|
964
|
-
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, PerpetualMarketStatus, type PlacePerpLimitOrder, type PlacePerpLimitOrderParams, type PlacePerpMarketOrder, type PlacePerpMarketOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type RemoveApiKey, type RemoveApiKeyParams, type RepayBorrow, type SetAlias, type SetAliasNameParams, type
|
|
992
|
+
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, PerpetualMarketStatus, type PlacePerpLimitOrder, type PlacePerpLimitOrderParams, type PlacePerpMarketOrder, type PlacePerpMarketOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type RemoveApiKey, type RemoveApiKeyParams, type RepayBorrow, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, Status, type StatusResponse, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenConfigEntry, type Topic, type Trade, TradeRole, type TradesUpdate, type User, type UserPortfolioValue, UserStatus, type UtilizationCurve, type Vault, type VaultInvestment, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
14
14
|
|
|
15
15
|
// generated_types/addApiKey.ts
|
|
16
16
|
var ABI = {
|
|
17
|
-
"address": "
|
|
17
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
18
18
|
"name": "add_api_key",
|
|
19
19
|
"friends": [],
|
|
20
20
|
"exposed_functions": [
|
|
@@ -39,7 +39,7 @@ var addApiKey_default = ABI;
|
|
|
39
39
|
|
|
40
40
|
// generated_types/cancelAllPerpOrders.ts
|
|
41
41
|
var ABI2 = {
|
|
42
|
-
"address": "
|
|
42
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
43
43
|
"name": "cancel_all_perp_orders",
|
|
44
44
|
"friends": [],
|
|
45
45
|
"exposed_functions": [
|
|
@@ -62,7 +62,7 @@ var cancelAllPerpOrders_default = ABI2;
|
|
|
62
62
|
|
|
63
63
|
// generated_types/cancelPerpOrders.ts
|
|
64
64
|
var ABI3 = {
|
|
65
|
-
"address": "
|
|
65
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
66
66
|
"name": "cancel_perp_orders",
|
|
67
67
|
"friends": [],
|
|
68
68
|
"exposed_functions": [
|
|
@@ -87,7 +87,7 @@ var cancelPerpOrders_default = ABI3;
|
|
|
87
87
|
|
|
88
88
|
// generated_types/createUser.ts
|
|
89
89
|
var ABI4 = {
|
|
90
|
-
"address": "
|
|
90
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
91
91
|
"name": "create_user",
|
|
92
92
|
"friends": [],
|
|
93
93
|
"exposed_functions": [
|
|
@@ -112,7 +112,7 @@ var createUser_default = ABI4;
|
|
|
112
112
|
|
|
113
113
|
// generated_types/depositToVault.ts
|
|
114
114
|
var ABI5 = {
|
|
115
|
-
"address": "
|
|
115
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
116
116
|
"name": "deposit_to_vault",
|
|
117
117
|
"friends": [],
|
|
118
118
|
"exposed_functions": [
|
|
@@ -137,7 +137,7 @@ var depositToVault_default = ABI5;
|
|
|
137
137
|
|
|
138
138
|
// generated_types/depositToken.ts
|
|
139
139
|
var ABI6 = {
|
|
140
|
-
"address": "
|
|
140
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
141
141
|
"name": "deposit_token",
|
|
142
142
|
"friends": [],
|
|
143
143
|
"exposed_functions": [
|
|
@@ -162,7 +162,7 @@ var depositToken_default = ABI6;
|
|
|
162
162
|
|
|
163
163
|
// generated_types/lendToken.ts
|
|
164
164
|
var ABI7 = {
|
|
165
|
-
"address": "
|
|
165
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
166
166
|
"name": "lend_token",
|
|
167
167
|
"friends": [],
|
|
168
168
|
"exposed_functions": [
|
|
@@ -188,7 +188,7 @@ var lendToken_default = ABI7;
|
|
|
188
188
|
|
|
189
189
|
// generated_types/placePerpLimitOrder.ts
|
|
190
190
|
var ABI8 = {
|
|
191
|
-
"address": "
|
|
191
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
192
192
|
"name": "place_perp_limit_order",
|
|
193
193
|
"friends": [],
|
|
194
194
|
"exposed_functions": [
|
|
@@ -217,7 +217,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
217
217
|
|
|
218
218
|
// generated_types/changePerpOrderPrice.ts
|
|
219
219
|
var ABI9 = {
|
|
220
|
-
"address": "
|
|
220
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
221
221
|
"name": "change_perp_order_price",
|
|
222
222
|
"friends": [],
|
|
223
223
|
"exposed_functions": [
|
|
@@ -244,7 +244,7 @@ var changePerpOrderPrice_default = ABI9;
|
|
|
244
244
|
|
|
245
245
|
// generated_types/placePerpMarketOrder.ts
|
|
246
246
|
var ABI10 = {
|
|
247
|
-
"address": "
|
|
247
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
248
248
|
"name": "place_perp_market_order",
|
|
249
249
|
"friends": [],
|
|
250
250
|
"exposed_functions": [
|
|
@@ -272,7 +272,7 @@ var placePerpMarketOrder_default = ABI10;
|
|
|
272
272
|
|
|
273
273
|
// generated_types/redeemToken.ts
|
|
274
274
|
var ABI11 = {
|
|
275
|
-
"address": "
|
|
275
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
276
276
|
"name": "redeem_token",
|
|
277
277
|
"friends": [],
|
|
278
278
|
"exposed_functions": [
|
|
@@ -298,7 +298,7 @@ var redeemToken_default = ABI11;
|
|
|
298
298
|
|
|
299
299
|
// generated_types/removeApiKey.ts
|
|
300
300
|
var ABI12 = {
|
|
301
|
-
"address": "
|
|
301
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
302
302
|
"name": "remove_api_key",
|
|
303
303
|
"friends": [],
|
|
304
304
|
"exposed_functions": [
|
|
@@ -322,7 +322,7 @@ var removeApiKey_default = ABI12;
|
|
|
322
322
|
|
|
323
323
|
// generated_types/setAliasName.ts
|
|
324
324
|
var ABI13 = {
|
|
325
|
-
"address": "
|
|
325
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
326
326
|
"name": "set_alias_name",
|
|
327
327
|
"friends": [],
|
|
328
328
|
"exposed_functions": [
|
|
@@ -346,7 +346,7 @@ var setAliasName_default = ABI13;
|
|
|
346
346
|
|
|
347
347
|
// generated_types/setAutolend.ts
|
|
348
348
|
var ABI14 = {
|
|
349
|
-
"address": "
|
|
349
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
350
350
|
"name": "set_autolend",
|
|
351
351
|
"friends": [],
|
|
352
352
|
"exposed_functions": [
|
|
@@ -449,7 +449,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
449
449
|
|
|
450
450
|
// generated_types/withdrawFromVault.ts
|
|
451
451
|
var ABI15 = {
|
|
452
|
-
"address": "
|
|
452
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
453
453
|
"name": "withdraw_from_vault",
|
|
454
454
|
"friends": [],
|
|
455
455
|
"exposed_functions": [
|
|
@@ -520,6 +520,10 @@ var getTopicFromCommand = (data) => {
|
|
|
520
520
|
return "OracleUpdates";
|
|
521
521
|
case "UnsubscribeOracle":
|
|
522
522
|
return "OracleUpdates";
|
|
523
|
+
case "SubscribeBorrowLend":
|
|
524
|
+
return "BorrowLendUpdate";
|
|
525
|
+
case "UnsubscribeBorrowLend":
|
|
526
|
+
return "BorrowLendUpdate";
|
|
523
527
|
}
|
|
524
528
|
};
|
|
525
529
|
var getTopicFromMessage = (data) => {
|
|
@@ -556,7 +560,7 @@ var getTopicFromMessage = (data) => {
|
|
|
556
560
|
return data.content.userId;
|
|
557
561
|
case "OrderFills":
|
|
558
562
|
return data.content.userId;
|
|
559
|
-
case "
|
|
563
|
+
case "SetAutoLend":
|
|
560
564
|
return data.content.userId;
|
|
561
565
|
case "SetAlias":
|
|
562
566
|
return data.content.userId;
|
|
@@ -566,6 +570,8 @@ var getTopicFromMessage = (data) => {
|
|
|
566
570
|
return data.content.userId;
|
|
567
571
|
case "FundingPayment":
|
|
568
572
|
return data.content.userId;
|
|
573
|
+
case "BorrowLendUpdate":
|
|
574
|
+
return data.type;
|
|
569
575
|
}
|
|
570
576
|
};
|
|
571
577
|
|
|
@@ -1063,7 +1069,26 @@ var Client = class _Client {
|
|
|
1063
1069
|
}
|
|
1064
1070
|
async unsubscribeIndexPricesUpdates() {
|
|
1065
1071
|
const command = {
|
|
1066
|
-
type: "
|
|
1072
|
+
type: "UnsubscribeOracle",
|
|
1073
|
+
content: { id: getRandomId() }
|
|
1074
|
+
};
|
|
1075
|
+
await this.sendWsMessage(command);
|
|
1076
|
+
const topic = getTopicFromCommand(command);
|
|
1077
|
+
this._subscriptions.delete(topic);
|
|
1078
|
+
}
|
|
1079
|
+
async subscribeBorrowLendingUpdates(callback) {
|
|
1080
|
+
const command = {
|
|
1081
|
+
type: "SubscribeBorrowLend",
|
|
1082
|
+
content: { id: getRandomId() }
|
|
1083
|
+
};
|
|
1084
|
+
await this.sendWsMessage(command);
|
|
1085
|
+
const topic = getTopicFromCommand(command);
|
|
1086
|
+
this._subscriptions.set(topic, callback);
|
|
1087
|
+
return this.unsubscribeIndexPricesUpdates;
|
|
1088
|
+
}
|
|
1089
|
+
async unsubscribeBorrowLendingUpdates() {
|
|
1090
|
+
const command = {
|
|
1091
|
+
type: "UnsubscribeBorrowLend",
|
|
1067
1092
|
content: { id: getRandomId() }
|
|
1068
1093
|
};
|
|
1069
1094
|
await this.sendWsMessage(command);
|
|
@@ -1572,7 +1597,7 @@ import { createEntryPayload as createEntryPayload2 } from "@thalalabs/surf";
|
|
|
1572
1597
|
|
|
1573
1598
|
// generated_types/faucetEntrypoints.ts
|
|
1574
1599
|
var ABI16 = {
|
|
1575
|
-
"address": "
|
|
1600
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
1576
1601
|
"name": "faucet_entrypoints",
|
|
1577
1602
|
"friends": [],
|
|
1578
1603
|
"exposed_functions": [
|
|
@@ -1607,7 +1632,7 @@ var faucetEntrypoints_default = ABI16;
|
|
|
1607
1632
|
|
|
1608
1633
|
// generated_types/testFaucet.ts
|
|
1609
1634
|
var ABI17 = {
|
|
1610
|
-
"address": "
|
|
1635
|
+
"address": "0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502",
|
|
1611
1636
|
"name": "test_faucet",
|
|
1612
1637
|
"friends": [],
|
|
1613
1638
|
"exposed_functions": [
|
|
@@ -1644,7 +1669,7 @@ var ABI17 = {
|
|
|
1644
1669
|
],
|
|
1645
1670
|
"return": [
|
|
1646
1671
|
"0x1::object::ConstructorRef",
|
|
1647
|
-
"0x1::object::Object<
|
|
1672
|
+
"0x1::object::Object<0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502::test_faucet::Token>"
|
|
1648
1673
|
]
|
|
1649
1674
|
},
|
|
1650
1675
|
{
|
|
@@ -1783,7 +1808,7 @@ var ABI17 = {
|
|
|
1783
1808
|
"0x1::object::Object<0x1::fungible_asset::Metadata>"
|
|
1784
1809
|
],
|
|
1785
1810
|
"return": [
|
|
1786
|
-
"
|
|
1811
|
+
"0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502::test_faucet::FaucetToken"
|
|
1787
1812
|
]
|
|
1788
1813
|
}
|
|
1789
1814
|
],
|
|
@@ -1815,7 +1840,7 @@ var ABI17 = {
|
|
|
1815
1840
|
"fields": [
|
|
1816
1841
|
{
|
|
1817
1842
|
"name": "tokens",
|
|
1818
|
-
"type": "0x1::smart_table::SmartTable<vector<u8>,
|
|
1843
|
+
"type": "0x1::smart_table::SmartTable<vector<u8>, 0xfc3b1b614d9cad0d6b4cd6222a205fa6b10b8b7ee1d0143b4d05691d8908f502::test_faucet::FaucetToken>"
|
|
1819
1844
|
}
|
|
1820
1845
|
]
|
|
1821
1846
|
},
|