@shapeshiftoss/types 1.26.0 → 2.2.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
@@ -8,12 +8,6 @@ export declare type BIP44Params = {
8
8
  isChange?: boolean;
9
9
  index?: number;
10
10
  };
11
- export declare enum ContractTypes {
12
- ERC20 = "ERC20",
13
- ERC721 = "ERC721",
14
- OTHER = "OTHER",
15
- NONE = "NONE"
16
- }
17
11
  export declare enum ChainTypes {
18
12
  Ethereum = "ethereum",
19
13
  Bitcoin = "bitcoin",
@@ -63,7 +57,7 @@ declare type AbstractAsset = {
63
57
  declare type OmittedTokenAssetFields = 'chain' | 'network' | 'slip44' | 'explorer' | 'explorerTxLink' | 'explorerAddressLink';
64
58
  declare type TokenAssetFields = {
65
59
  tokenId: string;
66
- contractType: ContractTypes;
60
+ contractType: 'erc20' | 'erc721';
67
61
  };
68
62
  export declare type TokenAsset = Omit<AbstractAsset, OmittedTokenAssetFields> & TokenAssetFields;
69
63
  export declare type BaseAsset = AbstractAsset & {
package/dist/base.js CHANGED
@@ -1,13 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapperType = exports.AssetDataSource = exports.UtxoAccountType = exports.NetworkTypes = exports.ChainTypes = exports.ContractTypes = void 0;
4
- var ContractTypes;
5
- (function (ContractTypes) {
6
- ContractTypes["ERC20"] = "ERC20";
7
- ContractTypes["ERC721"] = "ERC721";
8
- ContractTypes["OTHER"] = "OTHER";
9
- ContractTypes["NONE"] = "NONE";
10
- })(ContractTypes = exports.ContractTypes || (exports.ContractTypes = {}));
3
+ exports.SwapperType = exports.AssetDataSource = exports.UtxoAccountType = exports.NetworkTypes = exports.ChainTypes = void 0;
11
4
  var ChainTypes;
12
5
  (function (ChainTypes) {
13
6
  ChainTypes["Ethereum"] = "ethereum";
@@ -1,9 +1,11 @@
1
1
  export declare type BuildTxInput = {
2
2
  gas: string;
3
+ fee: string;
3
4
  };
4
5
  export declare type Account = {
5
- sequence: number;
6
+ sequence: string;
7
+ accountNumber: string;
6
8
  };
7
9
  export declare type FeeData = {
8
- value: string;
10
+ gasLimit: string;
9
11
  };
@@ -1,5 +1,5 @@
1
1
  import { BTCSignTx, CosmosSignTx, ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core';
2
- import { BIP44Params, ChainTypes, NetworkTypes, SwapperType, UtxoAccountType } from '../base';
2
+ import { BIP44Params, ChainTypes, SwapperType, UtxoAccountType } from '../base';
3
3
  import { ChainAndSwapperSpecific, ChainSpecific } from '../utility';
4
4
  import * as bitcoin from './bitcoin';
5
5
  import * as cosmos from './cosmos';
@@ -23,24 +23,6 @@ export declare type AssetBalance = {
23
23
  balance: string;
24
24
  caip19: string;
25
25
  };
26
- declare type ChainSpecificTransaction<T> = ChainSpecific<T, {
27
- [ChainTypes.Bitcoin]: bitcoin.TransactionSpecific;
28
- }>;
29
- export declare type Transaction<T extends ChainTypes> = {
30
- network: NetworkTypes;
31
- chain: T;
32
- symbol: string;
33
- txid: string;
34
- status: string;
35
- from: string;
36
- to?: string;
37
- blockHash?: string;
38
- blockHeight?: number;
39
- confirmations?: number;
40
- timestamp?: number;
41
- value: string;
42
- fee: string;
43
- } & ChainSpecificTransaction<T>;
44
26
  export declare enum FeeDataKey {
45
27
  Slow = "slow",
46
28
  Average = "average",
@@ -90,7 +72,7 @@ export declare enum TxStatus {
90
72
  Failed = "failed",
91
73
  Unknown = "unknown"
92
74
  }
93
- export declare type SubscribeTxsMessage<T extends ChainTypes> = {
75
+ export declare type Transaction<T extends ChainTypes> = {
94
76
  address: string;
95
77
  blockHash?: string;
96
78
  blockHeight: number;
@@ -129,9 +111,8 @@ export declare type SubscribeError = {
129
111
  message: string;
130
112
  };
131
113
  export declare type TxHistoryResponse<T extends ChainTypes> = {
132
- page: number;
133
- totalPages: number;
134
- txs: number;
114
+ cursor: string;
115
+ pubkey: string;
135
116
  transactions: Array<Transaction<T>>;
136
117
  };
137
118
  declare type ChainTxTypeInner = {
@@ -158,10 +139,9 @@ export declare type SignTxInput<TxType> = {
158
139
  wallet: HDWallet;
159
140
  };
160
141
  export interface TxHistoryInput {
142
+ readonly cursor?: string;
161
143
  readonly pubkey: string;
162
- readonly page?: number;
163
144
  readonly pageSize?: number;
164
- readonly contract?: string;
165
145
  }
166
146
  export declare type GetAddressInputBase = {
167
147
  wallet: HDWallet;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/types",
3
- "version": "1.26.0",
3
+ "version": "2.2.0",
4
4
  "description": "Common types shared across packages",
5
5
  "repository": "https://github.com/shapeshift/lib",
6
6
  "license": "MIT",