@shapeshiftoss/types 1.23.1 → 1.26.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.
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { BTCSignTx, ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core';
|
|
1
|
+
import { BTCSignTx, CosmosSignTx, ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core';
|
|
2
2
|
import { BIP44Params, ChainTypes, NetworkTypes, SwapperType, UtxoAccountType } from '../base';
|
|
3
3
|
import { ChainAndSwapperSpecific, ChainSpecific } from '../utility';
|
|
4
4
|
import * as bitcoin from './bitcoin';
|
|
5
|
+
import * as cosmos from './cosmos';
|
|
5
6
|
import * as ethereum from './ethereum';
|
|
6
|
-
|
|
7
|
+
import * as osmosis from './osmosis';
|
|
8
|
+
export { bitcoin, cosmos, ethereum };
|
|
7
9
|
declare type ChainSpecificAccount<T> = ChainSpecific<T, {
|
|
8
10
|
[ChainTypes.Ethereum]: ethereum.Account;
|
|
9
11
|
[ChainTypes.Bitcoin]: bitcoin.Account;
|
|
12
|
+
[ChainTypes.Cosmos]: cosmos.Account;
|
|
13
|
+
[ChainTypes.Osmosis]: osmosis.Account;
|
|
10
14
|
}>;
|
|
11
15
|
export declare type Account<T extends ChainTypes> = {
|
|
12
16
|
balance: string;
|
|
@@ -52,6 +56,7 @@ declare type ChainSpecificQuoteFeeData<T1, T2> = ChainAndSwapperSpecific<T1, {
|
|
|
52
56
|
declare type ChainSpecificFeeData<T> = ChainSpecific<T, {
|
|
53
57
|
[ChainTypes.Ethereum]: ethereum.FeeData;
|
|
54
58
|
[ChainTypes.Bitcoin]: bitcoin.FeeData;
|
|
59
|
+
[ChainTypes.Cosmos]: cosmos.FeeData;
|
|
55
60
|
}>;
|
|
56
61
|
export declare type QuoteFeeData<T1 extends ChainTypes, T2 extends SwapperType> = {
|
|
57
62
|
fee: string;
|
|
@@ -76,6 +81,7 @@ export declare type TxFee = {
|
|
|
76
81
|
export declare enum TxType {
|
|
77
82
|
Send = "send",
|
|
78
83
|
Receive = "receive",
|
|
84
|
+
Contract = "contract",
|
|
79
85
|
Unknown = "unknown"
|
|
80
86
|
}
|
|
81
87
|
export declare enum TxStatus {
|
|
@@ -97,6 +103,7 @@ export declare type SubscribeTxsMessage<T extends ChainTypes> = {
|
|
|
97
103
|
status: TxStatus;
|
|
98
104
|
tradeDetails?: TradeDetails;
|
|
99
105
|
transfers: Array<TxTransfer>;
|
|
106
|
+
data?: TxMetadata;
|
|
100
107
|
};
|
|
101
108
|
export declare enum TradeType {
|
|
102
109
|
Trade = "trade",
|
|
@@ -107,6 +114,10 @@ export declare type TradeDetails = {
|
|
|
107
114
|
memo?: string;
|
|
108
115
|
type: TradeType;
|
|
109
116
|
};
|
|
117
|
+
export interface TxMetadata {
|
|
118
|
+
method?: string;
|
|
119
|
+
parser: string;
|
|
120
|
+
}
|
|
110
121
|
export declare type TxTransfer = {
|
|
111
122
|
caip19: string;
|
|
112
123
|
from: string;
|
|
@@ -126,6 +137,7 @@ export declare type TxHistoryResponse<T extends ChainTypes> = {
|
|
|
126
137
|
declare type ChainTxTypeInner = {
|
|
127
138
|
[ChainTypes.Ethereum]: ETHSignTx;
|
|
128
139
|
[ChainTypes.Bitcoin]: BTCSignTx;
|
|
140
|
+
[ChainTypes.Cosmos]: CosmosSignTx;
|
|
129
141
|
};
|
|
130
142
|
export declare type ChainTxType<T> = T extends keyof ChainTxTypeInner ? ChainTxTypeInner[T] : never;
|
|
131
143
|
export declare type BuildSendTxInput<T extends ChainTypes> = {
|
|
@@ -138,6 +150,8 @@ export declare type BuildSendTxInput<T extends ChainTypes> = {
|
|
|
138
150
|
declare type ChainSpecificBuildTxData<T> = ChainSpecific<T, {
|
|
139
151
|
[ChainTypes.Ethereum]: ethereum.BuildTxInput;
|
|
140
152
|
[ChainTypes.Bitcoin]: bitcoin.BuildTxInput;
|
|
153
|
+
[ChainTypes.Cosmos]: cosmos.BuildTxInput;
|
|
154
|
+
[ChainTypes.Osmosis]: cosmos.BuildTxInput;
|
|
141
155
|
}>;
|
|
142
156
|
export declare type SignTxInput<TxType> = {
|
|
143
157
|
txToSign: TxType;
|
|
@@ -19,10 +19,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ValidAddressResultType = exports.TradeType = exports.TxStatus = exports.TxType = exports.FeeDataKey = exports.ethereum = exports.bitcoin = void 0;
|
|
22
|
+
exports.ValidAddressResultType = exports.TradeType = exports.TxStatus = exports.TxType = exports.FeeDataKey = exports.ethereum = exports.cosmos = exports.bitcoin = void 0;
|
|
23
23
|
const base_1 = require("../base");
|
|
24
24
|
const bitcoin = __importStar(require("./bitcoin"));
|
|
25
25
|
exports.bitcoin = bitcoin;
|
|
26
|
+
const cosmos = __importStar(require("./cosmos"));
|
|
27
|
+
exports.cosmos = cosmos;
|
|
26
28
|
const ethereum = __importStar(require("./ethereum"));
|
|
27
29
|
exports.ethereum = ethereum;
|
|
28
30
|
var FeeDataKey;
|
|
@@ -35,6 +37,7 @@ var TxType;
|
|
|
35
37
|
(function (TxType) {
|
|
36
38
|
TxType["Send"] = "send";
|
|
37
39
|
TxType["Receive"] = "receive";
|
|
40
|
+
TxType["Contract"] = "contract";
|
|
38
41
|
TxType["Unknown"] = "unknown";
|
|
39
42
|
})(TxType = exports.TxType || (exports.TxType = {}));
|
|
40
43
|
var TxStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshiftoss/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "Common types shared across packages",
|
|
5
5
|
"repository": "https://github.com/shapeshift/lib",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"type-check": "tsc --project ./tsconfig.json --noEmit"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@shapeshiftoss/hdwallet-core": "^1.
|
|
23
|
+
"@shapeshiftoss/hdwallet-core": "^1.19.0"
|
|
24
24
|
}
|
|
25
25
|
}
|