@shapeshiftoss/types 2.0.0 → 2.2.1
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.
|
@@ -13,7 +13,7 @@ export declare type Address = {
|
|
|
13
13
|
balance: string;
|
|
14
14
|
};
|
|
15
15
|
export declare type GetAddressInput = GetAddressInputBase & {
|
|
16
|
-
accountType
|
|
16
|
+
accountType?: UtxoAccountType;
|
|
17
17
|
};
|
|
18
18
|
export declare type TransactionSpecific = {
|
|
19
19
|
opReturnData?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BTCSignTx, CosmosSignTx, ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core';
|
|
2
|
-
import { BIP44Params, ChainTypes,
|
|
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
|
|
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
|
-
|
|
133
|
-
|
|
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.
|
|
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.
|
|
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];
|