@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.
Files changed (46) hide show
  1. package/README.md +117 -0
  2. package/dist/argsAsObj/affiliates.args.d.ts +22 -0
  3. package/dist/argsAsObj/auth.args.d.ts +24 -0
  4. package/dist/argsAsObj/client.args.d.ts +21 -0
  5. package/dist/argsAsObj/index.d.ts +8 -0
  6. package/dist/argsAsObj/market.args.d.ts +53 -0
  7. package/dist/argsAsObj/social.args.d.ts +39 -0
  8. package/dist/argsAsObj/system.args.d.ts +7 -0
  9. package/dist/argsAsObj/trading.args.d.ts +12 -0
  10. package/dist/argsAsObj/wallet.args.d.ts +31 -0
  11. package/dist/client.d.ts +112 -0
  12. package/dist/const/auth.const.d.ts +1 -0
  13. package/dist/const/client.const.d.ts +8 -0
  14. package/dist/const/index.d.ts +2 -0
  15. package/dist/enum/account.enum.d.ts +42 -0
  16. package/dist/enum/affiliates.enum.d.ts +5 -0
  17. package/dist/enum/common.enum.d.ts +15 -0
  18. package/dist/enum/index.d.ts +6 -0
  19. package/dist/enum/market.enum.d.ts +252 -0
  20. package/dist/enum/social.enum.d.ts +6 -0
  21. package/dist/{src/enums.d.ts → enum/socket.enum.d.ts} +0 -16
  22. package/dist/index.d.ts +6 -0
  23. package/dist/index.js +1 -1
  24. package/dist/interface/account.interface.d.ts +64 -0
  25. package/dist/interface/affiliates.interface.d.ts +42 -0
  26. package/dist/interface/auth.interface.d.ts +19 -0
  27. package/dist/interface/client.interface.d.ts +12 -0
  28. package/dist/interface/index.d.ts +11 -0
  29. package/dist/interface/market.interface.d.ts +232 -0
  30. package/dist/interface/notification.interface.d.ts +6 -0
  31. package/dist/interface/social.interface.d.ts +145 -0
  32. package/dist/interface/socket.interface.d.ts +47 -0
  33. package/dist/interface/system.interface.d.ts +20 -0
  34. package/dist/interface/trading.interface.d.ts +38 -0
  35. package/dist/interface/wallet.interface.d.ts +143 -0
  36. package/dist/{src/localStorage.d.ts → localStorage.d.ts} +1 -1
  37. package/dist/{src/sockets.d.ts → sockets.d.ts} +1 -1
  38. package/dist/{src → utils}/algodService.d.ts +6 -8
  39. package/dist/utils/algorand.util.d.ts +4 -0
  40. package/dist/utils/client.util.d.ts +6 -0
  41. package/dist/utils/index.d.ts +3 -0
  42. package/package.json +9 -6
  43. package/dist/src/client.d.ts +0 -143
  44. package/dist/src/index.d.ts +0 -2
  45. package/dist/src/interfaces.d.ts +0 -136
  46. package/dist/src/utils.d.ts +0 -2
