@ultrade/ultrade-js-sdk 2.0.2 → 2.0.3
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/README.md +117 -0
- package/dist/argsAsObj/affiliates.args.d.ts +22 -0
- package/dist/argsAsObj/auth.args.d.ts +24 -0
- package/dist/argsAsObj/client.args.d.ts +21 -0
- package/dist/argsAsObj/index.d.ts +8 -0
- package/dist/argsAsObj/market.args.d.ts +53 -0
- package/dist/argsAsObj/social.args.d.ts +39 -0
- package/dist/argsAsObj/system.args.d.ts +7 -0
- package/dist/argsAsObj/trading.args.d.ts +12 -0
- package/dist/argsAsObj/wallet.args.d.ts +31 -0
- package/dist/client.d.ts +112 -0
- package/dist/const/auth.const.d.ts +1 -0
- package/dist/const/client.const.d.ts +8 -0
- package/dist/const/index.d.ts +2 -0
- package/dist/enum/account.enum.d.ts +42 -0
- package/dist/enum/affiliates.enum.d.ts +5 -0
- package/dist/enum/common.enum.d.ts +15 -0
- package/dist/enum/index.d.ts +6 -0
- package/dist/enum/market.enum.d.ts +252 -0
- package/dist/enum/social.enum.d.ts +6 -0
- package/dist/{src/enums.d.ts → enum/socket.enum.d.ts} +0 -16
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -1
- package/dist/interface/account.interface.d.ts +64 -0
- package/dist/interface/affiliates.interface.d.ts +42 -0
- package/dist/interface/auth.interface.d.ts +19 -0
- package/dist/interface/client.interface.d.ts +12 -0
- package/dist/interface/index.d.ts +11 -0
- package/dist/interface/market.interface.d.ts +232 -0
- package/dist/interface/notification.interface.d.ts +6 -0
- package/dist/interface/social.interface.d.ts +145 -0
- package/dist/interface/socket.interface.d.ts +47 -0
- package/dist/interface/system.interface.d.ts +20 -0
- package/dist/interface/trading.interface.d.ts +38 -0
- package/dist/interface/wallet.interface.d.ts +143 -0
- package/dist/{src/localStorage.d.ts → localStorage.d.ts} +1 -1
- package/dist/{src/sockets.d.ts → sockets.d.ts} +1 -1
- package/dist/{src → utils}/algodService.d.ts +6 -8
- package/dist/utils/algorand.util.d.ts +4 -0
- package/dist/utils/client.util.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +9 -6
- package/dist/src/client.d.ts +0 -143
- package/dist/src/index.d.ts +0 -2
- package/dist/src/interfaces.d.ts +0 -136
- package/dist/src/utils.d.ts +0 -2
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# @ultrade/ultrade-js-sdk
|
|
2
|
+
|
|
3
|
+
JavaScript/TypeScript SDK for Ultrade platform integration.
|
|
4
|
+
|
|
5
|
+
**Repository:** [https://github.com/ultrade-org/ultrade-js-sdk](https://github.com/ultrade-org/ultrade-js-sdk)
|
|
6
|
+
|
|
7
|
+
## Package Info
|
|
8
|
+
|
|
9
|
+
- **Name:** `@ultrade/ultrade-js-sdk`
|
|
10
|
+
- **Main Entry:** `./dist/index.js`
|
|
11
|
+
- **Types:** `./dist/index.d.ts`
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Install the package using your preferred package manager:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @ultrade/ultrade-js-sdk
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
yarn add @ultrade/ultrade-js-sdk
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm add @ultrade/ultrade-js-sdk
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Structure
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
src/
|
|
33
|
+
├── argsAsObj/ # Method argument interfaces (RO-RO pattern)
|
|
34
|
+
│ ├── affiliates.args.ts # Affiliate method arguments
|
|
35
|
+
│ ├── auth.args.ts # Authentication arguments
|
|
36
|
+
│ ├── client.args.ts # Client configuration arguments
|
|
37
|
+
│ ├── market.args.ts # Market data arguments
|
|
38
|
+
│ ├── social.args.ts # Social features arguments
|
|
39
|
+
│ ├── system.args.ts # System method arguments
|
|
40
|
+
│ ├── trading.args.ts # Trading operation arguments
|
|
41
|
+
│ ├── wallet.args.ts # Wallet operation arguments
|
|
42
|
+
│ └── index.ts # Barrel export
|
|
43
|
+
│
|
|
44
|
+
├── const/ # Constants
|
|
45
|
+
│ ├── auth.const.ts # Authentication constants
|
|
46
|
+
│ ├── client.const.ts # Client configuration constants
|
|
47
|
+
│ └── index.ts
|
|
48
|
+
│
|
|
49
|
+
├── enum/ # Enumerations
|
|
50
|
+
│ ├── account.enum.ts # Account-related enums
|
|
51
|
+
│ ├── affiliates.enum.ts # Affiliate enums
|
|
52
|
+
│ ├── common.enum.ts # Common enums
|
|
53
|
+
│ ├── market.enum.ts # Market enums
|
|
54
|
+
│ ├── social.enum.ts # Social enums
|
|
55
|
+
│ ├── socket.enum.ts # WebSocket stream enums
|
|
56
|
+
│ └── index.ts
|
|
57
|
+
│
|
|
58
|
+
├── interface/ # TypeScript interfaces
|
|
59
|
+
│ ├── account.interface.ts # Account data interfaces
|
|
60
|
+
│ ├── affiliates.interface.ts # Affiliate interfaces
|
|
61
|
+
│ ├── assets.interface.ts # Asset interfaces
|
|
62
|
+
│ ├── auth.interface.ts # Auth interfaces
|
|
63
|
+
│ ├── client.interface.ts # Client interfaces
|
|
64
|
+
│ ├── common.interface.ts # Common interfaces
|
|
65
|
+
│ ├── maintenance.interface.ts # Maintenance interfaces
|
|
66
|
+
│ ├── market.interface.ts # Market interfaces
|
|
67
|
+
│ ├── notification.interface.ts # Notification interfaces
|
|
68
|
+
│ ├── social.interface.ts # Social interfaces
|
|
69
|
+
│ ├── socket.interface.ts # WebSocket interfaces
|
|
70
|
+
│ ├── system.interface.ts # System interfaces
|
|
71
|
+
│ ├── trading.interface.ts # Trading interfaces
|
|
72
|
+
│ ├── wallet.interface.ts # Wallet interfaces
|
|
73
|
+
│ └── index.ts
|
|
74
|
+
│
|
|
75
|
+
├── utils/ # Utility functions
|
|
76
|
+
│ ├── algodService.ts # Algorand service
|
|
77
|
+
│ ├── algorand.util.ts # Algorand utilities
|
|
78
|
+
│ ├── client.util.ts # Client utilities
|
|
79
|
+
│ └── index.ts
|
|
80
|
+
│
|
|
81
|
+
├── client.ts # Main SDK Client class
|
|
82
|
+
├── localStorage.ts # Local storage service
|
|
83
|
+
├── sockets.ts # WebSocket manager
|
|
84
|
+
└── index.ts # Main entry point
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## TypeScript Path Aliases
|
|
88
|
+
|
|
89
|
+
Defined in `tsconfig.alias.json`:
|
|
90
|
+
|
|
91
|
+
| Alias | Path | Description |
|
|
92
|
+
|-------|------|-------------|
|
|
93
|
+
| `@ultrade/shared/browser/*` | `../shared/dist/browser/*` | Browser-specific shared utilities |
|
|
94
|
+
| `@utils` | `./src/utils/index.ts` | Utility functions |
|
|
95
|
+
| `@interface` | `./src/interface/index.ts` | TypeScript interfaces |
|
|
96
|
+
| `@const` | `./src/const/index.ts` | Constants |
|
|
97
|
+
| `@enum` | `./src/enum/index.ts` | Enumerations |
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## Build Commands
|
|
102
|
+
|
|
103
|
+
**Important:** First install node_modules from monorepo root (npm_packages)
|
|
104
|
+
|
|
105
|
+
- `npm run build` - Production build
|
|
106
|
+
- `npm run dev` - Development build with watch mode
|
|
107
|
+
- `npm run version:update` - Bump patch version
|
|
108
|
+
|
|
109
|
+
## Exports
|
|
110
|
+
|
|
111
|
+
The package exports:
|
|
112
|
+
- `Client` class - Main SDK client
|
|
113
|
+
- `SocketManager` - WebSocket connection manager
|
|
114
|
+
- All constants from `@const`
|
|
115
|
+
- All enums from `@enum`
|
|
116
|
+
- All interfaces from `@interface`
|
|
117
|
+
- All argument interfaces from `./argsAsObj`
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Affiliates-related method arguments
|
|
3
|
+
*/
|
|
4
|
+
export interface IGetAffiliatesStatusArgs {
|
|
5
|
+
companyId: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ICreateAffiliateArgs {
|
|
8
|
+
companyId: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IGetAffiliateProgressArgs {
|
|
11
|
+
companyId: number;
|
|
12
|
+
}
|
|
13
|
+
export interface IGetAffiliateInfoArgs {
|
|
14
|
+
companyId: number;
|
|
15
|
+
range: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ICountAffiliateDepositArgs {
|
|
18
|
+
companyId: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ICountAffiliateClickArgs {
|
|
21
|
+
referralToken: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authentication-related method arguments
|
|
3
|
+
*/
|
|
4
|
+
import { ILoginData, ITradingKeyData, IWithdrawData, ITransferData } from '../../../shared/dist/browser/interfaces';
|
|
5
|
+
import { Signer } from '../interface/index.ts';
|
|
6
|
+
export interface ILoginArgs extends ILoginData {
|
|
7
|
+
loginMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IAddTradingKeyArgs {
|
|
10
|
+
data: ITradingKeyData;
|
|
11
|
+
}
|
|
12
|
+
export interface IRevokeTradingKeyArgs {
|
|
13
|
+
data: ITradingKeyData;
|
|
14
|
+
}
|
|
15
|
+
export interface IWithdrawArgs {
|
|
16
|
+
withdrawData: IWithdrawData;
|
|
17
|
+
prettyMsg?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ITransferArgs {
|
|
20
|
+
transferData: ITransferData;
|
|
21
|
+
}
|
|
22
|
+
export interface ISetSignerArgs {
|
|
23
|
+
signer: Signer;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client configuration and subscription arguments
|
|
3
|
+
*/
|
|
4
|
+
import { ClientOptions, AuthCredentials, SubscribeOptions, WalletCredentials } from '../interface/index.ts';
|
|
5
|
+
export interface IClientConstructorArgs {
|
|
6
|
+
options: ClientOptions;
|
|
7
|
+
authCredentials?: AuthCredentials;
|
|
8
|
+
}
|
|
9
|
+
export interface ISubscribeArgs {
|
|
10
|
+
subscribeOptions: SubscribeOptions;
|
|
11
|
+
callback: Function;
|
|
12
|
+
}
|
|
13
|
+
export interface IUnsubscribeArgs {
|
|
14
|
+
handlerId: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ISetMainWalletArgs {
|
|
17
|
+
wallet: WalletCredentials;
|
|
18
|
+
}
|
|
19
|
+
export interface ISetUseUltradeIdArgs {
|
|
20
|
+
isUltrade: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market-related method arguments
|
|
3
|
+
*/
|
|
4
|
+
export interface IGetPairListArgs {
|
|
5
|
+
companyId?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IGetPairArgs {
|
|
8
|
+
symbol: string | number;
|
|
9
|
+
}
|
|
10
|
+
export interface IGetPriceArgs {
|
|
11
|
+
symbol: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IGetDepthArgs {
|
|
14
|
+
symbol: string;
|
|
15
|
+
depth: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IGetSymbolsArgs {
|
|
18
|
+
mask?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IGetLastTradesArgs {
|
|
21
|
+
symbol: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IGetHistoryArgs {
|
|
24
|
+
symbol: string;
|
|
25
|
+
interval: string;
|
|
26
|
+
startTime?: number;
|
|
27
|
+
endTime?: number;
|
|
28
|
+
limit?: number;
|
|
29
|
+
page?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface IGetOrdersArgs {
|
|
32
|
+
symbol?: string;
|
|
33
|
+
status?: number;
|
|
34
|
+
limit?: number;
|
|
35
|
+
endTime?: number;
|
|
36
|
+
startTime?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface IGetOrderByIdArgs {
|
|
39
|
+
orderId: number;
|
|
40
|
+
}
|
|
41
|
+
export interface IGetWithdrawalFeeArgs {
|
|
42
|
+
assetAddress: string;
|
|
43
|
+
chainId: number;
|
|
44
|
+
}
|
|
45
|
+
export interface IGetKycInitLinkArgs {
|
|
46
|
+
embeddedAppUrl: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface IGetDollarValuesArgs {
|
|
49
|
+
assetIds?: number[];
|
|
50
|
+
}
|
|
51
|
+
export interface IGetTransactionDetailsArgs {
|
|
52
|
+
transactionId: number;
|
|
53
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Social-related method arguments
|
|
3
|
+
*/
|
|
4
|
+
import { TelegramData } from '../interface/index.ts';
|
|
5
|
+
export interface IAddSocialEmailArgs {
|
|
6
|
+
email: string;
|
|
7
|
+
embeddedAppUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IVerifySocialEmailArgs {
|
|
10
|
+
email: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IGetSeasonArgs {
|
|
14
|
+
ultradeId?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface IAddTelegramArgs {
|
|
17
|
+
data: TelegramData;
|
|
18
|
+
}
|
|
19
|
+
export interface IDisconnectTelegramArgs {
|
|
20
|
+
data: TelegramData;
|
|
21
|
+
}
|
|
22
|
+
export interface IGetDiscordConnectionUrlArgs {
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IGetTwitterConnectionUrlArgs {
|
|
26
|
+
appUrl: string;
|
|
27
|
+
permissions?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IActionWithTweetArgs {
|
|
30
|
+
actions: Array<{
|
|
31
|
+
id: number;
|
|
32
|
+
text?: string;
|
|
33
|
+
}>;
|
|
34
|
+
tweetId?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface IGetAICommentArgs {
|
|
37
|
+
styleId: number;
|
|
38
|
+
tweetId: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trading-related method arguments
|
|
3
|
+
*/
|
|
4
|
+
import { CreateOrderArgs, CancelOrderArgs } from '../interface/index.ts';
|
|
5
|
+
export interface ICreateOrderArgs extends CreateOrderArgs {
|
|
6
|
+
}
|
|
7
|
+
export interface ICancelOrderArgs extends CancelOrderArgs {
|
|
8
|
+
}
|
|
9
|
+
export interface ICancelMultipleOrdersArgs {
|
|
10
|
+
orderIds?: number[];
|
|
11
|
+
pairId?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet-related method arguments
|
|
3
|
+
*/
|
|
4
|
+
import { CreateWithdrawalWallet, UpdateWithdrawalWallet, IWhiteList } from '../../../shared/dist/browser/interfaces';
|
|
5
|
+
export interface IGetWalletTransactionsArgs {
|
|
6
|
+
type: string;
|
|
7
|
+
page: number;
|
|
8
|
+
limit?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IGetTransfersArgs {
|
|
11
|
+
page: number;
|
|
12
|
+
limit?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IAddWhitelistArgs {
|
|
15
|
+
data: IWhiteList;
|
|
16
|
+
}
|
|
17
|
+
export interface IDeleteWhitelistArgs {
|
|
18
|
+
whitelistId: number;
|
|
19
|
+
}
|
|
20
|
+
export interface IGetWithdrawalWalletByAddressArgs {
|
|
21
|
+
address: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ICreateWithdrawalWalletArgs {
|
|
24
|
+
body: CreateWithdrawalWallet;
|
|
25
|
+
}
|
|
26
|
+
export interface IUpdateWithdrawalWalletArgs {
|
|
27
|
+
params: UpdateWithdrawalWallet;
|
|
28
|
+
}
|
|
29
|
+
export interface IDeleteWithdrawalWalletArgs {
|
|
30
|
+
address: string;
|
|
31
|
+
}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ITradingKeyData, TradingKeyView } from '../../shared/dist/browser/interfaces';
|
|
2
|
+
import { ILoginData, ITransferData, IWithdrawData } from "../../shared/dist/browser/interfaces";
|
|
3
|
+
import { CreateWithdrawalWallet, UpdateWithdrawalWallet } from "../../shared/dist/browser/interfaces";
|
|
4
|
+
import { ISafeWithdrawalWallets } from "../../shared/dist/browser/interfaces";
|
|
5
|
+
import { PaginatedResult } from "../../shared/dist/browser/interfaces";
|
|
6
|
+
import { SocketManager } from "./sockets";
|
|
7
|
+
import { AuthCredentials, ClientOptions, CancelOrderArgs, CreateOrderArgs, Signer, SubscribeOptions, TelegramData, WalletCredentials, UserNotification, IPairDto, IGetDepth, SettingsInit, IGetLastTrades, CodexBalanceDto, IOrderDto, Order, Chain, MappedCCTPAssets, CCTPUnifiedAssets, IGetKycStatus, IGetKycInitLink, IGetDollarValues, ITransactionDetails, IClient, IGetPrice, IGetSymbols, IGetHistoryResponse, IWithdrawalFee, ITransaction, ITradingKey, ITransfer, IPendingTxn, IGetWhiteList, IWhiteList, ISystemVersion, ISystemMaintenance, IUnreadNotificationsCount, UpdateUserNotificationDto, IAffiliateDashboardStatus, IAffiliateProgress, DashboardInfo, ISocialAccount, ILeaderboardItem, IUnlock, IAction, IActionHistory, ISocialSettings, ISocialSeason, ITelegramConnectResponse, ICompanyTweet, IAIStyle, IAIGeneratedComment, IWithdrawResponse, IRevokeTradingKeyResponse, ICancelOrderResponse, ICancelMultipleOrdersResponse } from "./interface/index.ts";
|
|
8
|
+
export declare class Client implements IClient {
|
|
9
|
+
private client;
|
|
10
|
+
private algodNode;
|
|
11
|
+
private algodIndexer;
|
|
12
|
+
private apiUrl;
|
|
13
|
+
private companyId;
|
|
14
|
+
private websocketUrl;
|
|
15
|
+
private wallet;
|
|
16
|
+
private _axios;
|
|
17
|
+
private localStorageService;
|
|
18
|
+
private isUltradeID;
|
|
19
|
+
socketManager: SocketManager;
|
|
20
|
+
constructor(options: ClientOptions, authCredentials?: AuthCredentials);
|
|
21
|
+
private axiosInterceptor;
|
|
22
|
+
get useUltradeID(): boolean;
|
|
23
|
+
set useUltradeID(isUltrade: boolean);
|
|
24
|
+
get isLogged(): boolean;
|
|
25
|
+
get mainWallet(): WalletCredentials | null;
|
|
26
|
+
set mainWallet(wallet: WalletCredentials);
|
|
27
|
+
setSigner(signer: Signer): void;
|
|
28
|
+
subscribe(subscribeOptions: SubscribeOptions, callback: Function): number;
|
|
29
|
+
unsubscribe(handlerId: number): void;
|
|
30
|
+
getPairList(companyId?: number): Promise<IPairDto[]>;
|
|
31
|
+
getPair(symbol: string | number): Promise<IPairDto>;
|
|
32
|
+
getPrice(symbol: string): Promise<IGetPrice>;
|
|
33
|
+
getDepth(symbol: string, depth: number): Promise<IGetDepth>;
|
|
34
|
+
getSymbols(mask?: string): Promise<IGetSymbols>;
|
|
35
|
+
getLastTrades(symbol: string): Promise<IGetLastTrades>;
|
|
36
|
+
getHistory(symbol: string, interval: string, startTime?: number, endTime?: number, limit?: number, page?: number): Promise<IGetHistoryResponse>;
|
|
37
|
+
getOrders(symbol?: string, status?: number, limit?: number, endTime?: number, startTime?: number): Promise<IOrderDto[]>;
|
|
38
|
+
getOrderById(orderId: number): Promise<Order>;
|
|
39
|
+
getSettings(): Promise<SettingsInit>;
|
|
40
|
+
getBalances(): Promise<CodexBalanceDto[]>;
|
|
41
|
+
getChains(): Promise<Chain[]>;
|
|
42
|
+
getCodexAssets(): Promise<CodexBalanceDto>;
|
|
43
|
+
getCCTPAssets(): Promise<MappedCCTPAssets>;
|
|
44
|
+
getCCTPUnifiedAssets(): Promise<CCTPUnifiedAssets[]>;
|
|
45
|
+
getWithdrawalFee(assetAddress: string, chainId: number): Promise<IWithdrawalFee>;
|
|
46
|
+
getKycStatus(): Promise<IGetKycStatus>;
|
|
47
|
+
getKycInitLink(embeddedAppUrl: string | null): Promise<IGetKycInitLink>;
|
|
48
|
+
getDollarValues(assetIds?: number[]): Promise<IGetDollarValues>;
|
|
49
|
+
getTransactionDetalis(transactionId: number): Promise<ITransactionDetails>;
|
|
50
|
+
getWalletTransactions(type: string, page: number, limit?: number): Promise<PaginatedResult<ITransaction>>;
|
|
51
|
+
getTradingKeys(): Promise<ITradingKey>;
|
|
52
|
+
getTransfers(page: number, limit?: number): Promise<PaginatedResult<ITransfer>>;
|
|
53
|
+
getPendingTransactions(): Promise<IPendingTxn[]>;
|
|
54
|
+
getWhitelist(): Promise<PaginatedResult<IGetWhiteList>>;
|
|
55
|
+
addWhitelist(data: IWhiteList): Promise<IGetWhiteList>;
|
|
56
|
+
deleteWhitelist(whitelistId: number): Promise<void>;
|
|
57
|
+
getAllWithdrawalWallets(): Promise<ISafeWithdrawalWallets[]>;
|
|
58
|
+
getWithdrawalWalletByAddress(address: string): Promise<ISafeWithdrawalWallets>;
|
|
59
|
+
createWithdrawalWallet(body: CreateWithdrawalWallet): Promise<ISafeWithdrawalWallets>;
|
|
60
|
+
updateWithdrawalWallet(params: UpdateWithdrawalWallet): Promise<boolean>;
|
|
61
|
+
deleteWithdrawalWallet(address: string): Promise<boolean>;
|
|
62
|
+
getVersion(): Promise<ISystemVersion>;
|
|
63
|
+
getMaintenance(): Promise<ISystemMaintenance>;
|
|
64
|
+
getNotifications(): Promise<UserNotification[]>;
|
|
65
|
+
getNotificationsUnreadCount(): Promise<IUnreadNotificationsCount>;
|
|
66
|
+
readNotifications(notifications: UpdateUserNotificationDto[]): Promise<UpdateUserNotificationDto[]>;
|
|
67
|
+
getAffiliatesStatus(companyId: number): Promise<IAffiliateDashboardStatus>;
|
|
68
|
+
createAffiliate(companyId: number): Promise<DashboardInfo>;
|
|
69
|
+
getAffiliateProgress(companyId: number): Promise<IAffiliateProgress>;
|
|
70
|
+
getAffiliateInfo(companyId: number, range: string): Promise<DashboardInfo>;
|
|
71
|
+
countAffiliateDepost(companyId: number): Promise<void>;
|
|
72
|
+
countAffiliateClick(referralToken: string): Promise<void>;
|
|
73
|
+
getSocialAccount(): Promise<ISocialAccount | undefined>;
|
|
74
|
+
addSocialEmail(email: string, embeddedAppUrl: string): Promise<void>;
|
|
75
|
+
verifySocialEmail(email: string, hash: string): Promise<void>;
|
|
76
|
+
getLeaderboards(): Promise<ILeaderboardItem[]>;
|
|
77
|
+
getUnlocks(): Promise<IUnlock[]>;
|
|
78
|
+
getSocialSettings(): Promise<ISocialSettings>;
|
|
79
|
+
getSeason(ultradeId?: number): Promise<ISocialSeason>;
|
|
80
|
+
getPastSeasons(): Promise<ISocialSeason[]>;
|
|
81
|
+
addTelegram(data: TelegramData): Promise<ITelegramConnectResponse>;
|
|
82
|
+
disconnectTelegram(data: TelegramData): Promise<void>;
|
|
83
|
+
getDiscordConnectionUrl(url: string): Promise<string>;
|
|
84
|
+
disconnectDiscord(): Promise<void>;
|
|
85
|
+
getTwitterConnectionUrl(appUrl: string, permissions?: string): Promise<string>;
|
|
86
|
+
disconnectTwitter(): Promise<void>;
|
|
87
|
+
getTweets(): Promise<ICompanyTweet[]>;
|
|
88
|
+
actionWithTweet(data: {
|
|
89
|
+
actions: Array<{
|
|
90
|
+
id: number;
|
|
91
|
+
text?: string;
|
|
92
|
+
}>;
|
|
93
|
+
tweetId?: string;
|
|
94
|
+
}): Promise<void>;
|
|
95
|
+
getActions(): Promise<IAction[]>;
|
|
96
|
+
getActionHistory(): Promise<IActionHistory[]>;
|
|
97
|
+
getAIStyles(): Promise<IAIStyle[]>;
|
|
98
|
+
getAIComment(styleId: number, tweetId: string): Promise<IAIGeneratedComment>;
|
|
99
|
+
private getTechnologyByProvider;
|
|
100
|
+
login({ address, provider, chain, referralToken, loginMessage }: ILoginData): Promise<string>;
|
|
101
|
+
addTradingKey(data: ITradingKeyData): Promise<TradingKeyView>;
|
|
102
|
+
revokeTradingKey(data: ITradingKeyData): Promise<IRevokeTradingKeyResponse>;
|
|
103
|
+
withdraw(withdrawData: IWithdrawData, prettyMsg?: string): Promise<IWithdrawResponse>;
|
|
104
|
+
transfer(transferData: ITransferData): Promise<ITransfer>;
|
|
105
|
+
createOrder(order: CreateOrderArgs): Promise<IOrderDto>;
|
|
106
|
+
cancelOrder(order: CancelOrderArgs): Promise<ICancelOrderResponse>;
|
|
107
|
+
cancelMultipleOrders({ orderIds, pairId }: {
|
|
108
|
+
orderIds?: number[];
|
|
109
|
+
pairId?: number;
|
|
110
|
+
}): Promise<ICancelMultipleOrdersResponse>;
|
|
111
|
+
ping(): Promise<number>;
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_LOGIN_MESSAGE = "By signing this message you are logging into your trading account and agreeing to all terms and conditions of the platform.";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface NetworkConfig {
|
|
2
|
+
algodNode: string;
|
|
3
|
+
apiUrl: string;
|
|
4
|
+
algodIndexer: string;
|
|
5
|
+
}
|
|
6
|
+
export type Network = 'mainnet' | 'testnet' | 'local';
|
|
7
|
+
export declare const NETWORK_CONFIGS: Record<Network, NetworkConfig>;
|
|
8
|
+
export declare const tokenizedUrls: readonly ["/market/balances", "/market/order", "/market/orders", "/market/account/kyc/status", "/market/account/kyc/init", "/market/withdrawal-fee", "/market/operation-details", "/wallet/key", "/wallet/transactions", "/wallet/transfer", "/wallet/withdraw", "/wallet/whitelist", "/wallet/withdrawal-wallets"];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum POINTS_SETTING {
|
|
2
|
+
OFF = "disable",
|
|
3
|
+
ULTRADE = "ultrade",
|
|
4
|
+
ALL = "all"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SettingIds {
|
|
7
|
+
ENABLED = "company.enabled",
|
|
8
|
+
APP_TITLE = "company.appTitle",
|
|
9
|
+
DOMAIN = "company.domain",
|
|
10
|
+
DIRECT_SETTLE = "company.directSettlement",
|
|
11
|
+
KYC = "markets.kycTradeRequirementEnabled",
|
|
12
|
+
GEOBLOCK = "company.geoblock",
|
|
13
|
+
LOGO = "appearance.logo",
|
|
14
|
+
THEMES = "appearance.themes",
|
|
15
|
+
NEW_TAB = "appearance.newTab",
|
|
16
|
+
TARGET = "appearance.target",
|
|
17
|
+
REPORT_BUTTONS = "appearance.reportButtons",
|
|
18
|
+
CUSTOM_MENU_ITEMS = "appearance.customMenuItems",
|
|
19
|
+
APPEARANCE_CHART_TYPE = "appearance.chartType",
|
|
20
|
+
APPEARANCE_CHART_INT = "appearance.chartInt",
|
|
21
|
+
AMM = "product.amm",
|
|
22
|
+
OBDEX = "product.obdex",
|
|
23
|
+
POINTS = "product.pointSystem",
|
|
24
|
+
AFFILIATE_DASHBOARD_THRESHOLD = "product.affiliateDashboardThreshold",
|
|
25
|
+
AFFILIATE_DEFAULT_FEE_SHARE = "product.affiliateDefaultFeeShare",
|
|
26
|
+
AFFILIATE_DASHBOARD_VISIBILITY = "product.affiliateDashboardVisibility",
|
|
27
|
+
AMM_FEE = "company.ammFee",
|
|
28
|
+
FEE_SHARE = "company.feeShare",
|
|
29
|
+
MIN_FEE = "company.minFee",
|
|
30
|
+
MAKER_FEE = "company.makerFee",
|
|
31
|
+
TAKER_FEE = "company.takerFee",
|
|
32
|
+
PINNED_PAIRS = "markets.pinnedPairs",
|
|
33
|
+
TWITTER_ENABLED = "point-system.twitterEnabled",
|
|
34
|
+
TWITTER_JOB_ENABLED = "point-system.twitterJobEnabled",
|
|
35
|
+
TWITTER_HASHTAGS = "point-system.twitterHashtags",
|
|
36
|
+
TWITTER_ACCOUNT_NAME = "point-system.twitterAccountName",
|
|
37
|
+
DISCORD_ENABLED = "point-system.discordEnabled",
|
|
38
|
+
TELEGRAM_ENABLED = "point-system.telegramEnabled",
|
|
39
|
+
TELEGRAM_GROUP_NAME = "point-system.telegramGroupName",
|
|
40
|
+
TELEGRAM_BOT_NAME = "point-system.telegramBotName",
|
|
41
|
+
GUIDE_LINK = "point-system.guideLink"
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum DIRECT_SETTLE {
|
|
2
|
+
YES = "Y",
|
|
3
|
+
NO = "N"
|
|
4
|
+
}
|
|
5
|
+
export declare enum PairSettingsIds {
|
|
6
|
+
MFT_AUDIO_LINK = "mft.audioLink",
|
|
7
|
+
MFT_TITLE = "mft.title",
|
|
8
|
+
VIEW_BASE_COIN_ICON_LINK = "view.baseCoinIconLink",
|
|
9
|
+
VIEW_BASE_COIN_MARKET_LINK = "view.baseCoinMarketLink",
|
|
10
|
+
VIEW_PRICE_COIN_ICON_LINK = "view.priceCoinIconLink",
|
|
11
|
+
VIEW_PRICE_COIN_MARKET_LINK = "view.priceCoinMarketLink",
|
|
12
|
+
MAKER_FEE = "makerFee",
|
|
13
|
+
TAKER_FEE = "takerFee",
|
|
14
|
+
MODE_PRE_SALE = "mode.preSale"
|
|
15
|
+
}
|