@nightlylabs/dex-sdk 0.1.29 → 0.1.31
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 +70 -20
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +70 -20
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -470,8 +470,36 @@ var ABI16 = {
|
|
|
470
470
|
};
|
|
471
471
|
var transferToUser_default = ABI16;
|
|
472
472
|
|
|
473
|
-
// generated_types/
|
|
473
|
+
// generated_types/withdrawToken.ts
|
|
474
474
|
var ABI17 = {
|
|
475
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
476
|
+
"name": "withdraw_token",
|
|
477
|
+
"friends": [],
|
|
478
|
+
"exposed_functions": [
|
|
479
|
+
{
|
|
480
|
+
"name": "withdraw_token",
|
|
481
|
+
"visibility": "public",
|
|
482
|
+
"is_entry": true,
|
|
483
|
+
"is_view": false,
|
|
484
|
+
"generic_type_params": [],
|
|
485
|
+
"params": [
|
|
486
|
+
"&signer",
|
|
487
|
+
"u64",
|
|
488
|
+
"u64",
|
|
489
|
+
"0x1::object::Object<0x1::fungible_asset::Metadata>",
|
|
490
|
+
"bool",
|
|
491
|
+
"bool",
|
|
492
|
+
"address"
|
|
493
|
+
],
|
|
494
|
+
"return": []
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"structs": []
|
|
498
|
+
};
|
|
499
|
+
var withdrawToken_default = ABI17;
|
|
500
|
+
|
|
501
|
+
// generated_types/placeMultiplePerpOrders.ts
|
|
502
|
+
var ABI18 = {
|
|
475
503
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
476
504
|
"name": "place_multiple_perp_orders",
|
|
477
505
|
"friends": [],
|
|
@@ -497,10 +525,10 @@ var ABI17 = {
|
|
|
497
525
|
],
|
|
498
526
|
"structs": []
|
|
499
527
|
};
|
|
500
|
-
var placeMultiplePerpOrders_default =
|
|
528
|
+
var placeMultiplePerpOrders_default = ABI18;
|
|
501
529
|
|
|
502
530
|
// generated_types/claimKickbackFee.ts
|
|
503
|
-
var
|
|
531
|
+
var ABI19 = {
|
|
504
532
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
505
533
|
"name": "claim_kickback_fee",
|
|
506
534
|
"friends": [],
|
|
@@ -520,10 +548,10 @@ var ABI18 = {
|
|
|
520
548
|
],
|
|
521
549
|
"structs": []
|
|
522
550
|
};
|
|
523
|
-
var claimKickbackFee_default =
|
|
551
|
+
var claimKickbackFee_default = ABI19;
|
|
524
552
|
|
|
525
553
|
// generated_types/replaceMultipleOrders.ts
|
|
526
|
-
var
|
|
554
|
+
var ABI20 = {
|
|
527
555
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
528
556
|
"name": "replace_multiple_orders",
|
|
529
557
|
"friends": [],
|
|
@@ -548,10 +576,10 @@ var ABI19 = {
|
|
|
548
576
|
],
|
|
549
577
|
"structs": []
|
|
550
578
|
};
|
|
551
|
-
var replaceMultipleOrders_default =
|
|
579
|
+
var replaceMultipleOrders_default = ABI20;
|
|
552
580
|
|
|
553
581
|
// generated_types/claimDeposit.ts
|
|
554
|
-
var
|
|
582
|
+
var ABI21 = {
|
|
555
583
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
556
584
|
"name": "claim_deposit",
|
|
557
585
|
"friends": [],
|
|
@@ -572,10 +600,10 @@ var ABI20 = {
|
|
|
572
600
|
],
|
|
573
601
|
"structs": []
|
|
574
602
|
};
|
|
575
|
-
var claimDeposit_default =
|
|
603
|
+
var claimDeposit_default = ABI21;
|
|
576
604
|
|
|
577
605
|
// generated_types/removeApiKeySigner.ts
|
|
578
|
-
var
|
|
606
|
+
var ABI22 = {
|
|
579
607
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
580
608
|
"name": "remove_api_key_signer",
|
|
581
609
|
"friends": [],
|
|
@@ -596,10 +624,10 @@ var ABI21 = {
|
|
|
596
624
|
],
|
|
597
625
|
"structs": []
|
|
598
626
|
};
|
|
599
|
-
var removeApiKeySigner_default =
|
|
627
|
+
var removeApiKeySigner_default = ABI22;
|
|
600
628
|
|
|
601
629
|
// generated_types/setReferralCode.ts
|
|
602
|
-
var
|
|
630
|
+
var ABI23 = {
|
|
603
631
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
604
632
|
"name": "set_referral_code",
|
|
605
633
|
"friends": [],
|
|
@@ -620,10 +648,10 @@ var ABI22 = {
|
|
|
620
648
|
],
|
|
621
649
|
"structs": []
|
|
622
650
|
};
|
|
623
|
-
var setReferralCode_default =
|
|
651
|
+
var setReferralCode_default = ABI23;
|
|
624
652
|
|
|
625
653
|
// generated_types/tokenizeUserVaultInvestment.ts
|
|
626
|
-
var
|
|
654
|
+
var ABI24 = {
|
|
627
655
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
628
656
|
"name": "tokenize_user_vault_investment",
|
|
629
657
|
"friends": [],
|
|
@@ -644,10 +672,10 @@ var ABI23 = {
|
|
|
644
672
|
],
|
|
645
673
|
"structs": []
|
|
646
674
|
};
|
|
647
|
-
var tokenizeUserVaultInvestment_default =
|
|
675
|
+
var tokenizeUserVaultInvestment_default = ABI24;
|
|
648
676
|
|
|
649
677
|
// generated_types/addCredits.ts
|
|
650
|
-
var
|
|
678
|
+
var ABI25 = {
|
|
651
679
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
652
680
|
"name": "add_credits",
|
|
653
681
|
"friends": [],
|
|
@@ -668,7 +696,7 @@ var ABI24 = {
|
|
|
668
696
|
],
|
|
669
697
|
"structs": []
|
|
670
698
|
};
|
|
671
|
-
var addCredits_default =
|
|
699
|
+
var addCredits_default = ABI25;
|
|
672
700
|
|
|
673
701
|
// generated_types/typeshareTypes.ts
|
|
674
702
|
var ChartInterval = /* @__PURE__ */ ((ChartInterval2) => {
|
|
@@ -779,7 +807,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
779
807
|
})(UserStatus || {});
|
|
780
808
|
|
|
781
809
|
// generated_types/withdrawFromVault.ts
|
|
782
|
-
var
|
|
810
|
+
var ABI26 = {
|
|
783
811
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
784
812
|
"name": "withdraw_from_vault",
|
|
785
813
|
"friends": [],
|
|
@@ -802,7 +830,7 @@ var ABI25 = {
|
|
|
802
830
|
],
|
|
803
831
|
"structs": []
|
|
804
832
|
};
|
|
805
|
-
var withdrawFromVault_default =
|
|
833
|
+
var withdrawFromVault_default = ABI26;
|
|
806
834
|
|
|
807
835
|
// src/utils.ts
|
|
808
836
|
var import_ts_sdk = require("@aptos-labs/ts-sdk");
|
|
@@ -2057,6 +2085,28 @@ var Client = class _Client {
|
|
|
2057
2085
|
});
|
|
2058
2086
|
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2059
2087
|
}
|
|
2088
|
+
async withdrawToken(params) {
|
|
2089
|
+
const aptosPayload = await (0, import_ts_sdk2.generateTransactionPayload)({
|
|
2090
|
+
aptosConfig: this._aptos.config,
|
|
2091
|
+
abi: parseEntryFunctionAbi({
|
|
2092
|
+
moduleAbi: withdrawToken_default,
|
|
2093
|
+
functionName: withdrawToken_default.name,
|
|
2094
|
+
moduleAddress: withdrawToken_default.address,
|
|
2095
|
+
moduleName: withdrawToken_default.name
|
|
2096
|
+
}),
|
|
2097
|
+
function: `${withdrawToken_default.address}::${withdrawToken_default.name}::withdraw_token`,
|
|
2098
|
+
typeArguments: [],
|
|
2099
|
+
functionArguments: [
|
|
2100
|
+
params.userId,
|
|
2101
|
+
params.amount,
|
|
2102
|
+
params.tokenAddress,
|
|
2103
|
+
params.max,
|
|
2104
|
+
params.borrow,
|
|
2105
|
+
params.recipient
|
|
2106
|
+
]
|
|
2107
|
+
});
|
|
2108
|
+
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2109
|
+
}
|
|
2060
2110
|
async replaceMultipleOrders(params) {
|
|
2061
2111
|
const isBids = params.orders.map((order) => order.isBid);
|
|
2062
2112
|
const prices = params.orders.map((order) => order.price);
|
|
@@ -2178,7 +2228,7 @@ function parseEntryFunctionAbi(args) {
|
|
|
2178
2228
|
}
|
|
2179
2229
|
|
|
2180
2230
|
// generated_types/faucetEntrypoints.ts
|
|
2181
|
-
var
|
|
2231
|
+
var ABI27 = {
|
|
2182
2232
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
2183
2233
|
"name": "faucet_entrypoints",
|
|
2184
2234
|
"friends": [],
|
|
@@ -2210,7 +2260,7 @@ var ABI26 = {
|
|
|
2210
2260
|
],
|
|
2211
2261
|
"structs": []
|
|
2212
2262
|
};
|
|
2213
|
-
var faucetEntrypoints_default =
|
|
2263
|
+
var faucetEntrypoints_default = ABI27;
|
|
2214
2264
|
|
|
2215
2265
|
// src/testFaucet.ts
|
|
2216
2266
|
var import_ts_sdk3 = require("@aptos-labs/ts-sdk");
|
package/dist/index.d.cts
CHANGED
|
@@ -1310,6 +1310,14 @@ interface TransferToUserParams {
|
|
|
1310
1310
|
borrow: boolean;
|
|
1311
1311
|
recipient: string;
|
|
1312
1312
|
}
|
|
1313
|
+
interface WithdrawTokenParams {
|
|
1314
|
+
userId: string;
|
|
1315
|
+
tokenAddress: Address;
|
|
1316
|
+
amount: string;
|
|
1317
|
+
borrow: boolean;
|
|
1318
|
+
max: boolean;
|
|
1319
|
+
recipient: Address;
|
|
1320
|
+
}
|
|
1313
1321
|
interface IGetChartCandlesInRange {
|
|
1314
1322
|
marketName: string;
|
|
1315
1323
|
interval: ChartInterval;
|
|
@@ -1515,6 +1523,7 @@ declare class Client {
|
|
|
1515
1523
|
claimReferralFees(params: ClaimReferralFeesParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1516
1524
|
claimKickbackFee(params: ClaimKickbackFeeParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1517
1525
|
transferToUser(params: TransferToUserParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1526
|
+
withdrawToken(params: WithdrawTokenParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1518
1527
|
replaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1519
1528
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1520
1529
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1596,4 +1605,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1596
1605
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1597
1606
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1598
1607
|
|
|
1599
|
-
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, 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 GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, 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 };
|
|
1608
|
+
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, 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 GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WithdrawTokenParams, 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
|
@@ -1310,6 +1310,14 @@ interface TransferToUserParams {
|
|
|
1310
1310
|
borrow: boolean;
|
|
1311
1311
|
recipient: string;
|
|
1312
1312
|
}
|
|
1313
|
+
interface WithdrawTokenParams {
|
|
1314
|
+
userId: string;
|
|
1315
|
+
tokenAddress: Address;
|
|
1316
|
+
amount: string;
|
|
1317
|
+
borrow: boolean;
|
|
1318
|
+
max: boolean;
|
|
1319
|
+
recipient: Address;
|
|
1320
|
+
}
|
|
1313
1321
|
interface IGetChartCandlesInRange {
|
|
1314
1322
|
marketName: string;
|
|
1315
1323
|
interval: ChartInterval;
|
|
@@ -1515,6 +1523,7 @@ declare class Client {
|
|
|
1515
1523
|
claimReferralFees(params: ClaimReferralFeesParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1516
1524
|
claimKickbackFee(params: ClaimKickbackFeeParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1517
1525
|
transferToUser(params: TransferToUserParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1526
|
+
withdrawToken(params: WithdrawTokenParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1518
1527
|
replaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1519
1528
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1520
1529
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1596,4 +1605,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1596
1605
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1597
1606
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1598
1607
|
|
|
1599
|
-
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, 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 GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, 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 };
|
|
1608
|
+
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, 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 GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WithdrawTokenParams, 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
|
@@ -420,8 +420,36 @@ var ABI16 = {
|
|
|
420
420
|
};
|
|
421
421
|
var transferToUser_default = ABI16;
|
|
422
422
|
|
|
423
|
-
// generated_types/
|
|
423
|
+
// generated_types/withdrawToken.ts
|
|
424
424
|
var ABI17 = {
|
|
425
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
426
|
+
"name": "withdraw_token",
|
|
427
|
+
"friends": [],
|
|
428
|
+
"exposed_functions": [
|
|
429
|
+
{
|
|
430
|
+
"name": "withdraw_token",
|
|
431
|
+
"visibility": "public",
|
|
432
|
+
"is_entry": true,
|
|
433
|
+
"is_view": false,
|
|
434
|
+
"generic_type_params": [],
|
|
435
|
+
"params": [
|
|
436
|
+
"&signer",
|
|
437
|
+
"u64",
|
|
438
|
+
"u64",
|
|
439
|
+
"0x1::object::Object<0x1::fungible_asset::Metadata>",
|
|
440
|
+
"bool",
|
|
441
|
+
"bool",
|
|
442
|
+
"address"
|
|
443
|
+
],
|
|
444
|
+
"return": []
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"structs": []
|
|
448
|
+
};
|
|
449
|
+
var withdrawToken_default = ABI17;
|
|
450
|
+
|
|
451
|
+
// generated_types/placeMultiplePerpOrders.ts
|
|
452
|
+
var ABI18 = {
|
|
425
453
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
426
454
|
"name": "place_multiple_perp_orders",
|
|
427
455
|
"friends": [],
|
|
@@ -447,10 +475,10 @@ var ABI17 = {
|
|
|
447
475
|
],
|
|
448
476
|
"structs": []
|
|
449
477
|
};
|
|
450
|
-
var placeMultiplePerpOrders_default =
|
|
478
|
+
var placeMultiplePerpOrders_default = ABI18;
|
|
451
479
|
|
|
452
480
|
// generated_types/claimKickbackFee.ts
|
|
453
|
-
var
|
|
481
|
+
var ABI19 = {
|
|
454
482
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
455
483
|
"name": "claim_kickback_fee",
|
|
456
484
|
"friends": [],
|
|
@@ -470,10 +498,10 @@ var ABI18 = {
|
|
|
470
498
|
],
|
|
471
499
|
"structs": []
|
|
472
500
|
};
|
|
473
|
-
var claimKickbackFee_default =
|
|
501
|
+
var claimKickbackFee_default = ABI19;
|
|
474
502
|
|
|
475
503
|
// generated_types/replaceMultipleOrders.ts
|
|
476
|
-
var
|
|
504
|
+
var ABI20 = {
|
|
477
505
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
478
506
|
"name": "replace_multiple_orders",
|
|
479
507
|
"friends": [],
|
|
@@ -498,10 +526,10 @@ var ABI19 = {
|
|
|
498
526
|
],
|
|
499
527
|
"structs": []
|
|
500
528
|
};
|
|
501
|
-
var replaceMultipleOrders_default =
|
|
529
|
+
var replaceMultipleOrders_default = ABI20;
|
|
502
530
|
|
|
503
531
|
// generated_types/claimDeposit.ts
|
|
504
|
-
var
|
|
532
|
+
var ABI21 = {
|
|
505
533
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
506
534
|
"name": "claim_deposit",
|
|
507
535
|
"friends": [],
|
|
@@ -522,10 +550,10 @@ var ABI20 = {
|
|
|
522
550
|
],
|
|
523
551
|
"structs": []
|
|
524
552
|
};
|
|
525
|
-
var claimDeposit_default =
|
|
553
|
+
var claimDeposit_default = ABI21;
|
|
526
554
|
|
|
527
555
|
// generated_types/removeApiKeySigner.ts
|
|
528
|
-
var
|
|
556
|
+
var ABI22 = {
|
|
529
557
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
530
558
|
"name": "remove_api_key_signer",
|
|
531
559
|
"friends": [],
|
|
@@ -546,10 +574,10 @@ var ABI21 = {
|
|
|
546
574
|
],
|
|
547
575
|
"structs": []
|
|
548
576
|
};
|
|
549
|
-
var removeApiKeySigner_default =
|
|
577
|
+
var removeApiKeySigner_default = ABI22;
|
|
550
578
|
|
|
551
579
|
// generated_types/setReferralCode.ts
|
|
552
|
-
var
|
|
580
|
+
var ABI23 = {
|
|
553
581
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
554
582
|
"name": "set_referral_code",
|
|
555
583
|
"friends": [],
|
|
@@ -570,10 +598,10 @@ var ABI22 = {
|
|
|
570
598
|
],
|
|
571
599
|
"structs": []
|
|
572
600
|
};
|
|
573
|
-
var setReferralCode_default =
|
|
601
|
+
var setReferralCode_default = ABI23;
|
|
574
602
|
|
|
575
603
|
// generated_types/tokenizeUserVaultInvestment.ts
|
|
576
|
-
var
|
|
604
|
+
var ABI24 = {
|
|
577
605
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
578
606
|
"name": "tokenize_user_vault_investment",
|
|
579
607
|
"friends": [],
|
|
@@ -594,10 +622,10 @@ var ABI23 = {
|
|
|
594
622
|
],
|
|
595
623
|
"structs": []
|
|
596
624
|
};
|
|
597
|
-
var tokenizeUserVaultInvestment_default =
|
|
625
|
+
var tokenizeUserVaultInvestment_default = ABI24;
|
|
598
626
|
|
|
599
627
|
// generated_types/addCredits.ts
|
|
600
|
-
var
|
|
628
|
+
var ABI25 = {
|
|
601
629
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
602
630
|
"name": "add_credits",
|
|
603
631
|
"friends": [],
|
|
@@ -618,7 +646,7 @@ var ABI24 = {
|
|
|
618
646
|
],
|
|
619
647
|
"structs": []
|
|
620
648
|
};
|
|
621
|
-
var addCredits_default =
|
|
649
|
+
var addCredits_default = ABI25;
|
|
622
650
|
|
|
623
651
|
// generated_types/typeshareTypes.ts
|
|
624
652
|
var ChartInterval = /* @__PURE__ */ ((ChartInterval2) => {
|
|
@@ -729,7 +757,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
729
757
|
})(UserStatus || {});
|
|
730
758
|
|
|
731
759
|
// generated_types/withdrawFromVault.ts
|
|
732
|
-
var
|
|
760
|
+
var ABI26 = {
|
|
733
761
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
734
762
|
"name": "withdraw_from_vault",
|
|
735
763
|
"friends": [],
|
|
@@ -752,7 +780,7 @@ var ABI25 = {
|
|
|
752
780
|
],
|
|
753
781
|
"structs": []
|
|
754
782
|
};
|
|
755
|
-
var withdrawFromVault_default =
|
|
783
|
+
var withdrawFromVault_default = ABI26;
|
|
756
784
|
|
|
757
785
|
// src/utils.ts
|
|
758
786
|
import { Account } from "@aptos-labs/ts-sdk";
|
|
@@ -2007,6 +2035,28 @@ var Client = class _Client {
|
|
|
2007
2035
|
});
|
|
2008
2036
|
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2009
2037
|
}
|
|
2038
|
+
async withdrawToken(params) {
|
|
2039
|
+
const aptosPayload = await generateTransactionPayload({
|
|
2040
|
+
aptosConfig: this._aptos.config,
|
|
2041
|
+
abi: parseEntryFunctionAbi({
|
|
2042
|
+
moduleAbi: withdrawToken_default,
|
|
2043
|
+
functionName: withdrawToken_default.name,
|
|
2044
|
+
moduleAddress: withdrawToken_default.address,
|
|
2045
|
+
moduleName: withdrawToken_default.name
|
|
2046
|
+
}),
|
|
2047
|
+
function: `${withdrawToken_default.address}::${withdrawToken_default.name}::withdraw_token`,
|
|
2048
|
+
typeArguments: [],
|
|
2049
|
+
functionArguments: [
|
|
2050
|
+
params.userId,
|
|
2051
|
+
params.amount,
|
|
2052
|
+
params.tokenAddress,
|
|
2053
|
+
params.max,
|
|
2054
|
+
params.borrow,
|
|
2055
|
+
params.recipient
|
|
2056
|
+
]
|
|
2057
|
+
});
|
|
2058
|
+
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2059
|
+
}
|
|
2010
2060
|
async replaceMultipleOrders(params) {
|
|
2011
2061
|
const isBids = params.orders.map((order) => order.isBid);
|
|
2012
2062
|
const prices = params.orders.map((order) => order.price);
|
|
@@ -2128,7 +2178,7 @@ function parseEntryFunctionAbi(args) {
|
|
|
2128
2178
|
}
|
|
2129
2179
|
|
|
2130
2180
|
// generated_types/faucetEntrypoints.ts
|
|
2131
|
-
var
|
|
2181
|
+
var ABI27 = {
|
|
2132
2182
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
2133
2183
|
"name": "faucet_entrypoints",
|
|
2134
2184
|
"friends": [],
|
|
@@ -2160,7 +2210,7 @@ var ABI26 = {
|
|
|
2160
2210
|
],
|
|
2161
2211
|
"structs": []
|
|
2162
2212
|
};
|
|
2163
|
-
var faucetEntrypoints_default =
|
|
2213
|
+
var faucetEntrypoints_default = ABI27;
|
|
2164
2214
|
|
|
2165
2215
|
// src/testFaucet.ts
|
|
2166
2216
|
import {
|