@ultrade/ultrade-js-sdk 2.0.0 → 2.0.2

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.
@@ -20,7 +20,7 @@ export declare class AlgodService {
20
20
  }>, encoding?: BufferEncoding): Promise<{
21
21
  signature: string;
22
22
  }>;
23
- getTxnParams(): Promise<algosdk.SuggestedParams>;
23
+ getTxnParams(): Promise<SuggestedParams>;
24
24
  getCurrentAccount(): {
25
25
  addr: string;
26
26
  sk: Uint8Array;
@@ -28,7 +28,7 @@ export declare class AlgodService {
28
28
  getAccountInfo(address: string): Promise<Record<string, any>>;
29
29
  constructArgsForAppCall(...args: any[]): Uint8Array<ArrayBufferLike>[];
30
30
  validateCredentials(): void;
31
- getAppState(appId: number): Promise<{}>;
31
+ getAppState(appId: number): Promise<any>;
32
32
  getSuperAppId(appId: number): Promise<any>;
33
33
  getPairBalances(appId: number, address: string): Promise<any>;
34
34
  calculateTransferAmount(appId: number, address: string, side: OrderSide, quantity: number, price: number, decimal: number): Promise<number>;
@@ -1,11 +1,11 @@
1
- import axios from "axios";
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
- import { ITradingKeyData } from '@ultrade/shared/interfaces';
5
- import { ILoginData, ITransferData, IWithdrawData } from "@ultrade/shared/interfaces";
6
- import { KYCAuthenticationStatus } from "@ultrade/shared/enums";
7
- import { CreateWithdrawalWallet, UpdateWithdrawalWallet } from "@ultrade/shared/interfaces";
8
- import { ISafeWithdrawalWallets } from "@ultrade/shared/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
9
  export declare class Client {
10
10
  private client;
11
11
  private algodNode;
@@ -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<axios.AxiosResponse<any, any, {}>>;
32
- getExchangeInfo(symbol: string | number): Promise<axios.AxiosResponse<any, any, {}>>;
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<axios.AxiosResponse<any, any, {}>>;
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<axios.AxiosResponse<any, any, {}>>;
64
- getTradingKeys(): Promise<axios.AxiosResponse<any, any, {}>>;
65
- getTransfers(page: number, limit?: number): Promise<axios.AxiosResponse<any, any, {}>>;
66
- getPendingTransactions(): Promise<axios.AxiosResponse<any, any, {}>>;
67
- getWhitelist(): Promise<axios.AxiosResponse<any, 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
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<axios.AxiosResponse<any, any, {}>>;
87
- createAffiliate(companyId: number): Promise<axios.AxiosResponse<any, any, {}>>;
88
- getAffiliateProgress(companyId: number): Promise<axios.AxiosResponse<any, any, {}>>;
89
- getAffiliateInfo(companyId: number, range: string): Promise<axios.AxiosResponse<any, any, {}>>;
90
- countAffiliateDepost(companyId: number): Promise<axios.AxiosResponse<any, any, {}>>;
91
- countAffiliateClick(referralToken: string): Promise<axios.AxiosResponse<any, any, {}>>;
92
- getSocialAccount(): Promise<axios.AxiosResponse<any, any, {}>>;
93
- addSocialEmail(email: string, embeddedAppUrl: string): Promise<axios.AxiosResponse<any, any, {}>>;
94
- verifySocialEmail(email: string, hash: string): Promise<axios.AxiosResponse<any, any, {}>>;
95
- getLeaderboards(): Promise<axios.AxiosResponse<any, any, {}>>;
96
- getUnlocks(): Promise<axios.AxiosResponse<any, any, {}>>;
97
- getSocialSettings(): Promise<axios.AxiosResponse<any, any, {}>>;
98
- getSeason(ultradeId?: number): Promise<axios.AxiosResponse<any, any, {}>>;
99
- getPastSeasons(): Promise<axios.AxiosResponse<any, any, {}>>;
100
- addTelegram(data: TelegramData): Promise<axios.AxiosResponse<any, any, {}>>;
101
- disconnectTelegram(data: TelegramData): Promise<axios.AxiosResponse<any, 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
102
  getDiscordConnectionUrl(url: any): Promise<any>;
103
- disconnectDiscord(): Promise<axios.AxiosResponse<any, any, {}>>;
103
+ disconnectDiscord(): Promise<AxiosResponse<any, any>>;
104
104
  getTwitterConnectionUrl(appUrl: string, permissions?: string): Promise<any>;
105
- disconnectTwitter(): Promise<axios.AxiosResponse<any, any, {}>>;
106
- getTweets(): Promise<axios.AxiosResponse<any, any, {}>>;
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<axios.AxiosResponse<any, any, {}>>;
114
- getActions(): Promise<axios.AxiosResponse<any, any, {}>>;
115
- getActionHistory(): Promise<axios.AxiosResponse<any, any, {}>>;
116
- getAIStyles(): Promise<axios.AxiosResponse<any, any, {}>>;
117
- getAIComment(styleId: number, tweetId: string): Promise<axios.AxiosResponse<any, any, {}>>;
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;
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
2
  "name": "@ultrade/ultrade-js-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "This package contains the original js/ts SDK.",
5
5
  "main": "./dist/index.js",
6
- "module": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
6
+ "types": "./dist/src/index.d.ts",
8
7
  "scripts": {
9
- "build:prod": "webpack --config webpack.config.js --env production=true",
10
- "build:dev": "webpack --config webpack.config.js --env production=false",
11
- "version:patch": "npm version patch"
8
+ "build": "cross-env MODE=production ts-node esbuild.config.ts",
9
+ "dev": "ts-node esbuild.config.ts",
10
+ "version:update": "npm version patch --no-git-tag-version"
12
11
  },
13
12
  "files": [
14
13
  "dist"
15
14
  ],
16
15
  "devDependencies": {
17
- "@types/node": "^18.7.17",
18
- "@types/webpack": "^5.28.5",
16
+ "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
17
+ "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
18
+ "@types/node": "^18.19.130",
19
+ "cross-env": "^10.1.0",
20
+ "esbuild": "^0.27.0",
21
+ "esbuild-plugin-d.ts": "^1.3.1",
19
22
  "ts-loader": "^9.2.3",
20
- "ts-node": "^10.0.0",
21
- "typescript": "^5.6.3",
22
- "webpack": "^5.102.1",
23
- "webpack-cli": "^6.0.1",
24
- "webpack-node-externals": "^3.0.0"
23
+ "ts-node": "^10.9.2",
24
+ "typescript": "^5.6.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "algosdk": "^2.0.0",
28
- "axios": "^1.13.2",
28
+ "axios": "^0.27.2",
29
29
  "react-secure-storage": "^1.3.2"
30
30
  },
31
31
  "dependencies": {
32
- "@ultrade/shared": "^1.0.2"
32
+ "@ultrade/shared": "^1.0.9"
33
33
  }
34
34
  }
File without changes
File without changes
File without changes
File without changes
File without changes