@nightlylabs/dex-sdk 1.0.10 → 1.0.12
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 +17 -2
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +17 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24181,7 +24181,7 @@ var Client = class _Client {
|
|
|
24181
24181
|
maxGasAmount: tx.rawTransaction.max_gas_amount.toString(),
|
|
24182
24182
|
gasUnitPrice: tx.rawTransaction.gas_unit_price.toString(),
|
|
24183
24183
|
expirationTimestampSecs: tx.rawTransaction.expiration_timestamp_secs.toString(),
|
|
24184
|
-
chainId: parseInt(tx.rawTransaction.chain_id.toString()
|
|
24184
|
+
chainId: parseInt(tx.rawTransaction.chain_id.toString()).toString(),
|
|
24185
24185
|
authenticator: Array.from(signature.bcsToBytes()),
|
|
24186
24186
|
secondarySigners: [],
|
|
24187
24187
|
secondarySignersAuthenticators: []
|
|
@@ -24209,7 +24209,7 @@ var Client = class _Client {
|
|
|
24209
24209
|
maxGasAmount: tx.rawTransaction.max_gas_amount.toString(),
|
|
24210
24210
|
gasUnitPrice: tx.rawTransaction.gas_unit_price.toString(),
|
|
24211
24211
|
expirationTimestampSecs: tx.rawTransaction.expiration_timestamp_secs.toString(),
|
|
24212
|
-
chainId: parseInt(tx.rawTransaction.chain_id.toString()
|
|
24212
|
+
chainId: parseInt(tx.rawTransaction.chain_id.toString()).toString(),
|
|
24213
24213
|
authenticator: Array.from(signature.bcsToBytes()),
|
|
24214
24214
|
secondarySigners: tx.secondarySignerAddresses.map((s) => s.toString()),
|
|
24215
24215
|
secondarySignersAuthenticators: secondarySignersAuthenticators.map(
|
|
@@ -25082,6 +25082,21 @@ var Client = class _Client {
|
|
|
25082
25082
|
);
|
|
25083
25083
|
return response;
|
|
25084
25084
|
};
|
|
25085
|
+
/**
|
|
25086
|
+
* getUserWithdrawalsHistory.
|
|
25087
|
+
*
|
|
25088
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
25089
|
+
*/
|
|
25090
|
+
this.getUserPositionsHistory = async (request) => {
|
|
25091
|
+
if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
|
|
25092
|
+
throw new Error("olderTimestampMs must be lower than newerTimestampMs");
|
|
25093
|
+
}
|
|
25094
|
+
const response = await this.sendGetJson(
|
|
25095
|
+
"/v1/get_user_positions" /* GetUserPositions */,
|
|
25096
|
+
request
|
|
25097
|
+
);
|
|
25098
|
+
return response;
|
|
25099
|
+
};
|
|
25085
25100
|
// Meta
|
|
25086
25101
|
/**
|
|
25087
25102
|
* getTime.
|
package/dist/index.d.cts
CHANGED
|
@@ -7248,6 +7248,12 @@ declare class Client {
|
|
|
7248
7248
|
* @returns A promise that resolves to {@link GetUserAccountValueRankingResponse}.
|
|
7249
7249
|
*/
|
|
7250
7250
|
getUserAccountValueRanking: (request: GetUserAccountValueRankingRequest) => Promise<GetUserAccountValueRankingResponse>;
|
|
7251
|
+
/**
|
|
7252
|
+
* getUserWithdrawalsHistory.
|
|
7253
|
+
*
|
|
7254
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
7255
|
+
*/
|
|
7256
|
+
getUserPositionsHistory: (request: GetUserPositionsRequest) => Promise<GetUserPositionsResponse>;
|
|
7251
7257
|
/**
|
|
7252
7258
|
* getTime.
|
|
7253
7259
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -7248,6 +7248,12 @@ declare class Client {
|
|
|
7248
7248
|
* @returns A promise that resolves to {@link GetUserAccountValueRankingResponse}.
|
|
7249
7249
|
*/
|
|
7250
7250
|
getUserAccountValueRanking: (request: GetUserAccountValueRankingRequest) => Promise<GetUserAccountValueRankingResponse>;
|
|
7251
|
+
/**
|
|
7252
|
+
* getUserWithdrawalsHistory.
|
|
7253
|
+
*
|
|
7254
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
7255
|
+
*/
|
|
7256
|
+
getUserPositionsHistory: (request: GetUserPositionsRequest) => Promise<GetUserPositionsResponse>;
|
|
7251
7257
|
/**
|
|
7252
7258
|
* getTime.
|
|
7253
7259
|
*
|
package/dist/index.js
CHANGED
|
@@ -24140,7 +24140,7 @@ var Client = class _Client {
|
|
|
24140
24140
|
maxGasAmount: tx.rawTransaction.max_gas_amount.toString(),
|
|
24141
24141
|
gasUnitPrice: tx.rawTransaction.gas_unit_price.toString(),
|
|
24142
24142
|
expirationTimestampSecs: tx.rawTransaction.expiration_timestamp_secs.toString(),
|
|
24143
|
-
chainId: parseInt(tx.rawTransaction.chain_id.toString()
|
|
24143
|
+
chainId: parseInt(tx.rawTransaction.chain_id.toString()).toString(),
|
|
24144
24144
|
authenticator: Array.from(signature.bcsToBytes()),
|
|
24145
24145
|
secondarySigners: [],
|
|
24146
24146
|
secondarySignersAuthenticators: []
|
|
@@ -24168,7 +24168,7 @@ var Client = class _Client {
|
|
|
24168
24168
|
maxGasAmount: tx.rawTransaction.max_gas_amount.toString(),
|
|
24169
24169
|
gasUnitPrice: tx.rawTransaction.gas_unit_price.toString(),
|
|
24170
24170
|
expirationTimestampSecs: tx.rawTransaction.expiration_timestamp_secs.toString(),
|
|
24171
|
-
chainId: parseInt(tx.rawTransaction.chain_id.toString()
|
|
24171
|
+
chainId: parseInt(tx.rawTransaction.chain_id.toString()).toString(),
|
|
24172
24172
|
authenticator: Array.from(signature.bcsToBytes()),
|
|
24173
24173
|
secondarySigners: tx.secondarySignerAddresses.map((s) => s.toString()),
|
|
24174
24174
|
secondarySignersAuthenticators: secondarySignersAuthenticators.map(
|
|
@@ -25041,6 +25041,21 @@ var Client = class _Client {
|
|
|
25041
25041
|
);
|
|
25042
25042
|
return response;
|
|
25043
25043
|
};
|
|
25044
|
+
/**
|
|
25045
|
+
* getUserWithdrawalsHistory.
|
|
25046
|
+
*
|
|
25047
|
+
* @param request - See {@link GetUserWithdrawalsRequest}.
|
|
25048
|
+
*/
|
|
25049
|
+
this.getUserPositionsHistory = async (request) => {
|
|
25050
|
+
if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
|
|
25051
|
+
throw new Error("olderTimestampMs must be lower than newerTimestampMs");
|
|
25052
|
+
}
|
|
25053
|
+
const response = await this.sendGetJson(
|
|
25054
|
+
"/v1/get_user_positions" /* GetUserPositions */,
|
|
25055
|
+
request
|
|
25056
|
+
);
|
|
25057
|
+
return response;
|
|
25058
|
+
};
|
|
25044
25059
|
// Meta
|
|
25045
25060
|
/**
|
|
25046
25061
|
* getTime.
|