@nightlylabs/dex-sdk 0.3.8 → 0.3.9
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 +23 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +23 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24096,7 +24096,7 @@ var Client = class _Client {
|
|
|
24096
24096
|
if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
|
|
24097
24097
|
throw new Error("olderTimestampMs must be lower than newerTimestampMs");
|
|
24098
24098
|
}
|
|
24099
|
-
const response = await this.sendGetJson("/v1/
|
|
24099
|
+
const response = await this.sendGetJson("/v1/get_user_partial_liquidations" /* GetUserPartialLiquidations */, request);
|
|
24100
24100
|
return response;
|
|
24101
24101
|
};
|
|
24102
24102
|
this.getBorrowLendHistoricalState = async (request) => {
|
|
@@ -24593,6 +24593,28 @@ var Client = class _Client {
|
|
|
24593
24593
|
functionArguments: [params.userId, params.amount, params.tokenAddress]
|
|
24594
24594
|
});
|
|
24595
24595
|
}
|
|
24596
|
+
async withdrawTokenPayload(params) {
|
|
24597
|
+
const abi = this._abis.WithdrawTokenABI;
|
|
24598
|
+
return await (0, import_ts_sdk3.generateTransactionPayload)({
|
|
24599
|
+
aptosConfig: this._aptos.config,
|
|
24600
|
+
abi: parseEntryFunctionAbi({
|
|
24601
|
+
moduleAbi: abi,
|
|
24602
|
+
functionName: abi.name,
|
|
24603
|
+
moduleAddress: abi.address,
|
|
24604
|
+
moduleName: abi.name
|
|
24605
|
+
}),
|
|
24606
|
+
function: `${abi.address}::${abi.name}::${abi.exposed_functions[0].name}`,
|
|
24607
|
+
typeArguments: [],
|
|
24608
|
+
functionArguments: [
|
|
24609
|
+
params.userId,
|
|
24610
|
+
params.amount,
|
|
24611
|
+
params.tokenAddress,
|
|
24612
|
+
params.max,
|
|
24613
|
+
params.borrow,
|
|
24614
|
+
params.recipient
|
|
24615
|
+
]
|
|
24616
|
+
});
|
|
24617
|
+
}
|
|
24596
24618
|
async removeApiKeySigner(params) {
|
|
24597
24619
|
const abi = this._abis.RemoveApiKeySignerABI;
|
|
24598
24620
|
return await (0, import_ts_sdk3.generateTransactionPayload)({
|
package/dist/index.d.cts
CHANGED
|
@@ -5704,6 +5704,7 @@ declare class Client {
|
|
|
5704
5704
|
}>;
|
|
5705
5705
|
addApiKey(params: AddApiKeyParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5706
5706
|
depositTokenPayload(params: DepositTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5707
|
+
withdrawTokenPayload(params: WithdrawTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5707
5708
|
removeApiKeySigner(params: RemoveApiKeySignerParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5708
5709
|
addApiCredits(params: AddApiCreditsParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5709
5710
|
submitSponsoredTransaction: (tx: SimpleTransaction, signature: AccountAuthenticator) => Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -5779,7 +5780,7 @@ declare class Client {
|
|
|
5779
5780
|
getUserClaimedReferralKickbackHistory: (request: GetUserClaimedReferralKickbackHistoryRequest) => Promise<GetUserClaimedReferralKickbackHistoryResponse>;
|
|
5780
5781
|
getUserTransfersHistory: (request: GetUserTransferHistoryRequest) => Promise<GetUserTransferHistoryResponse>;
|
|
5781
5782
|
getUserLiquidations: (request: GetUserFullLiquidationsHistoryRequest) => Promise<GetUserLiquidationsHistoryResponse>;
|
|
5782
|
-
getUserPartialLiquidations: (request: GetUserPartialLiquidationsHistoryRequest) => Promise<
|
|
5783
|
+
getUserPartialLiquidations: (request: GetUserPartialLiquidationsHistoryRequest) => Promise<GetUserPartialLiquidationsHistoryResponse>;
|
|
5783
5784
|
getBorrowLendHistoricalState: (request: GetBorrowLendingHistoricalDataRequest) => Promise<GetBorrowLendingHistoricalDataResponse>;
|
|
5784
5785
|
getBorrowLendAggregatedStats: (request: GetBorrowLendingAggregatedStatsRequest) => Promise<GetBorrowLendingAggregatedStatsResponse>;
|
|
5785
5786
|
getTokenStats: (request: GetTokenStatsHistoryRequest) => Promise<GetTokenStatsHistoryResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -5704,6 +5704,7 @@ declare class Client {
|
|
|
5704
5704
|
}>;
|
|
5705
5705
|
addApiKey(params: AddApiKeyParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5706
5706
|
depositTokenPayload(params: DepositTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5707
|
+
withdrawTokenPayload(params: WithdrawTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5707
5708
|
removeApiKeySigner(params: RemoveApiKeySignerParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5708
5709
|
addApiCredits(params: AddApiCreditsParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
5709
5710
|
submitSponsoredTransaction: (tx: SimpleTransaction, signature: AccountAuthenticator) => Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -5779,7 +5780,7 @@ declare class Client {
|
|
|
5779
5780
|
getUserClaimedReferralKickbackHistory: (request: GetUserClaimedReferralKickbackHistoryRequest) => Promise<GetUserClaimedReferralKickbackHistoryResponse>;
|
|
5780
5781
|
getUserTransfersHistory: (request: GetUserTransferHistoryRequest) => Promise<GetUserTransferHistoryResponse>;
|
|
5781
5782
|
getUserLiquidations: (request: GetUserFullLiquidationsHistoryRequest) => Promise<GetUserLiquidationsHistoryResponse>;
|
|
5782
|
-
getUserPartialLiquidations: (request: GetUserPartialLiquidationsHistoryRequest) => Promise<
|
|
5783
|
+
getUserPartialLiquidations: (request: GetUserPartialLiquidationsHistoryRequest) => Promise<GetUserPartialLiquidationsHistoryResponse>;
|
|
5783
5784
|
getBorrowLendHistoricalState: (request: GetBorrowLendingHistoricalDataRequest) => Promise<GetBorrowLendingHistoricalDataResponse>;
|
|
5784
5785
|
getBorrowLendAggregatedStats: (request: GetBorrowLendingAggregatedStatsRequest) => Promise<GetBorrowLendingAggregatedStatsResponse>;
|
|
5785
5786
|
getTokenStats: (request: GetTokenStatsHistoryRequest) => Promise<GetTokenStatsHistoryResponse>;
|
package/dist/index.js
CHANGED
|
@@ -24044,7 +24044,7 @@ var Client = class _Client {
|
|
|
24044
24044
|
if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
|
|
24045
24045
|
throw new Error("olderTimestampMs must be lower than newerTimestampMs");
|
|
24046
24046
|
}
|
|
24047
|
-
const response = await this.sendGetJson("/v1/
|
|
24047
|
+
const response = await this.sendGetJson("/v1/get_user_partial_liquidations" /* GetUserPartialLiquidations */, request);
|
|
24048
24048
|
return response;
|
|
24049
24049
|
};
|
|
24050
24050
|
this.getBorrowLendHistoricalState = async (request) => {
|
|
@@ -24541,6 +24541,28 @@ var Client = class _Client {
|
|
|
24541
24541
|
functionArguments: [params.userId, params.amount, params.tokenAddress]
|
|
24542
24542
|
});
|
|
24543
24543
|
}
|
|
24544
|
+
async withdrawTokenPayload(params) {
|
|
24545
|
+
const abi = this._abis.WithdrawTokenABI;
|
|
24546
|
+
return await generateTransactionPayload({
|
|
24547
|
+
aptosConfig: this._aptos.config,
|
|
24548
|
+
abi: parseEntryFunctionAbi({
|
|
24549
|
+
moduleAbi: abi,
|
|
24550
|
+
functionName: abi.name,
|
|
24551
|
+
moduleAddress: abi.address,
|
|
24552
|
+
moduleName: abi.name
|
|
24553
|
+
}),
|
|
24554
|
+
function: `${abi.address}::${abi.name}::${abi.exposed_functions[0].name}`,
|
|
24555
|
+
typeArguments: [],
|
|
24556
|
+
functionArguments: [
|
|
24557
|
+
params.userId,
|
|
24558
|
+
params.amount,
|
|
24559
|
+
params.tokenAddress,
|
|
24560
|
+
params.max,
|
|
24561
|
+
params.borrow,
|
|
24562
|
+
params.recipient
|
|
24563
|
+
]
|
|
24564
|
+
});
|
|
24565
|
+
}
|
|
24544
24566
|
async removeApiKeySigner(params) {
|
|
24545
24567
|
const abi = this._abis.RemoveApiKeySignerABI;
|
|
24546
24568
|
return await generateTransactionPayload({
|