@nightlylabs/dex-sdk 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +69 -20
- package/dist/index.d.cts +25 -31
- package/dist/index.d.ts +25 -31
- package/dist/index.js +69 -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,27 @@ 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.tokenAddress,
|
|
2102
|
+
toSystemValue(params.amount),
|
|
2103
|
+
params.borrow,
|
|
2104
|
+
params.recipient
|
|
2105
|
+
]
|
|
2106
|
+
});
|
|
2107
|
+
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2108
|
+
}
|
|
2060
2109
|
async replaceMultipleOrders(params) {
|
|
2061
2110
|
const isBids = params.orders.map((order) => order.isBid);
|
|
2062
2111
|
const prices = params.orders.map((order) => order.price);
|
|
@@ -2178,7 +2227,7 @@ function parseEntryFunctionAbi(args) {
|
|
|
2178
2227
|
}
|
|
2179
2228
|
|
|
2180
2229
|
// generated_types/faucetEntrypoints.ts
|
|
2181
|
-
var
|
|
2230
|
+
var ABI27 = {
|
|
2182
2231
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
2183
2232
|
"name": "faucet_entrypoints",
|
|
2184
2233
|
"friends": [],
|
|
@@ -2210,7 +2259,7 @@ var ABI26 = {
|
|
|
2210
2259
|
],
|
|
2211
2260
|
"structs": []
|
|
2212
2261
|
};
|
|
2213
|
-
var faucetEntrypoints_default =
|
|
2262
|
+
var faucetEntrypoints_default = ABI27;
|
|
2214
2263
|
|
|
2215
2264
|
// src/testFaucet.ts
|
|
2216
2265
|
var import_ts_sdk3 = require("@aptos-labs/ts-sdk");
|
package/dist/index.d.cts
CHANGED
|
@@ -715,6 +715,14 @@ interface GetUserVaultDepositsRequest {
|
|
|
715
715
|
newerTimestampMs?: string;
|
|
716
716
|
paginationCursor?: PaginationCursor;
|
|
717
717
|
}
|
|
718
|
+
interface HistoricalVaultDeposit {
|
|
719
|
+
userId: string;
|
|
720
|
+
vaultId: string;
|
|
721
|
+
usdDepositAmount: string;
|
|
722
|
+
sharesReceived: string;
|
|
723
|
+
tokensReceived: string;
|
|
724
|
+
timestamp: string;
|
|
725
|
+
}
|
|
718
726
|
interface GetUserVaultDepositsResponse {
|
|
719
727
|
vaultDeposits: HistoricalVaultDeposit[];
|
|
720
728
|
paginationCursor?: PaginationCursor;
|
|
@@ -726,6 +734,14 @@ interface GetUserVaultWithdrawsRequest {
|
|
|
726
734
|
newerTimestampMs?: string;
|
|
727
735
|
paginationCursor?: PaginationCursor;
|
|
728
736
|
}
|
|
737
|
+
interface HistoricalVaultWithdraw {
|
|
738
|
+
userId: string;
|
|
739
|
+
vaultId: string;
|
|
740
|
+
usdWithdrawAmount: string;
|
|
741
|
+
burntShares: string;
|
|
742
|
+
burntTokens: string;
|
|
743
|
+
timestamp: string;
|
|
744
|
+
}
|
|
729
745
|
interface GetUserVaultWithdrawsResponse {
|
|
730
746
|
vaultWithdraws: HistoricalVaultWithdraw[];
|
|
731
747
|
paginationCursor?: PaginationCursor;
|
|
@@ -796,36 +812,6 @@ interface GetVaultWithdrawalsResponse {
|
|
|
796
812
|
vaultWithdrawals: HistoricalVaultWithdraw[];
|
|
797
813
|
paginationCursor?: PaginationCursor;
|
|
798
814
|
}
|
|
799
|
-
interface HistoricalVaultDeposit {
|
|
800
|
-
userId: string;
|
|
801
|
-
vaultId: string;
|
|
802
|
-
usdDepositAmount: string;
|
|
803
|
-
sharesReceived: string;
|
|
804
|
-
tokensReceived: string;
|
|
805
|
-
timestamp: string;
|
|
806
|
-
}
|
|
807
|
-
interface HistoricalVaultDeposit {
|
|
808
|
-
vaultId: string;
|
|
809
|
-
usdDepositAmount: string;
|
|
810
|
-
sharesReceived: string;
|
|
811
|
-
tokensReceived: string;
|
|
812
|
-
timestamp: string;
|
|
813
|
-
}
|
|
814
|
-
interface HistoricalVaultWithdraw {
|
|
815
|
-
userId: string;
|
|
816
|
-
vaultId: string;
|
|
817
|
-
usdWithdrawAmount: string;
|
|
818
|
-
sharesReceived: string;
|
|
819
|
-
tokensReceived: string;
|
|
820
|
-
timestamp: string;
|
|
821
|
-
}
|
|
822
|
-
interface HistoricalVaultWithdraw {
|
|
823
|
-
vaultId: string;
|
|
824
|
-
usdAmount: string;
|
|
825
|
-
burntShares: string;
|
|
826
|
-
burntTokens: string;
|
|
827
|
-
timestamp: string;
|
|
828
|
-
}
|
|
829
815
|
interface Lend {
|
|
830
816
|
userId: string;
|
|
831
817
|
tokenAddress: string;
|
|
@@ -1324,6 +1310,13 @@ interface TransferToUserParams {
|
|
|
1324
1310
|
borrow: boolean;
|
|
1325
1311
|
recipient: string;
|
|
1326
1312
|
}
|
|
1313
|
+
interface WithdrawTokenParams {
|
|
1314
|
+
userId: string;
|
|
1315
|
+
tokenAddress: Address;
|
|
1316
|
+
amount: string;
|
|
1317
|
+
borrow: boolean;
|
|
1318
|
+
recipient: Address;
|
|
1319
|
+
}
|
|
1327
1320
|
interface IGetChartCandlesInRange {
|
|
1328
1321
|
marketName: string;
|
|
1329
1322
|
interval: ChartInterval;
|
|
@@ -1529,6 +1522,7 @@ declare class Client {
|
|
|
1529
1522
|
claimReferralFees(params: ClaimReferralFeesParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1530
1523
|
claimKickbackFee(params: ClaimKickbackFeeParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1531
1524
|
transferToUser(params: TransferToUserParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1525
|
+
withdrawToken(params: WithdrawTokenParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1532
1526
|
replaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1533
1527
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1534
1528
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1610,4 +1604,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1610
1604
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1611
1605
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1612
1606
|
|
|
1613
|
-
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 };
|
|
1607
|
+
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
|
@@ -715,6 +715,14 @@ interface GetUserVaultDepositsRequest {
|
|
|
715
715
|
newerTimestampMs?: string;
|
|
716
716
|
paginationCursor?: PaginationCursor;
|
|
717
717
|
}
|
|
718
|
+
interface HistoricalVaultDeposit {
|
|
719
|
+
userId: string;
|
|
720
|
+
vaultId: string;
|
|
721
|
+
usdDepositAmount: string;
|
|
722
|
+
sharesReceived: string;
|
|
723
|
+
tokensReceived: string;
|
|
724
|
+
timestamp: string;
|
|
725
|
+
}
|
|
718
726
|
interface GetUserVaultDepositsResponse {
|
|
719
727
|
vaultDeposits: HistoricalVaultDeposit[];
|
|
720
728
|
paginationCursor?: PaginationCursor;
|
|
@@ -726,6 +734,14 @@ interface GetUserVaultWithdrawsRequest {
|
|
|
726
734
|
newerTimestampMs?: string;
|
|
727
735
|
paginationCursor?: PaginationCursor;
|
|
728
736
|
}
|
|
737
|
+
interface HistoricalVaultWithdraw {
|
|
738
|
+
userId: string;
|
|
739
|
+
vaultId: string;
|
|
740
|
+
usdWithdrawAmount: string;
|
|
741
|
+
burntShares: string;
|
|
742
|
+
burntTokens: string;
|
|
743
|
+
timestamp: string;
|
|
744
|
+
}
|
|
729
745
|
interface GetUserVaultWithdrawsResponse {
|
|
730
746
|
vaultWithdraws: HistoricalVaultWithdraw[];
|
|
731
747
|
paginationCursor?: PaginationCursor;
|
|
@@ -796,36 +812,6 @@ interface GetVaultWithdrawalsResponse {
|
|
|
796
812
|
vaultWithdrawals: HistoricalVaultWithdraw[];
|
|
797
813
|
paginationCursor?: PaginationCursor;
|
|
798
814
|
}
|
|
799
|
-
interface HistoricalVaultDeposit {
|
|
800
|
-
userId: string;
|
|
801
|
-
vaultId: string;
|
|
802
|
-
usdDepositAmount: string;
|
|
803
|
-
sharesReceived: string;
|
|
804
|
-
tokensReceived: string;
|
|
805
|
-
timestamp: string;
|
|
806
|
-
}
|
|
807
|
-
interface HistoricalVaultDeposit {
|
|
808
|
-
vaultId: string;
|
|
809
|
-
usdDepositAmount: string;
|
|
810
|
-
sharesReceived: string;
|
|
811
|
-
tokensReceived: string;
|
|
812
|
-
timestamp: string;
|
|
813
|
-
}
|
|
814
|
-
interface HistoricalVaultWithdraw {
|
|
815
|
-
userId: string;
|
|
816
|
-
vaultId: string;
|
|
817
|
-
usdWithdrawAmount: string;
|
|
818
|
-
sharesReceived: string;
|
|
819
|
-
tokensReceived: string;
|
|
820
|
-
timestamp: string;
|
|
821
|
-
}
|
|
822
|
-
interface HistoricalVaultWithdraw {
|
|
823
|
-
vaultId: string;
|
|
824
|
-
usdAmount: string;
|
|
825
|
-
burntShares: string;
|
|
826
|
-
burntTokens: string;
|
|
827
|
-
timestamp: string;
|
|
828
|
-
}
|
|
829
815
|
interface Lend {
|
|
830
816
|
userId: string;
|
|
831
817
|
tokenAddress: string;
|
|
@@ -1324,6 +1310,13 @@ interface TransferToUserParams {
|
|
|
1324
1310
|
borrow: boolean;
|
|
1325
1311
|
recipient: string;
|
|
1326
1312
|
}
|
|
1313
|
+
interface WithdrawTokenParams {
|
|
1314
|
+
userId: string;
|
|
1315
|
+
tokenAddress: Address;
|
|
1316
|
+
amount: string;
|
|
1317
|
+
borrow: boolean;
|
|
1318
|
+
recipient: Address;
|
|
1319
|
+
}
|
|
1327
1320
|
interface IGetChartCandlesInRange {
|
|
1328
1321
|
marketName: string;
|
|
1329
1322
|
interval: ChartInterval;
|
|
@@ -1529,6 +1522,7 @@ declare class Client {
|
|
|
1529
1522
|
claimReferralFees(params: ClaimReferralFeesParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1530
1523
|
claimKickbackFee(params: ClaimKickbackFeeParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1531
1524
|
transferToUser(params: TransferToUserParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1525
|
+
withdrawToken(params: WithdrawTokenParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1532
1526
|
replaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1533
1527
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1534
1528
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1610,4 +1604,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1610
1604
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1611
1605
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1612
1606
|
|
|
1613
|
-
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 };
|
|
1607
|
+
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,27 @@ 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.tokenAddress,
|
|
2052
|
+
toSystemValue(params.amount),
|
|
2053
|
+
params.borrow,
|
|
2054
|
+
params.recipient
|
|
2055
|
+
]
|
|
2056
|
+
});
|
|
2057
|
+
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2058
|
+
}
|
|
2010
2059
|
async replaceMultipleOrders(params) {
|
|
2011
2060
|
const isBids = params.orders.map((order) => order.isBid);
|
|
2012
2061
|
const prices = params.orders.map((order) => order.price);
|
|
@@ -2128,7 +2177,7 @@ function parseEntryFunctionAbi(args) {
|
|
|
2128
2177
|
}
|
|
2129
2178
|
|
|
2130
2179
|
// generated_types/faucetEntrypoints.ts
|
|
2131
|
-
var
|
|
2180
|
+
var ABI27 = {
|
|
2132
2181
|
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
2133
2182
|
"name": "faucet_entrypoints",
|
|
2134
2183
|
"friends": [],
|
|
@@ -2160,7 +2209,7 @@ var ABI26 = {
|
|
|
2160
2209
|
],
|
|
2161
2210
|
"structs": []
|
|
2162
2211
|
};
|
|
2163
|
-
var faucetEntrypoints_default =
|
|
2212
|
+
var faucetEntrypoints_default = ABI27;
|
|
2164
2213
|
|
|
2165
2214
|
// src/testFaucet.ts
|
|
2166
2215
|
import {
|