Merge branch 'master' into wsapi

This commit is contained in:
Tiago
2025-02-17 01:26:40 +00:00
committed by GitHub
3 changed files with 51 additions and 22 deletions

View File

@@ -1,16 +1,20 @@
name: 'Build & Test' name: E2ETests
on: [push] on:
push:
pull_request:
workflow_dispatch:
env:
PROXY_ENABLED: ${{ secrets.PROXY_ENABLED }}
PROXY_HOST: ${{ secrets.PROXY_HOST }}
PROXY_PASS: ${{ secrets.PROXY_PASS }}
PROXY_PORT: ${{ secrets.PROXY_PORT }}
PROXY_USER: ${{ secrets.PROXY_USER }}
# on:
# # pull_request:
# # branches:
# # - "master"
# push:
# branches:
jobs: jobs:
build: E2ETests:
name: 'Build & Test' name: 'Build & Test'
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -30,13 +34,20 @@ jobs:
- name: Build - name: Build
run: npm run build run: npm run build
- name: Test - name: Test Public Read API Calls
run: npm run test run: npm run test -- public.read.test.ts
- name: Test Private Read API Calls
run: npm run test -- private.read.test.ts
env: env:
API_KEY_COM: ${{ secrets.API_KEY_COM }} API_KEY_COM: ${{ secrets.API_KEY_COM }}
API_SECRET_COM: ${{ secrets.API_SECRET_COM }} API_SECRET_COM: ${{ secrets.API_SECRET_COM }}
PROXY_ENABLED: ${{ secrets.PROXY_ENABLED }}
PROXY_HOST: ${{ secrets.PROXY_HOST }} - name: Test Private Write API Calls
PROXY_PASS: ${{ secrets.PROXY_PASS }} run: npm run test -- private.write.test.ts
PROXY_PORT: ${{ secrets.PROXY_PORT }} env:
PROXY_USER: ${{ secrets.PROXY_USER }} API_KEY_COM: ${{ secrets.API_KEY_COM }}
API_SECRET_COM: ${{ secrets.API_SECRET_COM }}
- name: Test Public WS
run: npm run test -- public.ws.test.ts

View File

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

View File

@@ -10,6 +10,8 @@ export interface GetCoinExchangeRecordParamsV5 {
export interface GetDeliveryRecordParamsV5 { export interface GetDeliveryRecordParamsV5 {
category: CategoryV5; category: CategoryV5;
symbol?: string; symbol?: string;
startTime?: number;
endTime?: number;
expDate?: string; expDate?: string;
limit?: number; limit?: number;
cursor?: string; cursor?: string;