feat(3.10.33): Updated return types for getSubDepositAddress, createUniversalTransfer and createInternalTransfer

This commit is contained in:
JJ-Cro
2025-02-13 15:50:49 +01:00
parent eec63351ad
commit addfd16fa2
3 changed files with 25 additions and 9 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "bybit-api",
"version": "3.10.32",
"version": "3.10.33",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "bybit-api",
"version": "3.10.32",
"version": "3.10.33",
"license": "MIT",
"dependencies": {
"axios": "^1.6.6",

View File

@@ -1,6 +1,6 @@
{
"name": "bybit-api",
"version": "3.10.32",
"version": "3.10.33",
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
"main": "lib/index.js",
"types": "lib/index.d.ts",

View File

@@ -57,7 +57,7 @@ import {
DeleteSubMemberParamsV5,
DeliveryPriceV5,
DeliveryRecordV5,
DepositAddressResultV5,
DepositAddressChainV5,
DepositRecordV5,
ExchangeBrokerAccountInfoV5,
ExchangeBrokerEarningResultV5,
@@ -1305,7 +1305,7 @@ export class RestClientV5 extends BaseRestClient {
amount: string,
fromAccountType: AccountTypeV5,
toAccountType: AccountTypeV5,
): Promise<APIResponseV3WithTime<{ transferId: string }>> {
): Promise<APIResponseV3WithTime<{ transferId: string; status: string }>> {
return this.postPrivate('/v5/asset/transfer/inter-transfer', {
transferId,
coin,
@@ -1365,7 +1365,7 @@ export class RestClientV5 extends BaseRestClient {
*/
createUniversalTransfer(
params: UniversalTransferParamsV5,
): Promise<APIResponseV3WithTime<{ transferId: string }>> {
): Promise<APIResponseV3WithTime<{ transferId: string; status: string }>> {
return this.postPrivate('/v5/asset/transfer/universal-transfer', params);
}
@@ -1464,7 +1464,12 @@ export class RestClientV5 extends BaseRestClient {
getMasterDepositAddress(
coin: string,
chainType?: string,
): Promise<APIResponseV3WithTime<DepositAddressResultV5>> {
): Promise<
APIResponseV3WithTime<{
coin: string;
chains: DepositAddressChainV5[];
}>
> {
return this.getPrivate('/v5/asset/deposit/query-address', {
coin,
chainType,
@@ -1478,7 +1483,12 @@ export class RestClientV5 extends BaseRestClient {
coin: string,
chainType: string,
subMemberId: string,
): Promise<APIResponseV3WithTime<DepositAddressResultV5>> {
): Promise<
APIResponseV3WithTime<{
coin: string;
chains: DepositAddressChainV5;
}>
> {
return this.getPrivate('/v5/asset/deposit/query-sub-member-address', {
coin,
chainType,
@@ -1488,6 +1498,7 @@ export class RestClientV5 extends BaseRestClient {
/**
* Query the deposit address information of SUB account.
* @deprecated Duplicate endpoint - Use getSubDepositAddress() instead
*
* CAUTION
* Can use master UID's api key only
@@ -1496,7 +1507,12 @@ export class RestClientV5 extends BaseRestClient {
coin: string,
chainType: string,
subMemberId: string,
): Promise<APIResponseV3<DepositAddressResultV5>> {
): Promise<
APIResponseV3<{
coin: string;
chains: DepositAddressChainV5;
}>
> {
return this.getPrivate('/v5/asset/deposit/query-sub-member-address', {
coin,
chainType,