Skip to content

Commit 0c96e3e

Browse files
author
T. Ismael Verdugo
committed
feat: whitelist address
1 parent 24c1129 commit 0c96e3e

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

lib/client.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { HttpClient } from "./httpClient";
1919
import {
2020
ACLSettings,
2121
Address,
22+
WhitelistAddress,
2223
AmountLock,
2324
Balance,
2425
Candle,
@@ -999,6 +1000,19 @@ export class Client {
9991000
return balance;
10001001
}
10011002

1003+
/**
1004+
* Gets the list of whitelisted addresses
1005+
*
1006+
* Requires the "Payment information" API key Access Right
1007+
*
1008+
* https://api.exchange.cryptomkt.com/#get-whitelisted-addresses
1009+
*
1010+
* @return the list of white listed addresses
1011+
*/
1012+
getWhitelistedAddresses(): Promise<WhitelistAddress[]> {
1013+
return this.get(`wallet/crypto/address/white-list`);
1014+
}
1015+
10021016
/**
10031017
* Get the current addresses of the user
10041018
*
@@ -1602,7 +1616,7 @@ Accepted values: wallet, spot. Must not be the same as source
16021616
}
16031617

16041618
/**
1605-
* Creates and commits a transfer between the user (subaccount) and another
1619+
* Creates and commits a transfer between the user (subaccount) and another
16061620
* subaccount.
16071621
*
16081622
* Call is being sent by a subaccount

lib/models.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ export * from "./models/WSCandle";
2323
export * from "./models/WSTicker";
2424
export * from "./models/WSTrades";
2525
export * from "./models/Fee";
26-
export * from "./models/FeeRequest";
26+
export * from "./models/FeeRequest";
27+
export * from "./models/WhitelistAddress";

lib/models/Address.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export interface Address {
22
address: string;
33
currency: string;
4-
paymentId: string;
5-
publicKey: string;
6-
netwokdCode: string;
4+
paymentId?: string;
5+
publicKey?: string;
6+
networkCode?: string;
77
}

lib/models/WhitelistAddress.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface WhitelistAddress {
2+
address: string;
3+
currency: string;
4+
name: string;
5+
network: string;
6+
}

0 commit comments

Comments
 (0)