@shapeshiftoss/types 2.11.0 → 3.1.0

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/base.d.ts CHANGED
@@ -39,8 +39,8 @@ export declare enum AssetDataSource {
39
39
  }
40
40
  declare type AbstractAsset = {
41
41
  assetId: string;
42
- caip2: string;
43
- caip19: string;
42
+ caip2?: string;
43
+ caip19?: string;
44
44
  chainId: string;
45
45
  chain: ChainTypes;
46
46
  description?: string;
@@ -108,7 +108,7 @@ export declare type ThorVaultInfo = {
108
108
  timestamp: string;
109
109
  };
110
110
  export declare type BuildThorTradeOutput = SignTxInput<unknown> & ThorVaultInfo;
111
- export declare type Quote<C extends ChainTypes, S extends SwapperType> = {
111
+ export declare type Quote<C extends ChainTypes> = {
112
112
  success: boolean;
113
113
  statusCode?: number;
114
114
  statusReason?: string;
@@ -116,7 +116,7 @@ export declare type Quote<C extends ChainTypes, S extends SwapperType> = {
116
116
  buyAssetAccountId?: string;
117
117
  sellAsset: Asset;
118
118
  buyAsset: Asset;
119
- feeData?: QuoteFeeData<C, S>;
119
+ feeData?: QuoteFeeData<C>;
120
120
  rate?: string;
121
121
  depositAddress?: string;
122
122
  receiveAddress?: string;
@@ -153,15 +153,15 @@ export declare type BuildQuoteTxInput = {
153
153
  input: GetQuoteInput;
154
154
  wallet: HDWallet;
155
155
  };
156
- export declare type ExecQuoteInput<C extends ChainTypes, S extends SwapperType> = {
157
- quote: Quote<C, S>;
156
+ export declare type ExecQuoteInput<C extends ChainTypes> = {
157
+ quote: Quote<C>;
158
158
  wallet: HDWallet;
159
159
  };
160
160
  export declare type ExecQuoteOutput = {
161
161
  txid: string;
162
162
  };
163
- export declare type ApprovalNeededInput<C extends ChainTypes, S extends SwapperType> = {
164
- quote: Quote<C, S>;
163
+ export declare type ApprovalNeededInput<C extends ChainTypes> = {
164
+ quote: Quote<C>;
165
165
  wallet: HDWallet;
166
166
  };
167
167
  export declare type ApprovalNeededOutput = {
@@ -169,8 +169,8 @@ export declare type ApprovalNeededOutput = {
169
169
  gas?: string;
170
170
  gasPrice?: string;
171
171
  };
172
- export declare type ApproveInfiniteInput<C extends ChainTypes, S extends SwapperType> = {
173
- quote: Quote<C, S>;
172
+ export declare type ApproveInfiniteInput<C extends ChainTypes> = {
173
+ quote: Quote<C>;
174
174
  wallet: HDWallet;
175
175
  };
176
176
  export {};
@@ -9,7 +9,7 @@ export declare type Info = {
9
9
  export declare type Validator = {
10
10
  address: string;
11
11
  moniker: string;
12
- tokens: string;
12
+ tokens?: string;
13
13
  apr: string;
14
14
  commission: string;
15
15
  };
@@ -1,6 +1,6 @@
1
1
  import { BTCSignTx, CosmosSignTx, ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core';
2
- import { BIP44Params, ChainTypes, SwapperType, UtxoAccountType } from '../base';
3
- import { ChainAndSwapperSpecific, ChainSpecific } from '../utility';
2
+ import { BIP44Params, ChainTypes, UtxoAccountType } from '../base';
3
+ import { ChainSpecific } from '../utility';
4
4
  import * as bitcoin from './bitcoin';
5
5
  import * as cosmos from './cosmos';
6
6
  import * as ethereum from './ethereum';
@@ -28,21 +28,17 @@ export declare enum FeeDataKey {
28
28
  Average = "average",
29
29
  Fast = "fast"
30
30
  }
31
- declare type ChainSpecificQuoteFeeData<T1, T2> = ChainAndSwapperSpecific<T1, {
31
+ declare type ChainSpecificQuoteFeeData<T1> = ChainSpecific<T1, {
32
32
  [ChainTypes.Ethereum]: ethereum.QuoteFeeData;
33
- }, T2, {
34
- [SwapperType.Thorchain]: {
35
- receiveFee: string;
36
- };
37
33
  }>;
38
34
  declare type ChainSpecificFeeData<T> = ChainSpecific<T, {
39
35
  [ChainTypes.Ethereum]: ethereum.FeeData;
40
36
  [ChainTypes.Bitcoin]: bitcoin.FeeData;
41
37
  [ChainTypes.Cosmos]: cosmos.FeeData;
42
38
  }>;
43
- export declare type QuoteFeeData<T1 extends ChainTypes, T2 extends SwapperType> = {
39
+ export declare type QuoteFeeData<T1 extends ChainTypes> = {
44
40
  fee: string;
45
- } & ChainSpecificQuoteFeeData<T1, T2>;
41
+ } & ChainSpecificQuoteFeeData<T1>;
46
42
  export declare type FeeData<T extends ChainTypes> = {
47
43
  txFee: string;
48
44
  } & ChainSpecificFeeData<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/types",
3
- "version": "2.11.0",
3
+ "version": "3.1.0",
4
4
  "description": "Common types shared across packages",
5
5
  "repository": "https://github.com/shapeshift/lib",
6
6
  "license": "MIT",
@@ -13,11 +13,13 @@
13
13
  "access": "public"
14
14
  },
15
15
  "scripts": {
16
- "build": "yarn clean && tsc --project tsconfig.build.json",
16
+ "build": "yarn clean && yarn compile",
17
17
  "dev": "tsc --watch",
18
- "clean": "rm -rf dist",
18
+ "clean": "rm -rf dist && rm -rf tsconfig.build.tsbuildinfo",
19
+ "compile": "tsc -p tsconfig.build.json",
20
+ "prepare": "yarn build",
19
21
  "test": "jest test",
20
- "type-check": "tsc --project ./tsconfig.json --noEmit"
22
+ "type-check": "tsc --project ./tsconfig.build.json --noEmit"
21
23
  },
22
24
  "devDependencies": {
23
25
  "@shapeshiftoss/hdwallet-core": "^1.20.0"