@nightlylabs/dex-sdk 0.0.48 → 0.0.50
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 +24 -20
- package/dist/index.d.cts +19 -8
- package/dist/index.d.ts +19 -8
- package/dist/index.js +24 -20
- 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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
243
243
|
"name": "place_perp_limit_order",
|
|
244
244
|
"friends": [],
|
|
245
245
|
"exposed_functions": [
|
|
@@ -256,6 +256,7 @@ var ABI8 = {
|
|
|
256
256
|
"bool",
|
|
257
257
|
"u64",
|
|
258
258
|
"u64",
|
|
259
|
+
"bool",
|
|
259
260
|
"bool"
|
|
260
261
|
],
|
|
261
262
|
"return": []
|
|
@@ -267,7 +268,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
267
268
|
|
|
268
269
|
// generated_types/placePerpMarketOrder.ts
|
|
269
270
|
var ABI9 = {
|
|
270
|
-
"address": "
|
|
271
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
271
272
|
"name": "place_perp_market_order",
|
|
272
273
|
"friends": [],
|
|
273
274
|
"exposed_functions": [
|
|
@@ -283,7 +284,8 @@ var ABI9 = {
|
|
|
283
284
|
"vector<u8>",
|
|
284
285
|
"bool",
|
|
285
286
|
"u64",
|
|
286
|
-
"u64"
|
|
287
|
+
"u64",
|
|
288
|
+
"bool"
|
|
287
289
|
],
|
|
288
290
|
"return": []
|
|
289
291
|
}
|
|
@@ -294,7 +296,7 @@ var placePerpMarketOrder_default = ABI9;
|
|
|
294
296
|
|
|
295
297
|
// generated_types/redeemToken.ts
|
|
296
298
|
var ABI10 = {
|
|
297
|
-
"address": "
|
|
299
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
298
300
|
"name": "redeem_token",
|
|
299
301
|
"friends": [],
|
|
300
302
|
"exposed_functions": [
|
|
@@ -320,7 +322,7 @@ var redeemToken_default = ABI10;
|
|
|
320
322
|
|
|
321
323
|
// generated_types/removeApiKey.ts
|
|
322
324
|
var ABI11 = {
|
|
323
|
-
"address": "
|
|
325
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
324
326
|
"name": "remove_api_key",
|
|
325
327
|
"friends": [],
|
|
326
328
|
"exposed_functions": [
|
|
@@ -344,7 +346,7 @@ var removeApiKey_default = ABI11;
|
|
|
344
346
|
|
|
345
347
|
// generated_types/setAliasName.ts
|
|
346
348
|
var ABI12 = {
|
|
347
|
-
"address": "
|
|
349
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
348
350
|
"name": "set_alias_name",
|
|
349
351
|
"friends": [],
|
|
350
352
|
"exposed_functions": [
|
|
@@ -368,7 +370,7 @@ var setAliasName_default = ABI12;
|
|
|
368
370
|
|
|
369
371
|
// generated_types/setAutolend.ts
|
|
370
372
|
var ABI13 = {
|
|
371
|
-
"address": "
|
|
373
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
372
374
|
"name": "set_autolend",
|
|
373
375
|
"friends": [],
|
|
374
376
|
"exposed_functions": [
|
|
@@ -471,7 +473,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
471
473
|
|
|
472
474
|
// generated_types/withdrawFromVault.ts
|
|
473
475
|
var ABI14 = {
|
|
474
|
-
"address": "
|
|
476
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
475
477
|
"name": "withdraw_from_vault",
|
|
476
478
|
"friends": [],
|
|
477
479
|
"exposed_functions": [
|
|
@@ -586,6 +588,8 @@ var getTopicFromMessage = (data) => {
|
|
|
586
588
|
return data.content.userId;
|
|
587
589
|
case "RemoveApiKey":
|
|
588
590
|
return data.content.userId;
|
|
591
|
+
case "FundingPayment":
|
|
592
|
+
return data.content.userId;
|
|
589
593
|
}
|
|
590
594
|
};
|
|
591
595
|
|
|
@@ -1554,7 +1558,7 @@ var import_surf2 = require("@thalalabs/surf");
|
|
|
1554
1558
|
|
|
1555
1559
|
// generated_types/faucetEntrypoints.ts
|
|
1556
1560
|
var ABI15 = {
|
|
1557
|
-
"address": "
|
|
1561
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
1558
1562
|
"name": "faucet_entrypoints",
|
|
1559
1563
|
"friends": [],
|
|
1560
1564
|
"exposed_functions": [
|
|
@@ -1589,7 +1593,7 @@ var faucetEntrypoints_default = ABI15;
|
|
|
1589
1593
|
|
|
1590
1594
|
// generated_types/testFaucet.ts
|
|
1591
1595
|
var ABI16 = {
|
|
1592
|
-
"address": "
|
|
1596
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
1593
1597
|
"name": "test_faucet",
|
|
1594
1598
|
"friends": [],
|
|
1595
1599
|
"exposed_functions": [
|
|
@@ -1626,7 +1630,7 @@ var ABI16 = {
|
|
|
1626
1630
|
],
|
|
1627
1631
|
"return": [
|
|
1628
1632
|
"0x1::object::ConstructorRef",
|
|
1629
|
-
"0x1::object::Object<
|
|
1633
|
+
"0x1::object::Object<0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7::test_faucet::Token>"
|
|
1630
1634
|
]
|
|
1631
1635
|
},
|
|
1632
1636
|
{
|
|
@@ -1765,7 +1769,7 @@ var ABI16 = {
|
|
|
1765
1769
|
"0x1::object::Object<0x1::fungible_asset::Metadata>"
|
|
1766
1770
|
],
|
|
1767
1771
|
"return": [
|
|
1768
|
-
"
|
|
1772
|
+
"0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7::test_faucet::FaucetToken"
|
|
1769
1773
|
]
|
|
1770
1774
|
}
|
|
1771
1775
|
],
|
|
@@ -1797,7 +1801,7 @@ var ABI16 = {
|
|
|
1797
1801
|
"fields": [
|
|
1798
1802
|
{
|
|
1799
1803
|
"name": "tokens",
|
|
1800
|
-
"type": "0x1::smart_table::SmartTable<vector<u8>,
|
|
1804
|
+
"type": "0x1::smart_table::SmartTable<vector<u8>, 0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7::test_faucet::FaucetToken>"
|
|
1801
1805
|
}
|
|
1802
1806
|
]
|
|
1803
1807
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -133,6 +133,14 @@ interface FundingCheckpoint {
|
|
|
133
133
|
index: string;
|
|
134
134
|
fundingPerLot: string;
|
|
135
135
|
}
|
|
136
|
+
interface FundingPayment {
|
|
137
|
+
userId: string;
|
|
138
|
+
market: string;
|
|
139
|
+
amount: string;
|
|
140
|
+
positionSize: string;
|
|
141
|
+
positionValue: string;
|
|
142
|
+
fundingRate: string;
|
|
143
|
+
}
|
|
136
144
|
interface GetBorrowLendingDataResponse {
|
|
137
145
|
data: Record<string, BorrowLending>;
|
|
138
146
|
}
|
|
@@ -659,6 +667,9 @@ type WsMessage = {
|
|
|
659
667
|
} | {
|
|
660
668
|
type: "RemoveApiKey";
|
|
661
669
|
content: RemoveApiKey;
|
|
670
|
+
} | {
|
|
671
|
+
type: "FundingPayment";
|
|
672
|
+
content: FundingPayment;
|
|
662
673
|
};
|
|
663
674
|
|
|
664
675
|
type Address = `0x${string}`;
|
|
@@ -812,13 +823,13 @@ declare class Client {
|
|
|
812
823
|
getChartCandlesInRange: ({ interval, marketName, timestampStartMs, timestampEndMs, cursor, }: IGetChartCandlesInRange) => Promise<GetChartCandlesInRangeResponse>;
|
|
813
824
|
getPriceIndexes: () => Promise<GetPriceIndexesResponse>;
|
|
814
825
|
getUsersByAddress: (payload: GetUsersByAddressRequest) => Promise<GetUsersByAddressResponse>;
|
|
815
|
-
getPerpRecentTrades: (request: GetPerpRecentTradesRequest) => Promise<
|
|
816
|
-
getUserPerpFills: (request: GetPerpUserFillsRequest) => Promise<
|
|
817
|
-
getUserPerpOrders: (request: GetPerpUserOrdersRequest) => Promise<
|
|
818
|
-
getUserFundingHistory: (request: GetUserFundingHistoryRequest) => Promise<
|
|
819
|
-
getUserHistoricalDeposits: (request: GetUserDepositsRequest) => Promise<
|
|
820
|
-
getUserWithdrawalsHistory: (request: GetUserWithdrawalsRequest) => Promise<
|
|
821
|
-
getUserPortfolioValueHistory: (request: GetUserPortfolioValueRequest) => Promise<
|
|
826
|
+
getPerpRecentTrades: (request: GetPerpRecentTradesRequest) => Promise<GetPerpRecentTradesResponse>;
|
|
827
|
+
getUserPerpFills: (request: GetPerpUserFillsRequest) => Promise<GetPerpUserFillsResponse>;
|
|
828
|
+
getUserPerpOrders: (request: GetPerpUserOrdersRequest) => Promise<GetPerpUserOrdersResponse>;
|
|
829
|
+
getUserFundingHistory: (request: GetUserFundingHistoryRequest) => Promise<GetUserFundingHistoryResponse>;
|
|
830
|
+
getUserHistoricalDeposits: (request: GetUserDepositsRequest) => Promise<GetUserDepositsResponse>;
|
|
831
|
+
getUserWithdrawalsHistory: (request: GetUserWithdrawalsRequest) => Promise<GetUserWithdrawalsResponse>;
|
|
832
|
+
getUserPortfolioValueHistory: (request: GetUserPortfolioValueRequest) => Promise<GetUserPortfolioValueResponse>;
|
|
822
833
|
getTime: () => Promise<string>;
|
|
823
834
|
}
|
|
824
835
|
interface PlacePerpLimitOrderParams {
|
|
@@ -940,4 +951,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
940
951
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
941
952
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
942
953
|
|
|
943
|
-
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, 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 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 WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
954
|
+
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, 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 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
|
@@ -133,6 +133,14 @@ interface FundingCheckpoint {
|
|
|
133
133
|
index: string;
|
|
134
134
|
fundingPerLot: string;
|
|
135
135
|
}
|
|
136
|
+
interface FundingPayment {
|
|
137
|
+
userId: string;
|
|
138
|
+
market: string;
|
|
139
|
+
amount: string;
|
|
140
|
+
positionSize: string;
|
|
141
|
+
positionValue: string;
|
|
142
|
+
fundingRate: string;
|
|
143
|
+
}
|
|
136
144
|
interface GetBorrowLendingDataResponse {
|
|
137
145
|
data: Record<string, BorrowLending>;
|
|
138
146
|
}
|
|
@@ -659,6 +667,9 @@ type WsMessage = {
|
|
|
659
667
|
} | {
|
|
660
668
|
type: "RemoveApiKey";
|
|
661
669
|
content: RemoveApiKey;
|
|
670
|
+
} | {
|
|
671
|
+
type: "FundingPayment";
|
|
672
|
+
content: FundingPayment;
|
|
662
673
|
};
|
|
663
674
|
|
|
664
675
|
type Address = `0x${string}`;
|
|
@@ -812,13 +823,13 @@ declare class Client {
|
|
|
812
823
|
getChartCandlesInRange: ({ interval, marketName, timestampStartMs, timestampEndMs, cursor, }: IGetChartCandlesInRange) => Promise<GetChartCandlesInRangeResponse>;
|
|
813
824
|
getPriceIndexes: () => Promise<GetPriceIndexesResponse>;
|
|
814
825
|
getUsersByAddress: (payload: GetUsersByAddressRequest) => Promise<GetUsersByAddressResponse>;
|
|
815
|
-
getPerpRecentTrades: (request: GetPerpRecentTradesRequest) => Promise<
|
|
816
|
-
getUserPerpFills: (request: GetPerpUserFillsRequest) => Promise<
|
|
817
|
-
getUserPerpOrders: (request: GetPerpUserOrdersRequest) => Promise<
|
|
818
|
-
getUserFundingHistory: (request: GetUserFundingHistoryRequest) => Promise<
|
|
819
|
-
getUserHistoricalDeposits: (request: GetUserDepositsRequest) => Promise<
|
|
820
|
-
getUserWithdrawalsHistory: (request: GetUserWithdrawalsRequest) => Promise<
|
|
821
|
-
getUserPortfolioValueHistory: (request: GetUserPortfolioValueRequest) => Promise<
|
|
826
|
+
getPerpRecentTrades: (request: GetPerpRecentTradesRequest) => Promise<GetPerpRecentTradesResponse>;
|
|
827
|
+
getUserPerpFills: (request: GetPerpUserFillsRequest) => Promise<GetPerpUserFillsResponse>;
|
|
828
|
+
getUserPerpOrders: (request: GetPerpUserOrdersRequest) => Promise<GetPerpUserOrdersResponse>;
|
|
829
|
+
getUserFundingHistory: (request: GetUserFundingHistoryRequest) => Promise<GetUserFundingHistoryResponse>;
|
|
830
|
+
getUserHistoricalDeposits: (request: GetUserDepositsRequest) => Promise<GetUserDepositsResponse>;
|
|
831
|
+
getUserWithdrawalsHistory: (request: GetUserWithdrawalsRequest) => Promise<GetUserWithdrawalsResponse>;
|
|
832
|
+
getUserPortfolioValueHistory: (request: GetUserPortfolioValueRequest) => Promise<GetUserPortfolioValueResponse>;
|
|
822
833
|
getTime: () => Promise<string>;
|
|
823
834
|
}
|
|
824
835
|
interface PlacePerpLimitOrderParams {
|
|
@@ -940,4 +951,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
940
951
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
941
952
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
942
953
|
|
|
943
|
-
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, 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 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 WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
954
|
+
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, 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 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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
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": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
192
192
|
"name": "place_perp_limit_order",
|
|
193
193
|
"friends": [],
|
|
194
194
|
"exposed_functions": [
|
|
@@ -205,6 +205,7 @@ var ABI8 = {
|
|
|
205
205
|
"bool",
|
|
206
206
|
"u64",
|
|
207
207
|
"u64",
|
|
208
|
+
"bool",
|
|
208
209
|
"bool"
|
|
209
210
|
],
|
|
210
211
|
"return": []
|
|
@@ -216,7 +217,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
216
217
|
|
|
217
218
|
// generated_types/placePerpMarketOrder.ts
|
|
218
219
|
var ABI9 = {
|
|
219
|
-
"address": "
|
|
220
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
220
221
|
"name": "place_perp_market_order",
|
|
221
222
|
"friends": [],
|
|
222
223
|
"exposed_functions": [
|
|
@@ -232,7 +233,8 @@ var ABI9 = {
|
|
|
232
233
|
"vector<u8>",
|
|
233
234
|
"bool",
|
|
234
235
|
"u64",
|
|
235
|
-
"u64"
|
|
236
|
+
"u64",
|
|
237
|
+
"bool"
|
|
236
238
|
],
|
|
237
239
|
"return": []
|
|
238
240
|
}
|
|
@@ -243,7 +245,7 @@ var placePerpMarketOrder_default = ABI9;
|
|
|
243
245
|
|
|
244
246
|
// generated_types/redeemToken.ts
|
|
245
247
|
var ABI10 = {
|
|
246
|
-
"address": "
|
|
248
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
247
249
|
"name": "redeem_token",
|
|
248
250
|
"friends": [],
|
|
249
251
|
"exposed_functions": [
|
|
@@ -269,7 +271,7 @@ var redeemToken_default = ABI10;
|
|
|
269
271
|
|
|
270
272
|
// generated_types/removeApiKey.ts
|
|
271
273
|
var ABI11 = {
|
|
272
|
-
"address": "
|
|
274
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
273
275
|
"name": "remove_api_key",
|
|
274
276
|
"friends": [],
|
|
275
277
|
"exposed_functions": [
|
|
@@ -293,7 +295,7 @@ var removeApiKey_default = ABI11;
|
|
|
293
295
|
|
|
294
296
|
// generated_types/setAliasName.ts
|
|
295
297
|
var ABI12 = {
|
|
296
|
-
"address": "
|
|
298
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
297
299
|
"name": "set_alias_name",
|
|
298
300
|
"friends": [],
|
|
299
301
|
"exposed_functions": [
|
|
@@ -317,7 +319,7 @@ var setAliasName_default = ABI12;
|
|
|
317
319
|
|
|
318
320
|
// generated_types/setAutolend.ts
|
|
319
321
|
var ABI13 = {
|
|
320
|
-
"address": "
|
|
322
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
321
323
|
"name": "set_autolend",
|
|
322
324
|
"friends": [],
|
|
323
325
|
"exposed_functions": [
|
|
@@ -420,7 +422,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
420
422
|
|
|
421
423
|
// generated_types/withdrawFromVault.ts
|
|
422
424
|
var ABI14 = {
|
|
423
|
-
"address": "
|
|
425
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
424
426
|
"name": "withdraw_from_vault",
|
|
425
427
|
"friends": [],
|
|
426
428
|
"exposed_functions": [
|
|
@@ -535,6 +537,8 @@ var getTopicFromMessage = (data) => {
|
|
|
535
537
|
return data.content.userId;
|
|
536
538
|
case "RemoveApiKey":
|
|
537
539
|
return data.content.userId;
|
|
540
|
+
case "FundingPayment":
|
|
541
|
+
return data.content.userId;
|
|
538
542
|
}
|
|
539
543
|
};
|
|
540
544
|
|
|
@@ -1503,7 +1507,7 @@ import { createEntryPayload as createEntryPayload2 } from "@thalalabs/surf";
|
|
|
1503
1507
|
|
|
1504
1508
|
// generated_types/faucetEntrypoints.ts
|
|
1505
1509
|
var ABI15 = {
|
|
1506
|
-
"address": "
|
|
1510
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
1507
1511
|
"name": "faucet_entrypoints",
|
|
1508
1512
|
"friends": [],
|
|
1509
1513
|
"exposed_functions": [
|
|
@@ -1538,7 +1542,7 @@ var faucetEntrypoints_default = ABI15;
|
|
|
1538
1542
|
|
|
1539
1543
|
// generated_types/testFaucet.ts
|
|
1540
1544
|
var ABI16 = {
|
|
1541
|
-
"address": "
|
|
1545
|
+
"address": "0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7",
|
|
1542
1546
|
"name": "test_faucet",
|
|
1543
1547
|
"friends": [],
|
|
1544
1548
|
"exposed_functions": [
|
|
@@ -1575,7 +1579,7 @@ var ABI16 = {
|
|
|
1575
1579
|
],
|
|
1576
1580
|
"return": [
|
|
1577
1581
|
"0x1::object::ConstructorRef",
|
|
1578
|
-
"0x1::object::Object<
|
|
1582
|
+
"0x1::object::Object<0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7::test_faucet::Token>"
|
|
1579
1583
|
]
|
|
1580
1584
|
},
|
|
1581
1585
|
{
|
|
@@ -1714,7 +1718,7 @@ var ABI16 = {
|
|
|
1714
1718
|
"0x1::object::Object<0x1::fungible_asset::Metadata>"
|
|
1715
1719
|
],
|
|
1716
1720
|
"return": [
|
|
1717
|
-
"
|
|
1721
|
+
"0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7::test_faucet::FaucetToken"
|
|
1718
1722
|
]
|
|
1719
1723
|
}
|
|
1720
1724
|
],
|
|
@@ -1746,7 +1750,7 @@ var ABI16 = {
|
|
|
1746
1750
|
"fields": [
|
|
1747
1751
|
{
|
|
1748
1752
|
"name": "tokens",
|
|
1749
|
-
"type": "0x1::smart_table::SmartTable<vector<u8>,
|
|
1753
|
+
"type": "0x1::smart_table::SmartTable<vector<u8>, 0x34b01b765ed25a0629f96b508c290c94f0bb382870734e63622d703085c531a7::test_faucet::FaucetToken>"
|
|
1750
1754
|
}
|
|
1751
1755
|
]
|
|
1752
1756
|
},
|