@ultrade/ultrade-js-sdk 2.0.0 → 2.0.1
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/dist/index.js +11 -1219
- package/dist/{algodService.d.ts → src/algodService.d.ts} +1 -1
- package/dist/{client.d.ts → src/client.d.ts} +33 -33
- package/dist/{interfaces.d.ts → src/interfaces.d.ts} +1 -1
- package/package.json +16 -14
- /package/dist/{enums.d.ts → src/enums.d.ts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{localStorage.d.ts → src/localStorage.d.ts} +0 -0
- /package/dist/{sockets.d.ts → src/sockets.d.ts} +0 -0
- /package/dist/{utils.d.ts → src/utils.d.ts} +0 -0
|
@@ -20,7 +20,7 @@ export declare class AlgodService {
|
|
|
20
20
|
}>, encoding?: BufferEncoding): Promise<{
|
|
21
21
|
signature: string;
|
|
22
22
|
}>;
|
|
23
|
-
getTxnParams(): Promise<
|
|
23
|
+
getTxnParams(): Promise<SuggestedParams>;
|
|
24
24
|
getCurrentAccount(): {
|
|
25
25
|
addr: string;
|
|
26
26
|
sk: Uint8Array;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
2
|
import { SocketManager } from "./sockets";
|
|
3
3
|
import { AuthCredentials, ClientOptions, CancelOrderArgs, CreateOrderArgs, Signer, SubscribeOptions, TelegramData, WalletCredentials, UserNotification } from "./interfaces";
|
|
4
4
|
import { ITradingKeyData } from '@ultrade/shared/interfaces';
|
|
@@ -28,8 +28,8 @@ export declare class Client {
|
|
|
28
28
|
setSigner(signer: Signer): void;
|
|
29
29
|
subscribe(subscribeOptions: SubscribeOptions, callback: Function): number;
|
|
30
30
|
unsubscribe(handlerId: number): void;
|
|
31
|
-
getPairList(companyId?: number): Promise<
|
|
32
|
-
getExchangeInfo(symbol: string | number): Promise<
|
|
31
|
+
getPairList(companyId?: number): Promise<AxiosResponse<any, any>>;
|
|
32
|
+
getExchangeInfo(symbol: string | number): Promise<AxiosResponse<any, any>>;
|
|
33
33
|
getPrice(symbol: string): Promise<{
|
|
34
34
|
ask: number;
|
|
35
35
|
bid: number;
|
|
@@ -41,7 +41,7 @@ export declare class Client {
|
|
|
41
41
|
}>>;
|
|
42
42
|
getLastTrades(symbol: string): Promise<any>;
|
|
43
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<
|
|
44
|
+
getOrders(symbol?: string, status?: number, limit?: number, endTime?: number, startTime?: number): Promise<AxiosResponse<any, any>>;
|
|
45
45
|
getOrderById(orderId: number): Promise<any>;
|
|
46
46
|
getSettings(): Promise<any>;
|
|
47
47
|
getBalances(): Promise<any>;
|
|
@@ -60,11 +60,11 @@ export declare class Client {
|
|
|
60
60
|
[key: string]: number;
|
|
61
61
|
}>;
|
|
62
62
|
getTransactionDetalis(transactionId: number): Promise<any>;
|
|
63
|
-
getWalletTransactions(type: string, page: number, limit?: number): Promise<
|
|
64
|
-
getTradingKeys(): Promise<
|
|
65
|
-
getTransfers(page: number, limit?: number): Promise<
|
|
66
|
-
getPendingTransactions(): Promise<
|
|
67
|
-
getWhitelist(): Promise<
|
|
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
68
|
addWhitelist(data: any): Promise<{
|
|
69
69
|
signature: string;
|
|
70
70
|
}>;
|
|
@@ -83,38 +83,38 @@ export declare class Client {
|
|
|
83
83
|
count: number;
|
|
84
84
|
}>;
|
|
85
85
|
readNotifications(notifications: any[]): Promise<any>;
|
|
86
|
-
getAffiliatesStatus(companyId: number): Promise<
|
|
87
|
-
createAffiliate(companyId: number): Promise<
|
|
88
|
-
getAffiliateProgress(companyId: number): Promise<
|
|
89
|
-
getAffiliateInfo(companyId: number, range: string): Promise<
|
|
90
|
-
countAffiliateDepost(companyId: number): Promise<
|
|
91
|
-
countAffiliateClick(referralToken: string): Promise<
|
|
92
|
-
getSocialAccount(): Promise<
|
|
93
|
-
addSocialEmail(email: string, embeddedAppUrl: string): Promise<
|
|
94
|
-
verifySocialEmail(email: string, hash: string): Promise<
|
|
95
|
-
getLeaderboards(): Promise<
|
|
96
|
-
getUnlocks(): Promise<
|
|
97
|
-
getSocialSettings(): Promise<
|
|
98
|
-
getSeason(ultradeId?: number): Promise<
|
|
99
|
-
getPastSeasons(): Promise<
|
|
100
|
-
addTelegram(data: TelegramData): Promise<
|
|
101
|
-
disconnectTelegram(data: TelegramData): Promise<
|
|
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
102
|
getDiscordConnectionUrl(url: any): Promise<any>;
|
|
103
|
-
disconnectDiscord(): Promise<
|
|
103
|
+
disconnectDiscord(): Promise<AxiosResponse<any, any>>;
|
|
104
104
|
getTwitterConnectionUrl(appUrl: string, permissions?: string): Promise<any>;
|
|
105
|
-
disconnectTwitter(): Promise<
|
|
106
|
-
getTweets(): Promise<
|
|
105
|
+
disconnectTwitter(): Promise<AxiosResponse<any, any>>;
|
|
106
|
+
getTweets(): Promise<AxiosResponse<any, any>>;
|
|
107
107
|
actionWithTweet(data: {
|
|
108
108
|
actions: [{
|
|
109
109
|
id: number;
|
|
110
110
|
text?: string;
|
|
111
111
|
}];
|
|
112
112
|
tweetId?: string;
|
|
113
|
-
}): Promise<
|
|
114
|
-
getActions(): Promise<
|
|
115
|
-
getActionHistory(): Promise<
|
|
116
|
-
getAIStyles(): Promise<
|
|
117
|
-
getAIComment(styleId: number, tweetId: string): Promise<
|
|
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
118
|
private getTechnologyByProvider;
|
|
119
119
|
login({ address, provider, chain, referralToken, loginMessage }: ILoginData): Promise<{
|
|
120
120
|
signature: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { STREAMS } from "./enums";
|
|
2
2
|
export interface Signer {
|
|
3
|
-
signAndSend: ([]:
|
|
3
|
+
signAndSend: ([]: any[]) => any;
|
|
4
4
|
signMessage: (msg: string, encoding?: BufferEncoding) => Promise<string>;
|
|
5
5
|
signMessageByToken: (msg: string, encoding?: BufferEncoding) => Promise<string>;
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrade/ultrade-js-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "This package contains the original js/ts SDK.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
8
9
|
"scripts": {
|
|
9
|
-
"build
|
|
10
|
-
"
|
|
11
|
-
"version:
|
|
10
|
+
"build": "cross-env MODE=production ts-node --esm esbuild.config.ts",
|
|
11
|
+
"dev": "ts-node --esm esbuild.config.ts",
|
|
12
|
+
"version:update": "npm version patch"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
14
15
|
"dist"
|
|
15
16
|
],
|
|
16
17
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
18
|
+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
19
|
+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
20
|
+
"@types/node": "^18.19.130",
|
|
21
|
+
"cross-env": "^10.1.0",
|
|
22
|
+
"esbuild": "^0.27.0",
|
|
23
|
+
"esbuild-plugin-d.ts": "^1.3.1",
|
|
19
24
|
"ts-loader": "^9.2.3",
|
|
20
|
-
"ts-node": "^10.
|
|
21
|
-
"typescript": "^5.6.3"
|
|
22
|
-
"webpack": "^5.102.1",
|
|
23
|
-
"webpack-cli": "^6.0.1",
|
|
24
|
-
"webpack-node-externals": "^3.0.0"
|
|
25
|
+
"ts-node": "^10.9.2",
|
|
26
|
+
"typescript": "^5.6.3"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
29
|
"algosdk": "^2.0.0",
|
|
28
|
-
"axios": "^
|
|
30
|
+
"axios": "^0.27.2",
|
|
29
31
|
"react-secure-storage": "^1.3.2"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@ultrade/shared": "^1.0.
|
|
34
|
+
"@ultrade/shared": "^1.0.8"
|
|
33
35
|
}
|
|
34
36
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|