@@ -0,0 +1,143 @@
1
+ import { SuggestedParams } from 'algosdk';
2
+ import { TradingKeyType, PaginatedResult, ISafeWithdrawalWallets, UpdateWithdrawalWallet, CreateWithdrawalWallet } from "../../../shared/dist/browser/interfaces";
3
+ import { ACTION_TYPE, OperationStatusEnum, TransactionType } from '../enum/index.ts';
4
+ export interface TxnParams {
5
+ suggestedParams: SuggestedParams;
6
+ from: string;
7
+ to: string;
8
+ amount: number;
9
+ assetIndex?: number;
10
+ }
11
+ export interface OperationTxn {
12
+ txn_hash: string;
13
+ chain_id: number;
14
+ createdAt?: Date;
15
+ updatedAt?: Date;
16
+ type?: TransactionType;
17
+ }
18
+ export interface OperationVAA {
19
+ vaaId: string;
20
+ from_chain_id: number;
21
+ to_chain_id: number;
22
+ sequence: number;
23
+ emitter: string;
24
+ createdAt: Date;
25
+ updatedAt: Date;
26
+ }
27
+ export interface OperationCCTP {
28
+ id: number;
29
+ destinationChainId: number;
30
+ messageHash: string;
31
+ messageBytes: string;
32
+ status: OperationStatusEnum;
33
+ attestationSignature: string;
34
+ createdAt: Date;
35
+ updatedAt: Date;
36
+ attestationCompletedAt: Date;
37
+ }
38
+ export interface ITransactionDetails {
39
+ primaryId: number;
40
+ id: string;
41
+ login_address: string;
42
+ login_chain_id: number;
43
+ action_type: 'withdraw' | 'deposit';
44
+ status: OperationStatusEnum;
45
+ amount: string;
46
+ targetAddress: string;
47
+ timestamp: string;
48
+ createdAt: Date;
49
+ updatedAt: Date;
50
+ vaa_message?: Buffer;
51
+ fee: string | null;
52
+ transactions: Array<OperationTxn>;
53
+ vaaMessages: Array<OperationVAA>;
54
+ cctp: Array<OperationCCTP>;
55
+ }
56
+ export interface ITransaction {
57
+ primaryId: number;
58
+ id: string;
59
+ action_type: ACTION_TYPE;
60
+ status: OperationStatusEnum;
61
+ amount: string;
62
+ targetAddress: string;
63
+ createdAt?: Date;
64
+ updatedAt: Date;
65
+ vaa_message?: Buffer;
66
+ fee: string | null;
67
+ token_id: {
68
+ id: number;
69
+ address: string;
70
+ chainId: number;
71
+ unitName: string;
72
+ name: string;
73
+ decimals: number;
74
+ };
75
+ transactions: Array<{
76
+ txnHash: string;
77
+ chainId: number;
78
+ }>;
79
+ vaaMessages: Array<OperationVAA>;
80
+ }
81
+ export interface ITradingKey {
82
+ address: string;
83
+ createdAt: Date;
84
+ expiredAt: Date;
85
+ orders: number;
86
+ device: string;
87
+ type?: TradingKeyType;
88
+ }
89
+ export interface ITransfer {
90
+ transferId: number;
91
+ senderAddress: string;
92
+ recipientAddress: string;
93
+ tokenId: number;
94
+ amount: string;
95
+ expiredAt: number;
96
+ whitelistId: number;
97
+ txnId: string;
98
+ completedAt: Date;
99
+ status: OperationStatusEnum;
100
+ }
101
+ export interface IPendingTxn {
102
+ id: number;
103
+ type: ACTION_TYPE;
104
+ amount: string;
105
+ tokenId: number;
106
+ }
107
+ export interface IWhiteList {
108
+ id?: number;
109
+ loginAddress: string;
110
+ loginChainId: number;
111
+ recipient: string;
112
+ recipientChainId: number;
113
+ tkAddress: string;
114
+ expiredDate: number;
115
+ }
116
+ export interface IGetWhiteList {
117
+ id: number;
118
+ recipientAddress: string;
119
+ tkAddress: string;
120
+ expiredAt: number;
121
+ }
122
+ import { IWithdrawData, ITransferData } from "../../../shared/dist/browser/interfaces";
123
+ export interface IWithdrawResponse {
124
+ operationId: string;
125
+ txnId: string;
126
+ }
127
+ export interface IWalletForClient {
128
+ getTransactionDetalis(transactionId: number): Promise<ITransactionDetails>;
129
+ getPendingTransactions(): Promise<IPendingTxn[]>;
130
+ getWhitelist(): Promise<PaginatedResult<IGetWhiteList>>;
131
+ addWhitelist(data: IWhiteList): Promise<IGetWhiteList>;
132
+ deleteWhitelist(whitelistId: number): Promise<void>;
133
+ getWalletTransactions(type: string, page: number, limit?: number): Promise<PaginatedResult<ITransaction>>;
134
+ getTradingKeys(): Promise<ITradingKey>;
135
+ getTransfers(page: number, limit?: number): Promise<PaginatedResult<ITransfer>>;
136
+ getAllWithdrawalWallets(): Promise<ISafeWithdrawalWallets[]>;
137
+ getWithdrawalWalletByAddress(address: string): Promise<ISafeWithdrawalWallets>;
138
+ createWithdrawalWallet(body: CreateWithdrawalWallet): Promise<ISafeWithdrawalWallets>;
139
+ updateWithdrawalWallet(params: UpdateWithdrawalWallet): Promise<boolean>;
140
+ deleteWithdrawalWallet(address: string): Promise<boolean>;
141
+ withdraw(withdrawData: IWithdrawData, prettyMsg?: string): Promise<IWithdrawResponse>;
142
+ transfer(transferData: ITransferData): Promise<ITransfer>;
143
+ }
@@ -1,4 +1,4 @@
1
- import { WalletCredentials } from './interfaces';
1
+ import { WalletCredentials } from './interface/index.ts';
2
2
  export declare class LocalStorageService {
3
3
  private isBrowser;
4
4
  private keys;
@@ -1,4 +1,4 @@
1
- import { SubscribeOptions, SocketIOFactory, SocketIOClient } from './interfaces';
1
+ import { SubscribeOptions, SocketIOFactory, SocketIOClient } from './interface/index.ts';
2
2
  export declare class SocketManager {
3
3
  private onDisconnect?;
4
4
  private onConnectError?;
@@ -1,5 +1,5 @@
1
1
  import algosdk, { Transaction, SuggestedParams } from 'algosdk';
2
- import { AuthCredentials, OrderSide, Signer } from './interfaces';
2
+ import { AuthCredentials, Signer, OrderSide } from '../interface/index.ts';
3
3
  export declare class AlgodService {
4
4
  private client;
5
5
  private authCredentials;
@@ -13,13 +13,9 @@ export declare class AlgodService {
13
13
  get signer(): Signer;
14
14
  set signer(value: Signer);
15
15
  signAndSend(txnGroup: Transaction[] | Transaction): Promise<any>;
16
- signAndSendData(data: object | string, signMessage: (msg: string, encoding?: BufferEncoding) => Promise<string>, sendAction: (signedData: {
16
+ signAndSendData<TResponse>(data: object | string, signMessage: (msg: string, encoding?: BufferEncoding) => Promise<string>, sendAction: (signedData: {
17
17
  signature: string;
18
- }) => Promise<{
19
- signature: string;
20
- }>, encoding?: BufferEncoding): Promise<{
21
- signature: string;
22
- }>;
18
+ }) => Promise<TResponse>, encoding?: BufferEncoding): Promise<TResponse>;
23
19
  getTxnParams(): Promise<SuggestedParams>;
24
20
  getCurrentAccount(): {
25
21
  addr: string;
@@ -30,6 +26,8 @@ export declare class AlgodService {
30
26
  validateCredentials(): void;
31
27
  getAppState(appId: number): Promise<any>;
32
28
  getSuperAppId(appId: number): Promise<any>;
33
- getPairBalances(appId: number, address: string): Promise<any>;
29
+ getPairBalances(appId: number, address: string): Promise<{
30
+ [k: string]: any;
31
+ }>;
34
32
  calculateTransferAmount(appId: number, address: string, side: OrderSide, quantity: number, price: number, decimal: number): Promise<number>;
35
33
  }
@@ -0,0 +1,4 @@
1
+ export declare const unpackData: (data: Uint8Array) => {
2
+ [k: string]: any;
3
+ };
4
+ export declare const decodeString: (value: Uint8Array) => string;
@@ -0,0 +1,6 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ export interface ExtendedAxiosRequestConfig<T = any> extends AxiosRequestConfig<T> {
3
+ withWalletCredentials?: boolean;
4
+ url?: string;
5
+ }
6
+ export declare function createExtendedConfig<T>(config: ExtendedAxiosRequestConfig<T>): ExtendedAxiosRequestConfig<T>;
@@ -0,0 +1,3 @@
1
+ export { AlgodService } from "./algodService";
2
+ export * from "./algorand.util";
3
+ export * from "./client.util";
package/package.json CHANGED
@@ -1,17 +1,22 @@
1
1
  {
2
2
  "name": "@ultrade/ultrade-js-sdk",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "This package contains the original js/ts SDK.",
5
5
  "main": "./dist/index.js",
6
- "types": "./dist/src/index.d.ts",
6
+ "types": "./dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "cross-env MODE=production ts-node esbuild.config.ts",
9
9
  "dev": "ts-node esbuild.config.ts",
10
10
  "version:update": "npm version patch --no-git-tag-version"
11
11
  },
12
12
  "files": [
13
- "dist"
13
+ "dist",
14
+ "README.md"
14
15
  ],
16
+ "publishConfig": {
17
+ "registry": "https://registry.npmjs.org/",
18
+ "access": "public"
19
+ },
15
20
  "devDependencies": {
16
21
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
17
22
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
@@ -26,9 +31,7 @@
26
31
  "peerDependencies": {
27
32
  "algosdk": "^2.0.0",
28
33
  "axios": "^0.27.2",
29
- "react-secure-storage": "^1.3.2"
30
- },
31
- "dependencies": {
34
+ "react-secure-storage": "^1.3.2",
32
35
  "@ultrade/shared": "^1.0.9"
33
36
  }
34
37
  }
@@ -1,143 +0,0 @@
1
- import { AxiosResponse } from "axios";
2
- import { SocketManager } from "./sockets";
3
- import { AuthCredentials, ClientOptions, CancelOrderArgs, CreateOrderArgs, Signer, SubscribeOptions, TelegramData, WalletCredentials, UserNotification } from "./interfaces";
4
- import { ITradingKeyData } from '@ultrade/shared/browser/interfaces';
5
- import { ILoginData, ITransferData, IWithdrawData } from "@ultrade/shared/browser/interfaces";
6
- import { KYCAuthenticationStatus } from "@ultrade/shared/browser/enums";
7
- import { CreateWithdrawalWallet, UpdateWithdrawalWallet } from "@ultrade/shared/browser/interfaces";
8
- import { ISafeWithdrawalWallets } from "@ultrade/shared/browser/interfaces";
9
- export declare class Client {
10
- private client;
11
- private algodNode;
12
- private algodIndexer;
13
- private apiUrl;
14
- private companyId;
15
- private websocketUrl;
16
- private wallet;
17
- private _axios;
18
- private localStorageService;
19
- private isUltradeID;
20
- socketManager: SocketManager;
21
- constructor(options: ClientOptions, authCredentials?: AuthCredentials);
22
- private axiosInterceptor;
23
- get useUltradeID(): boolean;
24
- set useUltradeID(isUltrade: boolean);
25
- get isLogged(): boolean;
26
- get mainWallet(): WalletCredentials | null;
27
- set mainWallet(wallet: WalletCredentials);
28
- setSigner(signer: Signer): void;
29
- subscribe(subscribeOptions: SubscribeOptions, callback: Function): number;
30
- unsubscribe(handlerId: number): void;
31
- getPairList(companyId?: number): Promise<AxiosResponse<any, any>>;
32
- getExchangeInfo(symbol: string | number): Promise<AxiosResponse<any, any>>;
33
- getPrice(symbol: string): Promise<{
34
- ask: number;
35
- bid: number;
36
- last: number;
37
- }>;
38
- getDepth(symbol: string, depth: number): Promise<any>;
39
- getSymbols(mask?: string): Promise<Array<{
40
- pairKey: string;
41
- }>>;
42
- getLastTrades(symbol: string): Promise<any>;
43
- getHistory(symbol: string, interval: string, startTime?: number, endTime?: number, limit?: number, page?: number): Promise<any>;
44
- getOrders(symbol?: string, status?: number, limit?: number, endTime?: number, startTime?: number): Promise<AxiosResponse<any, any>>;
45
- getOrderById(orderId: number): Promise<any>;
46
- getSettings(): Promise<any>;
47
- getBalances(): Promise<any>;
48
- getChains(): Promise<any>;
49
- getCodexAssets(): Promise<any>;
50
- getCCTPAssets(): Promise<any>;
51
- getCCTPUnifiedAssets(): Promise<any>;
52
- getWithdrawalFee(assetAddress: string, chainId: number): Promise<any>;
53
- getKycStatus(): Promise<{
54
- kycStatus?: KYCAuthenticationStatus;
55
- }>;
56
- getKycInitLink(embeddedAppUrl: string | null): Promise<{
57
- url: string;
58
- }>;
59
- getDollarValues(assetIds?: number[]): Promise<{
60
- [key: string]: number;
61
- }>;
62
- getTransactionDetalis(transactionId: number): Promise<any>;
63
- getWalletTransactions(type: string, page: number, limit?: number): Promise<AxiosResponse<any, any>>;
64
- getTradingKeys(): Promise<AxiosResponse<any, any>>;
65
- getTransfers(page: number, limit?: number): Promise<AxiosResponse<any, any>>;
66
- getPendingTransactions(): Promise<AxiosResponse<any, any>>;
67
- getWhitelist(): Promise<AxiosResponse<any, any>>;
68
- addWhitelist(data: any): Promise<{
69
- signature: string;
70
- }>;
71
- deleteWhitelist(whitelistId: number): Promise<{
72
- signature: string;
73
- }>;
74
- getAllWithdrawalWallets(): Promise<ISafeWithdrawalWallets[]>;
75
- getWithdrawalWalletByAddress(address: string): Promise<ISafeWithdrawalWallets>;
76
- createWithdrawalWallet(body: CreateWithdrawalWallet): Promise<ISafeWithdrawalWallets>;
77
- updateWithdrawalWallet(params: UpdateWithdrawalWallet): Promise<boolean>;
78
- deleteWithdrawalWallet(address: string): Promise<boolean>;
79
- getVersion(): Promise<any>;
80
- getMaintenance(): Promise<any>;
81
- getNotifications(): Promise<UserNotification[]>;
82
- getNotificationsUnreadCount(): Promise<{
83
- count: number;
84
- }>;
85
- readNotifications(notifications: any[]): Promise<any>;
86
- getAffiliatesStatus(companyId: number): Promise<AxiosResponse<any, any>>;
87
- createAffiliate(companyId: number): Promise<AxiosResponse<any, any>>;
88
- getAffiliateProgress(companyId: number): Promise<AxiosResponse<any, any>>;
89
- getAffiliateInfo(companyId: number, range: string): Promise<AxiosResponse<any, any>>;
90
- countAffiliateDepost(companyId: number): Promise<AxiosResponse<any, any>>;
91
- countAffiliateClick(referralToken: string): Promise<AxiosResponse<any, any>>;
92
- getSocialAccount(): Promise<AxiosResponse<any, any>>;
93
- addSocialEmail(email: string, embeddedAppUrl: string): Promise<AxiosResponse<any, any>>;
94
- verifySocialEmail(email: string, hash: string): Promise<AxiosResponse<any, any>>;
95
- getLeaderboards(): Promise<AxiosResponse<any, any>>;
96
- getUnlocks(): Promise<AxiosResponse<any, any>>;
97
- getSocialSettings(): Promise<AxiosResponse<any, any>>;
98
- getSeason(ultradeId?: number): Promise<AxiosResponse<any, any>>;
99
- getPastSeasons(): Promise<AxiosResponse<any, any>>;
100
- addTelegram(data: TelegramData): Promise<AxiosResponse<any, any>>;
101
- disconnectTelegram(data: TelegramData): Promise<AxiosResponse<any, any>>;
102
- getDiscordConnectionUrl(url: any): Promise<any>;
103
- disconnectDiscord(): Promise<AxiosResponse<any, any>>;
104
- getTwitterConnectionUrl(appUrl: string, permissions?: string): Promise<any>;
105
- disconnectTwitter(): Promise<AxiosResponse<any, any>>;
106
- getTweets(): Promise<AxiosResponse<any, any>>;
107
- actionWithTweet(data: {
108
- actions: [{
109
- id: number;
110
- text?: string;
111
- }];
112
- tweetId?: string;
113
- }): Promise<AxiosResponse<any, any>>;
114
- getActions(): Promise<AxiosResponse<any, any>>;
115
- getActionHistory(): Promise<AxiosResponse<any, any>>;
116
- getAIStyles(): Promise<AxiosResponse<any, any>>;
117
- getAIComment(styleId: number, tweetId: string): Promise<AxiosResponse<any, any>>;
118
- private getTechnologyByProvider;
119
- login({ address, provider, chain, referralToken, loginMessage }: ILoginData): Promise<{
120
- signature: string;
121
- }>;
122
- addTradingKey(data: ITradingKeyData): Promise<{
123
- signature: string;
124
- }>;
125
- revokeTradingKey(data: ITradingKeyData): Promise<{
126
- signature: string;
127
- }>;
128
- withdraw(withdrawData: IWithdrawData, prettyMsg?: string): Promise<{
129
- signature: string;
130
- }>;
131
- transfer(transferData: ITransferData): Promise<{
132
- signature: string;
133
- }>;
134
- createOrder(order: CreateOrderArgs): Promise<{
135
- signature: string;
136
- }>;
137
- cancelOrder(order: CancelOrderArgs): Promise<any>;
138
- cancelMultipleOrders({ orderIds, pairId }: {
139
- orderIds?: number[];
140
- pairId?: number;
141
- }): Promise<any>;
142
- ping(): Promise<number>;
143
- }
@@ -1,2 +0,0 @@
1
- export * from './client';
2
- export { SocketManager } from './sockets';
@@ -1,136 +0,0 @@
1
- import { STREAMS } from "./enums";
2
- export interface Signer {
3
- signAndSend: ([]: Iterable<any, void, undefined>) => any;
4
- signMessage: (msg: string, encoding?: BufferEncoding) => Promise<string>;
5
- signMessageByToken: (msg: string, encoding?: BufferEncoding) => Promise<string>;
6
- }
7
- export interface TelegramData {
8
- auth_date: number;
9
- id: number;
10
- first_name: string;
11
- hash: string;
12
- photo_url: string;
13
- username: string;
14
- }
15
- export interface AppSocketState {
16
- address: string;
17
- appId: number;
18
- orderFilter: string;
19
- pairKey: string;
20
- pairId: number;
21
- }
22
- export interface AuthCredentials {
23
- company: string;
24
- clientId?: string;
25
- clientSecret?: string;
26
- mnemonic?: string;
27
- signer: Signer;
28
- }
29
- export interface WalletCredentials {
30
- address: string;
31
- chain: string;
32
- provider: string;
33
- token: string;
34
- tradingKey?: string;
35
- }
36
- export interface SocketIOClient {
37
- connected: boolean;
38
- id: string;
39
- on: (event: string, handler: (...args: unknown[]) => void) => void;
40
- off: (event: string, handler?: (...args: unknown[]) => void) => void;
41
- emit: (event: string, ...args: unknown[]) => void;
42
- onAny: (handler: (event: string, ...args: unknown[]) => void) => void;
43
- disconnect: () => void;
44
- io: {
45
- on: (event: string, handler: (...args: unknown[]) => void) => void;
46
- off: (event: string, handler?: (...args: unknown[]) => void) => void;
47
- };
48
- }
49
- export interface SocketIOFactory {
50
- (url: string, options?: unknown): SocketIOClient;
51
- }
52
- export interface ClientOptions {
53
- network: 'mainnet' | 'testnet' | 'local';
54
- apiUrl?: string;
55
- algoSdkClient: any;
56
- websocketUrl: string;
57
- companyId?: number;
58
- socketIO: SocketIOFactory;
59
- }
60
- export interface CancelOrderArgs {
61
- orderId: number;
62
- orderSide: OrderSide;
63
- orderType: OrderType;
64
- amount: string;
65
- price: string;
66
- baseTokenAddress: string;
67
- baseChain: string;
68
- baseCurrency: string;
69
- baseDecimal: number;
70
- priceTokenAddress: string;
71
- priceChain: string;
72
- priceCurrency: string;
73
- priceDecimal: number;
74
- }
75
- export interface CreateOrderArgs {
76
- pairId: number;
77
- companyId: number;
78
- orderSide: OrderSide;
79
- orderType: OrderType;
80
- amount: string;
81
- price: string;
82
- decimalPrice: number;
83
- address: string;
84
- chainId: number;
85
- baseTokenAddress: string;
86
- baseTokenChainId: number;
87
- baseChain: string;
88
- baseCurrency: string;
89
- baseDecimal: number;
90
- priceTokenAddress: string;
91
- priceTokenChainId: number;
92
- priceChain: string;
93
- priceCurrency: string;
94
- priceDecimal: number;
95
- }
96
- export interface SubscribeOptions {
97
- symbol: string;
98
- streams: STREAMS[];
99
- options: WSOptions;
100
- }
101
- interface WSOptions {
102
- address: string;
103
- token?: string;
104
- tradingKey?: string;
105
- message?: string;
106
- signature?: string;
107
- depth?: number;
108
- companyId?: number;
109
- interval?: string;
110
- }
111
- export interface ServerToClientEvents {
112
- reconnect: () => void;
113
- }
114
- export interface ClientToServerEvents {
115
- subscribe: (options: SubscribeOptions) => void;
116
- unsubscribe: (options: SubscribeOptions) => void;
117
- }
118
- export interface TxnParams {
119
- suggestedParams: any;
120
- from: string;
121
- to: string;
122
- amount: number;
123
- assetIndex?: number;
124
- }
125
- export type OrderSide = 'S' | 'B';
126
- export type OrderType = 'L' | 'I' | 'P' | 'M';
127
- export interface UserNotification {
128
- id: number;
129
- globalNotificationId: number;
130
- priority: any;
131
- status: any;
132
- type: any;
133
- message: string;
134
- createdAt: Date;
135
- }
136
- export {};
@@ -1,2 +0,0 @@
1
- export declare const unpackData: (data: any) => any;
2
- export declare const decodeString: (value: Uint8Array) => string;