@ultrade/shared 1.0.16 → 1.0.17

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.
@@ -1,6 +1,6 @@
1
1
  import algosdk from 'algosdk';
2
2
  import { encodeAddress, IMsgArgs } from './codex';
3
- import { ICancelOrderMsgData, ICreateOrderData, IOrderData } from '../interfaces/order.interface';
3
+ import { ICancelOrderMsgData, ICreateSpotOrderData, IOrderData } from '../interfaces/order.interface';
4
4
  import { AddressChain, PairToken, PairTokenInfo } from "../interfaces/pair.interface";
5
5
  import { MatchArgs } from "../interfaces/trading.interface";
6
6
  import { ITradingKeyData, ITradingKeyMessageData } from "../interfaces/tradingKey.interface";
@@ -55,7 +55,7 @@ export declare const getTokenBoxValue: (algoClient: algosdk.Algodv2, appId: numb
55
55
  export declare const makeAssetOptInTxn: (appId: number, superId: number, sender: string, params: algosdk.SuggestedParams, balances: Record<string, number>, token: PairToken) => algosdk.Transaction | undefined;
56
56
  export declare const makeDepositTxns: (appId: number, algoClient: algosdk.Algodv2, sender: string, loginAddress: string, loginChainId: number, tokenAmount: number, tokenIndex: number, tokenChainId: number) => Promise<any[]>;
57
57
  export declare const makeDepositMsg: ({ loginAddress, loginChainId, }: DepositData) => Uint8Array<ArrayBufferLike>;
58
- export declare const makeCreateOrderMsg: (data: ICreateOrderData) => Uint8Array;
58
+ export declare const makeCreateOrderMsg: (data: ICreateSpotOrderData) => Uint8Array;
59
59
  export declare const getCancelOrderDataJsonBytes: (data: ICancelOrderMsgData) => Uint8Array;
60
60
  export declare const decodeCreateOrderMsg: (message: string, encoding?: BufferEncoding) => IOrderData;
61
61
  export declare const getPairBoxKey: (baseToken: PairToken, priceToken: PairToken) => Uint8Array<ArrayBufferLike>;
@@ -22,7 +22,7 @@ export interface IOrderData extends IOrderDataInMsg {
22
22
  }
23
23
  export type OrderSideShort = "B" | "S";
24
24
  export type OrderTypeShort = "L" | "I" | "P" | "M";
25
- export interface ICreateOrderData extends IOrderData {
25
+ export interface ICreateSpotOrderData extends IOrderData {
26
26
  baseChain: string;
27
27
  baseCurrency: string;
28
28
  baseDecimal: number;
package/package.json CHANGED
@@ -1,36 +1,52 @@
1
1
  {
2
2
  "name": "@ultrade/shared",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "This package contains shared code for the projects.",
5
5
  "exports": {
6
6
  "./browser/common/*": {
7
- "import": "./dist/browser/common/*.js",
8
- "types": "./dist/common/*.d.ts"
7
+ "import": "./dist/browser/common/*.js"
9
8
  },
10
9
  "./node/common/*": {
11
10
  "import": "./dist/node/common/*.js",
12
- "types": "./dist/common/*.d.ts",
13
11
  "require": "./dist/node/common/*.js"
14
12
  },
15
13
  "./browser/helpers/*": {
16
- "import": "./dist/browser/helpers/*.js",
17
- "types": "./dist/helpers/*.d.ts"
14
+ "import": "./dist/browser/helpers/*.js"
18
15
  },
19
16
  "./node/helpers/*": {
20
17
  "import": "./dist/node/helpers/*.js",
21
- "types": "./dist/helpers/*.d.ts",
22
18
  "require": "./dist/node/helpers/*.js"
23
19
  },
24
20
  "./browser/*": {
25
- "import": "./dist/browser/*/index.js",
26
- "types": "./dist/*/index.d.ts"
21
+ "import": "./dist/browser/*/index.js"
27
22
  },
28
23
  "./node/*": {
29
24
  "import": "./dist/node/*/index.js",
30
- "types": "./dist/*/index.d.ts",
31
25
  "require": "./dist/node/*/index.js"
32
26
  }
33
27
  },
28
+ "typesVersions": {
29
+ "*": {
30
+ "browser/common/*": [
31
+ "dist/common/*"
32
+ ],
33
+ "node/common/*": [
34
+ "dist/common/*"
35
+ ],
36
+ "browser/helpers/*": [
37
+ "dist/helpers/*"
38
+ ],
39
+ "node/helpers/*": [
40
+ "dist/helpers/*"
41
+ ],
42
+ "browser/*": [
43
+ "dist/*/index.d.ts"
44
+ ],
45
+ "node/*": [
46
+ "dist/*/index.d.ts"
47
+ ]
48
+ }
49
+ },
34
50
  "scripts": {
35
51
  "build": "cross-env MODE=production ts-node esbuild.config.ts",
36
52
  "dev": "cross-env MODE=development ts-node esbuild.config.ts",